var gW=Object.defineProperty;var GM=e=>{throw TypeError(e)};var vW=(e,t,n)=>t in e?gW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var oS=(e,t,n)=>vW(e,typeof t!="symbol"?t+"":t,n),sS=(e,t,n)=>t.has(e)||GM("Cannot "+n);var W=(e,t,n)=>(sS(e,t,"read from private field"),n?n.call(e):t.get(e)),Pe=(e,t,n)=>t.has(e)?GM("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ke=(e,t,n,r)=>(sS(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),tt=(e,t,n)=>(sS(e,t,"access private method"),n);var Ov=(e,t,n,r)=>({set _(i){ke(e,t,i,n)},get _(){return W(e,t,r)}});function yW(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const a=Object.getOwnPropertyDescriptor(r,i);a&&Object.defineProperty(e,i,a.get?a:{enumerable:!0,get:()=>r[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"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(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 r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();function Hi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var lS={exports:{}},Hh={};/**
 * @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 WM;function xW(){if(WM)return Hh;WM=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,a){var o=null;if(a!==void 0&&(o=""+a),i.key!==void 0&&(o=""+i.key),"key"in i){a={};for(var l in i)l!=="key"&&(a[l]=i[l])}else a=i;return i=a.ref,{$$typeof:e,type:r,key:o,ref:i!==void 0?i:null,props:a}}return Hh.Fragment=t,Hh.jsx=n,Hh.jsxs=n,Hh}var QM;function bW(){return QM||(QM=1,lS.exports=xW()),lS.exports}var m=bW(),uS={exports:{}},lt={};/**
 * @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 ZM;function wW(){if(ZM)return lt;ZM=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),d=Symbol.for("react.activity"),g=Symbol.iterator;function v(H){return H===null||typeof H!="object"?null:(H=g&&H[g]||H["@@iterator"],typeof H=="function"?H:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,S={};function E(H,U,$){this.props=H,this.context=U,this.refs=S,this.updater=$||b}E.prototype.isReactComponent={},E.prototype.setState=function(H,U){if(typeof H!="object"&&typeof H!="function"&&H!=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,H,U,"setState")},E.prototype.forceUpdate=function(H){this.updater.enqueueForceUpdate(this,H,"forceUpdate")};function C(){}C.prototype=E.prototype;function _(H,U,$){this.props=H,this.context=U,this.refs=S,this.updater=$||b}var N=_.prototype=new C;N.constructor=_,w(N,E.prototype),N.isPureReactComponent=!0;var O=Array.isArray;function A(){}var T={H:null,A:null,T:null,S:null},P=Object.prototype.hasOwnProperty;function I(H,U,$){var Q=$.ref;return{$$typeof:e,type:H,key:U,ref:Q!==void 0?Q:null,props:$}}function z(H,U){return I(H.type,U,H.props)}function F(H){return typeof H=="object"&&H!==null&&H.$$typeof===e}function B(H){var U={"=":"=0",":":"=2"};return"$"+H.replace(/[=:]/g,function($){return U[$]})}var G=/\/+/g;function L(H,U){return typeof H=="object"&&H!==null&&H.key!=null?B(""+H.key):U.toString(36)}function V(H){switch(H.status){case"fulfilled":return H.value;case"rejected":throw H.reason;default:switch(typeof H.status=="string"?H.then(A,A):(H.status="pending",H.then(function(U){H.status==="pending"&&(H.status="fulfilled",H.value=U)},function(U){H.status==="pending"&&(H.status="rejected",H.reason=U)})),H.status){case"fulfilled":return H.value;case"rejected":throw H.reason}}throw H}function D(H,U,$,Q,J){var ne=typeof H;(ne==="undefined"||ne==="boolean")&&(H=null);var ae=!1;if(H===null)ae=!0;else switch(ne){case"bigint":case"string":case"number":ae=!0;break;case"object":switch(H.$$typeof){case e:case t:ae=!0;break;case h:return ae=H._init,D(ae(H._payload),U,$,Q,J)}}if(ae)return J=J(H),ae=Q===""?"."+L(H,0):Q,O(J)?($="",ae!=null&&($=ae.replace(G,"$&/")+"/"),D(J,U,$,"",function(se){return se})):J!=null&&(F(J)&&(J=z(J,$+(J.key==null||H&&H.key===J.key?"":(""+J.key).replace(G,"$&/")+"/")+ae)),U.push(J)),1;ae=0;var ie=Q===""?".":Q+":";if(O(H))for(var ee=0;ee<H.length;ee++)Q=H[ee],ne=ie+L(Q,ee),ae+=D(Q,U,$,ne,J);else if(ee=v(H),typeof ee=="function")for(H=ee.call(H),ee=0;!(Q=H.next()).done;)Q=Q.value,ne=ie+L(Q,ee++),ae+=D(Q,U,$,ne,J);else if(ne==="object"){if(typeof H.then=="function")return D(V(H),U,$,Q,J);throw U=String(H),Error("Objects are not valid as a React child (found: "+(U==="[object Object]"?"object with keys {"+Object.keys(H).join(", ")+"}":U)+"). If you meant to render a collection of children, use an array instead.")}return ae}function q(H,U,$){if(H==null)return H;var Q=[],J=0;return D(H,Q,"","",function(ne){return U.call($,ne,J++)}),Q}function X(H){if(H._status===-1){var U=H._result;U=U(),U.then(function($){(H._status===0||H._status===-1)&&(H._status=1,H._result=$)},function($){(H._status===0||H._status===-1)&&(H._status=2,H._result=$)}),H._status===-1&&(H._status=0,H._result=U)}if(H._status===1)return H._result.default;throw H._result}var K=typeof reportError=="function"?reportError:function(H){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var U=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof H=="object"&&H!==null&&typeof H.message=="string"?String(H.message):String(H),error:H});if(!window.dispatchEvent(U))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",H);return}console.error(H)},R={map:q,forEach:function(H,U,$){q(H,function(){U.apply(this,arguments)},$)},count:function(H){var U=0;return q(H,function(){U++}),U},toArray:function(H){return q(H,function(U){return U})||[]},only:function(H){if(!F(H))throw Error("React.Children.only expected to receive a single React element child.");return H}};return lt.Activity=d,lt.Children=R,lt.Component=E,lt.Fragment=n,lt.Profiler=i,lt.PureComponent=_,lt.StrictMode=r,lt.Suspense=c,lt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,lt.__COMPILER_RUNTIME={__proto__:null,c:function(H){return T.H.useMemoCache(H)}},lt.cache=function(H){return function(){return H.apply(null,arguments)}},lt.cacheSignal=function(){return null},lt.cloneElement=function(H,U,$){if(H==null)throw Error("The argument must be a React element, but you passed "+H+".");var Q=w({},H.props),J=H.key;if(U!=null)for(ne in U.key!==void 0&&(J=""+U.key),U)!P.call(U,ne)||ne==="key"||ne==="__self"||ne==="__source"||ne==="ref"&&U.ref===void 0||(Q[ne]=U[ne]);var ne=arguments.length-2;if(ne===1)Q.children=$;else if(1<ne){for(var ae=Array(ne),ie=0;ie<ne;ie++)ae[ie]=arguments[ie+2];Q.children=ae}return I(H.type,J,Q)},lt.createContext=function(H){return H={$$typeof:o,_currentValue:H,_currentValue2:H,_threadCount:0,Provider:null,Consumer:null},H.Provider=H,H.Consumer={$$typeof:a,_context:H},H},lt.createElement=function(H,U,$){var Q,J={},ne=null;if(U!=null)for(Q in U.key!==void 0&&(ne=""+U.key),U)P.call(U,Q)&&Q!=="key"&&Q!=="__self"&&Q!=="__source"&&(J[Q]=U[Q]);var ae=arguments.length-2;if(ae===1)J.children=$;else if(1<ae){for(var ie=Array(ae),ee=0;ee<ae;ee++)ie[ee]=arguments[ee+2];J.children=ie}if(H&&H.defaultProps)for(Q in ae=H.defaultProps,ae)J[Q]===void 0&&(J[Q]=ae[Q]);return I(H,ne,J)},lt.createRef=function(){return{current:null}},lt.forwardRef=function(H){return{$$typeof:l,render:H}},lt.isValidElement=F,lt.lazy=function(H){return{$$typeof:h,_payload:{_status:-1,_result:H},_init:X}},lt.memo=function(H,U){return{$$typeof:f,type:H,compare:U===void 0?null:U}},lt.startTransition=function(H){var U=T.T,$={};T.T=$;try{var Q=H(),J=T.S;J!==null&&J($,Q),typeof Q=="object"&&Q!==null&&typeof Q.then=="function"&&Q.then(A,K)}catch(ne){K(ne)}finally{U!==null&&$.types!==null&&(U.types=$.types),T.T=U}},lt.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},lt.use=function(H){return T.H.use(H)},lt.useActionState=function(H,U,$){return T.H.useActionState(H,U,$)},lt.useCallback=function(H,U){return T.H.useCallback(H,U)},lt.useContext=function(H){return T.H.useContext(H)},lt.useDebugValue=function(){},lt.useDeferredValue=function(H,U){return T.H.useDeferredValue(H,U)},lt.useEffect=function(H,U){return T.H.useEffect(H,U)},lt.useEffectEvent=function(H){return T.H.useEffectEvent(H)},lt.useId=function(){return T.H.useId()},lt.useImperativeHandle=function(H,U,$){return T.H.useImperativeHandle(H,U,$)},lt.useInsertionEffect=function(H,U){return T.H.useInsertionEffect(H,U)},lt.useLayoutEffect=function(H,U){return T.H.useLayoutEffect(H,U)},lt.useMemo=function(H,U){return T.H.useMemo(H,U)},lt.useOptimistic=function(H,U){return T.H.useOptimistic(H,U)},lt.useReducer=function(H,U,$){return T.H.useReducer(H,U,$)},lt.useRef=function(H){return T.H.useRef(H)},lt.useState=function(H){return T.H.useState(H)},lt.useSyncExternalStore=function(H,U,$){return T.H.useSyncExternalStore(H,U,$)},lt.useTransition=function(){return T.H.useTransition()},lt.version="19.2.4",lt}var JM;function Pd(){return JM||(JM=1,uS.exports=wW()),uS.exports}var y=Pd();const Ce=Hi(y),ik=yW({__proto__:null,default:Ce},[y]);var cS={exports:{}},qh={},fS={exports:{}},dS={};/**
 * @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 eD;function SW(){return eD||(eD=1,(function(e){function t(D,q){var X=D.length;D.push(q);e:for(;0<X;){var K=X-1>>>1,R=D[K];if(0<i(R,q))D[K]=q,D[X]=R,X=K;else break e}}function n(D){return D.length===0?null:D[0]}function r(D){if(D.length===0)return null;var q=D[0],X=D.pop();if(X!==q){D[0]=X;e:for(var K=0,R=D.length,H=R>>>1;K<H;){var U=2*(K+1)-1,$=D[U],Q=U+1,J=D[Q];if(0>i($,X))Q<R&&0>i(J,$)?(D[K]=J,D[Q]=X,K=Q):(D[K]=$,D[U]=X,K=U);else if(Q<R&&0>i(J,X))D[K]=J,D[Q]=X,K=Q;else break e}}return q}function i(D,q){var X=D.sortIndex-q.sortIndex;return X!==0?X:D.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 o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var c=[],f=[],h=1,d=null,g=3,v=!1,b=!1,w=!1,S=!1,E=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;function N(D){for(var q=n(f);q!==null;){if(q.callback===null)r(f);else if(q.startTime<=D)r(f),q.sortIndex=q.expirationTime,t(c,q);else break;q=n(f)}}function O(D){if(w=!1,N(D),!b)if(n(c)!==null)b=!0,A||(A=!0,B());else{var q=n(f);q!==null&&V(O,q.startTime-D)}}var A=!1,T=-1,P=5,I=-1;function z(){return S?!0:!(e.unstable_now()-I<P)}function F(){if(S=!1,A){var D=e.unstable_now();I=D;var q=!0;try{e:{b=!1,w&&(w=!1,C(T),T=-1),v=!0;var X=g;try{t:{for(N(D),d=n(c);d!==null&&!(d.expirationTime>D&&z());){var K=d.callback;if(typeof K=="function"){d.callback=null,g=d.priorityLevel;var R=K(d.expirationTime<=D);if(D=e.unstable_now(),typeof R=="function"){d.callback=R,N(D),q=!0;break t}d===n(c)&&r(c),N(D)}else r(c);d=n(c)}if(d!==null)q=!0;else{var H=n(f);H!==null&&V(O,H.startTime-D),q=!1}}break e}finally{d=null,g=X,v=!1}q=void 0}}finally{q?B():A=!1}}}var B;if(typeof _=="function")B=function(){_(F)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,L=G.port2;G.port1.onmessage=F,B=function(){L.postMessage(null)}}else B=function(){E(F,0)};function V(D,q){T=E(function(){D(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(D){D.callback=null},e.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<D?Math.floor(1e3/D):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(D){switch(g){case 1:case 2:case 3:var q=3;break;default:q=g}var X=g;g=q;try{return D()}finally{g=X}},e.unstable_requestPaint=function(){S=!0},e.unstable_runWithPriority=function(D,q){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var X=g;g=D;try{return q()}finally{g=X}},e.unstable_scheduleCallback=function(D,q,X){var K=e.unstable_now();switch(typeof X=="object"&&X!==null?(X=X.delay,X=typeof X=="number"&&0<X?K+X:K):X=K,D){case 1:var R=-1;break;case 2:R=250;break;case 5:R=1073741823;break;case 4:R=1e4;break;default:R=5e3}return R=X+R,D={id:h++,callback:q,priorityLevel:D,startTime:X,expirationTime:R,sortIndex:-1},X>K?(D.sortIndex=X,t(f,D),n(c)===null&&D===n(f)&&(w?(C(T),T=-1):w=!0,V(O,X-K))):(D.sortIndex=R,t(c,D),b||v||(b=!0,A||(A=!0,B()))),D},e.unstable_shouldYield=z,e.unstable_wrapCallback=function(D){var q=g;return function(){var X=g;g=q;try{return D.apply(this,arguments)}finally{g=X}}}})(dS)),dS}var tD;function EW(){return tD||(tD=1,fS.exports=SW()),fS.exports}var hS={exports:{}},Mr={};/**
 * @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 nD;function jW(){if(nD)return Mr;nD=1;var e=Pd();function t(c){var f="https://react.dev/errors/"+c;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)f+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+c+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},i=Symbol.for("react.portal");function a(c,f,h){var d=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:d==null?null:""+d,children:c,containerInfo:f,implementation:h}}var o=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(c,f){if(c==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return Mr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Mr.createPortal=function(c,f){var h=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return a(c,f,null,h)},Mr.flushSync=function(c){var f=o.T,h=r.p;try{if(o.T=null,r.p=2,c)return c()}finally{o.T=f,r.p=h,r.d.f()}},Mr.preconnect=function(c,f){typeof c=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,r.d.C(c,f))},Mr.prefetchDNS=function(c){typeof c=="string"&&r.d.D(c)},Mr.preinit=function(c,f){if(typeof c=="string"&&f&&typeof f.as=="string"){var h=f.as,d=l(h,f.crossOrigin),g=typeof f.integrity=="string"?f.integrity:void 0,v=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;h==="style"?r.d.S(c,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:d,integrity:g,fetchPriority:v}):h==="script"&&r.d.X(c,{crossOrigin:d,integrity:g,fetchPriority:v,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},Mr.preinitModule=function(c,f){if(typeof c=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var h=l(f.as,f.crossOrigin);r.d.M(c,{crossOrigin:h,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&r.d.M(c)},Mr.preload=function(c,f){if(typeof c=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var h=f.as,d=l(h,f.crossOrigin);r.d.L(c,h,{crossOrigin:d,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},Mr.preloadModule=function(c,f){if(typeof c=="string")if(f){var h=l(f.as,f.crossOrigin);r.d.m(c,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:h,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(c)},Mr.requestFormReset=function(c){r.d.r(c)},Mr.unstable_batchedUpdates=function(c,f){return c(f)},Mr.useFormState=function(c,f,h){return o.H.useFormState(c,f,h)},Mr.useFormStatus=function(){return o.H.useHostTransitionStatus()},Mr.version="19.2.4",Mr}var rD;function w$(){if(rD)return hS.exports;rD=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(),hS.exports=jW(),hS.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 iD;function _W(){if(iD)return qh;iD=1;var e=EW(),t=Pd(),n=w$();function r(s){var u="https://react.dev/errors/"+s;if(1<arguments.length){u+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)u+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+s+"; visit "+u+" 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 u=s,p=s;if(s.alternate)for(;u.return;)u=u.return;else{s=u;do u=s,(u.flags&4098)!==0&&(p=u.return),s=u.return;while(s)}return u.tag===3?p:null}function o(s){if(s.tag===13){var u=s.memoizedState;if(u===null&&(s=s.alternate,s!==null&&(u=s.memoizedState)),u!==null)return u.dehydrated}return null}function l(s){if(s.tag===31){var u=s.memoizedState;if(u===null&&(s=s.alternate,s!==null&&(u=s.memoizedState)),u!==null)return u.dehydrated}return null}function c(s){if(a(s)!==s)throw Error(r(188))}function f(s){var u=s.alternate;if(!u){if(u=a(s),u===null)throw Error(r(188));return u!==s?null:s}for(var p=s,x=u;;){var j=p.return;if(j===null)break;var k=j.alternate;if(k===null){if(x=j.return,x!==null){p=x;continue}break}if(j.child===k.child){for(k=j.child;k;){if(k===p)return c(j),s;if(k===x)return c(j),u;k=k.sibling}throw Error(r(188))}if(p.return!==x.return)p=j,x=k;else{for(var M=!1,Y=j.child;Y;){if(Y===p){M=!0,p=j,x=k;break}if(Y===x){M=!0,x=j,p=k;break}Y=Y.sibling}if(!M){for(Y=k.child;Y;){if(Y===p){M=!0,p=k,x=j;break}if(Y===x){M=!0,x=k,p=j;break}Y=Y.sibling}if(!M)throw Error(r(189))}}if(p.alternate!==x)throw Error(r(190))}if(p.tag!==3)throw Error(r(188));return p.stateNode.current===p?s:u}function h(s){var u=s.tag;if(u===5||u===26||u===27||u===6)return s;for(s=s.child;s!==null;){if(u=h(s),u!==null)return u;s=s.sibling}return null}var d=Object.assign,g=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),_=Symbol.for("react.context"),N=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),I=Symbol.for("react.activity"),z=Symbol.for("react.memo_cache_sentinel"),F=Symbol.iterator;function B(s){return s===null||typeof s!="object"?null:(s=F&&s[F]||s["@@iterator"],typeof s=="function"?s:null)}var G=Symbol.for("react.client.reference");function L(s){if(s==null)return null;if(typeof s=="function")return s.$$typeof===G?null:s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case w:return"Fragment";case E:return"Profiler";case S:return"StrictMode";case O:return"Suspense";case A:return"SuspenseList";case I:return"Activity"}if(typeof s=="object")switch(s.$$typeof){case b:return"Portal";case _:return s.displayName||"Context";case C:return(s._context.displayName||"Context")+".Consumer";case N:var u=s.render;return s=s.displayName,s||(s=u.displayName||u.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case T:return u=s.displayName||null,u!==null?u:L(s.type)||"Memo";case P:u=s._payload,s=s._init;try{return L(s(u))}catch{}}return null}var V=Array.isArray,D=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X={pending:!1,data:null,method:null,action:null},K=[],R=-1;function H(s){return{current:s}}function U(s){0>R||(s.current=K[R],K[R]=null,R--)}function $(s,u){R++,K[R]=s.current,s.current=u}var Q=H(null),J=H(null),ne=H(null),ae=H(null);function ie(s,u){switch($(ne,u),$(J,s),$(Q,null),u.nodeType){case 9:case 11:s=(s=u.documentElement)&&(s=s.namespaceURI)?yM(s):0;break;default:if(s=u.tagName,u=u.namespaceURI)u=yM(u),s=xM(u,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}U(Q),$(Q,s)}function ee(){U(Q),U(J),U(ne)}function se(s){s.memoizedState!==null&&$(ae,s);var u=Q.current,p=xM(u,s.type);u!==p&&($(J,s),$(Q,p))}function pe(s){J.current===s&&(U(Q),U(J)),ae.current===s&&(U(ae),$h._currentValue=X)}var re,we;function Ee(s){if(re===void 0)try{throw Error()}catch(p){var u=p.stack.trim().match(/\n( *(at )?)/);re=u&&u[1]||"",we=-1<p.stack.indexOf(`
    at`)?" (<anonymous>)":-1<p.stack.indexOf("@")?"@unknown:0:0":""}return`
`+re+s+we}var $e=!1;function Ne(s,u){if(!s||$e)return"";$e=!0;var p=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var x={DetermineComponentFrameRoot:function(){try{if(u){var be=function(){throw Error()};if(Object.defineProperty(be.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(be,[])}catch(he){var fe=he}Reflect.construct(s,[],be)}else{try{be.call()}catch(he){fe=he}s.call(be.prototype)}}else{try{throw Error()}catch(he){fe=he}(be=s())&&typeof be.catch=="function"&&be.catch(function(){})}}catch(he){if(he&&fe&&typeof he.stack=="string")return[he.stack,fe.stack]}return[null,null]}};x.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var j=Object.getOwnPropertyDescriptor(x.DetermineComponentFrameRoot,"name");j&&j.configurable&&Object.defineProperty(x.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var k=x.DetermineComponentFrameRoot(),M=k[0],Y=k[1];if(M&&Y){var Z=M.split(`
`),ce=Y.split(`
`);for(j=x=0;x<Z.length&&!Z[x].includes("DetermineComponentFrameRoot");)x++;for(;j<ce.length&&!ce[j].includes("DetermineComponentFrameRoot");)j++;if(x===Z.length||j===ce.length)for(x=Z.length-1,j=ce.length-1;1<=x&&0<=j&&Z[x]!==ce[j];)j--;for(;1<=x&&0<=j;x--,j--)if(Z[x]!==ce[j]){if(x!==1||j!==1)do if(x--,j--,0>j||Z[x]!==ce[j]){var ve=`
`+Z[x].replace(" at new "," at ");return s.displayName&&ve.includes("<anonymous>")&&(ve=ve.replace("<anonymous>",s.displayName)),ve}while(1<=x&&0<=j);break}}}finally{$e=!1,Error.prepareStackTrace=p}return(p=s?s.displayName||s.name:"")?Ee(p):""}function et(s,u){switch(s.tag){case 26:case 27:case 5:return Ee(s.type);case 16:return Ee("Lazy");case 13:return s.child!==u&&u!==null?Ee("Suspense Fallback"):Ee("Suspense");case 19:return Ee("SuspenseList");case 0:case 15:return Ne(s.type,!1);case 11:return Ne(s.type.render,!1);case 1:return Ne(s.type,!0);case 31:return Ee("Activity");default:return""}}function Xe(s){try{var u="",p=null;do u+=et(s,p),p=s,s=s.return;while(s);return u}catch(x){return`
Error generating stack: `+x.message+`
`+x.stack}}var Ke=Object.prototype.hasOwnProperty,Rt=e.unstable_scheduleCallback,ct=e.unstable_cancelCallback,wt=e.unstable_shouldYield,Xt=e.unstable_requestPaint,Mt=e.unstable_now,cn=e.unstable_getCurrentPriorityLevel,de=e.unstable_ImmediatePriority,xe=e.unstable_UserBlockingPriority,Te=e.unstable_NormalPriority,Ge=e.unstable_LowPriority,We=e.unstable_IdlePriority,Gt=e.log,nn=e.unstable_setDisableYieldValue,Se=null,at=null;function vt(s){if(typeof Gt=="function"&&nn(s),at&&typeof at.setStrictMode=="function")try{at.setStrictMode(Se,s)}catch{}}var st=Math.clz32?Math.clz32:dr,zn=Math.log,rn=Math.LN2;function dr(s){return s>>>=0,s===0?32:31-(zn(s)/rn|0)|0}var Yr=256,Pr=262144,ii=4194304;function Sr(s){var u=s&42;if(u!==0)return u;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 Ye(s,u,p){var x=s.pendingLanes;if(x===0)return 0;var j=0,k=s.suspendedLanes,M=s.pingedLanes;s=s.warmLanes;var Y=x&134217727;return Y!==0?(x=Y&~k,x!==0?j=Sr(x):(M&=Y,M!==0?j=Sr(M):p||(p=Y&~s,p!==0&&(j=Sr(p))))):(Y=x&~k,Y!==0?j=Sr(Y):M!==0?j=Sr(M):p||(p=x&~s,p!==0&&(j=Sr(p)))),j===0?0:u!==0&&u!==j&&(u&k)===0&&(k=j&-j,p=u&-u,k>=p||k===32&&(p&4194048)!==0)?u:j}function qt(s,u){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&u)===0}function me(s,u){switch(s){case 1:case 2:case 4:case 8:case 64:return u+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 u+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 Ze(){var s=ii;return ii<<=1,(ii&62914560)===0&&(ii=4194304),s}function an(s){for(var u=[],p=0;31>p;p++)u.push(s);return u}function St(s,u){s.pendingLanes|=u,u!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function Nn(s,u,p,x,j,k){var M=s.pendingLanes;s.pendingLanes=p,s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0,s.expiredLanes&=p,s.entangledLanes&=p,s.errorRecoveryDisabledLanes&=p,s.shellSuspendCounter=0;var Y=s.entanglements,Z=s.expirationTimes,ce=s.hiddenUpdates;for(p=M&~p;0<p;){var ve=31-st(p),be=1<<ve;Y[ve]=0,Z[ve]=-1;var fe=ce[ve];if(fe!==null)for(ce[ve]=null,ve=0;ve<fe.length;ve++){var he=fe[ve];he!==null&&(he.lane&=-536870913)}p&=~be}x!==0&&Xr(s,x,0),k!==0&&j===0&&s.tag!==0&&(s.suspendedLanes|=k&~(M&~u))}function Xr(s,u,p){s.pendingLanes|=u,s.suspendedLanes&=~u;var x=31-st(u);s.entangledLanes|=u,s.entanglements[x]=s.entanglements[x]|1073741824|p&261930}function hr(s,u){var p=s.entangledLanes|=u;for(s=s.entanglements;p;){var x=31-st(p),j=1<<x;j&u|s[x]&u&&(s[x]|=u),p&=~j}}function Jn(s,u){var p=u&-u;return p=(p&42)!==0?1:Va(p),(p&(s.suspendedLanes|u))!==0?0:p}function Va(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 Gr(s){return s&=-s,2<s?8<s?(s&134217727)!==0?32:268435456:8:2}function Rs(){var s=q.p;return s!==0?s:(s=window.event,s===void 0?32:UM(s.type))}function ge(s,u){var p=q.p;try{return q.p=s,u()}finally{q.p=p}}var ft=Math.random().toString(36).slice(2),Dt="__reactFiber$"+ft,on="__reactProps$"+ft,ga="__reactContainer$"+ft,Ka="__reactEvents$"+ft,hg="__reactListeners$"+ft,Qb="__reactHandles$"+ft,mg="__reactResources$"+ft,au="__reactMarker$"+ft;function Jd(s){delete s[Dt],delete s[on],delete s[Ka],delete s[hg],delete s[Qb]}function Is(s){var u=s[Dt];if(u)return u;for(var p=s.parentNode;p;){if(u=p[ga]||p[Dt]){if(p=u.alternate,u.child!==null||p!==null&&p.child!==null)for(s=CM(s);s!==null;){if(p=s[Dt])return p;s=CM(s)}return u}s=p,p=s.parentNode}return null}function Ls(s){if(s=s[Dt]||s[ga]){var u=s.tag;if(u===5||u===6||u===13||u===31||u===26||u===27||u===3)return s}return null}function zs(s){var u=s.tag;if(u===5||u===26||u===27||u===6)return s.stateNode;throw Error(r(33))}function $s(s){var u=s[mg];return u||(u=s[mg]={hoistableStyles:new Map,hoistableScripts:new Map}),u}function Fn(s){s[au]=!0}var pg=new Set,gg={};function Co(s,u){Bs(s,u),Bs(s+"Capture",u)}function Bs(s,u){for(gg[s]=u,s=0;s<u.length;s++)pg.add(u[s])}var Zb=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]*$"),eh={},vg={};function Jb(s){return Ke.call(vg,s)?!0:Ke.call(eh,s)?!1:Zb.test(s)?vg[s]=!0:(eh[s]=!0,!1)}function zc(s,u,p){if(Jb(u))if(p===null)s.removeAttribute(u);else{switch(typeof p){case"undefined":case"function":case"symbol":s.removeAttribute(u);return;case"boolean":var x=u.toLowerCase().slice(0,5);if(x!=="data-"&&x!=="aria-"){s.removeAttribute(u);return}}s.setAttribute(u,""+p)}}function $c(s,u,p){if(p===null)s.removeAttribute(u);else{switch(typeof p){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(u);return}s.setAttribute(u,""+p)}}function va(s,u,p,x){if(x===null)s.removeAttribute(p);else{switch(typeof x){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(p);return}s.setAttributeNS(u,p,""+x)}}function ai(s){switch(typeof s){case"bigint":case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function yg(s){var u=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(u==="checkbox"||u==="radio")}function ew(s,u,p){var x=Object.getOwnPropertyDescriptor(s.constructor.prototype,u);if(!s.hasOwnProperty(u)&&typeof x<"u"&&typeof x.get=="function"&&typeof x.set=="function"){var j=x.get,k=x.set;return Object.defineProperty(s,u,{configurable:!0,get:function(){return j.call(this)},set:function(M){p=""+M,k.call(this,M)}}),Object.defineProperty(s,u,{enumerable:x.enumerable}),{getValue:function(){return p},setValue:function(M){p=""+M},stopTracking:function(){s._valueTracker=null,delete s[u]}}}}function Fs(s){if(!s._valueTracker){var u=yg(s)?"checked":"value";s._valueTracker=ew(s,u,""+s[u])}}function xg(s){if(!s)return!1;var u=s._valueTracker;if(!u)return!0;var p=u.getValue(),x="";return s&&(x=yg(s)?s.checked?"true":"false":s.value),s=x,s!==p?(u.setValue(s),!0):!1}function ou(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 tw=/[\n"\\]/g;function oi(s){return s.replace(tw,function(u){return"\\"+u.charCodeAt(0).toString(16)+" "})}function su(s,u,p,x,j,k,M,Y){s.name="",M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"?s.type=M:s.removeAttribute("type"),u!=null?M==="number"?(u===0&&s.value===""||s.value!=u)&&(s.value=""+ai(u)):s.value!==""+ai(u)&&(s.value=""+ai(u)):M!=="submit"&&M!=="reset"||s.removeAttribute("value"),u!=null?th(s,M,ai(u)):p!=null?th(s,M,ai(p)):x!=null&&s.removeAttribute("value"),j==null&&k!=null&&(s.defaultChecked=!!k),j!=null&&(s.checked=j&&typeof j!="function"&&typeof j!="symbol"),Y!=null&&typeof Y!="function"&&typeof Y!="symbol"&&typeof Y!="boolean"?s.name=""+ai(Y):s.removeAttribute("name")}function bg(s,u,p,x,j,k,M,Y){if(k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"&&(s.type=k),u!=null||p!=null){if(!(k!=="submit"&&k!=="reset"||u!=null)){Fs(s);return}p=p!=null?""+ai(p):"",u=u!=null?""+ai(u):p,Y||u===s.value||(s.value=u),s.defaultValue=u}x=x??j,x=typeof x!="function"&&typeof x!="symbol"&&!!x,s.checked=Y?s.checked:!!x,s.defaultChecked=!!x,M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"&&(s.name=M),Fs(s)}function th(s,u,p){u==="number"&&ou(s.ownerDocument)===s||s.defaultValue===""+p||(s.defaultValue=""+p)}function ko(s,u,p,x){if(s=s.options,u){u={};for(var j=0;j<p.length;j++)u["$"+p[j]]=!0;for(p=0;p<s.length;p++)j=u.hasOwnProperty("$"+s[p].value),s[p].selected!==j&&(s[p].selected=j),j&&x&&(s[p].defaultSelected=!0)}else{for(p=""+ai(p),u=null,j=0;j<s.length;j++){if(s[j].value===p){s[j].selected=!0,x&&(s[j].defaultSelected=!0);return}u!==null||s[j].disabled||(u=s[j])}u!==null&&(u.selected=!0)}}function hT(s,u,p){if(u!=null&&(u=""+ai(u),u!==s.value&&(s.value=u),p==null)){s.defaultValue!==u&&(s.defaultValue=u);return}s.defaultValue=p!=null?""+ai(p):""}function mT(s,u,p,x){if(u==null){if(x!=null){if(p!=null)throw Error(r(92));if(V(x)){if(1<x.length)throw Error(r(93));x=x[0]}p=x}p==null&&(p=""),u=p}p=ai(u),s.defaultValue=p,x=s.textContent,x===p&&x!==""&&x!==null&&(s.value=x),Fs(s)}function Bc(s,u){if(u){var p=s.firstChild;if(p&&p===s.lastChild&&p.nodeType===3){p.nodeValue=u;return}}s.textContent=u}var fX=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 pT(s,u,p){var x=u.indexOf("--")===0;p==null||typeof p=="boolean"||p===""?x?s.setProperty(u,""):u==="float"?s.cssFloat="":s[u]="":x?s.setProperty(u,p):typeof p!="number"||p===0||fX.has(u)?u==="float"?s.cssFloat=p:s[u]=(""+p).trim():s[u]=p+"px"}function gT(s,u,p){if(u!=null&&typeof u!="object")throw Error(r(62));if(s=s.style,p!=null){for(var x in p)!p.hasOwnProperty(x)||u!=null&&u.hasOwnProperty(x)||(x.indexOf("--")===0?s.setProperty(x,""):x==="float"?s.cssFloat="":s[x]="");for(var j in u)x=u[j],u.hasOwnProperty(j)&&p[j]!==x&&pT(s,j,x)}else for(var k in u)u.hasOwnProperty(k)&&pT(s,k,u[k])}function nw(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 dX=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"]]),hX=/^[\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 wg(s){return hX.test(""+s)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":s}function No(){}var rw=null;function iw(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var Fc=null,Uc=null;function vT(s){var u=Ls(s);if(u&&(s=u.stateNode)){var p=s[on]||null;e:switch(s=u.stateNode,u.type){case"input":if(su(s,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name),u=p.name,p.type==="radio"&&u!=null){for(p=s;p.parentNode;)p=p.parentNode;for(p=p.querySelectorAll('input[name="'+oi(""+u)+'"][type="radio"]'),u=0;u<p.length;u++){var x=p[u];if(x!==s&&x.form===s.form){var j=x[on]||null;if(!j)throw Error(r(90));su(x,j.value,j.defaultValue,j.defaultValue,j.checked,j.defaultChecked,j.type,j.name)}}for(u=0;u<p.length;u++)x=p[u],x.form===s.form&&xg(x)}break e;case"textarea":hT(s,p.value,p.defaultValue);break e;case"select":u=p.value,u!=null&&ko(s,!!p.multiple,u,!1)}}}var aw=!1;function yT(s,u,p){if(aw)return s(u,p);aw=!0;try{var x=s(u);return x}finally{if(aw=!1,(Fc!==null||Uc!==null)&&(lv(),Fc&&(u=Fc,s=Uc,Uc=Fc=null,vT(u),s)))for(u=0;u<s.length;u++)vT(s[u])}}function nh(s,u){var p=s.stateNode;if(p===null)return null;var x=p[on]||null;if(x===null)return null;p=x[u];e:switch(u){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(x=!x.disabled)||(s=s.type,x=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!x;break e;default:s=!1}if(s)return null;if(p&&typeof p!="function")throw Error(r(231,u,typeof p));return p}var Ao=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ow=!1;if(Ao)try{var rh={};Object.defineProperty(rh,"passive",{get:function(){ow=!0}}),window.addEventListener("test",rh,rh),window.removeEventListener("test",rh,rh)}catch{ow=!1}var Us=null,sw=null,Sg=null;function xT(){if(Sg)return Sg;var s,u=sw,p=u.length,x,j="value"in Us?Us.value:Us.textContent,k=j.length;for(s=0;s<p&&u[s]===j[s];s++);var M=p-s;for(x=1;x<=M&&u[p-x]===j[k-x];x++);return Sg=j.slice(s,1<x?1-x:void 0)}function Eg(s){var u=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&u===13&&(s=13)):s=u,s===10&&(s=13),32<=s||s===13?s:0}function jg(){return!0}function bT(){return!1}function si(s){function u(p,x,j,k,M){this._reactName=p,this._targetInst=j,this.type=x,this.nativeEvent=k,this.target=M,this.currentTarget=null;for(var Y in s)s.hasOwnProperty(Y)&&(p=s[Y],this[Y]=p?p(k):k[Y]);return this.isDefaultPrevented=(k.defaultPrevented!=null?k.defaultPrevented:k.returnValue===!1)?jg:bT,this.isPropagationStopped=bT,this}return d(u.prototype,{preventDefault:function(){this.defaultPrevented=!0;var p=this.nativeEvent;p&&(p.preventDefault?p.preventDefault():typeof p.returnValue!="unknown"&&(p.returnValue=!1),this.isDefaultPrevented=jg)},stopPropagation:function(){var p=this.nativeEvent;p&&(p.stopPropagation?p.stopPropagation():typeof p.cancelBubble!="unknown"&&(p.cancelBubble=!0),this.isPropagationStopped=jg)},persist:function(){},isPersistent:jg}),u}var lu={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},_g=si(lu),ih=d({},lu,{view:0,detail:0}),mX=si(ih),lw,uw,ah,Cg=d({},ih,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:fw,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!==ah&&(ah&&s.type==="mousemove"?(lw=s.screenX-ah.screenX,uw=s.screenY-ah.screenY):uw=lw=0,ah=s),lw)},movementY:function(s){return"movementY"in s?s.movementY:uw}}),wT=si(Cg),pX=d({},Cg,{dataTransfer:0}),gX=si(pX),vX=d({},ih,{relatedTarget:0}),cw=si(vX),yX=d({},lu,{animationName:0,elapsedTime:0,pseudoElement:0}),xX=si(yX),bX=d({},lu,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),wX=si(bX),SX=d({},lu,{data:0}),ST=si(SX),EX={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},jX={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"},_X={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function CX(s){var u=this.nativeEvent;return u.getModifierState?u.getModifierState(s):(s=_X[s])?!!u[s]:!1}function fw(){return CX}var kX=d({},ih,{key:function(s){if(s.key){var u=EX[s.key]||s.key;if(u!=="Unidentified")return u}return s.type==="keypress"?(s=Eg(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?jX[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:fw,charCode:function(s){return s.type==="keypress"?Eg(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?Eg(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),NX=si(kX),AX=d({},Cg,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ET=si(AX),OX=d({},ih,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:fw}),TX=si(OX),PX=d({},lu,{propertyName:0,elapsedTime:0,pseudoElement:0}),MX=si(PX),DX=d({},Cg,{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}),RX=si(DX),IX=d({},lu,{newState:0,oldState:0}),LX=si(IX),zX=[9,13,27,32],dw=Ao&&"CompositionEvent"in window,oh=null;Ao&&"documentMode"in document&&(oh=document.documentMode);var $X=Ao&&"TextEvent"in window&&!oh,jT=Ao&&(!dw||oh&&8<oh&&11>=oh),_T=" ",CT=!1;function kT(s,u){switch(s){case"keyup":return zX.indexOf(u.keyCode)!==-1;case"keydown":return u.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function NT(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var Hc=!1;function BX(s,u){switch(s){case"compositionend":return NT(u);case"keypress":return u.which!==32?null:(CT=!0,_T);case"textInput":return s=u.data,s===_T&&CT?null:s;default:return null}}function FX(s,u){if(Hc)return s==="compositionend"||!dw&&kT(s,u)?(s=xT(),Sg=sw=Us=null,Hc=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(u.ctrlKey||u.altKey||u.metaKey)||u.ctrlKey&&u.altKey){if(u.char&&1<u.char.length)return u.char;if(u.which)return String.fromCharCode(u.which)}return null;case"compositionend":return jT&&u.locale!=="ko"?null:u.data;default:return null}}var UX={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 AT(s){var u=s&&s.nodeName&&s.nodeName.toLowerCase();return u==="input"?!!UX[s.type]:u==="textarea"}function OT(s,u,p,x){Fc?Uc?Uc.push(x):Uc=[x]:Fc=x,u=pv(u,"onChange"),0<u.length&&(p=new _g("onChange","change",null,p,x),s.push({event:p,listeners:u}))}var sh=null,lh=null;function HX(s){dM(s,0)}function kg(s){var u=zs(s);if(xg(u))return s}function TT(s,u){if(s==="change")return u}var PT=!1;if(Ao){var hw;if(Ao){var mw="oninput"in document;if(!mw){var MT=document.createElement("div");MT.setAttribute("oninput","return;"),mw=typeof MT.oninput=="function"}hw=mw}else hw=!1;PT=hw&&(!document.documentMode||9<document.documentMode)}function DT(){sh&&(sh.detachEvent("onpropertychange",RT),lh=sh=null)}function RT(s){if(s.propertyName==="value"&&kg(lh)){var u=[];OT(u,lh,s,iw(s)),yT(HX,u)}}function qX(s,u,p){s==="focusin"?(DT(),sh=u,lh=p,sh.attachEvent("onpropertychange",RT)):s==="focusout"&&DT()}function VX(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return kg(lh)}function KX(s,u){if(s==="click")return kg(u)}function YX(s,u){if(s==="input"||s==="change")return kg(u)}function XX(s,u){return s===u&&(s!==0||1/s===1/u)||s!==s&&u!==u}var Si=typeof Object.is=="function"?Object.is:XX;function uh(s,u){if(Si(s,u))return!0;if(typeof s!="object"||s===null||typeof u!="object"||u===null)return!1;var p=Object.keys(s),x=Object.keys(u);if(p.length!==x.length)return!1;for(x=0;x<p.length;x++){var j=p[x];if(!Ke.call(u,j)||!Si(s[j],u[j]))return!1}return!0}function IT(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function LT(s,u){var p=IT(s);s=0;for(var x;p;){if(p.nodeType===3){if(x=s+p.textContent.length,s<=u&&x>=u)return{node:p,offset:u-s};s=x}e:{for(;p;){if(p.nextSibling){p=p.nextSibling;break e}p=p.parentNode}p=void 0}p=IT(p)}}function zT(s,u){return s&&u?s===u?!0:s&&s.nodeType===3?!1:u&&u.nodeType===3?zT(s,u.parentNode):"contains"in s?s.contains(u):s.compareDocumentPosition?!!(s.compareDocumentPosition(u)&16):!1:!1}function $T(s){s=s!=null&&s.ownerDocument!=null&&s.ownerDocument.defaultView!=null?s.ownerDocument.defaultView:window;for(var u=ou(s.document);u instanceof s.HTMLIFrameElement;){try{var p=typeof u.contentWindow.location.href=="string"}catch{p=!1}if(p)s=u.contentWindow;else break;u=ou(s.document)}return u}function pw(s){var u=s&&s.nodeName&&s.nodeName.toLowerCase();return u&&(u==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||u==="textarea"||s.contentEditable==="true")}var GX=Ao&&"documentMode"in document&&11>=document.documentMode,qc=null,gw=null,ch=null,vw=!1;function BT(s,u,p){var x=p.window===p?p.document:p.nodeType===9?p:p.ownerDocument;vw||qc==null||qc!==ou(x)||(x=qc,"selectionStart"in x&&pw(x)?x={start:x.selectionStart,end:x.selectionEnd}:(x=(x.ownerDocument&&x.ownerDocument.defaultView||window).getSelection(),x={anchorNode:x.anchorNode,anchorOffset:x.anchorOffset,focusNode:x.focusNode,focusOffset:x.focusOffset}),ch&&uh(ch,x)||(ch=x,x=pv(gw,"onSelect"),0<x.length&&(u=new _g("onSelect","select",null,u,p),s.push({event:u,listeners:x}),u.target=qc)))}function uu(s,u){var p={};return p[s.toLowerCase()]=u.toLowerCase(),p["Webkit"+s]="webkit"+u,p["Moz"+s]="moz"+u,p}var Vc={animationend:uu("Animation","AnimationEnd"),animationiteration:uu("Animation","AnimationIteration"),animationstart:uu("Animation","AnimationStart"),transitionrun:uu("Transition","TransitionRun"),transitionstart:uu("Transition","TransitionStart"),transitioncancel:uu("Transition","TransitionCancel"),transitionend:uu("Transition","TransitionEnd")},yw={},FT={};Ao&&(FT=document.createElement("div").style,"AnimationEvent"in window||(delete Vc.animationend.animation,delete Vc.animationiteration.animation,delete Vc.animationstart.animation),"TransitionEvent"in window||delete Vc.transitionend.transition);function cu(s){if(yw[s])return yw[s];if(!Vc[s])return s;var u=Vc[s],p;for(p in u)if(u.hasOwnProperty(p)&&p in FT)return yw[s]=u[p];return s}var UT=cu("animationend"),HT=cu("animationiteration"),qT=cu("animationstart"),WX=cu("transitionrun"),QX=cu("transitionstart"),ZX=cu("transitioncancel"),VT=cu("transitionend"),KT=new Map,xw="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(" ");xw.push("scrollEnd");function ya(s,u){KT.set(s,u),Co(u,[s])}var Ng=typeof reportError=="function"?reportError:function(s){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var u=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(u))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",s);return}console.error(s)},Vi=[],Kc=0,bw=0;function Ag(){for(var s=Kc,u=bw=Kc=0;u<s;){var p=Vi[u];Vi[u++]=null;var x=Vi[u];Vi[u++]=null;var j=Vi[u];Vi[u++]=null;var k=Vi[u];if(Vi[u++]=null,x!==null&&j!==null){var M=x.pending;M===null?j.next=j:(j.next=M.next,M.next=j),x.pending=j}k!==0&&YT(p,j,k)}}function Og(s,u,p,x){Vi[Kc++]=s,Vi[Kc++]=u,Vi[Kc++]=p,Vi[Kc++]=x,bw|=x,s.lanes|=x,s=s.alternate,s!==null&&(s.lanes|=x)}function ww(s,u,p,x){return Og(s,u,p,x),Tg(s)}function fu(s,u){return Og(s,null,null,u),Tg(s)}function YT(s,u,p){s.lanes|=p;var x=s.alternate;x!==null&&(x.lanes|=p);for(var j=!1,k=s.return;k!==null;)k.childLanes|=p,x=k.alternate,x!==null&&(x.childLanes|=p),k.tag===22&&(s=k.stateNode,s===null||s._visibility&1||(j=!0)),s=k,k=k.return;return s.tag===3?(k=s.stateNode,j&&u!==null&&(j=31-st(p),s=k.hiddenUpdates,x=s[j],x===null?s[j]=[u]:x.push(u),u.lane=p|536870912),k):null}function Tg(s){if(50<Ph)throw Ph=0,O1=null,Error(r(185));for(var u=s.return;u!==null;)s=u,u=s.return;return s.tag===3?s.stateNode:null}var Yc={};function JX(s,u,p,x){this.tag=s,this.key=p,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=u,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=x,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ei(s,u,p,x){return new JX(s,u,p,x)}function Sw(s){return s=s.prototype,!(!s||!s.isReactComponent)}function Oo(s,u){var p=s.alternate;return p===null?(p=Ei(s.tag,u,s.key,s.mode),p.elementType=s.elementType,p.type=s.type,p.stateNode=s.stateNode,p.alternate=s,s.alternate=p):(p.pendingProps=u,p.type=s.type,p.flags=0,p.subtreeFlags=0,p.deletions=null),p.flags=s.flags&65011712,p.childLanes=s.childLanes,p.lanes=s.lanes,p.child=s.child,p.memoizedProps=s.memoizedProps,p.memoizedState=s.memoizedState,p.updateQueue=s.updateQueue,u=s.dependencies,p.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext},p.sibling=s.sibling,p.index=s.index,p.ref=s.ref,p.refCleanup=s.refCleanup,p}function XT(s,u){s.flags&=65011714;var p=s.alternate;return p===null?(s.childLanes=0,s.lanes=u,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=p.childLanes,s.lanes=p.lanes,s.child=p.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=p.memoizedProps,s.memoizedState=p.memoizedState,s.updateQueue=p.updateQueue,s.type=p.type,u=p.dependencies,s.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext}),s}function Pg(s,u,p,x,j,k){var M=0;if(x=s,typeof s=="function")Sw(s)&&(M=1);else if(typeof s=="string")M=iW(s,p,Q.current)?26:s==="html"||s==="head"||s==="body"?27:5;else e:switch(s){case I:return s=Ei(31,p,u,j),s.elementType=I,s.lanes=k,s;case w:return du(p.children,j,k,u);case S:M=8,j|=24;break;case E:return s=Ei(12,p,u,j|2),s.elementType=E,s.lanes=k,s;case O:return s=Ei(13,p,u,j),s.elementType=O,s.lanes=k,s;case A:return s=Ei(19,p,u,j),s.elementType=A,s.lanes=k,s;default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case _:M=10;break e;case C:M=9;break e;case N:M=11;break e;case T:M=14;break e;case P:M=16,x=null;break e}M=29,p=Error(r(130,s===null?"null":typeof s,"")),x=null}return u=Ei(M,p,u,j),u.elementType=s,u.type=x,u.lanes=k,u}function du(s,u,p,x){return s=Ei(7,s,x,u),s.lanes=p,s}function Ew(s,u,p){return s=Ei(6,s,null,u),s.lanes=p,s}function GT(s){var u=Ei(18,null,null,0);return u.stateNode=s,u}function jw(s,u,p){return u=Ei(4,s.children!==null?s.children:[],s.key,u),u.lanes=p,u.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},u}var WT=new WeakMap;function Ki(s,u){if(typeof s=="object"&&s!==null){var p=WT.get(s);return p!==void 0?p:(u={value:s,source:u,stack:Xe(u)},WT.set(s,u),u)}return{value:s,source:u,stack:Xe(u)}}var Xc=[],Gc=0,Mg=null,fh=0,Yi=[],Xi=0,Hs=null,Ya=1,Xa="";function To(s,u){Xc[Gc++]=fh,Xc[Gc++]=Mg,Mg=s,fh=u}function QT(s,u,p){Yi[Xi++]=Ya,Yi[Xi++]=Xa,Yi[Xi++]=Hs,Hs=s;var x=Ya;s=Xa;var j=32-st(x)-1;x&=~(1<<j),p+=1;var k=32-st(u)+j;if(30<k){var M=j-j%5;k=(x&(1<<M)-1).toString(32),x>>=M,j-=M,Ya=1<<32-st(u)+j|p<<j|x,Xa=k+s}else Ya=1<<k|p<<j|x,Xa=s}function _w(s){s.return!==null&&(To(s,1),QT(s,1,0))}function Cw(s){for(;s===Mg;)Mg=Xc[--Gc],Xc[Gc]=null,fh=Xc[--Gc],Xc[Gc]=null;for(;s===Hs;)Hs=Yi[--Xi],Yi[Xi]=null,Xa=Yi[--Xi],Yi[Xi]=null,Ya=Yi[--Xi],Yi[Xi]=null}function ZT(s,u){Yi[Xi++]=Ya,Yi[Xi++]=Xa,Yi[Xi++]=Hs,Ya=u.id,Xa=u.overflow,Hs=s}var Er=null,pn=null,Ct=!1,qs=null,Gi=!1,kw=Error(r(519));function Vs(s){var u=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw dh(Ki(u,s)),kw}function JT(s){var u=s.stateNode,p=s.type,x=s.memoizedProps;switch(u[Dt]=s,u[on]=x,p){case"dialog":xt("cancel",u),xt("close",u);break;case"iframe":case"object":case"embed":xt("load",u);break;case"video":case"audio":for(p=0;p<Dh.length;p++)xt(Dh[p],u);break;case"source":xt("error",u);break;case"img":case"image":case"link":xt("error",u),xt("load",u);break;case"details":xt("toggle",u);break;case"input":xt("invalid",u),bg(u,x.value,x.defaultValue,x.checked,x.defaultChecked,x.type,x.name,!0);break;case"select":xt("invalid",u);break;case"textarea":xt("invalid",u),mT(u,x.value,x.defaultValue,x.children)}p=x.children,typeof p!="string"&&typeof p!="number"&&typeof p!="bigint"||u.textContent===""+p||x.suppressHydrationWarning===!0||gM(u.textContent,p)?(x.popover!=null&&(xt("beforetoggle",u),xt("toggle",u)),x.onScroll!=null&&xt("scroll",u),x.onScrollEnd!=null&&xt("scrollend",u),x.onClick!=null&&(u.onclick=No),u=!0):u=!1,u||Vs(s,!0)}function e2(s){for(Er=s.return;Er;)switch(Er.tag){case 5:case 31:case 13:Gi=!1;return;case 27:case 3:Gi=!0;return;default:Er=Er.return}}function Wc(s){if(s!==Er)return!1;if(!Ct)return e2(s),Ct=!0,!1;var u=s.tag,p;if((p=u!==3&&u!==27)&&((p=u===5)&&(p=s.type,p=!(p!=="form"&&p!=="button")||V1(s.type,s.memoizedProps)),p=!p),p&&pn&&Vs(s),e2(s),u===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));pn=_M(s)}else if(u===31){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));pn=_M(s)}else u===27?(u=pn,al(s.type)?(s=W1,W1=null,pn=s):pn=u):pn=Er?Qi(s.stateNode.nextSibling):null;return!0}function hu(){pn=Er=null,Ct=!1}function Nw(){var s=qs;return s!==null&&(fi===null?fi=s:fi.push.apply(fi,s),qs=null),s}function dh(s){qs===null?qs=[s]:qs.push(s)}var Aw=H(null),mu=null,Po=null;function Ks(s,u,p){$(Aw,u._currentValue),u._currentValue=p}function Mo(s){s._currentValue=Aw.current,U(Aw)}function Ow(s,u,p){for(;s!==null;){var x=s.alternate;if((s.childLanes&u)!==u?(s.childLanes|=u,x!==null&&(x.childLanes|=u)):x!==null&&(x.childLanes&u)!==u&&(x.childLanes|=u),s===p)break;s=s.return}}function Tw(s,u,p,x){var j=s.child;for(j!==null&&(j.return=s);j!==null;){var k=j.dependencies;if(k!==null){var M=j.child;k=k.firstContext;e:for(;k!==null;){var Y=k;k=j;for(var Z=0;Z<u.length;Z++)if(Y.context===u[Z]){k.lanes|=p,Y=k.alternate,Y!==null&&(Y.lanes|=p),Ow(k.return,p,s),x||(M=null);break e}k=Y.next}}else if(j.tag===18){if(M=j.return,M===null)throw Error(r(341));M.lanes|=p,k=M.alternate,k!==null&&(k.lanes|=p),Ow(M,p,s),M=null}else M=j.child;if(M!==null)M.return=j;else for(M=j;M!==null;){if(M===s){M=null;break}if(j=M.sibling,j!==null){j.return=M.return,M=j;break}M=M.return}j=M}}function Qc(s,u,p,x){s=null;for(var j=u,k=!1;j!==null;){if(!k){if((j.flags&524288)!==0)k=!0;else if((j.flags&262144)!==0)break}if(j.tag===10){var M=j.alternate;if(M===null)throw Error(r(387));if(M=M.memoizedProps,M!==null){var Y=j.type;Si(j.pendingProps.value,M.value)||(s!==null?s.push(Y):s=[Y])}}else if(j===ae.current){if(M=j.alternate,M===null)throw Error(r(387));M.memoizedState.memoizedState!==j.memoizedState.memoizedState&&(s!==null?s.push($h):s=[$h])}j=j.return}s!==null&&Tw(u,s,p,x),u.flags|=262144}function Dg(s){for(s=s.firstContext;s!==null;){if(!Si(s.context._currentValue,s.memoizedValue))return!0;s=s.next}return!1}function pu(s){mu=s,Po=null,s=s.dependencies,s!==null&&(s.firstContext=null)}function jr(s){return t2(mu,s)}function Rg(s,u){return mu===null&&pu(s),t2(s,u)}function t2(s,u){var p=u._currentValue;if(u={context:u,memoizedValue:p,next:null},Po===null){if(s===null)throw Error(r(308));Po=u,s.dependencies={lanes:0,firstContext:u},s.flags|=524288}else Po=Po.next=u;return p}var eG=typeof AbortController<"u"?AbortController:function(){var s=[],u=this.signal={aborted:!1,addEventListener:function(p,x){s.push(x)}};this.abort=function(){u.aborted=!0,s.forEach(function(p){return p()})}},tG=e.unstable_scheduleCallback,nG=e.unstable_NormalPriority,Un={$$typeof:_,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Pw(){return{controller:new eG,data:new Map,refCount:0}}function hh(s){s.refCount--,s.refCount===0&&tG(nG,function(){s.controller.abort()})}var mh=null,Mw=0,Zc=0,Jc=null;function rG(s,u){if(mh===null){var p=mh=[];Mw=0,Zc=I1(),Jc={status:"pending",value:void 0,then:function(x){p.push(x)}}}return Mw++,u.then(n2,n2),u}function n2(){if(--Mw===0&&mh!==null){Jc!==null&&(Jc.status="fulfilled");var s=mh;mh=null,Zc=0,Jc=null;for(var u=0;u<s.length;u++)(0,s[u])()}}function iG(s,u){var p=[],x={status:"pending",value:null,reason:null,then:function(j){p.push(j)}};return s.then(function(){x.status="fulfilled",x.value=u;for(var j=0;j<p.length;j++)(0,p[j])(u)},function(j){for(x.status="rejected",x.reason=j,j=0;j<p.length;j++)(0,p[j])(void 0)}),x}var r2=D.S;D.S=function(s,u){BP=Mt(),typeof u=="object"&&u!==null&&typeof u.then=="function"&&rG(s,u),r2!==null&&r2(s,u)};var gu=H(null);function Dw(){var s=gu.current;return s!==null?s:sn.pooledCache}function Ig(s,u){u===null?$(gu,gu.current):$(gu,u.pool)}function i2(){var s=Dw();return s===null?null:{parent:Un._currentValue,pool:s}}var ef=Error(r(460)),Rw=Error(r(474)),Lg=Error(r(542)),zg={then:function(){}};function a2(s){return s=s.status,s==="fulfilled"||s==="rejected"}function o2(s,u,p){switch(p=s[p],p===void 0?s.push(u):p!==u&&(u.then(No,No),u=p),u.status){case"fulfilled":return u.value;case"rejected":throw s=u.reason,l2(s),s;default:if(typeof u.status=="string")u.then(No,No);else{if(s=sn,s!==null&&100<s.shellSuspendCounter)throw Error(r(482));s=u,s.status="pending",s.then(function(x){if(u.status==="pending"){var j=u;j.status="fulfilled",j.value=x}},function(x){if(u.status==="pending"){var j=u;j.status="rejected",j.reason=x}})}switch(u.status){case"fulfilled":return u.value;case"rejected":throw s=u.reason,l2(s),s}throw yu=u,ef}}function vu(s){try{var u=s._init;return u(s._payload)}catch(p){throw p!==null&&typeof p=="object"&&typeof p.then=="function"?(yu=p,ef):p}}var yu=null;function s2(){if(yu===null)throw Error(r(459));var s=yu;return yu=null,s}function l2(s){if(s===ef||s===Lg)throw Error(r(483))}var tf=null,ph=0;function $g(s){var u=ph;return ph+=1,tf===null&&(tf=[]),o2(tf,s,u)}function gh(s,u){u=u.props.ref,s.ref=u!==void 0?u:null}function Bg(s,u){throw u.$$typeof===g?Error(r(525)):(s=Object.prototype.toString.call(u),Error(r(31,s==="[object Object]"?"object with keys {"+Object.keys(u).join(", ")+"}":s)))}function u2(s){function u(oe,te){if(s){var ue=oe.deletions;ue===null?(oe.deletions=[te],oe.flags|=16):ue.push(te)}}function p(oe,te){if(!s)return null;for(;te!==null;)u(oe,te),te=te.sibling;return null}function x(oe){for(var te=new Map;oe!==null;)oe.key!==null?te.set(oe.key,oe):te.set(oe.index,oe),oe=oe.sibling;return te}function j(oe,te){return oe=Oo(oe,te),oe.index=0,oe.sibling=null,oe}function k(oe,te,ue){return oe.index=ue,s?(ue=oe.alternate,ue!==null?(ue=ue.index,ue<te?(oe.flags|=67108866,te):ue):(oe.flags|=67108866,te)):(oe.flags|=1048576,te)}function M(oe){return s&&oe.alternate===null&&(oe.flags|=67108866),oe}function Y(oe,te,ue,ye){return te===null||te.tag!==6?(te=Ew(ue,oe.mode,ye),te.return=oe,te):(te=j(te,ue),te.return=oe,te)}function Z(oe,te,ue,ye){var Ve=ue.type;return Ve===w?ve(oe,te,ue.props.children,ye,ue.key):te!==null&&(te.elementType===Ve||typeof Ve=="object"&&Ve!==null&&Ve.$$typeof===P&&vu(Ve)===te.type)?(te=j(te,ue.props),gh(te,ue),te.return=oe,te):(te=Pg(ue.type,ue.key,ue.props,null,oe.mode,ye),gh(te,ue),te.return=oe,te)}function ce(oe,te,ue,ye){return te===null||te.tag!==4||te.stateNode.containerInfo!==ue.containerInfo||te.stateNode.implementation!==ue.implementation?(te=jw(ue,oe.mode,ye),te.return=oe,te):(te=j(te,ue.children||[]),te.return=oe,te)}function ve(oe,te,ue,ye,Ve){return te===null||te.tag!==7?(te=du(ue,oe.mode,ye,Ve),te.return=oe,te):(te=j(te,ue),te.return=oe,te)}function be(oe,te,ue){if(typeof te=="string"&&te!==""||typeof te=="number"||typeof te=="bigint")return te=Ew(""+te,oe.mode,ue),te.return=oe,te;if(typeof te=="object"&&te!==null){switch(te.$$typeof){case v:return ue=Pg(te.type,te.key,te.props,null,oe.mode,ue),gh(ue,te),ue.return=oe,ue;case b:return te=jw(te,oe.mode,ue),te.return=oe,te;case P:return te=vu(te),be(oe,te,ue)}if(V(te)||B(te))return te=du(te,oe.mode,ue,null),te.return=oe,te;if(typeof te.then=="function")return be(oe,$g(te),ue);if(te.$$typeof===_)return be(oe,Rg(oe,te),ue);Bg(oe,te)}return null}function fe(oe,te,ue,ye){var Ve=te!==null?te.key:null;if(typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint")return Ve!==null?null:Y(oe,te,""+ue,ye);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case v:return ue.key===Ve?Z(oe,te,ue,ye):null;case b:return ue.key===Ve?ce(oe,te,ue,ye):null;case P:return ue=vu(ue),fe(oe,te,ue,ye)}if(V(ue)||B(ue))return Ve!==null?null:ve(oe,te,ue,ye,null);if(typeof ue.then=="function")return fe(oe,te,$g(ue),ye);if(ue.$$typeof===_)return fe(oe,te,Rg(oe,ue),ye);Bg(oe,ue)}return null}function he(oe,te,ue,ye,Ve){if(typeof ye=="string"&&ye!==""||typeof ye=="number"||typeof ye=="bigint")return oe=oe.get(ue)||null,Y(te,oe,""+ye,Ve);if(typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case v:return oe=oe.get(ye.key===null?ue:ye.key)||null,Z(te,oe,ye,Ve);case b:return oe=oe.get(ye.key===null?ue:ye.key)||null,ce(te,oe,ye,Ve);case P:return ye=vu(ye),he(oe,te,ue,ye,Ve)}if(V(ye)||B(ye))return oe=oe.get(ue)||null,ve(te,oe,ye,Ve,null);if(typeof ye.then=="function")return he(oe,te,ue,$g(ye),Ve);if(ye.$$typeof===_)return he(oe,te,ue,Rg(te,ye),Ve);Bg(te,ye)}return null}function Re(oe,te,ue,ye){for(var Ve=null,It=null,Be=te,dt=te=0,jt=null;Be!==null&&dt<ue.length;dt++){Be.index>dt?(jt=Be,Be=null):jt=Be.sibling;var Lt=fe(oe,Be,ue[dt],ye);if(Lt===null){Be===null&&(Be=jt);break}s&&Be&&Lt.alternate===null&&u(oe,Be),te=k(Lt,te,dt),It===null?Ve=Lt:It.sibling=Lt,It=Lt,Be=jt}if(dt===ue.length)return p(oe,Be),Ct&&To(oe,dt),Ve;if(Be===null){for(;dt<ue.length;dt++)Be=be(oe,ue[dt],ye),Be!==null&&(te=k(Be,te,dt),It===null?Ve=Be:It.sibling=Be,It=Be);return Ct&&To(oe,dt),Ve}for(Be=x(Be);dt<ue.length;dt++)jt=he(Be,oe,dt,ue[dt],ye),jt!==null&&(s&&jt.alternate!==null&&Be.delete(jt.key===null?dt:jt.key),te=k(jt,te,dt),It===null?Ve=jt:It.sibling=jt,It=jt);return s&&Be.forEach(function(cl){return u(oe,cl)}),Ct&&To(oe,dt),Ve}function Je(oe,te,ue,ye){if(ue==null)throw Error(r(151));for(var Ve=null,It=null,Be=te,dt=te=0,jt=null,Lt=ue.next();Be!==null&&!Lt.done;dt++,Lt=ue.next()){Be.index>dt?(jt=Be,Be=null):jt=Be.sibling;var cl=fe(oe,Be,Lt.value,ye);if(cl===null){Be===null&&(Be=jt);break}s&&Be&&cl.alternate===null&&u(oe,Be),te=k(cl,te,dt),It===null?Ve=cl:It.sibling=cl,It=cl,Be=jt}if(Lt.done)return p(oe,Be),Ct&&To(oe,dt),Ve;if(Be===null){for(;!Lt.done;dt++,Lt=ue.next())Lt=be(oe,Lt.value,ye),Lt!==null&&(te=k(Lt,te,dt),It===null?Ve=Lt:It.sibling=Lt,It=Lt);return Ct&&To(oe,dt),Ve}for(Be=x(Be);!Lt.done;dt++,Lt=ue.next())Lt=he(Be,oe,dt,Lt.value,ye),Lt!==null&&(s&&Lt.alternate!==null&&Be.delete(Lt.key===null?dt:Lt.key),te=k(Lt,te,dt),It===null?Ve=Lt:It.sibling=Lt,It=Lt);return s&&Be.forEach(function(pW){return u(oe,pW)}),Ct&&To(oe,dt),Ve}function Zt(oe,te,ue,ye){if(typeof ue=="object"&&ue!==null&&ue.type===w&&ue.key===null&&(ue=ue.props.children),typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case v:e:{for(var Ve=ue.key;te!==null;){if(te.key===Ve){if(Ve=ue.type,Ve===w){if(te.tag===7){p(oe,te.sibling),ye=j(te,ue.props.children),ye.return=oe,oe=ye;break e}}else if(te.elementType===Ve||typeof Ve=="object"&&Ve!==null&&Ve.$$typeof===P&&vu(Ve)===te.type){p(oe,te.sibling),ye=j(te,ue.props),gh(ye,ue),ye.return=oe,oe=ye;break e}p(oe,te);break}else u(oe,te);te=te.sibling}ue.type===w?(ye=du(ue.props.children,oe.mode,ye,ue.key),ye.return=oe,oe=ye):(ye=Pg(ue.type,ue.key,ue.props,null,oe.mode,ye),gh(ye,ue),ye.return=oe,oe=ye)}return M(oe);case b:e:{for(Ve=ue.key;te!==null;){if(te.key===Ve)if(te.tag===4&&te.stateNode.containerInfo===ue.containerInfo&&te.stateNode.implementation===ue.implementation){p(oe,te.sibling),ye=j(te,ue.children||[]),ye.return=oe,oe=ye;break e}else{p(oe,te);break}else u(oe,te);te=te.sibling}ye=jw(ue,oe.mode,ye),ye.return=oe,oe=ye}return M(oe);case P:return ue=vu(ue),Zt(oe,te,ue,ye)}if(V(ue))return Re(oe,te,ue,ye);if(B(ue)){if(Ve=B(ue),typeof Ve!="function")throw Error(r(150));return ue=Ve.call(ue),Je(oe,te,ue,ye)}if(typeof ue.then=="function")return Zt(oe,te,$g(ue),ye);if(ue.$$typeof===_)return Zt(oe,te,Rg(oe,ue),ye);Bg(oe,ue)}return typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint"?(ue=""+ue,te!==null&&te.tag===6?(p(oe,te.sibling),ye=j(te,ue),ye.return=oe,oe=ye):(p(oe,te),ye=Ew(ue,oe.mode,ye),ye.return=oe,oe=ye),M(oe)):p(oe,te)}return function(oe,te,ue,ye){try{ph=0;var Ve=Zt(oe,te,ue,ye);return tf=null,Ve}catch(Be){if(Be===ef||Be===Lg)throw Be;var It=Ei(29,Be,null,oe.mode);return It.lanes=ye,It.return=oe,It}finally{}}}var xu=u2(!0),c2=u2(!1),Ys=!1;function Iw(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Lw(s,u){s=s.updateQueue,u.updateQueue===s&&(u.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null})}function Xs(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function Gs(s,u,p){var x=s.updateQueue;if(x===null)return null;if(x=x.shared,(Ft&2)!==0){var j=x.pending;return j===null?u.next=u:(u.next=j.next,j.next=u),x.pending=u,u=Tg(s),YT(s,null,p),u}return Og(s,x,u,p),Tg(s)}function vh(s,u,p){if(u=u.updateQueue,u!==null&&(u=u.shared,(p&4194048)!==0)){var x=u.lanes;x&=s.pendingLanes,p|=x,u.lanes=p,hr(s,p)}}function zw(s,u){var p=s.updateQueue,x=s.alternate;if(x!==null&&(x=x.updateQueue,p===x)){var j=null,k=null;if(p=p.firstBaseUpdate,p!==null){do{var M={lane:p.lane,tag:p.tag,payload:p.payload,callback:null,next:null};k===null?j=k=M:k=k.next=M,p=p.next}while(p!==null);k===null?j=k=u:k=k.next=u}else j=k=u;p={baseState:x.baseState,firstBaseUpdate:j,lastBaseUpdate:k,shared:x.shared,callbacks:x.callbacks},s.updateQueue=p;return}s=p.lastBaseUpdate,s===null?p.firstBaseUpdate=u:s.next=u,p.lastBaseUpdate=u}var $w=!1;function yh(){if($w){var s=Jc;if(s!==null)throw s}}function xh(s,u,p,x){$w=!1;var j=s.updateQueue;Ys=!1;var k=j.firstBaseUpdate,M=j.lastBaseUpdate,Y=j.shared.pending;if(Y!==null){j.shared.pending=null;var Z=Y,ce=Z.next;Z.next=null,M===null?k=ce:M.next=ce,M=Z;var ve=s.alternate;ve!==null&&(ve=ve.updateQueue,Y=ve.lastBaseUpdate,Y!==M&&(Y===null?ve.firstBaseUpdate=ce:Y.next=ce,ve.lastBaseUpdate=Z))}if(k!==null){var be=j.baseState;M=0,ve=ce=Z=null,Y=k;do{var fe=Y.lane&-536870913,he=fe!==Y.lane;if(he?(Et&fe)===fe:(x&fe)===fe){fe!==0&&fe===Zc&&($w=!0),ve!==null&&(ve=ve.next={lane:0,tag:Y.tag,payload:Y.payload,callback:null,next:null});e:{var Re=s,Je=Y;fe=u;var Zt=p;switch(Je.tag){case 1:if(Re=Je.payload,typeof Re=="function"){be=Re.call(Zt,be,fe);break e}be=Re;break e;case 3:Re.flags=Re.flags&-65537|128;case 0:if(Re=Je.payload,fe=typeof Re=="function"?Re.call(Zt,be,fe):Re,fe==null)break e;be=d({},be,fe);break e;case 2:Ys=!0}}fe=Y.callback,fe!==null&&(s.flags|=64,he&&(s.flags|=8192),he=j.callbacks,he===null?j.callbacks=[fe]:he.push(fe))}else he={lane:fe,tag:Y.tag,payload:Y.payload,callback:Y.callback,next:null},ve===null?(ce=ve=he,Z=be):ve=ve.next=he,M|=fe;if(Y=Y.next,Y===null){if(Y=j.shared.pending,Y===null)break;he=Y,Y=he.next,he.next=null,j.lastBaseUpdate=he,j.shared.pending=null}}while(!0);ve===null&&(Z=be),j.baseState=Z,j.firstBaseUpdate=ce,j.lastBaseUpdate=ve,k===null&&(j.shared.lanes=0),el|=M,s.lanes=M,s.memoizedState=be}}function f2(s,u){if(typeof s!="function")throw Error(r(191,s));s.call(u)}function d2(s,u){var p=s.callbacks;if(p!==null)for(s.callbacks=null,s=0;s<p.length;s++)f2(p[s],u)}var nf=H(null),Fg=H(0);function h2(s,u){s=Uo,$(Fg,s),$(nf,u),Uo=s|u.baseLanes}function Bw(){$(Fg,Uo),$(nf,nf.current)}function Fw(){Uo=Fg.current,U(nf),U(Fg)}var ji=H(null),Wi=null;function Ws(s){var u=s.alternate;$($n,$n.current&1),$(ji,s),Wi===null&&(u===null||nf.current!==null||u.memoizedState!==null)&&(Wi=s)}function Uw(s){$($n,$n.current),$(ji,s),Wi===null&&(Wi=s)}function m2(s){s.tag===22?($($n,$n.current),$(ji,s),Wi===null&&(Wi=s)):Qs()}function Qs(){$($n,$n.current),$(ji,ji.current)}function _i(s){U(ji),Wi===s&&(Wi=null),U($n)}var $n=H(0);function Ug(s){for(var u=s;u!==null;){if(u.tag===13){var p=u.memoizedState;if(p!==null&&(p=p.dehydrated,p===null||X1(p)||G1(p)))return u}else if(u.tag===19&&(u.memoizedProps.revealOrder==="forwards"||u.memoizedProps.revealOrder==="backwards"||u.memoizedProps.revealOrder==="unstable_legacy-backwards"||u.memoizedProps.revealOrder==="together")){if((u.flags&128)!==0)return u}else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===s)break;for(;u.sibling===null;){if(u.return===null||u.return===s)return null;u=u.return}u.sibling.return=u.return,u=u.sibling}return null}var Do=0,ut=null,Wt=null,Hn=null,Hg=!1,rf=!1,bu=!1,qg=0,bh=0,af=null,aG=0;function An(){throw Error(r(321))}function Hw(s,u){if(u===null)return!1;for(var p=0;p<u.length&&p<s.length;p++)if(!Si(s[p],u[p]))return!1;return!0}function qw(s,u,p,x,j,k){return Do=k,ut=u,u.memoizedState=null,u.updateQueue=null,u.lanes=0,D.H=s===null||s.memoizedState===null?Q2:a1,bu=!1,k=p(x,j),bu=!1,rf&&(k=g2(u,p,x,j)),p2(s),k}function p2(s){D.H=Eh;var u=Wt!==null&&Wt.next!==null;if(Do=0,Hn=Wt=ut=null,Hg=!1,bh=0,af=null,u)throw Error(r(300));s===null||qn||(s=s.dependencies,s!==null&&Dg(s)&&(qn=!0))}function g2(s,u,p,x){ut=s;var j=0;do{if(rf&&(af=null),bh=0,rf=!1,25<=j)throw Error(r(301));if(j+=1,Hn=Wt=null,s.updateQueue!=null){var k=s.updateQueue;k.lastEffect=null,k.events=null,k.stores=null,k.memoCache!=null&&(k.memoCache.index=0)}D.H=Z2,k=u(p,x)}while(rf);return k}function oG(){var s=D.H,u=s.useState()[0];return u=typeof u.then=="function"?wh(u):u,s=s.useState()[0],(Wt!==null?Wt.memoizedState:null)!==s&&(ut.flags|=1024),u}function Vw(){var s=qg!==0;return qg=0,s}function Kw(s,u,p){u.updateQueue=s.updateQueue,u.flags&=-2053,s.lanes&=~p}function Yw(s){if(Hg){for(s=s.memoizedState;s!==null;){var u=s.queue;u!==null&&(u.pending=null),s=s.next}Hg=!1}Do=0,Hn=Wt=ut=null,rf=!1,bh=qg=0,af=null}function Wr(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Hn===null?ut.memoizedState=Hn=s:Hn=Hn.next=s,Hn}function Bn(){if(Wt===null){var s=ut.alternate;s=s!==null?s.memoizedState:null}else s=Wt.next;var u=Hn===null?ut.memoizedState:Hn.next;if(u!==null)Hn=u,Wt=s;else{if(s===null)throw ut.alternate===null?Error(r(467)):Error(r(310));Wt=s,s={memoizedState:Wt.memoizedState,baseState:Wt.baseState,baseQueue:Wt.baseQueue,queue:Wt.queue,next:null},Hn===null?ut.memoizedState=Hn=s:Hn=Hn.next=s}return Hn}function Vg(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function wh(s){var u=bh;return bh+=1,af===null&&(af=[]),s=o2(af,s,u),u=ut,(Hn===null?u.memoizedState:Hn.next)===null&&(u=u.alternate,D.H=u===null||u.memoizedState===null?Q2:a1),s}function Kg(s){if(s!==null&&typeof s=="object"){if(typeof s.then=="function")return wh(s);if(s.$$typeof===_)return jr(s)}throw Error(r(438,String(s)))}function Xw(s){var u=null,p=ut.updateQueue;if(p!==null&&(u=p.memoCache),u==null){var x=ut.alternate;x!==null&&(x=x.updateQueue,x!==null&&(x=x.memoCache,x!=null&&(u={data:x.data.map(function(j){return j.slice()}),index:0})))}if(u==null&&(u={data:[],index:0}),p===null&&(p=Vg(),ut.updateQueue=p),p.memoCache=u,p=u.data[u.index],p===void 0)for(p=u.data[u.index]=Array(s),x=0;x<s;x++)p[x]=z;return u.index++,p}function Ro(s,u){return typeof u=="function"?u(s):u}function Yg(s){var u=Bn();return Gw(u,Wt,s)}function Gw(s,u,p){var x=s.queue;if(x===null)throw Error(r(311));x.lastRenderedReducer=p;var j=s.baseQueue,k=x.pending;if(k!==null){if(j!==null){var M=j.next;j.next=k.next,k.next=M}u.baseQueue=j=k,x.pending=null}if(k=s.baseState,j===null)s.memoizedState=k;else{u=j.next;var Y=M=null,Z=null,ce=u,ve=!1;do{var be=ce.lane&-536870913;if(be!==ce.lane?(Et&be)===be:(Do&be)===be){var fe=ce.revertLane;if(fe===0)Z!==null&&(Z=Z.next={lane:0,revertLane:0,gesture:null,action:ce.action,hasEagerState:ce.hasEagerState,eagerState:ce.eagerState,next:null}),be===Zc&&(ve=!0);else if((Do&fe)===fe){ce=ce.next,fe===Zc&&(ve=!0);continue}else be={lane:0,revertLane:ce.revertLane,gesture:null,action:ce.action,hasEagerState:ce.hasEagerState,eagerState:ce.eagerState,next:null},Z===null?(Y=Z=be,M=k):Z=Z.next=be,ut.lanes|=fe,el|=fe;be=ce.action,bu&&p(k,be),k=ce.hasEagerState?ce.eagerState:p(k,be)}else fe={lane:be,revertLane:ce.revertLane,gesture:ce.gesture,action:ce.action,hasEagerState:ce.hasEagerState,eagerState:ce.eagerState,next:null},Z===null?(Y=Z=fe,M=k):Z=Z.next=fe,ut.lanes|=be,el|=be;ce=ce.next}while(ce!==null&&ce!==u);if(Z===null?M=k:Z.next=Y,!Si(k,s.memoizedState)&&(qn=!0,ve&&(p=Jc,p!==null)))throw p;s.memoizedState=k,s.baseState=M,s.baseQueue=Z,x.lastRenderedState=k}return j===null&&(x.lanes=0),[s.memoizedState,x.dispatch]}function Ww(s){var u=Bn(),p=u.queue;if(p===null)throw Error(r(311));p.lastRenderedReducer=s;var x=p.dispatch,j=p.pending,k=u.memoizedState;if(j!==null){p.pending=null;var M=j=j.next;do k=s(k,M.action),M=M.next;while(M!==j);Si(k,u.memoizedState)||(qn=!0),u.memoizedState=k,u.baseQueue===null&&(u.baseState=k),p.lastRenderedState=k}return[k,x]}function v2(s,u,p){var x=ut,j=Bn(),k=Ct;if(k){if(p===void 0)throw Error(r(407));p=p()}else p=u();var M=!Si((Wt||j).memoizedState,p);if(M&&(j.memoizedState=p,qn=!0),j=j.queue,Jw(b2.bind(null,x,j,s),[s]),j.getSnapshot!==u||M||Hn!==null&&Hn.memoizedState.tag&1){if(x.flags|=2048,of(9,{destroy:void 0},x2.bind(null,x,j,p,u),null),sn===null)throw Error(r(349));k||(Do&127)!==0||y2(x,u,p)}return p}function y2(s,u,p){s.flags|=16384,s={getSnapshot:u,value:p},u=ut.updateQueue,u===null?(u=Vg(),ut.updateQueue=u,u.stores=[s]):(p=u.stores,p===null?u.stores=[s]:p.push(s))}function x2(s,u,p,x){u.value=p,u.getSnapshot=x,w2(u)&&S2(s)}function b2(s,u,p){return p(function(){w2(u)&&S2(s)})}function w2(s){var u=s.getSnapshot;s=s.value;try{var p=u();return!Si(s,p)}catch{return!0}}function S2(s){var u=fu(s,2);u!==null&&di(u,s,2)}function Qw(s){var u=Wr();if(typeof s=="function"){var p=s;if(s=p(),bu){vt(!0);try{p()}finally{vt(!1)}}}return u.memoizedState=u.baseState=s,u.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ro,lastRenderedState:s},u}function E2(s,u,p,x){return s.baseState=p,Gw(s,Wt,typeof x=="function"?x:Ro)}function sG(s,u,p,x,j){if(Wg(s))throw Error(r(485));if(s=u.action,s!==null){var k={payload:j,action:s,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(M){k.listeners.push(M)}};D.T!==null?p(!0):k.isTransition=!1,x(k),p=u.pending,p===null?(k.next=u.pending=k,j2(u,k)):(k.next=p.next,u.pending=p.next=k)}}function j2(s,u){var p=u.action,x=u.payload,j=s.state;if(u.isTransition){var k=D.T,M={};D.T=M;try{var Y=p(j,x),Z=D.S;Z!==null&&Z(M,Y),_2(s,u,Y)}catch(ce){Zw(s,u,ce)}finally{k!==null&&M.types!==null&&(k.types=M.types),D.T=k}}else try{k=p(j,x),_2(s,u,k)}catch(ce){Zw(s,u,ce)}}function _2(s,u,p){p!==null&&typeof p=="object"&&typeof p.then=="function"?p.then(function(x){C2(s,u,x)},function(x){return Zw(s,u,x)}):C2(s,u,p)}function C2(s,u,p){u.status="fulfilled",u.value=p,k2(u),s.state=p,u=s.pending,u!==null&&(p=u.next,p===u?s.pending=null:(p=p.next,u.next=p,j2(s,p)))}function Zw(s,u,p){var x=s.pending;if(s.pending=null,x!==null){x=x.next;do u.status="rejected",u.reason=p,k2(u),u=u.next;while(u!==x)}s.action=null}function k2(s){s=s.listeners;for(var u=0;u<s.length;u++)(0,s[u])()}function N2(s,u){return u}function A2(s,u){if(Ct){var p=sn.formState;if(p!==null){e:{var x=ut;if(Ct){if(pn){t:{for(var j=pn,k=Gi;j.nodeType!==8;){if(!k){j=null;break t}if(j=Qi(j.nextSibling),j===null){j=null;break t}}k=j.data,j=k==="F!"||k==="F"?j:null}if(j){pn=Qi(j.nextSibling),x=j.data==="F!";break e}}Vs(x)}x=!1}x&&(u=p[0])}}return p=Wr(),p.memoizedState=p.baseState=u,x={pending:null,lanes:0,dispatch:null,lastRenderedReducer:N2,lastRenderedState:u},p.queue=x,p=X2.bind(null,ut,x),x.dispatch=p,x=Qw(!1),k=i1.bind(null,ut,!1,x.queue),x=Wr(),j={state:u,dispatch:null,action:s,pending:null},x.queue=j,p=sG.bind(null,ut,j,k,p),j.dispatch=p,x.memoizedState=s,[u,p,!1]}function O2(s){var u=Bn();return T2(u,Wt,s)}function T2(s,u,p){if(u=Gw(s,u,N2)[0],s=Yg(Ro)[0],typeof u=="object"&&u!==null&&typeof u.then=="function")try{var x=wh(u)}catch(M){throw M===ef?Lg:M}else x=u;u=Bn();var j=u.queue,k=j.dispatch;return p!==u.memoizedState&&(ut.flags|=2048,of(9,{destroy:void 0},lG.bind(null,j,p),null)),[x,k,s]}function lG(s,u){s.action=u}function P2(s){var u=Bn(),p=Wt;if(p!==null)return T2(u,p,s);Bn(),u=u.memoizedState,p=Bn();var x=p.queue.dispatch;return p.memoizedState=s,[u,x,!1]}function of(s,u,p,x){return s={tag:s,create:p,deps:x,inst:u,next:null},u=ut.updateQueue,u===null&&(u=Vg(),ut.updateQueue=u),p=u.lastEffect,p===null?u.lastEffect=s.next=s:(x=p.next,p.next=s,s.next=x,u.lastEffect=s),s}function M2(){return Bn().memoizedState}function Xg(s,u,p,x){var j=Wr();ut.flags|=s,j.memoizedState=of(1|u,{destroy:void 0},p,x===void 0?null:x)}function Gg(s,u,p,x){var j=Bn();x=x===void 0?null:x;var k=j.memoizedState.inst;Wt!==null&&x!==null&&Hw(x,Wt.memoizedState.deps)?j.memoizedState=of(u,k,p,x):(ut.flags|=s,j.memoizedState=of(1|u,k,p,x))}function D2(s,u){Xg(8390656,8,s,u)}function Jw(s,u){Gg(2048,8,s,u)}function uG(s){ut.flags|=4;var u=ut.updateQueue;if(u===null)u=Vg(),ut.updateQueue=u,u.events=[s];else{var p=u.events;p===null?u.events=[s]:p.push(s)}}function R2(s){var u=Bn().memoizedState;return uG({ref:u,nextImpl:s}),function(){if((Ft&2)!==0)throw Error(r(440));return u.impl.apply(void 0,arguments)}}function I2(s,u){return Gg(4,2,s,u)}function L2(s,u){return Gg(4,4,s,u)}function z2(s,u){if(typeof u=="function"){s=s();var p=u(s);return function(){typeof p=="function"?p():u(null)}}if(u!=null)return s=s(),u.current=s,function(){u.current=null}}function $2(s,u,p){p=p!=null?p.concat([s]):null,Gg(4,4,z2.bind(null,u,s),p)}function e1(){}function B2(s,u){var p=Bn();u=u===void 0?null:u;var x=p.memoizedState;return u!==null&&Hw(u,x[1])?x[0]:(p.memoizedState=[s,u],s)}function F2(s,u){var p=Bn();u=u===void 0?null:u;var x=p.memoizedState;if(u!==null&&Hw(u,x[1]))return x[0];if(x=s(),bu){vt(!0);try{s()}finally{vt(!1)}}return p.memoizedState=[x,u],x}function t1(s,u,p){return p===void 0||(Do&1073741824)!==0&&(Et&261930)===0?s.memoizedState=u:(s.memoizedState=p,s=UP(),ut.lanes|=s,el|=s,p)}function U2(s,u,p,x){return Si(p,u)?p:nf.current!==null?(s=t1(s,p,x),Si(s,u)||(qn=!0),s):(Do&42)===0||(Do&1073741824)!==0&&(Et&261930)===0?(qn=!0,s.memoizedState=p):(s=UP(),ut.lanes|=s,el|=s,u)}function H2(s,u,p,x,j){var k=q.p;q.p=k!==0&&8>k?k:8;var M=D.T,Y={};D.T=Y,i1(s,!1,u,p);try{var Z=j(),ce=D.S;if(ce!==null&&ce(Y,Z),Z!==null&&typeof Z=="object"&&typeof Z.then=="function"){var ve=iG(Z,x);Sh(s,u,ve,Ni(s))}else Sh(s,u,x,Ni(s))}catch(be){Sh(s,u,{then:function(){},status:"rejected",reason:be},Ni())}finally{q.p=k,M!==null&&Y.types!==null&&(M.types=Y.types),D.T=M}}function cG(){}function n1(s,u,p,x){if(s.tag!==5)throw Error(r(476));var j=q2(s).queue;H2(s,j,u,X,p===null?cG:function(){return V2(s),p(x)})}function q2(s){var u=s.memoizedState;if(u!==null)return u;u={memoizedState:X,baseState:X,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ro,lastRenderedState:X},next:null};var p={};return u.next={memoizedState:p,baseState:p,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ro,lastRenderedState:p},next:null},s.memoizedState=u,s=s.alternate,s!==null&&(s.memoizedState=u),u}function V2(s){var u=q2(s);u.next===null&&(u=s.alternate.memoizedState),Sh(s,u.next.queue,{},Ni())}function r1(){return jr($h)}function K2(){return Bn().memoizedState}function Y2(){return Bn().memoizedState}function fG(s){for(var u=s.return;u!==null;){switch(u.tag){case 24:case 3:var p=Ni();s=Xs(p);var x=Gs(u,s,p);x!==null&&(di(x,u,p),vh(x,u,p)),u={cache:Pw()},s.payload=u;return}u=u.return}}function dG(s,u,p){var x=Ni();p={lane:x,revertLane:0,gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},Wg(s)?G2(u,p):(p=ww(s,u,p,x),p!==null&&(di(p,s,x),W2(p,u,x)))}function X2(s,u,p){var x=Ni();Sh(s,u,p,x)}function Sh(s,u,p,x){var j={lane:x,revertLane:0,gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null};if(Wg(s))G2(u,j);else{var k=s.alternate;if(s.lanes===0&&(k===null||k.lanes===0)&&(k=u.lastRenderedReducer,k!==null))try{var M=u.lastRenderedState,Y=k(M,p);if(j.hasEagerState=!0,j.eagerState=Y,Si(Y,M))return Og(s,u,j,0),sn===null&&Ag(),!1}catch{}finally{}if(p=ww(s,u,j,x),p!==null)return di(p,s,x),W2(p,u,x),!0}return!1}function i1(s,u,p,x){if(x={lane:2,revertLane:I1(),gesture:null,action:x,hasEagerState:!1,eagerState:null,next:null},Wg(s)){if(u)throw Error(r(479))}else u=ww(s,p,x,2),u!==null&&di(u,s,2)}function Wg(s){var u=s.alternate;return s===ut||u!==null&&u===ut}function G2(s,u){rf=Hg=!0;var p=s.pending;p===null?u.next=u:(u.next=p.next,p.next=u),s.pending=u}function W2(s,u,p){if((p&4194048)!==0){var x=u.lanes;x&=s.pendingLanes,p|=x,u.lanes=p,hr(s,p)}}var Eh={readContext:jr,use:Kg,useCallback:An,useContext:An,useEffect:An,useImperativeHandle:An,useLayoutEffect:An,useInsertionEffect:An,useMemo:An,useReducer:An,useRef:An,useState:An,useDebugValue:An,useDeferredValue:An,useTransition:An,useSyncExternalStore:An,useId:An,useHostTransitionStatus:An,useFormState:An,useActionState:An,useOptimistic:An,useMemoCache:An,useCacheRefresh:An};Eh.useEffectEvent=An;var Q2={readContext:jr,use:Kg,useCallback:function(s,u){return Wr().memoizedState=[s,u===void 0?null:u],s},useContext:jr,useEffect:D2,useImperativeHandle:function(s,u,p){p=p!=null?p.concat([s]):null,Xg(4194308,4,z2.bind(null,u,s),p)},useLayoutEffect:function(s,u){return Xg(4194308,4,s,u)},useInsertionEffect:function(s,u){Xg(4,2,s,u)},useMemo:function(s,u){var p=Wr();u=u===void 0?null:u;var x=s();if(bu){vt(!0);try{s()}finally{vt(!1)}}return p.memoizedState=[x,u],x},useReducer:function(s,u,p){var x=Wr();if(p!==void 0){var j=p(u);if(bu){vt(!0);try{p(u)}finally{vt(!1)}}}else j=u;return x.memoizedState=x.baseState=j,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:j},x.queue=s,s=s.dispatch=dG.bind(null,ut,s),[x.memoizedState,s]},useRef:function(s){var u=Wr();return s={current:s},u.memoizedState=s},useState:function(s){s=Qw(s);var u=s.queue,p=X2.bind(null,ut,u);return u.dispatch=p,[s.memoizedState,p]},useDebugValue:e1,useDeferredValue:function(s,u){var p=Wr();return t1(p,s,u)},useTransition:function(){var s=Qw(!1);return s=H2.bind(null,ut,s.queue,!0,!1),Wr().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,u,p){var x=ut,j=Wr();if(Ct){if(p===void 0)throw Error(r(407));p=p()}else{if(p=u(),sn===null)throw Error(r(349));(Et&127)!==0||y2(x,u,p)}j.memoizedState=p;var k={value:p,getSnapshot:u};return j.queue=k,D2(b2.bind(null,x,k,s),[s]),x.flags|=2048,of(9,{destroy:void 0},x2.bind(null,x,k,p,u),null),p},useId:function(){var s=Wr(),u=sn.identifierPrefix;if(Ct){var p=Xa,x=Ya;p=(x&~(1<<32-st(x)-1)).toString(32)+p,u="_"+u+"R_"+p,p=qg++,0<p&&(u+="H"+p.toString(32)),u+="_"}else p=aG++,u="_"+u+"r_"+p.toString(32)+"_";return s.memoizedState=u},useHostTransitionStatus:r1,useFormState:A2,useActionState:A2,useOptimistic:function(s){var u=Wr();u.memoizedState=u.baseState=s;var p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return u.queue=p,u=i1.bind(null,ut,!0,p),p.dispatch=u,[s,u]},useMemoCache:Xw,useCacheRefresh:function(){return Wr().memoizedState=fG.bind(null,ut)},useEffectEvent:function(s){var u=Wr(),p={impl:s};return u.memoizedState=p,function(){if((Ft&2)!==0)throw Error(r(440));return p.impl.apply(void 0,arguments)}}},a1={readContext:jr,use:Kg,useCallback:B2,useContext:jr,useEffect:Jw,useImperativeHandle:$2,useInsertionEffect:I2,useLayoutEffect:L2,useMemo:F2,useReducer:Yg,useRef:M2,useState:function(){return Yg(Ro)},useDebugValue:e1,useDeferredValue:function(s,u){var p=Bn();return U2(p,Wt.memoizedState,s,u)},useTransition:function(){var s=Yg(Ro)[0],u=Bn().memoizedState;return[typeof s=="boolean"?s:wh(s),u]},useSyncExternalStore:v2,useId:K2,useHostTransitionStatus:r1,useFormState:O2,useActionState:O2,useOptimistic:function(s,u){var p=Bn();return E2(p,Wt,s,u)},useMemoCache:Xw,useCacheRefresh:Y2};a1.useEffectEvent=R2;var Z2={readContext:jr,use:Kg,useCallback:B2,useContext:jr,useEffect:Jw,useImperativeHandle:$2,useInsertionEffect:I2,useLayoutEffect:L2,useMemo:F2,useReducer:Ww,useRef:M2,useState:function(){return Ww(Ro)},useDebugValue:e1,useDeferredValue:function(s,u){var p=Bn();return Wt===null?t1(p,s,u):U2(p,Wt.memoizedState,s,u)},useTransition:function(){var s=Ww(Ro)[0],u=Bn().memoizedState;return[typeof s=="boolean"?s:wh(s),u]},useSyncExternalStore:v2,useId:K2,useHostTransitionStatus:r1,useFormState:P2,useActionState:P2,useOptimistic:function(s,u){var p=Bn();return Wt!==null?E2(p,Wt,s,u):(p.baseState=s,[s,p.queue.dispatch])},useMemoCache:Xw,useCacheRefresh:Y2};Z2.useEffectEvent=R2;function o1(s,u,p,x){u=s.memoizedState,p=p(x,u),p=p==null?u:d({},u,p),s.memoizedState=p,s.lanes===0&&(s.updateQueue.baseState=p)}var s1={enqueueSetState:function(s,u,p){s=s._reactInternals;var x=Ni(),j=Xs(x);j.payload=u,p!=null&&(j.callback=p),u=Gs(s,j,x),u!==null&&(di(u,s,x),vh(u,s,x))},enqueueReplaceState:function(s,u,p){s=s._reactInternals;var x=Ni(),j=Xs(x);j.tag=1,j.payload=u,p!=null&&(j.callback=p),u=Gs(s,j,x),u!==null&&(di(u,s,x),vh(u,s,x))},enqueueForceUpdate:function(s,u){s=s._reactInternals;var p=Ni(),x=Xs(p);x.tag=2,u!=null&&(x.callback=u),u=Gs(s,x,p),u!==null&&(di(u,s,p),vh(u,s,p))}};function J2(s,u,p,x,j,k,M){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(x,k,M):u.prototype&&u.prototype.isPureReactComponent?!uh(p,x)||!uh(j,k):!0}function eP(s,u,p,x){s=u.state,typeof u.componentWillReceiveProps=="function"&&u.componentWillReceiveProps(p,x),typeof u.UNSAFE_componentWillReceiveProps=="function"&&u.UNSAFE_componentWillReceiveProps(p,x),u.state!==s&&s1.enqueueReplaceState(u,u.state,null)}function wu(s,u){var p=u;if("ref"in u){p={};for(var x in u)x!=="ref"&&(p[x]=u[x])}if(s=s.defaultProps){p===u&&(p=d({},p));for(var j in s)p[j]===void 0&&(p[j]=s[j])}return p}function tP(s){Ng(s)}function nP(s){console.error(s)}function rP(s){Ng(s)}function Qg(s,u){try{var p=s.onUncaughtError;p(u.value,{componentStack:u.stack})}catch(x){setTimeout(function(){throw x})}}function iP(s,u,p){try{var x=s.onCaughtError;x(p.value,{componentStack:p.stack,errorBoundary:u.tag===1?u.stateNode:null})}catch(j){setTimeout(function(){throw j})}}function l1(s,u,p){return p=Xs(p),p.tag=3,p.payload={element:null},p.callback=function(){Qg(s,u)},p}function aP(s){return s=Xs(s),s.tag=3,s}function oP(s,u,p,x){var j=p.type.getDerivedStateFromError;if(typeof j=="function"){var k=x.value;s.payload=function(){return j(k)},s.callback=function(){iP(u,p,x)}}var M=p.stateNode;M!==null&&typeof M.componentDidCatch=="function"&&(s.callback=function(){iP(u,p,x),typeof j!="function"&&(tl===null?tl=new Set([this]):tl.add(this));var Y=x.stack;this.componentDidCatch(x.value,{componentStack:Y!==null?Y:""})})}function hG(s,u,p,x,j){if(p.flags|=32768,x!==null&&typeof x=="object"&&typeof x.then=="function"){if(u=p.alternate,u!==null&&Qc(u,p,j,!0),p=ji.current,p!==null){switch(p.tag){case 31:case 13:return Wi===null?uv():p.alternate===null&&On===0&&(On=3),p.flags&=-257,p.flags|=65536,p.lanes=j,x===zg?p.flags|=16384:(u=p.updateQueue,u===null?p.updateQueue=new Set([x]):u.add(x),M1(s,x,j)),!1;case 22:return p.flags|=65536,x===zg?p.flags|=16384:(u=p.updateQueue,u===null?(u={transitions:null,markerInstances:null,retryQueue:new Set([x])},p.updateQueue=u):(p=u.retryQueue,p===null?u.retryQueue=new Set([x]):p.add(x)),M1(s,x,j)),!1}throw Error(r(435,p.tag))}return M1(s,x,j),uv(),!1}if(Ct)return u=ji.current,u!==null?((u.flags&65536)===0&&(u.flags|=256),u.flags|=65536,u.lanes=j,x!==kw&&(s=Error(r(422),{cause:x}),dh(Ki(s,p)))):(x!==kw&&(u=Error(r(423),{cause:x}),dh(Ki(u,p))),s=s.current.alternate,s.flags|=65536,j&=-j,s.lanes|=j,x=Ki(x,p),j=l1(s.stateNode,x,j),zw(s,j),On!==4&&(On=2)),!1;var k=Error(r(520),{cause:x});if(k=Ki(k,p),Th===null?Th=[k]:Th.push(k),On!==4&&(On=2),u===null)return!0;x=Ki(x,p),p=u;do{switch(p.tag){case 3:return p.flags|=65536,s=j&-j,p.lanes|=s,s=l1(p.stateNode,x,s),zw(p,s),!1;case 1:if(u=p.type,k=p.stateNode,(p.flags&128)===0&&(typeof u.getDerivedStateFromError=="function"||k!==null&&typeof k.componentDidCatch=="function"&&(tl===null||!tl.has(k))))return p.flags|=65536,j&=-j,p.lanes|=j,j=aP(j),oP(j,s,p,x),zw(p,j),!1}p=p.return}while(p!==null);return!1}var u1=Error(r(461)),qn=!1;function _r(s,u,p,x){u.child=s===null?c2(u,null,p,x):xu(u,s.child,p,x)}function sP(s,u,p,x,j){p=p.render;var k=u.ref;if("ref"in x){var M={};for(var Y in x)Y!=="ref"&&(M[Y]=x[Y])}else M=x;return pu(u),x=qw(s,u,p,M,k,j),Y=Vw(),s!==null&&!qn?(Kw(s,u,j),Io(s,u,j)):(Ct&&Y&&_w(u),u.flags|=1,_r(s,u,x,j),u.child)}function lP(s,u,p,x,j){if(s===null){var k=p.type;return typeof k=="function"&&!Sw(k)&&k.defaultProps===void 0&&p.compare===null?(u.tag=15,u.type=k,uP(s,u,k,x,j)):(s=Pg(p.type,null,x,u,u.mode,j),s.ref=u.ref,s.return=u,u.child=s)}if(k=s.child,!v1(s,j)){var M=k.memoizedProps;if(p=p.compare,p=p!==null?p:uh,p(M,x)&&s.ref===u.ref)return Io(s,u,j)}return u.flags|=1,s=Oo(k,x),s.ref=u.ref,s.return=u,u.child=s}function uP(s,u,p,x,j){if(s!==null){var k=s.memoizedProps;if(uh(k,x)&&s.ref===u.ref)if(qn=!1,u.pendingProps=x=k,v1(s,j))(s.flags&131072)!==0&&(qn=!0);else return u.lanes=s.lanes,Io(s,u,j)}return c1(s,u,p,x,j)}function cP(s,u,p,x){var j=x.children,k=s!==null?s.memoizedState:null;if(s===null&&u.stateNode===null&&(u.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),x.mode==="hidden"){if((u.flags&128)!==0){if(k=k!==null?k.baseLanes|p:p,s!==null){for(x=u.child=s.child,j=0;x!==null;)j=j|x.lanes|x.childLanes,x=x.sibling;x=j&~k}else x=0,u.child=null;return fP(s,u,k,p,x)}if((p&536870912)!==0)u.memoizedState={baseLanes:0,cachePool:null},s!==null&&Ig(u,k!==null?k.cachePool:null),k!==null?h2(u,k):Bw(),m2(u);else return x=u.lanes=536870912,fP(s,u,k!==null?k.baseLanes|p:p,p,x)}else k!==null?(Ig(u,k.cachePool),h2(u,k),Qs(),u.memoizedState=null):(s!==null&&Ig(u,null),Bw(),Qs());return _r(s,u,j,p),u.child}function jh(s,u){return s!==null&&s.tag===22||u.stateNode!==null||(u.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.sibling}function fP(s,u,p,x,j){var k=Dw();return k=k===null?null:{parent:Un._currentValue,pool:k},u.memoizedState={baseLanes:p,cachePool:k},s!==null&&Ig(u,null),Bw(),m2(u),s!==null&&Qc(s,u,x,!0),u.childLanes=j,null}function Zg(s,u){return u=ev({mode:u.mode,children:u.children},s.mode),u.ref=s.ref,s.child=u,u.return=s,u}function dP(s,u,p){return xu(u,s.child,null,p),s=Zg(u,u.pendingProps),s.flags|=2,_i(u),u.memoizedState=null,s}function mG(s,u,p){var x=u.pendingProps,j=(u.flags&128)!==0;if(u.flags&=-129,s===null){if(Ct){if(x.mode==="hidden")return s=Zg(u,x),u.lanes=536870912,jh(null,s);if(Uw(u),(s=pn)?(s=jM(s,Gi),s=s!==null&&s.data==="&"?s:null,s!==null&&(u.memoizedState={dehydrated:s,treeContext:Hs!==null?{id:Ya,overflow:Xa}:null,retryLane:536870912,hydrationErrors:null},p=GT(s),p.return=u,u.child=p,Er=u,pn=null)):s=null,s===null)throw Vs(u);return u.lanes=536870912,null}return Zg(u,x)}var k=s.memoizedState;if(k!==null){var M=k.dehydrated;if(Uw(u),j)if(u.flags&256)u.flags&=-257,u=dP(s,u,p);else if(u.memoizedState!==null)u.child=s.child,u.flags|=128,u=null;else throw Error(r(558));else if(qn||Qc(s,u,p,!1),j=(p&s.childLanes)!==0,qn||j){if(x=sn,x!==null&&(M=Jn(x,p),M!==0&&M!==k.retryLane))throw k.retryLane=M,fu(s,M),di(x,s,M),u1;uv(),u=dP(s,u,p)}else s=k.treeContext,pn=Qi(M.nextSibling),Er=u,Ct=!0,qs=null,Gi=!1,s!==null&&ZT(u,s),u=Zg(u,x),u.flags|=4096;return u}return s=Oo(s.child,{mode:x.mode,children:x.children}),s.ref=u.ref,u.child=s,s.return=u,s}function Jg(s,u){var p=u.ref;if(p===null)s!==null&&s.ref!==null&&(u.flags|=4194816);else{if(typeof p!="function"&&typeof p!="object")throw Error(r(284));(s===null||s.ref!==p)&&(u.flags|=4194816)}}function c1(s,u,p,x,j){return pu(u),p=qw(s,u,p,x,void 0,j),x=Vw(),s!==null&&!qn?(Kw(s,u,j),Io(s,u,j)):(Ct&&x&&_w(u),u.flags|=1,_r(s,u,p,j),u.child)}function hP(s,u,p,x,j,k){return pu(u),u.updateQueue=null,p=g2(u,x,p,j),p2(s),x=Vw(),s!==null&&!qn?(Kw(s,u,k),Io(s,u,k)):(Ct&&x&&_w(u),u.flags|=1,_r(s,u,p,k),u.child)}function mP(s,u,p,x,j){if(pu(u),u.stateNode===null){var k=Yc,M=p.contextType;typeof M=="object"&&M!==null&&(k=jr(M)),k=new p(x,k),u.memoizedState=k.state!==null&&k.state!==void 0?k.state:null,k.updater=s1,u.stateNode=k,k._reactInternals=u,k=u.stateNode,k.props=x,k.state=u.memoizedState,k.refs={},Iw(u),M=p.contextType,k.context=typeof M=="object"&&M!==null?jr(M):Yc,k.state=u.memoizedState,M=p.getDerivedStateFromProps,typeof M=="function"&&(o1(u,p,M,x),k.state=u.memoizedState),typeof p.getDerivedStateFromProps=="function"||typeof k.getSnapshotBeforeUpdate=="function"||typeof k.UNSAFE_componentWillMount!="function"&&typeof k.componentWillMount!="function"||(M=k.state,typeof k.componentWillMount=="function"&&k.componentWillMount(),typeof k.UNSAFE_componentWillMount=="function"&&k.UNSAFE_componentWillMount(),M!==k.state&&s1.enqueueReplaceState(k,k.state,null),xh(u,x,k,j),yh(),k.state=u.memoizedState),typeof k.componentDidMount=="function"&&(u.flags|=4194308),x=!0}else if(s===null){k=u.stateNode;var Y=u.memoizedProps,Z=wu(p,Y);k.props=Z;var ce=k.context,ve=p.contextType;M=Yc,typeof ve=="object"&&ve!==null&&(M=jr(ve));var be=p.getDerivedStateFromProps;ve=typeof be=="function"||typeof k.getSnapshotBeforeUpdate=="function",Y=u.pendingProps!==Y,ve||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(Y||ce!==M)&&eP(u,k,x,M),Ys=!1;var fe=u.memoizedState;k.state=fe,xh(u,x,k,j),yh(),ce=u.memoizedState,Y||fe!==ce||Ys?(typeof be=="function"&&(o1(u,p,be,x),ce=u.memoizedState),(Z=Ys||J2(u,p,Z,x,fe,ce,M))?(ve||typeof k.UNSAFE_componentWillMount!="function"&&typeof k.componentWillMount!="function"||(typeof k.componentWillMount=="function"&&k.componentWillMount(),typeof k.UNSAFE_componentWillMount=="function"&&k.UNSAFE_componentWillMount()),typeof k.componentDidMount=="function"&&(u.flags|=4194308)):(typeof k.componentDidMount=="function"&&(u.flags|=4194308),u.memoizedProps=x,u.memoizedState=ce),k.props=x,k.state=ce,k.context=M,x=Z):(typeof k.componentDidMount=="function"&&(u.flags|=4194308),x=!1)}else{k=u.stateNode,Lw(s,u),M=u.memoizedProps,ve=wu(p,M),k.props=ve,be=u.pendingProps,fe=k.context,ce=p.contextType,Z=Yc,typeof ce=="object"&&ce!==null&&(Z=jr(ce)),Y=p.getDerivedStateFromProps,(ce=typeof Y=="function"||typeof k.getSnapshotBeforeUpdate=="function")||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(M!==be||fe!==Z)&&eP(u,k,x,Z),Ys=!1,fe=u.memoizedState,k.state=fe,xh(u,x,k,j),yh();var he=u.memoizedState;M!==be||fe!==he||Ys||s!==null&&s.dependencies!==null&&Dg(s.dependencies)?(typeof Y=="function"&&(o1(u,p,Y,x),he=u.memoizedState),(ve=Ys||J2(u,p,ve,x,fe,he,Z)||s!==null&&s.dependencies!==null&&Dg(s.dependencies))?(ce||typeof k.UNSAFE_componentWillUpdate!="function"&&typeof k.componentWillUpdate!="function"||(typeof k.componentWillUpdate=="function"&&k.componentWillUpdate(x,he,Z),typeof k.UNSAFE_componentWillUpdate=="function"&&k.UNSAFE_componentWillUpdate(x,he,Z)),typeof k.componentDidUpdate=="function"&&(u.flags|=4),typeof k.getSnapshotBeforeUpdate=="function"&&(u.flags|=1024)):(typeof k.componentDidUpdate!="function"||M===s.memoizedProps&&fe===s.memoizedState||(u.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||M===s.memoizedProps&&fe===s.memoizedState||(u.flags|=1024),u.memoizedProps=x,u.memoizedState=he),k.props=x,k.state=he,k.context=Z,x=ve):(typeof k.componentDidUpdate!="function"||M===s.memoizedProps&&fe===s.memoizedState||(u.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||M===s.memoizedProps&&fe===s.memoizedState||(u.flags|=1024),x=!1)}return k=x,Jg(s,u),x=(u.flags&128)!==0,k||x?(k=u.stateNode,p=x&&typeof p.getDerivedStateFromError!="function"?null:k.render(),u.flags|=1,s!==null&&x?(u.child=xu(u,s.child,null,j),u.child=xu(u,null,p,j)):_r(s,u,p,j),u.memoizedState=k.state,s=u.child):s=Io(s,u,j),s}function pP(s,u,p,x){return hu(),u.flags|=256,_r(s,u,p,x),u.child}var f1={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function d1(s){return{baseLanes:s,cachePool:i2()}}function h1(s,u,p){return s=s!==null?s.childLanes&~p:0,u&&(s|=ki),s}function gP(s,u,p){var x=u.pendingProps,j=!1,k=(u.flags&128)!==0,M;if((M=k)||(M=s!==null&&s.memoizedState===null?!1:($n.current&2)!==0),M&&(j=!0,u.flags&=-129),M=(u.flags&32)!==0,u.flags&=-33,s===null){if(Ct){if(j?Ws(u):Qs(),(s=pn)?(s=jM(s,Gi),s=s!==null&&s.data!=="&"?s:null,s!==null&&(u.memoizedState={dehydrated:s,treeContext:Hs!==null?{id:Ya,overflow:Xa}:null,retryLane:536870912,hydrationErrors:null},p=GT(s),p.return=u,u.child=p,Er=u,pn=null)):s=null,s===null)throw Vs(u);return G1(s)?u.lanes=32:u.lanes=536870912,null}var Y=x.children;return x=x.fallback,j?(Qs(),j=u.mode,Y=ev({mode:"hidden",children:Y},j),x=du(x,j,p,null),Y.return=u,x.return=u,Y.sibling=x,u.child=Y,x=u.child,x.memoizedState=d1(p),x.childLanes=h1(s,M,p),u.memoizedState=f1,jh(null,x)):(Ws(u),m1(u,Y))}var Z=s.memoizedState;if(Z!==null&&(Y=Z.dehydrated,Y!==null)){if(k)u.flags&256?(Ws(u),u.flags&=-257,u=p1(s,u,p)):u.memoizedState!==null?(Qs(),u.child=s.child,u.flags|=128,u=null):(Qs(),Y=x.fallback,j=u.mode,x=ev({mode:"visible",children:x.children},j),Y=du(Y,j,p,null),Y.flags|=2,x.return=u,Y.return=u,x.sibling=Y,u.child=x,xu(u,s.child,null,p),x=u.child,x.memoizedState=d1(p),x.childLanes=h1(s,M,p),u.memoizedState=f1,u=jh(null,x));else if(Ws(u),G1(Y)){if(M=Y.nextSibling&&Y.nextSibling.dataset,M)var ce=M.dgst;M=ce,x=Error(r(419)),x.stack="",x.digest=M,dh({value:x,source:null,stack:null}),u=p1(s,u,p)}else if(qn||Qc(s,u,p,!1),M=(p&s.childLanes)!==0,qn||M){if(M=sn,M!==null&&(x=Jn(M,p),x!==0&&x!==Z.retryLane))throw Z.retryLane=x,fu(s,x),di(M,s,x),u1;X1(Y)||uv(),u=p1(s,u,p)}else X1(Y)?(u.flags|=192,u.child=s.child,u=null):(s=Z.treeContext,pn=Qi(Y.nextSibling),Er=u,Ct=!0,qs=null,Gi=!1,s!==null&&ZT(u,s),u=m1(u,x.children),u.flags|=4096);return u}return j?(Qs(),Y=x.fallback,j=u.mode,Z=s.child,ce=Z.sibling,x=Oo(Z,{mode:"hidden",children:x.children}),x.subtreeFlags=Z.subtreeFlags&65011712,ce!==null?Y=Oo(ce,Y):(Y=du(Y,j,p,null),Y.flags|=2),Y.return=u,x.return=u,x.sibling=Y,u.child=x,jh(null,x),x=u.child,Y=s.child.memoizedState,Y===null?Y=d1(p):(j=Y.cachePool,j!==null?(Z=Un._currentValue,j=j.parent!==Z?{parent:Z,pool:Z}:j):j=i2(),Y={baseLanes:Y.baseLanes|p,cachePool:j}),x.memoizedState=Y,x.childLanes=h1(s,M,p),u.memoizedState=f1,jh(s.child,x)):(Ws(u),p=s.child,s=p.sibling,p=Oo(p,{mode:"visible",children:x.children}),p.return=u,p.sibling=null,s!==null&&(M=u.deletions,M===null?(u.deletions=[s],u.flags|=16):M.push(s)),u.child=p,u.memoizedState=null,p)}function m1(s,u){return u=ev({mode:"visible",children:u},s.mode),u.return=s,s.child=u}function ev(s,u){return s=Ei(22,s,null,u),s.lanes=0,s}function p1(s,u,p){return xu(u,s.child,null,p),s=m1(u,u.pendingProps.children),s.flags|=2,u.memoizedState=null,s}function vP(s,u,p){s.lanes|=u;var x=s.alternate;x!==null&&(x.lanes|=u),Ow(s.return,u,p)}function g1(s,u,p,x,j,k){var M=s.memoizedState;M===null?s.memoizedState={isBackwards:u,rendering:null,renderingStartTime:0,last:x,tail:p,tailMode:j,treeForkCount:k}:(M.isBackwards=u,M.rendering=null,M.renderingStartTime=0,M.last=x,M.tail=p,M.tailMode=j,M.treeForkCount=k)}function yP(s,u,p){var x=u.pendingProps,j=x.revealOrder,k=x.tail;x=x.children;var M=$n.current,Y=(M&2)!==0;if(Y?(M=M&1|2,u.flags|=128):M&=1,$($n,M),_r(s,u,x,p),x=Ct?fh:0,!Y&&s!==null&&(s.flags&128)!==0)e:for(s=u.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&vP(s,p,u);else if(s.tag===19)vP(s,p,u);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===u)break e;for(;s.sibling===null;){if(s.return===null||s.return===u)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}switch(j){case"forwards":for(p=u.child,j=null;p!==null;)s=p.alternate,s!==null&&Ug(s)===null&&(j=p),p=p.sibling;p=j,p===null?(j=u.child,u.child=null):(j=p.sibling,p.sibling=null),g1(u,!1,j,p,k,x);break;case"backwards":case"unstable_legacy-backwards":for(p=null,j=u.child,u.child=null;j!==null;){if(s=j.alternate,s!==null&&Ug(s)===null){u.child=j;break}s=j.sibling,j.sibling=p,p=j,j=s}g1(u,!0,p,null,k,x);break;case"together":g1(u,!1,null,null,void 0,x);break;default:u.memoizedState=null}return u.child}function Io(s,u,p){if(s!==null&&(u.dependencies=s.dependencies),el|=u.lanes,(p&u.childLanes)===0)if(s!==null){if(Qc(s,u,p,!1),(p&u.childLanes)===0)return null}else return null;if(s!==null&&u.child!==s.child)throw Error(r(153));if(u.child!==null){for(s=u.child,p=Oo(s,s.pendingProps),u.child=p,p.return=u;s.sibling!==null;)s=s.sibling,p=p.sibling=Oo(s,s.pendingProps),p.return=u;p.sibling=null}return u.child}function v1(s,u){return(s.lanes&u)!==0?!0:(s=s.dependencies,!!(s!==null&&Dg(s)))}function pG(s,u,p){switch(u.tag){case 3:ie(u,u.stateNode.containerInfo),Ks(u,Un,s.memoizedState.cache),hu();break;case 27:case 5:se(u);break;case 4:ie(u,u.stateNode.containerInfo);break;case 10:Ks(u,u.type,u.memoizedProps.value);break;case 31:if(u.memoizedState!==null)return u.flags|=128,Uw(u),null;break;case 13:var x=u.memoizedState;if(x!==null)return x.dehydrated!==null?(Ws(u),u.flags|=128,null):(p&u.child.childLanes)!==0?gP(s,u,p):(Ws(u),s=Io(s,u,p),s!==null?s.sibling:null);Ws(u);break;case 19:var j=(s.flags&128)!==0;if(x=(p&u.childLanes)!==0,x||(Qc(s,u,p,!1),x=(p&u.childLanes)!==0),j){if(x)return yP(s,u,p);u.flags|=128}if(j=u.memoizedState,j!==null&&(j.rendering=null,j.tail=null,j.lastEffect=null),$($n,$n.current),x)break;return null;case 22:return u.lanes=0,cP(s,u,p,u.pendingProps);case 24:Ks(u,Un,s.memoizedState.cache)}return Io(s,u,p)}function xP(s,u,p){if(s!==null)if(s.memoizedProps!==u.pendingProps)qn=!0;else{if(!v1(s,p)&&(u.flags&128)===0)return qn=!1,pG(s,u,p);qn=(s.flags&131072)!==0}else qn=!1,Ct&&(u.flags&1048576)!==0&&QT(u,fh,u.index);switch(u.lanes=0,u.tag){case 16:e:{var x=u.pendingProps;if(s=vu(u.elementType),u.type=s,typeof s=="function")Sw(s)?(x=wu(s,x),u.tag=1,u=mP(null,u,s,x,p)):(u.tag=0,u=c1(null,u,s,x,p));else{if(s!=null){var j=s.$$typeof;if(j===N){u.tag=11,u=sP(null,u,s,x,p);break e}else if(j===T){u.tag=14,u=lP(null,u,s,x,p);break e}}throw u=L(s)||s,Error(r(306,u,""))}}return u;case 0:return c1(s,u,u.type,u.pendingProps,p);case 1:return x=u.type,j=wu(x,u.pendingProps),mP(s,u,x,j,p);case 3:e:{if(ie(u,u.stateNode.containerInfo),s===null)throw Error(r(387));x=u.pendingProps;var k=u.memoizedState;j=k.element,Lw(s,u),xh(u,x,null,p);var M=u.memoizedState;if(x=M.cache,Ks(u,Un,x),x!==k.cache&&Tw(u,[Un],p,!0),yh(),x=M.element,k.isDehydrated)if(k={element:x,isDehydrated:!1,cache:M.cache},u.updateQueue.baseState=k,u.memoizedState=k,u.flags&256){u=pP(s,u,x,p);break e}else if(x!==j){j=Ki(Error(r(424)),u),dh(j),u=pP(s,u,x,p);break e}else{switch(s=u.stateNode.containerInfo,s.nodeType){case 9:s=s.body;break;default:s=s.nodeName==="HTML"?s.ownerDocument.body:s}for(pn=Qi(s.firstChild),Er=u,Ct=!0,qs=null,Gi=!0,p=c2(u,null,x,p),u.child=p;p;)p.flags=p.flags&-3|4096,p=p.sibling}else{if(hu(),x===j){u=Io(s,u,p);break e}_r(s,u,x,p)}u=u.child}return u;case 26:return Jg(s,u),s===null?(p=OM(u.type,null,u.pendingProps,null))?u.memoizedState=p:Ct||(p=u.type,s=u.pendingProps,x=gv(ne.current).createElement(p),x[Dt]=u,x[on]=s,Cr(x,p,s),Fn(x),u.stateNode=x):u.memoizedState=OM(u.type,s.memoizedProps,u.pendingProps,s.memoizedState),null;case 27:return se(u),s===null&&Ct&&(x=u.stateNode=kM(u.type,u.pendingProps,ne.current),Er=u,Gi=!0,j=pn,al(u.type)?(W1=j,pn=Qi(x.firstChild)):pn=j),_r(s,u,u.pendingProps.children,p),Jg(s,u),s===null&&(u.flags|=4194304),u.child;case 5:return s===null&&Ct&&((j=x=pn)&&(x=VG(x,u.type,u.pendingProps,Gi),x!==null?(u.stateNode=x,Er=u,pn=Qi(x.firstChild),Gi=!1,j=!0):j=!1),j||Vs(u)),se(u),j=u.type,k=u.pendingProps,M=s!==null?s.memoizedProps:null,x=k.children,V1(j,k)?x=null:M!==null&&V1(j,M)&&(u.flags|=32),u.memoizedState!==null&&(j=qw(s,u,oG,null,null,p),$h._currentValue=j),Jg(s,u),_r(s,u,x,p),u.child;case 6:return s===null&&Ct&&((s=p=pn)&&(p=KG(p,u.pendingProps,Gi),p!==null?(u.stateNode=p,Er=u,pn=null,s=!0):s=!1),s||Vs(u)),null;case 13:return gP(s,u,p);case 4:return ie(u,u.stateNode.containerInfo),x=u.pendingProps,s===null?u.child=xu(u,null,x,p):_r(s,u,x,p),u.child;case 11:return sP(s,u,u.type,u.pendingProps,p);case 7:return _r(s,u,u.pendingProps,p),u.child;case 8:return _r(s,u,u.pendingProps.children,p),u.child;case 12:return _r(s,u,u.pendingProps.children,p),u.child;case 10:return x=u.pendingProps,Ks(u,u.type,x.value),_r(s,u,x.children,p),u.child;case 9:return j=u.type._context,x=u.pendingProps.children,pu(u),j=jr(j),x=x(j),u.flags|=1,_r(s,u,x,p),u.child;case 14:return lP(s,u,u.type,u.pendingProps,p);case 15:return uP(s,u,u.type,u.pendingProps,p);case 19:return yP(s,u,p);case 31:return mG(s,u,p);case 22:return cP(s,u,p,u.pendingProps);case 24:return pu(u),x=jr(Un),s===null?(j=Dw(),j===null&&(j=sn,k=Pw(),j.pooledCache=k,k.refCount++,k!==null&&(j.pooledCacheLanes|=p),j=k),u.memoizedState={parent:x,cache:j},Iw(u),Ks(u,Un,j)):((s.lanes&p)!==0&&(Lw(s,u),xh(u,null,null,p),yh()),j=s.memoizedState,k=u.memoizedState,j.parent!==x?(j={parent:x,cache:x},u.memoizedState=j,u.lanes===0&&(u.memoizedState=u.updateQueue.baseState=j),Ks(u,Un,x)):(x=k.cache,Ks(u,Un,x),x!==j.cache&&Tw(u,[Un],p,!0))),_r(s,u,u.pendingProps.children,p),u.child;case 29:throw u.pendingProps}throw Error(r(156,u.tag))}function Lo(s){s.flags|=4}function y1(s,u,p,x,j){if((u=(s.mode&32)!==0)&&(u=!1),u){if(s.flags|=16777216,(j&335544128)===j)if(s.stateNode.complete)s.flags|=8192;else if(KP())s.flags|=8192;else throw yu=zg,Rw}else s.flags&=-16777217}function bP(s,u){if(u.type!=="stylesheet"||(u.state.loading&4)!==0)s.flags&=-16777217;else if(s.flags|=16777216,!RM(u))if(KP())s.flags|=8192;else throw yu=zg,Rw}function tv(s,u){u!==null&&(s.flags|=4),s.flags&16384&&(u=s.tag!==22?Ze():536870912,s.lanes|=u,cf|=u)}function _h(s,u){if(!Ct)switch(s.tailMode){case"hidden":u=s.tail;for(var p=null;u!==null;)u.alternate!==null&&(p=u),u=u.sibling;p===null?s.tail=null:p.sibling=null;break;case"collapsed":p=s.tail;for(var x=null;p!==null;)p.alternate!==null&&(x=p),p=p.sibling;x===null?u||s.tail===null?s.tail=null:s.tail.sibling=null:x.sibling=null}}function gn(s){var u=s.alternate!==null&&s.alternate.child===s.child,p=0,x=0;if(u)for(var j=s.child;j!==null;)p|=j.lanes|j.childLanes,x|=j.subtreeFlags&65011712,x|=j.flags&65011712,j.return=s,j=j.sibling;else for(j=s.child;j!==null;)p|=j.lanes|j.childLanes,x|=j.subtreeFlags,x|=j.flags,j.return=s,j=j.sibling;return s.subtreeFlags|=x,s.childLanes=p,u}function gG(s,u,p){var x=u.pendingProps;switch(Cw(u),u.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return gn(u),null;case 1:return gn(u),null;case 3:return p=u.stateNode,x=null,s!==null&&(x=s.memoizedState.cache),u.memoizedState.cache!==x&&(u.flags|=2048),Mo(Un),ee(),p.pendingContext&&(p.context=p.pendingContext,p.pendingContext=null),(s===null||s.child===null)&&(Wc(u)?Lo(u):s===null||s.memoizedState.isDehydrated&&(u.flags&256)===0||(u.flags|=1024,Nw())),gn(u),null;case 26:var j=u.type,k=u.memoizedState;return s===null?(Lo(u),k!==null?(gn(u),bP(u,k)):(gn(u),y1(u,j,null,x,p))):k?k!==s.memoizedState?(Lo(u),gn(u),bP(u,k)):(gn(u),u.flags&=-16777217):(s=s.memoizedProps,s!==x&&Lo(u),gn(u),y1(u,j,s,x,p)),null;case 27:if(pe(u),p=ne.current,j=u.type,s!==null&&u.stateNode!=null)s.memoizedProps!==x&&Lo(u);else{if(!x){if(u.stateNode===null)throw Error(r(166));return gn(u),null}s=Q.current,Wc(u)?JT(u):(s=kM(j,x,p),u.stateNode=s,Lo(u))}return gn(u),null;case 5:if(pe(u),j=u.type,s!==null&&u.stateNode!=null)s.memoizedProps!==x&&Lo(u);else{if(!x){if(u.stateNode===null)throw Error(r(166));return gn(u),null}if(k=Q.current,Wc(u))JT(u);else{var M=gv(ne.current);switch(k){case 1:k=M.createElementNS("http://www.w3.org/2000/svg",j);break;case 2:k=M.createElementNS("http://www.w3.org/1998/Math/MathML",j);break;default:switch(j){case"svg":k=M.createElementNS("http://www.w3.org/2000/svg",j);break;case"math":k=M.createElementNS("http://www.w3.org/1998/Math/MathML",j);break;case"script":k=M.createElement("div"),k.innerHTML="<script><\/script>",k=k.removeChild(k.firstChild);break;case"select":k=typeof x.is=="string"?M.createElement("select",{is:x.is}):M.createElement("select"),x.multiple?k.multiple=!0:x.size&&(k.size=x.size);break;default:k=typeof x.is=="string"?M.createElement(j,{is:x.is}):M.createElement(j)}}k[Dt]=u,k[on]=x;e:for(M=u.child;M!==null;){if(M.tag===5||M.tag===6)k.appendChild(M.stateNode);else if(M.tag!==4&&M.tag!==27&&M.child!==null){M.child.return=M,M=M.child;continue}if(M===u)break e;for(;M.sibling===null;){if(M.return===null||M.return===u)break e;M=M.return}M.sibling.return=M.return,M=M.sibling}u.stateNode=k;e:switch(Cr(k,j,x),j){case"button":case"input":case"select":case"textarea":x=!!x.autoFocus;break e;case"img":x=!0;break e;default:x=!1}x&&Lo(u)}}return gn(u),y1(u,u.type,s===null?null:s.memoizedProps,u.pendingProps,p),null;case 6:if(s&&u.stateNode!=null)s.memoizedProps!==x&&Lo(u);else{if(typeof x!="string"&&u.stateNode===null)throw Error(r(166));if(s=ne.current,Wc(u)){if(s=u.stateNode,p=u.memoizedProps,x=null,j=Er,j!==null)switch(j.tag){case 27:case 5:x=j.memoizedProps}s[Dt]=u,s=!!(s.nodeValue===p||x!==null&&x.suppressHydrationWarning===!0||gM(s.nodeValue,p)),s||Vs(u,!0)}else s=gv(s).createTextNode(x),s[Dt]=u,u.stateNode=s}return gn(u),null;case 31:if(p=u.memoizedState,s===null||s.memoizedState!==null){if(x=Wc(u),p!==null){if(s===null){if(!x)throw Error(r(318));if(s=u.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(557));s[Dt]=u}else hu(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;gn(u),s=!1}else p=Nw(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=p),s=!0;if(!s)return u.flags&256?(_i(u),u):(_i(u),null);if((u.flags&128)!==0)throw Error(r(558))}return gn(u),null;case 13:if(x=u.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(j=Wc(u),x!==null&&x.dehydrated!==null){if(s===null){if(!j)throw Error(r(318));if(j=u.memoizedState,j=j!==null?j.dehydrated:null,!j)throw Error(r(317));j[Dt]=u}else hu(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;gn(u),j=!1}else j=Nw(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=j),j=!0;if(!j)return u.flags&256?(_i(u),u):(_i(u),null)}return _i(u),(u.flags&128)!==0?(u.lanes=p,u):(p=x!==null,s=s!==null&&s.memoizedState!==null,p&&(x=u.child,j=null,x.alternate!==null&&x.alternate.memoizedState!==null&&x.alternate.memoizedState.cachePool!==null&&(j=x.alternate.memoizedState.cachePool.pool),k=null,x.memoizedState!==null&&x.memoizedState.cachePool!==null&&(k=x.memoizedState.cachePool.pool),k!==j&&(x.flags|=2048)),p!==s&&p&&(u.child.flags|=8192),tv(u,u.updateQueue),gn(u),null);case 4:return ee(),s===null&&B1(u.stateNode.containerInfo),gn(u),null;case 10:return Mo(u.type),gn(u),null;case 19:if(U($n),x=u.memoizedState,x===null)return gn(u),null;if(j=(u.flags&128)!==0,k=x.rendering,k===null)if(j)_h(x,!1);else{if(On!==0||s!==null&&(s.flags&128)!==0)for(s=u.child;s!==null;){if(k=Ug(s),k!==null){for(u.flags|=128,_h(x,!1),s=k.updateQueue,u.updateQueue=s,tv(u,s),u.subtreeFlags=0,s=p,p=u.child;p!==null;)XT(p,s),p=p.sibling;return $($n,$n.current&1|2),Ct&&To(u,x.treeForkCount),u.child}s=s.sibling}x.tail!==null&&Mt()>ov&&(u.flags|=128,j=!0,_h(x,!1),u.lanes=4194304)}else{if(!j)if(s=Ug(k),s!==null){if(u.flags|=128,j=!0,s=s.updateQueue,u.updateQueue=s,tv(u,s),_h(x,!0),x.tail===null&&x.tailMode==="hidden"&&!k.alternate&&!Ct)return gn(u),null}else 2*Mt()-x.renderingStartTime>ov&&p!==536870912&&(u.flags|=128,j=!0,_h(x,!1),u.lanes=4194304);x.isBackwards?(k.sibling=u.child,u.child=k):(s=x.last,s!==null?s.sibling=k:u.child=k,x.last=k)}return x.tail!==null?(s=x.tail,x.rendering=s,x.tail=s.sibling,x.renderingStartTime=Mt(),s.sibling=null,p=$n.current,$($n,j?p&1|2:p&1),Ct&&To(u,x.treeForkCount),s):(gn(u),null);case 22:case 23:return _i(u),Fw(),x=u.memoizedState!==null,s!==null?s.memoizedState!==null!==x&&(u.flags|=8192):x&&(u.flags|=8192),x?(p&536870912)!==0&&(u.flags&128)===0&&(gn(u),u.subtreeFlags&6&&(u.flags|=8192)):gn(u),p=u.updateQueue,p!==null&&tv(u,p.retryQueue),p=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(p=s.memoizedState.cachePool.pool),x=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(x=u.memoizedState.cachePool.pool),x!==p&&(u.flags|=2048),s!==null&&U(gu),null;case 24:return p=null,s!==null&&(p=s.memoizedState.cache),u.memoizedState.cache!==p&&(u.flags|=2048),Mo(Un),gn(u),null;case 25:return null;case 30:return null}throw Error(r(156,u.tag))}function vG(s,u){switch(Cw(u),u.tag){case 1:return s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 3:return Mo(Un),ee(),s=u.flags,(s&65536)!==0&&(s&128)===0?(u.flags=s&-65537|128,u):null;case 26:case 27:case 5:return pe(u),null;case 31:if(u.memoizedState!==null){if(_i(u),u.alternate===null)throw Error(r(340));hu()}return s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 13:if(_i(u),s=u.memoizedState,s!==null&&s.dehydrated!==null){if(u.alternate===null)throw Error(r(340));hu()}return s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 19:return U($n),null;case 4:return ee(),null;case 10:return Mo(u.type),null;case 22:case 23:return _i(u),Fw(),s!==null&&U(gu),s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 24:return Mo(Un),null;case 25:return null;default:return null}}function wP(s,u){switch(Cw(u),u.tag){case 3:Mo(Un),ee();break;case 26:case 27:case 5:pe(u);break;case 4:ee();break;case 31:u.memoizedState!==null&&_i(u);break;case 13:_i(u);break;case 19:U($n);break;case 10:Mo(u.type);break;case 22:case 23:_i(u),Fw(),s!==null&&U(gu);break;case 24:Mo(Un)}}function Ch(s,u){try{var p=u.updateQueue,x=p!==null?p.lastEffect:null;if(x!==null){var j=x.next;p=j;do{if((p.tag&s)===s){x=void 0;var k=p.create,M=p.inst;x=k(),M.destroy=x}p=p.next}while(p!==j)}}catch(Y){Yt(u,u.return,Y)}}function Zs(s,u,p){try{var x=u.updateQueue,j=x!==null?x.lastEffect:null;if(j!==null){var k=j.next;x=k;do{if((x.tag&s)===s){var M=x.inst,Y=M.destroy;if(Y!==void 0){M.destroy=void 0,j=u;var Z=p,ce=Y;try{ce()}catch(ve){Yt(j,Z,ve)}}}x=x.next}while(x!==k)}}catch(ve){Yt(u,u.return,ve)}}function SP(s){var u=s.updateQueue;if(u!==null){var p=s.stateNode;try{d2(u,p)}catch(x){Yt(s,s.return,x)}}}function EP(s,u,p){p.props=wu(s.type,s.memoizedProps),p.state=s.memoizedState;try{p.componentWillUnmount()}catch(x){Yt(s,u,x)}}function kh(s,u){try{var p=s.ref;if(p!==null){switch(s.tag){case 26:case 27:case 5:var x=s.stateNode;break;case 30:x=s.stateNode;break;default:x=s.stateNode}typeof p=="function"?s.refCleanup=p(x):p.current=x}}catch(j){Yt(s,u,j)}}function Ga(s,u){var p=s.ref,x=s.refCleanup;if(p!==null)if(typeof x=="function")try{x()}catch(j){Yt(s,u,j)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof p=="function")try{p(null)}catch(j){Yt(s,u,j)}else p.current=null}function jP(s){var u=s.type,p=s.memoizedProps,x=s.stateNode;try{e:switch(u){case"button":case"input":case"select":case"textarea":p.autoFocus&&x.focus();break e;case"img":p.src?x.src=p.src:p.srcSet&&(x.srcset=p.srcSet)}}catch(j){Yt(s,s.return,j)}}function x1(s,u,p){try{var x=s.stateNode;$G(x,s.type,p,u),x[on]=u}catch(j){Yt(s,s.return,j)}}function _P(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&al(s.type)||s.tag===4}function b1(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||_P(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&&al(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 w1(s,u,p){var x=s.tag;if(x===5||x===6)s=s.stateNode,u?(p.nodeType===9?p.body:p.nodeName==="HTML"?p.ownerDocument.body:p).insertBefore(s,u):(u=p.nodeType===9?p.body:p.nodeName==="HTML"?p.ownerDocument.body:p,u.appendChild(s),p=p._reactRootContainer,p!=null||u.onclick!==null||(u.onclick=No));else if(x!==4&&(x===27&&al(s.type)&&(p=s.stateNode,u=null),s=s.child,s!==null))for(w1(s,u,p),s=s.sibling;s!==null;)w1(s,u,p),s=s.sibling}function nv(s,u,p){var x=s.tag;if(x===5||x===6)s=s.stateNode,u?p.insertBefore(s,u):p.appendChild(s);else if(x!==4&&(x===27&&al(s.type)&&(p=s.stateNode),s=s.child,s!==null))for(nv(s,u,p),s=s.sibling;s!==null;)nv(s,u,p),s=s.sibling}function CP(s){var u=s.stateNode,p=s.memoizedProps;try{for(var x=s.type,j=u.attributes;j.length;)u.removeAttributeNode(j[0]);Cr(u,x,p),u[Dt]=s,u[on]=p}catch(k){Yt(s,s.return,k)}}var zo=!1,Vn=!1,S1=!1,kP=typeof WeakSet=="function"?WeakSet:Set,mr=null;function yG(s,u){if(s=s.containerInfo,H1=Ev,s=$T(s),pw(s)){if("selectionStart"in s)var p={start:s.selectionStart,end:s.selectionEnd};else e:{p=(p=s.ownerDocument)&&p.defaultView||window;var x=p.getSelection&&p.getSelection();if(x&&x.rangeCount!==0){p=x.anchorNode;var j=x.anchorOffset,k=x.focusNode;x=x.focusOffset;try{p.nodeType,k.nodeType}catch{p=null;break e}var M=0,Y=-1,Z=-1,ce=0,ve=0,be=s,fe=null;t:for(;;){for(var he;be!==p||j!==0&&be.nodeType!==3||(Y=M+j),be!==k||x!==0&&be.nodeType!==3||(Z=M+x),be.nodeType===3&&(M+=be.nodeValue.length),(he=be.firstChild)!==null;)fe=be,be=he;for(;;){if(be===s)break t;if(fe===p&&++ce===j&&(Y=M),fe===k&&++ve===x&&(Z=M),(he=be.nextSibling)!==null)break;be=fe,fe=be.parentNode}be=he}p=Y===-1||Z===-1?null:{start:Y,end:Z}}else p=null}p=p||{start:0,end:0}}else p=null;for(q1={focusedElem:s,selectionRange:p},Ev=!1,mr=u;mr!==null;)if(u=mr,s=u.child,(u.subtreeFlags&1028)!==0&&s!==null)s.return=u,mr=s;else for(;mr!==null;){switch(u=mr,k=u.alternate,s=u.flags,u.tag){case 0:if((s&4)!==0&&(s=u.updateQueue,s=s!==null?s.events:null,s!==null))for(p=0;p<s.length;p++)j=s[p],j.ref.impl=j.nextImpl;break;case 11:case 15:break;case 1:if((s&1024)!==0&&k!==null){s=void 0,p=u,j=k.memoizedProps,k=k.memoizedState,x=p.stateNode;try{var Re=wu(p.type,j);s=x.getSnapshotBeforeUpdate(Re,k),x.__reactInternalSnapshotBeforeUpdate=s}catch(Je){Yt(p,p.return,Je)}}break;case 3:if((s&1024)!==0){if(s=u.stateNode.containerInfo,p=s.nodeType,p===9)Y1(s);else if(p===1)switch(s.nodeName){case"HEAD":case"HTML":case"BODY":Y1(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(r(163))}if(s=u.sibling,s!==null){s.return=u.return,mr=s;break}mr=u.return}}function NP(s,u,p){var x=p.flags;switch(p.tag){case 0:case 11:case 15:Bo(s,p),x&4&&Ch(5,p);break;case 1:if(Bo(s,p),x&4)if(s=p.stateNode,u===null)try{s.componentDidMount()}catch(M){Yt(p,p.return,M)}else{var j=wu(p.type,u.memoizedProps);u=u.memoizedState;try{s.componentDidUpdate(j,u,s.__reactInternalSnapshotBeforeUpdate)}catch(M){Yt(p,p.return,M)}}x&64&&SP(p),x&512&&kh(p,p.return);break;case 3:if(Bo(s,p),x&64&&(s=p.updateQueue,s!==null)){if(u=null,p.child!==null)switch(p.child.tag){case 27:case 5:u=p.child.stateNode;break;case 1:u=p.child.stateNode}try{d2(s,u)}catch(M){Yt(p,p.return,M)}}break;case 27:u===null&&x&4&&CP(p);case 26:case 5:Bo(s,p),u===null&&x&4&&jP(p),x&512&&kh(p,p.return);break;case 12:Bo(s,p);break;case 31:Bo(s,p),x&4&&TP(s,p);break;case 13:Bo(s,p),x&4&&PP(s,p),x&64&&(s=p.memoizedState,s!==null&&(s=s.dehydrated,s!==null&&(p=kG.bind(null,p),YG(s,p))));break;case 22:if(x=p.memoizedState!==null||zo,!x){u=u!==null&&u.memoizedState!==null||Vn,j=zo;var k=Vn;zo=x,(Vn=u)&&!k?Fo(s,p,(p.subtreeFlags&8772)!==0):Bo(s,p),zo=j,Vn=k}break;case 30:break;default:Bo(s,p)}}function AP(s){var u=s.alternate;u!==null&&(s.alternate=null,AP(u)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(u=s.stateNode,u!==null&&Jd(u)),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 bn=null,li=!1;function $o(s,u,p){for(p=p.child;p!==null;)OP(s,u,p),p=p.sibling}function OP(s,u,p){if(at&&typeof at.onCommitFiberUnmount=="function")try{at.onCommitFiberUnmount(Se,p)}catch{}switch(p.tag){case 26:Vn||Ga(p,u),$o(s,u,p),p.memoizedState?p.memoizedState.count--:p.stateNode&&(p=p.stateNode,p.parentNode.removeChild(p));break;case 27:Vn||Ga(p,u);var x=bn,j=li;al(p.type)&&(bn=p.stateNode,li=!1),$o(s,u,p),Ih(p.stateNode),bn=x,li=j;break;case 5:Vn||Ga(p,u);case 6:if(x=bn,j=li,bn=null,$o(s,u,p),bn=x,li=j,bn!==null)if(li)try{(bn.nodeType===9?bn.body:bn.nodeName==="HTML"?bn.ownerDocument.body:bn).removeChild(p.stateNode)}catch(k){Yt(p,u,k)}else try{bn.removeChild(p.stateNode)}catch(k){Yt(p,u,k)}break;case 18:bn!==null&&(li?(s=bn,SM(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,p.stateNode),yf(s)):SM(bn,p.stateNode));break;case 4:x=bn,j=li,bn=p.stateNode.containerInfo,li=!0,$o(s,u,p),bn=x,li=j;break;case 0:case 11:case 14:case 15:Zs(2,p,u),Vn||Zs(4,p,u),$o(s,u,p);break;case 1:Vn||(Ga(p,u),x=p.stateNode,typeof x.componentWillUnmount=="function"&&EP(p,u,x)),$o(s,u,p);break;case 21:$o(s,u,p);break;case 22:Vn=(x=Vn)||p.memoizedState!==null,$o(s,u,p),Vn=x;break;default:$o(s,u,p)}}function TP(s,u){if(u.memoizedState===null&&(s=u.alternate,s!==null&&(s=s.memoizedState,s!==null))){s=s.dehydrated;try{yf(s)}catch(p){Yt(u,u.return,p)}}}function PP(s,u){if(u.memoizedState===null&&(s=u.alternate,s!==null&&(s=s.memoizedState,s!==null&&(s=s.dehydrated,s!==null))))try{yf(s)}catch(p){Yt(u,u.return,p)}}function xG(s){switch(s.tag){case 31:case 13:case 19:var u=s.stateNode;return u===null&&(u=s.stateNode=new kP),u;case 22:return s=s.stateNode,u=s._retryCache,u===null&&(u=s._retryCache=new kP),u;default:throw Error(r(435,s.tag))}}function rv(s,u){var p=xG(s);u.forEach(function(x){if(!p.has(x)){p.add(x);var j=NG.bind(null,s,x);x.then(j,j)}})}function ui(s,u){var p=u.deletions;if(p!==null)for(var x=0;x<p.length;x++){var j=p[x],k=s,M=u,Y=M;e:for(;Y!==null;){switch(Y.tag){case 27:if(al(Y.type)){bn=Y.stateNode,li=!1;break e}break;case 5:bn=Y.stateNode,li=!1;break e;case 3:case 4:bn=Y.stateNode.containerInfo,li=!0;break e}Y=Y.return}if(bn===null)throw Error(r(160));OP(k,M,j),bn=null,li=!1,k=j.alternate,k!==null&&(k.return=null),j.return=null}if(u.subtreeFlags&13886)for(u=u.child;u!==null;)MP(u,s),u=u.sibling}var xa=null;function MP(s,u){var p=s.alternate,x=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:ui(u,s),ci(s),x&4&&(Zs(3,s,s.return),Ch(3,s),Zs(5,s,s.return));break;case 1:ui(u,s),ci(s),x&512&&(Vn||p===null||Ga(p,p.return)),x&64&&zo&&(s=s.updateQueue,s!==null&&(x=s.callbacks,x!==null&&(p=s.shared.hiddenCallbacks,s.shared.hiddenCallbacks=p===null?x:p.concat(x))));break;case 26:var j=xa;if(ui(u,s),ci(s),x&512&&(Vn||p===null||Ga(p,p.return)),x&4){var k=p!==null?p.memoizedState:null;if(x=s.memoizedState,p===null)if(x===null)if(s.stateNode===null){e:{x=s.type,p=s.memoizedProps,j=j.ownerDocument||j;t:switch(x){case"title":k=j.getElementsByTagName("title")[0],(!k||k[au]||k[Dt]||k.namespaceURI==="http://www.w3.org/2000/svg"||k.hasAttribute("itemprop"))&&(k=j.createElement(x),j.head.insertBefore(k,j.querySelector("head > title"))),Cr(k,x,p),k[Dt]=s,Fn(k),x=k;break e;case"link":var M=MM("link","href",j).get(x+(p.href||""));if(M){for(var Y=0;Y<M.length;Y++)if(k=M[Y],k.getAttribute("href")===(p.href==null||p.href===""?null:p.href)&&k.getAttribute("rel")===(p.rel==null?null:p.rel)&&k.getAttribute("title")===(p.title==null?null:p.title)&&k.getAttribute("crossorigin")===(p.crossOrigin==null?null:p.crossOrigin)){M.splice(Y,1);break t}}k=j.createElement(x),Cr(k,x,p),j.head.appendChild(k);break;case"meta":if(M=MM("meta","content",j).get(x+(p.content||""))){for(Y=0;Y<M.length;Y++)if(k=M[Y],k.getAttribute("content")===(p.content==null?null:""+p.content)&&k.getAttribute("name")===(p.name==null?null:p.name)&&k.getAttribute("property")===(p.property==null?null:p.property)&&k.getAttribute("http-equiv")===(p.httpEquiv==null?null:p.httpEquiv)&&k.getAttribute("charset")===(p.charSet==null?null:p.charSet)){M.splice(Y,1);break t}}k=j.createElement(x),Cr(k,x,p),j.head.appendChild(k);break;default:throw Error(r(468,x))}k[Dt]=s,Fn(k),x=k}s.stateNode=x}else DM(j,s.type,s.stateNode);else s.stateNode=PM(j,x,s.memoizedProps);else k!==x?(k===null?p.stateNode!==null&&(p=p.stateNode,p.parentNode.removeChild(p)):k.count--,x===null?DM(j,s.type,s.stateNode):PM(j,x,s.memoizedProps)):x===null&&s.stateNode!==null&&x1(s,s.memoizedProps,p.memoizedProps)}break;case 27:ui(u,s),ci(s),x&512&&(Vn||p===null||Ga(p,p.return)),p!==null&&x&4&&x1(s,s.memoizedProps,p.memoizedProps);break;case 5:if(ui(u,s),ci(s),x&512&&(Vn||p===null||Ga(p,p.return)),s.flags&32){j=s.stateNode;try{Bc(j,"")}catch(Re){Yt(s,s.return,Re)}}x&4&&s.stateNode!=null&&(j=s.memoizedProps,x1(s,j,p!==null?p.memoizedProps:j)),x&1024&&(S1=!0);break;case 6:if(ui(u,s),ci(s),x&4){if(s.stateNode===null)throw Error(r(162));x=s.memoizedProps,p=s.stateNode;try{p.nodeValue=x}catch(Re){Yt(s,s.return,Re)}}break;case 3:if(xv=null,j=xa,xa=vv(u.containerInfo),ui(u,s),xa=j,ci(s),x&4&&p!==null&&p.memoizedState.isDehydrated)try{yf(u.containerInfo)}catch(Re){Yt(s,s.return,Re)}S1&&(S1=!1,DP(s));break;case 4:x=xa,xa=vv(s.stateNode.containerInfo),ui(u,s),ci(s),xa=x;break;case 12:ui(u,s),ci(s);break;case 31:ui(u,s),ci(s),x&4&&(x=s.updateQueue,x!==null&&(s.updateQueue=null,rv(s,x)));break;case 13:ui(u,s),ci(s),s.child.flags&8192&&s.memoizedState!==null!=(p!==null&&p.memoizedState!==null)&&(av=Mt()),x&4&&(x=s.updateQueue,x!==null&&(s.updateQueue=null,rv(s,x)));break;case 22:j=s.memoizedState!==null;var Z=p!==null&&p.memoizedState!==null,ce=zo,ve=Vn;if(zo=ce||j,Vn=ve||Z,ui(u,s),Vn=ve,zo=ce,ci(s),x&8192)e:for(u=s.stateNode,u._visibility=j?u._visibility&-2:u._visibility|1,j&&(p===null||Z||zo||Vn||Su(s)),p=null,u=s;;){if(u.tag===5||u.tag===26){if(p===null){Z=p=u;try{if(k=Z.stateNode,j)M=k.style,typeof M.setProperty=="function"?M.setProperty("display","none","important"):M.display="none";else{Y=Z.stateNode;var be=Z.memoizedProps.style,fe=be!=null&&be.hasOwnProperty("display")?be.display:null;Y.style.display=fe==null||typeof fe=="boolean"?"":(""+fe).trim()}}catch(Re){Yt(Z,Z.return,Re)}}}else if(u.tag===6){if(p===null){Z=u;try{Z.stateNode.nodeValue=j?"":Z.memoizedProps}catch(Re){Yt(Z,Z.return,Re)}}}else if(u.tag===18){if(p===null){Z=u;try{var he=Z.stateNode;j?EM(he,!0):EM(Z.stateNode,!1)}catch(Re){Yt(Z,Z.return,Re)}}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===s)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===s)break e;for(;u.sibling===null;){if(u.return===null||u.return===s)break e;p===u&&(p=null),u=u.return}p===u&&(p=null),u.sibling.return=u.return,u=u.sibling}x&4&&(x=s.updateQueue,x!==null&&(p=x.retryQueue,p!==null&&(x.retryQueue=null,rv(s,p))));break;case 19:ui(u,s),ci(s),x&4&&(x=s.updateQueue,x!==null&&(s.updateQueue=null,rv(s,x)));break;case 30:break;case 21:break;default:ui(u,s),ci(s)}}function ci(s){var u=s.flags;if(u&2){try{for(var p,x=s.return;x!==null;){if(_P(x)){p=x;break}x=x.return}if(p==null)throw Error(r(160));switch(p.tag){case 27:var j=p.stateNode,k=b1(s);nv(s,k,j);break;case 5:var M=p.stateNode;p.flags&32&&(Bc(M,""),p.flags&=-33);var Y=b1(s);nv(s,Y,M);break;case 3:case 4:var Z=p.stateNode.containerInfo,ce=b1(s);w1(s,ce,Z);break;default:throw Error(r(161))}}catch(ve){Yt(s,s.return,ve)}s.flags&=-3}u&4096&&(s.flags&=-4097)}function DP(s){if(s.subtreeFlags&1024)for(s=s.child;s!==null;){var u=s;DP(u),u.tag===5&&u.flags&1024&&u.stateNode.reset(),s=s.sibling}}function Bo(s,u){if(u.subtreeFlags&8772)for(u=u.child;u!==null;)NP(s,u.alternate,u),u=u.sibling}function Su(s){for(s=s.child;s!==null;){var u=s;switch(u.tag){case 0:case 11:case 14:case 15:Zs(4,u,u.return),Su(u);break;case 1:Ga(u,u.return);var p=u.stateNode;typeof p.componentWillUnmount=="function"&&EP(u,u.return,p),Su(u);break;case 27:Ih(u.stateNode);case 26:case 5:Ga(u,u.return),Su(u);break;case 22:u.memoizedState===null&&Su(u);break;case 30:Su(u);break;default:Su(u)}s=s.sibling}}function Fo(s,u,p){for(p=p&&(u.subtreeFlags&8772)!==0,u=u.child;u!==null;){var x=u.alternate,j=s,k=u,M=k.flags;switch(k.tag){case 0:case 11:case 15:Fo(j,k,p),Ch(4,k);break;case 1:if(Fo(j,k,p),x=k,j=x.stateNode,typeof j.componentDidMount=="function")try{j.componentDidMount()}catch(ce){Yt(x,x.return,ce)}if(x=k,j=x.updateQueue,j!==null){var Y=x.stateNode;try{var Z=j.shared.hiddenCallbacks;if(Z!==null)for(j.shared.hiddenCallbacks=null,j=0;j<Z.length;j++)f2(Z[j],Y)}catch(ce){Yt(x,x.return,ce)}}p&&M&64&&SP(k),kh(k,k.return);break;case 27:CP(k);case 26:case 5:Fo(j,k,p),p&&x===null&&M&4&&jP(k),kh(k,k.return);break;case 12:Fo(j,k,p);break;case 31:Fo(j,k,p),p&&M&4&&TP(j,k);break;case 13:Fo(j,k,p),p&&M&4&&PP(j,k);break;case 22:k.memoizedState===null&&Fo(j,k,p),kh(k,k.return);break;case 30:break;default:Fo(j,k,p)}u=u.sibling}}function E1(s,u){var p=null;s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(p=s.memoizedState.cachePool.pool),s=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(s=u.memoizedState.cachePool.pool),s!==p&&(s!=null&&s.refCount++,p!=null&&hh(p))}function j1(s,u){s=null,u.alternate!==null&&(s=u.alternate.memoizedState.cache),u=u.memoizedState.cache,u!==s&&(u.refCount++,s!=null&&hh(s))}function ba(s,u,p,x){if(u.subtreeFlags&10256)for(u=u.child;u!==null;)RP(s,u,p,x),u=u.sibling}function RP(s,u,p,x){var j=u.flags;switch(u.tag){case 0:case 11:case 15:ba(s,u,p,x),j&2048&&Ch(9,u);break;case 1:ba(s,u,p,x);break;case 3:ba(s,u,p,x),j&2048&&(s=null,u.alternate!==null&&(s=u.alternate.memoizedState.cache),u=u.memoizedState.cache,u!==s&&(u.refCount++,s!=null&&hh(s)));break;case 12:if(j&2048){ba(s,u,p,x),s=u.stateNode;try{var k=u.memoizedProps,M=k.id,Y=k.onPostCommit;typeof Y=="function"&&Y(M,u.alternate===null?"mount":"update",s.passiveEffectDuration,-0)}catch(Z){Yt(u,u.return,Z)}}else ba(s,u,p,x);break;case 31:ba(s,u,p,x);break;case 13:ba(s,u,p,x);break;case 23:break;case 22:k=u.stateNode,M=u.alternate,u.memoizedState!==null?k._visibility&2?ba(s,u,p,x):Nh(s,u):k._visibility&2?ba(s,u,p,x):(k._visibility|=2,sf(s,u,p,x,(u.subtreeFlags&10256)!==0||!1)),j&2048&&E1(M,u);break;case 24:ba(s,u,p,x),j&2048&&j1(u.alternate,u);break;default:ba(s,u,p,x)}}function sf(s,u,p,x,j){for(j=j&&((u.subtreeFlags&10256)!==0||!1),u=u.child;u!==null;){var k=s,M=u,Y=p,Z=x,ce=M.flags;switch(M.tag){case 0:case 11:case 15:sf(k,M,Y,Z,j),Ch(8,M);break;case 23:break;case 22:var ve=M.stateNode;M.memoizedState!==null?ve._visibility&2?sf(k,M,Y,Z,j):Nh(k,M):(ve._visibility|=2,sf(k,M,Y,Z,j)),j&&ce&2048&&E1(M.alternate,M);break;case 24:sf(k,M,Y,Z,j),j&&ce&2048&&j1(M.alternate,M);break;default:sf(k,M,Y,Z,j)}u=u.sibling}}function Nh(s,u){if(u.subtreeFlags&10256)for(u=u.child;u!==null;){var p=s,x=u,j=x.flags;switch(x.tag){case 22:Nh(p,x),j&2048&&E1(x.alternate,x);break;case 24:Nh(p,x),j&2048&&j1(x.alternate,x);break;default:Nh(p,x)}u=u.sibling}}var Ah=8192;function lf(s,u,p){if(s.subtreeFlags&Ah)for(s=s.child;s!==null;)IP(s,u,p),s=s.sibling}function IP(s,u,p){switch(s.tag){case 26:lf(s,u,p),s.flags&Ah&&s.memoizedState!==null&&aW(p,xa,s.memoizedState,s.memoizedProps);break;case 5:lf(s,u,p);break;case 3:case 4:var x=xa;xa=vv(s.stateNode.containerInfo),lf(s,u,p),xa=x;break;case 22:s.memoizedState===null&&(x=s.alternate,x!==null&&x.memoizedState!==null?(x=Ah,Ah=16777216,lf(s,u,p),Ah=x):lf(s,u,p));break;default:lf(s,u,p)}}function LP(s){var u=s.alternate;if(u!==null&&(s=u.child,s!==null)){u.child=null;do u=s.sibling,s.sibling=null,s=u;while(s!==null)}}function Oh(s){var u=s.deletions;if((s.flags&16)!==0){if(u!==null)for(var p=0;p<u.length;p++){var x=u[p];mr=x,$P(x,s)}LP(s)}if(s.subtreeFlags&10256)for(s=s.child;s!==null;)zP(s),s=s.sibling}function zP(s){switch(s.tag){case 0:case 11:case 15:Oh(s),s.flags&2048&&Zs(9,s,s.return);break;case 3:Oh(s);break;case 12:Oh(s);break;case 22:var u=s.stateNode;s.memoizedState!==null&&u._visibility&2&&(s.return===null||s.return.tag!==13)?(u._visibility&=-3,iv(s)):Oh(s);break;default:Oh(s)}}function iv(s){var u=s.deletions;if((s.flags&16)!==0){if(u!==null)for(var p=0;p<u.length;p++){var x=u[p];mr=x,$P(x,s)}LP(s)}for(s=s.child;s!==null;){switch(u=s,u.tag){case 0:case 11:case 15:Zs(8,u,u.return),iv(u);break;case 22:p=u.stateNode,p._visibility&2&&(p._visibility&=-3,iv(u));break;default:iv(u)}s=s.sibling}}function $P(s,u){for(;mr!==null;){var p=mr;switch(p.tag){case 0:case 11:case 15:Zs(8,p,u);break;case 23:case 22:if(p.memoizedState!==null&&p.memoizedState.cachePool!==null){var x=p.memoizedState.cachePool.pool;x!=null&&x.refCount++}break;case 24:hh(p.memoizedState.cache)}if(x=p.child,x!==null)x.return=p,mr=x;else e:for(p=s;mr!==null;){x=mr;var j=x.sibling,k=x.return;if(AP(x),x===p){mr=null;break e}if(j!==null){j.return=k,mr=j;break e}mr=k}}}var bG={getCacheForType:function(s){var u=jr(Un),p=u.data.get(s);return p===void 0&&(p=s(),u.data.set(s,p)),p},cacheSignal:function(){return jr(Un).controller.signal}},wG=typeof WeakMap=="function"?WeakMap:Map,Ft=0,sn=null,yt=null,Et=0,Kt=0,Ci=null,Js=!1,uf=!1,_1=!1,Uo=0,On=0,el=0,Eu=0,C1=0,ki=0,cf=0,Th=null,fi=null,k1=!1,av=0,BP=0,ov=1/0,sv=null,tl=null,er=0,nl=null,ff=null,Ho=0,N1=0,A1=null,FP=null,Ph=0,O1=null;function Ni(){return(Ft&2)!==0&&Et!==0?Et&-Et:D.T!==null?I1():Rs()}function UP(){if(ki===0)if((Et&536870912)===0||Ct){var s=Pr;Pr<<=1,(Pr&3932160)===0&&(Pr=262144),ki=s}else ki=536870912;return s=ji.current,s!==null&&(s.flags|=32),ki}function di(s,u,p){(s===sn&&(Kt===2||Kt===9)||s.cancelPendingCommit!==null)&&(df(s,0),rl(s,Et,ki,!1)),St(s,p),((Ft&2)===0||s!==sn)&&(s===sn&&((Ft&2)===0&&(Eu|=p),On===4&&rl(s,Et,ki,!1)),Wa(s))}function HP(s,u,p){if((Ft&6)!==0)throw Error(r(327));var x=!p&&(u&127)===0&&(u&s.expiredLanes)===0||qt(s,u),j=x?jG(s,u):P1(s,u,!0),k=x;do{if(j===0){uf&&!x&&rl(s,u,0,!1);break}else{if(p=s.current.alternate,k&&!SG(p)){j=P1(s,u,!1),k=!1;continue}if(j===2){if(k=u,s.errorRecoveryDisabledLanes&k)var M=0;else M=s.pendingLanes&-536870913,M=M!==0?M:M&536870912?536870912:0;if(M!==0){u=M;e:{var Y=s;j=Th;var Z=Y.current.memoizedState.isDehydrated;if(Z&&(df(Y,M).flags|=256),M=P1(Y,M,!1),M!==2){if(_1&&!Z){Y.errorRecoveryDisabledLanes|=k,Eu|=k,j=4;break e}k=fi,fi=j,k!==null&&(fi===null?fi=k:fi.push.apply(fi,k))}j=M}if(k=!1,j!==2)continue}}if(j===1){df(s,0),rl(s,u,0,!0);break}e:{switch(x=s,k=j,k){case 0:case 1:throw Error(r(345));case 4:if((u&4194048)!==u)break;case 6:rl(x,u,ki,!Js);break e;case 2:fi=null;break;case 3:case 5:break;default:throw Error(r(329))}if((u&62914560)===u&&(j=av+300-Mt(),10<j)){if(rl(x,u,ki,!Js),Ye(x,0,!0)!==0)break e;Ho=u,x.timeoutHandle=bM(qP.bind(null,x,p,fi,sv,k1,u,ki,Eu,cf,Js,k,"Throttled",-0,0),j);break e}qP(x,p,fi,sv,k1,u,ki,Eu,cf,Js,k,null,-0,0)}}break}while(!0);Wa(s)}function qP(s,u,p,x,j,k,M,Y,Z,ce,ve,be,fe,he){if(s.timeoutHandle=-1,be=u.subtreeFlags,be&8192||(be&16785408)===16785408){be={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:No},IP(u,k,be);var Re=(k&62914560)===k?av-Mt():(k&4194048)===k?BP-Mt():0;if(Re=oW(be,Re),Re!==null){Ho=k,s.cancelPendingCommit=Re(ZP.bind(null,s,u,k,p,x,j,M,Y,Z,ve,be,null,fe,he)),rl(s,k,M,!ce);return}}ZP(s,u,k,p,x,j,M,Y,Z)}function SG(s){for(var u=s;;){var p=u.tag;if((p===0||p===11||p===15)&&u.flags&16384&&(p=u.updateQueue,p!==null&&(p=p.stores,p!==null)))for(var x=0;x<p.length;x++){var j=p[x],k=j.getSnapshot;j=j.value;try{if(!Si(k(),j))return!1}catch{return!1}}if(p=u.child,u.subtreeFlags&16384&&p!==null)p.return=u,u=p;else{if(u===s)break;for(;u.sibling===null;){if(u.return===null||u.return===s)return!0;u=u.return}u.sibling.return=u.return,u=u.sibling}}return!0}function rl(s,u,p,x){u&=~C1,u&=~Eu,s.suspendedLanes|=u,s.pingedLanes&=~u,x&&(s.warmLanes|=u),x=s.expirationTimes;for(var j=u;0<j;){var k=31-st(j),M=1<<k;x[k]=-1,j&=~M}p!==0&&Xr(s,p,u)}function lv(){return(Ft&6)===0?(Mh(0),!1):!0}function T1(){if(yt!==null){if(Kt===0)var s=yt.return;else s=yt,Po=mu=null,Yw(s),tf=null,ph=0,s=yt;for(;s!==null;)wP(s.alternate,s),s=s.return;yt=null}}function df(s,u){var p=s.timeoutHandle;p!==-1&&(s.timeoutHandle=-1,UG(p)),p=s.cancelPendingCommit,p!==null&&(s.cancelPendingCommit=null,p()),Ho=0,T1(),sn=s,yt=p=Oo(s.current,null),Et=u,Kt=0,Ci=null,Js=!1,uf=qt(s,u),_1=!1,cf=ki=C1=Eu=el=On=0,fi=Th=null,k1=!1,(u&8)!==0&&(u|=u&32);var x=s.entangledLanes;if(x!==0)for(s=s.entanglements,x&=u;0<x;){var j=31-st(x),k=1<<j;u|=s[j],x&=~k}return Uo=u,Ag(),p}function VP(s,u){ut=null,D.H=Eh,u===ef||u===Lg?(u=s2(),Kt=3):u===Rw?(u=s2(),Kt=4):Kt=u===u1?8:u!==null&&typeof u=="object"&&typeof u.then=="function"?6:1,Ci=u,yt===null&&(On=1,Qg(s,Ki(u,s.current)))}function KP(){var s=ji.current;return s===null?!0:(Et&4194048)===Et?Wi===null:(Et&62914560)===Et||(Et&536870912)!==0?s===Wi:!1}function YP(){var s=D.H;return D.H=Eh,s===null?Eh:s}function XP(){var s=D.A;return D.A=bG,s}function uv(){On=4,Js||(Et&4194048)!==Et&&ji.current!==null||(uf=!0),(el&134217727)===0&&(Eu&134217727)===0||sn===null||rl(sn,Et,ki,!1)}function P1(s,u,p){var x=Ft;Ft|=2;var j=YP(),k=XP();(sn!==s||Et!==u)&&(sv=null,df(s,u)),u=!1;var M=On;e:do try{if(Kt!==0&&yt!==null){var Y=yt,Z=Ci;switch(Kt){case 8:T1(),M=6;break e;case 3:case 2:case 9:case 6:ji.current===null&&(u=!0);var ce=Kt;if(Kt=0,Ci=null,hf(s,Y,Z,ce),p&&uf){M=0;break e}break;default:ce=Kt,Kt=0,Ci=null,hf(s,Y,Z,ce)}}EG(),M=On;break}catch(ve){VP(s,ve)}while(!0);return u&&s.shellSuspendCounter++,Po=mu=null,Ft=x,D.H=j,D.A=k,yt===null&&(sn=null,Et=0,Ag()),M}function EG(){for(;yt!==null;)GP(yt)}function jG(s,u){var p=Ft;Ft|=2;var x=YP(),j=XP();sn!==s||Et!==u?(sv=null,ov=Mt()+500,df(s,u)):uf=qt(s,u);e:do try{if(Kt!==0&&yt!==null){u=yt;var k=Ci;t:switch(Kt){case 1:Kt=0,Ci=null,hf(s,u,k,1);break;case 2:case 9:if(a2(k)){Kt=0,Ci=null,WP(u);break}u=function(){Kt!==2&&Kt!==9||sn!==s||(Kt=7),Wa(s)},k.then(u,u);break e;case 3:Kt=7;break e;case 4:Kt=5;break e;case 7:a2(k)?(Kt=0,Ci=null,WP(u)):(Kt=0,Ci=null,hf(s,u,k,7));break;case 5:var M=null;switch(yt.tag){case 26:M=yt.memoizedState;case 5:case 27:var Y=yt;if(M?RM(M):Y.stateNode.complete){Kt=0,Ci=null;var Z=Y.sibling;if(Z!==null)yt=Z;else{var ce=Y.return;ce!==null?(yt=ce,cv(ce)):yt=null}break t}}Kt=0,Ci=null,hf(s,u,k,5);break;case 6:Kt=0,Ci=null,hf(s,u,k,6);break;case 8:T1(),On=6;break e;default:throw Error(r(462))}}_G();break}catch(ve){VP(s,ve)}while(!0);return Po=mu=null,D.H=x,D.A=j,Ft=p,yt!==null?0:(sn=null,Et=0,Ag(),On)}function _G(){for(;yt!==null&&!wt();)GP(yt)}function GP(s){var u=xP(s.alternate,s,Uo);s.memoizedProps=s.pendingProps,u===null?cv(s):yt=u}function WP(s){var u=s,p=u.alternate;switch(u.tag){case 15:case 0:u=hP(p,u,u.pendingProps,u.type,void 0,Et);break;case 11:u=hP(p,u,u.pendingProps,u.type.render,u.ref,Et);break;case 5:Yw(u);default:wP(p,u),u=yt=XT(u,Uo),u=xP(p,u,Uo)}s.memoizedProps=s.pendingProps,u===null?cv(s):yt=u}function hf(s,u,p,x){Po=mu=null,Yw(u),tf=null,ph=0;var j=u.return;try{if(hG(s,j,u,p,Et)){On=1,Qg(s,Ki(p,s.current)),yt=null;return}}catch(k){if(j!==null)throw yt=j,k;On=1,Qg(s,Ki(p,s.current)),yt=null;return}u.flags&32768?(Ct||x===1?s=!0:uf||(Et&536870912)!==0?s=!1:(Js=s=!0,(x===2||x===9||x===3||x===6)&&(x=ji.current,x!==null&&x.tag===13&&(x.flags|=16384))),QP(u,s)):cv(u)}function cv(s){var u=s;do{if((u.flags&32768)!==0){QP(u,Js);return}s=u.return;var p=gG(u.alternate,u,Uo);if(p!==null){yt=p;return}if(u=u.sibling,u!==null){yt=u;return}yt=u=s}while(u!==null);On===0&&(On=5)}function QP(s,u){do{var p=vG(s.alternate,s);if(p!==null){p.flags&=32767,yt=p;return}if(p=s.return,p!==null&&(p.flags|=32768,p.subtreeFlags=0,p.deletions=null),!u&&(s=s.sibling,s!==null)){yt=s;return}yt=s=p}while(s!==null);On=6,yt=null}function ZP(s,u,p,x,j,k,M,Y,Z){s.cancelPendingCommit=null;do fv();while(er!==0);if((Ft&6)!==0)throw Error(r(327));if(u!==null){if(u===s.current)throw Error(r(177));if(k=u.lanes|u.childLanes,k|=bw,Nn(s,p,k,M,Y,Z),s===sn&&(yt=sn=null,Et=0),ff=u,nl=s,Ho=p,N1=k,A1=j,FP=x,(u.subtreeFlags&10256)!==0||(u.flags&10256)!==0?(s.callbackNode=null,s.callbackPriority=0,AG(Te,function(){return rM(),null})):(s.callbackNode=null,s.callbackPriority=0),x=(u.flags&13878)!==0,(u.subtreeFlags&13878)!==0||x){x=D.T,D.T=null,j=q.p,q.p=2,M=Ft,Ft|=4;try{yG(s,u,p)}finally{Ft=M,q.p=j,D.T=x}}er=1,JP(),eM(),tM()}}function JP(){if(er===1){er=0;var s=nl,u=ff,p=(u.flags&13878)!==0;if((u.subtreeFlags&13878)!==0||p){p=D.T,D.T=null;var x=q.p;q.p=2;var j=Ft;Ft|=4;try{MP(u,s);var k=q1,M=$T(s.containerInfo),Y=k.focusedElem,Z=k.selectionRange;if(M!==Y&&Y&&Y.ownerDocument&&zT(Y.ownerDocument.documentElement,Y)){if(Z!==null&&pw(Y)){var ce=Z.start,ve=Z.end;if(ve===void 0&&(ve=ce),"selectionStart"in Y)Y.selectionStart=ce,Y.selectionEnd=Math.min(ve,Y.value.length);else{var be=Y.ownerDocument||document,fe=be&&be.defaultView||window;if(fe.getSelection){var he=fe.getSelection(),Re=Y.textContent.length,Je=Math.min(Z.start,Re),Zt=Z.end===void 0?Je:Math.min(Z.end,Re);!he.extend&&Je>Zt&&(M=Zt,Zt=Je,Je=M);var oe=LT(Y,Je),te=LT(Y,Zt);if(oe&&te&&(he.rangeCount!==1||he.anchorNode!==oe.node||he.anchorOffset!==oe.offset||he.focusNode!==te.node||he.focusOffset!==te.offset)){var ue=be.createRange();ue.setStart(oe.node,oe.offset),he.removeAllRanges(),Je>Zt?(he.addRange(ue),he.extend(te.node,te.offset)):(ue.setEnd(te.node,te.offset),he.addRange(ue))}}}}for(be=[],he=Y;he=he.parentNode;)he.nodeType===1&&be.push({element:he,left:he.scrollLeft,top:he.scrollTop});for(typeof Y.focus=="function"&&Y.focus(),Y=0;Y<be.length;Y++){var ye=be[Y];ye.element.scrollLeft=ye.left,ye.element.scrollTop=ye.top}}Ev=!!H1,q1=H1=null}finally{Ft=j,q.p=x,D.T=p}}s.current=u,er=2}}function eM(){if(er===2){er=0;var s=nl,u=ff,p=(u.flags&8772)!==0;if((u.subtreeFlags&8772)!==0||p){p=D.T,D.T=null;var x=q.p;q.p=2;var j=Ft;Ft|=4;try{NP(s,u.alternate,u)}finally{Ft=j,q.p=x,D.T=p}}er=3}}function tM(){if(er===4||er===3){er=0,Xt();var s=nl,u=ff,p=Ho,x=FP;(u.subtreeFlags&10256)!==0||(u.flags&10256)!==0?er=5:(er=0,ff=nl=null,nM(s,s.pendingLanes));var j=s.pendingLanes;if(j===0&&(tl=null),Gr(p),u=u.stateNode,at&&typeof at.onCommitFiberRoot=="function")try{at.onCommitFiberRoot(Se,u,void 0,(u.current.flags&128)===128)}catch{}if(x!==null){u=D.T,j=q.p,q.p=2,D.T=null;try{for(var k=s.onRecoverableError,M=0;M<x.length;M++){var Y=x[M];k(Y.value,{componentStack:Y.stack})}}finally{D.T=u,q.p=j}}(Ho&3)!==0&&fv(),Wa(s),j=s.pendingLanes,(p&261930)!==0&&(j&42)!==0?s===O1?Ph++:(Ph=0,O1=s):Ph=0,Mh(0)}}function nM(s,u){(s.pooledCacheLanes&=u)===0&&(u=s.pooledCache,u!=null&&(s.pooledCache=null,hh(u)))}function fv(){return JP(),eM(),tM(),rM()}function rM(){if(er!==5)return!1;var s=nl,u=N1;N1=0;var p=Gr(Ho),x=D.T,j=q.p;try{q.p=32>p?32:p,D.T=null,p=A1,A1=null;var k=nl,M=Ho;if(er=0,ff=nl=null,Ho=0,(Ft&6)!==0)throw Error(r(331));var Y=Ft;if(Ft|=4,zP(k.current),RP(k,k.current,M,p),Ft=Y,Mh(0,!1),at&&typeof at.onPostCommitFiberRoot=="function")try{at.onPostCommitFiberRoot(Se,k)}catch{}return!0}finally{q.p=j,D.T=x,nM(s,u)}}function iM(s,u,p){u=Ki(p,u),u=l1(s.stateNode,u,2),s=Gs(s,u,2),s!==null&&(St(s,2),Wa(s))}function Yt(s,u,p){if(s.tag===3)iM(s,s,p);else for(;u!==null;){if(u.tag===3){iM(u,s,p);break}else if(u.tag===1){var x=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof x.componentDidCatch=="function"&&(tl===null||!tl.has(x))){s=Ki(p,s),p=aP(2),x=Gs(u,p,2),x!==null&&(oP(p,x,u,s),St(x,2),Wa(x));break}}u=u.return}}function M1(s,u,p){var x=s.pingCache;if(x===null){x=s.pingCache=new wG;var j=new Set;x.set(u,j)}else j=x.get(u),j===void 0&&(j=new Set,x.set(u,j));j.has(p)||(_1=!0,j.add(p),s=CG.bind(null,s,u,p),u.then(s,s))}function CG(s,u,p){var x=s.pingCache;x!==null&&x.delete(u),s.pingedLanes|=s.suspendedLanes&p,s.warmLanes&=~p,sn===s&&(Et&p)===p&&(On===4||On===3&&(Et&62914560)===Et&&300>Mt()-av?(Ft&2)===0&&df(s,0):C1|=p,cf===Et&&(cf=0)),Wa(s)}function aM(s,u){u===0&&(u=Ze()),s=fu(s,u),s!==null&&(St(s,u),Wa(s))}function kG(s){var u=s.memoizedState,p=0;u!==null&&(p=u.retryLane),aM(s,p)}function NG(s,u){var p=0;switch(s.tag){case 31:case 13:var x=s.stateNode,j=s.memoizedState;j!==null&&(p=j.retryLane);break;case 19:x=s.stateNode;break;case 22:x=s.stateNode._retryCache;break;default:throw Error(r(314))}x!==null&&x.delete(u),aM(s,p)}function AG(s,u){return Rt(s,u)}var dv=null,mf=null,D1=!1,hv=!1,R1=!1,il=0;function Wa(s){s!==mf&&s.next===null&&(mf===null?dv=mf=s:mf=mf.next=s),hv=!0,D1||(D1=!0,TG())}function Mh(s,u){if(!R1&&hv){R1=!0;do for(var p=!1,x=dv;x!==null;){if(s!==0){var j=x.pendingLanes;if(j===0)var k=0;else{var M=x.suspendedLanes,Y=x.pingedLanes;k=(1<<31-st(42|s)+1)-1,k&=j&~(M&~Y),k=k&201326741?k&201326741|1:k?k|2:0}k!==0&&(p=!0,uM(x,k))}else k=Et,k=Ye(x,x===sn?k:0,x.cancelPendingCommit!==null||x.timeoutHandle!==-1),(k&3)===0||qt(x,k)||(p=!0,uM(x,k));x=x.next}while(p);R1=!1}}function OG(){oM()}function oM(){hv=D1=!1;var s=0;il!==0&&FG()&&(s=il);for(var u=Mt(),p=null,x=dv;x!==null;){var j=x.next,k=sM(x,u);k===0?(x.next=null,p===null?dv=j:p.next=j,j===null&&(mf=p)):(p=x,(s!==0||(k&3)!==0)&&(hv=!0)),x=j}er!==0&&er!==5||Mh(s),il!==0&&(il=0)}function sM(s,u){for(var p=s.suspendedLanes,x=s.pingedLanes,j=s.expirationTimes,k=s.pendingLanes&-62914561;0<k;){var M=31-st(k),Y=1<<M,Z=j[M];Z===-1?((Y&p)===0||(Y&x)!==0)&&(j[M]=me(Y,u)):Z<=u&&(s.expiredLanes|=Y),k&=~Y}if(u=sn,p=Et,p=Ye(s,s===u?p:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),x=s.callbackNode,p===0||s===u&&(Kt===2||Kt===9)||s.cancelPendingCommit!==null)return x!==null&&x!==null&&ct(x),s.callbackNode=null,s.callbackPriority=0;if((p&3)===0||qt(s,p)){if(u=p&-p,u===s.callbackPriority)return u;switch(x!==null&&ct(x),Gr(p)){case 2:case 8:p=xe;break;case 32:p=Te;break;case 268435456:p=We;break;default:p=Te}return x=lM.bind(null,s),p=Rt(p,x),s.callbackPriority=u,s.callbackNode=p,u}return x!==null&&x!==null&&ct(x),s.callbackPriority=2,s.callbackNode=null,2}function lM(s,u){if(er!==0&&er!==5)return s.callbackNode=null,s.callbackPriority=0,null;var p=s.callbackNode;if(fv()&&s.callbackNode!==p)return null;var x=Et;return x=Ye(s,s===sn?x:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),x===0?null:(HP(s,x,u),sM(s,Mt()),s.callbackNode!=null&&s.callbackNode===p?lM.bind(null,s):null)}function uM(s,u){if(fv())return null;HP(s,u,!0)}function TG(){HG(function(){(Ft&6)!==0?Rt(de,OG):oM()})}function I1(){if(il===0){var s=Zc;s===0&&(s=Yr,Yr<<=1,(Yr&261888)===0&&(Yr=256)),il=s}return il}function cM(s){return s==null||typeof s=="symbol"||typeof s=="boolean"?null:typeof s=="function"?s:wg(""+s)}function fM(s,u){var p=u.ownerDocument.createElement("input");return p.name=u.name,p.value=u.value,s.id&&p.setAttribute("form",s.id),u.parentNode.insertBefore(p,u),s=new FormData(s),p.parentNode.removeChild(p),s}function PG(s,u,p,x,j){if(u==="submit"&&p&&p.stateNode===j){var k=cM((j[on]||null).action),M=x.submitter;M&&(u=(u=M[on]||null)?cM(u.formAction):M.getAttribute("formAction"),u!==null&&(k=u,M=null));var Y=new _g("action","action",null,x,j);s.push({event:Y,listeners:[{instance:null,listener:function(){if(x.defaultPrevented){if(il!==0){var Z=M?fM(j,M):new FormData(j);n1(p,{pending:!0,data:Z,method:j.method,action:k},null,Z)}}else typeof k=="function"&&(Y.preventDefault(),Z=M?fM(j,M):new FormData(j),n1(p,{pending:!0,data:Z,method:j.method,action:k},k,Z))},currentTarget:j}]})}}for(var L1=0;L1<xw.length;L1++){var z1=xw[L1],MG=z1.toLowerCase(),DG=z1[0].toUpperCase()+z1.slice(1);ya(MG,"on"+DG)}ya(UT,"onAnimationEnd"),ya(HT,"onAnimationIteration"),ya(qT,"onAnimationStart"),ya("dblclick","onDoubleClick"),ya("focusin","onFocus"),ya("focusout","onBlur"),ya(WX,"onTransitionRun"),ya(QX,"onTransitionStart"),ya(ZX,"onTransitionCancel"),ya(VT,"onTransitionEnd"),Bs("onMouseEnter",["mouseout","mouseover"]),Bs("onMouseLeave",["mouseout","mouseover"]),Bs("onPointerEnter",["pointerout","pointerover"]),Bs("onPointerLeave",["pointerout","pointerover"]),Co("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Co("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Co("onBeforeInput",["compositionend","keypress","textInput","paste"]),Co("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Co("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Co("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Dh="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(" "),RG=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Dh));function dM(s,u){u=(u&4)!==0;for(var p=0;p<s.length;p++){var x=s[p],j=x.event;x=x.listeners;e:{var k=void 0;if(u)for(var M=x.length-1;0<=M;M--){var Y=x[M],Z=Y.instance,ce=Y.currentTarget;if(Y=Y.listener,Z!==k&&j.isPropagationStopped())break e;k=Y,j.currentTarget=ce;try{k(j)}catch(ve){Ng(ve)}j.currentTarget=null,k=Z}else for(M=0;M<x.length;M++){if(Y=x[M],Z=Y.instance,ce=Y.currentTarget,Y=Y.listener,Z!==k&&j.isPropagationStopped())break e;k=Y,j.currentTarget=ce;try{k(j)}catch(ve){Ng(ve)}j.currentTarget=null,k=Z}}}}function xt(s,u){var p=u[Ka];p===void 0&&(p=u[Ka]=new Set);var x=s+"__bubble";p.has(x)||(hM(u,s,2,!1),p.add(x))}function $1(s,u,p){var x=0;u&&(x|=4),hM(p,s,x,u)}var mv="_reactListening"+Math.random().toString(36).slice(2);function B1(s){if(!s[mv]){s[mv]=!0,pg.forEach(function(p){p!=="selectionchange"&&(RG.has(p)||$1(p,!1,s),$1(p,!0,s))});var u=s.nodeType===9?s:s.ownerDocument;u===null||u[mv]||(u[mv]=!0,$1("selectionchange",!1,u))}}function hM(s,u,p,x){switch(UM(u)){case 2:var j=uW;break;case 8:j=cW;break;default:j=tS}p=j.bind(null,u,p,s),j=void 0,!ow||u!=="touchstart"&&u!=="touchmove"&&u!=="wheel"||(j=!0),x?j!==void 0?s.addEventListener(u,p,{capture:!0,passive:j}):s.addEventListener(u,p,!0):j!==void 0?s.addEventListener(u,p,{passive:j}):s.addEventListener(u,p,!1)}function F1(s,u,p,x,j){var k=x;if((u&1)===0&&(u&2)===0&&x!==null)e:for(;;){if(x===null)return;var M=x.tag;if(M===3||M===4){var Y=x.stateNode.containerInfo;if(Y===j)break;if(M===4)for(M=x.return;M!==null;){var Z=M.tag;if((Z===3||Z===4)&&M.stateNode.containerInfo===j)return;M=M.return}for(;Y!==null;){if(M=Is(Y),M===null)return;if(Z=M.tag,Z===5||Z===6||Z===26||Z===27){x=k=M;continue e}Y=Y.parentNode}}x=x.return}yT(function(){var ce=k,ve=iw(p),be=[];e:{var fe=KT.get(s);if(fe!==void 0){var he=_g,Re=s;switch(s){case"keypress":if(Eg(p)===0)break e;case"keydown":case"keyup":he=NX;break;case"focusin":Re="focus",he=cw;break;case"focusout":Re="blur",he=cw;break;case"beforeblur":case"afterblur":he=cw;break;case"click":if(p.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":he=wT;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":he=gX;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":he=TX;break;case UT:case HT:case qT:he=xX;break;case VT:he=MX;break;case"scroll":case"scrollend":he=mX;break;case"wheel":he=RX;break;case"copy":case"cut":case"paste":he=wX;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":he=ET;break;case"toggle":case"beforetoggle":he=LX}var Je=(u&4)!==0,Zt=!Je&&(s==="scroll"||s==="scrollend"),oe=Je?fe!==null?fe+"Capture":null:fe;Je=[];for(var te=ce,ue;te!==null;){var ye=te;if(ue=ye.stateNode,ye=ye.tag,ye!==5&&ye!==26&&ye!==27||ue===null||oe===null||(ye=nh(te,oe),ye!=null&&Je.push(Rh(te,ye,ue))),Zt)break;te=te.return}0<Je.length&&(fe=new he(fe,Re,null,p,ve),be.push({event:fe,listeners:Je}))}}if((u&7)===0){e:{if(fe=s==="mouseover"||s==="pointerover",he=s==="mouseout"||s==="pointerout",fe&&p!==rw&&(Re=p.relatedTarget||p.fromElement)&&(Is(Re)||Re[ga]))break e;if((he||fe)&&(fe=ve.window===ve?ve:(fe=ve.ownerDocument)?fe.defaultView||fe.parentWindow:window,he?(Re=p.relatedTarget||p.toElement,he=ce,Re=Re?Is(Re):null,Re!==null&&(Zt=a(Re),Je=Re.tag,Re!==Zt||Je!==5&&Je!==27&&Je!==6)&&(Re=null)):(he=null,Re=ce),he!==Re)){if(Je=wT,ye="onMouseLeave",oe="onMouseEnter",te="mouse",(s==="pointerout"||s==="pointerover")&&(Je=ET,ye="onPointerLeave",oe="onPointerEnter",te="pointer"),Zt=he==null?fe:zs(he),ue=Re==null?fe:zs(Re),fe=new Je(ye,te+"leave",he,p,ve),fe.target=Zt,fe.relatedTarget=ue,ye=null,Is(ve)===ce&&(Je=new Je(oe,te+"enter",Re,p,ve),Je.target=ue,Je.relatedTarget=Zt,ye=Je),Zt=ye,he&&Re)t:{for(Je=IG,oe=he,te=Re,ue=0,ye=oe;ye;ye=Je(ye))ue++;ye=0;for(var Ve=te;Ve;Ve=Je(Ve))ye++;for(;0<ue-ye;)oe=Je(oe),ue--;for(;0<ye-ue;)te=Je(te),ye--;for(;ue--;){if(oe===te||te!==null&&oe===te.alternate){Je=oe;break t}oe=Je(oe),te=Je(te)}Je=null}else Je=null;he!==null&&mM(be,fe,he,Je,!1),Re!==null&&Zt!==null&&mM(be,Zt,Re,Je,!0)}}e:{if(fe=ce?zs(ce):window,he=fe.nodeName&&fe.nodeName.toLowerCase(),he==="select"||he==="input"&&fe.type==="file")var It=TT;else if(AT(fe))if(PT)It=YX;else{It=VX;var Be=qX}else he=fe.nodeName,!he||he.toLowerCase()!=="input"||fe.type!=="checkbox"&&fe.type!=="radio"?ce&&nw(ce.elementType)&&(It=TT):It=KX;if(It&&(It=It(s,ce))){OT(be,It,p,ve);break e}Be&&Be(s,fe,ce),s==="focusout"&&ce&&fe.type==="number"&&ce.memoizedProps.value!=null&&th(fe,"number",fe.value)}switch(Be=ce?zs(ce):window,s){case"focusin":(AT(Be)||Be.contentEditable==="true")&&(qc=Be,gw=ce,ch=null);break;case"focusout":ch=gw=qc=null;break;case"mousedown":vw=!0;break;case"contextmenu":case"mouseup":case"dragend":vw=!1,BT(be,p,ve);break;case"selectionchange":if(GX)break;case"keydown":case"keyup":BT(be,p,ve)}var dt;if(dw)e:{switch(s){case"compositionstart":var jt="onCompositionStart";break e;case"compositionend":jt="onCompositionEnd";break e;case"compositionupdate":jt="onCompositionUpdate";break e}jt=void 0}else Hc?kT(s,p)&&(jt="onCompositionEnd"):s==="keydown"&&p.keyCode===229&&(jt="onCompositionStart");jt&&(jT&&p.locale!=="ko"&&(Hc||jt!=="onCompositionStart"?jt==="onCompositionEnd"&&Hc&&(dt=xT()):(Us=ve,sw="value"in Us?Us.value:Us.textContent,Hc=!0)),Be=pv(ce,jt),0<Be.length&&(jt=new ST(jt,s,null,p,ve),be.push({event:jt,listeners:Be}),dt?jt.data=dt:(dt=NT(p),dt!==null&&(jt.data=dt)))),(dt=$X?BX(s,p):FX(s,p))&&(jt=pv(ce,"onBeforeInput"),0<jt.length&&(Be=new ST("onBeforeInput","beforeinput",null,p,ve),be.push({event:Be,listeners:jt}),Be.data=dt)),PG(be,s,ce,p,ve)}dM(be,u)})}function Rh(s,u,p){return{instance:s,listener:u,currentTarget:p}}function pv(s,u){for(var p=u+"Capture",x=[];s!==null;){var j=s,k=j.stateNode;if(j=j.tag,j!==5&&j!==26&&j!==27||k===null||(j=nh(s,p),j!=null&&x.unshift(Rh(s,j,k)),j=nh(s,u),j!=null&&x.push(Rh(s,j,k))),s.tag===3)return x;s=s.return}return[]}function IG(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5&&s.tag!==27);return s||null}function mM(s,u,p,x,j){for(var k=u._reactName,M=[];p!==null&&p!==x;){var Y=p,Z=Y.alternate,ce=Y.stateNode;if(Y=Y.tag,Z!==null&&Z===x)break;Y!==5&&Y!==26&&Y!==27||ce===null||(Z=ce,j?(ce=nh(p,k),ce!=null&&M.unshift(Rh(p,ce,Z))):j||(ce=nh(p,k),ce!=null&&M.push(Rh(p,ce,Z)))),p=p.return}M.length!==0&&s.push({event:u,listeners:M})}var LG=/\r\n?/g,zG=/\u0000|\uFFFD/g;function pM(s){return(typeof s=="string"?s:""+s).replace(LG,`
`).replace(zG,"")}function gM(s,u){return u=pM(u),pM(s)===u}function Qt(s,u,p,x,j,k){switch(p){case"children":typeof x=="string"?u==="body"||u==="textarea"&&x===""||Bc(s,x):(typeof x=="number"||typeof x=="bigint")&&u!=="body"&&Bc(s,""+x);break;case"className":$c(s,"class",x);break;case"tabIndex":$c(s,"tabindex",x);break;case"dir":case"role":case"viewBox":case"width":case"height":$c(s,p,x);break;case"style":gT(s,x,k);break;case"data":if(u!=="object"){$c(s,"data",x);break}case"src":case"href":if(x===""&&(u!=="a"||p!=="href")){s.removeAttribute(p);break}if(x==null||typeof x=="function"||typeof x=="symbol"||typeof x=="boolean"){s.removeAttribute(p);break}x=wg(""+x),s.setAttribute(p,x);break;case"action":case"formAction":if(typeof x=="function"){s.setAttribute(p,"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 k=="function"&&(p==="formAction"?(u!=="input"&&Qt(s,u,"name",j.name,j,null),Qt(s,u,"formEncType",j.formEncType,j,null),Qt(s,u,"formMethod",j.formMethod,j,null),Qt(s,u,"formTarget",j.formTarget,j,null)):(Qt(s,u,"encType",j.encType,j,null),Qt(s,u,"method",j.method,j,null),Qt(s,u,"target",j.target,j,null)));if(x==null||typeof x=="symbol"||typeof x=="boolean"){s.removeAttribute(p);break}x=wg(""+x),s.setAttribute(p,x);break;case"onClick":x!=null&&(s.onclick=No);break;case"onScroll":x!=null&&xt("scroll",s);break;case"onScrollEnd":x!=null&&xt("scrollend",s);break;case"dangerouslySetInnerHTML":if(x!=null){if(typeof x!="object"||!("__html"in x))throw Error(r(61));if(p=x.__html,p!=null){if(j.children!=null)throw Error(r(60));s.innerHTML=p}}break;case"multiple":s.multiple=x&&typeof x!="function"&&typeof x!="symbol";break;case"muted":s.muted=x&&typeof x!="function"&&typeof x!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(x==null||typeof x=="function"||typeof x=="boolean"||typeof x=="symbol"){s.removeAttribute("xlink:href");break}p=wg(""+x),s.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",p);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":x!=null&&typeof x!="function"&&typeof x!="symbol"?s.setAttribute(p,""+x):s.removeAttribute(p);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":x&&typeof x!="function"&&typeof x!="symbol"?s.setAttribute(p,""):s.removeAttribute(p);break;case"capture":case"download":x===!0?s.setAttribute(p,""):x!==!1&&x!=null&&typeof x!="function"&&typeof x!="symbol"?s.setAttribute(p,x):s.removeAttribute(p);break;case"cols":case"rows":case"size":case"span":x!=null&&typeof x!="function"&&typeof x!="symbol"&&!isNaN(x)&&1<=x?s.setAttribute(p,x):s.removeAttribute(p);break;case"rowSpan":case"start":x==null||typeof x=="function"||typeof x=="symbol"||isNaN(x)?s.removeAttribute(p):s.setAttribute(p,x);break;case"popover":xt("beforetoggle",s),xt("toggle",s),zc(s,"popover",x);break;case"xlinkActuate":va(s,"http://www.w3.org/1999/xlink","xlink:actuate",x);break;case"xlinkArcrole":va(s,"http://www.w3.org/1999/xlink","xlink:arcrole",x);break;case"xlinkRole":va(s,"http://www.w3.org/1999/xlink","xlink:role",x);break;case"xlinkShow":va(s,"http://www.w3.org/1999/xlink","xlink:show",x);break;case"xlinkTitle":va(s,"http://www.w3.org/1999/xlink","xlink:title",x);break;case"xlinkType":va(s,"http://www.w3.org/1999/xlink","xlink:type",x);break;case"xmlBase":va(s,"http://www.w3.org/XML/1998/namespace","xml:base",x);break;case"xmlLang":va(s,"http://www.w3.org/XML/1998/namespace","xml:lang",x);break;case"xmlSpace":va(s,"http://www.w3.org/XML/1998/namespace","xml:space",x);break;case"is":zc(s,"is",x);break;case"innerText":case"textContent":break;default:(!(2<p.length)||p[0]!=="o"&&p[0]!=="O"||p[1]!=="n"&&p[1]!=="N")&&(p=dX.get(p)||p,zc(s,p,x))}}function U1(s,u,p,x,j,k){switch(p){case"style":gT(s,x,k);break;case"dangerouslySetInnerHTML":if(x!=null){if(typeof x!="object"||!("__html"in x))throw Error(r(61));if(p=x.__html,p!=null){if(j.children!=null)throw Error(r(60));s.innerHTML=p}}break;case"children":typeof x=="string"?Bc(s,x):(typeof x=="number"||typeof x=="bigint")&&Bc(s,""+x);break;case"onScroll":x!=null&&xt("scroll",s);break;case"onScrollEnd":x!=null&&xt("scrollend",s);break;case"onClick":x!=null&&(s.onclick=No);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!gg.hasOwnProperty(p))e:{if(p[0]==="o"&&p[1]==="n"&&(j=p.endsWith("Capture"),u=p.slice(2,j?p.length-7:void 0),k=s[on]||null,k=k!=null?k[p]:null,typeof k=="function"&&s.removeEventListener(u,k,j),typeof x=="function")){typeof k!="function"&&k!==null&&(p in s?s[p]=null:s.hasAttribute(p)&&s.removeAttribute(p)),s.addEventListener(u,x,j);break e}p in s?s[p]=x:x===!0?s.setAttribute(p,""):zc(s,p,x)}}}function Cr(s,u,p){switch(u){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":xt("error",s),xt("load",s);var x=!1,j=!1,k;for(k in p)if(p.hasOwnProperty(k)){var M=p[k];if(M!=null)switch(k){case"src":x=!0;break;case"srcSet":j=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,u));default:Qt(s,u,k,M,p,null)}}j&&Qt(s,u,"srcSet",p.srcSet,p,null),x&&Qt(s,u,"src",p.src,p,null);return;case"input":xt("invalid",s);var Y=k=M=j=null,Z=null,ce=null;for(x in p)if(p.hasOwnProperty(x)){var ve=p[x];if(ve!=null)switch(x){case"name":j=ve;break;case"type":M=ve;break;case"checked":Z=ve;break;case"defaultChecked":ce=ve;break;case"value":k=ve;break;case"defaultValue":Y=ve;break;case"children":case"dangerouslySetInnerHTML":if(ve!=null)throw Error(r(137,u));break;default:Qt(s,u,x,ve,p,null)}}bg(s,k,Y,Z,ce,M,j,!1);return;case"select":xt("invalid",s),x=M=k=null;for(j in p)if(p.hasOwnProperty(j)&&(Y=p[j],Y!=null))switch(j){case"value":k=Y;break;case"defaultValue":M=Y;break;case"multiple":x=Y;default:Qt(s,u,j,Y,p,null)}u=k,p=M,s.multiple=!!x,u!=null?ko(s,!!x,u,!1):p!=null&&ko(s,!!x,p,!0);return;case"textarea":xt("invalid",s),k=j=x=null;for(M in p)if(p.hasOwnProperty(M)&&(Y=p[M],Y!=null))switch(M){case"value":x=Y;break;case"defaultValue":j=Y;break;case"children":k=Y;break;case"dangerouslySetInnerHTML":if(Y!=null)throw Error(r(91));break;default:Qt(s,u,M,Y,p,null)}mT(s,x,j,k);return;case"option":for(Z in p)if(p.hasOwnProperty(Z)&&(x=p[Z],x!=null))switch(Z){case"selected":s.selected=x&&typeof x!="function"&&typeof x!="symbol";break;default:Qt(s,u,Z,x,p,null)}return;case"dialog":xt("beforetoggle",s),xt("toggle",s),xt("cancel",s),xt("close",s);break;case"iframe":case"object":xt("load",s);break;case"video":case"audio":for(x=0;x<Dh.length;x++)xt(Dh[x],s);break;case"image":xt("error",s),xt("load",s);break;case"details":xt("toggle",s);break;case"embed":case"source":case"link":xt("error",s),xt("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(ce in p)if(p.hasOwnProperty(ce)&&(x=p[ce],x!=null))switch(ce){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,u));default:Qt(s,u,ce,x,p,null)}return;default:if(nw(u)){for(ve in p)p.hasOwnProperty(ve)&&(x=p[ve],x!==void 0&&U1(s,u,ve,x,p,void 0));return}}for(Y in p)p.hasOwnProperty(Y)&&(x=p[Y],x!=null&&Qt(s,u,Y,x,p,null))}function $G(s,u,p,x){switch(u){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var j=null,k=null,M=null,Y=null,Z=null,ce=null,ve=null;for(he in p){var be=p[he];if(p.hasOwnProperty(he)&&be!=null)switch(he){case"checked":break;case"value":break;case"defaultValue":Z=be;default:x.hasOwnProperty(he)||Qt(s,u,he,null,x,be)}}for(var fe in x){var he=x[fe];if(be=p[fe],x.hasOwnProperty(fe)&&(he!=null||be!=null))switch(fe){case"type":k=he;break;case"name":j=he;break;case"checked":ce=he;break;case"defaultChecked":ve=he;break;case"value":M=he;break;case"defaultValue":Y=he;break;case"children":case"dangerouslySetInnerHTML":if(he!=null)throw Error(r(137,u));break;default:he!==be&&Qt(s,u,fe,he,x,be)}}su(s,M,Y,Z,ce,ve,k,j);return;case"select":he=M=Y=fe=null;for(k in p)if(Z=p[k],p.hasOwnProperty(k)&&Z!=null)switch(k){case"value":break;case"multiple":he=Z;default:x.hasOwnProperty(k)||Qt(s,u,k,null,x,Z)}for(j in x)if(k=x[j],Z=p[j],x.hasOwnProperty(j)&&(k!=null||Z!=null))switch(j){case"value":fe=k;break;case"defaultValue":Y=k;break;case"multiple":M=k;default:k!==Z&&Qt(s,u,j,k,x,Z)}u=Y,p=M,x=he,fe!=null?ko(s,!!p,fe,!1):!!x!=!!p&&(u!=null?ko(s,!!p,u,!0):ko(s,!!p,p?[]:"",!1));return;case"textarea":he=fe=null;for(Y in p)if(j=p[Y],p.hasOwnProperty(Y)&&j!=null&&!x.hasOwnProperty(Y))switch(Y){case"value":break;case"children":break;default:Qt(s,u,Y,null,x,j)}for(M in x)if(j=x[M],k=p[M],x.hasOwnProperty(M)&&(j!=null||k!=null))switch(M){case"value":fe=j;break;case"defaultValue":he=j;break;case"children":break;case"dangerouslySetInnerHTML":if(j!=null)throw Error(r(91));break;default:j!==k&&Qt(s,u,M,j,x,k)}hT(s,fe,he);return;case"option":for(var Re in p)if(fe=p[Re],p.hasOwnProperty(Re)&&fe!=null&&!x.hasOwnProperty(Re))switch(Re){case"selected":s.selected=!1;break;default:Qt(s,u,Re,null,x,fe)}for(Z in x)if(fe=x[Z],he=p[Z],x.hasOwnProperty(Z)&&fe!==he&&(fe!=null||he!=null))switch(Z){case"selected":s.selected=fe&&typeof fe!="function"&&typeof fe!="symbol";break;default:Qt(s,u,Z,fe,x,he)}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 Je in p)fe=p[Je],p.hasOwnProperty(Je)&&fe!=null&&!x.hasOwnProperty(Je)&&Qt(s,u,Je,null,x,fe);for(ce in x)if(fe=x[ce],he=p[ce],x.hasOwnProperty(ce)&&fe!==he&&(fe!=null||he!=null))switch(ce){case"children":case"dangerouslySetInnerHTML":if(fe!=null)throw Error(r(137,u));break;default:Qt(s,u,ce,fe,x,he)}return;default:if(nw(u)){for(var Zt in p)fe=p[Zt],p.hasOwnProperty(Zt)&&fe!==void 0&&!x.hasOwnProperty(Zt)&&U1(s,u,Zt,void 0,x,fe);for(ve in x)fe=x[ve],he=p[ve],!x.hasOwnProperty(ve)||fe===he||fe===void 0&&he===void 0||U1(s,u,ve,fe,x,he);return}}for(var oe in p)fe=p[oe],p.hasOwnProperty(oe)&&fe!=null&&!x.hasOwnProperty(oe)&&Qt(s,u,oe,null,x,fe);for(be in x)fe=x[be],he=p[be],!x.hasOwnProperty(be)||fe===he||fe==null&&he==null||Qt(s,u,be,fe,x,he)}function vM(s){switch(s){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function BG(){if(typeof performance.getEntriesByType=="function"){for(var s=0,u=0,p=performance.getEntriesByType("resource"),x=0;x<p.length;x++){var j=p[x],k=j.transferSize,M=j.initiatorType,Y=j.duration;if(k&&Y&&vM(M)){for(M=0,Y=j.responseEnd,x+=1;x<p.length;x++){var Z=p[x],ce=Z.startTime;if(ce>Y)break;var ve=Z.transferSize,be=Z.initiatorType;ve&&vM(be)&&(Z=Z.responseEnd,M+=ve*(Z<Y?1:(Y-ce)/(Z-ce)))}if(--x,u+=8*(k+M)/(j.duration/1e3),s++,10<s)break}}if(0<s)return u/s/1e6}return navigator.connection&&(s=navigator.connection.downlink,typeof s=="number")?s:5}var H1=null,q1=null;function gv(s){return s.nodeType===9?s:s.ownerDocument}function yM(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 xM(s,u){if(s===0)switch(u){case"svg":return 1;case"math":return 2;default:return 0}return s===1&&u==="foreignObject"?0:s}function V1(s,u){return s==="textarea"||s==="noscript"||typeof u.children=="string"||typeof u.children=="number"||typeof u.children=="bigint"||typeof u.dangerouslySetInnerHTML=="object"&&u.dangerouslySetInnerHTML!==null&&u.dangerouslySetInnerHTML.__html!=null}var K1=null;function FG(){var s=window.event;return s&&s.type==="popstate"?s===K1?!1:(K1=s,!0):(K1=null,!1)}var bM=typeof setTimeout=="function"?setTimeout:void 0,UG=typeof clearTimeout=="function"?clearTimeout:void 0,wM=typeof Promise=="function"?Promise:void 0,HG=typeof queueMicrotask=="function"?queueMicrotask:typeof wM<"u"?function(s){return wM.resolve(null).then(s).catch(qG)}:bM;function qG(s){setTimeout(function(){throw s})}function al(s){return s==="head"}function SM(s,u){var p=u,x=0;do{var j=p.nextSibling;if(s.removeChild(p),j&&j.nodeType===8)if(p=j.data,p==="/$"||p==="/&"){if(x===0){s.removeChild(j),yf(u);return}x--}else if(p==="$"||p==="$?"||p==="$~"||p==="$!"||p==="&")x++;else if(p==="html")Ih(s.ownerDocument.documentElement);else if(p==="head"){p=s.ownerDocument.head,Ih(p);for(var k=p.firstChild;k;){var M=k.nextSibling,Y=k.nodeName;k[au]||Y==="SCRIPT"||Y==="STYLE"||Y==="LINK"&&k.rel.toLowerCase()==="stylesheet"||p.removeChild(k),k=M}}else p==="body"&&Ih(s.ownerDocument.body);p=j}while(p);yf(u)}function EM(s,u){var p=s;s=0;do{var x=p.nextSibling;if(p.nodeType===1?u?(p._stashedDisplay=p.style.display,p.style.display="none"):(p.style.display=p._stashedDisplay||"",p.getAttribute("style")===""&&p.removeAttribute("style")):p.nodeType===3&&(u?(p._stashedText=p.nodeValue,p.nodeValue=""):p.nodeValue=p._stashedText||""),x&&x.nodeType===8)if(p=x.data,p==="/$"){if(s===0)break;s--}else p!=="$"&&p!=="$?"&&p!=="$~"&&p!=="$!"||s++;p=x}while(p)}function Y1(s){var u=s.firstChild;for(u&&u.nodeType===10&&(u=u.nextSibling);u;){var p=u;switch(u=u.nextSibling,p.nodeName){case"HTML":case"HEAD":case"BODY":Y1(p),Jd(p);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(p.rel.toLowerCase()==="stylesheet")continue}s.removeChild(p)}}function VG(s,u,p,x){for(;s.nodeType===1;){var j=p;if(s.nodeName.toLowerCase()!==u.toLowerCase()){if(!x&&(s.nodeName!=="INPUT"||s.type!=="hidden"))break}else if(x){if(!s[au])switch(u){case"meta":if(!s.hasAttribute("itemprop"))break;return s;case"link":if(k=s.getAttribute("rel"),k==="stylesheet"&&s.hasAttribute("data-precedence"))break;if(k!==j.rel||s.getAttribute("href")!==(j.href==null||j.href===""?null:j.href)||s.getAttribute("crossorigin")!==(j.crossOrigin==null?null:j.crossOrigin)||s.getAttribute("title")!==(j.title==null?null:j.title))break;return s;case"style":if(s.hasAttribute("data-precedence"))break;return s;case"script":if(k=s.getAttribute("src"),(k!==(j.src==null?null:j.src)||s.getAttribute("type")!==(j.type==null?null:j.type)||s.getAttribute("crossorigin")!==(j.crossOrigin==null?null:j.crossOrigin))&&k&&s.hasAttribute("async")&&!s.hasAttribute("itemprop"))break;return s;default:return s}}else if(u==="input"&&s.type==="hidden"){var k=j.name==null?null:""+j.name;if(j.type==="hidden"&&s.getAttribute("name")===k)return s}else return s;if(s=Qi(s.nextSibling),s===null)break}return null}function KG(s,u,p){if(u==="")return null;for(;s.nodeType!==3;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!p||(s=Qi(s.nextSibling),s===null))return null;return s}function jM(s,u){for(;s.nodeType!==8;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!u||(s=Qi(s.nextSibling),s===null))return null;return s}function X1(s){return s.data==="$?"||s.data==="$~"}function G1(s){return s.data==="$!"||s.data==="$?"&&s.ownerDocument.readyState!=="loading"}function YG(s,u){var p=s.ownerDocument;if(s.data==="$~")s._reactRetry=u;else if(s.data!=="$?"||p.readyState!=="loading")u();else{var x=function(){u(),p.removeEventListener("DOMContentLoaded",x)};p.addEventListener("DOMContentLoaded",x),s._reactRetry=x}}function Qi(s){for(;s!=null;s=s.nextSibling){var u=s.nodeType;if(u===1||u===3)break;if(u===8){if(u=s.data,u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"||u==="F!"||u==="F")break;if(u==="/$"||u==="/&")return null}}return s}var W1=null;function _M(s){s=s.nextSibling;for(var u=0;s;){if(s.nodeType===8){var p=s.data;if(p==="/$"||p==="/&"){if(u===0)return Qi(s.nextSibling);u--}else p!=="$"&&p!=="$!"&&p!=="$?"&&p!=="$~"&&p!=="&"||u++}s=s.nextSibling}return null}function CM(s){s=s.previousSibling;for(var u=0;s;){if(s.nodeType===8){var p=s.data;if(p==="$"||p==="$!"||p==="$?"||p==="$~"||p==="&"){if(u===0)return s;u--}else p!=="/$"&&p!=="/&"||u++}s=s.previousSibling}return null}function kM(s,u,p){switch(u=gv(p),s){case"html":if(s=u.documentElement,!s)throw Error(r(452));return s;case"head":if(s=u.head,!s)throw Error(r(453));return s;case"body":if(s=u.body,!s)throw Error(r(454));return s;default:throw Error(r(451))}}function Ih(s){for(var u=s.attributes;u.length;)s.removeAttributeNode(u[0]);Jd(s)}var Zi=new Map,NM=new Set;function vv(s){return typeof s.getRootNode=="function"?s.getRootNode():s.nodeType===9?s:s.ownerDocument}var qo=q.d;q.d={f:XG,r:GG,D:WG,C:QG,L:ZG,m:JG,X:tW,S:eW,M:nW};function XG(){var s=qo.f(),u=lv();return s||u}function GG(s){var u=Ls(s);u!==null&&u.tag===5&&u.type==="form"?V2(u):qo.r(s)}var pf=typeof document>"u"?null:document;function AM(s,u,p){var x=pf;if(x&&typeof u=="string"&&u){var j=oi(u);j='link[rel="'+s+'"][href="'+j+'"]',typeof p=="string"&&(j+='[crossorigin="'+p+'"]'),NM.has(j)||(NM.add(j),s={rel:s,crossOrigin:p,href:u},x.querySelector(j)===null&&(u=x.createElement("link"),Cr(u,"link",s),Fn(u),x.head.appendChild(u)))}}function WG(s){qo.D(s),AM("dns-prefetch",s,null)}function QG(s,u){qo.C(s,u),AM("preconnect",s,u)}function ZG(s,u,p){qo.L(s,u,p);var x=pf;if(x&&s&&u){var j='link[rel="preload"][as="'+oi(u)+'"]';u==="image"&&p&&p.imageSrcSet?(j+='[imagesrcset="'+oi(p.imageSrcSet)+'"]',typeof p.imageSizes=="string"&&(j+='[imagesizes="'+oi(p.imageSizes)+'"]')):j+='[href="'+oi(s)+'"]';var k=j;switch(u){case"style":k=gf(s);break;case"script":k=vf(s)}Zi.has(k)||(s=d({rel:"preload",href:u==="image"&&p&&p.imageSrcSet?void 0:s,as:u},p),Zi.set(k,s),x.querySelector(j)!==null||u==="style"&&x.querySelector(Lh(k))||u==="script"&&x.querySelector(zh(k))||(u=x.createElement("link"),Cr(u,"link",s),Fn(u),x.head.appendChild(u)))}}function JG(s,u){qo.m(s,u);var p=pf;if(p&&s){var x=u&&typeof u.as=="string"?u.as:"script",j='link[rel="modulepreload"][as="'+oi(x)+'"][href="'+oi(s)+'"]',k=j;switch(x){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":k=vf(s)}if(!Zi.has(k)&&(s=d({rel:"modulepreload",href:s},u),Zi.set(k,s),p.querySelector(j)===null)){switch(x){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(p.querySelector(zh(k)))return}x=p.createElement("link"),Cr(x,"link",s),Fn(x),p.head.appendChild(x)}}}function eW(s,u,p){qo.S(s,u,p);var x=pf;if(x&&s){var j=$s(x).hoistableStyles,k=gf(s);u=u||"default";var M=j.get(k);if(!M){var Y={loading:0,preload:null};if(M=x.querySelector(Lh(k)))Y.loading=5;else{s=d({rel:"stylesheet",href:s,"data-precedence":u},p),(p=Zi.get(k))&&Q1(s,p);var Z=M=x.createElement("link");Fn(Z),Cr(Z,"link",s),Z._p=new Promise(function(ce,ve){Z.onload=ce,Z.onerror=ve}),Z.addEventListener("load",function(){Y.loading|=1}),Z.addEventListener("error",function(){Y.loading|=2}),Y.loading|=4,yv(M,u,x)}M={type:"stylesheet",instance:M,count:1,state:Y},j.set(k,M)}}}function tW(s,u){qo.X(s,u);var p=pf;if(p&&s){var x=$s(p).hoistableScripts,j=vf(s),k=x.get(j);k||(k=p.querySelector(zh(j)),k||(s=d({src:s,async:!0},u),(u=Zi.get(j))&&Z1(s,u),k=p.createElement("script"),Fn(k),Cr(k,"link",s),p.head.appendChild(k)),k={type:"script",instance:k,count:1,state:null},x.set(j,k))}}function nW(s,u){qo.M(s,u);var p=pf;if(p&&s){var x=$s(p).hoistableScripts,j=vf(s),k=x.get(j);k||(k=p.querySelector(zh(j)),k||(s=d({src:s,async:!0,type:"module"},u),(u=Zi.get(j))&&Z1(s,u),k=p.createElement("script"),Fn(k),Cr(k,"link",s),p.head.appendChild(k)),k={type:"script",instance:k,count:1,state:null},x.set(j,k))}}function OM(s,u,p,x){var j=(j=ne.current)?vv(j):null;if(!j)throw Error(r(446));switch(s){case"meta":case"title":return null;case"style":return typeof p.precedence=="string"&&typeof p.href=="string"?(u=gf(p.href),p=$s(j).hoistableStyles,x=p.get(u),x||(x={type:"style",instance:null,count:0,state:null},p.set(u,x)),x):{type:"void",instance:null,count:0,state:null};case"link":if(p.rel==="stylesheet"&&typeof p.href=="string"&&typeof p.precedence=="string"){s=gf(p.href);var k=$s(j).hoistableStyles,M=k.get(s);if(M||(j=j.ownerDocument||j,M={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},k.set(s,M),(k=j.querySelector(Lh(s)))&&!k._p&&(M.instance=k,M.state.loading=5),Zi.has(s)||(p={rel:"preload",as:"style",href:p.href,crossOrigin:p.crossOrigin,integrity:p.integrity,media:p.media,hrefLang:p.hrefLang,referrerPolicy:p.referrerPolicy},Zi.set(s,p),k||rW(j,s,p,M.state))),u&&x===null)throw Error(r(528,""));return M}if(u&&x!==null)throw Error(r(529,""));return null;case"script":return u=p.async,p=p.src,typeof p=="string"&&u&&typeof u!="function"&&typeof u!="symbol"?(u=vf(p),p=$s(j).hoistableScripts,x=p.get(u),x||(x={type:"script",instance:null,count:0,state:null},p.set(u,x)),x):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,s))}}function gf(s){return'href="'+oi(s)+'"'}function Lh(s){return'link[rel="stylesheet"]['+s+"]"}function TM(s){return d({},s,{"data-precedence":s.precedence,precedence:null})}function rW(s,u,p,x){s.querySelector('link[rel="preload"][as="style"]['+u+"]")?x.loading=1:(u=s.createElement("link"),x.preload=u,u.addEventListener("load",function(){return x.loading|=1}),u.addEventListener("error",function(){return x.loading|=2}),Cr(u,"link",p),Fn(u),s.head.appendChild(u))}function vf(s){return'[src="'+oi(s)+'"]'}function zh(s){return"script[async]"+s}function PM(s,u,p){if(u.count++,u.instance===null)switch(u.type){case"style":var x=s.querySelector('style[data-href~="'+oi(p.href)+'"]');if(x)return u.instance=x,Fn(x),x;var j=d({},p,{"data-href":p.href,"data-precedence":p.precedence,href:null,precedence:null});return x=(s.ownerDocument||s).createElement("style"),Fn(x),Cr(x,"style",j),yv(x,p.precedence,s),u.instance=x;case"stylesheet":j=gf(p.href);var k=s.querySelector(Lh(j));if(k)return u.state.loading|=4,u.instance=k,Fn(k),k;x=TM(p),(j=Zi.get(j))&&Q1(x,j),k=(s.ownerDocument||s).createElement("link"),Fn(k);var M=k;return M._p=new Promise(function(Y,Z){M.onload=Y,M.onerror=Z}),Cr(k,"link",x),u.state.loading|=4,yv(k,p.precedence,s),u.instance=k;case"script":return k=vf(p.src),(j=s.querySelector(zh(k)))?(u.instance=j,Fn(j),j):(x=p,(j=Zi.get(k))&&(x=d({},p),Z1(x,j)),s=s.ownerDocument||s,j=s.createElement("script"),Fn(j),Cr(j,"link",x),s.head.appendChild(j),u.instance=j);case"void":return null;default:throw Error(r(443,u.type))}else u.type==="stylesheet"&&(u.state.loading&4)===0&&(x=u.instance,u.state.loading|=4,yv(x,p.precedence,s));return u.instance}function yv(s,u,p){for(var x=p.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),j=x.length?x[x.length-1]:null,k=j,M=0;M<x.length;M++){var Y=x[M];if(Y.dataset.precedence===u)k=Y;else if(k!==j)break}k?k.parentNode.insertBefore(s,k.nextSibling):(u=p.nodeType===9?p.head:p,u.insertBefore(s,u.firstChild))}function Q1(s,u){s.crossOrigin==null&&(s.crossOrigin=u.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=u.referrerPolicy),s.title==null&&(s.title=u.title)}function Z1(s,u){s.crossOrigin==null&&(s.crossOrigin=u.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=u.referrerPolicy),s.integrity==null&&(s.integrity=u.integrity)}var xv=null;function MM(s,u,p){if(xv===null){var x=new Map,j=xv=new Map;j.set(p,x)}else j=xv,x=j.get(p),x||(x=new Map,j.set(p,x));if(x.has(s))return x;for(x.set(s,null),p=p.getElementsByTagName(s),j=0;j<p.length;j++){var k=p[j];if(!(k[au]||k[Dt]||s==="link"&&k.getAttribute("rel")==="stylesheet")&&k.namespaceURI!=="http://www.w3.org/2000/svg"){var M=k.getAttribute(u)||"";M=s+M;var Y=x.get(M);Y?Y.push(k):x.set(M,[k])}}return x}function DM(s,u,p){s=s.ownerDocument||s,s.head.insertBefore(p,u==="title"?s.querySelector("head > title"):null)}function iW(s,u,p){if(p===1||u.itemProp!=null)return!1;switch(s){case"meta":case"title":return!0;case"style":if(typeof u.precedence!="string"||typeof u.href!="string"||u.href==="")break;return!0;case"link":if(typeof u.rel!="string"||typeof u.href!="string"||u.href===""||u.onLoad||u.onError)break;switch(u.rel){case"stylesheet":return s=u.disabled,typeof u.precedence=="string"&&s==null;default:return!0}case"script":if(u.async&&typeof u.async!="function"&&typeof u.async!="symbol"&&!u.onLoad&&!u.onError&&u.src&&typeof u.src=="string")return!0}return!1}function RM(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function aW(s,u,p,x){if(p.type==="stylesheet"&&(typeof x.media!="string"||matchMedia(x.media).matches!==!1)&&(p.state.loading&4)===0){if(p.instance===null){var j=gf(x.href),k=u.querySelector(Lh(j));if(k){u=k._p,u!==null&&typeof u=="object"&&typeof u.then=="function"&&(s.count++,s=bv.bind(s),u.then(s,s)),p.state.loading|=4,p.instance=k,Fn(k);return}k=u.ownerDocument||u,x=TM(x),(j=Zi.get(j))&&Q1(x,j),k=k.createElement("link"),Fn(k);var M=k;M._p=new Promise(function(Y,Z){M.onload=Y,M.onerror=Z}),Cr(k,"link",x),p.instance=k}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(p,u),(u=p.state.preload)&&(p.state.loading&3)===0&&(s.count++,p=bv.bind(s),u.addEventListener("load",p),u.addEventListener("error",p))}}var J1=0;function oW(s,u){return s.stylesheets&&s.count===0&&Sv(s,s.stylesheets),0<s.count||0<s.imgCount?function(p){var x=setTimeout(function(){if(s.stylesheets&&Sv(s,s.stylesheets),s.unsuspend){var k=s.unsuspend;s.unsuspend=null,k()}},6e4+u);0<s.imgBytes&&J1===0&&(J1=62500*BG());var j=setTimeout(function(){if(s.waitingForImages=!1,s.count===0&&(s.stylesheets&&Sv(s,s.stylesheets),s.unsuspend)){var k=s.unsuspend;s.unsuspend=null,k()}},(s.imgBytes>J1?50:800)+u);return s.unsuspend=p,function(){s.unsuspend=null,clearTimeout(x),clearTimeout(j)}}:null}function bv(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Sv(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var wv=null;function Sv(s,u){s.stylesheets=null,s.unsuspend!==null&&(s.count++,wv=new Map,u.forEach(sW,s),wv=null,bv.call(s))}function sW(s,u){if(!(u.state.loading&4)){var p=wv.get(s);if(p)var x=p.get(null);else{p=new Map,wv.set(s,p);for(var j=s.querySelectorAll("link[data-precedence],style[data-precedence]"),k=0;k<j.length;k++){var M=j[k];(M.nodeName==="LINK"||M.getAttribute("media")!=="not all")&&(p.set(M.dataset.precedence,M),x=M)}x&&p.set(null,x)}j=u.instance,M=j.getAttribute("data-precedence"),k=p.get(M)||x,k===x&&p.set(null,j),p.set(M,j),this.count++,x=bv.bind(this),j.addEventListener("load",x),j.addEventListener("error",x),k?k.parentNode.insertBefore(j,k.nextSibling):(s=s.nodeType===9?s.head:s,s.insertBefore(j,s.firstChild)),u.state.loading|=4}}var $h={$$typeof:_,Provider:null,Consumer:null,_currentValue:X,_currentValue2:X,_threadCount:0};function lW(s,u,p,x,j,k,M,Y,Z){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=an(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=an(0),this.hiddenUpdates=an(null),this.identifierPrefix=x,this.onUncaughtError=j,this.onCaughtError=k,this.onRecoverableError=M,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Z,this.incompleteTransitions=new Map}function IM(s,u,p,x,j,k,M,Y,Z,ce,ve,be){return s=new lW(s,u,p,M,Z,ce,ve,be,Y),u=1,k===!0&&(u|=24),k=Ei(3,null,null,u),s.current=k,k.stateNode=s,u=Pw(),u.refCount++,s.pooledCache=u,u.refCount++,k.memoizedState={element:x,isDehydrated:p,cache:u},Iw(k),s}function LM(s){return s?(s=Yc,s):Yc}function zM(s,u,p,x,j,k){j=LM(j),x.context===null?x.context=j:x.pendingContext=j,x=Xs(u),x.payload={element:p},k=k===void 0?null:k,k!==null&&(x.callback=k),p=Gs(s,x,u),p!==null&&(di(p,s,u),vh(p,s,u))}function $M(s,u){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var p=s.retryLane;s.retryLane=p!==0&&p<u?p:u}}function eS(s,u){$M(s,u),(s=s.alternate)&&$M(s,u)}function BM(s){if(s.tag===13||s.tag===31){var u=fu(s,67108864);u!==null&&di(u,s,67108864),eS(s,67108864)}}function FM(s){if(s.tag===13||s.tag===31){var u=Ni();u=Va(u);var p=fu(s,u);p!==null&&di(p,s,u),eS(s,u)}}var Ev=!0;function uW(s,u,p,x){var j=D.T;D.T=null;var k=q.p;try{q.p=2,tS(s,u,p,x)}finally{q.p=k,D.T=j}}function cW(s,u,p,x){var j=D.T;D.T=null;var k=q.p;try{q.p=8,tS(s,u,p,x)}finally{q.p=k,D.T=j}}function tS(s,u,p,x){if(Ev){var j=nS(x);if(j===null)F1(s,u,x,jv,p),HM(s,x);else if(dW(j,s,u,p,x))x.stopPropagation();else if(HM(s,x),u&4&&-1<fW.indexOf(s)){for(;j!==null;){var k=Ls(j);if(k!==null)switch(k.tag){case 3:if(k=k.stateNode,k.current.memoizedState.isDehydrated){var M=Sr(k.pendingLanes);if(M!==0){var Y=k;for(Y.pendingLanes|=2,Y.entangledLanes|=2;M;){var Z=1<<31-st(M);Y.entanglements[1]|=Z,M&=~Z}Wa(k),(Ft&6)===0&&(ov=Mt()+500,Mh(0))}}break;case 31:case 13:Y=fu(k,2),Y!==null&&di(Y,k,2),lv(),eS(k,2)}if(k=nS(x),k===null&&F1(s,u,x,jv,p),k===j)break;j=k}j!==null&&x.stopPropagation()}else F1(s,u,x,null,p)}}function nS(s){return s=iw(s),rS(s)}var jv=null;function rS(s){if(jv=null,s=Is(s),s!==null){var u=a(s);if(u===null)s=null;else{var p=u.tag;if(p===13){if(s=o(u),s!==null)return s;s=null}else if(p===31){if(s=l(u),s!==null)return s;s=null}else if(p===3){if(u.stateNode.current.memoizedState.isDehydrated)return u.tag===3?u.stateNode.containerInfo:null;s=null}else u!==s&&(s=null)}}return jv=s,null}function UM(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(cn()){case de:return 2;case xe:return 8;case Te:case Ge:return 32;case We:return 268435456;default:return 32}default:return 32}}var iS=!1,ol=null,sl=null,ll=null,Bh=new Map,Fh=new Map,ul=[],fW="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 HM(s,u){switch(s){case"focusin":case"focusout":ol=null;break;case"dragenter":case"dragleave":sl=null;break;case"mouseover":case"mouseout":ll=null;break;case"pointerover":case"pointerout":Bh.delete(u.pointerId);break;case"gotpointercapture":case"lostpointercapture":Fh.delete(u.pointerId)}}function Uh(s,u,p,x,j,k){return s===null||s.nativeEvent!==k?(s={blockedOn:u,domEventName:p,eventSystemFlags:x,nativeEvent:k,targetContainers:[j]},u!==null&&(u=Ls(u),u!==null&&BM(u)),s):(s.eventSystemFlags|=x,u=s.targetContainers,j!==null&&u.indexOf(j)===-1&&u.push(j),s)}function dW(s,u,p,x,j){switch(u){case"focusin":return ol=Uh(ol,s,u,p,x,j),!0;case"dragenter":return sl=Uh(sl,s,u,p,x,j),!0;case"mouseover":return ll=Uh(ll,s,u,p,x,j),!0;case"pointerover":var k=j.pointerId;return Bh.set(k,Uh(Bh.get(k)||null,s,u,p,x,j)),!0;case"gotpointercapture":return k=j.pointerId,Fh.set(k,Uh(Fh.get(k)||null,s,u,p,x,j)),!0}return!1}function qM(s){var u=Is(s.target);if(u!==null){var p=a(u);if(p!==null){if(u=p.tag,u===13){if(u=o(p),u!==null){s.blockedOn=u,ge(s.priority,function(){FM(p)});return}}else if(u===31){if(u=l(p),u!==null){s.blockedOn=u,ge(s.priority,function(){FM(p)});return}}else if(u===3&&p.stateNode.current.memoizedState.isDehydrated){s.blockedOn=p.tag===3?p.stateNode.containerInfo:null;return}}}s.blockedOn=null}function _v(s){if(s.blockedOn!==null)return!1;for(var u=s.targetContainers;0<u.length;){var p=nS(s.nativeEvent);if(p===null){p=s.nativeEvent;var x=new p.constructor(p.type,p);rw=x,p.target.dispatchEvent(x),rw=null}else return u=Ls(p),u!==null&&BM(u),s.blockedOn=p,!1;u.shift()}return!0}function VM(s,u,p){_v(s)&&p.delete(u)}function hW(){iS=!1,ol!==null&&_v(ol)&&(ol=null),sl!==null&&_v(sl)&&(sl=null),ll!==null&&_v(ll)&&(ll=null),Bh.forEach(VM),Fh.forEach(VM)}function Cv(s,u){s.blockedOn===u&&(s.blockedOn=null,iS||(iS=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,hW)))}var kv=null;function KM(s){kv!==s&&(kv=s,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){kv===s&&(kv=null);for(var u=0;u<s.length;u+=3){var p=s[u],x=s[u+1],j=s[u+2];if(typeof x!="function"){if(rS(x||p)===null)continue;break}var k=Ls(p);k!==null&&(s.splice(u,3),u-=3,n1(k,{pending:!0,data:j,method:p.method,action:x},x,j))}}))}function yf(s){function u(Z){return Cv(Z,s)}ol!==null&&Cv(ol,s),sl!==null&&Cv(sl,s),ll!==null&&Cv(ll,s),Bh.forEach(u),Fh.forEach(u);for(var p=0;p<ul.length;p++){var x=ul[p];x.blockedOn===s&&(x.blockedOn=null)}for(;0<ul.length&&(p=ul[0],p.blockedOn===null);)qM(p),p.blockedOn===null&&ul.shift();if(p=(s.ownerDocument||s).$$reactFormReplay,p!=null)for(x=0;x<p.length;x+=3){var j=p[x],k=p[x+1],M=j[on]||null;if(typeof k=="function")M||KM(p);else if(M){var Y=null;if(k&&k.hasAttribute("formAction")){if(j=k,M=k[on]||null)Y=M.formAction;else if(rS(j)!==null)continue}else Y=M.action;typeof Y=="function"?p[x+1]=Y:(p.splice(x,3),x-=3),KM(p)}}}function YM(){function s(k){k.canIntercept&&k.info==="react-transition"&&k.intercept({handler:function(){return new Promise(function(M){return j=M})},focusReset:"manual",scroll:"manual"})}function u(){j!==null&&(j(),j=null),x||setTimeout(p,20)}function p(){if(!x&&!navigation.transition){var k=navigation.currentEntry;k&&k.url!=null&&navigation.navigate(k.url,{state:k.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var x=!1,j=null;return navigation.addEventListener("navigate",s),navigation.addEventListener("navigatesuccess",u),navigation.addEventListener("navigateerror",u),setTimeout(p,100),function(){x=!0,navigation.removeEventListener("navigate",s),navigation.removeEventListener("navigatesuccess",u),navigation.removeEventListener("navigateerror",u),j!==null&&(j(),j=null)}}}function aS(s){this._internalRoot=s}Nv.prototype.render=aS.prototype.render=function(s){var u=this._internalRoot;if(u===null)throw Error(r(409));var p=u.current,x=Ni();zM(p,x,s,u,null,null)},Nv.prototype.unmount=aS.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var u=s.containerInfo;zM(s.current,2,null,s,null,null),lv(),u[ga]=null}};function Nv(s){this._internalRoot=s}Nv.prototype.unstable_scheduleHydration=function(s){if(s){var u=Rs();s={blockedOn:null,target:s,priority:u};for(var p=0;p<ul.length&&u!==0&&u<ul[p].priority;p++);ul.splice(p,0,s),p===0&&qM(s)}};var XM=t.version;if(XM!=="19.2.4")throw Error(r(527,XM,"19.2.4"));q.findDOMNode=function(s){var u=s._reactInternals;if(u===void 0)throw typeof s.render=="function"?Error(r(188)):(s=Object.keys(s).join(","),Error(r(268,s)));return s=f(u),s=s!==null?h(s):null,s=s===null?null:s.stateNode,s};var mW={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:D,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Av=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Av.isDisabled&&Av.supportsFiber)try{Se=Av.inject(mW),at=Av}catch{}}return qh.createRoot=function(s,u){if(!i(s))throw Error(r(299));var p=!1,x="",j=tP,k=nP,M=rP;return u!=null&&(u.unstable_strictMode===!0&&(p=!0),u.identifierPrefix!==void 0&&(x=u.identifierPrefix),u.onUncaughtError!==void 0&&(j=u.onUncaughtError),u.onCaughtError!==void 0&&(k=u.onCaughtError),u.onRecoverableError!==void 0&&(M=u.onRecoverableError)),u=IM(s,1,!1,null,null,p,x,null,j,k,M,YM),s[ga]=u.current,B1(s),new aS(u)},qh.hydrateRoot=function(s,u,p){if(!i(s))throw Error(r(299));var x=!1,j="",k=tP,M=nP,Y=rP,Z=null;return p!=null&&(p.unstable_strictMode===!0&&(x=!0),p.identifierPrefix!==void 0&&(j=p.identifierPrefix),p.onUncaughtError!==void 0&&(k=p.onUncaughtError),p.onCaughtError!==void 0&&(M=p.onCaughtError),p.onRecoverableError!==void 0&&(Y=p.onRecoverableError),p.formState!==void 0&&(Z=p.formState)),u=IM(s,1,!0,u,p??null,x,j,Z,k,M,Y,YM),u.context=LM(null),p=u.current,x=Ni(),x=Va(x),j=Xs(x),j.callback=null,Gs(p,j,x),p=x,u.current.lanes=p,St(u,p),Wa(u),s[ga]=u.current,B1(s),new Nv(u)},qh.version="19.2.4",qh}var aD;function CW(){if(aD)return cS.exports;aD=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(),cS.exports=_W(),cS.exports}var kW=CW();/**
 * react-router v7.13.1
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */var oD="popstate";function sD(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function NW(e={}){function t(r,i){var f;let a=(f=i.state)==null?void 0:f.masked,{pathname:o,search:l,hash:c}=a||r.location;return Uj("",{pathname:o,search:l,hash:c},i.state&&i.state.usr||null,i.state&&i.state.key||"default",a?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}function n(r,i){return typeof i=="string"?i:Am(i)}return OW(t,n,null,e)}function xn(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ca(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function AW(){return Math.random().toString(36).substring(2,10)}function lD(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Uj(e,t,n=null,r,i){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Md(t):t,state:n,key:t&&t.key||r||AW(),unstable_mask:i}}function Am({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Md(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function OW(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,l="POP",c=null,f=h();f==null&&(f=0,o.replaceState({...o.state,idx:f},""));function h(){return(o.state||{idx:null}).idx}function d(){l="POP";let S=h(),E=S==null?null:S-f;f=S,c&&c({action:l,location:w.location,delta:E})}function g(S,E){l="PUSH";let C=sD(S)?S:Uj(w.location,S,E);f=h()+1;let _=lD(C,f),N=w.createHref(C.unstable_mask||C);try{o.pushState(_,"",N)}catch(O){if(O instanceof DOMException&&O.name==="DataCloneError")throw O;i.location.assign(N)}a&&c&&c({action:l,location:w.location,delta:1})}function v(S,E){l="REPLACE";let C=sD(S)?S:Uj(w.location,S,E);f=h();let _=lD(C,f),N=w.createHref(C.unstable_mask||C);o.replaceState(_,"",N),a&&c&&c({action:l,location:w.location,delta:0})}function b(S){return TW(S)}let w={get action(){return l},get location(){return e(i,o)},listen(S){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(oD,d),c=S,()=>{i.removeEventListener(oD,d),c=null}},createHref(S){return t(i,S)},createURL:b,encodeLocation(S){let E=b(S);return{pathname:E.pathname,search:E.search,hash:E.hash}},push:g,replace:v,go(S){return o.go(S)}};return w}function TW(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),xn(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:Am(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function S$(e,t,n="/"){return PW(e,t,n,!1)}function PW(e,t,n,r){let i=typeof t=="string"?Md(t):t,a=ss(i.pathname||"/",n);if(a==null)return null;let o=E$(e);MW(o);let l=null;for(let c=0;l==null&&c<o.length;++c){let f=_$(a);l=UW(o[c],f,r)}return l}function E$(e,t=[],n=[],r="",i=!1){let a=(o,l,c=i,f)=>{let h={relativePath:f===void 0?o.path||"":f,caseSensitive:o.caseSensitive===!0,childrenIndex:l,route:o};if(h.relativePath.startsWith("/")){if(!h.relativePath.startsWith(r)&&c)return;xn(h.relativePath.startsWith(r),`Absolute route path "${h.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),h.relativePath=h.relativePath.slice(r.length)}let d=co([r,h.relativePath]),g=n.concat(h);o.children&&o.children.length>0&&(xn(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${d}".`),E$(o.children,t,g,d,c)),!(o.path==null&&!o.index)&&t.push({path:d,score:BW(d,o.index),routesMeta:g})};return e.forEach((o,l)=>{var c;if(o.path===""||!((c=o.path)!=null&&c.includes("?")))a(o,l);else for(let f of j$(o.path))a(o,l,!0,f)}),t}function j$(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),a=n.replace(/\?$/,"");if(r.length===0)return i?[a,""]:[a];let o=j$(r.join("/")),l=[];return l.push(...o.map(c=>c===""?a:[a,c].join("/"))),i&&l.push(...o),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function MW(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:FW(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var DW=/^:[\w-]+$/,RW=3,IW=2,LW=1,zW=10,$W=-2,uD=e=>e==="*";function BW(e,t){let n=e.split("/"),r=n.length;return n.some(uD)&&(r+=$W),t&&(r+=IW),n.filter(i=>!uD(i)).reduce((i,a)=>i+(DW.test(a)?RW:a===""?LW:zW),r)}function FW(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function UW(e,t,n=!1){let{routesMeta:r}=e,i={},a="/",o=[];for(let l=0;l<r.length;++l){let c=r[l],f=l===r.length-1,h=a==="/"?t:t.slice(a.length)||"/",d=Om({path:c.relativePath,caseSensitive:c.caseSensitive,end:f},h),g=c.route;if(!d&&f&&n&&!r[r.length-1].route.index&&(d=Om({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},h)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:co([a,d.pathname]),pathnameBase:YW(co([a,d.pathnameBase])),route:g}),d.pathnameBase!=="/"&&(a=co([a,d.pathnameBase]))}return o}function Om(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=HW(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,"$1"),l=i.slice(1);return{params:r.reduce((f,{paramName:h,isOptional:d},g)=>{if(h==="*"){let b=l[g]||"";o=a.slice(0,a.length-b.length).replace(/(.)\/+$/,"$1")}const v=l[g];return d&&!v?f[h]=void 0:f[h]=(v||"").replace(/%2F/g,"/"),f},{}),pathname:a,pathnameBase:o,pattern:e}}function HW(e,t=!1,n=!0){ca(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,l,c,f,h)=>{if(r.push({paramName:l,isOptional:c!=null}),c){let d=h.charAt(f+o.length);return d&&d!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function _$(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ca(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function ss(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}var qW=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function VW(e,t="/"){let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Md(e):e,a;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?a=cD(n.substring(1),"/"):a=cD(n,t)):a=t,{pathname:a,search:XW(r),hash:GW(i)}}function cD(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function mS(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}].  Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function KW(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function ak(e){let t=KW(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function s0(e,t,n,r=!1){let i;typeof e=="string"?i=Md(e):(i={...e},xn(!i.pathname||!i.pathname.includes("?"),mS("?","pathname","search",i)),xn(!i.pathname||!i.pathname.includes("#"),mS("#","pathname","hash",i)),xn(!i.search||!i.search.includes("#"),mS("#","search","hash",i)));let a=e===""||i.pathname==="",o=a?"/":i.pathname,l;if(o==null)l=n;else{let d=t.length-1;if(!r&&o.startsWith("..")){let g=o.split("/");for(;g[0]==="..";)g.shift(),d-=1;i.pathname=g.join("/")}l=d>=0?t[d]:"/"}let c=VW(i,l),f=o&&o!=="/"&&o.endsWith("/"),h=(a||o===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(f||h)&&(c.pathname+="/"),c}var co=e=>e.join("/").replace(/\/\/+/g,"/"),YW=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),XW=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,GW=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,WW=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function QW(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function ZW(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var C$=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function k$(e,t){let n=e;if(typeof n!="string"||!qW.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(C$)try{let a=new URL(window.location.href),o=n.startsWith("//")?new URL(a.protocol+n):new URL(n),l=ss(o.pathname,t);o.origin===a.origin&&l!=null?n=l+o.search+o.hash:i=!0}catch{ca(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var N$=["POST","PUT","PATCH","DELETE"];new Set(N$);var JW=["GET",...N$];new Set(JW);var Dd=y.createContext(null);Dd.displayName="DataRouter";var l0=y.createContext(null);l0.displayName="DataRouterState";var eQ=y.createContext(!1),A$=y.createContext({isTransitioning:!1});A$.displayName="ViewTransition";var tQ=y.createContext(new Map);tQ.displayName="Fetchers";var nQ=y.createContext(null);nQ.displayName="Await";var qi=y.createContext(null);qi.displayName="Navigation";var yp=y.createContext(null);yp.displayName="Location";var da=y.createContext({outlet:null,matches:[],isDataRoute:!1});da.displayName="Route";var ok=y.createContext(null);ok.displayName="RouteError";var O$="REACT_ROUTER_ERROR",rQ="REDIRECT",iQ="ROUTE_ERROR_RESPONSE";function aQ(e){if(e.startsWith(`${O$}:${rQ}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function oQ(e){if(e.startsWith(`${O$}:${iQ}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new WW(t.status,t.statusText,t.data)}catch{}}function sQ(e,{relative:t}={}){xn(kc(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=y.useContext(qi),{hash:i,pathname:a,search:o}=bp(e,{relative:t}),l=a;return n!=="/"&&(l=a==="/"?n:co([n,a])),r.createHref({pathname:l,search:o,hash:i})}function kc(){return y.useContext(yp)!=null}function ha(){return xn(kc(),"useLocation() may be used only in the context of a <Router> component."),y.useContext(yp).location}function pS(e){xn(kc(),"useMatch() may be used only in the context of a <Router> component.");let{pathname:t}=ha();return y.useMemo(()=>Om(e,_$(t)),[t,e])}var T$="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function P$(e){y.useContext(qi).static||y.useLayoutEffect(e)}function Ba(){let{isDataRoute:e}=y.useContext(da);return e?SQ():lQ()}function lQ(){xn(kc(),"useNavigate() may be used only in the context of a <Router> component.");let e=y.useContext(Dd),{basename:t,navigator:n}=y.useContext(qi),{matches:r}=y.useContext(da),{pathname:i}=ha(),a=JSON.stringify(ak(r)),o=y.useRef(!1);return P$(()=>{o.current=!0}),y.useCallback((c,f={})=>{if(ca(o.current,T$),!o.current)return;if(typeof c=="number"){n.go(c);return}let h=s0(c,JSON.parse(a),i,f.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:co([t,h.pathname])),(f.replace?n.replace:n.push)(h,f.state,f)},[t,n,a,i,e])}var uQ=y.createContext(null);function cQ(e){let t=y.useContext(da).outlet;return y.useMemo(()=>t&&y.createElement(uQ.Provider,{value:e},t),[t,e])}function xp(){let{matches:e}=y.useContext(da),t=e[e.length-1];return t?t.params:{}}function bp(e,{relative:t}={}){let{matches:n}=y.useContext(da),{pathname:r}=ha(),i=JSON.stringify(ak(n));return y.useMemo(()=>s0(e,JSON.parse(i),r,t==="path"),[e,i,r,t])}function fQ(e,t){return M$(e,t)}function M$(e,t,n){var S;xn(kc(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=y.useContext(qi),{matches:i}=y.useContext(da),a=i[i.length-1],o=a?a.params:{},l=a?a.pathname:"/",c=a?a.pathnameBase:"/",f=a&&a.route;{let E=f&&f.path||"";R$(l,!f||E.endsWith("*")||E.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${E}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.

Please change the parent <Route path="${E}"> to <Route path="${E==="/"?"*":`${E}/*`}">.`)}let h=ha(),d;if(t){let E=typeof t=="string"?Md(t):t;xn(c==="/"||((S=E.pathname)==null?void 0:S.startsWith(c)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${E.pathname}" was given in the \`location\` prop.`),d=E}else d=h;let g=d.pathname||"/",v=g;if(c!=="/"){let E=c.replace(/^\//,"").split("/");v="/"+g.replace(/^\//,"").split("/").slice(E.length).join("/")}let b=S$(e,{pathname:v});ca(f||b!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),ca(b==null||b[b.length-1].route.element!==void 0||b[b.length-1].route.Component!==void 0||b[b.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let w=gQ(b&&b.map(E=>Object.assign({},E,{params:Object.assign({},o,E.params),pathname:co([c,r.encodeLocation?r.encodeLocation(E.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?c:co([c,r.encodeLocation?r.encodeLocation(E.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathnameBase])})),i,n);return t&&w?y.createElement(yp.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...d},navigationType:"POP"}},w):w}function dQ(){let e=wQ(),t=QW(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},a={padding:"2px 4px",backgroundColor:r},o=null;return console.error("Error handled by React Router default ErrorBoundary:",e),o=y.createElement(y.Fragment,null,y.createElement("p",null,"💿 Hey developer 👋"),y.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",y.createElement("code",{style:a},"ErrorBoundary")," or"," ",y.createElement("code",{style:a},"errorElement")," prop on your route.")),y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},t),n?y.createElement("pre",{style:i},n):null,o)}var hQ=y.createElement(dQ,null),D$=class extends y.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=oQ(e.digest);n&&(e=n)}let t=e!==void 0?y.createElement(da.Provider,{value:this.props.routeContext},y.createElement(ok.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?y.createElement(mQ,{error:e},t):t}};D$.contextType=eQ;var gS=new WeakMap;function mQ({children:e,error:t}){let{basename:n}=y.useContext(qi);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=aQ(t.digest);if(r){let i=gS.get(t);if(i)throw i;let a=k$(r.location,n);if(C$&&!gS.get(t))if(a.isExternal||r.reloadDocument)window.location.href=a.absoluteURL||a.to;else{const o=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:r.replace}));throw gS.set(t,o),o}return y.createElement("meta",{httpEquiv:"refresh",content:`0;url=${a.absoluteURL||a.to}`})}}return e}function pQ({routeContext:e,match:t,children:n}){let r=y.useContext(Dd);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),y.createElement(da.Provider,{value:e},n)}function gQ(e,t=[],n){let r=n==null?void 0:n.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r==null?void 0:r.errors;if(a!=null){let h=i.findIndex(d=>d.route.id&&(a==null?void 0:a[d.route.id])!==void 0);xn(h>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(",")}`),i=i.slice(0,Math.min(i.length,h+1))}let o=!1,l=-1;if(n&&r){o=r.renderFallback;for(let h=0;h<i.length;h++){let d=i[h];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(l=h),d.route.id){let{loaderData:g,errors:v}=r,b=d.route.loader&&!g.hasOwnProperty(d.route.id)&&(!v||v[d.route.id]===void 0);if(d.route.lazy||b){n.isStatic&&(o=!0),l>=0?i=i.slice(0,l+1):i=[i[0]];break}}}}let c=n==null?void 0:n.onError,f=r&&c?(h,d)=>{var g,v;c(h,{location:r.location,params:((v=(g=r.matches)==null?void 0:g[0])==null?void 0:v.params)??{},unstable_pattern:ZW(r.matches),errorInfo:d})}:void 0;return i.reduceRight((h,d,g)=>{let v,b=!1,w=null,S=null;r&&(v=a&&d.route.id?a[d.route.id]:void 0,w=d.route.errorElement||hQ,o&&(l<0&&g===0?(R$("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),b=!0,S=null):l===g&&(b=!0,S=d.route.hydrateFallbackElement||null)));let E=t.concat(i.slice(0,g+1)),C=()=>{let _;return v?_=w:b?_=S:d.route.Component?_=y.createElement(d.route.Component,null):d.route.element?_=d.route.element:_=h,y.createElement(pQ,{match:d,routeContext:{outlet:h,matches:E,isDataRoute:r!=null},children:_})};return r&&(d.route.ErrorBoundary||d.route.errorElement||g===0)?y.createElement(D$,{location:r.location,revalidation:r.revalidation,component:w,error:v,children:C(),routeContext:{outlet:null,matches:E,isDataRoute:!0},onError:f}):C()},null)}function sk(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function vQ(e){let t=y.useContext(Dd);return xn(t,sk(e)),t}function yQ(e){let t=y.useContext(l0);return xn(t,sk(e)),t}function xQ(e){let t=y.useContext(da);return xn(t,sk(e)),t}function lk(e){let t=xQ(e),n=t.matches[t.matches.length-1];return xn(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function bQ(){return lk("useRouteId")}function wQ(){var r;let e=y.useContext(ok),t=yQ("useRouteError"),n=lk("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function SQ(){let{router:e}=vQ("useNavigate"),t=lk("useNavigate"),n=y.useRef(!1);return P$(()=>{n.current=!0}),y.useCallback(async(i,a={})=>{ca(n.current,T$),n.current&&(typeof i=="number"?await e.navigate(i):await e.navigate(i,{fromRouteId:t,...a}))},[e,t])}var fD={};function R$(e,t,n){!t&&!fD[e]&&(fD[e]=!0,ca(!1,n))}y.memo(EQ);function EQ({routes:e,future:t,state:n,isStatic:r,onError:i}){return M$(e,void 0,{state:n,isStatic:r,onError:i})}function jQ({to:e,replace:t,state:n,relative:r}){xn(kc(),"<Navigate> may be used only in the context of a <Router> component.");let{static:i}=y.useContext(qi);ca(!i,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:a}=y.useContext(da),{pathname:o}=ha(),l=Ba(),c=s0(e,ak(a),o,r==="path"),f=JSON.stringify(c);return y.useEffect(()=>{l(JSON.parse(f),{replace:t,state:n,relative:r})},[l,f,r,t,n]),null}function _Q(e){return cQ(e.context)}function hi(e){xn(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function CQ({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:i,static:a=!1,unstable_useTransitions:o}){xn(!kc(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=e.replace(/^\/*/,"/"),c=y.useMemo(()=>({basename:l,navigator:i,static:a,unstable_useTransitions:o,future:{}}),[l,i,a,o]);typeof n=="string"&&(n=Md(n));let{pathname:f="/",search:h="",hash:d="",state:g=null,key:v="default",unstable_mask:b}=n,w=y.useMemo(()=>{let S=ss(f,l);return S==null?null:{location:{pathname:S,search:h,hash:d,state:g,key:v,unstable_mask:b},navigationType:r}},[l,f,h,d,g,v,r,b]);return ca(w!=null,`<Router basename="${l}"> is not able to match the URL "${f}${h}${d}" because it does not start with the basename, so the <Router> won't render anything.`),w==null?null:y.createElement(qi.Provider,{value:c},y.createElement(yp.Provider,{children:t,value:w}))}function kQ({children:e,location:t}){return fQ(Hj(e),t)}function Hj(e,t=[]){let n=[];return y.Children.forEach(e,(r,i)=>{if(!y.isValidElement(r))return;let a=[...t,i];if(r.type===y.Fragment){n.push.apply(n,Hj(r.props.children,a));return}xn(r.type===hi,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),xn(!r.props.index||!r.props.children,"An index route cannot have child routes.");let o={id:r.props.id||a.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=Hj(r.props.children,a)),n.push(o)}),n}var gy="get",vy="application/x-www-form-urlencoded";function u0(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function NQ(e){return u0(e)&&e.tagName.toLowerCase()==="button"}function AQ(e){return u0(e)&&e.tagName.toLowerCase()==="form"}function OQ(e){return u0(e)&&e.tagName.toLowerCase()==="input"}function TQ(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function PQ(e,t){return e.button===0&&(!t||t==="_self")&&!TQ(e)}function qj(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function MQ(e,t){let n=qj(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(a=>{n.append(i,a)})}),n}var Tv=null;function DQ(){if(Tv===null)try{new FormData(document.createElement("form"),0),Tv=!1}catch{Tv=!0}return Tv}var RQ=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function vS(e){return e!=null&&!RQ.has(e)?(ca(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${vy}"`),null):e}function IQ(e,t){let n,r,i,a,o;if(AQ(e)){let l=e.getAttribute("action");r=l?ss(l,t):null,n=e.getAttribute("method")||gy,i=vS(e.getAttribute("enctype"))||vy,a=new FormData(e)}else if(NQ(e)||OQ(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=e.getAttribute("formaction")||l.getAttribute("action");if(r=c?ss(c,t):null,n=e.getAttribute("formmethod")||l.getAttribute("method")||gy,i=vS(e.getAttribute("formenctype"))||vS(l.getAttribute("enctype"))||vy,a=new FormData(l,e),!DQ()){let{name:f,type:h,value:d}=e;if(h==="image"){let g=f?`${f}.`:"";a.append(`${g}x`,"0"),a.append(`${g}y`,"0")}else f&&a.append(f,d)}}else{if(u0(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=gy,r=null,i=vy,o=e}return a&&i==="text/plain"&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function uk(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function LQ(e,t,n,r){let i=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?i.pathname.endsWith("/")?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:i.pathname==="/"?i.pathname=`_root.${r}`:t&&ss(i.pathname,t)==="/"?i.pathname=`${t.replace(/\/$/,"")}/_root.${r}`:i.pathname=`${i.pathname.replace(/\/$/,"")}.${r}`,i}async function zQ(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function $Q(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function BQ(e,t,n){let r=await Promise.all(e.map(async i=>{let a=t.routes[i.route.id];if(a){let o=await zQ(a,n);return o.links?o.links():[]}return[]}));return qQ(r.flat(1).filter($Q).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function dD(e,t,n,r,i,a){let o=(c,f)=>n[f]?c.route.id!==n[f].route.id:!0,l=(c,f)=>{var h;return n[f].pathname!==c.pathname||((h=n[f].route.path)==null?void 0:h.endsWith("*"))&&n[f].params["*"]!==c.params["*"]};return a==="assets"?t.filter((c,f)=>o(c,f)||l(c,f)):a==="data"?t.filter((c,f)=>{var d;let h=r.routes[c.route.id];if(!h||!h.hasLoader)return!1;if(o(c,f)||l(c,f))return!0;if(c.route.shouldRevalidate){let g=c.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:((d=n[0])==null?void 0:d.params)||{},nextUrl:new URL(e,window.origin),nextParams:c.params,defaultShouldRevalidate:!0});if(typeof g=="boolean")return g}return!0}):[]}function FQ(e,t,{includeHydrateFallback:n}={}){return UQ(e.map(r=>{let i=t.routes[r.route.id];if(!i)return[];let a=[i.module];return i.clientActionModule&&(a=a.concat(i.clientActionModule)),i.clientLoaderModule&&(a=a.concat(i.clientLoaderModule)),n&&i.hydrateFallbackModule&&(a=a.concat(i.hydrateFallbackModule)),i.imports&&(a=a.concat(i.imports)),a}).flat(1))}function UQ(e){return[...new Set(e)]}function HQ(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function qQ(e,t){let n=new Set;return new Set(t),e.reduce((r,i)=>{let a=JSON.stringify(HQ(i));return n.has(a)||(n.add(a),r.push({key:a,link:i})),r},[])}function I$(){let e=y.useContext(Dd);return uk(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function VQ(){let e=y.useContext(l0);return uk(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var ck=y.createContext(void 0);ck.displayName="FrameworkContext";function L$(){let e=y.useContext(ck);return uk(e,"You must render this element inside a <HydratedRouter> element"),e}function KQ(e,t){let n=y.useContext(ck),[r,i]=y.useState(!1),[a,o]=y.useState(!1),{onFocus:l,onBlur:c,onMouseEnter:f,onMouseLeave:h,onTouchStart:d}=t,g=y.useRef(null);y.useEffect(()=>{if(e==="render"&&o(!0),e==="viewport"){let w=E=>{E.forEach(C=>{o(C.isIntersecting)})},S=new IntersectionObserver(w,{threshold:.5});return g.current&&S.observe(g.current),()=>{S.disconnect()}}},[e]),y.useEffect(()=>{if(r){let w=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(w)}}},[r]);let v=()=>{i(!0)},b=()=>{i(!1),o(!1)};return n?e!=="intent"?[a,g,{}]:[a,g,{onFocus:Vh(l,v),onBlur:Vh(c,b),onMouseEnter:Vh(f,v),onMouseLeave:Vh(h,b),onTouchStart:Vh(d,v)}]:[!1,g,{}]}function Vh(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function YQ({page:e,...t}){let{router:n}=I$(),r=y.useMemo(()=>S$(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?y.createElement(GQ,{page:e,matches:r,...t}):null}function XQ(e){let{manifest:t,routeModules:n}=L$(),[r,i]=y.useState([]);return y.useEffect(()=>{let a=!1;return BQ(e,t,n).then(o=>{a||i(o)}),()=>{a=!0}},[e,t,n]),r}function GQ({page:e,matches:t,...n}){let r=ha(),{future:i,manifest:a,routeModules:o}=L$(),{basename:l}=I$(),{loaderData:c,matches:f}=VQ(),h=y.useMemo(()=>dD(e,t,f,a,r,"data"),[e,t,f,a,r]),d=y.useMemo(()=>dD(e,t,f,a,r,"assets"),[e,t,f,a,r]),g=y.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let w=new Set,S=!1;if(t.forEach(C=>{var N;let _=a.routes[C.route.id];!_||!_.hasLoader||(!h.some(O=>O.route.id===C.route.id)&&C.route.id in c&&((N=o[C.route.id])!=null&&N.shouldRevalidate)||_.hasClientLoader?S=!0:w.add(C.route.id))}),w.size===0)return[];let E=LQ(e,l,i.unstable_trailingSlashAwareDataRequests,"data");return S&&w.size>0&&E.searchParams.set("_routes",t.filter(C=>w.has(C.route.id)).map(C=>C.route.id).join(",")),[E.pathname+E.search]},[l,i.unstable_trailingSlashAwareDataRequests,c,r,a,h,t,e,o]),v=y.useMemo(()=>FQ(d,a),[d,a]),b=XQ(d);return y.createElement(y.Fragment,null,g.map(w=>y.createElement("link",{key:w,rel:"prefetch",as:"fetch",href:w,...n})),v.map(w=>y.createElement("link",{key:w,rel:"modulepreload",href:w,...n})),b.map(({key:w,link:S})=>y.createElement("link",{key:w,nonce:n.nonce,...S,crossOrigin:S.crossOrigin??n.crossOrigin})))}function WQ(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var QQ=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{QQ&&(window.__reactRouterVersion="7.13.1")}catch{}function ZQ({basename:e,children:t,unstable_useTransitions:n,window:r}){let i=y.useRef();i.current==null&&(i.current=NW({window:r,v5Compat:!0}));let a=i.current,[o,l]=y.useState({action:a.action,location:a.location}),c=y.useCallback(f=>{n===!1?l(f):y.startTransition(()=>l(f))},[n]);return y.useLayoutEffect(()=>a.listen(c),[a,c]),y.createElement(CQ,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,unstable_useTransitions:n})}var z$=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Br=y.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:i,reloadDocument:a,replace:o,unstable_mask:l,state:c,target:f,to:h,preventScrollReset:d,viewTransition:g,unstable_defaultShouldRevalidate:v,...b},w){let{basename:S,navigator:E,unstable_useTransitions:C}=y.useContext(qi),_=typeof h=="string"&&z$.test(h),N=k$(h,S);h=N.to;let O=sQ(h,{relative:i}),A=ha(),T=null;if(l){let V=s0(l,[],A.unstable_mask?A.unstable_mask.pathname:"/",!0);S!=="/"&&(V.pathname=V.pathname==="/"?S:co([S,V.pathname])),T=E.createHref(V)}let[P,I,z]=KQ(r,b),F=tZ(h,{replace:o,unstable_mask:l,state:c,target:f,preventScrollReset:d,relative:i,viewTransition:g,unstable_defaultShouldRevalidate:v,unstable_useTransitions:C});function B(V){t&&t(V),V.defaultPrevented||F(V)}let G=!(N.isExternal||a),L=y.createElement("a",{...b,...z,href:(G?T:void 0)||N.absoluteURL||O,onClick:G?B:t,ref:WQ(w,I),target:f,"data-discover":!_&&n==="render"?"true":void 0});return P&&!_?y.createElement(y.Fragment,null,L,y.createElement(YQ,{page:O})):L});Br.displayName="Link";var Vj=y.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:i=!1,style:a,to:o,viewTransition:l,children:c,...f},h){let d=bp(o,{relative:f.relative}),g=ha(),v=y.useContext(l0),{navigator:b,basename:w}=y.useContext(qi),S=v!=null&&sZ(d)&&l===!0,E=b.encodeLocation?b.encodeLocation(d).pathname:d.pathname,C=g.pathname,_=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;n||(C=C.toLowerCase(),_=_?_.toLowerCase():null,E=E.toLowerCase()),_&&w&&(_=ss(_,w)||_);const N=E!=="/"&&E.endsWith("/")?E.length-1:E.length;let O=C===E||!i&&C.startsWith(E)&&C.charAt(N)==="/",A=_!=null&&(_===E||!i&&_.startsWith(E)&&_.charAt(E.length)==="/"),T={isActive:O,isPending:A,isTransitioning:S},P=O?t:void 0,I;typeof r=="function"?I=r(T):I=[r,O?"active":null,A?"pending":null,S?"transitioning":null].filter(Boolean).join(" ");let z=typeof a=="function"?a(T):a;return y.createElement(Br,{...f,"aria-current":P,className:I,ref:h,style:z,to:o,viewTransition:l},typeof c=="function"?c(T):c)});Vj.displayName="NavLink";var JQ=y.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=gy,action:l,onSubmit:c,relative:f,preventScrollReset:h,viewTransition:d,unstable_defaultShouldRevalidate:g,...v},b)=>{let{unstable_useTransitions:w}=y.useContext(qi),S=aZ(),E=oZ(l,{relative:f}),C=o.toLowerCase()==="get"?"get":"post",_=typeof l=="string"&&z$.test(l),N=O=>{if(c&&c(O),O.defaultPrevented)return;O.preventDefault();let A=O.nativeEvent.submitter,T=(A==null?void 0:A.getAttribute("formmethod"))||o,P=()=>S(A||O.currentTarget,{fetcherKey:t,method:T,navigate:n,replace:i,state:a,relative:f,preventScrollReset:h,viewTransition:d,unstable_defaultShouldRevalidate:g});w&&n!==!1?y.startTransition(()=>P()):P()};return y.createElement("form",{ref:b,method:C,action:E,onSubmit:r?c:N,...v,"data-discover":!_&&e==="render"?"true":void 0})});JQ.displayName="Form";function eZ(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function $$(e){let t=y.useContext(Dd);return xn(t,eZ(e)),t}function tZ(e,{target:t,replace:n,unstable_mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:l,unstable_defaultShouldRevalidate:c,unstable_useTransitions:f}={}){let h=Ba(),d=ha(),g=bp(e,{relative:o});return y.useCallback(v=>{if(PQ(v,t)){v.preventDefault();let b=n!==void 0?n:Am(d)===Am(g),w=()=>h(e,{replace:b,unstable_mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:l,unstable_defaultShouldRevalidate:c});f?y.startTransition(()=>w()):w()}},[d,h,g,n,r,i,t,e,a,o,l,c,f])}function nZ(e){ca(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=y.useRef(qj(e)),n=y.useRef(!1),r=ha(),i=y.useMemo(()=>MQ(r.search,n.current?null:t.current),[r.search]),a=Ba(),o=y.useCallback((l,c)=>{const f=qj(typeof l=="function"?l(new URLSearchParams(i)):l);n.current=!0,a("?"+f,c)},[a,i]);return[i,o]}var rZ=0,iZ=()=>`__${String(++rZ)}__`;function aZ(){let{router:e}=$$("useSubmit"),{basename:t}=y.useContext(qi),n=bQ(),r=e.fetch,i=e.navigate;return y.useCallback(async(a,o={})=>{let{action:l,method:c,encType:f,formData:h,body:d}=IQ(a,t);if(o.navigate===!1){let g=o.fetcherKey||iZ();await r(g,n,o.action||l,{unstable_defaultShouldRevalidate:o.unstable_defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:h,body:d,formMethod:o.method||c,formEncType:o.encType||f,flushSync:o.flushSync})}else await i(o.action||l,{unstable_defaultShouldRevalidate:o.unstable_defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:h,body:d,formMethod:o.method||c,formEncType:o.encType||f,replace:o.replace,state:o.state,fromRouteId:n,flushSync:o.flushSync,viewTransition:o.viewTransition})},[r,i,t,n])}function oZ(e,{relative:t}={}){let{basename:n}=y.useContext(qi),r=y.useContext(da);xn(r,"useFormAction must be used inside a RouteContext");let[i]=r.matches.slice(-1),a={...bp(e||".",{relative:t})},o=ha();if(e==null){a.search=o.search;let l=new URLSearchParams(a.search),c=l.getAll("index");if(c.some(h=>h==="")){l.delete("index"),c.filter(d=>d).forEach(d=>l.append("index",d));let h=l.toString();a.search=h?`?${h}`:""}}return(!e||e===".")&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(a.pathname=a.pathname==="/"?n:co([n,a.pathname])),Am(a)}function sZ(e,{relative:t}={}){let n=y.useContext(A$);xn(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=$$("useViewTransitionState"),i=bp(e,{relative:t});if(!n.isTransitioning)return!1;let a=ss(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=ss(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Om(i.pathname,o)!=null||Om(i.pathname,a)!=null}var Wl=w$();const B$=Hi(Wl);var Nc=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},lZ={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},jl,rk,u$,uZ=(u$=class{constructor(){Pe(this,jl,lZ);Pe(this,rk,!1)}setTimeoutProvider(e){ke(this,jl,e)}setTimeout(e,t){return W(this,jl).setTimeout(e,t)}clearTimeout(e){W(this,jl).clearTimeout(e)}setInterval(e,t){return W(this,jl).setInterval(e,t)}clearInterval(e){W(this,jl).clearInterval(e)}},jl=new WeakMap,rk=new WeakMap,u$),Iu=new uZ;function cZ(e){setTimeout(e,0)}var ic=typeof window>"u"||"Deno"in globalThis;function zr(){}function fZ(e,t){return typeof e=="function"?e(t):e}function Kj(e){return typeof e=="number"&&e>=0&&e!==1/0}function F$(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Il(e,t){return typeof e=="function"?e(t):e}function aa(e,t){return typeof e=="function"?e(t):e}function hD(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:l}=e;if(o){if(r){if(t.queryHash!==fk(o,t.options))return!1}else if(!Tm(t.queryKey,o))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||i&&i!==t.state.fetchStatus||a&&!a(t))}function mD(e,t){const{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(ac(t.options.mutationKey)!==ac(a))return!1}else if(!Tm(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function fk(e,t){return((t==null?void 0:t.queryKeyHashFn)||ac)(e)}function ac(e){return JSON.stringify(e,(t,n)=>Yj(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Tm(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Tm(e[n],t[n])):!1}var dZ=Object.prototype.hasOwnProperty;function dk(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=pD(e)&&pD(t);if(!r&&!(Yj(e)&&Yj(t)))return t;const a=(r?e:Object.keys(e)).length,o=r?t:Object.keys(t),l=o.length,c=r?new Array(l):{};let f=0;for(let h=0;h<l;h++){const d=r?h:o[h],g=e[d],v=t[d];if(g===v){c[d]=g,(r?h<a:dZ.call(e,d))&&f++;continue}if(g===null||v===null||typeof g!="object"||typeof v!="object"){c[d]=v;continue}const b=dk(g,v,n+1);c[d]=b,b===g&&f++}return a===l&&f===a?e:c}function Pm(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function pD(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Yj(e){if(!gD(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!gD(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function gD(e){return Object.prototype.toString.call(e)==="[object Object]"}function hZ(e){return new Promise(t=>{Iu.setTimeout(t,e)})}function Xj(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?dk(e,t):t}function mZ(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function pZ(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var hk=Symbol();function U$(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===hk?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function mk(e,t){return typeof e=="function"?e(...t):!!e}function gZ(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??(i=t()),r||(r=!0,i.aborted?n():i.addEventListener("abort",n,{once:!0})),i)}),e}var qu,_l,Xf,c$,vZ=(c$=class extends Nc{constructor(){super();Pe(this,qu);Pe(this,_l);Pe(this,Xf);ke(this,Xf,t=>{if(!ic&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){W(this,_l)||this.setEventListener(W(this,Xf))}onUnsubscribe(){var t;this.hasListeners()||((t=W(this,_l))==null||t.call(this),ke(this,_l,void 0))}setEventListener(t){var n;ke(this,Xf,t),(n=W(this,_l))==null||n.call(this),ke(this,_l,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){W(this,qu)!==t&&(ke(this,qu,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof W(this,qu)=="boolean"?W(this,qu):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},qu=new WeakMap,_l=new WeakMap,Xf=new WeakMap,c$),pk=new vZ;function Gj(){let e,t;const n=new Promise((i,a)=>{e=i,t=a});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}var yZ=cZ;function xZ(){let e=[],t=0,n=l=>{l()},r=l=>{l()},i=yZ;const a=l=>{t?e.push(l):i(()=>{n(l)})},o=()=>{const l=e;e=[],l.length&&i(()=>{r(()=>{l.forEach(c=>{n(c)})})})};return{batch:l=>{let c;t++;try{c=l()}finally{t--,t||o()}return c},batchCalls:l=>(...c)=>{a(()=>{l(...c)})},schedule:a,setNotifyFunction:l=>{n=l},setBatchNotifyFunction:l=>{r=l},setScheduler:l=>{i=l}}}var Dn=xZ(),Gf,Cl,Wf,f$,bZ=(f$=class extends Nc{constructor(){super();Pe(this,Gf,!0);Pe(this,Cl);Pe(this,Wf);ke(this,Wf,t=>{if(!ic&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){W(this,Cl)||this.setEventListener(W(this,Wf))}onUnsubscribe(){var t;this.hasListeners()||((t=W(this,Cl))==null||t.call(this),ke(this,Cl,void 0))}setEventListener(t){var n;ke(this,Wf,t),(n=W(this,Cl))==null||n.call(this),ke(this,Cl,t(this.setOnline.bind(this)))}setOnline(t){W(this,Gf)!==t&&(ke(this,Gf,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return W(this,Gf)}},Gf=new WeakMap,Cl=new WeakMap,Wf=new WeakMap,f$),Iy=new bZ;function wZ(e){return Math.min(1e3*2**e,3e4)}function H$(e){return(e??"online")==="online"?Iy.isOnline():!0}var Wj=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function q$(e){let t=!1,n=0,r;const i=Gj(),a=()=>i.status!=="pending",o=w=>{var S;if(!a()){const E=new Wj(w);g(E),(S=e.onCancel)==null||S.call(e,E)}},l=()=>{t=!0},c=()=>{t=!1},f=()=>pk.isFocused()&&(e.networkMode==="always"||Iy.isOnline())&&e.canRun(),h=()=>H$(e.networkMode)&&e.canRun(),d=w=>{a()||(r==null||r(),i.resolve(w))},g=w=>{a()||(r==null||r(),i.reject(w))},v=()=>new Promise(w=>{var S;r=E=>{(a()||f())&&w(E)},(S=e.onPause)==null||S.call(e)}).then(()=>{var w;r=void 0,a()||(w=e.onContinue)==null||w.call(e)}),b=()=>{if(a())return;let w;const S=n===0?e.initialPromise:void 0;try{w=S??e.fn()}catch(E){w=Promise.reject(E)}Promise.resolve(w).then(d).catch(E=>{var A;if(a())return;const C=e.retry??(ic?0:3),_=e.retryDelay??wZ,N=typeof _=="function"?_(n,E):_,O=C===!0||typeof C=="number"&&n<C||typeof C=="function"&&C(n,E);if(t||!O){g(E);return}n++,(A=e.onFail)==null||A.call(e,n,E),hZ(N).then(()=>f()?void 0:v()).then(()=>{t?g(E):b()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r==null||r(),i),cancelRetry:l,continueRetry:c,canStart:h,start:()=>(h()?b():v().then(b),i)}}var Vu,d$,V$=(d$=class{constructor(){Pe(this,Vu)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Kj(this.gcTime)&&ke(this,Vu,Iu.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ic?1/0:300*1e3))}clearGcTimeout(){W(this,Vu)&&(Iu.clearTimeout(W(this,Vu)),ke(this,Vu,void 0))}},Vu=new WeakMap,d$),Ku,Qf,ra,Yu,pr,up,Xu,Ea,Yo,h$,SZ=(h$=class extends V${constructor(t){super();Pe(this,Ea);Pe(this,Ku);Pe(this,Qf);Pe(this,ra);Pe(this,Yu);Pe(this,pr);Pe(this,up);Pe(this,Xu);ke(this,Xu,!1),ke(this,up,t.defaultOptions),this.setOptions(t.options),this.observers=[],ke(this,Yu,t.client),ke(this,ra,W(this,Yu).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ke(this,Ku,yD(this.options)),this.state=t.state??W(this,Ku),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=W(this,pr))==null?void 0:t.promise}setOptions(t){if(this.options={...W(this,up),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=yD(this.options);n.data!==void 0&&(this.setState(vD(n.data,n.dataUpdatedAt)),ke(this,Ku,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&W(this,ra).remove(this)}setData(t,n){const r=Xj(this.state.data,t,this.options);return tt(this,Ea,Yo).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){tt(this,Ea,Yo).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=W(this,pr))==null?void 0:r.promise;return(i=W(this,pr))==null||i.cancel(t),n?n.then(zr).catch(zr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(W(this,Ku))}isActive(){return this.observers.some(t=>aa(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===hk||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Il(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!F$(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=W(this,pr))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=W(this,pr))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),W(this,ra).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(W(this,pr)&&(W(this,Xu)?W(this,pr).cancel({revert:!0}):W(this,pr).cancelRetry()),this.scheduleGc()),W(this,ra).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||tt(this,Ea,Yo).call(this,{type:"invalidate"})}async fetch(t,n){var c,f,h,d,g,v,b,w,S,E,C,_;if(this.state.fetchStatus!=="idle"&&((c=W(this,pr))==null?void 0:c.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(W(this,pr))return W(this,pr).continueRetry(),W(this,pr).promise}if(t&&this.setOptions(t),!this.options.queryFn){const N=this.observers.find(O=>O.options.queryFn);N&&this.setOptions(N.options)}const r=new AbortController,i=N=>{Object.defineProperty(N,"signal",{enumerable:!0,get:()=>(ke(this,Xu,!0),r.signal)})},a=()=>{const N=U$(this.options,n),A=(()=>{const T={client:W(this,Yu),queryKey:this.queryKey,meta:this.meta};return i(T),T})();return ke(this,Xu,!1),this.options.persister?this.options.persister(N,A,this):N(A)},l=(()=>{const N={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:W(this,Yu),state:this.state,fetchFn:a};return i(N),N})();(f=this.options.behavior)==null||f.onFetch(l,this),ke(this,Qf,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((h=l.fetchOptions)==null?void 0:h.meta))&&tt(this,Ea,Yo).call(this,{type:"fetch",meta:(d=l.fetchOptions)==null?void 0:d.meta}),ke(this,pr,q$({initialPromise:n==null?void 0:n.initialPromise,fn:l.fetchFn,onCancel:N=>{N instanceof Wj&&N.revert&&this.setState({...W(this,Qf),fetchStatus:"idle"}),r.abort()},onFail:(N,O)=>{tt(this,Ea,Yo).call(this,{type:"failed",failureCount:N,error:O})},onPause:()=>{tt(this,Ea,Yo).call(this,{type:"pause"})},onContinue:()=>{tt(this,Ea,Yo).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0}));try{const N=await W(this,pr).start();if(N===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(N),(v=(g=W(this,ra).config).onSuccess)==null||v.call(g,N,this),(w=(b=W(this,ra).config).onSettled)==null||w.call(b,N,this.state.error,this),N}catch(N){if(N instanceof Wj){if(N.silent)return W(this,pr).promise;if(N.revert){if(this.state.data===void 0)throw N;return this.state.data}}throw tt(this,Ea,Yo).call(this,{type:"error",error:N}),(E=(S=W(this,ra).config).onError)==null||E.call(S,N,this),(_=(C=W(this,ra).config).onSettled)==null||_.call(C,this.state.data,N,this),N}finally{this.scheduleGc()}}},Ku=new WeakMap,Qf=new WeakMap,ra=new WeakMap,Yu=new WeakMap,pr=new WeakMap,up=new WeakMap,Xu=new WeakMap,Ea=new WeakSet,Yo=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...K$(r.data,this.options),fetchMeta:t.meta??null};case"success":const i={...r,...vD(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ke(this,Qf,t.manual?i:void 0),i;case"error":const a=t.error;return{...r,error:a,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Dn.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),W(this,ra).notify({query:this,type:"updated",action:t})})},h$);function K$(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:H$(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function vD(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function yD(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var pi,kt,cp,Qr,Gu,Zf,Go,kl,fp,Jf,ed,Wu,Qu,Nl,td,Vt,pm,Qj,Zj,Jj,e_,t_,n_,r_,Y$,m$,c0=(m$=class extends Nc{constructor(t,n){super();Pe(this,Vt);Pe(this,pi);Pe(this,kt);Pe(this,cp);Pe(this,Qr);Pe(this,Gu);Pe(this,Zf);Pe(this,Go);Pe(this,kl);Pe(this,fp);Pe(this,Jf);Pe(this,ed);Pe(this,Wu);Pe(this,Qu);Pe(this,Nl);Pe(this,td,new Set);this.options=n,ke(this,pi,t),ke(this,kl,null),ke(this,Go,Gj()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(W(this,kt).addObserver(this),xD(W(this,kt),this.options)?tt(this,Vt,pm).call(this):this.updateResult(),tt(this,Vt,e_).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return i_(W(this,kt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return i_(W(this,kt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,tt(this,Vt,t_).call(this),tt(this,Vt,n_).call(this),W(this,kt).removeObserver(this)}setOptions(t){const n=this.options,r=W(this,kt);if(this.options=W(this,pi).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof aa(this.options.enabled,W(this,kt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");tt(this,Vt,r_).call(this),W(this,kt).setOptions(this.options),n._defaulted&&!Pm(this.options,n)&&W(this,pi).getQueryCache().notify({type:"observerOptionsUpdated",query:W(this,kt),observer:this});const i=this.hasListeners();i&&bD(W(this,kt),r,this.options,n)&&tt(this,Vt,pm).call(this),this.updateResult(),i&&(W(this,kt)!==r||aa(this.options.enabled,W(this,kt))!==aa(n.enabled,W(this,kt))||Il(this.options.staleTime,W(this,kt))!==Il(n.staleTime,W(this,kt)))&&tt(this,Vt,Qj).call(this);const a=tt(this,Vt,Zj).call(this);i&&(W(this,kt)!==r||aa(this.options.enabled,W(this,kt))!==aa(n.enabled,W(this,kt))||a!==W(this,Nl))&&tt(this,Vt,Jj).call(this,a)}getOptimisticResult(t){const n=W(this,pi).getQueryCache().build(W(this,pi),t),r=this.createResult(n,t);return jZ(this,r)&&(ke(this,Qr,r),ke(this,Zf,this.options),ke(this,Gu,W(this,kt).state)),r}getCurrentResult(){return W(this,Qr)}trackResult(t,n){return new Proxy(t,{get:(r,i)=>(this.trackProp(i),n==null||n(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&W(this,Go).status==="pending"&&W(this,Go).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,i))})}trackProp(t){W(this,td).add(t)}getCurrentQuery(){return W(this,kt)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=W(this,pi).defaultQueryOptions(t),r=W(this,pi).getQueryCache().build(W(this,pi),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return tt(this,Vt,pm).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),W(this,Qr)))}createResult(t,n){var I;const r=W(this,kt),i=this.options,a=W(this,Qr),o=W(this,Gu),l=W(this,Zf),f=t!==r?t.state:W(this,cp),{state:h}=t;let d={...h},g=!1,v;if(n._optimisticResults){const z=this.hasListeners(),F=!z&&xD(t,n),B=z&&bD(t,r,n,i);(F||B)&&(d={...d,...K$(h.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:b,errorUpdatedAt:w,status:S}=d;v=d.data;let E=!1;if(n.placeholderData!==void 0&&v===void 0&&S==="pending"){let z;a!=null&&a.isPlaceholderData&&n.placeholderData===(l==null?void 0:l.placeholderData)?(z=a.data,E=!0):z=typeof n.placeholderData=="function"?n.placeholderData((I=W(this,ed))==null?void 0:I.state.data,W(this,ed)):n.placeholderData,z!==void 0&&(S="success",v=Xj(a==null?void 0:a.data,z,n),g=!0)}if(n.select&&v!==void 0&&!E)if(a&&v===(o==null?void 0:o.data)&&n.select===W(this,fp))v=W(this,Jf);else try{ke(this,fp,n.select),v=n.select(v),v=Xj(a==null?void 0:a.data,v,n),ke(this,Jf,v),ke(this,kl,null)}catch(z){ke(this,kl,z)}W(this,kl)&&(b=W(this,kl),v=W(this,Jf),w=Date.now(),S="error");const C=d.fetchStatus==="fetching",_=S==="pending",N=S==="error",O=_&&C,A=v!==void 0,P={status:S,fetchStatus:d.fetchStatus,isPending:_,isSuccess:S==="success",isError:N,isInitialLoading:O,isLoading:O,data:v,dataUpdatedAt:d.dataUpdatedAt,error:b,errorUpdatedAt:w,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>f.dataUpdateCount||d.errorUpdateCount>f.errorUpdateCount,isFetching:C,isRefetching:C&&!_,isLoadingError:N&&!A,isPaused:d.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:N&&A,isStale:gk(t,n),refetch:this.refetch,promise:W(this,Go),isEnabled:aa(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const z=P.data!==void 0,F=P.status==="error"&&!z,B=V=>{F?V.reject(P.error):z&&V.resolve(P.data)},G=()=>{const V=ke(this,Go,P.promise=Gj());B(V)},L=W(this,Go);switch(L.status){case"pending":t.queryHash===r.queryHash&&B(L);break;case"fulfilled":(F||P.data!==L.value)&&G();break;case"rejected":(!F||P.error!==L.reason)&&G();break}}return P}updateResult(){const t=W(this,Qr),n=this.createResult(W(this,kt),this.options);if(ke(this,Gu,W(this,kt).state),ke(this,Zf,this.options),W(this,Gu).data!==void 0&&ke(this,ed,W(this,kt)),Pm(n,t))return;ke(this,Qr,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!W(this,td).size)return!0;const o=new Set(a??W(this,td));return this.options.throwOnError&&o.add("error"),Object.keys(W(this,Qr)).some(l=>{const c=l;return W(this,Qr)[c]!==t[c]&&o.has(c)})};tt(this,Vt,Y$).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&tt(this,Vt,e_).call(this)}},pi=new WeakMap,kt=new WeakMap,cp=new WeakMap,Qr=new WeakMap,Gu=new WeakMap,Zf=new WeakMap,Go=new WeakMap,kl=new WeakMap,fp=new WeakMap,Jf=new WeakMap,ed=new WeakMap,Wu=new WeakMap,Qu=new WeakMap,Nl=new WeakMap,td=new WeakMap,Vt=new WeakSet,pm=function(t){tt(this,Vt,r_).call(this);let n=W(this,kt).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(zr)),n},Qj=function(){tt(this,Vt,t_).call(this);const t=Il(this.options.staleTime,W(this,kt));if(ic||W(this,Qr).isStale||!Kj(t))return;const r=F$(W(this,Qr).dataUpdatedAt,t)+1;ke(this,Wu,Iu.setTimeout(()=>{W(this,Qr).isStale||this.updateResult()},r))},Zj=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(W(this,kt)):this.options.refetchInterval)??!1},Jj=function(t){tt(this,Vt,n_).call(this),ke(this,Nl,t),!(ic||aa(this.options.enabled,W(this,kt))===!1||!Kj(W(this,Nl))||W(this,Nl)===0)&&ke(this,Qu,Iu.setInterval(()=>{(this.options.refetchIntervalInBackground||pk.isFocused())&&tt(this,Vt,pm).call(this)},W(this,Nl)))},e_=function(){tt(this,Vt,Qj).call(this),tt(this,Vt,Jj).call(this,tt(this,Vt,Zj).call(this))},t_=function(){W(this,Wu)&&(Iu.clearTimeout(W(this,Wu)),ke(this,Wu,void 0))},n_=function(){W(this,Qu)&&(Iu.clearInterval(W(this,Qu)),ke(this,Qu,void 0))},r_=function(){const t=W(this,pi).getQueryCache().build(W(this,pi),this.options);if(t===W(this,kt))return;const n=W(this,kt);ke(this,kt,t),ke(this,cp,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Y$=function(t){Dn.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(W(this,Qr))}),W(this,pi).getQueryCache().notify({query:W(this,kt),type:"observerResultsUpdated"})})},m$);function EZ(e,t){return aa(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function xD(e,t){return EZ(e,t)||e.state.data!==void 0&&i_(e,t,t.refetchOnMount)}function i_(e,t,n){if(aa(t.enabled,e)!==!1&&Il(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&gk(e,t)}return!1}function bD(e,t,n,r){return(e!==t||aa(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&gk(e,n)}function gk(e,t){return aa(t.enabled,e)!==!1&&e.isStaleByTime(Il(t.staleTime,e))}function jZ(e,t){return!Pm(e.getCurrentResult(),t)}function Ly(e){return{onFetch:(t,n)=>{var h,d,g,v,b;const r=t.options,i=(g=(d=(h=t.fetchOptions)==null?void 0:h.meta)==null?void 0:d.fetchMore)==null?void 0:g.direction,a=((v=t.state.data)==null?void 0:v.pages)||[],o=((b=t.state.data)==null?void 0:b.pageParams)||[];let l={pages:[],pageParams:[]},c=0;const f=async()=>{let w=!1;const S=_=>{gZ(_,()=>t.signal,()=>w=!0)},E=U$(t.options,t.fetchOptions),C=async(_,N,O)=>{if(w)return Promise.reject();if(N==null&&_.pages.length)return Promise.resolve(_);const T=(()=>{const F={client:t.client,queryKey:t.queryKey,pageParam:N,direction:O?"backward":"forward",meta:t.options.meta};return S(F),F})(),P=await E(T),{maxPages:I}=t.options,z=O?pZ:mZ;return{pages:z(_.pages,P,I),pageParams:z(_.pageParams,N,I)}};if(i&&a.length){const _=i==="backward",N=_?X$:a_,O={pages:a,pageParams:o},A=N(r,O);l=await C(O,A,_)}else{const _=e??a.length;do{const N=c===0?o[0]??r.initialPageParam:a_(r,l);if(c>0&&N==null)break;l=await C(l,N),c++}while(c<_)}return l};t.options.persister?t.fetchFn=()=>{var w,S;return(S=(w=t.options).persister)==null?void 0:S.call(w,f,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=f}}}function a_(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function X$(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}function _Z(e,t){return t?a_(e,t)!=null:!1}function CZ(e,t){return!t||!e.getPreviousPageParam?!1:X$(e,t)!=null}var kZ=class extends c0{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:Ly()})}getOptimisticResult(e){return e.behavior=Ly(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){var b,w;const{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:a,isError:o,isRefetchError:l}=r,c=(w=(b=n.fetchMeta)==null?void 0:b.fetchMore)==null?void 0:w.direction,f=o&&c==="forward",h=i&&c==="forward",d=o&&c==="backward",g=i&&c==="backward";return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:_Z(t,n.data),hasPreviousPage:CZ(t,n.data),isFetchNextPageError:f,isFetchingNextPage:h,isFetchPreviousPageError:d,isFetchingPreviousPage:g,isRefetchError:l&&!f&&!d,isRefetching:a&&!h&&!g}}},dp,no,Ir,Zu,ro,vl,p$,NZ=(p$=class extends V${constructor(t){super();Pe(this,ro);Pe(this,dp);Pe(this,no);Pe(this,Ir);Pe(this,Zu);ke(this,dp,t.client),this.mutationId=t.mutationId,ke(this,Ir,t.mutationCache),ke(this,no,[]),this.state=t.state||G$(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){W(this,no).includes(t)||(W(this,no).push(t),this.clearGcTimeout(),W(this,Ir).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ke(this,no,W(this,no).filter(n=>n!==t)),this.scheduleGc(),W(this,Ir).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){W(this,no).length||(this.state.status==="pending"?this.scheduleGc():W(this,Ir).remove(this))}continue(){var t;return((t=W(this,Zu))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,l,c,f,h,d,g,v,b,w,S,E,C,_,N,O,A,T;const n=()=>{tt(this,ro,vl).call(this,{type:"continue"})},r={client:W(this,dp),meta:this.options.meta,mutationKey:this.options.mutationKey};ke(this,Zu,q$({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(P,I)=>{tt(this,ro,vl).call(this,{type:"failed",failureCount:P,error:I})},onPause:()=>{tt(this,ro,vl).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>W(this,Ir).canRun(this)}));const i=this.state.status==="pending",a=!W(this,Zu).canStart();try{if(i)n();else{tt(this,ro,vl).call(this,{type:"pending",variables:t,isPaused:a}),W(this,Ir).config.onMutate&&await W(this,Ir).config.onMutate(t,this,r);const I=await((l=(o=this.options).onMutate)==null?void 0:l.call(o,t,r));I!==this.state.context&&tt(this,ro,vl).call(this,{type:"pending",context:I,variables:t,isPaused:a})}const P=await W(this,Zu).start();return await((f=(c=W(this,Ir).config).onSuccess)==null?void 0:f.call(c,P,t,this.state.context,this,r)),await((d=(h=this.options).onSuccess)==null?void 0:d.call(h,P,t,this.state.context,r)),await((v=(g=W(this,Ir).config).onSettled)==null?void 0:v.call(g,P,null,this.state.variables,this.state.context,this,r)),await((w=(b=this.options).onSettled)==null?void 0:w.call(b,P,null,t,this.state.context,r)),tt(this,ro,vl).call(this,{type:"success",data:P}),P}catch(P){try{await((E=(S=W(this,Ir).config).onError)==null?void 0:E.call(S,P,t,this.state.context,this,r))}catch(I){Promise.reject(I)}try{await((_=(C=this.options).onError)==null?void 0:_.call(C,P,t,this.state.context,r))}catch(I){Promise.reject(I)}try{await((O=(N=W(this,Ir).config).onSettled)==null?void 0:O.call(N,void 0,P,this.state.variables,this.state.context,this,r))}catch(I){Promise.reject(I)}try{await((T=(A=this.options).onSettled)==null?void 0:T.call(A,void 0,P,t,this.state.context,r))}catch(I){Promise.reject(I)}throw tt(this,ro,vl).call(this,{type:"error",error:P}),P}finally{W(this,Ir).runNext(this)}}},dp=new WeakMap,no=new WeakMap,Ir=new WeakMap,Zu=new WeakMap,ro=new WeakSet,vl=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Dn.batch(()=>{W(this,no).forEach(r=>{r.onMutationUpdate(t)}),W(this,Ir).notify({mutation:this,type:"updated",action:t})})},p$);function G$(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Wo,ja,hp,g$,AZ=(g$=class extends Nc{constructor(t={}){super();Pe(this,Wo);Pe(this,ja);Pe(this,hp);this.config=t,ke(this,Wo,new Set),ke(this,ja,new Map),ke(this,hp,0)}build(t,n,r){const i=new NZ({client:t,mutationCache:this,mutationId:++Ov(this,hp)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){W(this,Wo).add(t);const n=Pv(t);if(typeof n=="string"){const r=W(this,ja).get(n);r?r.push(t):W(this,ja).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(W(this,Wo).delete(t)){const n=Pv(t);if(typeof n=="string"){const r=W(this,ja).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&W(this,ja).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Pv(t);if(typeof n=="string"){const r=W(this,ja).get(n),i=r==null?void 0:r.find(a=>a.state.status==="pending");return!i||i===t}else return!0}runNext(t){var r;const n=Pv(t);if(typeof n=="string"){const i=(r=W(this,ja).get(n))==null?void 0:r.find(a=>a!==t&&a.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Dn.batch(()=>{W(this,Wo).forEach(t=>{this.notify({type:"removed",mutation:t})}),W(this,Wo).clear(),W(this,ja).clear()})}getAll(){return Array.from(W(this,Wo))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>mD(n,r))}findAll(t={}){return this.getAll().filter(n=>mD(t,n))}notify(t){Dn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Dn.batch(()=>Promise.all(t.map(n=>n.continue().catch(zr))))}},Wo=new WeakMap,ja=new WeakMap,hp=new WeakMap,g$);function Pv(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Qo,Al,gi,Zo,os,yy,o_,v$,OZ=(v$=class extends Nc{constructor(n,r){super();Pe(this,os);Pe(this,Qo);Pe(this,Al);Pe(this,gi);Pe(this,Zo);ke(this,Qo,n),this.setOptions(r),this.bindMethods(),tt(this,os,yy).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var i;const r=this.options;this.options=W(this,Qo).defaultMutationOptions(n),Pm(this.options,r)||W(this,Qo).getMutationCache().notify({type:"observerOptionsUpdated",mutation:W(this,gi),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&ac(r.mutationKey)!==ac(this.options.mutationKey)?this.reset():((i=W(this,gi))==null?void 0:i.state.status)==="pending"&&W(this,gi).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=W(this,gi))==null||n.removeObserver(this)}onMutationUpdate(n){tt(this,os,yy).call(this),tt(this,os,o_).call(this,n)}getCurrentResult(){return W(this,Al)}reset(){var n;(n=W(this,gi))==null||n.removeObserver(this),ke(this,gi,void 0),tt(this,os,yy).call(this),tt(this,os,o_).call(this)}mutate(n,r){var i;return ke(this,Zo,r),(i=W(this,gi))==null||i.removeObserver(this),ke(this,gi,W(this,Qo).getMutationCache().build(W(this,Qo),this.options)),W(this,gi).addObserver(this),W(this,gi).execute(n)}},Qo=new WeakMap,Al=new WeakMap,gi=new WeakMap,Zo=new WeakMap,os=new WeakSet,yy=function(){var r;const n=((r=W(this,gi))==null?void 0:r.state)??G$();ke(this,Al,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},o_=function(n){Dn.batch(()=>{var r,i,a,o,l,c,f,h;if(W(this,Zo)&&this.hasListeners()){const d=W(this,Al).variables,g=W(this,Al).context,v={client:W(this,Qo),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(i=(r=W(this,Zo)).onSuccess)==null||i.call(r,n.data,d,g,v)}catch(b){Promise.reject(b)}try{(o=(a=W(this,Zo)).onSettled)==null||o.call(a,n.data,null,d,g,v)}catch(b){Promise.reject(b)}}else if((n==null?void 0:n.type)==="error"){try{(c=(l=W(this,Zo)).onError)==null||c.call(l,n.error,d,g,v)}catch(b){Promise.reject(b)}try{(h=(f=W(this,Zo)).onSettled)==null||h.call(f,void 0,n.error,d,g,v)}catch(b){Promise.reject(b)}}}this.listeners.forEach(d=>{d(W(this,Al))})})},v$);function wD(e,t){const n=new Set(t);return e.filter(r=>!n.has(r))}function TZ(e,t,n){const r=e.slice(0);return r[t]=n,r}var nd,Oi,rd,id,ia,Ol,mp,pp,gp,vp,Tr,s_,l_,u_,c_,f_,y$,PZ=(y$=class extends Nc{constructor(t,n,r){super();Pe(this,Tr);Pe(this,nd);Pe(this,Oi);Pe(this,rd);Pe(this,id);Pe(this,ia);Pe(this,Ol);Pe(this,mp);Pe(this,pp);Pe(this,gp);Pe(this,vp,[]);ke(this,nd,t),ke(this,id,r),ke(this,rd,[]),ke(this,ia,[]),ke(this,Oi,[]),this.setQueries(n)}onSubscribe(){this.listeners.size===1&&W(this,ia).forEach(t=>{t.subscribe(n=>{tt(this,Tr,c_).call(this,t,n)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,W(this,ia).forEach(t=>{t.destroy()})}setQueries(t,n){ke(this,rd,t),ke(this,id,n),Dn.batch(()=>{const r=W(this,ia),i=tt(this,Tr,u_).call(this,W(this,rd));i.forEach(d=>d.observer.setOptions(d.defaultedQueryOptions));const a=i.map(d=>d.observer),o=a.map(d=>d.getCurrentResult()),l=r.length!==a.length,c=a.some((d,g)=>d!==r[g]),f=l||c,h=f?!0:o.some((d,g)=>{const v=W(this,Oi)[g];return!v||!Pm(d,v)});!f&&!h||(f&&(ke(this,vp,i),ke(this,ia,a)),ke(this,Oi,o),this.hasListeners()&&(f&&(wD(r,a).forEach(d=>{d.destroy()}),wD(a,r).forEach(d=>{d.subscribe(g=>{tt(this,Tr,c_).call(this,d,g)})})),tt(this,Tr,f_).call(this)))})}getCurrentResult(){return W(this,Oi)}getQueries(){return W(this,ia).map(t=>t.getCurrentQuery())}getObservers(){return W(this,ia)}getOptimisticResult(t,n){const r=tt(this,Tr,u_).call(this,t),i=r.map(o=>o.observer.getOptimisticResult(o.defaultedQueryOptions)),a=r.map(o=>o.defaultedQueryOptions.queryHash);return[i,o=>tt(this,Tr,l_).call(this,o??i,n,a),()=>tt(this,Tr,s_).call(this,i,r)]}},nd=new WeakMap,Oi=new WeakMap,rd=new WeakMap,id=new WeakMap,ia=new WeakMap,Ol=new WeakMap,mp=new WeakMap,pp=new WeakMap,gp=new WeakMap,vp=new WeakMap,Tr=new WeakSet,s_=function(t,n){return n.map((r,i)=>{const a=t[i];return r.defaultedQueryOptions.notifyOnChangeProps?a:r.observer.trackResult(a,o=>{n.forEach(l=>{l.observer.trackProp(o)})})})},l_=function(t,n,r){if(n){const i=W(this,gp),a=r!==void 0&&i!==void 0&&(i.length!==r.length||r.some((o,l)=>o!==i[l]));return(!W(this,Ol)||W(this,Oi)!==W(this,pp)||a||n!==W(this,mp))&&(ke(this,mp,n),ke(this,pp,W(this,Oi)),r!==void 0&&ke(this,gp,r),ke(this,Ol,dk(W(this,Ol),n(t)))),W(this,Ol)}return t},u_=function(t){const n=new Map;W(this,ia).forEach(i=>{const a=i.options.queryHash;if(!a)return;const o=n.get(a);o?o.push(i):n.set(a,[i])});const r=[];return t.forEach(i=>{var c;const a=W(this,nd).defaultQueryOptions(i),l=((c=n.get(a.queryHash))==null?void 0:c.shift())??new c0(W(this,nd),a);r.push({defaultedQueryOptions:a,observer:l})}),r},c_=function(t,n){const r=W(this,ia).indexOf(t);r!==-1&&(ke(this,Oi,TZ(W(this,Oi),r,n)),tt(this,Tr,f_).call(this))},f_=function(){var t;if(this.hasListeners()){const n=W(this,Ol),r=tt(this,Tr,s_).call(this,W(this,Oi),W(this,vp)),i=tt(this,Tr,l_).call(this,r,(t=W(this,id))==null?void 0:t.combine);n!==i&&Dn.batch(()=>{this.listeners.forEach(a=>{a(W(this,Oi))})})}},y$),io,x$,MZ=(x$=class extends Nc{constructor(t={}){super();Pe(this,io);this.config=t,ke(this,io,new Map)}build(t,n,r){const i=n.queryKey,a=n.queryHash??fk(i,n);let o=this.get(a);return o||(o=new SZ({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){W(this,io).has(t.queryHash)||(W(this,io).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=W(this,io).get(t.queryHash);n&&(t.destroy(),n===t&&W(this,io).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Dn.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return W(this,io).get(t)}getAll(){return[...W(this,io).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>hD(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>hD(t,r)):n}notify(t){Dn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Dn.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Dn.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},io=new WeakMap,x$),Tn,Tl,Pl,ad,od,Ml,sd,ld,b$,DZ=(b$=class{constructor(e={}){Pe(this,Tn);Pe(this,Tl);Pe(this,Pl);Pe(this,ad);Pe(this,od);Pe(this,Ml);Pe(this,sd);Pe(this,ld);ke(this,Tn,e.queryCache||new MZ),ke(this,Tl,e.mutationCache||new AZ),ke(this,Pl,e.defaultOptions||{}),ke(this,ad,new Map),ke(this,od,new Map),ke(this,Ml,0)}mount(){Ov(this,Ml)._++,W(this,Ml)===1&&(ke(this,sd,pk.subscribe(async e=>{e&&(await this.resumePausedMutations(),W(this,Tn).onFocus())})),ke(this,ld,Iy.subscribe(async e=>{e&&(await this.resumePausedMutations(),W(this,Tn).onOnline())})))}unmount(){var e,t;Ov(this,Ml)._--,W(this,Ml)===0&&((e=W(this,sd))==null||e.call(this),ke(this,sd,void 0),(t=W(this,ld))==null||t.call(this),ke(this,ld,void 0))}isFetching(e){return W(this,Tn).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return W(this,Tl).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=W(this,Tn).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=W(this,Tn).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Il(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return W(this,Tn).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=W(this,Tn).get(r.queryHash),a=i==null?void 0:i.state.data,o=fZ(t,a);if(o!==void 0)return W(this,Tn).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Dn.batch(()=>W(this,Tn).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=W(this,Tn).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=W(this,Tn);Dn.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=W(this,Tn);return Dn.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Dn.batch(()=>W(this,Tn).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(zr).catch(zr)}invalidateQueries(e,t={}){return Dn.batch(()=>(W(this,Tn).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Dn.batch(()=>W(this,Tn).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,n);return n.throwOnError||(a=a.catch(zr)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(r).then(zr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=W(this,Tn).build(this,t);return n.isStaleByTime(Il(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(zr).catch(zr)}fetchInfiniteQuery(e){return e.behavior=Ly(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(zr).catch(zr)}ensureInfiniteQueryData(e){return e.behavior=Ly(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Iy.isOnline()?W(this,Tl).resumePausedMutations():Promise.resolve()}getQueryCache(){return W(this,Tn)}getMutationCache(){return W(this,Tl)}getDefaultOptions(){return W(this,Pl)}setDefaultOptions(e){ke(this,Pl,e)}setQueryDefaults(e,t){W(this,ad).set(ac(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...W(this,ad).values()],n={};return t.forEach(r=>{Tm(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){W(this,od).set(ac(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...W(this,od).values()],n={};return t.forEach(r=>{Tm(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...W(this,Pl).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=fk(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===hk&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...W(this,Pl).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){W(this,Tn).clear(),W(this,Tl).clear()}},Tn=new WeakMap,Tl=new WeakMap,Pl=new WeakMap,ad=new WeakMap,od=new WeakMap,Ml=new WeakMap,sd=new WeakMap,ld=new WeakMap,b$),W$=y.createContext(void 0),gt=e=>{const t=y.useContext(W$);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},RZ=({client:e,children:t})=>(y.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),m.jsx(W$.Provider,{value:e,children:t})),Q$=y.createContext(!1),Z$=()=>y.useContext(Q$);Q$.Provider;function IZ(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var LZ=y.createContext(IZ()),J$=()=>y.useContext(LZ),eB=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?mk(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},tB=e=>{y.useEffect(()=>{e.clearReset()},[e])},nB=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||mk(n,[e.error,r])),rB=e=>{if(e.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...i)=>n(r(...i)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},zZ=(e,t)=>e.isLoading&&e.isFetching&&!t,d_=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,h_=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function $Z({queries:e,...t},n){const r=gt(),i=Z$(),a=J$(),o=y.useMemo(()=>e.map(w=>{const S=r.defaultQueryOptions(w);return S._optimisticResults=i?"isRestoring":"optimistic",S}),[e,r,i]);o.forEach(w=>{rB(w);const S=r.getQueryCache().get(w.queryHash);eB(w,a,S)}),tB(a);const[l]=y.useState(()=>new PZ(r,o,t)),[c,f,h]=l.getOptimisticResult(o,t.combine),d=!i&&t.subscribed!==!1;y.useSyncExternalStore(y.useCallback(w=>d?l.subscribe(Dn.batchCalls(w)):zr,[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),y.useEffect(()=>{l.setQueries(o,t)},[o,t,l]);const v=c.some((w,S)=>d_(o[S],w))?c.flatMap((w,S)=>{const E=o[S];if(E&&d_(E,w)){const C=new c0(r,E);return h_(E,C,a)}return[]}):[];if(v.length>0)throw Promise.all(v);const b=c.find((w,S)=>{const E=o[S];return E&&nB({result:w,errorResetBoundary:a,throwOnError:E.throwOnError,query:r.getQueryCache().get(E.queryHash),suspense:E.suspense})});if(b!=null&&b.error)throw b.error;return f(h())}function iB(e,t,n){var g,v,b,w;const r=Z$(),i=J$(),a=gt(),o=a.defaultQueryOptions(e);(v=(g=a.getDefaultOptions().queries)==null?void 0:g._experimental_beforeQuery)==null||v.call(g,o);const l=a.getQueryCache().get(o.queryHash);o._optimisticResults=r?"isRestoring":"optimistic",rB(o),eB(o,i,l),tB(i);const c=!a.getQueryCache().get(o.queryHash),[f]=y.useState(()=>new t(a,o)),h=f.getOptimisticResult(o),d=!r&&e.subscribed!==!1;if(y.useSyncExternalStore(y.useCallback(S=>{const E=d?f.subscribe(Dn.batchCalls(S)):zr;return f.updateResult(),E},[f,d]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),y.useEffect(()=>{f.setOptions(o)},[o,f]),d_(o,h))throw h_(o,f,i);if(nB({result:h,errorResetBoundary:i,throwOnError:o.throwOnError,query:l,suspense:o.suspense}))throw h.error;if((w=(b=a.getDefaultOptions().queries)==null?void 0:b._experimental_afterQuery)==null||w.call(b,o,h),o.experimental_prefetchInRender&&!ic&&zZ(h,r)){const S=c?h_(o,f,i):l==null?void 0:l.promise;S==null||S.catch(zr).finally(()=>{f.updateResult()})}return o.notifyOnChangeProps?h:f.trackResult(h)}function Wn(e,t){return iB(e,c0)}function Ht(e,t){const n=gt(),[r]=y.useState(()=>new OZ(n,e));y.useEffect(()=>{r.setOptions(e)},[r,e]);const i=y.useSyncExternalStore(y.useCallback(o=>r.subscribe(Dn.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=y.useCallback((o,l)=>{r.mutate(o,l).catch(zr)},[r]);if(i.error&&mk(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}function BZ(e,t){return iB(e,kZ)}var FZ=(e,t,n,r,i,a,o,l)=>{let c=document.documentElement,f=["light","dark"];function h(v){(Array.isArray(e)?e:[e]).forEach(b=>{let w=b==="class",S=w&&a?i.map(E=>a[E]||E):i;w?(c.classList.remove(...S),c.classList.add(a&&a[v]?a[v]:v)):c.setAttribute(b,v)}),d(v)}function d(v){l&&f.includes(v)&&(c.style.colorScheme=v)}function g(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)h(r);else try{let v=localStorage.getItem(t)||n,b=o&&v==="system"?g():v;h(b)}catch{}},SD=["light","dark"],aB="(prefers-color-scheme: dark)",UZ=typeof window>"u",vk=y.createContext(void 0),HZ={setTheme:e=>{},themes:[]},yk=()=>{var e;return(e=y.useContext(vk))!=null?e:HZ},qZ=e=>y.useContext(vk)?y.createElement(y.Fragment,null,e.children):y.createElement(KZ,{...e}),VZ=["light","dark"],KZ=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:n=!0,enableColorScheme:r=!0,storageKey:i="theme",themes:a=VZ,defaultTheme:o=n?"system":"light",attribute:l="data-theme",value:c,children:f,nonce:h,scriptProps:d})=>{let[g,v]=y.useState(()=>XZ(i,o)),[b,w]=y.useState(()=>g==="system"?yS():g),S=c?Object.values(c):a,E=y.useCallback(O=>{let A=O;if(!A)return;O==="system"&&n&&(A=yS());let T=c?c[A]:A,P=t?GZ(h):null,I=document.documentElement,z=F=>{F==="class"?(I.classList.remove(...S),T&&I.classList.add(T)):F.startsWith("data-")&&(T?I.setAttribute(F,T):I.removeAttribute(F))};if(Array.isArray(l)?l.forEach(z):z(l),r){let F=SD.includes(o)?o:null,B=SD.includes(A)?A:F;I.style.colorScheme=B}P==null||P()},[h]),C=y.useCallback(O=>{let A=typeof O=="function"?O(g):O;v(A);try{localStorage.setItem(i,A)}catch{}},[g]),_=y.useCallback(O=>{let A=yS(O);w(A),g==="system"&&n&&!e&&E("system")},[g,e]);y.useEffect(()=>{let O=window.matchMedia(aB);return O.addListener(_),_(O),()=>O.removeListener(_)},[_]),y.useEffect(()=>{let O=A=>{A.key===i&&(A.newValue?v(A.newValue):C(o))};return window.addEventListener("storage",O),()=>window.removeEventListener("storage",O)},[C]),y.useEffect(()=>{E(e??g)},[e,g]);let N=y.useMemo(()=>({theme:g,setTheme:C,forcedTheme:e,resolvedTheme:g==="system"?b:g,themes:n?[...a,"system"]:a,systemTheme:n?b:void 0}),[g,C,e,b,n,a]);return y.createElement(vk.Provider,{value:N},y.createElement(YZ,{forcedTheme:e,storageKey:i,attribute:l,enableSystem:n,enableColorScheme:r,defaultTheme:o,value:c,themes:a,nonce:h,scriptProps:d}),f)},YZ=y.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:i,defaultTheme:a,value:o,themes:l,nonce:c,scriptProps:f})=>{let h=JSON.stringify([n,t,a,e,l,o,r,i]).slice(1,-1);return y.createElement("script",{...f,suppressHydrationWarning:!0,nonce:typeof window>"u"?c:"",dangerouslySetInnerHTML:{__html:`(${FZ.toString()})(${h})`}})}),XZ=(e,t)=>{if(UZ)return;let n;try{n=localStorage.getItem(e)||void 0}catch{}return n||t},GZ=e=>{let t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},yS=e=>(e||(e=window.matchMedia(aB)),e.matches?"dark":"light");function ED(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ls(...e){return t=>{let n=!1;const r=e.map(i=>{const a=ED(i,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let i=0;i<r.length;i++){const a=r[i];typeof a=="function"?a():ED(e[i],null)}}}}function _t(...e){return y.useCallback(ls(...e),e)}function oc(e){const t=WZ(e),n=y.forwardRef((r,i)=>{const{children:a,...o}=r,l=y.Children.toArray(a),c=l.find(ZZ);if(c){const f=c.props.children,h=l.map(d=>d===c?y.Children.count(f)>1?y.Children.only(null):y.isValidElement(f)?f.props.children:null:d);return m.jsx(t,{...o,ref:i,children:y.isValidElement(f)?y.cloneElement(f,void 0,h):null})}return m.jsx(t,{...o,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}var xk=oc("Slot");function WZ(e){const t=y.forwardRef((n,r)=>{const{children:i,...a}=n;if(y.isValidElement(i)){const o=eJ(i),l=JZ(a,i.props);return i.type!==y.Fragment&&(l.ref=r?ls(r,o):o),y.cloneElement(i,l)}return y.Children.count(i)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var oB=Symbol("radix.slottable");function QZ(e){const t=({children:n})=>m.jsx(m.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=oB,t}function ZZ(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===oB}function JZ(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...l)=>{const c=a(...l);return i(...l),c}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function eJ(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var tJ=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],He=tJ.reduce((e,t)=>{const n=oc(`Primitive.${t}`),r=y.forwardRef((i,a)=>{const{asChild:o,...l}=i,c=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(c,{...l,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function sB(e,t){e&&Wl.flushSync(()=>e.dispatchEvent(t))}var lB=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),nJ="VisuallyHidden",uB=y.forwardRef((e,t)=>m.jsx(He.span,{...e,ref:t,style:{...lB,...e.style}}));uB.displayName=nJ;var rJ=uB;function iJ(e,t){const n=y.createContext(t),r=a=>{const{children:o,...l}=a,c=y.useMemo(()=>l,Object.values(l));return m.jsx(n.Provider,{value:c,children:o})};r.displayName=e+"Provider";function i(a){const o=y.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,i]}function Fa(e,t=[]){let n=[];function r(a,o){const l=y.createContext(o),c=n.length;n=[...n,o];const f=d=>{var E;const{scope:g,children:v,...b}=d,w=((E=g==null?void 0:g[e])==null?void 0:E[c])||l,S=y.useMemo(()=>b,Object.values(b));return m.jsx(w.Provider,{value:S,children:v})};f.displayName=a+"Provider";function h(d,g){var w;const v=((w=g==null?void 0:g[e])==null?void 0:w[c])||l,b=y.useContext(v);if(b)return b;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${a}\``)}return[f,h]}const i=()=>{const a=n.map(o=>y.createContext(o));return function(l){const c=(l==null?void 0:l[e])||a;return y.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[r,aJ(i,...t)]}function aJ(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=r.reduce((l,{useScope:c,scopeName:f})=>{const d=c(a)[`__scope${f}`];return{...l,...d}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function bk(e){const t=e+"CollectionProvider",[n,r]=Fa(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=w=>{const{scope:S,children:E}=w,C=Ce.useRef(null),_=Ce.useRef(new Map).current;return m.jsx(i,{scope:S,itemMap:_,collectionRef:C,children:E})};o.displayName=t;const l=e+"CollectionSlot",c=oc(l),f=Ce.forwardRef((w,S)=>{const{scope:E,children:C}=w,_=a(l,E),N=_t(S,_.collectionRef);return m.jsx(c,{ref:N,children:C})});f.displayName=l;const h=e+"CollectionItemSlot",d="data-radix-collection-item",g=oc(h),v=Ce.forwardRef((w,S)=>{const{scope:E,children:C,..._}=w,N=Ce.useRef(null),O=_t(S,N),A=a(h,E);return Ce.useEffect(()=>(A.itemMap.set(N,{ref:N,..._}),()=>void A.itemMap.delete(N))),m.jsx(g,{[d]:"",ref:O,children:C})});v.displayName=h;function b(w){const S=a(e+"CollectionConsumer",w);return Ce.useCallback(()=>{const C=S.collectionRef.current;if(!C)return[];const _=Array.from(C.querySelectorAll(`[${d}]`));return Array.from(S.itemMap.values()).sort((A,T)=>_.indexOf(A.ref.current)-_.indexOf(T.ref.current))},[S.collectionRef,S.itemMap])}return[{Provider:o,Slot:f,ItemSlot:v},b,r]}function Ae(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}var xr=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},oJ=ik[" useInsertionEffect ".trim().toString()]||xr;function Bl({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,a,o]=sJ({defaultProp:t,onChange:n}),l=e!==void 0,c=l?e:i;{const h=y.useRef(e!==void 0);y.useEffect(()=>{const d=h.current;d!==l&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),h.current=l},[l,r])}const f=y.useCallback(h=>{var d;if(l){const g=lJ(h)?h(e):h;g!==e&&((d=o.current)==null||d.call(o,g))}else a(h)},[l,e,a,o]);return[c,f]}function sJ({defaultProp:e,onChange:t}){const[n,r]=y.useState(e),i=y.useRef(n),a=y.useRef(t);return oJ(()=>{a.current=t},[t]),y.useEffect(()=>{var o;i.current!==n&&((o=a.current)==null||o.call(a,n),i.current=n)},[n,i]),[n,r,a]}function lJ(e){return typeof e=="function"}function uJ(e,t){return y.useReducer((n,r)=>t[n][r]??n,e)}var Hr=e=>{const{present:t,children:n}=e,r=cJ(t),i=typeof n=="function"?n({present:r.isPresent}):y.Children.only(n),a=_t(r.ref,fJ(i));return typeof n=="function"||r.isPresent?y.cloneElement(i,{ref:a}):null};Hr.displayName="Presence";function cJ(e){const[t,n]=y.useState(),r=y.useRef(null),i=y.useRef(e),a=y.useRef("none"),o=e?"mounted":"unmounted",[l,c]=uJ(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const f=Mv(r.current);a.current=l==="mounted"?f:"none"},[l]),xr(()=>{const f=r.current,h=i.current;if(h!==e){const g=a.current,v=Mv(f);e?c("MOUNT"):v==="none"||(f==null?void 0:f.display)==="none"?c("UNMOUNT"):c(h&&g!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,c]),xr(()=>{if(t){let f;const h=t.ownerDocument.defaultView??window,d=v=>{const w=Mv(r.current).includes(CSS.escape(v.animationName));if(v.target===t&&w&&(c("ANIMATION_END"),!i.current)){const S=t.style.animationFillMode;t.style.animationFillMode="forwards",f=h.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=S)})}},g=v=>{v.target===t&&(a.current=Mv(r.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{h.clearTimeout(f),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:y.useCallback(f=>{r.current=f?getComputedStyle(f):null,n(f)},[])}}function Mv(e){return(e==null?void 0:e.animationName)||"none"}function fJ(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var dJ=ik[" useId ".trim().toString()]||(()=>{}),hJ=0;function yr(e){const[t,n]=y.useState(dJ());return xr(()=>{n(r=>r??String(hJ++))},[e]),e||(t?`radix-${t}`:"")}var f0="Collapsible",[mJ]=Fa(f0),[pJ,wk]=mJ(f0),cB=y.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:o,...l}=e,[c,f]=Bl({prop:r,defaultProp:i??!1,onChange:o,caller:f0});return m.jsx(pJ,{scope:n,disabled:a,contentId:yr(),open:c,onOpenToggle:y.useCallback(()=>f(h=>!h),[f]),children:m.jsx(He.div,{"data-state":Ek(c),"data-disabled":a?"":void 0,...l,ref:t})})});cB.displayName=f0;var fB="CollapsibleTrigger",dB=y.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,i=wk(fB,n);return m.jsx(He.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":Ek(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:t,onClick:Ae(e.onClick,i.onOpenToggle)})});dB.displayName=fB;var Sk="CollapsibleContent",hB=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=wk(Sk,e.__scopeCollapsible);return m.jsx(Hr,{present:n||i.open,children:({present:a})=>m.jsx(gJ,{...r,ref:t,present:a})})});hB.displayName=Sk;var gJ=y.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:i,...a}=e,o=wk(Sk,n),[l,c]=y.useState(r),f=y.useRef(null),h=_t(t,f),d=y.useRef(0),g=d.current,v=y.useRef(0),b=v.current,w=o.open||l,S=y.useRef(w),E=y.useRef(void 0);return y.useEffect(()=>{const C=requestAnimationFrame(()=>S.current=!1);return()=>cancelAnimationFrame(C)},[]),xr(()=>{const C=f.current;if(C){E.current=E.current||{transitionDuration:C.style.transitionDuration,animationName:C.style.animationName},C.style.transitionDuration="0s",C.style.animationName="none";const _=C.getBoundingClientRect();d.current=_.height,v.current=_.width,S.current||(C.style.transitionDuration=E.current.transitionDuration,C.style.animationName=E.current.animationName),c(r)}},[o.open,r]),m.jsx(He.div,{"data-state":Ek(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!w,...a,ref:h,style:{"--radix-collapsible-content-height":g?`${g}px`:void 0,"--radix-collapsible-content-width":b?`${b}px`:void 0,...e.style},children:w&&i})});function Ek(e){return e?"open":"closed"}var vJ=cB,yJ=y.createContext(void 0);function wp(e){const t=y.useContext(yJ);return e||t||"ltr"}function Ar(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function xJ(e,t=globalThis==null?void 0:globalThis.document){const n=Ar(e);y.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var bJ="DismissableLayer",m_="dismissableLayer.update",wJ="dismissableLayer.pointerDownOutside",SJ="dismissableLayer.focusOutside",jD,mB=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Sp=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:l,...c}=e,f=y.useContext(mB),[h,d]=y.useState(null),g=(h==null?void 0:h.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=y.useState({}),b=_t(t,T=>d(T)),w=Array.from(f.layers),[S]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),E=w.indexOf(S),C=h?w.indexOf(h):-1,_=f.layersWithOutsidePointerEventsDisabled.size>0,N=C>=E,O=_J(T=>{const P=T.target,I=[...f.branches].some(z=>z.contains(P));!N||I||(i==null||i(T),o==null||o(T),T.defaultPrevented||l==null||l())},g),A=CJ(T=>{const P=T.target;[...f.branches].some(z=>z.contains(P))||(a==null||a(T),o==null||o(T),T.defaultPrevented||l==null||l())},g);return xJ(T=>{C===f.layers.size-1&&(r==null||r(T),!T.defaultPrevented&&l&&(T.preventDefault(),l()))},g),y.useEffect(()=>{if(h)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(jD=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(h)),f.layers.add(h),_D(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=jD)}},[h,g,n,f]),y.useEffect(()=>()=>{h&&(f.layers.delete(h),f.layersWithOutsidePointerEventsDisabled.delete(h),_D())},[h,f]),y.useEffect(()=>{const T=()=>v({});return document.addEventListener(m_,T),()=>document.removeEventListener(m_,T)},[]),m.jsx(He.div,{...c,ref:b,style:{pointerEvents:_?N?"auto":"none":void 0,...e.style},onFocusCapture:Ae(e.onFocusCapture,A.onFocusCapture),onBlurCapture:Ae(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:Ae(e.onPointerDownCapture,O.onPointerDownCapture)})});Sp.displayName=bJ;var EJ="DismissableLayerBranch",jJ=y.forwardRef((e,t)=>{const n=y.useContext(mB),r=y.useRef(null),i=_t(t,r);return y.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),m.jsx(He.div,{...e,ref:i})});jJ.displayName=EJ;function _J(e,t=globalThis==null?void 0:globalThis.document){const n=Ar(e),r=y.useRef(!1),i=y.useRef(()=>{});return y.useEffect(()=>{const a=l=>{if(l.target&&!r.current){let c=function(){pB(wJ,n,f,{discrete:!0})};const f={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=c,t.addEventListener("click",i.current,{once:!0})):c()}else t.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function CJ(e,t=globalThis==null?void 0:globalThis.document){const n=Ar(e),r=y.useRef(!1);return y.useEffect(()=>{const i=a=>{a.target&&!r.current&&pB(SJ,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function _D(){const e=new CustomEvent(m_);document.dispatchEvent(e)}function pB(e,t,n,{discrete:r}){const i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?sB(i,a):i.dispatchEvent(a)}var xS="focusScope.autoFocusOnMount",bS="focusScope.autoFocusOnUnmount",CD={bubbles:!1,cancelable:!0},kJ="FocusScope",d0=y.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[l,c]=y.useState(null),f=Ar(i),h=Ar(a),d=y.useRef(null),g=_t(t,w=>c(w)),v=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(r){let w=function(_){if(v.paused||!l)return;const N=_.target;l.contains(N)?d.current=N:yl(d.current,{select:!0})},S=function(_){if(v.paused||!l)return;const N=_.relatedTarget;N!==null&&(l.contains(N)||yl(d.current,{select:!0}))},E=function(_){if(document.activeElement===document.body)for(const O of _)O.removedNodes.length>0&&yl(l)};document.addEventListener("focusin",w),document.addEventListener("focusout",S);const C=new MutationObserver(E);return l&&C.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",S),C.disconnect()}}},[r,l,v.paused]),y.useEffect(()=>{if(l){ND.add(v);const w=document.activeElement;if(!l.contains(w)){const E=new CustomEvent(xS,CD);l.addEventListener(xS,f),l.dispatchEvent(E),E.defaultPrevented||(NJ(MJ(gB(l)),{select:!0}),document.activeElement===w&&yl(l))}return()=>{l.removeEventListener(xS,f),setTimeout(()=>{const E=new CustomEvent(bS,CD);l.addEventListener(bS,h),l.dispatchEvent(E),E.defaultPrevented||yl(w??document.body,{select:!0}),l.removeEventListener(bS,h),ND.remove(v)},0)}}},[l,f,h,v]);const b=y.useCallback(w=>{if(!n&&!r||v.paused)return;const S=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,E=document.activeElement;if(S&&E){const C=w.currentTarget,[_,N]=AJ(C);_&&N?!w.shiftKey&&E===N?(w.preventDefault(),n&&yl(_,{select:!0})):w.shiftKey&&E===_&&(w.preventDefault(),n&&yl(N,{select:!0})):E===C&&w.preventDefault()}},[n,r,v.paused]);return m.jsx(He.div,{tabIndex:-1,...o,ref:g,onKeyDown:b})});d0.displayName=kJ;function NJ(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(yl(r,{select:t}),document.activeElement!==n)return}function AJ(e){const t=gB(e),n=kD(t,e),r=kD(t.reverse(),e);return[n,r]}function gB(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function kD(e,t){for(const n of e)if(!OJ(n,{upTo:t}))return n}function OJ(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function TJ(e){return e instanceof HTMLInputElement&&"select"in e}function yl(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&TJ(e)&&t&&e.select()}}var ND=PJ();function PJ(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=AD(e,t),e.unshift(t)},remove(t){var n;e=AD(e,t),(n=e[0])==null||n.resume()}}}function AD(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function MJ(e){return e.filter(t=>t.tagName!=="A")}var DJ="Portal",Ep=y.forwardRef((e,t)=>{var l;const{container:n,...r}=e,[i,a]=y.useState(!1);xr(()=>a(!0),[]);const o=n||i&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return o?B$.createPortal(m.jsx(He.div,{...r,ref:t}),o):null});Ep.displayName=DJ;var wS=0;function jk(){y.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??OD()),document.body.insertAdjacentElement("beforeend",e[1]??OD()),wS++,()=>{wS===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),wS--}},[])}function OD(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var oo=function(){return oo=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},oo.apply(this,arguments)};function vB(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function RJ(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var xy="right-scroll-bar-position",by="width-before-scroll-bar",IJ="with-scroll-bars-hidden",LJ="--removed-body-scroll-bar-size";function SS(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function zJ(e,t){var n=y.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var $J=typeof window<"u"?y.useLayoutEffect:y.useEffect,TD=new WeakMap;function BJ(e,t){var n=zJ(null,function(r){return e.forEach(function(i){return SS(i,r)})});return $J(function(){var r=TD.get(n);if(r){var i=new Set(r),a=new Set(e),o=n.current;i.forEach(function(l){a.has(l)||SS(l,null)}),a.forEach(function(l){i.has(l)||SS(l,o)})}TD.set(n,e)},[e]),n}function FJ(e){return e}function UJ(e,t){t===void 0&&(t=FJ);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var o=t(a,r);return n.push(o),function(){n=n.filter(function(l){return l!==o})}},assignSyncMedium:function(a){for(r=!0;n.length;){var o=n;n=[],o.forEach(a)}n={push:function(l){return a(l)},filter:function(){return n}}},assignMedium:function(a){r=!0;var o=[];if(n.length){var l=n;n=[],l.forEach(a),o=n}var c=function(){var h=o;o=[],h.forEach(a)},f=function(){return Promise.resolve().then(c)};f(),n={push:function(h){o.push(h),f()},filter:function(h){return o=o.filter(h),n}}}};return i}function HJ(e){e===void 0&&(e={});var t=UJ(null);return t.options=oo({async:!0,ssr:!1},e),t}var yB=function(e){var t=e.sideCar,n=vB(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return y.createElement(r,oo({},n))};yB.isSideCarExport=!0;function qJ(e,t){return e.useMedium(t),yB}var xB=HJ(),ES=function(){},h0=y.forwardRef(function(e,t){var n=y.useRef(null),r=y.useState({onScrollCapture:ES,onWheelCapture:ES,onTouchMoveCapture:ES}),i=r[0],a=r[1],o=e.forwardProps,l=e.children,c=e.className,f=e.removeScrollBar,h=e.enabled,d=e.shards,g=e.sideCar,v=e.noRelative,b=e.noIsolation,w=e.inert,S=e.allowPinchZoom,E=e.as,C=E===void 0?"div":E,_=e.gapMode,N=vB(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),O=g,A=BJ([n,t]),T=oo(oo({},N),i);return y.createElement(y.Fragment,null,h&&y.createElement(O,{sideCar:xB,removeScrollBar:f,shards:d,noRelative:v,noIsolation:b,inert:w,setCallbacks:a,allowPinchZoom:!!S,lockRef:n,gapMode:_}),o?y.cloneElement(y.Children.only(l),oo(oo({},T),{ref:A})):y.createElement(C,oo({},T,{className:c,ref:A}),l))});h0.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};h0.classNames={fullWidth:by,zeroRight:xy};var VJ=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function KJ(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=VJ();return t&&e.setAttribute("nonce",t),e}function YJ(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function XJ(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var GJ=function(){var e=0,t=null;return{add:function(n){e==0&&(t=KJ())&&(YJ(t,n),XJ(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},WJ=function(){var e=GJ();return function(t,n){y.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},bB=function(){var e=WJ(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},QJ={left:0,top:0,right:0,gap:0},jS=function(e){return parseInt(e||"",10)||0},ZJ=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[jS(n),jS(r),jS(i)]},JJ=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return QJ;var t=ZJ(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},eee=bB(),Ff="data-scroll-locked",tee=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,l=e.gap;return n===void 0&&(n="margin"),`
  .`.concat(IJ,` {
   overflow: hidden `).concat(r,`;
   padding-right: `).concat(l,"px ").concat(r,`;
  }
  body[`).concat(Ff,`] {
    overflow: hidden `).concat(r,`;
    overscroll-behavior: contain;
    `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
    padding-left: `.concat(i,`px;
    padding-top: `).concat(a,`px;
    padding-right: `).concat(o,`px;
    margin-left:0;
    margin-top:0;
    margin-right: `).concat(l,"px ").concat(r,`;
    `),n==="padding"&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),`
  }
  
  .`).concat(xy,` {
    right: `).concat(l,"px ").concat(r,`;
  }
  
  .`).concat(by,` {
    margin-right: `).concat(l,"px ").concat(r,`;
  }
  
  .`).concat(xy," .").concat(xy,` {
    right: 0 `).concat(r,`;
  }
  
  .`).concat(by," .").concat(by,` {
    margin-right: 0 `).concat(r,`;
  }
  
  body[`).concat(Ff,`] {
    `).concat(LJ,": ").concat(l,`px;
  }
`)},PD=function(){var e=parseInt(document.body.getAttribute(Ff)||"0",10);return isFinite(e)?e:0},nee=function(){y.useEffect(function(){return document.body.setAttribute(Ff,(PD()+1).toString()),function(){var e=PD()-1;e<=0?document.body.removeAttribute(Ff):document.body.setAttribute(Ff,e.toString())}},[])},ree=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;nee();var a=y.useMemo(function(){return JJ(i)},[i]);return y.createElement(eee,{styles:tee(a,!t,i,n?"":"!important")})},p_=!1;if(typeof window<"u")try{var Dv=Object.defineProperty({},"passive",{get:function(){return p_=!0,!0}});window.addEventListener("test",Dv,Dv),window.removeEventListener("test",Dv,Dv)}catch{p_=!1}var xf=p_?{passive:!1}:!1,iee=function(e){return e.tagName==="TEXTAREA"},wB=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!iee(e)&&n[t]==="visible")},aee=function(e){return wB(e,"overflowY")},oee=function(e){return wB(e,"overflowX")},MD=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=SB(e,r);if(i){var a=EB(e,r),o=a[1],l=a[2];if(o>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},see=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},lee=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},SB=function(e,t){return e==="v"?aee(t):oee(t)},EB=function(e,t){return e==="v"?see(t):lee(t)},uee=function(e,t){return e==="h"&&t==="rtl"?-1:1},cee=function(e,t,n,r,i){var a=uee(e,window.getComputedStyle(t).direction),o=a*r,l=n.target,c=t.contains(l),f=!1,h=o>0,d=0,g=0;do{if(!l)break;var v=EB(e,l),b=v[0],w=v[1],S=v[2],E=w-S-a*b;(b||E)&&SB(e,l)&&(d+=E,g+=b);var C=l.parentNode;l=C&&C.nodeType===Node.DOCUMENT_FRAGMENT_NODE?C.host:C}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(h&&Math.abs(d)<1||!h&&Math.abs(g)<1)&&(f=!0),f},Rv=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},DD=function(e){return[e.deltaX,e.deltaY]},RD=function(e){return e&&"current"in e?e.current:e},fee=function(e,t){return e[0]===t[0]&&e[1]===t[1]},dee=function(e){return`
  .block-interactivity-`.concat(e,` {pointer-events: none;}
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},hee=0,bf=[];function mee(e){var t=y.useRef([]),n=y.useRef([0,0]),r=y.useRef(),i=y.useState(hee++)[0],a=y.useState(bB)[0],o=y.useRef(e);y.useEffect(function(){o.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var w=RJ([e.lockRef.current],(e.shards||[]).map(RD),!0).filter(Boolean);return w.forEach(function(S){return S.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),w.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var l=y.useCallback(function(w,S){if("touches"in w&&w.touches.length===2||w.type==="wheel"&&w.ctrlKey)return!o.current.allowPinchZoom;var E=Rv(w),C=n.current,_="deltaX"in w?w.deltaX:C[0]-E[0],N="deltaY"in w?w.deltaY:C[1]-E[1],O,A=w.target,T=Math.abs(_)>Math.abs(N)?"h":"v";if("touches"in w&&T==="h"&&A.type==="range")return!1;var P=window.getSelection(),I=P&&P.anchorNode,z=I?I===A||I.contains(A):!1;if(z)return!1;var F=MD(T,A);if(!F)return!0;if(F?O=T:(O=T==="v"?"h":"v",F=MD(T,A)),!F)return!1;if(!r.current&&"changedTouches"in w&&(_||N)&&(r.current=O),!O)return!0;var B=r.current||O;return cee(B,S,w,B==="h"?_:N)},[]),c=y.useCallback(function(w){var S=w;if(!(!bf.length||bf[bf.length-1]!==a)){var E="deltaY"in S?DD(S):Rv(S),C=t.current.filter(function(O){return O.name===S.type&&(O.target===S.target||S.target===O.shadowParent)&&fee(O.delta,E)})[0];if(C&&C.should){S.cancelable&&S.preventDefault();return}if(!C){var _=(o.current.shards||[]).map(RD).filter(Boolean).filter(function(O){return O.contains(S.target)}),N=_.length>0?l(S,_[0]):!o.current.noIsolation;N&&S.cancelable&&S.preventDefault()}}},[]),f=y.useCallback(function(w,S,E,C){var _={name:w,delta:S,target:E,should:C,shadowParent:pee(E)};t.current.push(_),setTimeout(function(){t.current=t.current.filter(function(N){return N!==_})},1)},[]),h=y.useCallback(function(w){n.current=Rv(w),r.current=void 0},[]),d=y.useCallback(function(w){f(w.type,DD(w),w.target,l(w,e.lockRef.current))},[]),g=y.useCallback(function(w){f(w.type,Rv(w),w.target,l(w,e.lockRef.current))},[]);y.useEffect(function(){return bf.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:g}),document.addEventListener("wheel",c,xf),document.addEventListener("touchmove",c,xf),document.addEventListener("touchstart",h,xf),function(){bf=bf.filter(function(w){return w!==a}),document.removeEventListener("wheel",c,xf),document.removeEventListener("touchmove",c,xf),document.removeEventListener("touchstart",h,xf)}},[]);var v=e.removeScrollBar,b=e.inert;return y.createElement(y.Fragment,null,b?y.createElement(a,{styles:dee(i)}):null,v?y.createElement(ree,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function pee(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const gee=qJ(xB,mee);var m0=y.forwardRef(function(e,t){return y.createElement(h0,oo({},e,{ref:t,sideCar:gee}))});m0.classNames=h0.classNames;var vee=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},wf=new WeakMap,Iv=new WeakMap,Lv={},_S=0,jB=function(e){return e&&(e.host||jB(e.parentNode))},yee=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=jB(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},xee=function(e,t,n,r){var i=yee(t,Array.isArray(e)?e:[e]);Lv[n]||(Lv[n]=new WeakMap);var a=Lv[n],o=[],l=new Set,c=new Set(i),f=function(d){!d||l.has(d)||(l.add(d),f(d.parentNode))};i.forEach(f);var h=function(d){!d||c.has(d)||Array.prototype.forEach.call(d.children,function(g){if(l.has(g))h(g);else try{var v=g.getAttribute(r),b=v!==null&&v!=="false",w=(wf.get(g)||0)+1,S=(a.get(g)||0)+1;wf.set(g,w),a.set(g,S),o.push(g),w===1&&b&&Iv.set(g,!0),S===1&&g.setAttribute(n,"true"),b||g.setAttribute(r,"true")}catch(E){console.error("aria-hidden: cannot operate on ",g,E)}})};return h(t),l.clear(),_S++,function(){o.forEach(function(d){var g=wf.get(d)-1,v=a.get(d)-1;wf.set(d,g),a.set(d,v),g||(Iv.has(d)||d.removeAttribute(r),Iv.delete(d)),v||d.removeAttribute(n)}),_S--,_S||(wf=new WeakMap,wf=new WeakMap,Iv=new WeakMap,Lv={})}},_k=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=vee(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),xee(r,i,n,"aria-hidden")):function(){return null}},p0="Dialog",[_B]=Fa(p0),[bee,Ua]=_B(p0),CB=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,l=y.useRef(null),c=y.useRef(null),[f,h]=Bl({prop:r,defaultProp:i??!1,onChange:a,caller:p0});return m.jsx(bee,{scope:t,triggerRef:l,contentRef:c,contentId:yr(),titleId:yr(),descriptionId:yr(),open:f,onOpenChange:h,onOpenToggle:y.useCallback(()=>h(d=>!d),[h]),modal:o,children:n})};CB.displayName=p0;var kB="DialogTrigger",wee=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Ua(kB,n),a=_t(t,i.triggerRef);return m.jsx(He.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Nk(i.open),...r,ref:a,onClick:Ae(e.onClick,i.onOpenToggle)})});wee.displayName=kB;var Ck="DialogPortal",[See,NB]=_B(Ck,{forceMount:void 0}),AB=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=Ua(Ck,t);return m.jsx(See,{scope:t,forceMount:n,children:y.Children.map(r,o=>m.jsx(Hr,{present:n||a.open,children:m.jsx(Ep,{asChild:!0,container:i,children:o})}))})};AB.displayName=Ck;var zy="DialogOverlay",OB=y.forwardRef((e,t)=>{const n=NB(zy,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Ua(zy,e.__scopeDialog);return a.modal?m.jsx(Hr,{present:r||a.open,children:m.jsx(jee,{...i,ref:t})}):null});OB.displayName=zy;var Eee=oc("DialogOverlay.RemoveScroll"),jee=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Ua(zy,n);return m.jsx(m0,{as:Eee,allowPinchZoom:!0,shards:[i.contentRef],children:m.jsx(He.div,{"data-state":Nk(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),sc="DialogContent",TB=y.forwardRef((e,t)=>{const n=NB(sc,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Ua(sc,e.__scopeDialog);return m.jsx(Hr,{present:r||a.open,children:a.modal?m.jsx(_ee,{...i,ref:t}):m.jsx(Cee,{...i,ref:t})})});TB.displayName=sc;var _ee=y.forwardRef((e,t)=>{const n=Ua(sc,e.__scopeDialog),r=y.useRef(null),i=_t(t,n.contentRef,r);return y.useEffect(()=>{const a=r.current;if(a)return _k(a)},[]),m.jsx(PB,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ae(e.onCloseAutoFocus,a=>{var o;a.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:Ae(e.onPointerDownOutside,a=>{const o=a.detail.originalEvent,l=o.button===0&&o.ctrlKey===!0;(o.button===2||l)&&a.preventDefault()}),onFocusOutside:Ae(e.onFocusOutside,a=>a.preventDefault())})}),Cee=y.forwardRef((e,t)=>{const n=Ua(sc,e.__scopeDialog),r=y.useRef(!1),i=y.useRef(!1);return m.jsx(PB,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,l;(o=e.onCloseAutoFocus)==null||o.call(e,a),a.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),a.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:a=>{var c,f;(c=e.onInteractOutside)==null||c.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=a.target;((f=n.triggerRef.current)==null?void 0:f.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),PB=y.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,l=Ua(sc,n),c=y.useRef(null),f=_t(t,c);return jk(),m.jsxs(m.Fragment,{children:[m.jsx(d0,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:m.jsx(Sp,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":Nk(l.open),...o,ref:f,onDismiss:()=>l.onOpenChange(!1)})}),m.jsxs(m.Fragment,{children:[m.jsx(kee,{titleId:l.titleId}),m.jsx(Aee,{contentRef:c,descriptionId:l.descriptionId})]})]})}),kk="DialogTitle",MB=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Ua(kk,n);return m.jsx(He.h2,{id:i.titleId,...r,ref:t})});MB.displayName=kk;var DB="DialogDescription",RB=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Ua(DB,n);return m.jsx(He.p,{id:i.descriptionId,...r,ref:t})});RB.displayName=DB;var IB="DialogClose",LB=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Ua(IB,n);return m.jsx(He.button,{type:"button",...r,ref:t,onClick:Ae(e.onClick,()=>i.onOpenChange(!1))})});LB.displayName=IB;function Nk(e){return e?"open":"closed"}var zB="DialogTitleWarning",[i5e,$B]=iJ(zB,{contentName:sc,titleName:kk,docsSlug:"dialog"}),kee=({titleId:e})=>{const t=$B(zB),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.

If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.

For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return y.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Nee="DialogDescriptionWarning",Aee=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${$B(Nee).contentName}}.`;return y.useEffect(()=>{var a;const i=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Ak=CB,Ok=AB,Tk=OB,Pk=TB,BB=MB,FB=RB,Mk=LB,CS={exports:{}},kS={};/**
 * @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 ID;function Oee(){if(ID)return kS;ID=1;var e=Pd();function t(d,g){return d===g&&(d!==0||1/d===1/g)||d!==d&&g!==g}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,a=e.useLayoutEffect,o=e.useDebugValue;function l(d,g){var v=g(),b=r({inst:{value:v,getSnapshot:g}}),w=b[0].inst,S=b[1];return a(function(){w.value=v,w.getSnapshot=g,c(w)&&S({inst:w})},[d,v,g]),i(function(){return c(w)&&S({inst:w}),d(function(){c(w)&&S({inst:w})})},[d]),o(v),v}function c(d){var g=d.getSnapshot;d=d.value;try{var v=g();return!n(d,v)}catch{return!0}}function f(d,g){return g()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:l;return kS.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,kS}var LD;function Tee(){return LD||(LD=1,CS.exports=Oee()),CS.exports}function Pee(e){const t=y.useRef({value:e,previous:e});return y.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Mee(e){const[t,n]=y.useState(void 0);return xr(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const a=i[0];let o,l;if("borderBoxSize"in a){const c=a.borderBoxSize,f=Array.isArray(c)?c[0]:c;o=f.inlineSize,l=f.blockSize}else o=e.offsetWidth,l=e.offsetHeight;n({width:o,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const Dee=["top","right","bottom","left"],Fl=Math.min,Ti=Math.max,$y=Math.round,zv=Math.floor,fo=e=>({x:e,y:e}),Ree={left:"right",right:"left",bottom:"top",top:"bottom"};function g_(e,t,n){return Ti(e,Fl(t,n))}function us(e,t){return typeof e=="function"?e(t):e}function cs(e){return e.split("-")[0]}function Rd(e){return e.split("-")[1]}function Dk(e){return e==="x"?"y":"x"}function Rk(e){return e==="y"?"height":"width"}function so(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Ik(e){return Dk(so(e))}function Iee(e,t,n){n===void 0&&(n=!1);const r=Rd(e),i=Ik(e),a=Rk(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(o=By(o)),[o,By(o)]}function Lee(e){const t=By(e);return[v_(e),t,v_(t)]}function v_(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const zD=["left","right"],$D=["right","left"],zee=["top","bottom"],$ee=["bottom","top"];function Bee(e,t,n){switch(e){case"top":case"bottom":return n?t?$D:zD:t?zD:$D;case"left":case"right":return t?zee:$ee;default:return[]}}function Fee(e,t,n,r){const i=Rd(e);let a=Bee(cs(e),n==="start",r);return i&&(a=a.map(o=>o+"-"+i),t&&(a=a.concat(a.map(v_)))),a}function By(e){const t=cs(e);return Ree[t]+e.slice(t.length)}function Uee(e){return{top:0,right:0,bottom:0,left:0,...e}}function UB(e){return typeof e!="number"?Uee(e):{top:e,right:e,bottom:e,left:e}}function Fy(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function BD(e,t,n){let{reference:r,floating:i}=e;const a=so(t),o=Ik(t),l=Rk(o),c=cs(t),f=a==="y",h=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,g=r[l]/2-i[l]/2;let v;switch(c){case"top":v={x:h,y:r.y-i.height};break;case"bottom":v={x:h,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:d};break;case"left":v={x:r.x-i.width,y:d};break;default:v={x:r.x,y:r.y}}switch(Rd(t)){case"start":v[o]-=g*(n&&f?-1:1);break;case"end":v[o]+=g*(n&&f?-1:1);break}return v}async function Hee(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:a,rects:o,elements:l,strategy:c}=e,{boundary:f="clippingAncestors",rootBoundary:h="viewport",elementContext:d="floating",altBoundary:g=!1,padding:v=0}=us(t,e),b=UB(v),S=l[g?d==="floating"?"reference":"floating":d],E=Fy(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(S)))==null||n?S:S.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:f,rootBoundary:h,strategy:c})),C=d==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,_=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),N=await(a.isElement==null?void 0:a.isElement(_))?await(a.getScale==null?void 0:a.getScale(_))||{x:1,y:1}:{x:1,y:1},O=Fy(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:C,offsetParent:_,strategy:c}):C);return{top:(E.top-O.top+b.top)/N.y,bottom:(O.bottom-E.bottom+b.bottom)/N.y,left:(E.left-O.left+b.left)/N.x,right:(O.right-E.right+b.right)/N.x}}const qee=50,Vee=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:o}=n,l=o.detectOverflow?o:{...o,detectOverflow:Hee},c=await(o.isRTL==null?void 0:o.isRTL(t));let f=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:h,y:d}=BD(f,r,c),g=r,v=0;const b={};for(let w=0;w<a.length;w++){const S=a[w];if(!S)continue;const{name:E,fn:C}=S,{x:_,y:N,data:O,reset:A}=await C({x:h,y:d,initialPlacement:r,placement:g,strategy:i,middlewareData:b,rects:f,platform:l,elements:{reference:e,floating:t}});h=_??h,d=N??d,b[E]={...b[E],...O},A&&v<qee&&(v++,typeof A=="object"&&(A.placement&&(g=A.placement),A.rects&&(f=A.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):A.rects),{x:h,y:d}=BD(f,g,c)),w=-1)}return{x:h,y:d,placement:g,strategy:i,middlewareData:b}},Kee=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:a,platform:o,elements:l,middlewareData:c}=t,{element:f,padding:h=0}=us(e,t)||{};if(f==null)return{};const d=UB(h),g={x:n,y:r},v=Ik(i),b=Rk(v),w=await o.getDimensions(f),S=v==="y",E=S?"top":"left",C=S?"bottom":"right",_=S?"clientHeight":"clientWidth",N=a.reference[b]+a.reference[v]-g[v]-a.floating[b],O=g[v]-a.reference[v],A=await(o.getOffsetParent==null?void 0:o.getOffsetParent(f));let T=A?A[_]:0;(!T||!await(o.isElement==null?void 0:o.isElement(A)))&&(T=l.floating[_]||a.floating[b]);const P=N/2-O/2,I=T/2-w[b]/2-1,z=Fl(d[E],I),F=Fl(d[C],I),B=z,G=T-w[b]-F,L=T/2-w[b]/2+P,V=g_(B,L,G),D=!c.arrow&&Rd(i)!=null&&L!==V&&a.reference[b]/2-(L<B?z:F)-w[b]/2<0,q=D?L<B?L-B:L-G:0;return{[v]:g[v]+q,data:{[v]:V,centerOffset:L-V-q,...D&&{alignmentOffset:q}},reset:D}}}),Yee=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:a,rects:o,initialPlacement:l,platform:c,elements:f}=t,{mainAxis:h=!0,crossAxis:d=!0,fallbackPlacements:g,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:w=!0,...S}=us(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const E=cs(i),C=so(l),_=cs(l)===l,N=await(c.isRTL==null?void 0:c.isRTL(f.floating)),O=g||(_||!w?[By(l)]:Lee(l)),A=b!=="none";!g&&A&&O.push(...Fee(l,w,b,N));const T=[l,...O],P=await c.detectOverflow(t,S),I=[];let z=((r=a.flip)==null?void 0:r.overflows)||[];if(h&&I.push(P[E]),d){const L=Iee(i,o,N);I.push(P[L[0]],P[L[1]])}if(z=[...z,{placement:i,overflows:I}],!I.every(L=>L<=0)){var F,B;const L=(((F=a.flip)==null?void 0:F.index)||0)+1,V=T[L];if(V&&(!(d==="alignment"?C!==so(V):!1)||z.every(X=>so(X.placement)===C?X.overflows[0]>0:!0)))return{data:{index:L,overflows:z},reset:{placement:V}};let D=(B=z.filter(q=>q.overflows[0]<=0).sort((q,X)=>q.overflows[1]-X.overflows[1])[0])==null?void 0:B.placement;if(!D)switch(v){case"bestFit":{var G;const q=(G=z.filter(X=>{if(A){const K=so(X.placement);return K===C||K==="y"}return!0}).map(X=>[X.placement,X.overflows.filter(K=>K>0).reduce((K,R)=>K+R,0)]).sort((X,K)=>X[1]-K[1])[0])==null?void 0:G[0];q&&(D=q);break}case"initialPlacement":D=l;break}if(i!==D)return{reset:{placement:D}}}return{}}}};function FD(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function UD(e){return Dee.some(t=>e[t]>=0)}const Xee=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:i="referenceHidden",...a}=us(e,t);switch(i){case"referenceHidden":{const o=await r.detectOverflow(t,{...a,elementContext:"reference"}),l=FD(o,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:UD(l)}}}case"escaped":{const o=await r.detectOverflow(t,{...a,altBoundary:!0}),l=FD(o,n.floating);return{data:{escapedOffsets:l,escaped:UD(l)}}}default:return{}}}}},HB=new Set(["left","top"]);async function Gee(e,t){const{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=cs(n),l=Rd(n),c=so(n)==="y",f=HB.has(o)?-1:1,h=a&&c?-1:1,d=us(t,e);let{mainAxis:g,crossAxis:v,alignmentAxis:b}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&typeof b=="number"&&(v=l==="end"?b*-1:b),c?{x:v*h,y:g*f}:{x:g*f,y:v*h}}const Wee=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:a,placement:o,middlewareData:l}=t,c=await Gee(t,e);return o===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:a+c.y,data:{...c,placement:o}}}}},Qee=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:l=!1,limiter:c={fn:E=>{let{x:C,y:_}=E;return{x:C,y:_}}},...f}=us(e,t),h={x:n,y:r},d=await a.detectOverflow(t,f),g=so(cs(i)),v=Dk(g);let b=h[v],w=h[g];if(o){const E=v==="y"?"top":"left",C=v==="y"?"bottom":"right",_=b+d[E],N=b-d[C];b=g_(_,b,N)}if(l){const E=g==="y"?"top":"left",C=g==="y"?"bottom":"right",_=w+d[E],N=w-d[C];w=g_(_,w,N)}const S=c.fn({...t,[v]:b,[g]:w});return{...S,data:{x:S.x-n,y:S.y-r,enabled:{[v]:o,[g]:l}}}}}},Zee=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:l=0,mainAxis:c=!0,crossAxis:f=!0}=us(e,t),h={x:n,y:r},d=so(i),g=Dk(d);let v=h[g],b=h[d];const w=us(l,t),S=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(c){const _=g==="y"?"height":"width",N=a.reference[g]-a.floating[_]+S.mainAxis,O=a.reference[g]+a.reference[_]-S.mainAxis;v<N?v=N:v>O&&(v=O)}if(f){var E,C;const _=g==="y"?"width":"height",N=HB.has(cs(i)),O=a.reference[d]-a.floating[_]+(N&&((E=o.offset)==null?void 0:E[d])||0)+(N?0:S.crossAxis),A=a.reference[d]+a.reference[_]+(N?0:((C=o.offset)==null?void 0:C[d])||0)-(N?S.crossAxis:0);b<O?b=O:b>A&&(b=A)}return{[g]:v,[d]:b}}}},Jee=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:a,platform:o,elements:l}=t,{apply:c=()=>{},...f}=us(e,t),h=await o.detectOverflow(t,f),d=cs(i),g=Rd(i),v=so(i)==="y",{width:b,height:w}=a.floating;let S,E;d==="top"||d==="bottom"?(S=d,E=g===(await(o.isRTL==null?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(E=d,S=g==="end"?"top":"bottom");const C=w-h.top-h.bottom,_=b-h.left-h.right,N=Fl(w-h[S],C),O=Fl(b-h[E],_),A=!t.middlewareData.shift;let T=N,P=O;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(P=_),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(T=C),A&&!g){const z=Ti(h.left,0),F=Ti(h.right,0),B=Ti(h.top,0),G=Ti(h.bottom,0);v?P=b-2*(z!==0||F!==0?z+F:Ti(h.left,h.right)):T=w-2*(B!==0||G!==0?B+G:Ti(h.top,h.bottom))}await c({...t,availableWidth:P,availableHeight:T});const I=await o.getDimensions(l.floating);return b!==I.width||w!==I.height?{reset:{rects:!0}}:{}}}};function g0(){return typeof window<"u"}function Id(e){return qB(e)?(e.nodeName||"").toLowerCase():"#document"}function Ri(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function wo(e){var t;return(t=(qB(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function qB(e){return g0()?e instanceof Node||e instanceof Ri(e).Node:!1}function Ma(e){return g0()?e instanceof Element||e instanceof Ri(e).Element:!1}function bs(e){return g0()?e instanceof HTMLElement||e instanceof Ri(e).HTMLElement:!1}function HD(e){return!g0()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ri(e).ShadowRoot}function jp(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Da(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!=="inline"&&i!=="contents"}function ete(e){return/^(table|td|th)$/.test(Id(e))}function v0(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const tte=/transform|translate|scale|rotate|perspective|filter/,nte=/paint|layout|strict|content/,ju=e=>!!e&&e!=="none";let NS;function Lk(e){const t=Ma(e)?Da(e):e;return ju(t.transform)||ju(t.translate)||ju(t.scale)||ju(t.rotate)||ju(t.perspective)||!zk()&&(ju(t.backdropFilter)||ju(t.filter))||tte.test(t.willChange||"")||nte.test(t.contain||"")}function rte(e){let t=Ul(e);for(;bs(t)&&!ud(t);){if(Lk(t))return t;if(v0(t))return null;t=Ul(t)}return null}function zk(){return NS==null&&(NS=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),NS}function ud(e){return/^(html|body|#document)$/.test(Id(e))}function Da(e){return Ri(e).getComputedStyle(e)}function y0(e){return Ma(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ul(e){if(Id(e)==="html")return e;const t=e.assignedSlot||e.parentNode||HD(e)&&e.host||wo(e);return HD(t)?t.host:t}function VB(e){const t=Ul(e);return ud(t)?e.ownerDocument?e.ownerDocument.body:e.body:bs(t)&&jp(t)?t:VB(t)}function Mm(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=VB(e),a=i===((r=e.ownerDocument)==null?void 0:r.body),o=Ri(i);if(a){const l=y_(o);return t.concat(o,o.visualViewport||[],jp(i)?i:[],l&&n?Mm(l):[])}else return t.concat(i,Mm(i,[],n))}function y_(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function KB(e){const t=Da(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=bs(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,l=$y(n)!==a||$y(r)!==o;return l&&(n=a,r=o),{width:n,height:r,$:l}}function $k(e){return Ma(e)?e:e.contextElement}function Uf(e){const t=$k(e);if(!bs(t))return fo(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:a}=KB(t);let o=(a?$y(n.width):n.width)/r,l=(a?$y(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const ite=fo(0);function YB(e){const t=Ri(e);return!zk()||!t.visualViewport?ite:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ate(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ri(e)?!1:t}function lc(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=$k(e);let o=fo(1);t&&(r?Ma(r)&&(o=Uf(r)):o=Uf(e));const l=ate(a,n,r)?YB(a):fo(0);let c=(i.left+l.x)/o.x,f=(i.top+l.y)/o.y,h=i.width/o.x,d=i.height/o.y;if(a){const g=Ri(a),v=r&&Ma(r)?Ri(r):r;let b=g,w=y_(b);for(;w&&r&&v!==b;){const S=Uf(w),E=w.getBoundingClientRect(),C=Da(w),_=E.left+(w.clientLeft+parseFloat(C.paddingLeft))*S.x,N=E.top+(w.clientTop+parseFloat(C.paddingTop))*S.y;c*=S.x,f*=S.y,h*=S.x,d*=S.y,c+=_,f+=N,b=Ri(w),w=y_(b)}}return Fy({width:h,height:d,x:c,y:f})}function x0(e,t){const n=y0(e).scrollLeft;return t?t.left+n:lc(wo(e)).left+n}function XB(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-x0(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function ote(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const a=i==="fixed",o=wo(r),l=t?v0(t.floating):!1;if(r===o||l&&a)return n;let c={scrollLeft:0,scrollTop:0},f=fo(1);const h=fo(0),d=bs(r);if((d||!d&&!a)&&((Id(r)!=="body"||jp(o))&&(c=y0(r)),d)){const v=lc(r);f=Uf(r),h.x=v.x+r.clientLeft,h.y=v.y+r.clientTop}const g=o&&!d&&!a?XB(o,c):fo(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-c.scrollLeft*f.x+h.x+g.x,y:n.y*f.y-c.scrollTop*f.y+h.y+g.y}}function ste(e){return Array.from(e.getClientRects())}function lte(e){const t=wo(e),n=y0(e),r=e.ownerDocument.body,i=Ti(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Ti(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+x0(e);const l=-n.scrollTop;return Da(r).direction==="rtl"&&(o+=Ti(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:l}}const qD=25;function ute(e,t){const n=Ri(e),r=wo(e),i=n.visualViewport;let a=r.clientWidth,o=r.clientHeight,l=0,c=0;if(i){a=i.width,o=i.height;const h=zk();(!h||h&&t==="fixed")&&(l=i.offsetLeft,c=i.offsetTop)}const f=x0(r);if(f<=0){const h=r.ownerDocument,d=h.body,g=getComputedStyle(d),v=h.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,b=Math.abs(r.clientWidth-d.clientWidth-v);b<=qD&&(a-=b)}else f<=qD&&(a+=f);return{width:a,height:o,x:l,y:c}}function cte(e,t){const n=lc(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=bs(e)?Uf(e):fo(1),o=e.clientWidth*a.x,l=e.clientHeight*a.y,c=i*a.x,f=r*a.y;return{width:o,height:l,x:c,y:f}}function VD(e,t,n){let r;if(t==="viewport")r=ute(e,n);else if(t==="document")r=lte(wo(e));else if(Ma(t))r=cte(t,n);else{const i=YB(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Fy(r)}function GB(e,t){const n=Ul(e);return n===t||!Ma(n)||ud(n)?!1:Da(n).position==="fixed"||GB(n,t)}function fte(e,t){const n=t.get(e);if(n)return n;let r=Mm(e,[],!1).filter(l=>Ma(l)&&Id(l)!=="body"),i=null;const a=Da(e).position==="fixed";let o=a?Ul(e):e;for(;Ma(o)&&!ud(o);){const l=Da(o),c=Lk(o);!c&&l.position==="fixed"&&(i=null),(a?!c&&!i:!c&&l.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||jp(o)&&!c&&GB(e,o))?r=r.filter(h=>h!==o):i=l,o=Ul(o)}return t.set(e,r),r}function dte(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?v0(t)?[]:fte(t,this._c):[].concat(n),r],l=VD(t,o[0],i);let c=l.top,f=l.right,h=l.bottom,d=l.left;for(let g=1;g<o.length;g++){const v=VD(t,o[g],i);c=Ti(v.top,c),f=Fl(v.right,f),h=Fl(v.bottom,h),d=Ti(v.left,d)}return{width:f-d,height:h-c,x:d,y:c}}function hte(e){const{width:t,height:n}=KB(e);return{width:t,height:n}}function mte(e,t,n){const r=bs(t),i=wo(t),a=n==="fixed",o=lc(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const c=fo(0);function f(){c.x=x0(i)}if(r||!r&&!a)if((Id(t)!=="body"||jp(i))&&(l=y0(t)),r){const v=lc(t,!0,a,t);c.x=v.x+t.clientLeft,c.y=v.y+t.clientTop}else i&&f();a&&!r&&i&&f();const h=i&&!r&&!a?XB(i,l):fo(0),d=o.left+l.scrollLeft-c.x-h.x,g=o.top+l.scrollTop-c.y-h.y;return{x:d,y:g,width:o.width,height:o.height}}function AS(e){return Da(e).position==="static"}function KD(e,t){if(!bs(e)||Da(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return wo(e)===n&&(n=n.ownerDocument.body),n}function WB(e,t){const n=Ri(e);if(v0(e))return n;if(!bs(e)){let i=Ul(e);for(;i&&!ud(i);){if(Ma(i)&&!AS(i))return i;i=Ul(i)}return n}let r=KD(e,t);for(;r&&ete(r)&&AS(r);)r=KD(r,t);return r&&ud(r)&&AS(r)&&!Lk(r)?n:r||rte(e)||n}const pte=async function(e){const t=this.getOffsetParent||WB,n=this.getDimensions,r=await n(e.floating);return{reference:mte(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function gte(e){return Da(e).direction==="rtl"}const vte={convertOffsetParentRelativeRectToViewportRelativeRect:ote,getDocumentElement:wo,getClippingRect:dte,getOffsetParent:WB,getElementRects:pte,getClientRects:ste,getDimensions:hte,getScale:Uf,isElement:Ma,isRTL:gte};function QB(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function yte(e,t){let n=null,r;const i=wo(e);function a(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function o(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),a();const f=e.getBoundingClientRect(),{left:h,top:d,width:g,height:v}=f;if(l||t(),!g||!v)return;const b=zv(d),w=zv(i.clientWidth-(h+g)),S=zv(i.clientHeight-(d+v)),E=zv(h),_={rootMargin:-b+"px "+-w+"px "+-S+"px "+-E+"px",threshold:Ti(0,Fl(1,c))||1};let N=!0;function O(A){const T=A[0].intersectionRatio;if(T!==c){if(!N)return o();T?o(!1,T):r=setTimeout(()=>{o(!1,1e-7)},1e3)}T===1&&!QB(f,e.getBoundingClientRect())&&o(),N=!1}try{n=new IntersectionObserver(O,{..._,root:i.ownerDocument})}catch{n=new IntersectionObserver(O,_)}n.observe(e)}return o(!0),a}function xte(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,f=$k(e),h=i||a?[...f?Mm(f):[],...t?Mm(t):[]]:[];h.forEach(E=>{i&&E.addEventListener("scroll",n,{passive:!0}),a&&E.addEventListener("resize",n)});const d=f&&l?yte(f,n):null;let g=-1,v=null;o&&(v=new ResizeObserver(E=>{let[C]=E;C&&C.target===f&&v&&t&&(v.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var _;(_=v)==null||_.observe(t)})),n()}),f&&!c&&v.observe(f),t&&v.observe(t));let b,w=c?lc(e):null;c&&S();function S(){const E=lc(e);w&&!QB(w,E)&&n(),w=E,b=requestAnimationFrame(S)}return n(),()=>{var E;h.forEach(C=>{i&&C.removeEventListener("scroll",n),a&&C.removeEventListener("resize",n)}),d==null||d(),(E=v)==null||E.disconnect(),v=null,c&&cancelAnimationFrame(b)}}const bte=Wee,wte=Qee,Ste=Yee,Ete=Jee,jte=Xee,YD=Kee,_te=Zee,Cte=(e,t,n)=>{const r=new Map,i={platform:vte,...n},a={...i.platform,_c:r};return Vee(e,t,{...i,platform:a})};var kte=typeof document<"u",Nte=function(){},wy=kte?y.useLayoutEffect:Nte;function Uy(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Uy(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const a=i[r];if(!(a==="_owner"&&e.$$typeof)&&!Uy(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function ZB(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function XD(e,t){const n=ZB(e);return Math.round(t*n)/n}function OS(e){const t=y.useRef(e);return wy(()=>{t.current=e}),t}function Ate(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:l=!0,whileElementsMounted:c,open:f}=e,[h,d]=y.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,v]=y.useState(r);Uy(g,r)||v(r);const[b,w]=y.useState(null),[S,E]=y.useState(null),C=y.useCallback(X=>{X!==A.current&&(A.current=X,w(X))},[]),_=y.useCallback(X=>{X!==T.current&&(T.current=X,E(X))},[]),N=a||b,O=o||S,A=y.useRef(null),T=y.useRef(null),P=y.useRef(h),I=c!=null,z=OS(c),F=OS(i),B=OS(f),G=y.useCallback(()=>{if(!A.current||!T.current)return;const X={placement:t,strategy:n,middleware:g};F.current&&(X.platform=F.current),Cte(A.current,T.current,X).then(K=>{const R={...K,isPositioned:B.current!==!1};L.current&&!Uy(P.current,R)&&(P.current=R,Wl.flushSync(()=>{d(R)}))})},[g,t,n,F,B]);wy(()=>{f===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,d(X=>({...X,isPositioned:!1})))},[f]);const L=y.useRef(!1);wy(()=>(L.current=!0,()=>{L.current=!1}),[]),wy(()=>{if(N&&(A.current=N),O&&(T.current=O),N&&O){if(z.current)return z.current(N,O,G);G()}},[N,O,G,z,I]);const V=y.useMemo(()=>({reference:A,floating:T,setReference:C,setFloating:_}),[C,_]),D=y.useMemo(()=>({reference:N,floating:O}),[N,O]),q=y.useMemo(()=>{const X={position:n,left:0,top:0};if(!D.floating)return X;const K=XD(D.floating,h.x),R=XD(D.floating,h.y);return l?{...X,transform:"translate("+K+"px, "+R+"px)",...ZB(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:K,top:R}},[n,l,D.floating,h.x,h.y]);return y.useMemo(()=>({...h,update:G,refs:V,elements:D,floatingStyles:q}),[h,G,V,D,q])}const Ote=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?YD({element:r.current,padding:i}).fn(n):{}:r?YD({element:r,padding:i}).fn(n):{}}}},Tte=(e,t)=>{const n=bte(e);return{name:n.name,fn:n.fn,options:[e,t]}},Pte=(e,t)=>{const n=wte(e);return{name:n.name,fn:n.fn,options:[e,t]}},Mte=(e,t)=>({fn:_te(e).fn,options:[e,t]}),Dte=(e,t)=>{const n=Ste(e);return{name:n.name,fn:n.fn,options:[e,t]}},Rte=(e,t)=>{const n=Ete(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ite=(e,t)=>{const n=jte(e);return{name:n.name,fn:n.fn,options:[e,t]}},Lte=(e,t)=>{const n=Ote(e);return{name:n.name,fn:n.fn,options:[e,t]}};var zte="Arrow",JB=y.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...a}=e;return m.jsx(He.svg,{...a,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:m.jsx("polygon",{points:"0,0 30,0 15,10"})})});JB.displayName=zte;var $te=JB,Bk="Popper",[e6,Ld]=Fa(Bk),[Bte,t6]=e6(Bk),n6=e=>{const{__scopePopper:t,children:n}=e,[r,i]=y.useState(null);return m.jsx(Bte,{scope:t,anchor:r,onAnchorChange:i,children:n})};n6.displayName=Bk;var r6="PopperAnchor",i6=y.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,a=t6(r6,n),o=y.useRef(null),l=_t(t,o),c=y.useRef(null);return y.useEffect(()=>{const f=c.current;c.current=(r==null?void 0:r.current)||o.current,f!==c.current&&a.onAnchorChange(c.current)}),r?null:m.jsx(He.div,{...i,ref:l})});i6.displayName=r6;var Fk="PopperContent",[Fte,Ute]=e6(Fk),a6=y.forwardRef((e,t)=>{var ae,ie,ee,se,pe,re;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:a="center",alignOffset:o=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:f=[],collisionPadding:h=0,sticky:d="partial",hideWhenDetached:g=!1,updatePositionStrategy:v="optimized",onPlaced:b,...w}=e,S=t6(Fk,n),[E,C]=y.useState(null),_=_t(t,we=>C(we)),[N,O]=y.useState(null),A=Mee(N),T=(A==null?void 0:A.width)??0,P=(A==null?void 0:A.height)??0,I=r+(a!=="center"?"-"+a:""),z=typeof h=="number"?h:{top:0,right:0,bottom:0,left:0,...h},F=Array.isArray(f)?f:[f],B=F.length>0,G={padding:z,boundary:F.filter(qte),altBoundary:B},{refs:L,floatingStyles:V,placement:D,isPositioned:q,middlewareData:X}=Ate({strategy:"fixed",placement:I,whileElementsMounted:(...we)=>xte(...we,{animationFrame:v==="always"}),elements:{reference:S.anchor},middleware:[Tte({mainAxis:i+P,alignmentAxis:o}),c&&Pte({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?Mte():void 0,...G}),c&&Dte({...G}),Rte({...G,apply:({elements:we,rects:Ee,availableWidth:$e,availableHeight:Ne})=>{const{width:et,height:Xe}=Ee.reference,Ke=we.floating.style;Ke.setProperty("--radix-popper-available-width",`${$e}px`),Ke.setProperty("--radix-popper-available-height",`${Ne}px`),Ke.setProperty("--radix-popper-anchor-width",`${et}px`),Ke.setProperty("--radix-popper-anchor-height",`${Xe}px`)}}),N&&Lte({element:N,padding:l}),Vte({arrowWidth:T,arrowHeight:P}),g&&Ite({strategy:"referenceHidden",...G})]}),[K,R]=l6(D),H=Ar(b);xr(()=>{q&&(H==null||H())},[q,H]);const U=(ae=X.arrow)==null?void 0:ae.x,$=(ie=X.arrow)==null?void 0:ie.y,Q=((ee=X.arrow)==null?void 0:ee.centerOffset)!==0,[J,ne]=y.useState();return xr(()=>{E&&ne(window.getComputedStyle(E).zIndex)},[E]),m.jsx("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...V,transform:q?V.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:J,"--radix-popper-transform-origin":[(se=X.transformOrigin)==null?void 0:se.x,(pe=X.transformOrigin)==null?void 0:pe.y].join(" "),...((re=X.hide)==null?void 0:re.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:m.jsx(Fte,{scope:n,placedSide:K,onArrowChange:O,arrowX:U,arrowY:$,shouldHideArrow:Q,children:m.jsx(He.div,{"data-side":K,"data-align":R,...w,ref:_,style:{...w.style,animation:q?void 0:"none"}})})})});a6.displayName=Fk;var o6="PopperArrow",Hte={top:"bottom",right:"left",bottom:"top",left:"right"},s6=y.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,a=Ute(o6,r),o=Hte[a.placedSide];return m.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:m.jsx($te,{...i,ref:n,style:{...i.style,display:"block"}})})});s6.displayName=o6;function qte(e){return e!==null}var Vte=e=>({name:"transformOrigin",options:e,fn(t){var S,E,C;const{placement:n,rects:r,middlewareData:i}=t,o=((S=i.arrow)==null?void 0:S.centerOffset)!==0,l=o?0:e.arrowWidth,c=o?0:e.arrowHeight,[f,h]=l6(n),d={start:"0%",center:"50%",end:"100%"}[h],g=(((E=i.arrow)==null?void 0:E.x)??0)+l/2,v=(((C=i.arrow)==null?void 0:C.y)??0)+c/2;let b="",w="";return f==="bottom"?(b=o?d:`${g}px`,w=`${-c}px`):f==="top"?(b=o?d:`${g}px`,w=`${r.floating.height+c}px`):f==="right"?(b=`${-c}px`,w=o?d:`${v}px`):f==="left"&&(b=`${r.floating.width+c}px`,w=o?d:`${v}px`),{data:{x:b,y:w}}}});function l6(e){const[t,n="center"]=e.split("-");return[t,n]}var Uk=n6,Hk=i6,qk=a6,Vk=s6,TS="rovingFocusGroup.onEntryFocus",Kte={bubbles:!1,cancelable:!0},_p="RovingFocusGroup",[x_,u6,Yte]=bk(_p),[Xte,b0]=Fa(_p,[Yte]),[Gte,Wte]=Xte(_p),c6=y.forwardRef((e,t)=>m.jsx(x_.Provider,{scope:e.__scopeRovingFocusGroup,children:m.jsx(x_.Slot,{scope:e.__scopeRovingFocusGroup,children:m.jsx(Qte,{...e,ref:t})})}));c6.displayName=_p;var Qte=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:f,preventScrollOnEntryFocus:h=!1,...d}=e,g=y.useRef(null),v=_t(t,g),b=wp(a),[w,S]=Bl({prop:o,defaultProp:l??null,onChange:c,caller:_p}),[E,C]=y.useState(!1),_=Ar(f),N=u6(n),O=y.useRef(!1),[A,T]=y.useState(0);return y.useEffect(()=>{const P=g.current;if(P)return P.addEventListener(TS,_),()=>P.removeEventListener(TS,_)},[_]),m.jsx(Gte,{scope:n,orientation:r,dir:b,loop:i,currentTabStopId:w,onItemFocus:y.useCallback(P=>S(P),[S]),onItemShiftTab:y.useCallback(()=>C(!0),[]),onFocusableItemAdd:y.useCallback(()=>T(P=>P+1),[]),onFocusableItemRemove:y.useCallback(()=>T(P=>P-1),[]),children:m.jsx(He.div,{tabIndex:E||A===0?-1:0,"data-orientation":r,...d,ref:v,style:{outline:"none",...e.style},onMouseDown:Ae(e.onMouseDown,()=>{O.current=!0}),onFocus:Ae(e.onFocus,P=>{const I=!O.current;if(P.target===P.currentTarget&&I&&!E){const z=new CustomEvent(TS,Kte);if(P.currentTarget.dispatchEvent(z),!z.defaultPrevented){const F=N().filter(D=>D.focusable),B=F.find(D=>D.active),G=F.find(D=>D.id===w),V=[B,G,...F].filter(Boolean).map(D=>D.ref.current);h6(V,h)}}O.current=!1}),onBlur:Ae(e.onBlur,()=>C(!1))})})}),f6="RovingFocusGroupItem",d6=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...l}=e,c=yr(),f=a||c,h=Wte(f6,n),d=h.currentTabStopId===f,g=u6(n),{onFocusableItemAdd:v,onFocusableItemRemove:b,currentTabStopId:w}=h;return y.useEffect(()=>{if(r)return v(),()=>b()},[r,v,b]),m.jsx(x_.ItemSlot,{scope:n,id:f,focusable:r,active:i,children:m.jsx(He.span,{tabIndex:d?0:-1,"data-orientation":h.orientation,...l,ref:t,onMouseDown:Ae(e.onMouseDown,S=>{r?h.onItemFocus(f):S.preventDefault()}),onFocus:Ae(e.onFocus,()=>h.onItemFocus(f)),onKeyDown:Ae(e.onKeyDown,S=>{if(S.key==="Tab"&&S.shiftKey){h.onItemShiftTab();return}if(S.target!==S.currentTarget)return;const E=ene(S,h.orientation,h.dir);if(E!==void 0){if(S.metaKey||S.ctrlKey||S.altKey||S.shiftKey)return;S.preventDefault();let _=g().filter(N=>N.focusable).map(N=>N.ref.current);if(E==="last")_.reverse();else if(E==="prev"||E==="next"){E==="prev"&&_.reverse();const N=_.indexOf(S.currentTarget);_=h.loop?tne(_,N+1):_.slice(N+1)}setTimeout(()=>h6(_))}}),children:typeof o=="function"?o({isCurrentTabStop:d,hasTabStop:w!=null}):o})})});d6.displayName=f6;var Zte={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Jte(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function ene(e,t,n){const r=Jte(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Zte[r]}function h6(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function tne(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var m6=c6,p6=d6,b_=["Enter"," "],nne=["ArrowDown","PageUp","Home"],g6=["ArrowUp","PageDown","End"],rne=[...nne,...g6],ine={ltr:[...b_,"ArrowRight"],rtl:[...b_,"ArrowLeft"]},ane={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Cp="Menu",[Dm,one,sne]=bk(Cp),[Ac,v6]=Fa(Cp,[sne,Ld,b0]),w0=Ld(),y6=b0(),[lne,Oc]=Ac(Cp),[une,kp]=Ac(Cp),x6=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,l=w0(t),[c,f]=y.useState(null),h=y.useRef(!1),d=Ar(a),g=wp(i);return y.useEffect(()=>{const v=()=>{h.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>h.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),m.jsx(Uk,{...l,children:m.jsx(lne,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:f,children:m.jsx(une,{scope:t,onClose:y.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:h,dir:g,modal:o,children:r})})})};x6.displayName=Cp;var cne="MenuAnchor",Kk=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=w0(n);return m.jsx(Hk,{...i,...r,ref:t})});Kk.displayName=cne;var Yk="MenuPortal",[fne,b6]=Ac(Yk,{forceMount:void 0}),w6=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=Oc(Yk,t);return m.jsx(fne,{scope:t,forceMount:n,children:m.jsx(Hr,{present:n||a.open,children:m.jsx(Ep,{asChild:!0,container:i,children:r})})})};w6.displayName=Yk;var ua="MenuContent",[dne,Xk]=Ac(ua),S6=y.forwardRef((e,t)=>{const n=b6(ua,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=Oc(ua,e.__scopeMenu),o=kp(ua,e.__scopeMenu);return m.jsx(Dm.Provider,{scope:e.__scopeMenu,children:m.jsx(Hr,{present:r||a.open,children:m.jsx(Dm.Slot,{scope:e.__scopeMenu,children:o.modal?m.jsx(hne,{...i,ref:t}):m.jsx(mne,{...i,ref:t})})})})}),hne=y.forwardRef((e,t)=>{const n=Oc(ua,e.__scopeMenu),r=y.useRef(null),i=_t(t,r);return y.useEffect(()=>{const a=r.current;if(a)return _k(a)},[]),m.jsx(Gk,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Ae(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),mne=y.forwardRef((e,t)=>{const n=Oc(ua,e.__scopeMenu);return m.jsx(Gk,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),pne=oc("MenuContent.ScrollLock"),Gk=y.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:f,onPointerDownOutside:h,onFocusOutside:d,onInteractOutside:g,onDismiss:v,disableOutsideScroll:b,...w}=e,S=Oc(ua,n),E=kp(ua,n),C=w0(n),_=y6(n),N=one(n),[O,A]=y.useState(null),T=y.useRef(null),P=_t(t,T,S.onContentChange),I=y.useRef(0),z=y.useRef(""),F=y.useRef(0),B=y.useRef(null),G=y.useRef("right"),L=y.useRef(0),V=b?m0:y.Fragment,D=b?{as:pne,allowPinchZoom:!0}:void 0,q=K=>{var ae,ie;const R=z.current+K,H=N().filter(ee=>!ee.disabled),U=document.activeElement,$=(ae=H.find(ee=>ee.ref.current===U))==null?void 0:ae.textValue,Q=H.map(ee=>ee.textValue),J=kne(Q,R,$),ne=(ie=H.find(ee=>ee.textValue===J))==null?void 0:ie.ref.current;(function ee(se){z.current=se,window.clearTimeout(I.current),se!==""&&(I.current=window.setTimeout(()=>ee(""),1e3))})(R),ne&&setTimeout(()=>ne.focus())};y.useEffect(()=>()=>window.clearTimeout(I.current),[]),jk();const X=y.useCallback(K=>{var H,U;return G.current===((H=B.current)==null?void 0:H.side)&&Ane(K,(U=B.current)==null?void 0:U.area)},[]);return m.jsx(dne,{scope:n,searchRef:z,onItemEnter:y.useCallback(K=>{X(K)&&K.preventDefault()},[X]),onItemLeave:y.useCallback(K=>{var R;X(K)||((R=T.current)==null||R.focus(),A(null))},[X]),onTriggerLeave:y.useCallback(K=>{X(K)&&K.preventDefault()},[X]),pointerGraceTimerRef:F,onPointerGraceIntentChange:y.useCallback(K=>{B.current=K},[]),children:m.jsx(V,{...D,children:m.jsx(d0,{asChild:!0,trapped:i,onMountAutoFocus:Ae(a,K=>{var R;K.preventDefault(),(R=T.current)==null||R.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:m.jsx(Sp,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:f,onPointerDownOutside:h,onFocusOutside:d,onInteractOutside:g,onDismiss:v,children:m.jsx(m6,{asChild:!0,..._,dir:E.dir,orientation:"vertical",loop:r,currentTabStopId:O,onCurrentTabStopIdChange:A,onEntryFocus:Ae(c,K=>{E.isUsingKeyboardRef.current||K.preventDefault()}),preventScrollOnEntryFocus:!0,children:m.jsx(qk,{role:"menu","aria-orientation":"vertical","data-state":z6(S.open),"data-radix-menu-content":"",dir:E.dir,...C,...w,ref:P,style:{outline:"none",...w.style},onKeyDown:Ae(w.onKeyDown,K=>{const H=K.target.closest("[data-radix-menu-content]")===K.currentTarget,U=K.ctrlKey||K.altKey||K.metaKey,$=K.key.length===1;H&&(K.key==="Tab"&&K.preventDefault(),!U&&$&&q(K.key));const Q=T.current;if(K.target!==Q||!rne.includes(K.key))return;K.preventDefault();const ne=N().filter(ae=>!ae.disabled).map(ae=>ae.ref.current);g6.includes(K.key)&&ne.reverse(),_ne(ne)}),onBlur:Ae(e.onBlur,K=>{K.currentTarget.contains(K.target)||(window.clearTimeout(I.current),z.current="")}),onPointerMove:Ae(e.onPointerMove,Rm(K=>{const R=K.target,H=L.current!==K.clientX;if(K.currentTarget.contains(R)&&H){const U=K.clientX>L.current?"right":"left";G.current=U,L.current=K.clientX}}))})})})})})})});S6.displayName=ua;var gne="MenuGroup",Wk=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(He.div,{role:"group",...r,ref:t})});Wk.displayName=gne;var vne="MenuLabel",E6=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(He.div,{...r,ref:t})});E6.displayName=vne;var Hy="MenuItem",GD="menu.itemSelect",S0=y.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,a=y.useRef(null),o=kp(Hy,e.__scopeMenu),l=Xk(Hy,e.__scopeMenu),c=_t(t,a),f=y.useRef(!1),h=()=>{const d=a.current;if(!n&&d){const g=new CustomEvent(GD,{bubbles:!0,cancelable:!0});d.addEventListener(GD,v=>r==null?void 0:r(v),{once:!0}),sB(d,g),g.defaultPrevented?f.current=!1:o.onClose()}};return m.jsx(j6,{...i,ref:c,disabled:n,onClick:Ae(e.onClick,h),onPointerDown:d=>{var g;(g=e.onPointerDown)==null||g.call(e,d),f.current=!0},onPointerUp:Ae(e.onPointerUp,d=>{var g;f.current||(g=d.currentTarget)==null||g.click()}),onKeyDown:Ae(e.onKeyDown,d=>{const g=l.searchRef.current!=="";n||g&&d.key===" "||b_.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});S0.displayName=Hy;var j6=y.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=Xk(Hy,n),l=y6(n),c=y.useRef(null),f=_t(t,c),[h,d]=y.useState(!1),[g,v]=y.useState("");return y.useEffect(()=>{const b=c.current;b&&v((b.textContent??"").trim())},[a.children]),m.jsx(Dm.ItemSlot,{scope:n,disabled:r,textValue:i??g,children:m.jsx(p6,{asChild:!0,...l,focusable:!r,children:m.jsx(He.div,{role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:f,onPointerMove:Ae(e.onPointerMove,Rm(b=>{r?o.onItemLeave(b):(o.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Ae(e.onPointerLeave,Rm(b=>o.onItemLeave(b))),onFocus:Ae(e.onFocus,()=>d(!0)),onBlur:Ae(e.onBlur,()=>d(!1))})})})}),yne="MenuCheckboxItem",_6=y.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...i}=e;return m.jsx(O6,{scope:e.__scopeMenu,checked:n,children:m.jsx(S0,{role:"menuitemcheckbox","aria-checked":qy(n)?"mixed":n,...i,ref:t,"data-state":Zk(n),onSelect:Ae(i.onSelect,()=>r==null?void 0:r(qy(n)?!0:!n),{checkForDefaultPrevented:!1})})})});_6.displayName=yne;var C6="MenuRadioGroup",[xne,bne]=Ac(C6,{value:void 0,onValueChange:()=>{}}),k6=y.forwardRef((e,t)=>{const{value:n,onValueChange:r,...i}=e,a=Ar(r);return m.jsx(xne,{scope:e.__scopeMenu,value:n,onValueChange:a,children:m.jsx(Wk,{...i,ref:t})})});k6.displayName=C6;var N6="MenuRadioItem",A6=y.forwardRef((e,t)=>{const{value:n,...r}=e,i=bne(N6,e.__scopeMenu),a=n===i.value;return m.jsx(O6,{scope:e.__scopeMenu,checked:a,children:m.jsx(S0,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":Zk(a),onSelect:Ae(r.onSelect,()=>{var o;return(o=i.onValueChange)==null?void 0:o.call(i,n)},{checkForDefaultPrevented:!1})})})});A6.displayName=N6;var Qk="MenuItemIndicator",[O6,wne]=Ac(Qk,{checked:!1}),T6=y.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...i}=e,a=wne(Qk,n);return m.jsx(Hr,{present:r||qy(a.checked)||a.checked===!0,children:m.jsx(He.span,{...i,ref:t,"data-state":Zk(a.checked)})})});T6.displayName=Qk;var Sne="MenuSeparator",P6=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(He.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});P6.displayName=Sne;var Ene="MenuArrow",M6=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=w0(n);return m.jsx(Vk,{...i,...r,ref:t})});M6.displayName=Ene;var jne="MenuSub",[a5e,D6]=Ac(jne),gm="MenuSubTrigger",R6=y.forwardRef((e,t)=>{const n=Oc(gm,e.__scopeMenu),r=kp(gm,e.__scopeMenu),i=D6(gm,e.__scopeMenu),a=Xk(gm,e.__scopeMenu),o=y.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=a,f={__scopeMenu:e.__scopeMenu},h=y.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return y.useEffect(()=>h,[h]),y.useEffect(()=>{const d=l.current;return()=>{window.clearTimeout(d),c(null)}},[l,c]),m.jsx(Kk,{asChild:!0,...f,children:m.jsx(j6,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":z6(n.open),...e,ref:ls(t,i.onTriggerChange),onClick:d=>{var g;(g=e.onClick)==null||g.call(e,d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Ae(e.onPointerMove,Rm(d=>{a.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),h()},100))})),onPointerLeave:Ae(e.onPointerLeave,Rm(d=>{var v,b;h();const g=(v=n.content)==null?void 0:v.getBoundingClientRect();if(g){const w=(b=n.content)==null?void 0:b.dataset.side,S=w==="right",E=S?-5:5,C=g[S?"left":"right"],_=g[S?"right":"left"];a.onPointerGraceIntentChange({area:[{x:d.clientX+E,y:d.clientY},{x:C,y:g.top},{x:_,y:g.top},{x:_,y:g.bottom},{x:C,y:g.bottom}],side:w}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(d),d.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:Ae(e.onKeyDown,d=>{var v;const g=a.searchRef.current!=="";e.disabled||g&&d.key===" "||ine[r.dir].includes(d.key)&&(n.onOpenChange(!0),(v=n.content)==null||v.focus(),d.preventDefault())})})})});R6.displayName=gm;var I6="MenuSubContent",L6=y.forwardRef((e,t)=>{const n=b6(ua,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=Oc(ua,e.__scopeMenu),o=kp(ua,e.__scopeMenu),l=D6(I6,e.__scopeMenu),c=y.useRef(null),f=_t(t,c);return m.jsx(Dm.Provider,{scope:e.__scopeMenu,children:m.jsx(Hr,{present:r||a.open,children:m.jsx(Dm.Slot,{scope:e.__scopeMenu,children:m.jsx(Gk,{id:l.contentId,"aria-labelledby":l.triggerId,...i,ref:f,align:"start",side:o.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:h=>{var d;o.isUsingKeyboardRef.current&&((d=c.current)==null||d.focus()),h.preventDefault()},onCloseAutoFocus:h=>h.preventDefault(),onFocusOutside:Ae(e.onFocusOutside,h=>{h.target!==l.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:Ae(e.onEscapeKeyDown,h=>{o.onClose(),h.preventDefault()}),onKeyDown:Ae(e.onKeyDown,h=>{var v;const d=h.currentTarget.contains(h.target),g=ane[o.dir].includes(h.key);d&&g&&(a.onOpenChange(!1),(v=l.trigger)==null||v.focus(),h.preventDefault())})})})})})});L6.displayName=I6;function z6(e){return e?"open":"closed"}function qy(e){return e==="indeterminate"}function Zk(e){return qy(e)?"indeterminate":e?"checked":"unchecked"}function _ne(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Cne(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function kne(e,t,n){const i=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let o=Cne(e,Math.max(a,0));i.length===1&&(o=o.filter(f=>f!==n));const c=o.find(f=>f.toLowerCase().startsWith(i.toLowerCase()));return c!==n?c:void 0}function Nne(e,t){const{x:n,y:r}=e;let i=!1;for(let a=0,o=t.length-1;a<t.length;o=a++){const l=t[a],c=t[o],f=l.x,h=l.y,d=c.x,g=c.y;h>r!=g>r&&n<(d-f)*(r-h)/(g-h)+f&&(i=!i)}return i}function Ane(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Nne(n,t)}function Rm(e){return t=>t.pointerType==="mouse"?e(t):void 0}var One=x6,Tne=Kk,Pne=w6,Mne=S6,Dne=Wk,Rne=E6,Ine=S0,Lne=_6,zne=k6,$ne=A6,Bne=T6,Fne=P6,Une=M6,Hne=R6,qne=L6,E0="DropdownMenu",[Vne]=Fa(E0,[v6]),ri=v6(),[Kne,$6]=Vne(E0),B6=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:l=!0}=e,c=ri(t),f=y.useRef(null),[h,d]=Bl({prop:i,defaultProp:a??!1,onChange:o,caller:E0});return m.jsx(Kne,{scope:t,triggerId:yr(),triggerRef:f,contentId:yr(),open:h,onOpenChange:d,onOpenToggle:y.useCallback(()=>d(g=>!g),[d]),modal:l,children:m.jsx(One,{...c,open:h,onOpenChange:d,dir:r,modal:l,children:n})})};B6.displayName=E0;var F6="DropdownMenuTrigger",U6=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=$6(F6,n),o=ri(n);return m.jsx(Tne,{asChild:!0,...o,children:m.jsx(He.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:ls(t,a.triggerRef),onPointerDown:Ae(e.onPointerDown,l=>{!r&&l.button===0&&l.ctrlKey===!1&&(a.onOpenToggle(),a.open||l.preventDefault())}),onKeyDown:Ae(e.onKeyDown,l=>{r||(["Enter"," "].includes(l.key)&&a.onOpenToggle(),l.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});U6.displayName=F6;var Yne="DropdownMenuPortal",H6=e=>{const{__scopeDropdownMenu:t,...n}=e,r=ri(t);return m.jsx(Pne,{...r,...n})};H6.displayName=Yne;var q6="DropdownMenuContent",V6=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=$6(q6,n),a=ri(n),o=y.useRef(!1);return m.jsx(Mne,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:Ae(e.onCloseAutoFocus,l=>{var c;o.current||(c=i.triggerRef.current)==null||c.focus(),o.current=!1,l.preventDefault()}),onInteractOutside:Ae(e.onInteractOutside,l=>{const c=l.detail.originalEvent,f=c.button===0&&c.ctrlKey===!0,h=c.button===2||f;(!i.modal||h)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});V6.displayName=q6;var Xne="DropdownMenuGroup",Gne=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=ri(n);return m.jsx(Dne,{...i,...r,ref:t})});Gne.displayName=Xne;var Wne="DropdownMenuLabel",Qne=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=ri(n);return m.jsx(Rne,{...i,...r,ref:t})});Qne.displayName=Wne;var Zne="DropdownMenuItem",K6=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=ri(n);return m.jsx(Ine,{...i,...r,ref:t})});K6.displayName=Zne;var Jne="DropdownMenuCheckboxItem",Y6=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=ri(n);return m.jsx(Lne,{...i,...r,ref:t})});Y6.displayName=Jne;var ere="DropdownMenuRadioGroup",tre=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=ri(n);return m.jsx(zne,{...i,...r,ref:t})});tre.displayName=ere;var nre="DropdownMenuRadioItem",rre=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=ri(n);return m.jsx($ne,{...i,...r,ref:t})});rre.displayName=nre;var ire="DropdownMenuItemIndicator",X6=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=ri(n);return m.jsx(Bne,{...i,...r,ref:t})});X6.displayName=ire;var are="DropdownMenuSeparator",ore=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=ri(n);return m.jsx(Fne,{...i,...r,ref:t})});ore.displayName=are;var sre="DropdownMenuArrow",lre=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=ri(n);return m.jsx(Une,{...i,...r,ref:t})});lre.displayName=sre;var ure="DropdownMenuSubTrigger",cre=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=ri(n);return m.jsx(Hne,{...i,...r,ref:t})});cre.displayName=ure;var fre="DropdownMenuSubContent",dre=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=ri(n);return m.jsx(qne,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});dre.displayName=fre;var hre=B6,mre=U6,pre=H6,gre=V6,vre=K6,yre=Y6,xre=X6,bre="Label",G6=y.forwardRef((e,t)=>m.jsx(He.label,{...e,ref:t,onMouseDown:n=>{var i;n.target.closest("button, input, select, textarea")||((i=e.onMouseDown)==null||i.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));G6.displayName=bre;var wre=G6;function w_(e,[t,n]){return Math.min(n,Math.max(t,e))}function Sre(e,t){return y.useReducer((n,r)=>t[n][r]??n,e)}var Jk="ScrollArea",[W6]=Fa(Jk),[Ere,ma]=W6(Jk),Q6=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:i,scrollHideDelay:a=600,...o}=e,[l,c]=y.useState(null),[f,h]=y.useState(null),[d,g]=y.useState(null),[v,b]=y.useState(null),[w,S]=y.useState(null),[E,C]=y.useState(0),[_,N]=y.useState(0),[O,A]=y.useState(!1),[T,P]=y.useState(!1),I=_t(t,F=>c(F)),z=wp(i);return m.jsx(Ere,{scope:n,type:r,dir:z,scrollHideDelay:a,scrollArea:l,viewport:f,onViewportChange:h,content:d,onContentChange:g,scrollbarX:v,onScrollbarXChange:b,scrollbarXEnabled:O,onScrollbarXEnabledChange:A,scrollbarY:w,onScrollbarYChange:S,scrollbarYEnabled:T,onScrollbarYEnabledChange:P,onCornerWidthChange:C,onCornerHeightChange:N,children:m.jsx(He.div,{dir:z,...o,ref:I,style:{position:"relative","--radix-scroll-area-corner-width":E+"px","--radix-scroll-area-corner-height":_+"px",...e.style}})})});Q6.displayName=Jk;var Z6="ScrollAreaViewport",J6=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:i,...a}=e,o=ma(Z6,n),l=y.useRef(null),c=_t(t,l,o.onViewportChange);return m.jsxs(m.Fragment,{children:[m.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),m.jsx(He.div,{"data-radix-scroll-area-viewport":"",...a,ref:c,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...e.style},children:m.jsx("div",{ref:o.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});J6.displayName=Z6;var So="ScrollAreaScrollbar",e8=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=ma(So,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:o}=i,l=e.orientation==="horizontal";return y.useEffect(()=>(l?a(!0):o(!0),()=>{l?a(!1):o(!1)}),[l,a,o]),i.type==="hover"?m.jsx(jre,{...r,ref:t,forceMount:n}):i.type==="scroll"?m.jsx(_re,{...r,ref:t,forceMount:n}):i.type==="auto"?m.jsx(t8,{...r,ref:t,forceMount:n}):i.type==="always"?m.jsx(eN,{...r,ref:t}):null});e8.displayName=So;var jre=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=ma(So,e.__scopeScrollArea),[a,o]=y.useState(!1);return y.useEffect(()=>{const l=i.scrollArea;let c=0;if(l){const f=()=>{window.clearTimeout(c),o(!0)},h=()=>{c=window.setTimeout(()=>o(!1),i.scrollHideDelay)};return l.addEventListener("pointerenter",f),l.addEventListener("pointerleave",h),()=>{window.clearTimeout(c),l.removeEventListener("pointerenter",f),l.removeEventListener("pointerleave",h)}}},[i.scrollArea,i.scrollHideDelay]),m.jsx(Hr,{present:n||a,children:m.jsx(t8,{"data-state":a?"visible":"hidden",...r,ref:t})})}),_re=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=ma(So,e.__scopeScrollArea),a=e.orientation==="horizontal",o=_0(()=>c("SCROLL_END"),100),[l,c]=Sre("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return y.useEffect(()=>{if(l==="idle"){const f=window.setTimeout(()=>c("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(f)}},[l,i.scrollHideDelay,c]),y.useEffect(()=>{const f=i.viewport,h=a?"scrollLeft":"scrollTop";if(f){let d=f[h];const g=()=>{const v=f[h];d!==v&&(c("SCROLL"),o()),d=v};return f.addEventListener("scroll",g),()=>f.removeEventListener("scroll",g)}},[i.viewport,a,c,o]),m.jsx(Hr,{present:n||l!=="hidden",children:m.jsx(eN,{"data-state":l==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:Ae(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:Ae(e.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),t8=y.forwardRef((e,t)=>{const n=ma(So,e.__scopeScrollArea),{forceMount:r,...i}=e,[a,o]=y.useState(!1),l=e.orientation==="horizontal",c=_0(()=>{if(n.viewport){const f=n.viewport.offsetWidth<n.viewport.scrollWidth,h=n.viewport.offsetHeight<n.viewport.scrollHeight;o(l?f:h)}},10);return cd(n.viewport,c),cd(n.content,c),m.jsx(Hr,{present:r||a,children:m.jsx(eN,{"data-state":a?"visible":"hidden",...i,ref:t})})}),eN=y.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,i=ma(So,e.__scopeScrollArea),a=y.useRef(null),o=y.useRef(0),[l,c]=y.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),f=o8(l.viewport,l.content),h={...r,sizes:l,onSizesChange:c,hasThumb:f>0&&f<1,onThumbChange:g=>a.current=g,onThumbPointerUp:()=>o.current=0,onThumbPointerDown:g=>o.current=g};function d(g,v){return Tre(g,o.current,l,v)}return n==="horizontal"?m.jsx(Cre,{...h,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){const g=i.viewport.scrollLeft,v=WD(g,l,i.dir);a.current.style.transform=`translate3d(${v}px, 0, 0)`}},onWheelScroll:g=>{i.viewport&&(i.viewport.scrollLeft=g)},onDragScroll:g=>{i.viewport&&(i.viewport.scrollLeft=d(g,i.dir))}}):n==="vertical"?m.jsx(kre,{...h,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){const g=i.viewport.scrollTop,v=WD(g,l);a.current.style.transform=`translate3d(0, ${v}px, 0)`}},onWheelScroll:g=>{i.viewport&&(i.viewport.scrollTop=g)},onDragScroll:g=>{i.viewport&&(i.viewport.scrollTop=d(g))}}):null}),Cre=y.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,a=ma(So,e.__scopeScrollArea),[o,l]=y.useState(),c=y.useRef(null),f=_t(t,c,a.onScrollbarXChange);return y.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),m.jsx(r8,{"data-orientation":"horizontal",...i,ref:f,sizes:n,style:{bottom:0,left:a.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:a.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":j0(n)+"px",...e.style},onThumbPointerDown:h=>e.onThumbPointerDown(h.x),onDragScroll:h=>e.onDragScroll(h.x),onWheelScroll:(h,d)=>{if(a.viewport){const g=a.viewport.scrollLeft+h.deltaX;e.onWheelScroll(g),l8(g,d)&&h.preventDefault()}},onResize:()=>{c.current&&a.viewport&&o&&r({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:Ky(o.paddingLeft),paddingEnd:Ky(o.paddingRight)}})}})}),kre=y.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,a=ma(So,e.__scopeScrollArea),[o,l]=y.useState(),c=y.useRef(null),f=_t(t,c,a.onScrollbarYChange);return y.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),m.jsx(r8,{"data-orientation":"vertical",...i,ref:f,sizes:n,style:{top:0,right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":j0(n)+"px",...e.style},onThumbPointerDown:h=>e.onThumbPointerDown(h.y),onDragScroll:h=>e.onDragScroll(h.y),onWheelScroll:(h,d)=>{if(a.viewport){const g=a.viewport.scrollTop+h.deltaY;e.onWheelScroll(g),l8(g,d)&&h.preventDefault()}},onResize:()=>{c.current&&a.viewport&&o&&r({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:Ky(o.paddingTop),paddingEnd:Ky(o.paddingBottom)}})}})}),[Nre,n8]=W6(So),r8=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:a,onThumbPointerUp:o,onThumbPointerDown:l,onThumbPositionChange:c,onDragScroll:f,onWheelScroll:h,onResize:d,...g}=e,v=ma(So,n),[b,w]=y.useState(null),S=_t(t,I=>w(I)),E=y.useRef(null),C=y.useRef(""),_=v.viewport,N=r.content-r.viewport,O=Ar(h),A=Ar(c),T=_0(d,10);function P(I){if(E.current){const z=I.clientX-E.current.left,F=I.clientY-E.current.top;f({x:z,y:F})}}return y.useEffect(()=>{const I=z=>{const F=z.target;(b==null?void 0:b.contains(F))&&O(z,N)};return document.addEventListener("wheel",I,{passive:!1}),()=>document.removeEventListener("wheel",I,{passive:!1})},[_,b,N,O]),y.useEffect(A,[r,A]),cd(b,T),cd(v.content,T),m.jsx(Nre,{scope:n,scrollbar:b,hasThumb:i,onThumbChange:Ar(a),onThumbPointerUp:Ar(o),onThumbPositionChange:A,onThumbPointerDown:Ar(l),children:m.jsx(He.div,{...g,ref:S,style:{position:"absolute",...g.style},onPointerDown:Ae(e.onPointerDown,I=>{I.button===0&&(I.target.setPointerCapture(I.pointerId),E.current=b.getBoundingClientRect(),C.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",v.viewport&&(v.viewport.style.scrollBehavior="auto"),P(I))}),onPointerMove:Ae(e.onPointerMove,P),onPointerUp:Ae(e.onPointerUp,I=>{const z=I.target;z.hasPointerCapture(I.pointerId)&&z.releasePointerCapture(I.pointerId),document.body.style.webkitUserSelect=C.current,v.viewport&&(v.viewport.style.scrollBehavior=""),E.current=null})})})}),Vy="ScrollAreaThumb",i8=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=n8(Vy,e.__scopeScrollArea);return m.jsx(Hr,{present:n||i.hasThumb,children:m.jsx(Are,{ref:t,...r})})}),Are=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...i}=e,a=ma(Vy,n),o=n8(Vy,n),{onThumbPositionChange:l}=o,c=_t(t,d=>o.onThumbChange(d)),f=y.useRef(void 0),h=_0(()=>{f.current&&(f.current(),f.current=void 0)},100);return y.useEffect(()=>{const d=a.viewport;if(d){const g=()=>{if(h(),!f.current){const v=Pre(d,l);f.current=v,l()}};return l(),d.addEventListener("scroll",g),()=>d.removeEventListener("scroll",g)}},[a.viewport,h,l]),m.jsx(He.div,{"data-state":o.hasThumb?"visible":"hidden",...i,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:Ae(e.onPointerDownCapture,d=>{const v=d.target.getBoundingClientRect(),b=d.clientX-v.left,w=d.clientY-v.top;o.onThumbPointerDown({x:b,y:w})}),onPointerUp:Ae(e.onPointerUp,o.onThumbPointerUp)})});i8.displayName=Vy;var tN="ScrollAreaCorner",a8=y.forwardRef((e,t)=>{const n=ma(tN,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?m.jsx(Ore,{...e,ref:t}):null});a8.displayName=tN;var Ore=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,i=ma(tN,n),[a,o]=y.useState(0),[l,c]=y.useState(0),f=!!(a&&l);return cd(i.scrollbarX,()=>{var d;const h=((d=i.scrollbarX)==null?void 0:d.offsetHeight)||0;i.onCornerHeightChange(h),c(h)}),cd(i.scrollbarY,()=>{var d;const h=((d=i.scrollbarY)==null?void 0:d.offsetWidth)||0;i.onCornerWidthChange(h),o(h)}),f?m.jsx(He.div,{...r,ref:t,style:{width:a,height:l,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Ky(e){return e?parseInt(e,10):0}function o8(e,t){const n=e/t;return isNaN(n)?0:n}function j0(e){const t=o8(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function Tre(e,t,n,r="ltr"){const i=j0(n),a=i/2,o=t||a,l=i-o,c=n.scrollbar.paddingStart+o,f=n.scrollbar.size-n.scrollbar.paddingEnd-l,h=n.content-n.viewport,d=r==="ltr"?[0,h]:[h*-1,0];return s8([c,f],d)(e)}function WD(e,t,n="ltr"){const r=j0(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-i,o=t.content-t.viewport,l=a-r,c=n==="ltr"?[0,o]:[o*-1,0],f=w_(e,c);return s8([0,o],[0,l])(f)}function s8(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function l8(e,t){return e>0&&e<t}var Pre=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function i(){const a={left:e.scrollLeft,top:e.scrollTop},o=n.left!==a.left,l=n.top!==a.top;(o||l)&&t(),n=a,r=window.requestAnimationFrame(i)})(),()=>window.cancelAnimationFrame(r)};function _0(e,t){const n=Ar(e),r=y.useRef(0);return y.useEffect(()=>()=>window.clearTimeout(r.current),[]),y.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function cd(e,t){const n=Ar(t);xr(()=>{let r=0;if(e){const i=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return i.observe(e),()=>{window.cancelAnimationFrame(r),i.unobserve(e)}}},[e,n])}var Mre=Q6,Dre=J6,Rre=a8,Ire=[" ","Enter","ArrowUp","ArrowDown"],Lre=[" ","Enter"],uc="Select",[C0,k0,zre]=bk(uc),[zd]=Fa(uc,[zre,Ld]),N0=Ld(),[$re,Ql]=zd(uc),[Bre,Fre]=zd(uc),u8=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:l,onValueChange:c,dir:f,name:h,autoComplete:d,disabled:g,required:v,form:b}=e,w=N0(t),[S,E]=y.useState(null),[C,_]=y.useState(null),[N,O]=y.useState(!1),A=wp(f),[T,P]=Bl({prop:r,defaultProp:i??!1,onChange:a,caller:uc}),[I,z]=Bl({prop:o,defaultProp:l,onChange:c,caller:uc}),F=y.useRef(null),B=S?b||!!S.closest("form"):!0,[G,L]=y.useState(new Set),V=Array.from(G).map(D=>D.props.value).join(";");return m.jsx(Uk,{...w,children:m.jsxs($re,{required:v,scope:t,trigger:S,onTriggerChange:E,valueNode:C,onValueNodeChange:_,valueNodeHasChildren:N,onValueNodeHasChildrenChange:O,contentId:yr(),value:I,onValueChange:z,open:T,onOpenChange:P,dir:A,triggerPointerDownPosRef:F,disabled:g,children:[m.jsx(C0.Provider,{scope:t,children:m.jsx(Bre,{scope:e.__scopeSelect,onNativeOptionAdd:y.useCallback(D=>{L(q=>new Set(q).add(D))},[]),onNativeOptionRemove:y.useCallback(D=>{L(q=>{const X=new Set(q);return X.delete(D),X})},[]),children:n})}),B?m.jsxs(T8,{"aria-hidden":!0,required:v,tabIndex:-1,name:h,autoComplete:d,value:I,onChange:D=>z(D.target.value),disabled:g,form:b,children:[I===void 0?m.jsx("option",{value:""}):null,Array.from(G)]},V):null]})})};u8.displayName=uc;var c8="SelectTrigger",f8=y.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,a=N0(n),o=Ql(c8,n),l=o.disabled||r,c=_t(t,o.onTriggerChange),f=k0(n),h=y.useRef("touch"),[d,g,v]=M8(w=>{const S=f().filter(_=>!_.disabled),E=S.find(_=>_.value===o.value),C=D8(S,w,E);C!==void 0&&o.onValueChange(C.value)}),b=w=>{l||(o.onOpenChange(!0),v()),w&&(o.triggerPointerDownPosRef.current={x:Math.round(w.pageX),y:Math.round(w.pageY)})};return m.jsx(Hk,{asChild:!0,...a,children:m.jsx(He.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":P8(o.value)?"":void 0,...i,ref:c,onClick:Ae(i.onClick,w=>{w.currentTarget.focus(),h.current!=="mouse"&&b(w)}),onPointerDown:Ae(i.onPointerDown,w=>{h.current=w.pointerType;const S=w.target;S.hasPointerCapture(w.pointerId)&&S.releasePointerCapture(w.pointerId),w.button===0&&w.ctrlKey===!1&&w.pointerType==="mouse"&&(b(w),w.preventDefault())}),onKeyDown:Ae(i.onKeyDown,w=>{const S=d.current!=="";!(w.ctrlKey||w.altKey||w.metaKey)&&w.key.length===1&&g(w.key),!(S&&w.key===" ")&&Ire.includes(w.key)&&(b(),w.preventDefault())})})})});f8.displayName=c8;var d8="SelectValue",h8=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:a,placeholder:o="",...l}=e,c=Ql(d8,n),{onValueNodeHasChildrenChange:f}=c,h=a!==void 0,d=_t(t,c.onValueNodeChange);return xr(()=>{f(h)},[f,h]),m.jsx(He.span,{...l,ref:d,style:{pointerEvents:"none"},children:P8(c.value)?m.jsx(m.Fragment,{children:o}):a})});h8.displayName=d8;var Ure="SelectIcon",m8=y.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return m.jsx(He.span,{"aria-hidden":!0,...i,ref:t,children:r||"▼"})});m8.displayName=Ure;var Hre="SelectPortal",p8=e=>m.jsx(Ep,{asChild:!0,...e});p8.displayName=Hre;var cc="SelectContent",g8=y.forwardRef((e,t)=>{const n=Ql(cc,e.__scopeSelect),[r,i]=y.useState();if(xr(()=>{i(new DocumentFragment)},[]),!n.open){const a=r;return a?Wl.createPortal(m.jsx(v8,{scope:e.__scopeSelect,children:m.jsx(C0.Slot,{scope:e.__scopeSelect,children:m.jsx("div",{children:e.children})})}),a):null}return m.jsx(y8,{...e,ref:t})});g8.displayName=cc;var Sa=10,[v8,Zl]=zd(cc),qre="SelectContentImpl",Vre=oc("SelectContent.RemoveScroll"),y8=y.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:l,sideOffset:c,align:f,alignOffset:h,arrowPadding:d,collisionBoundary:g,collisionPadding:v,sticky:b,hideWhenDetached:w,avoidCollisions:S,...E}=e,C=Ql(cc,n),[_,N]=y.useState(null),[O,A]=y.useState(null),T=_t(t,ae=>N(ae)),[P,I]=y.useState(null),[z,F]=y.useState(null),B=k0(n),[G,L]=y.useState(!1),V=y.useRef(!1);y.useEffect(()=>{if(_)return _k(_)},[_]),jk();const D=y.useCallback(ae=>{const[ie,...ee]=B().map(re=>re.ref.current),[se]=ee.slice(-1),pe=document.activeElement;for(const re of ae)if(re===pe||(re==null||re.scrollIntoView({block:"nearest"}),re===ie&&O&&(O.scrollTop=0),re===se&&O&&(O.scrollTop=O.scrollHeight),re==null||re.focus(),document.activeElement!==pe))return},[B,O]),q=y.useCallback(()=>D([P,_]),[D,P,_]);y.useEffect(()=>{G&&q()},[G,q]);const{onOpenChange:X,triggerPointerDownPosRef:K}=C;y.useEffect(()=>{if(_){let ae={x:0,y:0};const ie=se=>{var pe,re;ae={x:Math.abs(Math.round(se.pageX)-(((pe=K.current)==null?void 0:pe.x)??0)),y:Math.abs(Math.round(se.pageY)-(((re=K.current)==null?void 0:re.y)??0))}},ee=se=>{ae.x<=10&&ae.y<=10?se.preventDefault():_.contains(se.target)||X(!1),document.removeEventListener("pointermove",ie),K.current=null};return K.current!==null&&(document.addEventListener("pointermove",ie),document.addEventListener("pointerup",ee,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ie),document.removeEventListener("pointerup",ee,{capture:!0})}}},[_,X,K]),y.useEffect(()=>{const ae=()=>X(!1);return window.addEventListener("blur",ae),window.addEventListener("resize",ae),()=>{window.removeEventListener("blur",ae),window.removeEventListener("resize",ae)}},[X]);const[R,H]=M8(ae=>{const ie=B().filter(pe=>!pe.disabled),ee=ie.find(pe=>pe.ref.current===document.activeElement),se=D8(ie,ae,ee);se&&setTimeout(()=>se.ref.current.focus())}),U=y.useCallback((ae,ie,ee)=>{const se=!V.current&&!ee;(C.value!==void 0&&C.value===ie||se)&&(I(ae),se&&(V.current=!0))},[C.value]),$=y.useCallback(()=>_==null?void 0:_.focus(),[_]),Q=y.useCallback((ae,ie,ee)=>{const se=!V.current&&!ee;(C.value!==void 0&&C.value===ie||se)&&F(ae)},[C.value]),J=r==="popper"?S_:x8,ne=J===S_?{side:l,sideOffset:c,align:f,alignOffset:h,arrowPadding:d,collisionBoundary:g,collisionPadding:v,sticky:b,hideWhenDetached:w,avoidCollisions:S}:{};return m.jsx(v8,{scope:n,content:_,viewport:O,onViewportChange:A,itemRefCallback:U,selectedItem:P,onItemLeave:$,itemTextRefCallback:Q,focusSelectedItem:q,selectedItemText:z,position:r,isPositioned:G,searchRef:R,children:m.jsx(m0,{as:Vre,allowPinchZoom:!0,children:m.jsx(d0,{asChild:!0,trapped:C.open,onMountAutoFocus:ae=>{ae.preventDefault()},onUnmountAutoFocus:Ae(i,ae=>{var ie;(ie=C.trigger)==null||ie.focus({preventScroll:!0}),ae.preventDefault()}),children:m.jsx(Sp,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:ae=>ae.preventDefault(),onDismiss:()=>C.onOpenChange(!1),children:m.jsx(J,{role:"listbox",id:C.contentId,"data-state":C.open?"open":"closed",dir:C.dir,onContextMenu:ae=>ae.preventDefault(),...E,...ne,onPlaced:()=>L(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...E.style},onKeyDown:Ae(E.onKeyDown,ae=>{const ie=ae.ctrlKey||ae.altKey||ae.metaKey;if(ae.key==="Tab"&&ae.preventDefault(),!ie&&ae.key.length===1&&H(ae.key),["ArrowUp","ArrowDown","Home","End"].includes(ae.key)){let se=B().filter(pe=>!pe.disabled).map(pe=>pe.ref.current);if(["ArrowUp","End"].includes(ae.key)&&(se=se.slice().reverse()),["ArrowUp","ArrowDown"].includes(ae.key)){const pe=ae.target,re=se.indexOf(pe);se=se.slice(re+1)}setTimeout(()=>D(se)),ae.preventDefault()}})})})})})})});y8.displayName=qre;var Kre="SelectItemAlignedPosition",x8=y.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,a=Ql(cc,n),o=Zl(cc,n),[l,c]=y.useState(null),[f,h]=y.useState(null),d=_t(t,T=>h(T)),g=k0(n),v=y.useRef(!1),b=y.useRef(!0),{viewport:w,selectedItem:S,selectedItemText:E,focusSelectedItem:C}=o,_=y.useCallback(()=>{if(a.trigger&&a.valueNode&&l&&f&&w&&S&&E){const T=a.trigger.getBoundingClientRect(),P=f.getBoundingClientRect(),I=a.valueNode.getBoundingClientRect(),z=E.getBoundingClientRect();if(a.dir!=="rtl"){const pe=z.left-P.left,re=I.left-pe,we=T.left-re,Ee=T.width+we,$e=Math.max(Ee,P.width),Ne=window.innerWidth-Sa,et=w_(re,[Sa,Math.max(Sa,Ne-$e)]);l.style.minWidth=Ee+"px",l.style.left=et+"px"}else{const pe=P.right-z.right,re=window.innerWidth-I.right-pe,we=window.innerWidth-T.right-re,Ee=T.width+we,$e=Math.max(Ee,P.width),Ne=window.innerWidth-Sa,et=w_(re,[Sa,Math.max(Sa,Ne-$e)]);l.style.minWidth=Ee+"px",l.style.right=et+"px"}const F=g(),B=window.innerHeight-Sa*2,G=w.scrollHeight,L=window.getComputedStyle(f),V=parseInt(L.borderTopWidth,10),D=parseInt(L.paddingTop,10),q=parseInt(L.borderBottomWidth,10),X=parseInt(L.paddingBottom,10),K=V+D+G+X+q,R=Math.min(S.offsetHeight*5,K),H=window.getComputedStyle(w),U=parseInt(H.paddingTop,10),$=parseInt(H.paddingBottom,10),Q=T.top+T.height/2-Sa,J=B-Q,ne=S.offsetHeight/2,ae=S.offsetTop+ne,ie=V+D+ae,ee=K-ie;if(ie<=Q){const pe=F.length>0&&S===F[F.length-1].ref.current;l.style.bottom="0px";const re=f.clientHeight-w.offsetTop-w.offsetHeight,we=Math.max(J,ne+(pe?$:0)+re+q),Ee=ie+we;l.style.height=Ee+"px"}else{const pe=F.length>0&&S===F[0].ref.current;l.style.top="0px";const we=Math.max(Q,V+w.offsetTop+(pe?U:0)+ne)+ee;l.style.height=we+"px",w.scrollTop=ie-Q+w.offsetTop}l.style.margin=`${Sa}px 0`,l.style.minHeight=R+"px",l.style.maxHeight=B+"px",r==null||r(),requestAnimationFrame(()=>v.current=!0)}},[g,a.trigger,a.valueNode,l,f,w,S,E,a.dir,r]);xr(()=>_(),[_]);const[N,O]=y.useState();xr(()=>{f&&O(window.getComputedStyle(f).zIndex)},[f]);const A=y.useCallback(T=>{T&&b.current===!0&&(_(),C==null||C(),b.current=!1)},[_,C]);return m.jsx(Xre,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:v,onScrollButtonChange:A,children:m.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:N},children:m.jsx(He.div,{...i,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});x8.displayName=Kre;var Yre="SelectPopperPosition",S_=y.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=Sa,...a}=e,o=N0(n);return m.jsx(qk,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});S_.displayName=Yre;var[Xre,nN]=zd(cc,{}),E_="SelectViewport",b8=y.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,a=Zl(E_,n),o=nN(E_,n),l=_t(t,a.onViewportChange),c=y.useRef(0);return m.jsxs(m.Fragment,{children:[m.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),m.jsx(C0.Slot,{scope:n,children:m.jsx(He.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:Ae(i.onScroll,f=>{const h=f.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:g}=o;if(g!=null&&g.current&&d){const v=Math.abs(c.current-h.scrollTop);if(v>0){const b=window.innerHeight-Sa*2,w=parseFloat(d.style.minHeight),S=parseFloat(d.style.height),E=Math.max(w,S);if(E<b){const C=E+v,_=Math.min(b,C),N=C-_;d.style.height=_+"px",d.style.bottom==="0px"&&(h.scrollTop=N>0?N:0,d.style.justifyContent="flex-end")}}}c.current=h.scrollTop})})})]})});b8.displayName=E_;var w8="SelectGroup",[Gre,Wre]=zd(w8),Qre=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=yr();return m.jsx(Gre,{scope:n,id:i,children:m.jsx(He.div,{role:"group","aria-labelledby":i,...r,ref:t})})});Qre.displayName=w8;var S8="SelectLabel",Zre=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Wre(S8,n);return m.jsx(He.div,{id:i.id,...r,ref:t})});Zre.displayName=S8;var Yy="SelectItem",[Jre,E8]=zd(Yy),j8=y.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,l=Ql(Yy,n),c=Zl(Yy,n),f=l.value===r,[h,d]=y.useState(a??""),[g,v]=y.useState(!1),b=_t(t,C=>{var _;return(_=c.itemRefCallback)==null?void 0:_.call(c,C,r,i)}),w=yr(),S=y.useRef("touch"),E=()=>{i||(l.onValueChange(r),l.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return m.jsx(Jre,{scope:n,value:r,disabled:i,textId:w,isSelected:f,onItemTextChange:y.useCallback(C=>{d(_=>_||((C==null?void 0:C.textContent)??"").trim())},[]),children:m.jsx(C0.ItemSlot,{scope:n,value:r,disabled:i,textValue:h,children:m.jsx(He.div,{role:"option","aria-labelledby":w,"data-highlighted":g?"":void 0,"aria-selected":f&&g,"data-state":f?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...o,ref:b,onFocus:Ae(o.onFocus,()=>v(!0)),onBlur:Ae(o.onBlur,()=>v(!1)),onClick:Ae(o.onClick,()=>{S.current!=="mouse"&&E()}),onPointerUp:Ae(o.onPointerUp,()=>{S.current==="mouse"&&E()}),onPointerDown:Ae(o.onPointerDown,C=>{S.current=C.pointerType}),onPointerMove:Ae(o.onPointerMove,C=>{var _;S.current=C.pointerType,i?(_=c.onItemLeave)==null||_.call(c):S.current==="mouse"&&C.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ae(o.onPointerLeave,C=>{var _;C.currentTarget===document.activeElement&&((_=c.onItemLeave)==null||_.call(c))}),onKeyDown:Ae(o.onKeyDown,C=>{var N;((N=c.searchRef)==null?void 0:N.current)!==""&&C.key===" "||(Lre.includes(C.key)&&E(),C.key===" "&&C.preventDefault())})})})})});j8.displayName=Yy;var vm="SelectItemText",_8=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...a}=e,o=Ql(vm,n),l=Zl(vm,n),c=E8(vm,n),f=Fre(vm,n),[h,d]=y.useState(null),g=_t(t,E=>d(E),c.onItemTextChange,E=>{var C;return(C=l.itemTextRefCallback)==null?void 0:C.call(l,E,c.value,c.disabled)}),v=h==null?void 0:h.textContent,b=y.useMemo(()=>m.jsx("option",{value:c.value,disabled:c.disabled,children:v},c.value),[c.disabled,c.value,v]),{onNativeOptionAdd:w,onNativeOptionRemove:S}=f;return xr(()=>(w(b),()=>S(b)),[w,S,b]),m.jsxs(m.Fragment,{children:[m.jsx(He.span,{id:c.textId,...a,ref:g}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Wl.createPortal(a.children,o.valueNode):null]})});_8.displayName=vm;var C8="SelectItemIndicator",k8=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return E8(C8,n).isSelected?m.jsx(He.span,{"aria-hidden":!0,...r,ref:t}):null});k8.displayName=C8;var j_="SelectScrollUpButton",N8=y.forwardRef((e,t)=>{const n=Zl(j_,e.__scopeSelect),r=nN(j_,e.__scopeSelect),[i,a]=y.useState(!1),o=_t(t,r.onScrollButtonChange);return xr(()=>{if(n.viewport&&n.isPositioned){let l=function(){const f=c.scrollTop>0;a(f)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),i?m.jsx(O8,{...e,ref:o,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop-c.offsetHeight)}}):null});N8.displayName=j_;var __="SelectScrollDownButton",A8=y.forwardRef((e,t)=>{const n=Zl(__,e.__scopeSelect),r=nN(__,e.__scopeSelect),[i,a]=y.useState(!1),o=_t(t,r.onScrollButtonChange);return xr(()=>{if(n.viewport&&n.isPositioned){let l=function(){const f=c.scrollHeight-c.clientHeight,h=Math.ceil(c.scrollTop)<f;a(h)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),i?m.jsx(O8,{...e,ref:o,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop+c.offsetHeight)}}):null});A8.displayName=__;var O8=y.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,a=Zl("SelectScrollButton",n),o=y.useRef(null),l=k0(n),c=y.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return y.useEffect(()=>()=>c(),[c]),xr(()=>{var h;const f=l().find(d=>d.ref.current===document.activeElement);(h=f==null?void 0:f.ref.current)==null||h.scrollIntoView({block:"nearest"})},[l]),m.jsx(He.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:Ae(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:Ae(i.onPointerMove,()=>{var f;(f=a.onItemLeave)==null||f.call(a),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:Ae(i.onPointerLeave,()=>{c()})})}),eie="SelectSeparator",tie=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return m.jsx(He.div,{"aria-hidden":!0,...r,ref:t})});tie.displayName=eie;var C_="SelectArrow",nie=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=N0(n),a=Ql(C_,n),o=Zl(C_,n);return a.open&&o.position==="popper"?m.jsx(Vk,{...i,...r,ref:t}):null});nie.displayName=C_;var rie="SelectBubbleInput",T8=y.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const i=y.useRef(null),a=_t(r,i),o=Pee(t);return y.useEffect(()=>{const l=i.current;if(!l)return;const c=window.HTMLSelectElement.prototype,h=Object.getOwnPropertyDescriptor(c,"value").set;if(o!==t&&h){const d=new Event("change",{bubbles:!0});h.call(l,t),l.dispatchEvent(d)}},[o,t]),m.jsx(He.select,{...n,style:{...lB,...n.style},ref:a,defaultValue:t})});T8.displayName=rie;function P8(e){return e===""||e===void 0}function M8(e){const t=Ar(e),n=y.useRef(""),r=y.useRef(0),i=y.useCallback(o=>{const l=n.current+o;t(l),(function c(f){n.current=f,window.clearTimeout(r.current),f!==""&&(r.current=window.setTimeout(()=>c(""),1e3))})(l)},[t]),a=y.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return y.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function D8(e,t,n){const i=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let o=iie(e,Math.max(a,0));i.length===1&&(o=o.filter(f=>f!==n));const c=o.find(f=>f.textValue.toLowerCase().startsWith(i.toLowerCase()));return c!==n?c:void 0}function iie(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var aie=u8,oie=f8,sie=h8,lie=m8,uie=p8,cie=g8,fie=b8,die=j8,hie=_8,mie=k8,pie=N8,gie=A8,vie="Separator",QD="horizontal",yie=["horizontal","vertical"],R8=y.forwardRef((e,t)=>{const{decorative:n,orientation:r=QD,...i}=e,a=xie(r)?r:QD,l=n?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return m.jsx(He.div,{"data-orientation":a,...l,...i,ref:t})});R8.displayName=vie;function xie(e){return yie.includes(e)}var bie=R8,A0="Tabs",[wie]=Fa(A0,[b0]),I8=b0(),[Sie,rN]=wie(A0),L8=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o="horizontal",dir:l,activationMode:c="automatic",...f}=e,h=wp(l),[d,g]=Bl({prop:r,onChange:i,defaultProp:a??"",caller:A0});return m.jsx(Sie,{scope:n,baseId:yr(),value:d,onValueChange:g,orientation:o,dir:h,activationMode:c,children:m.jsx(He.div,{dir:h,"data-orientation":o,...f,ref:t})})});L8.displayName=A0;var z8="TabsList",$8=y.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,a=rN(z8,n),o=I8(n);return m.jsx(m6,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:m.jsx(He.div,{role:"tablist","aria-orientation":a.orientation,...i,ref:t})})});$8.displayName=z8;var B8="TabsTrigger",F8=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=rN(B8,n),l=I8(n),c=q8(o.baseId,r),f=V8(o.baseId,r),h=r===o.value;return m.jsx(p6,{asChild:!0,...l,focusable:!i,active:h,children:m.jsx(He.button,{type:"button",role:"tab","aria-selected":h,"aria-controls":f,"data-state":h?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:c,...a,ref:t,onMouseDown:Ae(e.onMouseDown,d=>{!i&&d.button===0&&d.ctrlKey===!1?o.onValueChange(r):d.preventDefault()}),onKeyDown:Ae(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&o.onValueChange(r)}),onFocus:Ae(e.onFocus,()=>{const d=o.activationMode!=="manual";!h&&!i&&d&&o.onValueChange(r)})})})});F8.displayName=B8;var U8="TabsContent",H8=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,l=rN(U8,n),c=q8(l.baseId,r),f=V8(l.baseId,r),h=r===l.value,d=y.useRef(h);return y.useEffect(()=>{const g=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(g)},[]),m.jsx(Hr,{present:i||h,children:({present:g})=>m.jsx(He.div,{"data-state":h?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":c,hidden:!g,id:f,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:g&&a})})});H8.displayName=U8;function q8(e,t){return`${e}-trigger-${t}`}function V8(e,t){return`${e}-content-${t}`}var Eie=L8,jie=$8,_ie=F8,Cie=H8,[O0]=Fa("Tooltip",[Ld]),T0=Ld(),K8="TooltipProvider",kie=700,k_="tooltip.open",[Nie,iN]=O0(K8),Y8=e=>{const{__scopeTooltip:t,delayDuration:n=kie,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=y.useRef(!0),l=y.useRef(!1),c=y.useRef(0);return y.useEffect(()=>{const f=c.current;return()=>window.clearTimeout(f)},[]),m.jsx(Nie,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:y.useCallback(()=>{window.clearTimeout(c.current),o.current=!1},[]),onClose:y.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:y.useCallback(f=>{l.current=f},[]),disableHoverableContent:i,children:a})};Y8.displayName=K8;var Im="Tooltip",[Aie,Np]=O0(Im),X8=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:l}=e,c=iN(Im,e.__scopeTooltip),f=T0(t),[h,d]=y.useState(null),g=yr(),v=y.useRef(0),b=o??c.disableHoverableContent,w=l??c.delayDuration,S=y.useRef(!1),[E,C]=Bl({prop:r,defaultProp:i??!1,onChange:T=>{T?(c.onOpen(),document.dispatchEvent(new CustomEvent(k_))):c.onClose(),a==null||a(T)},caller:Im}),_=y.useMemo(()=>E?S.current?"delayed-open":"instant-open":"closed",[E]),N=y.useCallback(()=>{window.clearTimeout(v.current),v.current=0,S.current=!1,C(!0)},[C]),O=y.useCallback(()=>{window.clearTimeout(v.current),v.current=0,C(!1)},[C]),A=y.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{S.current=!0,C(!0),v.current=0},w)},[w,C]);return y.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]),m.jsx(Uk,{...f,children:m.jsx(Aie,{scope:t,contentId:g,open:E,stateAttribute:_,trigger:h,onTriggerChange:d,onTriggerEnter:y.useCallback(()=>{c.isOpenDelayedRef.current?A():N()},[c.isOpenDelayedRef,A,N]),onTriggerLeave:y.useCallback(()=>{b?O():(window.clearTimeout(v.current),v.current=0)},[O,b]),onOpen:N,onClose:O,disableHoverableContent:b,children:n})})};X8.displayName=Im;var N_="TooltipTrigger",G8=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=Np(N_,n),a=iN(N_,n),o=T0(n),l=y.useRef(null),c=_t(t,l,i.onTriggerChange),f=y.useRef(!1),h=y.useRef(!1),d=y.useCallback(()=>f.current=!1,[]);return y.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),m.jsx(Hk,{asChild:!0,...o,children:m.jsx(He.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:c,onPointerMove:Ae(e.onPointerMove,g=>{g.pointerType!=="touch"&&!h.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),h.current=!0)}),onPointerLeave:Ae(e.onPointerLeave,()=>{i.onTriggerLeave(),h.current=!1}),onPointerDown:Ae(e.onPointerDown,()=>{i.open&&i.onClose(),f.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:Ae(e.onFocus,()=>{f.current||i.onOpen()}),onBlur:Ae(e.onBlur,i.onClose),onClick:Ae(e.onClick,i.onClose)})})});G8.displayName=N_;var aN="TooltipPortal",[Oie,Tie]=O0(aN,{forceMount:void 0}),W8=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=Np(aN,t);return m.jsx(Oie,{scope:t,forceMount:n,children:m.jsx(Hr,{present:n||a.open,children:m.jsx(Ep,{asChild:!0,container:i,children:r})})})};W8.displayName=aN;var fd="TooltipContent",Q8=y.forwardRef((e,t)=>{const n=Tie(fd,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...a}=e,o=Np(fd,e.__scopeTooltip);return m.jsx(Hr,{present:r||o.open,children:o.disableHoverableContent?m.jsx(Z8,{side:i,...a,ref:t}):m.jsx(Pie,{side:i,...a,ref:t})})}),Pie=y.forwardRef((e,t)=>{const n=Np(fd,e.__scopeTooltip),r=iN(fd,e.__scopeTooltip),i=y.useRef(null),a=_t(t,i),[o,l]=y.useState(null),{trigger:c,onClose:f}=n,h=i.current,{onPointerInTransitChange:d}=r,g=y.useCallback(()=>{l(null),d(!1)},[d]),v=y.useCallback((b,w)=>{const S=b.currentTarget,E={x:b.clientX,y:b.clientY},C=Iie(E,S.getBoundingClientRect()),_=Lie(E,C),N=zie(w.getBoundingClientRect()),O=Bie([..._,...N]);l(O),d(!0)},[d]);return y.useEffect(()=>()=>g(),[g]),y.useEffect(()=>{if(c&&h){const b=S=>v(S,h),w=S=>v(S,c);return c.addEventListener("pointerleave",b),h.addEventListener("pointerleave",w),()=>{c.removeEventListener("pointerleave",b),h.removeEventListener("pointerleave",w)}}},[c,h,v,g]),y.useEffect(()=>{if(o){const b=w=>{const S=w.target,E={x:w.clientX,y:w.clientY},C=(c==null?void 0:c.contains(S))||(h==null?void 0:h.contains(S)),_=!$ie(E,o);C?g():_&&(g(),f())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[c,h,o,f,g]),m.jsx(Z8,{...e,ref:a})}),[Mie,Die]=O0(Im,{isInside:!1}),Rie=QZ("TooltipContent"),Z8=y.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:o,...l}=e,c=Np(fd,n),f=T0(n),{onClose:h}=c;return y.useEffect(()=>(document.addEventListener(k_,h),()=>document.removeEventListener(k_,h)),[h]),y.useEffect(()=>{if(c.trigger){const d=g=>{const v=g.target;v!=null&&v.contains(c.trigger)&&h()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[c.trigger,h]),m.jsx(Sp,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:d=>d.preventDefault(),onDismiss:h,children:m.jsxs(qk,{"data-state":c.stateAttribute,...f,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[m.jsx(Rie,{children:r}),m.jsx(Mie,{scope:n,isInside:!0,children:m.jsx(rJ,{id:c.contentId,role:"tooltip",children:i||r})})]})})});Q8.displayName=fd;var J8="TooltipArrow",eF=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=T0(n);return Die(J8,n).isInside?null:m.jsx(Vk,{...i,...r,ref:t})});eF.displayName=J8;function Iie(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Lie(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function zie(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function $ie(e,t){const{x:n,y:r}=e;let i=!1;for(let a=0,o=t.length-1;a<t.length;o=a++){const l=t[a],c=t[o],f=l.x,h=l.y,d=c.x,g=c.y;h>r!=g>r&&n<(d-f)*(r-h)/(g-h)+f&&(i=!i)}return i}function Bie(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),Fie(t)}function Fie(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const i=e[r];for(;t.length>=2;){const a=t[t.length-1],o=t[t.length-2];if((a.x-o.x)*(i.y-o.y)>=(a.y-o.y)*(i.x-o.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const a=n[n.length-1],o=n[n.length-2];if((a.x-o.x)*(i.y-o.y)>=(a.y-o.y)*(i.x-o.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Uie=Y8,Hie=X8,qie=G8,Vie=W8,Kie=Q8,Yie=eF;function tF(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=tF(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Pt(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=tF(e))&&(r&&(r+=" "),r+=t);return r}const Xie=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Gie=(e,t)=>({classGroupId:e,validator:t}),nF=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Xy="-",ZD=[],Wie="arbitrary..",Qie=e=>{const t=Jie(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return Zie(o);const l=o.split(Xy),c=l[0]===""&&l.length>1?1:0;return rF(l,c,t)},getConflictingClassGroupIds:(o,l)=>{if(l){const c=r[o],f=n[o];return c?f?Xie(f,c):c:f||ZD}return n[o]||ZD}}},rF=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],a=n.nextPart.get(i);if(a){const f=rF(e,t+1,a);if(f)return f}const o=n.validators;if(o===null)return;const l=t===0?e.join(Xy):e.slice(t).join(Xy),c=o.length;for(let f=0;f<c;f++){const h=o[f];if(h.validator(l))return h.classGroupId}},Zie=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?Wie+r:void 0})(),Jie=e=>{const{theme:t,classGroups:n}=e;return eae(n,t)},eae=(e,t)=>{const n=nF();for(const r in e){const i=e[r];oN(i,n,r,t)}return n},oN=(e,t,n,r)=>{const i=e.length;for(let a=0;a<i;a++){const o=e[a];tae(o,t,n,r)}},tae=(e,t,n,r)=>{if(typeof e=="string"){nae(e,t,n);return}if(typeof e=="function"){rae(e,t,n,r);return}iae(e,t,n,r)},nae=(e,t,n)=>{const r=e===""?t:iF(t,e);r.classGroupId=n},rae=(e,t,n,r)=>{if(aae(e)){oN(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Gie(n,e))},iae=(e,t,n,r)=>{const i=Object.entries(e),a=i.length;for(let o=0;o<a;o++){const[l,c]=i[o];oN(c,iF(t,l),n,r)}},iF=(e,t)=>{let n=e;const r=t.split(Xy),i=r.length;for(let a=0;a<i;a++){const o=r[a];let l=n.nextPart.get(o);l||(l=nF(),n.nextPart.set(o,l)),n=l}return n},aae=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,oae=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const i=(a,o)=>{n[a]=o,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(a){let o=n[a];if(o!==void 0)return o;if((o=r[a])!==void 0)return i(a,o),o},set(a,o){a in n?n[a]=o:i(a,o)}}},A_="!",JD=":",sae=[],eR=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),lae=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const a=[];let o=0,l=0,c=0,f;const h=i.length;for(let w=0;w<h;w++){const S=i[w];if(o===0&&l===0){if(S===JD){a.push(i.slice(c,w)),c=w+1;continue}if(S==="/"){f=w;continue}}S==="["?o++:S==="]"?o--:S==="("?l++:S===")"&&l--}const d=a.length===0?i:i.slice(c);let g=d,v=!1;d.endsWith(A_)?(g=d.slice(0,-1),v=!0):d.startsWith(A_)&&(g=d.slice(1),v=!0);const b=f&&f>c?f-c:void 0;return eR(a,v,g,b)};if(t){const i=t+JD,a=r;r=o=>o.startsWith(i)?a(o.slice(i.length)):eR(sae,!1,o,void 0,!0)}if(n){const i=r;r=a=>n({className:a,parseClassName:i})}return r},uae=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let i=[];for(let a=0;a<n.length;a++){const o=n[a],l=o[0]==="[",c=t.has(o);l||c?(i.length>0&&(i.sort(),r.push(...i),i=[]),r.push(o)):i.push(o)}return i.length>0&&(i.sort(),r.push(...i)),r}},cae=e=>({cache:oae(e.cacheSize),parseClassName:lae(e),sortModifiers:uae(e),...Qie(e)}),fae=/\s+/,dae=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],l=e.trim().split(fae);let c="";for(let f=l.length-1;f>=0;f-=1){const h=l[f],{isExternal:d,modifiers:g,hasImportantModifier:v,baseClassName:b,maybePostfixModifierPosition:w}=n(h);if(d){c=h+(c.length>0?" "+c:c);continue}let S=!!w,E=r(S?b.substring(0,w):b);if(!E){if(!S){c=h+(c.length>0?" "+c:c);continue}if(E=r(b),!E){c=h+(c.length>0?" "+c:c);continue}S=!1}const C=g.length===0?"":g.length===1?g[0]:a(g).join(":"),_=v?C+A_:C,N=_+E;if(o.indexOf(N)>-1)continue;o.push(N);const O=i(E,S);for(let A=0;A<O.length;++A){const T=O[A];o.push(_+T)}c=h+(c.length>0?" "+c:c)}return c},hae=(...e)=>{let t=0,n,r,i="";for(;t<e.length;)(n=e[t++])&&(r=aF(n))&&(i&&(i+=" "),i+=r);return i},aF=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=aF(e[r]))&&(n&&(n+=" "),n+=t);return n},mae=(e,...t)=>{let n,r,i,a;const o=c=>{const f=t.reduce((h,d)=>d(h),e());return n=cae(f),r=n.cache.get,i=n.cache.set,a=l,l(c)},l=c=>{const f=r(c);if(f)return f;const h=dae(c,n);return i(c,h),h};return a=o,(...c)=>a(hae(...c))},pae=[],tr=e=>{const t=n=>n[e]||pae;return t.isThemeGetter=!0,t},oF=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,sF=/^\((?:(\w[\w-]*):)?(.+)\)$/i,gae=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,vae=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,yae=/\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$/,xae=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,bae=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,wae=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,fl=e=>gae.test(e),pt=e=>!!e&&!Number.isNaN(Number(e)),dl=e=>!!e&&Number.isInteger(Number(e)),PS=e=>e.endsWith("%")&&pt(e.slice(0,-1)),Vo=e=>vae.test(e),lF=()=>!0,Sae=e=>yae.test(e)&&!xae.test(e),sN=()=>!1,Eae=e=>bae.test(e),jae=e=>wae.test(e),_ae=e=>!Le(e)&&!ze(e),Cae=e=>Jl(e,fF,sN),Le=e=>oF.test(e),_u=e=>Jl(e,dF,Sae),tR=e=>Jl(e,Dae,pt),kae=e=>Jl(e,mF,lF),Nae=e=>Jl(e,hF,sN),nR=e=>Jl(e,uF,sN),Aae=e=>Jl(e,cF,jae),$v=e=>Jl(e,pF,Eae),ze=e=>sF.test(e),Kh=e=>Tc(e,dF),Oae=e=>Tc(e,hF),rR=e=>Tc(e,uF),Tae=e=>Tc(e,fF),Pae=e=>Tc(e,cF),Bv=e=>Tc(e,pF,!0),Mae=e=>Tc(e,mF,!0),Jl=(e,t,n)=>{const r=oF.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Tc=(e,t,n=!1)=>{const r=sF.exec(e);return r?r[1]?t(r[1]):n:!1},uF=e=>e==="position"||e==="percentage",cF=e=>e==="image"||e==="url",fF=e=>e==="length"||e==="size"||e==="bg-size",dF=e=>e==="length",Dae=e=>e==="number",hF=e=>e==="family-name",mF=e=>e==="number"||e==="weight",pF=e=>e==="shadow",Rae=()=>{const e=tr("color"),t=tr("font"),n=tr("text"),r=tr("font-weight"),i=tr("tracking"),a=tr("leading"),o=tr("breakpoint"),l=tr("container"),c=tr("spacing"),f=tr("radius"),h=tr("shadow"),d=tr("inset-shadow"),g=tr("text-shadow"),v=tr("drop-shadow"),b=tr("blur"),w=tr("perspective"),S=tr("aspect"),E=tr("ease"),C=tr("animate"),_=()=>["auto","avoid","all","avoid-page","page","left","right","column"],N=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],O=()=>[...N(),ze,Le],A=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],P=()=>[ze,Le,c],I=()=>[fl,"full","auto",...P()],z=()=>[dl,"none","subgrid",ze,Le],F=()=>["auto",{span:["full",dl,ze,Le]},dl,ze,Le],B=()=>[dl,"auto",ze,Le],G=()=>["auto","min","max","fr",ze,Le],L=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],V=()=>["start","end","center","stretch","center-safe","end-safe"],D=()=>["auto",...P()],q=()=>[fl,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],X=()=>[fl,"screen","full","dvw","lvw","svw","min","max","fit",...P()],K=()=>[fl,"screen","full","lh","dvh","lvh","svh","min","max","fit",...P()],R=()=>[e,ze,Le],H=()=>[...N(),rR,nR,{position:[ze,Le]}],U=()=>["no-repeat",{repeat:["","x","y","space","round"]}],$=()=>["auto","cover","contain",Tae,Cae,{size:[ze,Le]}],Q=()=>[PS,Kh,_u],J=()=>["","none","full",f,ze,Le],ne=()=>["",pt,Kh,_u],ae=()=>["solid","dashed","dotted","double"],ie=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ee=()=>[pt,PS,rR,nR],se=()=>["","none",b,ze,Le],pe=()=>["none",pt,ze,Le],re=()=>["none",pt,ze,Le],we=()=>[pt,ze,Le],Ee=()=>[fl,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Vo],breakpoint:[Vo],color:[lF],container:[Vo],"drop-shadow":[Vo],ease:["in","out","in-out"],font:[_ae],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Vo],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Vo],shadow:[Vo],spacing:["px",pt],text:[Vo],"text-shadow":[Vo],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",fl,Le,ze,S]}],container:["container"],columns:[{columns:[pt,Le,ze,l]}],"break-after":[{"break-after":_()}],"break-before":[{"break-before":_()}],"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:O()}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:I()}],"inset-x":[{"inset-x":I()}],"inset-y":[{"inset-y":I()}],start:[{"inset-s":I(),start:I()}],end:[{"inset-e":I(),end:I()}],"inset-bs":[{"inset-bs":I()}],"inset-be":[{"inset-be":I()}],top:[{top:I()}],right:[{right:I()}],bottom:[{bottom:I()}],left:[{left:I()}],visibility:["visible","invisible","collapse"],z:[{z:[dl,"auto",ze,Le]}],basis:[{basis:[fl,"full","auto",l,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[pt,fl,"auto","initial","none",Le]}],grow:[{grow:["",pt,ze,Le]}],shrink:[{shrink:["",pt,ze,Le]}],order:[{order:[dl,"first","last","none",ze,Le]}],"grid-cols":[{"grid-cols":z()}],"col-start-end":[{col:F()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":z()}],"row-start-end":[{row:F()}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":G()}],"auto-rows":[{"auto-rows":G()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...L(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",...L()]}],"align-items":[{items:[...V(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...V(),{baseline:["","last"]}]}],"place-content":[{"place-content":L()}],"place-items":[{"place-items":[...V(),"baseline"]}],"place-self":[{"place-self":["auto",...V()]}],p:[{p:P()}],px:[{px:P()}],py:[{py:P()}],ps:[{ps:P()}],pe:[{pe:P()}],pbs:[{pbs:P()}],pbe:[{pbe:P()}],pt:[{pt:P()}],pr:[{pr:P()}],pb:[{pb:P()}],pl:[{pl:P()}],m:[{m:D()}],mx:[{mx:D()}],my:[{my:D()}],ms:[{ms:D()}],me:[{me:D()}],mbs:[{mbs:D()}],mbe:[{mbe:D()}],mt:[{mt:D()}],mr:[{mr:D()}],mb:[{mb:D()}],ml:[{ml:D()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:q()}],"inline-size":[{inline:["auto",...X()]}],"min-inline-size":[{"min-inline":["auto",...X()]}],"max-inline-size":[{"max-inline":["none",...X()]}],"block-size":[{block:["auto",...K()]}],"min-block-size":[{"min-block":["auto",...K()]}],"max-block-size":[{"max-block":["none",...K()]}],w:[{w:[l,"screen",...q()]}],"min-w":[{"min-w":[l,"screen","none",...q()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[o]},...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",n,Kh,_u]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Mae,kae]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",PS,Le]}],"font-family":[{font:[Oae,Nae,t]}],"font-features":[{"font-features":[Le]}],"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,ze,Le]}],"line-clamp":[{"line-clamp":[pt,"none",ze,tR]}],leading:[{leading:[a,...P()]}],"list-image":[{"list-image":["none",ze,Le]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ze,Le]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:R()}],"text-color":[{text:R()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ae(),"wavy"]}],"text-decoration-thickness":[{decoration:[pt,"from-font","auto",ze,_u]}],"text-decoration-color":[{decoration:R()}],"underline-offset":[{"underline-offset":[pt,"auto",ze,Le]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ze,Le]}],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",ze,Le]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:H()}],"bg-repeat":[{bg:U()}],"bg-size":[{bg:$()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},dl,ze,Le],radial:["",ze,Le],conic:[dl,ze,Le]},Pae,Aae]}],"bg-color":[{bg:R()}],"gradient-from-pos":[{from:Q()}],"gradient-via-pos":[{via:Q()}],"gradient-to-pos":[{to:Q()}],"gradient-from":[{from:R()}],"gradient-via":[{via:R()}],"gradient-to":[{to:R()}],rounded:[{rounded:J()}],"rounded-s":[{"rounded-s":J()}],"rounded-e":[{"rounded-e":J()}],"rounded-t":[{"rounded-t":J()}],"rounded-r":[{"rounded-r":J()}],"rounded-b":[{"rounded-b":J()}],"rounded-l":[{"rounded-l":J()}],"rounded-ss":[{"rounded-ss":J()}],"rounded-se":[{"rounded-se":J()}],"rounded-ee":[{"rounded-ee":J()}],"rounded-es":[{"rounded-es":J()}],"rounded-tl":[{"rounded-tl":J()}],"rounded-tr":[{"rounded-tr":J()}],"rounded-br":[{"rounded-br":J()}],"rounded-bl":[{"rounded-bl":J()}],"border-w":[{border:ne()}],"border-w-x":[{"border-x":ne()}],"border-w-y":[{"border-y":ne()}],"border-w-s":[{"border-s":ne()}],"border-w-e":[{"border-e":ne()}],"border-w-bs":[{"border-bs":ne()}],"border-w-be":[{"border-be":ne()}],"border-w-t":[{"border-t":ne()}],"border-w-r":[{"border-r":ne()}],"border-w-b":[{"border-b":ne()}],"border-w-l":[{"border-l":ne()}],"divide-x":[{"divide-x":ne()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ne()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ae(),"hidden","none"]}],"divide-style":[{divide:[...ae(),"hidden","none"]}],"border-color":[{border:R()}],"border-color-x":[{"border-x":R()}],"border-color-y":[{"border-y":R()}],"border-color-s":[{"border-s":R()}],"border-color-e":[{"border-e":R()}],"border-color-bs":[{"border-bs":R()}],"border-color-be":[{"border-be":R()}],"border-color-t":[{"border-t":R()}],"border-color-r":[{"border-r":R()}],"border-color-b":[{"border-b":R()}],"border-color-l":[{"border-l":R()}],"divide-color":[{divide:R()}],"outline-style":[{outline:[...ae(),"none","hidden"]}],"outline-offset":[{"outline-offset":[pt,ze,Le]}],"outline-w":[{outline:["",pt,Kh,_u]}],"outline-color":[{outline:R()}],shadow:[{shadow:["","none",h,Bv,$v]}],"shadow-color":[{shadow:R()}],"inset-shadow":[{"inset-shadow":["none",d,Bv,$v]}],"inset-shadow-color":[{"inset-shadow":R()}],"ring-w":[{ring:ne()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:R()}],"ring-offset-w":[{"ring-offset":[pt,_u]}],"ring-offset-color":[{"ring-offset":R()}],"inset-ring-w":[{"inset-ring":ne()}],"inset-ring-color":[{"inset-ring":R()}],"text-shadow":[{"text-shadow":["none",g,Bv,$v]}],"text-shadow-color":[{"text-shadow":R()}],opacity:[{opacity:[pt,ze,Le]}],"mix-blend":[{"mix-blend":[...ie(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ie()}],"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":[pt]}],"mask-image-linear-from-pos":[{"mask-linear-from":ee()}],"mask-image-linear-to-pos":[{"mask-linear-to":ee()}],"mask-image-linear-from-color":[{"mask-linear-from":R()}],"mask-image-linear-to-color":[{"mask-linear-to":R()}],"mask-image-t-from-pos":[{"mask-t-from":ee()}],"mask-image-t-to-pos":[{"mask-t-to":ee()}],"mask-image-t-from-color":[{"mask-t-from":R()}],"mask-image-t-to-color":[{"mask-t-to":R()}],"mask-image-r-from-pos":[{"mask-r-from":ee()}],"mask-image-r-to-pos":[{"mask-r-to":ee()}],"mask-image-r-from-color":[{"mask-r-from":R()}],"mask-image-r-to-color":[{"mask-r-to":R()}],"mask-image-b-from-pos":[{"mask-b-from":ee()}],"mask-image-b-to-pos":[{"mask-b-to":ee()}],"mask-image-b-from-color":[{"mask-b-from":R()}],"mask-image-b-to-color":[{"mask-b-to":R()}],"mask-image-l-from-pos":[{"mask-l-from":ee()}],"mask-image-l-to-pos":[{"mask-l-to":ee()}],"mask-image-l-from-color":[{"mask-l-from":R()}],"mask-image-l-to-color":[{"mask-l-to":R()}],"mask-image-x-from-pos":[{"mask-x-from":ee()}],"mask-image-x-to-pos":[{"mask-x-to":ee()}],"mask-image-x-from-color":[{"mask-x-from":R()}],"mask-image-x-to-color":[{"mask-x-to":R()}],"mask-image-y-from-pos":[{"mask-y-from":ee()}],"mask-image-y-to-pos":[{"mask-y-to":ee()}],"mask-image-y-from-color":[{"mask-y-from":R()}],"mask-image-y-to-color":[{"mask-y-to":R()}],"mask-image-radial":[{"mask-radial":[ze,Le]}],"mask-image-radial-from-pos":[{"mask-radial-from":ee()}],"mask-image-radial-to-pos":[{"mask-radial-to":ee()}],"mask-image-radial-from-color":[{"mask-radial-from":R()}],"mask-image-radial-to-color":[{"mask-radial-to":R()}],"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":N()}],"mask-image-conic-pos":[{"mask-conic":[pt]}],"mask-image-conic-from-pos":[{"mask-conic-from":ee()}],"mask-image-conic-to-pos":[{"mask-conic-to":ee()}],"mask-image-conic-from-color":[{"mask-conic-from":R()}],"mask-image-conic-to-color":[{"mask-conic-to":R()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:H()}],"mask-repeat":[{mask:U()}],"mask-size":[{mask:$()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ze,Le]}],filter:[{filter:["","none",ze,Le]}],blur:[{blur:se()}],brightness:[{brightness:[pt,ze,Le]}],contrast:[{contrast:[pt,ze,Le]}],"drop-shadow":[{"drop-shadow":["","none",v,Bv,$v]}],"drop-shadow-color":[{"drop-shadow":R()}],grayscale:[{grayscale:["",pt,ze,Le]}],"hue-rotate":[{"hue-rotate":[pt,ze,Le]}],invert:[{invert:["",pt,ze,Le]}],saturate:[{saturate:[pt,ze,Le]}],sepia:[{sepia:["",pt,ze,Le]}],"backdrop-filter":[{"backdrop-filter":["","none",ze,Le]}],"backdrop-blur":[{"backdrop-blur":se()}],"backdrop-brightness":[{"backdrop-brightness":[pt,ze,Le]}],"backdrop-contrast":[{"backdrop-contrast":[pt,ze,Le]}],"backdrop-grayscale":[{"backdrop-grayscale":["",pt,ze,Le]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[pt,ze,Le]}],"backdrop-invert":[{"backdrop-invert":["",pt,ze,Le]}],"backdrop-opacity":[{"backdrop-opacity":[pt,ze,Le]}],"backdrop-saturate":[{"backdrop-saturate":[pt,ze,Le]}],"backdrop-sepia":[{"backdrop-sepia":["",pt,ze,Le]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":P()}],"border-spacing-x":[{"border-spacing-x":P()}],"border-spacing-y":[{"border-spacing-y":P()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ze,Le]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[pt,"initial",ze,Le]}],ease:[{ease:["linear","initial",E,ze,Le]}],delay:[{delay:[pt,ze,Le]}],animate:[{animate:["none",C,ze,Le]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,ze,Le]}],"perspective-origin":[{"perspective-origin":O()}],rotate:[{rotate:pe()}],"rotate-x":[{"rotate-x":pe()}],"rotate-y":[{"rotate-y":pe()}],"rotate-z":[{"rotate-z":pe()}],scale:[{scale:re()}],"scale-x":[{"scale-x":re()}],"scale-y":[{"scale-y":re()}],"scale-z":[{"scale-z":re()}],"scale-3d":["scale-3d"],skew:[{skew:we()}],"skew-x":[{"skew-x":we()}],"skew-y":[{"skew-y":we()}],transform:[{transform:[ze,Le,"","none","gpu","cpu"]}],"transform-origin":[{origin:O()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ee()}],"translate-x":[{"translate-x":Ee()}],"translate-y":[{"translate-y":Ee()}],"translate-z":[{"translate-z":Ee()}],"translate-none":["translate-none"],accent:[{accent:R()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:R()}],"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",ze,Le]}],"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":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mbs":[{"scroll-mbs":P()}],"scroll-mbe":[{"scroll-mbe":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pbs":[{"scroll-pbs":P()}],"scroll-pbe":[{"scroll-pbe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"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",ze,Le]}],fill:[{fill:["none",...R()]}],"stroke-w":[{stroke:[pt,Kh,_u,tR]}],stroke:[{stroke:["none",...R()]}],"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"]}},Iae=mae(Rae);function Oe(...e){return Iae(Pt(e))}function gF({delayDuration:e=0,...t}){return m.jsx(Uie,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function Lae({...e}){return m.jsx(Hie,{"data-slot":"tooltip",...e})}function zae({...e}){return m.jsx(qie,{"data-slot":"tooltip-trigger",...e})}function $ae({className:e,sideOffset:t=0,children:n,...r}){return m.jsx(Vie,{children:m.jsxs(Kie,{"data-slot":"tooltip-content",sideOffset:t,className:Oe("z-50 w-fit origin-(--radix-tooltip-content-transform-origin) animate-in rounded-md bg-foreground px-3 py-1.5 text-xs text-balance text-background fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",e),...r,children:[n,m.jsx(Yie,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground"})]})})}/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const vF=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Bae=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Fae=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const iR=e=>{const t=Fae(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */var Uae={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Hae=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const qae=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:a,iconNode:o,...l},c)=>y.createElement("svg",{ref:c,...Uae,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:vF("lucide",i),...!a&&!Hae(l)&&{"aria-hidden":"true"},...l},[...o.map(([f,h])=>y.createElement(f,h)),...Array.isArray(a)?a:[a]]));/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const nt=(e,t)=>{const n=y.forwardRef(({className:r,...i},a)=>y.createElement(qae,{ref:a,iconNode:t,className:vF(`lucide-${Bae(iR(e))}`,`lucide-${e}`,r),...i}));return n.displayName=iR(e),n};/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Vae=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Kae=nt("arrow-down",Vae);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Yae=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],P0=nt("arrow-left",Yae);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Xae=[["path",{d:"M12 6V2H8",key:"1155em"}],["path",{d:"M15 11v2",key:"i11awn"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 16a2 2 0 0 1-2 2H8.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 4 20.286V8a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2z",key:"11gyqh"}],["path",{d:"M9 11v2",key:"1ueba0"}]],lN=nt("bot-message-square",Xae);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Gae=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],yF=nt("bot",Gae);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Wae=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],xF=nt("brain",Wae);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Qae=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],uN=nt("check",Qae);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Zae=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Lm=nt("chevron-down",Zae);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Jae=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],eoe=nt("chevron-left",Jae);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const toe=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Dl=nt("chevron-right",toe);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const noe=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],roe=nt("chevron-up",noe);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ioe=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],aoe=nt("chevrons-up-down",ioe);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ooe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],po=nt("circle-alert",ooe);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const soe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],M0=nt("circle-check",soe);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const loe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],cN=nt("circle-x",loe);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const uoe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],coe=nt("clock",uoe);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const foe=[["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}],["path",{d:"m9 10-5 5 5 5",key:"1kshq7"}]],Gy=nt("corner-down-left",foe);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const doe=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],D0=nt("download",doe);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const hoe=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],bF=nt("external-link",hoe);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const moe=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],poe=nt("eye-off",moe);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const goe=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],voe=nt("eye",goe);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const yoe=[["path",{d:"M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z",key:"1fr9dc"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M12 10v2",key:"hh53o1"}],["path",{d:"M16 10v6",key:"1d6xys"}]],O_=nt("folder-kanban",yoe);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const xoe=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}],["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"m9 13 3-3 3 3",key:"1pxg3c"}]],boe=nt("folder-up",xoe);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const woe=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],Soe=nt("folder",woe);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Eoe=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],joe=nt("house",Eoe);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const _oe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Coe=nt("info",_oe);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const koe=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],Noe=nt("key-round",koe);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Aoe=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],wF=nt("layout-dashboard",Aoe);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ooe=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Or=nt("loader-circle",Ooe);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Toe=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],Ap=nt("message-square",Toe);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Poe=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],Moe=nt("monitor",Poe);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Doe=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],SF=nt("moon",Doe);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Roe=[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],EF=nt("octagon-x",Roe);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ioe=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],fN=nt("paperclip",Ioe);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Loe=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],zoe=nt("pause",Loe);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const $oe=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],Op=nt("pencil",$oe);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Boe=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],dN=nt("play",Boe);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Foe=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],zm=nt("plus",Foe);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Uoe=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],jF=nt("save",Uoe);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Hoe=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],_F=nt("search",Hoe);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const qoe=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],Voe=nt("send",qoe);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Koe=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],R0=nt("settings",Koe);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Yoe=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],CF=nt("square",Yoe);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Xoe=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],kF=nt("sun",Xoe);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Goe=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Woe=nt("terminal",Goe);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Qoe=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Eo=nt("trash-2",Qoe);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Zoe=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Joe=nt("triangle-alert",Zoe);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ese=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],I0=nt("upload",ese);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const tse=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],NF=nt("users",tse);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const nse=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],AF=nt("wrench",nse);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const rse=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],fc=nt("x",rse);function ise(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const ase=e=>{switch(e){case"success":return lse;case"info":return cse;case"warning":return use;case"error":return fse;default:return null}},ose=Array(12).fill(0),sse=({visible:e,className:t})=>Ce.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},Ce.createElement("div",{className:"sonner-spinner"},ose.map((n,r)=>Ce.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),lse=Ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},Ce.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),use=Ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},Ce.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),cse=Ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},Ce.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),fse=Ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},Ce.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),dse=Ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},Ce.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),Ce.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),hse=()=>{const[e,t]=Ce.useState(document.hidden);return Ce.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let T_=1;class mse{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...i}=t,a=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:T_++,o=this.toasts.find(c=>c.id===a),l=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),o?this.toasts=this.toasts.map(c=>c.id===a?(this.publish({...c,...t,id:a,title:r}),{...c,...t,id:a,dismissible:l,title:r}):c):this.addToast({title:r,...i,dismissible:l,id:a}),a},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const i=Promise.resolve(t instanceof Function?t():t);let a=r!==void 0,o;const l=i.then(async f=>{if(o=["resolve",f],Ce.isValidElement(f))a=!1,this.create({id:r,type:"default",message:f});else if(gse(f)&&!f.ok){a=!1;const d=typeof n.error=="function"?await n.error(`HTTP error! status: ${f.status}`):n.error,g=typeof n.description=="function"?await n.description(`HTTP error! status: ${f.status}`):n.description,b=typeof d=="object"&&!Ce.isValidElement(d)?d:{message:d};this.create({id:r,type:"error",description:g,...b})}else if(f instanceof Error){a=!1;const d=typeof n.error=="function"?await n.error(f):n.error,g=typeof n.description=="function"?await n.description(f):n.description,b=typeof d=="object"&&!Ce.isValidElement(d)?d:{message:d};this.create({id:r,type:"error",description:g,...b})}else if(n.success!==void 0){a=!1;const d=typeof n.success=="function"?await n.success(f):n.success,g=typeof n.description=="function"?await n.description(f):n.description,b=typeof d=="object"&&!Ce.isValidElement(d)?d:{message:d};this.create({id:r,type:"success",description:g,...b})}}).catch(async f=>{if(o=["reject",f],n.error!==void 0){a=!1;const h=typeof n.error=="function"?await n.error(f):n.error,d=typeof n.description=="function"?await n.description(f):n.description,v=typeof h=="object"&&!Ce.isValidElement(h)?h:{message:h};this.create({id:r,type:"error",description:d,...v})}}).finally(()=>{a&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),c=()=>new Promise((f,h)=>l.then(()=>o[0]==="reject"?h(o[1]):f(o[1])).catch(h));return typeof r!="string"&&typeof r!="number"?{unwrap:c}:Object.assign(r,{unwrap:c})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||T_++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const vi=new mse,pse=(e,t)=>{const n=(t==null?void 0:t.id)||T_++;return vi.addToast({title:e,...t,id:n}),n},gse=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",vse=pse,yse=()=>vi.toasts,xse=()=>vi.getActiveToasts(),Ut=Object.assign(vse,{success:vi.success,info:vi.info,warning:vi.warning,error:vi.error,custom:vi.custom,message:vi.message,promise:vi.promise,dismiss:vi.dismiss,loading:vi.loading},{getHistory:yse,getToasts:xse});ise("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Fv(e){return e.label!==void 0}const bse=3,wse="24px",Sse="16px",aR=4e3,Ese=356,jse=14,_se=45,Cse=200;function Qa(...e){return e.filter(Boolean).join(" ")}function kse(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const Nse=e=>{var t,n,r,i,a,o,l,c,f;const{invert:h,toast:d,unstyled:g,interacting:v,setHeights:b,visibleToasts:w,heights:S,index:E,toasts:C,expanded:_,removeToast:N,defaultRichColors:O,closeButton:A,style:T,cancelButtonStyle:P,actionButtonStyle:I,className:z="",descriptionClassName:F="",duration:B,position:G,gap:L,expandByDefault:V,classNames:D,icons:q,closeButtonAriaLabel:X="Close toast"}=e,[K,R]=Ce.useState(null),[H,U]=Ce.useState(null),[$,Q]=Ce.useState(!1),[J,ne]=Ce.useState(!1),[ae,ie]=Ce.useState(!1),[ee,se]=Ce.useState(!1),[pe,re]=Ce.useState(!1),[we,Ee]=Ce.useState(0),[$e,Ne]=Ce.useState(0),et=Ce.useRef(d.duration||B||aR),Xe=Ce.useRef(null),Ke=Ce.useRef(null),Rt=E===0,ct=E+1<=w,wt=d.type,Xt=d.dismissible!==!1,Mt=d.className||"",cn=d.descriptionClassName||"",de=Ce.useMemo(()=>S.findIndex(Ye=>Ye.toastId===d.id)||0,[S,d.id]),xe=Ce.useMemo(()=>{var Ye;return(Ye=d.closeButton)!=null?Ye:A},[d.closeButton,A]),Te=Ce.useMemo(()=>d.duration||B||aR,[d.duration,B]),Ge=Ce.useRef(0),We=Ce.useRef(0),Gt=Ce.useRef(0),nn=Ce.useRef(null),[Se,at]=G.split("-"),vt=Ce.useMemo(()=>S.reduce((Ye,qt,me)=>me>=de?Ye:Ye+qt.height,0),[S,de]),st=hse(),zn=d.invert||h,rn=wt==="loading";We.current=Ce.useMemo(()=>de*L+vt,[de,vt]),Ce.useEffect(()=>{et.current=Te},[Te]),Ce.useEffect(()=>{Q(!0)},[]),Ce.useEffect(()=>{const Ye=Ke.current;if(Ye){const qt=Ye.getBoundingClientRect().height;return Ne(qt),b(me=>[{toastId:d.id,height:qt,position:d.position},...me]),()=>b(me=>me.filter(Ze=>Ze.toastId!==d.id))}},[b,d.id]),Ce.useLayoutEffect(()=>{if(!$)return;const Ye=Ke.current,qt=Ye.style.height;Ye.style.height="auto";const me=Ye.getBoundingClientRect().height;Ye.style.height=qt,Ne(me),b(Ze=>Ze.find(St=>St.toastId===d.id)?Ze.map(St=>St.toastId===d.id?{...St,height:me}:St):[{toastId:d.id,height:me,position:d.position},...Ze])},[$,d.title,d.description,b,d.id,d.jsx,d.action,d.cancel]);const dr=Ce.useCallback(()=>{ne(!0),Ee(We.current),b(Ye=>Ye.filter(qt=>qt.toastId!==d.id)),setTimeout(()=>{N(d)},Cse)},[d,N,b,We]);Ce.useEffect(()=>{if(d.promise&&wt==="loading"||d.duration===1/0||d.type==="loading")return;let Ye;return _||v||st?(()=>{if(Gt.current<Ge.current){const Ze=new Date().getTime()-Ge.current;et.current=et.current-Ze}Gt.current=new Date().getTime()})():(()=>{et.current!==1/0&&(Ge.current=new Date().getTime(),Ye=setTimeout(()=>{d.onAutoClose==null||d.onAutoClose.call(d,d),dr()},et.current))})(),()=>clearTimeout(Ye)},[_,v,d,wt,st,dr]),Ce.useEffect(()=>{d.delete&&(dr(),d.onDismiss==null||d.onDismiss.call(d,d))},[dr,d.delete]);function Yr(){var Ye;if(q!=null&&q.loading){var qt;return Ce.createElement("div",{className:Qa(D==null?void 0:D.loader,d==null||(qt=d.classNames)==null?void 0:qt.loader,"sonner-loader"),"data-visible":wt==="loading"},q.loading)}return Ce.createElement(sse,{className:Qa(D==null?void 0:D.loader,d==null||(Ye=d.classNames)==null?void 0:Ye.loader),visible:wt==="loading"})}const Pr=d.icon||(q==null?void 0:q[wt])||ase(wt);var ii,Sr;return Ce.createElement("li",{tabIndex:0,ref:Ke,className:Qa(z,Mt,D==null?void 0:D.toast,d==null||(t=d.classNames)==null?void 0:t.toast,D==null?void 0:D.default,D==null?void 0:D[wt],d==null||(n=d.classNames)==null?void 0:n[wt]),"data-sonner-toast":"","data-rich-colors":(ii=d.richColors)!=null?ii:O,"data-styled":!(d.jsx||d.unstyled||g),"data-mounted":$,"data-promise":!!d.promise,"data-swiped":pe,"data-removed":J,"data-visible":ct,"data-y-position":Se,"data-x-position":at,"data-index":E,"data-front":Rt,"data-swiping":ae,"data-dismissible":Xt,"data-type":wt,"data-invert":zn,"data-swipe-out":ee,"data-swipe-direction":H,"data-expanded":!!(_||V&&$),"data-testid":d.testId,style:{"--index":E,"--toasts-before":E,"--z-index":C.length-E,"--offset":`${J?we:We.current}px`,"--initial-height":V?"auto":`${$e}px`,...T,...d.style},onDragEnd:()=>{ie(!1),R(null),nn.current=null},onPointerDown:Ye=>{Ye.button!==2&&(rn||!Xt||(Xe.current=new Date,Ee(We.current),Ye.target.setPointerCapture(Ye.pointerId),Ye.target.tagName!=="BUTTON"&&(ie(!0),nn.current={x:Ye.clientX,y:Ye.clientY})))},onPointerUp:()=>{var Ye,qt,me;if(ee||!Xt)return;nn.current=null;const Ze=Number(((Ye=Ke.current)==null?void 0:Ye.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),an=Number(((qt=Ke.current)==null?void 0:qt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),St=new Date().getTime()-((me=Xe.current)==null?void 0:me.getTime()),Nn=K==="x"?Ze:an,Xr=Math.abs(Nn)/St;if(Math.abs(Nn)>=_se||Xr>.11){Ee(We.current),d.onDismiss==null||d.onDismiss.call(d,d),U(K==="x"?Ze>0?"right":"left":an>0?"down":"up"),dr(),se(!0);return}else{var hr,Jn;(hr=Ke.current)==null||hr.style.setProperty("--swipe-amount-x","0px"),(Jn=Ke.current)==null||Jn.style.setProperty("--swipe-amount-y","0px")}re(!1),ie(!1),R(null)},onPointerMove:Ye=>{var qt,me,Ze;if(!nn.current||!Xt||((qt=window.getSelection())==null?void 0:qt.toString().length)>0)return;const St=Ye.clientY-nn.current.y,Nn=Ye.clientX-nn.current.x;var Xr;const hr=(Xr=e.swipeDirections)!=null?Xr:kse(G);!K&&(Math.abs(Nn)>1||Math.abs(St)>1)&&R(Math.abs(Nn)>Math.abs(St)?"x":"y");let Jn={x:0,y:0};const Va=Gr=>1/(1.5+Math.abs(Gr)/20);if(K==="y"){if(hr.includes("top")||hr.includes("bottom"))if(hr.includes("top")&&St<0||hr.includes("bottom")&&St>0)Jn.y=St;else{const Gr=St*Va(St);Jn.y=Math.abs(Gr)<Math.abs(St)?Gr:St}}else if(K==="x"&&(hr.includes("left")||hr.includes("right")))if(hr.includes("left")&&Nn<0||hr.includes("right")&&Nn>0)Jn.x=Nn;else{const Gr=Nn*Va(Nn);Jn.x=Math.abs(Gr)<Math.abs(Nn)?Gr:Nn}(Math.abs(Jn.x)>0||Math.abs(Jn.y)>0)&&re(!0),(me=Ke.current)==null||me.style.setProperty("--swipe-amount-x",`${Jn.x}px`),(Ze=Ke.current)==null||Ze.style.setProperty("--swipe-amount-y",`${Jn.y}px`)}},xe&&!d.jsx&&wt!=="loading"?Ce.createElement("button",{"aria-label":X,"data-disabled":rn,"data-close-button":!0,onClick:rn||!Xt?()=>{}:()=>{dr(),d.onDismiss==null||d.onDismiss.call(d,d)},className:Qa(D==null?void 0:D.closeButton,d==null||(r=d.classNames)==null?void 0:r.closeButton)},(Sr=q==null?void 0:q.close)!=null?Sr:dse):null,(wt||d.icon||d.promise)&&d.icon!==null&&((q==null?void 0:q[wt])!==null||d.icon)?Ce.createElement("div",{"data-icon":"",className:Qa(D==null?void 0:D.icon,d==null||(i=d.classNames)==null?void 0:i.icon)},d.promise||d.type==="loading"&&!d.icon?d.icon||Yr():null,d.type!=="loading"?Pr:null):null,Ce.createElement("div",{"data-content":"",className:Qa(D==null?void 0:D.content,d==null||(a=d.classNames)==null?void 0:a.content)},Ce.createElement("div",{"data-title":"",className:Qa(D==null?void 0:D.title,d==null||(o=d.classNames)==null?void 0:o.title)},d.jsx?d.jsx:typeof d.title=="function"?d.title():d.title),d.description?Ce.createElement("div",{"data-description":"",className:Qa(F,cn,D==null?void 0:D.description,d==null||(l=d.classNames)==null?void 0:l.description)},typeof d.description=="function"?d.description():d.description):null),Ce.isValidElement(d.cancel)?d.cancel:d.cancel&&Fv(d.cancel)?Ce.createElement("button",{"data-button":!0,"data-cancel":!0,style:d.cancelButtonStyle||P,onClick:Ye=>{Fv(d.cancel)&&Xt&&(d.cancel.onClick==null||d.cancel.onClick.call(d.cancel,Ye),dr())},className:Qa(D==null?void 0:D.cancelButton,d==null||(c=d.classNames)==null?void 0:c.cancelButton)},d.cancel.label):null,Ce.isValidElement(d.action)?d.action:d.action&&Fv(d.action)?Ce.createElement("button",{"data-button":!0,"data-action":!0,style:d.actionButtonStyle||I,onClick:Ye=>{Fv(d.action)&&(d.action.onClick==null||d.action.onClick.call(d.action,Ye),!Ye.defaultPrevented&&dr())},className:Qa(D==null?void 0:D.actionButton,d==null||(f=d.classNames)==null?void 0:f.actionButton)},d.action.label):null)};function oR(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function Ase(e,t){const n={};return[e,t].forEach((r,i)=>{const a=i===1,o=a?"--mobile-offset":"--offset",l=a?Sse:wse;function c(f){["top","right","bottom","left"].forEach(h=>{n[`${o}-${h}`]=typeof f=="number"?`${f}px`:f})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(f=>{r[f]===void 0?n[`${o}-${f}`]=l:n[`${o}-${f}`]=typeof r[f]=="number"?`${r[f]}px`:r[f]}):c(l)}),n}const Ose=Ce.forwardRef(function(t,n){const{id:r,invert:i,position:a="bottom-right",hotkey:o=["altKey","KeyT"],expand:l,closeButton:c,className:f,offset:h,mobileOffset:d,theme:g="light",richColors:v,duration:b,style:w,visibleToasts:S=bse,toastOptions:E,dir:C=oR(),gap:_=jse,icons:N,containerAriaLabel:O="Notifications"}=t,[A,T]=Ce.useState([]),P=Ce.useMemo(()=>r?A.filter($=>$.toasterId===r):A.filter($=>!$.toasterId),[A,r]),I=Ce.useMemo(()=>Array.from(new Set([a].concat(P.filter($=>$.position).map($=>$.position)))),[P,a]),[z,F]=Ce.useState([]),[B,G]=Ce.useState(!1),[L,V]=Ce.useState(!1),[D,q]=Ce.useState(g!=="system"?g:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),X=Ce.useRef(null),K=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),R=Ce.useRef(null),H=Ce.useRef(!1),U=Ce.useCallback($=>{T(Q=>{var J;return(J=Q.find(ne=>ne.id===$.id))!=null&&J.delete||vi.dismiss($.id),Q.filter(({id:ne})=>ne!==$.id)})},[]);return Ce.useEffect(()=>vi.subscribe($=>{if($.dismiss){requestAnimationFrame(()=>{T(Q=>Q.map(J=>J.id===$.id?{...J,delete:!0}:J))});return}setTimeout(()=>{B$.flushSync(()=>{T(Q=>{const J=Q.findIndex(ne=>ne.id===$.id);return J!==-1?[...Q.slice(0,J),{...Q[J],...$},...Q.slice(J+1)]:[$,...Q]})})})}),[A]),Ce.useEffect(()=>{if(g!=="system"){q(g);return}if(g==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?q("dark"):q("light")),typeof window>"u")return;const $=window.matchMedia("(prefers-color-scheme: dark)");try{$.addEventListener("change",({matches:Q})=>{q(Q?"dark":"light")})}catch{$.addListener(({matches:J})=>{try{q(J?"dark":"light")}catch(ne){console.error(ne)}})}},[g]),Ce.useEffect(()=>{A.length<=1&&G(!1)},[A]),Ce.useEffect(()=>{const $=Q=>{var J;if(o.every(ie=>Q[ie]||Q.code===ie)){var ae;G(!0),(ae=X.current)==null||ae.focus()}Q.code==="Escape"&&(document.activeElement===X.current||(J=X.current)!=null&&J.contains(document.activeElement))&&G(!1)};return document.addEventListener("keydown",$),()=>document.removeEventListener("keydown",$)},[o]),Ce.useEffect(()=>{if(X.current)return()=>{R.current&&(R.current.focus({preventScroll:!0}),R.current=null,H.current=!1)}},[X.current]),Ce.createElement("section",{ref:n,"aria-label":`${O} ${K}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},I.map(($,Q)=>{var J;const[ne,ae]=$.split("-");return P.length?Ce.createElement("ol",{key:$,dir:C==="auto"?oR():C,tabIndex:-1,ref:X,className:f,"data-sonner-toaster":!0,"data-sonner-theme":D,"data-y-position":ne,"data-x-position":ae,style:{"--front-toast-height":`${((J=z[0])==null?void 0:J.height)||0}px`,"--width":`${Ese}px`,"--gap":`${_}px`,...w,...Ase(h,d)},onBlur:ie=>{H.current&&!ie.currentTarget.contains(ie.relatedTarget)&&(H.current=!1,R.current&&(R.current.focus({preventScroll:!0}),R.current=null))},onFocus:ie=>{ie.target instanceof HTMLElement&&ie.target.dataset.dismissible==="false"||H.current||(H.current=!0,R.current=ie.relatedTarget)},onMouseEnter:()=>G(!0),onMouseMove:()=>G(!0),onMouseLeave:()=>{L||G(!1)},onDragEnd:()=>G(!1),onPointerDown:ie=>{ie.target instanceof HTMLElement&&ie.target.dataset.dismissible==="false"||V(!0)},onPointerUp:()=>V(!1)},P.filter(ie=>!ie.position&&Q===0||ie.position===$).map((ie,ee)=>{var se,pe;return Ce.createElement(Nse,{key:ie.id,icons:N,index:ee,toast:ie,defaultRichColors:v,duration:(se=E==null?void 0:E.duration)!=null?se:b,className:E==null?void 0:E.className,descriptionClassName:E==null?void 0:E.descriptionClassName,invert:i,visibleToasts:S,closeButton:(pe=E==null?void 0:E.closeButton)!=null?pe:c,interacting:L,position:$,style:E==null?void 0:E.style,unstyled:E==null?void 0:E.unstyled,classNames:E==null?void 0:E.classNames,cancelButtonStyle:E==null?void 0:E.cancelButtonStyle,actionButtonStyle:E==null?void 0:E.actionButtonStyle,closeButtonAriaLabel:E==null?void 0:E.closeButtonAriaLabel,removeToast:U,toasts:P.filter(re=>re.position==ie.position),heights:z.filter(re=>re.position==ie.position),setHeights:F,expandByDefault:l,gap:_,expanded:B,swipeDirections:t.swipeDirections})})):null}))}),Tse=({...e})=>{const{theme:t="system"}=yk();return m.jsx(Ose,{theme:t,className:"toaster group",icons:{success:m.jsx(M0,{className:"size-4"}),info:m.jsx(Coe,{className:"size-4"}),warning:m.jsx(Joe,{className:"size-4"}),error:m.jsx(EF,{className:"size-4"}),loading:m.jsx(Or,{className:"size-4 animate-spin"})},style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)"},...e})},Pse=new DZ({defaultOptions:{queries:{staleTime:3e4,gcTime:5*6e4,refetchOnWindowFocus:!0,retry:1}}}),OF="/api";class TF extends Error{constructor(t,n,r){super(`${t} ${n}`),this.status=t,this.statusText=n,this.body=r,this.name="ApiError"}}async function Yh(e,t){const n=`${OF}${e}`,r=new AbortController,i=setTimeout(()=>r.abort(),3e4);let a;try{a=await fetch(n,{...t,signal:(t==null?void 0:t.signal)??r.signal,headers:{"Content-Type":"application/json",...t==null?void 0:t.headers}})}finally{clearTimeout(i)}if(!a.ok){const o=await a.json().catch(()=>null);throw new TF(a.status,a.statusText,o)}if(!(a.status===204||a.headers.get("content-length")==="0"))return a.json()}async function Mse(e,t){const n=`${OF}${e}`,r=new AbortController,i=setTimeout(()=>r.abort(),6e4);let a;try{a=await fetch(n,{method:"POST",body:t,signal:r.signal})}finally{clearTimeout(i)}if(!a.ok){const o=await a.json().catch(()=>null);throw new TF(a.status,a.statusText,o)}return a.json()}const Fe={get:e=>Yh(e),post:(e,t)=>Yh(e,{method:"POST",body:t!=null?JSON.stringify(t):void 0}),put:(e,t)=>Yh(e,{method:"PUT",body:JSON.stringify(t)}),patch:(e,t)=>Yh(e,{method:"PATCH",body:JSON.stringify(t)}),delete:e=>Yh(e,{method:"DELETE"}),upload:(e,t)=>{const n=new FormData;return t.forEach(r=>n.append("files",r)),Mse(e,n)}},Ue={projects:{all:["projects"],detail:e=>["projects",e],config:e=>["projects",e,"config"],sessions:e=>["projects",e,"sessions"],files:e=>["projects",e,"files"],stats:(e,t)=>["projects",e,"stats",t],resources:e=>["projects",e,"resources"],resourceDetail:(e,t,n)=>["projects",e,"resources",t,n],resourceConfig:(e,t,n)=>["projects",e,"resources",t,n,"config"]},sessions:{all:e=>["sessions",e],detail:(e,t)=>["sessions",e,t],running:()=>["sessions",{status:"running"}]},roles:{all:["roles"]},config:{global:["config","global"]},registry:{list:e=>["registry",e],detail:(e,t)=>["registry",e,t],config:(e,t)=>["registry",e,t,"config"],validate:e=>["registry","agents",e,"validate"]},schedules:{all:["schedules"],detail:e=>["schedules",e],history:e=>["schedules",e,"history"]},conversations:{all:e=>["conversations",e],detail:e=>["conversations","detail",e]}};function $d(){return Wn({queryKey:Ue.projects.all,queryFn:()=>Fe.get("/projects")})}function hN(e,t){return Wn({queryKey:Ue.projects.detail(e),queryFn:()=>Fe.get(`/projects/${e}`),enabled:t==null?void 0:t.enabled})}function L0(e){return Wn({queryKey:Ue.projects.files(e),queryFn:()=>Fe.get(`/projects/${e}/files`)})}function mN(e,t){return Wn({queryKey:Ue.projects.config(e),queryFn:()=>Fe.get(`/projects/${e}/config`),enabled:t==null?void 0:t.enabled})}function Wy(e,t){return BZ({queryKey:Ue.conversations.detail(e),queryFn:({pageParam:n})=>Fe.get(`/conversations/${e}?limit=20${n?`&before_id=${encodeURIComponent(n)}`:""}`),initialPageParam:null,getPreviousPageParam:n=>{var r;return n.has_more?((r=n.sessions[0])==null?void 0:r.run_id)??null:null},getNextPageParam:()=>null,...t})}function Dse(e=10){return Wn({queryKey:["conversations","recent",e],queryFn:()=>Fe.get(`/conversations/recent?limit=${e}`)})}function z0(){return Wn({queryKey:["imu","conversations"],queryFn:()=>Fe.get("/imu/conversations")})}function pN(e,t=1,n=20){return Wn({queryKey:[...Ue.conversations.all(e),t,n],queryFn:()=>Fe.get(`/projects/${e}/conversations?page=${t}&per_page=${n}`),enabled:e>0})}function PF(){const e=gt();return Ht({mutationFn:t=>Fe.post("/conversations",t),onSuccess:(t,n)=>{e.invalidateQueries({queryKey:Ue.conversations.all(n.project_id)})}})}function MF(e){const t=gt();return Ht({mutationFn:n=>Fe.post(`/conversations/${e}/tasks`,n),onSuccess:(n,r)=>{n.queued&&t.setQueryData(Ue.conversations.detail(e),i=>{if(!i)return i;const a=i.pages.map((o,l)=>{if(l!==i.pages.length-1)return o;const c=o.pending_task||"",f=c?`${c}

${r.task}`:r.task;return{...o,pending_task:f}});return{...i,pages:a}}),t.invalidateQueries({queryKey:Ue.conversations.detail(e)}),t.invalidateQueries({queryKey:["sessions"]})}})}function gN(e){const t=gt();return Ht({mutationFn:({conversationId:n,title:r})=>Fe.patch(`/conversations/${n}`,{title:r}),onSuccess:(n,{conversationId:r})=>{t.invalidateQueries({queryKey:Ue.conversations.all(e)}),t.invalidateQueries({queryKey:Ue.conversations.detail(r)})}})}function DF(e){const t=gt();return Ht({mutationFn:()=>Fe.delete(`/conversations/${e}/pending_task`),onSuccess:()=>{t.invalidateQueries({queryKey:Ue.conversations.detail(e)})}})}function RF(){const e=gt();return Ht({mutationFn:()=>Fe.post("/imu/conversations",{}),onSuccess:()=>{e.invalidateQueries({queryKey:["imu","conversations"]})}})}function vN(){const e=gt();return Ht({mutationFn:({conversationId:t,title:n})=>Fe.patch(`/conversations/${t}`,{title:n}),onSuccess:(t,{conversationId:n})=>{e.invalidateQueries({queryKey:["imu","conversations"]}),e.invalidateQueries({queryKey:Ue.conversations.detail(n)})}})}function IF(){const e=gt();return Ht({mutationFn:t=>Fe.delete(`/conversations/${t}`),onMutate:async t=>{await e.cancelQueries({queryKey:["imu","conversations"]});const n=e.getQueryData(["imu","conversations"]);return e.setQueryData(["imu","conversations"],r=>r&&r.filter(i=>i.id!==t)),{previous:n}},onError:(t,n,r)=>{r!=null&&r.previous&&e.setQueryData(["imu","conversations"],r.previous)},onSettled:()=>{e.invalidateQueries({queryKey:["imu","conversations"]})}})}function LF(e){const t=gt();return Ht({mutationFn:n=>Fe.delete(`/conversations/${n}`),onMutate:async n=>{await t.cancelQueries({queryKey:Ue.conversations.all(e)});const r=t.getQueryData(Ue.conversations.all(e));return t.setQueryData(Ue.conversations.all(e),i=>i&&{...i,items:i.items.filter(a=>a.id!==n),total:i.total-1}),{previous:r}},onError:(n,r,i)=>{i!=null&&i.previous&&t.setQueryData(Ue.conversations.all(e),i.previous)},onSettled:()=>{t.invalidateQueries({queryKey:Ue.conversations.all(e)})}})}function rt({className:e,type:t,...n}){return m.jsx("input",{type:t,"data-slot":"input",className:Oe("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30","focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",e),...n})}const Rse=500;function Ise({onCommandPalette:e,onShortcutsHelp:t}){const n=Ba(),r=y.useRef(null),i=y.useRef(void 0);y.useEffect(()=>{function a(o){const l=o.target;if(!(l.tagName==="INPUT"||l.tagName==="TEXTAREA"||l.isContentEditable)){if((o.metaKey||o.ctrlKey)&&o.key==="k"){o.preventDefault(),e();return}if(!(o.metaKey||o.ctrlKey||o.altKey)){if(o.key==="?"){o.preventDefault(),t();return}if(r.current==="g"){if(r.current=null,clearTimeout(i.current),o.key==="d"){o.preventDefault(),n("/");return}if(o.key==="p"){o.preventDefault(),n("/projects");return}}if(o.key==="g"){r.current="g",i.current=setTimeout(()=>{r.current=null},Rse);return}}}}return document.addEventListener("keydown",a),()=>{document.removeEventListener("keydown",a),clearTimeout(i.current)}},[n,e,t])}function zF(e){const t=e?"?"+new URLSearchParams(e).toString():"";return Wn({queryKey:Ue.sessions.all(e),queryFn:()=>Fe.get(`/sessions${t}`)})}function yN(){return zF({status:"running",per_page:"50"})}function Lse(){return zF({per_page:"10"})}function $F(e,t=1,n=20){return Wn({queryKey:[...Ue.projects.sessions(e),t,n],queryFn:()=>Fe.get(`/projects/${e}/sessions?page=${t}&per_page=${n}`)})}function zse(e,t,n){return Wn({queryKey:Ue.sessions.detail(e,t),queryFn:()=>Fe.get(`/projects/${e}/sessions/${t}`),...n})}var sR=1,$se=.9,Bse=.8,Fse=.17,MS=.1,DS=.999,Use=.9999,Hse=.99,qse=/[\\\/_+.#"@\[\(\{&]/,Vse=/[\\\/_+.#"@\[\(\{&]/g,Kse=/[\s-]/,BF=/[\s-]/g;function P_(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?sR:Hse;var l=`${i},${a}`;if(o[l]!==void 0)return o[l];for(var c=r.charAt(a),f=n.indexOf(c,i),h=0,d,g,v,b;f>=0;)d=P_(e,t,n,r,f+1,a+1,o),d>h&&(f===i?d*=sR:qse.test(e.charAt(f-1))?(d*=Bse,v=e.slice(i,f-1).match(Vse),v&&i>0&&(d*=Math.pow(DS,v.length))):Kse.test(e.charAt(f-1))?(d*=$se,b=e.slice(i,f-1).match(BF),b&&i>0&&(d*=Math.pow(DS,b.length))):(d*=Fse,i>0&&(d*=Math.pow(DS,f-i))),e.charAt(f)!==t.charAt(a)&&(d*=Use)),(d<MS&&n.charAt(f-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(f-1)!==r.charAt(a))&&(g=P_(e,t,n,r,f+1,a+2,o),g*MS>d&&(d=g*MS)),d>h&&(h=d),f=n.indexOf(c,f+1);return o[l]=h,h}function lR(e){return e.toLowerCase().replace(BF," ")}function Yse(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,P_(e,t,lR(e),lR(t),0,0,{})}var Xh='[cmdk-group=""]',RS='[cmdk-group-items=""]',Xse='[cmdk-group-heading=""]',FF='[cmdk-item=""]',uR=`${FF}:not([aria-disabled="true"])`,M_="cmdk-item-select",Mf="data-value",Gse=(e,t,n)=>Yse(e,t,n),UF=y.createContext(void 0),Tp=()=>y.useContext(UF),HF=y.createContext(void 0),xN=()=>y.useContext(HF),qF=y.createContext(void 0),VF=y.forwardRef((e,t)=>{let n=Df(()=>{var U,$;return{search:"",value:($=(U=e.value)!=null?U:e.defaultValue)!=null?$:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=Df(()=>new Set),i=Df(()=>new Map),a=Df(()=>new Map),o=Df(()=>new Set),l=KF(e),{label:c,children:f,value:h,onValueChange:d,filter:g,shouldFilter:v,loop:b,disablePointerSelection:w=!1,vimBindings:S=!0,...E}=e,C=yr(),_=yr(),N=yr(),O=y.useRef(null),A=ole();dc(()=>{if(h!==void 0){let U=h.trim();n.current.value=U,T.emit()}},[h]),dc(()=>{A(6,G)},[]);let T=y.useMemo(()=>({subscribe:U=>(o.current.add(U),()=>o.current.delete(U)),snapshot:()=>n.current,setState:(U,$,Q)=>{var J,ne,ae,ie;if(!Object.is(n.current[U],$)){if(n.current[U]=$,U==="search")B(),z(),A(1,F);else if(U==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let ee=document.getElementById(N);ee?ee.focus():(J=document.getElementById(C))==null||J.focus()}if(A(7,()=>{var ee;n.current.selectedItemId=(ee=L())==null?void 0:ee.id,T.emit()}),Q||A(5,G),((ne=l.current)==null?void 0:ne.value)!==void 0){let ee=$??"";(ie=(ae=l.current).onValueChange)==null||ie.call(ae,ee);return}}T.emit()}},emit:()=>{o.current.forEach(U=>U())}}),[]),P=y.useMemo(()=>({value:(U,$,Q)=>{var J;$!==((J=a.current.get(U))==null?void 0:J.value)&&(a.current.set(U,{value:$,keywords:Q}),n.current.filtered.items.set(U,I($,Q)),A(2,()=>{z(),T.emit()}))},item:(U,$)=>(r.current.add(U),$&&(i.current.has($)?i.current.get($).add(U):i.current.set($,new Set([U]))),A(3,()=>{B(),z(),n.current.value||F(),T.emit()}),()=>{a.current.delete(U),r.current.delete(U),n.current.filtered.items.delete(U);let Q=L();A(4,()=>{B(),(Q==null?void 0:Q.getAttribute("id"))===U&&F(),T.emit()})}),group:U=>(i.current.has(U)||i.current.set(U,new Set),()=>{a.current.delete(U),i.current.delete(U)}),filter:()=>l.current.shouldFilter,label:c||e["aria-label"],getDisablePointerSelection:()=>l.current.disablePointerSelection,listId:C,inputId:N,labelId:_,listInnerRef:O}),[]);function I(U,$){var Q,J;let ne=(J=(Q=l.current)==null?void 0:Q.filter)!=null?J:Gse;return U?ne(U,n.current.search,$):0}function z(){if(!n.current.search||l.current.shouldFilter===!1)return;let U=n.current.filtered.items,$=[];n.current.filtered.groups.forEach(J=>{let ne=i.current.get(J),ae=0;ne.forEach(ie=>{let ee=U.get(ie);ae=Math.max(ee,ae)}),$.push([J,ae])});let Q=O.current;V().sort((J,ne)=>{var ae,ie;let ee=J.getAttribute("id"),se=ne.getAttribute("id");return((ae=U.get(se))!=null?ae:0)-((ie=U.get(ee))!=null?ie:0)}).forEach(J=>{let ne=J.closest(RS);ne?ne.appendChild(J.parentElement===ne?J:J.closest(`${RS} > *`)):Q.appendChild(J.parentElement===Q?J:J.closest(`${RS} > *`))}),$.sort((J,ne)=>ne[1]-J[1]).forEach(J=>{var ne;let ae=(ne=O.current)==null?void 0:ne.querySelector(`${Xh}[${Mf}="${encodeURIComponent(J[0])}"]`);ae==null||ae.parentElement.appendChild(ae)})}function F(){let U=V().find(Q=>Q.getAttribute("aria-disabled")!=="true"),$=U==null?void 0:U.getAttribute(Mf);T.setState("value",$||void 0)}function B(){var U,$,Q,J;if(!n.current.search||l.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let ne=0;for(let ae of r.current){let ie=($=(U=a.current.get(ae))==null?void 0:U.value)!=null?$:"",ee=(J=(Q=a.current.get(ae))==null?void 0:Q.keywords)!=null?J:[],se=I(ie,ee);n.current.filtered.items.set(ae,se),se>0&&ne++}for(let[ae,ie]of i.current)for(let ee of ie)if(n.current.filtered.items.get(ee)>0){n.current.filtered.groups.add(ae);break}n.current.filtered.count=ne}function G(){var U,$,Q;let J=L();J&&(((U=J.parentElement)==null?void 0:U.firstChild)===J&&((Q=($=J.closest(Xh))==null?void 0:$.querySelector(Xse))==null||Q.scrollIntoView({block:"nearest"})),J.scrollIntoView({block:"nearest"}))}function L(){var U;return(U=O.current)==null?void 0:U.querySelector(`${FF}[aria-selected="true"]`)}function V(){var U;return Array.from(((U=O.current)==null?void 0:U.querySelectorAll(uR))||[])}function D(U){let $=V()[U];$&&T.setState("value",$.getAttribute(Mf))}function q(U){var $;let Q=L(),J=V(),ne=J.findIndex(ie=>ie===Q),ae=J[ne+U];($=l.current)!=null&&$.loop&&(ae=ne+U<0?J[J.length-1]:ne+U===J.length?J[0]:J[ne+U]),ae&&T.setState("value",ae.getAttribute(Mf))}function X(U){let $=L(),Q=$==null?void 0:$.closest(Xh),J;for(;Q&&!J;)Q=U>0?ile(Q,Xh):ale(Q,Xh),J=Q==null?void 0:Q.querySelector(uR);J?T.setState("value",J.getAttribute(Mf)):q(U)}let K=()=>D(V().length-1),R=U=>{U.preventDefault(),U.metaKey?K():U.altKey?X(1):q(1)},H=U=>{U.preventDefault(),U.metaKey?D(0):U.altKey?X(-1):q(-1)};return y.createElement(He.div,{ref:t,tabIndex:-1,...E,"cmdk-root":"",onKeyDown:U=>{var $;($=E.onKeyDown)==null||$.call(E,U);let Q=U.nativeEvent.isComposing||U.keyCode===229;if(!(U.defaultPrevented||Q))switch(U.key){case"n":case"j":{S&&U.ctrlKey&&R(U);break}case"ArrowDown":{R(U);break}case"p":case"k":{S&&U.ctrlKey&&H(U);break}case"ArrowUp":{H(U);break}case"Home":{U.preventDefault(),D(0);break}case"End":{U.preventDefault(),K();break}case"Enter":{U.preventDefault();let J=L();if(J){let ne=new Event(M_);J.dispatchEvent(ne)}}}}},y.createElement("label",{"cmdk-label":"",htmlFor:P.inputId,id:P.labelId,style:lle},c),$0(e,U=>y.createElement(HF.Provider,{value:T},y.createElement(UF.Provider,{value:P},U))))}),Wse=y.forwardRef((e,t)=>{var n,r;let i=yr(),a=y.useRef(null),o=y.useContext(qF),l=Tp(),c=KF(e),f=(r=(n=c.current)==null?void 0:n.forceMount)!=null?r:o==null?void 0:o.forceMount;dc(()=>{if(!f)return l.item(i,o==null?void 0:o.id)},[f]);let h=YF(i,a,[e.value,e.children,a],e.keywords),d=xN(),g=Hl(A=>A.value&&A.value===h.current),v=Hl(A=>f||l.filter()===!1?!0:A.search?A.filtered.items.get(i)>0:!0);y.useEffect(()=>{let A=a.current;if(!(!A||e.disabled))return A.addEventListener(M_,b),()=>A.removeEventListener(M_,b)},[v,e.onSelect,e.disabled]);function b(){var A,T;w(),(T=(A=c.current).onSelect)==null||T.call(A,h.current)}function w(){d.setState("value",h.current,!0)}if(!v)return null;let{disabled:S,value:E,onSelect:C,forceMount:_,keywords:N,...O}=e;return y.createElement(He.div,{ref:ls(a,t),...O,id:i,"cmdk-item":"",role:"option","aria-disabled":!!S,"aria-selected":!!g,"data-disabled":!!S,"data-selected":!!g,onPointerMove:S||l.getDisablePointerSelection()?void 0:w,onClick:S?void 0:b},e.children)}),Qse=y.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...a}=e,o=yr(),l=y.useRef(null),c=y.useRef(null),f=yr(),h=Tp(),d=Hl(v=>i||h.filter()===!1?!0:v.search?v.filtered.groups.has(o):!0);dc(()=>h.group(o),[]),YF(o,l,[e.value,e.heading,c]);let g=y.useMemo(()=>({id:o,forceMount:i}),[i]);return y.createElement(He.div,{ref:ls(l,t),...a,"cmdk-group":"",role:"presentation",hidden:d?void 0:!0},n&&y.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:f},n),$0(e,v=>y.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?f:void 0},y.createElement(qF.Provider,{value:g},v))))}),Zse=y.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=y.useRef(null),a=Hl(o=>!o.search);return!n&&!a?null:y.createElement(He.div,{ref:ls(i,t),...r,"cmdk-separator":"",role:"separator"})}),Jse=y.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,a=xN(),o=Hl(f=>f.search),l=Hl(f=>f.selectedItemId),c=Tp();return y.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),y.createElement(He.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":l,id:c.inputId,type:"text",value:i?e.value:o,onChange:f=>{i||a.setState("search",f.target.value),n==null||n(f.target.value)}})}),ele=y.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...i}=e,a=y.useRef(null),o=y.useRef(null),l=Hl(f=>f.selectedItemId),c=Tp();return y.useEffect(()=>{if(o.current&&a.current){let f=o.current,h=a.current,d,g=new ResizeObserver(()=>{d=requestAnimationFrame(()=>{let v=f.offsetHeight;h.style.setProperty("--cmdk-list-height",v.toFixed(1)+"px")})});return g.observe(f),()=>{cancelAnimationFrame(d),g.unobserve(f)}}},[]),y.createElement(He.div,{ref:ls(a,t),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":l,"aria-label":r,id:c.listId},$0(e,f=>y.createElement("div",{ref:ls(o,c.listInnerRef),"cmdk-list-sizer":""},f)))}),tle=y.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:o,...l}=e;return y.createElement(Ak,{open:n,onOpenChange:r},y.createElement(Ok,{container:o},y.createElement(Tk,{"cmdk-overlay":"",className:i}),y.createElement(Pk,{"aria-label":e.label,"cmdk-dialog":"",className:a},y.createElement(VF,{ref:t,...l}))))}),nle=y.forwardRef((e,t)=>Hl(n=>n.filtered.count===0)?y.createElement(He.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),rle=y.forwardRef((e,t)=>{let{progress:n,children:r,label:i="Loading...",...a}=e;return y.createElement(He.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},$0(e,o=>y.createElement("div",{"aria-hidden":!0},o)))}),Bd=Object.assign(VF,{List:ele,Item:Wse,Input:Jse,Group:Qse,Separator:Zse,Dialog:tle,Empty:nle,Loading:rle});function ile(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function ale(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function KF(e){let t=y.useRef(e);return dc(()=>{t.current=e}),t}var dc=typeof window>"u"?y.useEffect:y.useLayoutEffect;function Df(e){let t=y.useRef();return t.current===void 0&&(t.current=e()),t}function Hl(e){let t=xN(),n=()=>e(t.snapshot());return y.useSyncExternalStore(t.subscribe,n,n)}function YF(e,t,n,r=[]){let i=y.useRef(),a=Tp();return dc(()=>{var o;let l=(()=>{var f;for(let h of n){if(typeof h=="string")return h.trim();if(typeof h=="object"&&"current"in h)return h.current?(f=h.current.textContent)==null?void 0:f.trim():i.current}})(),c=r.map(f=>f.trim());a.value(e,l,c),(o=t.current)==null||o.setAttribute(Mf,l),i.current=l}),i}var ole=()=>{let[e,t]=y.useState(),n=Df(()=>new Map);return dc(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,i)=>{n.current.set(r,i),t({})}};function sle(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function $0({asChild:e,children:t},n){return e&&y.isValidElement(t)?y.cloneElement(sle(t),{ref:t.ref},n(t.props.children)):n(t)}var lle={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const cR=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,fR=Pt,B0=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return fR(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:a}=t,o=Object.keys(i).map(f=>{const h=n==null?void 0:n[f],d=a==null?void 0:a[f];if(h===null)return null;const g=cR(h)||cR(d);return i[f][g]}),l=n&&Object.entries(n).reduce((f,h)=>{let[d,g]=h;return g===void 0||(f[d]=g),f},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((f,h)=>{let{class:d,className:g,...v}=h;return Object.entries(v).every(b=>{let[w,S]=b;return Array.isArray(S)?S.includes({...a,...l}[w]):{...a,...l}[w]===S})?[...f,d,g]:f},[]);return fR(e,o,c,n==null?void 0:n.class,n==null?void 0:n.className)},ule=B0("inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function je({className:e,variant:t="default",size:n="default",asChild:r=!1,...i}){const a=r?xk:"button";return m.jsx(a,{"data-slot":"button","data-variant":t,"data-size":n,className:Oe(ule({variant:t,size:n,className:e})),...i})}function ws({...e}){return m.jsx(Ak,{"data-slot":"dialog",...e})}function cle({...e}){return m.jsx(Ok,{"data-slot":"dialog-portal",...e})}function fle({className:e,...t}){return m.jsx(Tk,{"data-slot":"dialog-overlay",className:Oe("fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",e),...t})}function Ss({className:e,children:t,showCloseButton:n=!0,...r}){return m.jsxs(cle,{"data-slot":"dialog-portal",children:[m.jsx(fle,{}),m.jsxs(Pk,{"data-slot":"dialog-content",className:Oe("fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg",e),...r,children:[t,n&&m.jsxs(Mk,{"data-slot":"dialog-close",className:"absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[m.jsx(fc,{}),m.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function Es({className:e,...t}){return m.jsx("div",{"data-slot":"dialog-header",className:Oe("flex flex-col gap-2 text-center sm:text-left",e),...t})}function XF({className:e,showCloseButton:t=!1,children:n,...r}){return m.jsxs("div",{"data-slot":"dialog-footer",className:Oe("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...r,children:[n,t&&m.jsx(Mk,{asChild:!0,children:m.jsx(je,{variant:"outline",children:"Close"})})]})}function js({className:e,...t}){return m.jsx(BB,{"data-slot":"dialog-title",className:Oe("text-lg leading-none font-semibold",e),...t})}function GF({className:e,...t}){return m.jsx(FB,{"data-slot":"dialog-description",className:Oe("text-sm text-muted-foreground",e),...t})}function dle({className:e,...t}){return m.jsx(Bd,{"data-slot":"command",className:Oe("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t})}function hle({title:e="Command Palette",description:t="Search for a command to run...",children:n,className:r,showCloseButton:i=!0,...a}){return m.jsxs(ws,{...a,children:[m.jsxs(Es,{className:"sr-only",children:[m.jsx(js,{children:e}),m.jsx(GF,{children:t})]}),m.jsx(Ss,{className:Oe("overflow-hidden p-0",r),showCloseButton:i,children:m.jsx(dle,{className:"**:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:n})})]})}function mle({className:e,...t}){return m.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[m.jsx(_F,{className:"size-4 shrink-0 opacity-50"}),m.jsx(Bd.Input,{"data-slot":"command-input",className:Oe("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]})}function ple({className:e,...t}){return m.jsx(Bd.List,{"data-slot":"command-list",className:Oe("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...t})}function gle({...e}){return m.jsx(Bd.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...e})}function Gh({className:e,...t}){return m.jsx(Bd.Group,{"data-slot":"command-group",className:Oe("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t})}function wa({className:e,...t}){return m.jsx(Bd.Item,{"data-slot":"command-item",className:Oe("relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",e),...t})}function dR({className:e,...t}){return m.jsx("span",{"data-slot":"command-shortcut",className:Oe("ml-auto text-xs tracking-widest text-muted-foreground",e),...t})}function vle({open:e,onOpenChange:t}){var f;const n=Ba(),{setTheme:r}=yk(),i=$d(),a=yN(),o=i.data??[],l=((f=a.data)==null?void 0:f.items)??[],c=h=>{t(!1),n(h)};return m.jsxs(hle,{open:e,onOpenChange:t,showCloseButton:!1,children:[m.jsx(mle,{placeholder:"Type a command or search..."}),m.jsxs(ple,{children:[m.jsx(gle,{children:"No results found."}),m.jsxs(Gh,{heading:"Navigation",children:[m.jsxs(wa,{onSelect:()=>c("/"),children:[m.jsx(wF,{}),"Dashboard",m.jsx(dR,{children:"G D"})]}),m.jsxs(wa,{onSelect:()=>c("/projects"),children:[m.jsx(O_,{}),"Projects",m.jsx(dR,{children:"G P"})]})]}),o.length>0&&m.jsx(Gh,{heading:"Projects",children:o.map(h=>m.jsxs(wa,{onSelect:()=>c(`/projects/${h.id}`),children:[m.jsx(O_,{}),h.display_name]},h.id))}),l.length>0&&m.jsx(Gh,{heading:"Running Sessions",children:l.map(h=>m.jsxs(wa,{onSelect:()=>c(`/projects/${h.project_id}/sessions/${h.run_id}`),children:[m.jsx(dN,{}),h.role," (",h.run_id.slice(0,8),")"]},h.run_id))}),m.jsxs(Gh,{heading:"Resources",children:[m.jsxs(wa,{onSelect:()=>c("/resources/roles"),children:[m.jsx(NF,{}),"Roles"]}),m.jsxs(wa,{onSelect:()=>c("/resources/skills"),children:[m.jsx(AF,{}),"Skills"]}),m.jsxs(wa,{onSelect:()=>c("/resources/agents"),children:[m.jsx(yF,{}),"Agents"]}),m.jsxs(wa,{onSelect:()=>c("/resources/memories"),children:[m.jsx(xF,{}),"Memory"]})]}),m.jsxs(Gh,{heading:"Theme",children:[m.jsxs(wa,{onSelect:()=>{r("light"),t(!1)},children:[m.jsx(kF,{}),"Light"]}),m.jsxs(wa,{onSelect:()=>{r("dark"),t(!1)},children:[m.jsx(SF,{}),"Dark"]}),m.jsxs(wa,{onSelect:()=>{r("system"),t(!1)},children:[m.jsx(Moe,{}),"System"]})]})]})]})}const yle=[{keys:["⌘","K"],description:"Open command palette"},{keys:["G","D"],description:"Go to Dashboard"},{keys:["G","P"],description:"Go to Projects"},{keys:["?"],description:"Show keyboard shortcuts"}];function xle({open:e,onOpenChange:t}){return m.jsx(ws,{open:e,onOpenChange:t,children:m.jsxs(Ss,{className:"max-w-sm",children:[m.jsx(Es,{children:m.jsx(js,{children:"Keyboard Shortcuts"})}),m.jsx("div",{className:"space-y-2",children:yle.map(n=>m.jsxs("div",{className:"flex items-center justify-between text-sm",children:[m.jsx("span",{className:"text-muted-foreground",children:n.description}),m.jsx("div",{className:"flex gap-1",children:n.keys.map(r=>m.jsx("kbd",{className:"rounded border border-border bg-muted px-1.5 py-0.5 font-mono text-xs",children:r},r))})]},n.description))})]})})}function ble({...e}){return m.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",...e})}function wle({className:e,...t}){return m.jsx("ol",{"data-slot":"breadcrumb-list",className:Oe("flex flex-wrap items-center gap-1.5 text-sm break-words text-muted-foreground sm:gap-2.5",e),...t})}function Sle({className:e,...t}){return m.jsx("li",{"data-slot":"breadcrumb-item",className:Oe("inline-flex items-center gap-1.5",e),...t})}function Ele({asChild:e,className:t,...n}){const r=e?xk:"a";return m.jsx(r,{"data-slot":"breadcrumb-link",className:Oe("transition-colors hover:text-foreground",t),...n})}function jle({className:e,...t}){return m.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:Oe("font-normal text-foreground",e),...t})}function _le({children:e,className:t,...n}){return m.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:Oe("[&>svg]:size-3.5",t),...n,children:e??m.jsx(Dl,{})})}function dd({...e}){return m.jsx(hre,{"data-slot":"dropdown-menu",...e})}function hd({...e}){return m.jsx(mre,{"data-slot":"dropdown-menu-trigger",...e})}function md({className:e,sideOffset:t=4,...n}){return m.jsx(pre,{children:m.jsx(gre,{"data-slot":"dropdown-menu-content",sideOffset:t,className:Oe("z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",e),...n})})}function ym({className:e,inset:t,variant:n="default",...r}){return m.jsx(vre,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:Oe("relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!",e),...r})}function bN({className:e,children:t,checked:n,...r}){return m.jsxs(yre,{"data-slot":"dropdown-menu-checkbox-item",className:Oe("relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:n,...r,children:[m.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:m.jsx(xre,{children:m.jsx(uN,{className:"size-4"})})}),t]})}function wl({className:e,orientation:t="horizontal",decorative:n=!0,...r}){return m.jsx(bie,{"data-slot":"separator",decorative:n,orientation:t,className:Oe("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...r})}const Cle=[{to:"/imu",label:"Bot Imu",icon:lN},{to:"/dashboard",label:"Dashboard",icon:wF,end:!0},{to:"/projects",label:"Projects",icon:O_},{to:"/schedules",label:"Schedules",icon:coe},{to:"/settings",label:"Settings",icon:R0}],kle=[{to:"/resources/roles",label:"Roles",icon:NF},{to:"/resources/skills",label:"Skills",icon:AF},{to:"/resources/agents",label:"Agents",icon:yF},{to:"/resources/memories",label:"Memory",icon:xF}];function Nle({conv:e,projectId:t,isActive:n,navigate:r}){const[i,a]=y.useState(!1),[o,l]=y.useState(!1),[c,f]=y.useState(!1),[h,d]=y.useState(""),g=y.useRef(null),v=gN(t),b=LF(t),w=E=>{E.stopPropagation(),E.preventDefault(),d(e.title??""),a(!0),setTimeout(()=>{var C;return(C=g.current)==null?void 0:C.focus()},0)},S=()=>{const E=h.trim();v.mutate({conversationId:e.id,title:E||null}),a(!1)};return i?m.jsx("div",{className:"px-1",children:m.jsx(rt,{ref:g,value:h,onChange:E=>d(E.target.value),onBlur:S,onKeyDown:E=>{E.key==="Enter"&&(E.preventDefault(),S()),E.key==="Escape"&&(E.stopPropagation(),a(!1))},onClick:E=>E.stopPropagation(),className:"h-7 text-xs px-2"})}):m.jsxs("div",{onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),className:Oe("flex items-center gap-1 rounded-md px-2 py-1.5 transition-colors",n?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-accent-foreground"),children:[m.jsx("button",{onClick:()=>r(`/projects/${t}/conversations/${e.id}`),className:"flex-1 min-w-0 text-left text-sm",children:m.jsx("span",{className:"truncate block",children:e.title??`Conversation #${e.id}`})}),c?m.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[m.jsx("button",{onClick:E=>{E.stopPropagation(),b.mutate(e.id),f(!1)},className:"text-xs text-destructive hover:text-destructive/80 font-medium",disabled:b.isPending,children:"Delete"}),m.jsx("button",{onClick:E=>{E.stopPropagation(),f(!1)},className:"text-xs text-muted-foreground hover:text-foreground",children:"No"})]}):m.jsxs("div",{className:"flex items-center gap-0.5 shrink-0",style:{opacity:o?1:0},children:[m.jsx("button",{onClick:w,className:"p-0.5 rounded text-muted-foreground hover:text-foreground transition-colors",title:"Rename",children:m.jsx(Op,{className:"h-3 w-3"})}),!n&&m.jsx("button",{onClick:E=>{E.stopPropagation(),f(!0)},className:"p-0.5 rounded text-muted-foreground hover:text-destructive transition-colors",title:"Delete",children:m.jsx(Eo,{className:"h-3 w-3"})})]})]})}function Ale({conv:e,isActive:t,navigate:n}){const[r,i]=y.useState(!1),[a,o]=y.useState(!1),[l,c]=y.useState(!1),[f,h]=y.useState(""),d=y.useRef(null),g=vN(),v=IF(),b=S=>{S.stopPropagation(),S.preventDefault(),h(e.title??""),i(!0),setTimeout(()=>{var E;return(E=d.current)==null?void 0:E.focus()},0)},w=()=>{const S=f.trim();g.mutate({conversationId:e.id,title:S||null}),i(!1)};return r?m.jsx("div",{className:"px-1",children:m.jsx(rt,{ref:d,value:f,onChange:S=>h(S.target.value),onBlur:w,onKeyDown:S=>{S.key==="Enter"&&(S.preventDefault(),w()),S.key==="Escape"&&(S.stopPropagation(),i(!1))},onClick:S=>S.stopPropagation(),className:"h-7 text-xs px-2"})}):m.jsxs("div",{onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),className:Oe("flex items-center gap-1 rounded-md px-2 py-1.5 transition-colors",t?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-accent-foreground"),children:[m.jsx("button",{onClick:()=>n(`/imu/${e.id}`),className:"flex-1 min-w-0 text-left text-sm",children:m.jsx("span",{className:"truncate block",children:e.title??`Conversation #${e.id}`})}),l?m.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[m.jsx("button",{onClick:S=>{S.stopPropagation(),v.mutate(e.id),c(!1),n("/imu")},className:"text-xs text-destructive hover:text-destructive/80 font-medium",disabled:v.isPending,children:"Delete"}),m.jsx("button",{onClick:S=>{S.stopPropagation(),c(!1)},className:"text-xs text-muted-foreground hover:text-foreground",children:"No"})]}):m.jsxs("div",{className:"flex items-center gap-0.5 shrink-0",style:{opacity:a?1:0},children:[m.jsx("button",{onClick:b,className:"p-0.5 rounded text-muted-foreground hover:text-foreground transition-colors",title:"Rename",children:m.jsx(Op,{className:"h-3 w-3"})}),!t&&m.jsx("button",{onClick:S=>{S.stopPropagation(),c(!0)},className:"p-0.5 rounded text-muted-foreground hover:text-destructive transition-colors",title:"Delete",children:m.jsx(Eo,{className:"h-3 w-3"})})]})]})}function Ole({conversationId:e}){const t=Ba(),n=z0(),r=RF();return m.jsxs("aside",{className:"flex w-56 flex-col border-r border-border bg-card",children:[m.jsx("div",{className:"flex h-14 items-center border-b border-border px-4",children:m.jsx(Br,{to:"/",className:"text-lg font-bold tracking-tight hover:text-foreground/80",children:"StrawPot"})}),m.jsxs("div",{className:"flex flex-col gap-1 p-3 flex-1 min-h-0",children:[m.jsxs("button",{onClick:()=>t("/imu"),className:"flex items-center gap-2 rounded-md px-3 py-2 text-sm font-medium text-muted-foreground hover:bg-accent/50 hover:text-accent-foreground transition-colors",children:[m.jsx(P0,{className:"h-4 w-4 shrink-0"}),m.jsx(lN,{className:"h-4 w-4 shrink-0"}),m.jsx("span",{className:"truncate",children:"Bot Imu"})]}),m.jsxs("div",{className:"flex items-center justify-between px-3 pt-2 pb-1",children:[m.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground/70",children:"Conversations"}),m.jsx("button",{onClick:()=>r.mutate(void 0,{onSuccess:i=>t(`/imu/${i.id}`)}),className:"text-muted-foreground hover:text-foreground transition-colors",title:"New conversation",children:m.jsx(zm,{className:"h-3.5 w-3.5"})})]}),m.jsx("div",{className:"flex-1 overflow-y-auto space-y-0.5",children:(n.data??[]).map(i=>m.jsx(Ale,{conv:i,isActive:i.id===e,navigate:t},i.id))})]})]})}function Tle({projectId:e,conversationId:t}){var o,l;const n=Ba(),r=pN(e,1,50),i=PF(),a=hN(e);return m.jsxs("aside",{className:"flex w-56 flex-col border-r border-border bg-card",children:[m.jsx("div",{className:"flex h-14 items-center border-b border-border px-4",children:m.jsx(Br,{to:"/",className:"text-lg font-bold tracking-tight hover:text-foreground/80",children:"StrawPot"})}),m.jsxs("div",{className:"flex flex-col gap-1 p-3 flex-1 min-h-0",children:[m.jsxs("button",{onClick:()=>n(`/projects/${e}`),className:"flex items-center gap-2 rounded-md px-3 py-2 text-sm font-medium text-muted-foreground hover:bg-accent/50 hover:text-accent-foreground transition-colors",children:[m.jsx(P0,{className:"h-4 w-4 shrink-0"}),m.jsx("span",{className:"truncate",children:((o=a.data)==null?void 0:o.display_name)??"Back to Project"})]}),m.jsxs("div",{className:"flex items-center justify-between px-3 pt-2 pb-1",children:[m.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground/70",children:"Conversations"}),m.jsx("button",{onClick:()=>i.mutate({project_id:e},{onSuccess:c=>n(`/projects/${e}/conversations/${c.id}`)}),className:"text-muted-foreground hover:text-foreground transition-colors",title:"New conversation",children:m.jsx(zm,{className:"h-3.5 w-3.5"})})]}),m.jsx("div",{className:"flex-1 overflow-y-auto space-y-0.5",children:(((l=r.data)==null?void 0:l.items)??[]).map(c=>m.jsx(Nle,{conv:c,projectId:e,isActive:c.id===t,navigate:n},c.id))})]})]})}function Ple(){var d,g;const t=ha().pathname.split("/").filter(Boolean),n=t[0]==="projects"&&t[1]?Number(t[1]):0,r=t[2]==="conversations"&&t[3]?Number(t[3]):0,{data:i}=hN(n,{enabled:n>0}),{data:a}=pN(n,1,50),o=((d=a==null?void 0:a.items.find(v=>v.id===r))==null?void 0:d.title)??null,l=t[0]==="imu"&&t[1]?Number(t[1]):0,{data:c}=z0(),f=((g=c==null?void 0:c.find(v=>v.id===l))==null?void 0:g.title)??null,h=[];if(t[0]==="projects"){if(n===0)h.push({label:"Bot Imu",href:"/imu"}),t[2]==="sessions"&&t[3]&&h.push({label:`Session ${t[3].slice(0,8)}…`});else if(h.push({label:"Projects",href:"/projects"}),t[1]){const v=`/projects/${t[1]}`,b=(i==null?void 0:i.display_name)??`Project #${t[1]}`;h.push({label:b,href:v,projectSwitcher:!0}),t[2]==="sessions"&&t[3]?h.push({label:`Session ${t[3].slice(0,8)}…`}):t[2]==="conversations"&&t[3]&&h.push({label:o??`Conversation #${t[3]}`})}}if(t[0]==="imu"&&(h.push({label:"Bot Imu",href:"/imu"}),t[1]&&h.push({label:f??`Conversation #${t[1]}`})),t[0]==="schedules"&&h.push({label:"Scheduled Tasks"}),t[0]==="settings"&&h.push({label:"Settings"}),t[0]==="resources"){const v={roles:"Roles",skills:"Skills",agents:"Agents",memories:"Memory"};h.push({label:"Resources"}),t[1]&&(h[h.length-1].href=`/resources/${t[1]}`,h.push({label:v[t[1]]??t[1]}))}return h}function Mle(){const e=Ple(),t=Ba(),n=$d(),{data:r}=z0(),i=(r??[]).some(S=>S.active_session_count>0),{setTheme:a}=yk(),[o,l]=y.useState(!1),[c,f]=y.useState(!1),h=pS("/projects/:projectId/conversations/:conversationId"),d=h?Number(h.params.projectId):0,g=h?Number(h.params.conversationId):0,v=pS("/imu/:conversationId"),b=v?Number(v.params.conversationId):0,w=pS("/projects/0/sessions/:runId");return Ise({onCommandPalette:()=>l(!0),onShortcutsHelp:()=>f(!0)}),m.jsxs("div",{className:"flex h-screen",children:[h?m.jsx(Tle,{projectId:d,conversationId:g}):v?m.jsx(Ole,{conversationId:b}):m.jsxs("aside",{className:"flex w-56 flex-col border-r border-border bg-card",children:[m.jsx("div",{className:"flex h-14 items-center border-b border-border px-4",children:m.jsx(Br,{to:"/",className:"text-lg font-bold tracking-tight hover:text-foreground/80",children:"StrawPot"})}),m.jsxs("nav",{className:"flex flex-col gap-1 p-3",children:[Cle.map(({to:S,label:E,icon:C,end:_})=>m.jsxs(Vj,{to:S,end:_,className:({isActive:N})=>Oe("flex items-center gap-3 rounded-md px-3 py-2 text-sm font-medium transition-colors",(N||S==="/imu"&&!!w)&&!(S==="/projects"&&w)?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-accent-foreground"),children:[m.jsx(C,{className:"h-4 w-4"}),E,S==="/imu"&&i&&m.jsx("span",{className:"ml-auto h-2 w-2 rounded-full bg-green-500 animate-pulse"})]},S)),m.jsx("div",{className:"mt-4 mb-1 px-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground/70",children:"Resources"}),kle.map(({to:S,label:E,icon:C})=>m.jsxs(Vj,{to:S,className:({isActive:_})=>Oe("flex items-center gap-3 rounded-md px-3 py-2 text-sm font-medium transition-colors",_?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-accent-foreground"),children:[m.jsx(C,{className:"h-4 w-4"}),E]},S))]})]}),m.jsxs("div",{className:"flex flex-1 flex-col",children:[m.jsxs("header",{className:"flex h-14 items-center justify-between border-b border-border px-6",children:[m.jsx(ble,{children:m.jsx(wle,{children:e.map((S,E)=>{const C=E===e.length-1;return m.jsxs(Sle,{children:[E>0&&m.jsx(_le,{}),S.projectSwitcher?m.jsxs(dd,{children:[m.jsxs(hd,{className:"flex items-center gap-1 text-sm font-medium text-foreground hover:text-foreground/80 transition-colors",children:[S.label,m.jsx(aoe,{className:"h-3 w-3 text-muted-foreground"})]}),m.jsx(md,{align:"start",children:(n.data??[]).map(_=>m.jsxs(ym,{onClick:()=>t(`/projects/${_.id}`),children:[S.href===`/projects/${_.id}`?m.jsx(uN,{className:"mr-2 h-3.5 w-3.5"}):m.jsx("span",{className:"mr-2 inline-block w-3.5"}),_.display_name]},_.id))})]}):C?m.jsx(jle,{children:S.label}):m.jsx(Ele,{href:S.href,children:S.label})]},S.label)})})}),m.jsxs("div",{className:"flex items-center gap-1.5",children:[m.jsx("button",{onClick:()=>l(!0),className:"flex items-center gap-1.5 rounded-md border border-border bg-muted/50 px-2.5 py-1 text-xs text-muted-foreground transition-colors hover:bg-muted",children:m.jsx("kbd",{className:"font-mono",children:"⌘K"})}),m.jsxs(dd,{children:[m.jsx(hd,{asChild:!0,children:m.jsxs(je,{variant:"ghost",size:"icon",className:"h-8 w-8",children:[m.jsx(kF,{className:"h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),m.jsx(SF,{className:"absolute h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),m.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),m.jsxs(md,{align:"end",children:[m.jsx(ym,{onClick:()=>a("light"),children:"Light"}),m.jsx(ym,{onClick:()=>a("dark"),children:"Dark"}),m.jsx(ym,{onClick:()=>a("system"),children:"System"})]})]})]})]}),m.jsx(wl,{}),m.jsx("main",{className:"flex-1 overflow-auto p-6",children:m.jsx(_Q,{})})]}),m.jsx(vle,{open:o,onOpenChange:l}),m.jsx(xle,{open:c,onOpenChange:f})]})}function Dle(){const e=gt();return Ht({mutationFn:t=>Fe.post("/sessions",t),onSuccess:(t,n)=>{e.invalidateQueries({queryKey:Ue.projects.sessions(n.project_id)}),e.invalidateQueries({queryKey:["sessions"]})}})}function wN(){const e=gt();return Ht({mutationFn:t=>Fe.post(`/sessions/${t}/stop`),onSuccess:()=>{e.invalidateQueries({queryKey:["sessions"]})}})}function Rle(){const e=gt();return Ht({mutationFn:t=>Fe.delete(`/sessions/${t}`),onSuccess:()=>{e.invalidateQueries({queryKey:["sessions"]})}})}const Ile=B0("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});function zt({className:e,variant:t="default",asChild:n=!1,...r}){const i=n?xk:"span";return m.jsx(i,{"data-slot":"badge","data-variant":t,className:Oe(Ile({variant:t}),e),...r})}function fs({className:e,...t}){return m.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:m.jsx("table",{"data-slot":"table",className:Oe("w-full caption-bottom text-sm",e),...t})})}function ds({className:e,...t}){return m.jsx("thead",{"data-slot":"table-header",className:Oe("[&_tr]:border-b",e),...t})}function hs({className:e,...t}){return m.jsx("tbody",{"data-slot":"table-body",className:Oe("[&_tr:last-child]:border-0",e),...t})}function sr({className:e,...t}){return m.jsx("tr",{"data-slot":"table-row",className:Oe("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t})}function ot({className:e,...t}){return m.jsx("th",{"data-slot":"table-head",className:Oe("h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function it({className:e,...t}){return m.jsx("td",{"data-slot":"table-cell",className:Oe("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function Qy({sessions:e,projectNames:t}){return m.jsxs(fs,{children:[m.jsx(ds,{children:m.jsxs(sr,{children:[m.jsx(ot,{children:"Run ID"}),t&&m.jsx(ot,{children:"Project"}),m.jsx(ot,{children:"Role"}),m.jsx(ot,{children:"Status"}),m.jsx(ot,{children:"Started"}),m.jsx(ot,{children:"Duration"}),m.jsx(ot,{children:"Task"}),m.jsx(ot,{className:"w-[80px]"})]})}),m.jsx(hs,{children:e.map(n=>m.jsxs(sr,{children:[m.jsx(it,{children:m.jsx(Br,{to:`/projects/${n.project_id}/sessions/${n.run_id}`,className:"text-sm font-medium text-primary underline-offset-4 hover:underline",children:n.run_id.slice(0,16)})}),t&&m.jsx(it,{children:m.jsx(Br,{to:`/projects/${n.project_id}`,className:"text-sm text-primary underline-offset-4 hover:underline",children:t.get(n.project_id)??`#${n.project_id}`})}),m.jsx(it,{className:"text-sm",children:n.role}),m.jsx(it,{children:m.jsx(Lle,{status:n.status})}),m.jsx(it,{className:"text-sm text-muted-foreground",children:Zy(n.started_at)}),m.jsx(it,{className:"text-sm text-muted-foreground",children:F0(n.duration_ms)}),m.jsx(it,{className:"max-w-[300px] truncate text-sm",children:n.user_task??n.task??"—"}),m.jsx(it,{children:m.jsx(zle,{runId:n.run_id,disabled:n.status==="starting"||n.status==="running"})})]},n.run_id))})]})}function Lle({status:e}){const t=WF(e);return m.jsxs(zt,{variant:"outline",className:Oe("text-xs font-medium",t==="running"&&"border-green-200 bg-green-50 text-green-700 dark:border-green-800 dark:bg-green-950 dark:text-green-400",t==="success"&&"border-green-200 bg-green-50 text-green-700 dark:border-green-800 dark:bg-green-950 dark:text-green-400",t==="error"&&"border-red-200 bg-red-50 text-red-700 dark:border-red-800 dark:bg-red-950 dark:text-red-400",t==="warning"&&"border-orange-200 bg-orange-50 text-orange-700 dark:border-orange-800 dark:bg-orange-950 dark:text-orange-400",t==="default"&&"border-muted bg-muted text-muted-foreground"),children:[e==="running"&&m.jsx("span",{className:"mr-1.5 inline-block h-1.5 w-1.5 animate-pulse rounded-full bg-green-500"}),e]})}const hR=WF;function WF(e){switch(e){case"running":case"starting":return"running";case"completed":return"success";case"failed":return"error";case"stopped":return"warning";default:return"default"}}function Zy(e){try{return new Date(e).toLocaleString()}catch{return e}}function F0(e){if(e==null)return"—";const t=Math.round(e/1e3);if(t<60)return`${t}s`;const n=Math.floor(t/60),r=t%60;return`${n}m ${r}s`}function zle({runId:e,disabled:t}){const[n,r]=y.useState(!1),i=Rle(),a=async()=>{try{await i.mutateAsync(e)}catch{}};return n?m.jsxs("div",{className:"flex gap-1",children:[m.jsx(je,{size:"sm",variant:"destructive",onClick:a,disabled:i.isPending,children:"Confirm"}),m.jsx(je,{size:"sm",variant:"outline",onClick:()=>r(!1),children:"No"})]}):m.jsx(je,{size:"sm",variant:"ghost",className:"text-muted-foreground hover:text-destructive",onClick:()=>r(!0),disabled:t,children:m.jsx(Eo,{className:"h-4 w-4"})})}function hn({className:e,...t}){return m.jsx("div",{"data-slot":"card",className:Oe("flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm",e),...t})}function Wh({className:e,...t}){return m.jsx("div",{"data-slot":"card-header",className:Oe("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function Qh({className:e,...t}){return m.jsx("div",{"data-slot":"card-title",className:Oe("leading-none font-semibold",e),...t})}function mn({className:e,...t}){return m.jsx("div",{"data-slot":"card-content",className:Oe("px-6",e),...t})}const IS=1e4;function QF(e,t,n){const[r,i]=y.useState([]),[a,o]=y.useState(!1),[l,c]=y.useState(!1),f=y.useRef(null),h=y.useRef(void 0),d=y.useRef(1e3),g=y.useRef("");return y.useEffect(()=>{if(!t)return;const v=`${e}:${t}`;g.current!==v&&(i([]),c(!1),g.current=v);function b(){const w=new EventSource(`/api/sessions/${e}/logs/${t}`);f.current=w,w.onopen=()=>{o(!0),d.current=1e3},w.addEventListener("snapshot",S=>{try{const E=JSON.parse(S.data);Array.isArray(E.lines)&&i(E.lines.slice(-IS))}catch{}}),w.addEventListener("append",S=>{try{const E=JSON.parse(S.data);Array.isArray(E.lines)&&E.lines.length>0&&i(C=>{const _=[...C,...E.lines];return _.length>IS?_.slice(-IS):_})}catch{}}),w.addEventListener("done",()=>{c(!0),w.close(),f.current=null}),w.onerror=()=>{w.close(),f.current=null,o(!1),h.current=setTimeout(()=>{d.current=Math.min(d.current*2,15e3),b()},d.current)}}return b(),()=>{var w;(w=f.current)==null||w.close(),f.current=null,h.current&&clearTimeout(h.current)}},[e,t,n]),{lines:r,connected:a,done:l}}const $le=5e3;function Ble({runId:e,projectId:t,agentId:n,role:r,runtime:i,startedAt:a}){const{lines:o,done:l}=QF(e,n,!0),c=o.slice(-4),[f,h]=y.useState("");y.useEffect(()=>{const w=new Date(a).getTime(),S=()=>{const C=Date.now()-w,_=Math.floor(C/1e3)%60,N=Math.floor(C/6e4)%60,O=Math.floor(C/36e5);h(O>0?`${O}h ${N}m`:`${N}m ${_}s`)};S();const E=setInterval(S,1e3);return()=>clearInterval(E)},[a]);const d=y.useRef(o.length),g=y.useRef(Date.now()),[v,b]=y.useState(!1);return y.useEffect(()=>{o.length!==d.current&&(d.current=o.length,g.current=Date.now(),b(!1))},[o.length]),y.useEffect(()=>{const w=setInterval(()=>{Date.now()-g.current>$le&&b(!0)},1e3);return()=>clearInterval(w)},[]),m.jsx(hn,{className:"overflow-hidden",children:m.jsxs(mn,{className:"space-y-2 pt-4",children:[m.jsxs("div",{className:"flex items-center justify-between",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("span",{className:`inline-block h-2 w-2 rounded-full ${l?"bg-muted-foreground":v?"bg-green-300":"animate-pulse bg-green-500"}`}),m.jsx("span",{className:"font-medium text-sm",children:r})]}),m.jsx(zt,{variant:"outline",className:"text-xs",children:i.replace("strawpot-","")})]}),m.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[m.jsxs("span",{children:["Session: ",e.slice(0,12)]}),m.jsx("span",{children:"·"}),m.jsx("span",{children:f})]}),m.jsx("div",{className:"rounded bg-[#1e1e1e] px-2 py-1.5 font-mono text-[11px] leading-[16px] text-[#d4d4d4]",children:c.length>0?c.map((w,S)=>m.jsxs("div",{className:"truncate",children:[m.jsx("span",{className:"text-[#666]",children:"> "}),w]},S)):m.jsx("div",{className:"text-[#555]",children:"Waiting for output..."})}),m.jsx("div",{className:"flex justify-end",children:m.jsxs(Br,{to:`/projects/${t}/sessions/${e}?tab=logs`,className:"inline-flex items-center gap-0.5 text-xs text-primary hover:underline",children:["View Session",m.jsx(Dl,{className:"h-3 w-3"})]})})]})})}const LS=8;function Fle(){var o;const t=((o=yN().data)==null?void 0:o.items)??[],n=$Z({queries:t.slice(0,LS).map(l=>({queryKey:Ue.sessions.detail(l.project_id,l.run_id),queryFn:()=>Fe.get(`/projects/${l.project_id}/sessions/${l.run_id}`),staleTime:1e4}))}),r=[];for(const l of n){if(!l.data)continue;const c=l.data;for(const[f,h]of Object.entries(c.agents))r.push({runId:c.run_id,projectId:c.project_id,agentId:f,role:h.role,runtime:h.runtime,startedAt:h.started_at})}if(r.length===0)return null;const i=r.slice(0,LS),a=r.length-LS;return m.jsxs("section",{className:"space-y-3",children:[m.jsxs("h2",{className:"text-sm font-medium text-muted-foreground",children:["Active Agents (",r.length,")"]}),m.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(320px,1fr))] gap-3",children:i.map(l=>m.jsx(Ble,{runId:l.runId,projectId:l.projectId,agentId:l.agentId,role:l.role,runtime:l.runtime,startedAt:l.startedAt},`${l.runId}:${l.agentId}`))}),a>0&&m.jsxs("p",{className:"text-xs text-muted-foreground",children:["+",a," more agent",a!==1?"s":""," running"]})]})}function Rn({className:e,...t}){return m.jsx("div",{"data-slot":"skeleton",className:Oe("animate-pulse rounded-md bg-accent",e),...t})}function Ule(){return m.jsxs("div",{className:"space-y-8",children:[m.jsx(Rn,{className:"h-8 w-40"}),m.jsxs("div",{className:"space-y-3",children:[m.jsx(Rn,{className:"h-4 w-24"}),m.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-3",children:[1,2,3].map(e=>m.jsx(Rn,{className:"h-28 rounded-lg"},e))})]}),m.jsxs("div",{className:"space-y-3",children:[m.jsx(Rn,{className:"h-4 w-32"}),m.jsx(Rn,{className:"h-48 rounded-lg"})]})]})}function Hle(){var d,g;const e=$d(),t=yN(),n=Lse(),r=Dse(10),i=e.isLoading||t.isLoading||n.isLoading,a=e.error||t.error||n.error;if(i)return m.jsx(Ule,{});if(a)return m.jsxs("div",{className:"flex items-center gap-2 text-destructive",children:[m.jsx(po,{className:"h-4 w-4"}),m.jsxs("span",{children:["Error: ",a.message]})]});const o=e.data??[],l=((d=t.data)==null?void 0:d.items)??[],c=((g=n.data)==null?void 0:g.items)??[],f=new Map;for(const v of o)f.set(v.id,v.display_name);const h=new Map;for(const v of l)h.set(v.project_id,(h.get(v.project_id)??0)+1);return m.jsxs("div",{className:"space-y-8",children:[m.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:"Dashboard"}),m.jsx(Fle,{}),m.jsxs("section",{className:"space-y-3",children:[m.jsxs("h2",{className:"text-sm font-medium text-muted-foreground",children:["Projects (",o.length,")"]}),o.length===0?m.jsx("p",{className:"text-sm italic text-muted-foreground",children:"No projects registered."}):m.jsx(hn,{children:m.jsx(mn,{className:"p-0",children:m.jsxs(fs,{children:[m.jsx(ds,{children:m.jsxs(sr,{children:[m.jsx(ot,{children:"Name"}),m.jsx(ot,{children:"Directory"}),m.jsx(ot,{children:"Status"})]})}),m.jsxs(hs,{children:[o.slice(0,10).map(v=>m.jsxs(sr,{children:[m.jsx(it,{children:m.jsx(Br,{to:`/projects/${v.id}`,className:"text-sm font-medium text-primary underline-offset-4 hover:underline",children:v.display_name})}),m.jsx(it,{className:"max-w-[400px] truncate text-sm text-muted-foreground font-mono",children:v.working_dir}),m.jsx(it,{children:m.jsxs("div",{className:"flex gap-1.5",children:[!v.dir_exists&&m.jsx(zt,{variant:"outline",className:"border-orange-200 bg-orange-50 text-xs text-orange-700 dark:border-orange-800 dark:bg-orange-950 dark:text-orange-400",children:"Directory missing"}),(h.get(v.id)??0)>0&&m.jsxs(zt,{variant:"outline",className:"border-green-200 bg-green-50 text-xs text-green-700 dark:border-green-800 dark:bg-green-950 dark:text-green-400",children:[m.jsx("span",{className:"mr-1 inline-block h-1.5 w-1.5 animate-pulse rounded-full bg-green-500"}),h.get(v.id)," running"]})]})})]},v.id)),o.length>10&&m.jsx(sr,{children:m.jsx(it,{colSpan:3,className:"text-center",children:m.jsxs(Br,{to:"/projects",className:"text-sm text-muted-foreground underline-offset-4 hover:underline",children:["+",o.length-10," more — view all projects"]})})})]})]})})})]}),l.length>0&&m.jsxs("section",{className:"space-y-3",children:[m.jsxs("h2",{className:"text-sm font-medium text-muted-foreground",children:["Running Sessions (",l.length,")"]}),m.jsx(hn,{children:m.jsx(mn,{className:"p-0",children:m.jsx(Qy,{sessions:l,projectNames:f})})})]}),(r.data??[]).length>0&&m.jsxs("section",{className:"space-y-3",children:[m.jsx("h2",{className:"text-sm font-medium text-muted-foreground",children:"Recent Conversations"}),m.jsx(hn,{children:m.jsx(mn,{className:"p-0",children:m.jsxs(fs,{children:[m.jsx(ds,{children:m.jsxs(sr,{children:[m.jsx(ot,{children:"Title"}),m.jsx(ot,{children:"Project"}),m.jsx(ot,{children:"Sessions"}),m.jsx(ot,{children:"Last Activity"})]})}),m.jsx(hs,{children:(r.data??[]).map(v=>m.jsxs(sr,{children:[m.jsx(it,{children:m.jsx(Br,{to:`/projects/${v.project_id}/conversations/${v.id}`,className:"text-sm font-medium text-primary underline-offset-4 hover:underline",children:v.title??`Conversation #${v.id}`})}),m.jsx(it,{children:m.jsx(Br,{to:`/projects/${v.project_id}`,className:"text-sm text-primary underline-offset-4 hover:underline",children:v.project_name})}),m.jsx(it,{className:"text-sm text-muted-foreground",children:v.session_count}),m.jsx(it,{className:"text-sm text-muted-foreground",children:v.last_activity?new Date(v.last_activity).toLocaleString():"—"})]},v.id))})]})})})]}),m.jsxs("section",{className:"space-y-3",children:[m.jsx("h2",{className:"text-sm font-medium text-muted-foreground",children:"Recent Sessions"}),c.length===0?m.jsx("p",{className:"text-sm italic text-muted-foreground",children:"No sessions yet."}):m.jsx(hn,{children:m.jsx(mn,{className:"p-0",children:m.jsx(Qy,{sessions:c,projectNames:f})})})]})]})}function ZF(){return Wn({queryKey:Ue.config.global,queryFn:()=>Fe.get("/config/global")})}function qle(){const e=gt();return Ht({mutationFn:t=>Fe.post("/projects",t),onSuccess:()=>{e.invalidateQueries({queryKey:Ue.projects.all})}})}function Vle(){const e=gt();return Ht({mutationFn:t=>Fe.delete(`/projects/${t}`),onSuccess:()=>{e.invalidateQueries({queryKey:Ue.projects.all})}})}function Kle(){const e=gt();return Ht({mutationFn:({projectId:t,files:n})=>Fe.upload(`/projects/${t}/files`,n),onSuccess:(t,n)=>{e.invalidateQueries({queryKey:Ue.projects.files(n.projectId)})}})}function Yle(){const e=gt();return Ht({mutationFn:({projectId:t,filePath:n})=>Fe.delete(`/projects/${t}/files/${n}`),onSuccess:(t,n)=>{e.invalidateQueries({queryKey:Ue.projects.files(n.projectId)})}})}function Xle(){const e=gt();return Ht({mutationFn:t=>Fe.put("/config/global",t),onSuccess:(t,n)=>{e.setQueryData(Ue.config.global,r=>({...r??{},values:n})),e.invalidateQueries({queryKey:Ue.config.global})}})}function JF(){const e=gt();return Ht({mutationFn:({projectId:t,data:n})=>Fe.put(`/projects/${t}/config`,n),onSuccess:(t,n)=>{e.setQueryData(Ue.projects.config(n.projectId),r=>({...r??{},project:n.data})),e.invalidateQueries({queryKey:Ue.projects.config(n.projectId)})}})}function U0({className:e,children:t,...n}){return m.jsxs(Mre,{"data-slot":"scroll-area",className:Oe("relative",e),...n,children:[m.jsx(Dre,{"data-slot":"scroll-area-viewport",className:"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1",children:t}),m.jsx(Gle,{}),m.jsx(Rre,{})]})}function Gle({className:e,orientation:t="vertical",...n}){return m.jsx(e8,{"data-slot":"scroll-area-scrollbar",orientation:t,className:Oe("flex touch-none p-px transition-colors select-none",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",e),...n,children:m.jsx(i8,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"})})}function Wle({initialPath:e,onSelect:t,onCancel:n}){const[r,i]=y.useState(null),[a,o]=y.useState(!0),[l,c]=y.useState(null),[f,h]=y.useState(null),d=v=>{o(!0),c(null);const b=v?`?path=${encodeURIComponent(v)}`:"";Fe.get(`/fs/browse${b}`).then(i).catch(w=>c(w.message??"Failed to browse")).finally(()=>o(!1))},g=async()=>{if(!(!r||!(f!=null&&f.trim())))try{const v=await Fe.post("/fs/mkdir",{path:r.path,name:f.trim()});h(null),d(v.path)}catch(v){c(v instanceof Error?v.message:"Failed to create folder")}};return y.useEffect(()=>{d(e||void 0)},[]),m.jsx(ws,{open:!0,onOpenChange:v=>!v&&n(),children:m.jsxs(Ss,{className:"sm:max-w-[480px]",children:[m.jsx(Es,{children:m.jsx(js,{children:"Select Directory"})}),r&&m.jsx("div",{className:"break-all rounded-md bg-muted px-3 py-1.5 font-mono text-xs",children:r.path}),l&&m.jsx("p",{className:"text-sm text-destructive",children:l}),a&&!r?m.jsx("p",{className:"py-4 text-sm text-muted-foreground",children:"Loading..."}):m.jsx(U0,{className:"h-[300px]",children:m.jsxs("div",{className:"space-y-0.5",children:[(r==null?void 0:r.parent)&&m.jsxs("button",{className:"flex w-full items-center gap-2 rounded-md px-3 py-1.5 text-sm text-primary hover:bg-accent",onClick:()=>d(r.parent),children:[m.jsx(boe,{className:"h-4 w-4"}),".."]}),r==null?void 0:r.entries.map(v=>m.jsxs("button",{className:"flex w-full items-center gap-2 rounded-md px-3 py-1.5 text-sm text-primary hover:bg-accent",onClick:()=>d(v.path),children:[m.jsx(Soe,{className:"h-4 w-4"}),v.name]},v.path)),(r==null?void 0:r.entries.length)===0&&m.jsx("p",{className:"px-3 py-4 text-sm italic text-muted-foreground",children:"No subdirectories"})]})}),m.jsx(XF,{children:f!==null?m.jsxs("div",{className:"flex w-full gap-2",children:[m.jsx(rt,{value:f,onChange:v=>h(v.target.value),onKeyDown:v=>{v.key==="Enter"&&g(),v.key==="Escape"&&h(null)},placeholder:"Folder name",autoFocus:!0,className:"flex-1"}),m.jsx(je,{size:"sm",onClick:g,children:"Create"}),m.jsx(je,{size:"sm",variant:"outline",onClick:()=>h(null),children:"Cancel"})]}):m.jsxs(m.Fragment,{children:[m.jsx(je,{variant:"outline",onClick:()=>h(""),disabled:!r,children:"New Folder"}),m.jsx("div",{className:"flex-1"}),m.jsx(je,{onClick:()=>r&&t(r.path),disabled:!r,children:"Select"}),m.jsx(je,{variant:"outline",onClick:n,children:"Cancel"})]})})]})})}function mt({className:e,...t}){return m.jsx(wre,{"data-slot":"label",className:Oe("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}function Ra({...e}){return m.jsx(aie,{"data-slot":"select",...e})}function Ia({...e}){return m.jsx(sie,{"data-slot":"select-value",...e})}function La({className:e,size:t="default",children:n,...r}){return m.jsxs(oie,{"data-slot":"select-trigger","data-size":t,className:Oe("flex w-fit items-center justify-between gap-2 rounded-md border border-input bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",e),...r,children:[n,m.jsx(lie,{asChild:!0,children:m.jsx(Lm,{className:"size-4 opacity-50"})})]})}function za({className:e,children:t,position:n="item-aligned",align:r="center",...i}){return m.jsx(uie,{children:m.jsxs(cie,{"data-slot":"select-content",className:Oe("relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,align:r,...i,children:[m.jsx(Qle,{}),m.jsx(fie,{className:Oe("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),m.jsx(Zle,{})]})})}function In({className:e,children:t,...n}){return m.jsxs(die,{"data-slot":"select-item",className:Oe("relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...n,children:[m.jsx("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:m.jsx(mie,{children:m.jsx(uN,{className:"size-4"})})}),m.jsx(hie,{children:t})]})}function Qle({className:e,...t}){return m.jsx(pie,{"data-slot":"select-scroll-up-button",className:Oe("flex cursor-default items-center justify-center py-1",e),...t,children:m.jsx(roe,{className:"size-4"})})}function Zle({className:e,...t}){return m.jsx(gie,{"data-slot":"select-scroll-down-button",className:Oe("flex cursor-default items-center justify-center py-1",e),...t,children:m.jsx(Lm,{className:"size-4"})})}function Jle(){const{data:e,isLoading:t,error:n}=$d(),[r,i]=y.useState(!1);if(t)return m.jsxs("div",{className:"space-y-6",children:[m.jsx(Rn,{className:"h-8 w-32"}),m.jsx(Rn,{className:"h-64 rounded-lg"})]});if(n)return m.jsxs("div",{className:"flex items-center gap-2 text-destructive",children:[m.jsx(po,{className:"h-4 w-4"}),m.jsxs("span",{children:["Error: ",n.message]})]});const a=e??[];return m.jsxs("div",{className:"space-y-6",children:[m.jsxs("div",{className:"flex items-center justify-between",children:[m.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:"Projects"}),m.jsxs(je,{onClick:()=>i(!0),children:[m.jsx(zm,{className:"mr-2 h-4 w-4"}),"Add Project"]})]}),r&&m.jsx(eue,{onDone:()=>i(!1),onCancel:()=>i(!1)}),a.length===0?m.jsx("p",{className:"text-sm italic text-muted-foreground",children:"No projects registered yet."}):m.jsx(hn,{children:m.jsx(mn,{className:"p-0",children:m.jsxs(fs,{children:[m.jsx(ds,{children:m.jsxs(sr,{children:[m.jsx(ot,{children:"Name"}),m.jsx(ot,{children:"Directory"}),m.jsx(ot,{children:"Created"}),m.jsx(ot,{children:"Status"}),m.jsx(ot,{className:"w-[80px]"})]})}),m.jsx(hs,{children:a.map(o=>m.jsxs(sr,{children:[m.jsx(it,{children:m.jsx(Br,{to:`/projects/${o.id}`,className:"text-sm font-medium text-primary underline-offset-4 hover:underline",children:o.display_name})}),m.jsx(it,{className:"max-w-[300px] truncate text-sm text-muted-foreground",children:o.working_dir}),m.jsx(it,{className:"text-sm text-muted-foreground",children:nue(o.created_at)}),m.jsx(it,{children:o.dir_exists?m.jsx(zt,{variant:"outline",className:"border-green-200 bg-green-50 text-xs text-green-700 dark:border-green-800 dark:bg-green-950 dark:text-green-400",children:"OK"}):m.jsx(zt,{variant:"outline",className:"border-orange-200 bg-orange-50 text-xs text-orange-700 dark:border-orange-800 dark:bg-orange-950 dark:text-orange-400",children:"Missing"})}),m.jsx(it,{children:m.jsx(tue,{projectId:o.id})})]},o.id))})]})})})]})}function eue({onDone:e,onCancel:t}){var P,I,z;const[n,r]=y.useState(""),[i,a]=y.useState(""),[o,l]=y.useState(""),[c,f]=y.useState(""),[h,d]=y.useState(!1),[g,v]=y.useState(!1),b=qle(),w=JF(),E=(P=ZF().data)==null?void 0:P.defaults,C=(E==null?void 0:E.isolation)??"none",_=((I=E==null?void 0:E.session)==null?void 0:I.merge_strategy)??"auto",N=o||C,O=async()=>{const F=await b.mutateAsync({display_name:n.trim(),working_dir:i.trim()}),B={},G=c||_;B.isolation=N,B.session={merge_strategy:G},await w.mutateAsync({projectId:F.id,data:B}),e()},A=async F=>{F.preventDefault();try{if(N==="worktree"&&i.trim()&&!(await Fe.get(`/fs/git-check?path=${encodeURIComponent(i.trim())}`)).is_git){v(!0);return}await O()}catch{}},T=async()=>{try{await Fe.post("/fs/git-init",{path:i.trim()}),v(!1),await O()}catch{}};return m.jsx(hn,{children:m.jsx(mn,{className:"pt-6",children:m.jsxs("form",{onSubmit:A,className:"space-y-4",children:[m.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[m.jsxs("div",{className:"space-y-2",children:[m.jsx(mt,{htmlFor:"display-name",children:"Display Name"}),m.jsx(rt,{id:"display-name",value:n,onChange:F=>r(F.target.value),required:!0,autoFocus:!0})]}),m.jsxs("div",{className:"space-y-2",children:[m.jsx(mt,{htmlFor:"working-dir",children:"Working Directory"}),m.jsxs("div",{className:"flex gap-2",children:[m.jsx(rt,{id:"working-dir",value:i,onChange:F=>a(F.target.value),placeholder:"/path/to/project",required:!0}),m.jsx(je,{type:"button",variant:"outline",size:"sm",onClick:()=>d(!h),children:"Browse"})]})]})]}),h&&m.jsx(Wle,{initialPath:i||void 0,onSelect:F=>{a(F),d(!1)},onCancel:()=>d(!1)}),m.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[m.jsxs("div",{className:"space-y-2",children:[m.jsx(mt,{htmlFor:"isolation",children:"Isolation"}),m.jsxs(Ra,{value:o||C,onValueChange:l,children:[m.jsx(La,{id:"isolation",children:m.jsx(Ia,{})}),m.jsxs(za,{children:[m.jsx(In,{value:"none",children:"none"}),m.jsx(In,{value:"worktree",children:"worktree"})]})]})]}),m.jsxs("div",{className:"space-y-2",children:[m.jsx(mt,{htmlFor:"merge-strategy",children:"Merge Strategy"}),m.jsxs(Ra,{value:c||_,onValueChange:f,children:[m.jsx(La,{id:"merge-strategy",children:m.jsx(Ia,{})}),m.jsxs(za,{children:[m.jsx(In,{value:"auto",children:"auto"}),m.jsx(In,{value:"local",children:"local"}),m.jsx(In,{value:"pr",children:"pr"})]})]})]})]}),g&&m.jsxs("div",{className:"rounded-md border border-orange-200 bg-orange-50 p-3 dark:border-orange-800 dark:bg-orange-950",children:[m.jsxs("p",{className:"text-sm",children:["The selected directory is not a git repository. Worktree isolation requires git. Initialize a git repository with ",m.jsx("code",{className:"text-xs bg-muted px-1 py-0.5 rounded",children:"git init"}),"?"]}),m.jsxs("div",{className:"mt-2 flex gap-2",children:[m.jsx(je,{type:"button",size:"sm",onClick:T,children:"Yes, initialize"}),m.jsx(je,{type:"button",size:"sm",variant:"outline",onClick:()=>v(!1),children:"Cancel"})]})]}),(b.error||w.error)&&m.jsx("p",{className:"text-sm text-destructive",children:(z=b.error||w.error)==null?void 0:z.message}),m.jsxs("div",{className:"flex gap-2",children:[m.jsx(je,{type:"submit",disabled:b.isPending||w.isPending,children:b.isPending||w.isPending?"Adding...":"Add"}),m.jsx(je,{type:"button",variant:"outline",onClick:t,children:"Cancel"})]})]})})})}function tue({projectId:e}){const[t,n]=y.useState(!1),r=Vle(),i=async()=>{try{await r.mutateAsync(e)}catch{}};return t?m.jsxs("div",{className:"flex gap-1",children:[m.jsx(je,{size:"sm",variant:"destructive",onClick:i,disabled:r.isPending,children:"Confirm"}),m.jsx(je,{size:"sm",variant:"outline",onClick:()=>n(!1),children:"No"})]}):m.jsx(je,{size:"sm",variant:"ghost",className:"text-muted-foreground hover:text-destructive",onClick:()=>n(!0),children:m.jsx(Eo,{className:"h-4 w-4"})})}function nue(e){try{return new Date(e).toLocaleDateString()}catch{return e}}function Pp(e){return Wn({queryKey:Ue.projects.resources(e),queryFn:()=>Fe.get(`/projects/${e}/resources`)})}function rue(e,t,n,r){return Wn({queryKey:Ue.projects.resourceDetail(e,t,n),queryFn:()=>Fe.get(`/projects/${e}/resources/${t}/${n}`),enabled:(r==null?void 0:r.enabled)??!!n})}function iue(e,t,n,r){return Wn({queryKey:Ue.projects.resourceConfig(e,t,n),queryFn:()=>Fe.get(`/projects/${e}/resources/${t}/${n}/config`),enabled:(r==null?void 0:r.enabled)??!!n})}function aue(e,t){if(t<=7)return Array.from({length:t},(a,o)=>o+1);const n=[1];e>3&&n.push("...");const r=Math.max(2,e-1),i=Math.min(t-1,e+1);for(let a=r;a<=i;a++)n.push(a);return e<t-2&&n.push("..."),n.push(t),n}function eU({page:e,totalPages:t,onPageChange:n}){if(t<=1)return null;const r=aue(e,t);return m.jsxs("div",{className:"flex items-center justify-center gap-1 pt-2",children:[m.jsx(je,{variant:"outline",size:"icon",className:"h-8 w-8",disabled:e<=1,onClick:()=>n(e-1),children:m.jsx(eoe,{className:"h-4 w-4"})}),r.map((i,a)=>i==="..."?m.jsx("span",{className:"px-1 text-sm text-muted-foreground",children:"..."},`ellipsis-${a}`):m.jsx(je,{variant:i===e?"default":"outline",size:"icon",className:"h-8 w-8 text-xs",onClick:()=>n(i),children:i},i)),m.jsx(je,{variant:"outline",size:"icon",className:"h-8 w-8",disabled:e>=t,onClick:()=>n(e+1),children:m.jsx(Dl,{className:"h-4 w-4"})})]})}function tU(e,t,n){return Wn({queryKey:Ue.registry.config(e,t),queryFn:()=>Fe.get(`/registry/${e}/${t}/config`),enabled:(n==null?void 0:n.enabled)??!!t})}function ql({className:e,...t}){return m.jsx("textarea",{"data-slot":"textarea",className:Oe("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40",e),...t})}function Lu({...e}){return m.jsx(vJ,{"data-slot":"collapsible",...e})}function zu({...e}){return m.jsx(dB,{"data-slot":"collapsible-trigger",...e})}function $u({...e}){return m.jsx(hB,{"data-slot":"collapsible-content",...e})}function oue({projectId:e,open:t,onOpenChange:n}){var xe,Te,Ge,We,Gt,nn;const r=Ba(),i=mN(e),{data:a}=Pp(e),o=L0(e),l=Dle(),c=(xe=i.data)==null?void 0:xe.merged,f="__empty__",[h,d]=y.useState(""),[g,v]=y.useState(""),[b,w]=y.useState(""),[S,E]=y.useState(""),[C,_]=y.useState(""),[N,O]=y.useState(""),[A,T]=y.useState(""),[P,I]=y.useState(""),[z,F]=y.useState(""),[B,G]=y.useState(!1),[L,V]=y.useState([]),[D,q]=y.useState(!1),[X,K]=y.useState(""),[R,H]=y.useState(!1),[U,$]=y.useState(!1),Q=gt(),J=()=>{d(""),v(""),w(""),E(""),_(""),O(""),T(""),I(""),F(""),G(!1),V([]),q(!1)},ne=Se=>{Se.preventDefault(),H(!0)},ae=Se=>{Se.preventDefault(),H(!0)},ie=Se=>{Se.preventDefault(),H(!1)},ee=async Se=>{Se.preventDefault(),H(!1);const at=Array.from(Se.dataTransfer.files);if(at.length){$(!0);try{const vt=await Fe.upload(`/projects/${e}/files`,at);Q.invalidateQueries({queryKey:Ue.projects.files(e)}),V(st=>{const zn=vt.map(rn=>rn.path).filter(rn=>!st.includes(rn));return[...st,...zn]})}catch{}finally{$(!1)}}},se=Se=>{V(at=>at.includes(Se)?at.filter(vt=>vt!==Se):[...at,Se])},pe=async Se=>{Se.preventDefault();try{const at={project_id:e,task:h.trim()};g.trim()&&(at.role=g.trim());const vt={};b.trim()&&(vt.runtime=b.trim()),S.trim()&&(vt.memory=S.trim()),C&&(vt.cache_delegations=C==="true"),N.trim()&&(vt.cache_max_entries=Number(N.trim())),A.trim()&&(vt.cache_ttl_seconds=Number(A.trim())),P.trim()&&(vt.max_num_delegations=Number(P.trim())),Object.keys(vt).length>0&&(at.overrides=vt),L.length>0&&(at.context_files=L),z.trim()&&(at.system_prompt=z.trim()),B&&(at.interactive=!0);const st=await l.mutateAsync(at);J(),n(!1),r(`/projects/${e}/sessions/${st.run_id}`)}catch{}},re=(c==null?void 0:c.orchestrator_role)??"orchestrator",Ee=(a??[]).filter(Se=>Se.type==="roles").map(Se=>Se.name).filter(Se=>Se!==re),$e=[re,...Ee],Ne=(a??[]).filter(Se=>Se.type==="agents").map(Se=>Se.name),et=new Set((a??[]).filter(Se=>Se.type==="memories").map(Se=>Se.name));et.add("none");const Xe=[...et].sort(),Ke=g.trim()||re,Rt=tU("roles",Ke,{enabled:!!Ke}),ct=((Ge=(Te=Rt.data)==null?void 0:Te.params_values)==null?void 0:Ge.default_agent)??((nn=(Gt=(We=Rt.data)==null?void 0:We.params_schema)==null?void 0:Gt.default_agent)==null?void 0:nn.default)??"",wt=ct&&Ne.includes(ct)?ct:(c==null?void 0:c.runtime)??"strawpot-claude-code",Xt=g.trim()&&!$e.includes(g.trim())?"Role not found in installed roles":"",Mt=b.trim()&&Ne.length>0&&!Ne.includes(b.trim())?"Runtime not found in installed agents":"",cn=S.trim()&&!Xe.includes(S.trim())?"Memory not found in installed providers":"",de=!!Xt||!!Mt||!!cn;return m.jsx(ws,{open:t,onOpenChange:n,children:m.jsxs(Ss,{className:"max-w-4xl max-h-[90vh] overflow-y-auto",children:[m.jsx(Es,{children:m.jsx(js,{children:"Launch Session"})}),m.jsxs("form",{onSubmit:pe,className:"space-y-4",children:[m.jsxs("div",{className:"space-y-2",children:[m.jsxs(mt,{htmlFor:"task",children:["Task ",m.jsx("span",{className:"text-destructive",children:"*"})]}),m.jsxs("div",{className:"relative",onDragOver:ne,onDragEnter:ae,onDragLeave:ie,onDrop:ee,children:[m.jsx(ql,{id:"task",value:h,onChange:Se=>d(Se.target.value),placeholder:"Describe what the agent should do… (drag & drop files to attach)",required:!0,autoFocus:!0,rows:3}),(R||U)&&m.jsx("div",{className:"absolute inset-0 flex items-center justify-center rounded-md border-2 border-dashed border-primary bg-background/80 pointer-events-none",children:U?m.jsxs("span",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[m.jsx(Or,{className:"h-4 w-4 animate-spin"})," Uploading…"]}):m.jsxs("span",{className:"flex items-center gap-2 text-sm text-primary",children:[m.jsx(I0,{className:"h-4 w-4"})," Drop to upload & attach"]})})]})]}),(o.data??[]).length>0&&m.jsxs("div",{className:"space-y-2",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsxs(dd,{children:[m.jsx(hd,{asChild:!0,children:m.jsxs(je,{type:"button",variant:"outline",size:"sm",children:[m.jsx(fN,{className:"mr-1 h-3.5 w-3.5"}),"Annotate Files"]})}),m.jsxs(md,{align:"start",className:"w-64",onCloseAutoFocus:Se=>Se.preventDefault(),children:[m.jsx("div",{className:"px-2 py-1.5",children:m.jsx(rt,{placeholder:"Filter files...",value:X,onChange:Se=>K(Se.target.value),className:"h-7 text-xs",onKeyDown:Se=>Se.stopPropagation()})}),m.jsx("div",{className:"max-h-48 overflow-y-auto",children:(o.data??[]).filter(Se=>Se.path.toLowerCase().includes(X.toLowerCase())).map(Se=>m.jsx(bN,{checked:L.includes(Se.path),onCheckedChange:()=>se(Se.path),onSelect:at=>at.preventDefault(),children:m.jsx("span",{className:"font-mono text-xs",children:Se.path})},Se.path))})]})]}),L.length>0&&m.jsxs("span",{className:"text-xs text-muted-foreground",children:[L.length," file(s) attached"]})]}),L.length>0&&m.jsxs("div",{className:"flex flex-wrap gap-1",children:[(D?L:L.slice(0,3)).map(Se=>m.jsxs(zt,{variant:"secondary",className:"max-w-[200px] gap-1 font-mono text-xs",children:[m.jsx("button",{type:"button",onClick:()=>se(Se),className:"mr-0.5 shrink-0 rounded-sm hover:bg-muted",children:m.jsx(fc,{className:"h-3 w-3"})}),m.jsxs("span",{className:"truncate",children:["@",Se]})]},Se)),!D&&L.length>3&&m.jsxs("button",{type:"button",onClick:()=>q(!0),className:"basis-full text-left text-xs text-muted-foreground hover:text-foreground",children:["+",L.length-3," more"]}),D&&L.length>3&&m.jsx("button",{type:"button",onClick:()=>q(!1),className:"basis-full text-left text-xs text-muted-foreground hover:text-foreground",children:"Show less"})]})]}),m.jsxs("div",{className:"space-y-2",children:[m.jsx(mt,{htmlFor:"role",children:"Role"}),m.jsx(rt,{id:"role",list:"datalist-role",value:g,onChange:Se=>v(Se.target.value),placeholder:re}),m.jsxs("datalist",{id:"datalist-role",children:[m.jsx("option",{value:re}),Ee.map(Se=>m.jsx("option",{value:Se},Se))]}),Xt&&m.jsx("p",{className:"text-xs text-destructive",children:Xt})]}),m.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[m.jsx("input",{type:"checkbox",checked:B,onChange:Se=>G(Se.target.checked),className:"rounded border-input"}),m.jsx("span",{className:"text-sm",children:"Interactive mode"}),m.jsx("span",{className:"text-xs text-muted-foreground",children:"Allow the agent to ask you questions via a chat panel"})]}),m.jsxs(Lu,{children:[m.jsx(zu,{asChild:!0,children:m.jsxs(je,{type:"button",variant:"ghost",size:"sm",children:[m.jsx(Lm,{className:"mr-1 h-4 w-4"}),"Advanced Options"]})}),m.jsxs($u,{className:"mt-3 space-y-4",children:[m.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[m.jsxs("div",{className:"space-y-2",children:[m.jsx(mt,{htmlFor:"runtime",children:"Runtime"}),m.jsx(rt,{id:"runtime",list:"datalist-runtime",value:b,onChange:Se=>w(Se.target.value),placeholder:wt}),Ne.length>0&&m.jsx("datalist",{id:"datalist-runtime",children:Ne.map(Se=>m.jsx("option",{value:Se},Se))}),Mt&&m.jsx("p",{className:"text-xs text-destructive",children:Mt})]}),m.jsxs("div",{className:"space-y-2",children:[m.jsx(mt,{htmlFor:"memory",children:"Memory"}),m.jsx(rt,{id:"memory",list:"datalist-memory",value:S,onChange:Se=>E(Se.target.value),placeholder:(c==null?void 0:c.memory)||"dial"}),m.jsx("datalist",{id:"datalist-memory",children:Xe.map(Se=>m.jsx("option",{value:Se},Se))}),cn&&m.jsx("p",{className:"text-xs text-destructive",children:cn})]})]}),m.jsxs("div",{className:"space-y-2",children:[m.jsx(mt,{htmlFor:"system-prompt",children:"System Prompt"}),m.jsx(ql,{id:"system-prompt",value:z,onChange:Se=>F(Se.target.value),placeholder:"Additional instructions for the agent...",rows:3})]}),m.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[m.jsxs("div",{className:"space-y-2",children:[m.jsx(mt,{children:"Max Delegations"}),m.jsx(rt,{type:"number",min:"0",value:P,onChange:Se=>I(Se.target.value),placeholder:c!=null&&c.max_num_delegations?String(c.max_num_delegations):"0 (unlimited)",className:"h-8 text-xs"})]}),m.jsxs("div",{className:"space-y-2",children:[m.jsx(mt,{children:"Cache Delegations"}),m.jsxs(Ra,{value:C||f,onValueChange:Se=>_(Se===f?"":Se),children:[m.jsx(La,{className:"h-8 text-xs",children:m.jsx(Ia,{placeholder:(c==null?void 0:c.cache_delegations)!==!1?"true":"false"})}),m.jsxs(za,{children:[m.jsxs(In,{value:f,className:"text-muted-foreground",children:["Default (",(c==null?void 0:c.cache_delegations)!==!1?"true":"false",")"]}),m.jsx(In,{value:"true",children:"true"}),m.jsx(In,{value:"false",children:"false"})]})]})]}),m.jsxs("div",{className:"space-y-2",children:[m.jsx(mt,{children:"Cache Max Entries"}),m.jsx(rt,{type:"number",min:"0",value:N,onChange:Se=>O(Se.target.value),placeholder:c!=null&&c.cache_max_entries?String(c.cache_max_entries):"0 (unlimited)",className:"h-8 text-xs"})]}),m.jsxs("div",{className:"space-y-2",children:[m.jsx(mt,{children:"Cache TTL (seconds)"}),m.jsx(rt,{type:"number",min:"0",value:A,onChange:Se=>T(Se.target.value),placeholder:c!=null&&c.cache_ttl_seconds?String(c.cache_ttl_seconds):"0 (unlimited)",className:"h-8 text-xs"})]})]})]})]}),l.error&&m.jsx("p",{className:"text-sm text-destructive",children:l.error.message}),m.jsxs("div",{className:"flex gap-2",children:[m.jsx(je,{type:"submit",disabled:l.isPending||de,children:l.isPending?"Launching...":"Launch"}),m.jsx(je,{type:"button",variant:"outline",onClick:()=>n(!1),children:"Cancel"})]})]})]})})}function sue(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function nU({projectId:e}){const t=L0(e),n=Kle(),r=Yle(),i=y.useRef(null),[a,o]=y.useState(!1),[l,c]=y.useState(null),f=y.useCallback(E=>{const C=Array.from(E);C.length!==0&&n.mutate({projectId:e,files:C},{onSuccess:()=>Ut.success(`Uploaded ${C.length} file(s)`),onError:()=>Ut.error("Upload failed")})},[e,n]),h=y.useCallback(E=>{E.preventDefault(),o(!1),f(E.dataTransfer.files)},[f]),d=y.useCallback(E=>{E.preventDefault(),o(!0)},[]),g=y.useCallback(E=>{E.preventDefault(),o(!1)},[]),v=y.useCallback(()=>{var E;(E=i.current)==null||E.click()},[]),b=y.useCallback(E=>{E.target.files&&(f(E.target.files),E.target.value="")},[f]),w=y.useCallback(E=>{r.mutate({projectId:e,filePath:E},{onSuccess:()=>{Ut.success("File deleted"),c(null)},onError:()=>{Ut.error("Failed to delete file"),c(null)}})},[e,r]),S=t.data??[];return m.jsxs("div",{className:"space-y-4",children:[m.jsxs("div",{onDrop:h,onDragOver:d,onDragLeave:g,className:`flex flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed p-8 transition-colors ${a?"border-primary bg-primary/5":"border-muted-foreground/25"}`,children:[m.jsx(I0,{className:"h-8 w-8 text-muted-foreground"}),m.jsxs("p",{className:"text-sm text-muted-foreground",children:["Drag & drop files here, or"," ",m.jsx("button",{type:"button",onClick:v,className:"font-medium text-primary underline-offset-4 hover:underline",children:"browse"})]}),n.isPending&&m.jsx("p",{className:"text-xs text-muted-foreground",children:"Uploading..."}),m.jsx("input",{ref:i,type:"file",multiple:!0,className:"hidden",onChange:b})]}),S.length===0?m.jsx("p",{className:"text-sm italic text-muted-foreground",children:"No files uploaded yet."}):m.jsx(hn,{children:m.jsx(mn,{className:"p-0",children:m.jsxs(fs,{children:[m.jsx(ds,{children:m.jsxs(sr,{children:[m.jsx(ot,{children:"Name"}),m.jsx(ot,{className:"w-24",children:"Size"}),m.jsx(ot,{className:"w-44",children:"Modified"}),m.jsx(ot,{className:"w-28"})]})}),m.jsx(hs,{children:S.map(E=>m.jsxs(sr,{children:[m.jsx(it,{className:"font-mono text-xs",children:E.path}),m.jsx(it,{className:"text-xs text-muted-foreground",children:sue(E.size)}),m.jsx(it,{className:"text-xs text-muted-foreground",children:new Date(E.modified_at).toLocaleString()}),m.jsx(it,{children:l===E.path?m.jsxs("div",{className:"flex items-center justify-end gap-2",children:[m.jsx("button",{type:"button",onClick:()=>w(E.path),disabled:r.isPending,className:"text-xs text-destructive hover:text-destructive/80 font-medium",children:"Confirm"}),m.jsx("button",{type:"button",onClick:()=>c(null),className:"text-xs text-muted-foreground hover:text-foreground",children:"No"})]}):m.jsx("div",{className:"flex justify-end",children:m.jsx(je,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>c(E.path),disabled:r.isPending,children:m.jsx(Eo,{className:"h-3.5 w-3.5 text-muted-foreground"})})})})]},E.path))})]})})})]})}function Mp({className:e,orientation:t="horizontal",...n}){return m.jsx(Eie,{"data-slot":"tabs","data-orientation":t,orientation:t,className:Oe("group/tabs flex gap-2 data-[orientation=horizontal]:flex-col",e),...n})}const lue=B0("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-[orientation=horizontal]/tabs:h-9 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col data-[variant=line]:rounded-none",{variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});function Dp({className:e,variant:t="default",...n}){return m.jsx(jie,{"data-slot":"tabs-list","data-variant":t,className:Oe(lue({variant:t}),e),...n})}function ar({className:e,...t}){return m.jsx(_ie,{"data-slot":"tabs-trigger",className:Oe("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent","data-[state=active]:bg-background data-[state=active]:text-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 dark:data-[state=active]:text-foreground","after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100",e),...t})}function or({className:e,...t}){return m.jsx(Cie,{"data-slot":"tabs-content",className:Oe("flex-1 outline-none",e),...t})}function uue(){const e=gt();return Ht({mutationFn:t=>Fe.post("/registry/install",t),onSuccess:()=>{e.invalidateQueries({queryKey:["registry"]})}})}function rU(){const e=gt();return Ht({mutationFn:({type:t,name:n})=>Fe.delete(`/registry/${t}/${n}`),onSuccess:()=>{e.invalidateQueries({queryKey:["registry"]})}})}function cue(){const e=gt();return Ht({mutationFn:t=>Fe.post("/registry/update",t),onSuccess:()=>{e.invalidateQueries({queryKey:["registry"]})}})}function fue(){const e=gt();return Ht({mutationFn:t=>Fe.post("/registry/reinstall",t),onSuccess:()=>{e.invalidateQueries({queryKey:["registry"]})}})}function due(){const e=gt();return Ht({mutationFn:({type:t,name:n,env_values:r,params_values:i})=>Fe.put(`/registry/${t}/${n}/config`,{env_values:r,params_values:i}),onSuccess:(t,n)=>{e.invalidateQueries({queryKey:Ue.registry.config(n.type,n.name)})}})}function hue(e){const t=gt();return Ht({mutationFn:n=>Fe.post(`/projects/${e}/resources/install`,n),onSuccess:()=>{t.invalidateQueries({queryKey:Ue.projects.resources(e)})}})}function iU(e){const t=gt();return Ht({mutationFn:({type:n,name:r})=>Fe.delete(`/projects/${e}/resources/${n}/${r}`),onSuccess:()=>{t.invalidateQueries({queryKey:Ue.projects.resources(e)})}})}function mue(e){const t=gt();return Ht({mutationFn:n=>Fe.post(`/projects/${e}/resources/update`,n),onSuccess:()=>{t.invalidateQueries({queryKey:Ue.projects.resources(e)})}})}function pue(e){const t=gt();return Ht({mutationFn:n=>Fe.post(`/projects/${e}/resources/reinstall`,n),onSuccess:()=>{t.invalidateQueries({queryKey:Ue.projects.resources(e)})}})}function gue(e){const t=gt();return Ht({mutationFn:({type:n,name:r,env_values:i,params_values:a})=>Fe.put(`/projects/${e}/resources/${n}/${r}/config`,{env_values:i,params_values:a}),onSuccess:(n,r)=>{t.invalidateQueries({queryKey:Ue.projects.resourceConfig(e,r.type,r.name)})}})}function vue({...e}){return m.jsx(Ak,{"data-slot":"sheet",...e})}function yue({...e}){return m.jsx(Ok,{"data-slot":"sheet-portal",...e})}function xue({className:e,...t}){return m.jsx(Tk,{"data-slot":"sheet-overlay",className:Oe("fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",e),...t})}function bue({className:e,children:t,side:n="right",showCloseButton:r=!0,...i}){return m.jsxs(yue,{children:[m.jsx(xue,{}),m.jsxs(Pk,{"data-slot":"sheet-content",className:Oe("fixed z-50 flex flex-col gap-4 bg-background shadow-lg transition ease-in-out data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:animate-in data-[state=open]:duration-500",n==="right"&&"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm",n==="left"&&"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",n==="top"&&"inset-x-0 top-0 h-auto border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",n==="bottom"&&"inset-x-0 bottom-0 h-auto border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",e),...i,children:[t,r&&m.jsxs(Mk,{className:"absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-secondary",children:[m.jsx(fc,{className:"size-4"}),m.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function wue({className:e,...t}){return m.jsx("div",{"data-slot":"sheet-header",className:Oe("flex flex-col gap-1.5 p-4",e),...t})}function Sue({className:e,...t}){return m.jsx(BB,{"data-slot":"sheet-title",className:Oe("font-semibold text-foreground",e),...t})}function Eue({className:e,...t}){return m.jsx(FB,{"data-slot":"sheet-description",className:Oe("text-sm text-muted-foreground",e),...t})}function jue(e){return Wn({queryKey:Ue.registry.validate(e??""),queryFn:()=>Fe.get(`/registry/agents/${e}/validate`),enabled:!!e})}function Ju(e,t){return Wn({queryKey:Ue.registry.list(e),queryFn:()=>Fe.get(`/registry/${e}`),enabled:t==null?void 0:t.enabled})}function _ue(e,t,n){return Wn({queryKey:Ue.registry.detail(e,t),queryFn:()=>Fe.get(`/registry/${e}/${t}`),enabled:(n==null?void 0:n.enabled)??!!t})}const Cue=B0("relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 [&>svg]:text-current"}},defaultVariants:{variant:"default"}});function Sy({className:e,variant:t,...n}){return m.jsx("div",{"data-slot":"alert",role:"alert",className:Oe(Cue({variant:t}),e),...n})}function Ey({className:e,...t}){return m.jsx("div",{"data-slot":"alert-title",className:Oe("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",e),...t})}function jy({className:e,...t}){return m.jsx("div",{"data-slot":"alert-description",className:Oe("col-start-2 grid justify-items-start gap-1 text-sm text-muted-foreground [&_p]:leading-relaxed",e),...t})}function kue({agentName:e}){const{data:t}=jue(e);return!t||!(!t.tools_ok||t.setup_command||!t.env_ok)?null:m.jsxs("div",{className:"mb-4 space-y-3",children:[!t.tools_ok&&m.jsxs(Sy,{variant:"destructive",children:[m.jsx(po,{className:"h-4 w-4"}),m.jsx(Ey,{children:"Missing Prerequisites"}),m.jsx(jy,{children:t.missing_tools.map(r=>m.jsxs("div",{className:"mt-1",children:[m.jsx("strong",{children:r.name})," not found on PATH.",r.install_hint&&m.jsx("code",{className:"ml-2 rounded bg-muted px-1.5 py-0.5 text-xs",children:r.install_hint})]},r.name))})]}),t.setup_command&&m.jsxs(Sy,{children:[m.jsx(Woe,{className:"h-4 w-4"}),m.jsx(Ey,{children:"Setup"}),m.jsxs(jy,{children:[m.jsx("p",{children:t.setup_description||"Run initial authentication in your terminal:"}),m.jsx("code",{className:"mt-1 block rounded bg-muted px-2 py-1 text-xs",children:t.setup_command}),m.jsx("p",{className:"mt-2 text-muted-foreground",children:"Or set the API key in the config below instead."})]})]}),!t.env_ok&&!t.setup_command&&t.missing_env.length>0&&m.jsxs(Sy,{children:[m.jsx(Noe,{className:"h-4 w-4"}),m.jsx(Ey,{children:"API Key Required"}),m.jsx(jy,{children:m.jsxs("p",{children:["Set"," ",t.missing_env.map((r,i)=>m.jsxs("span",{children:[i>0&&", ",m.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-xs",children:r})]},r))," ","in the config below to authenticate."]})})]})]})}function Nue({resourceType:e,resourceName:t,enabled:n,projectId:r}){const i=tU(e,t,{enabled:n&&!r}),a=iue(r??0,e,t,{enabled:n&&!!r}),{data:o,isLoading:l}=r?a:i,c=due(),f=gue(r??0),h=r?f:c,{data:d}=Ju("agents",{enabled:n&&e==="roles"}),[g,v]=y.useState({}),[b,w]=y.useState({}),[S,E]=y.useState(new Set);if(y.useEffect(()=>{o&&(v({...o.env_values}),w({...o.params_values}))},[o]),l||!o)return null;const C=Object.keys(o.env_schema),_=Object.keys(o.params_schema);if(C.length===0&&_.length===0)return null;const N=I=>E(z=>{const F=new Set(z);return F.has(I)?F.delete(I):F.add(I),F}),O=(d??[]).map(I=>I.name),A=String(b.default_agent??"").trim(),T=e==="roles"&&A&&O.length>0&&!O.includes(A)?"Agent not found in installed agents":"",P=()=>{h.mutate({type:e,name:t,env_values:C.length>0?g:void 0,params_values:_.length>0?b:void 0},{onSuccess:()=>Ut.success("Configuration saved"),onError:()=>Ut.error("Failed to save configuration")})};return m.jsxs("div",{className:"flex flex-col gap-4",children:[C.length>0&&m.jsxs(m.Fragment,{children:[m.jsx(wl,{}),m.jsxs("div",{className:"flex flex-col gap-3",children:[m.jsx("h4",{className:"text-sm font-semibold",children:"Environment Variables"}),C.map(I=>{const z=o.env_schema[I],F=S.has(I);return m.jsxs("div",{className:"flex flex-col gap-1",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(mt,{className:"text-xs font-mono",children:I}),z.required&&m.jsx(zt,{variant:"outline",className:"h-4 px-1 text-[10px] text-red-500 border-red-200",children:"required"})]}),z.description&&m.jsx("p",{className:"text-xs text-muted-foreground",children:z.description}),m.jsxs("div",{className:"relative",children:[m.jsx(rt,{type:F?"text":"password",value:g[I]??"",onChange:B=>v(G=>({...G,[I]:B.target.value})),placeholder:I,className:"h-8 pr-8 text-xs font-mono"}),m.jsx("button",{type:"button",className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",onClick:()=>N(I),children:F?m.jsx(poe,{className:"h-3.5 w-3.5"}):m.jsx(voe,{className:"h-3.5 w-3.5"})})]})]},I)})]})]}),_.length>0&&m.jsxs(m.Fragment,{children:[m.jsx(wl,{}),m.jsxs("div",{className:"flex flex-col gap-3",children:[m.jsx("h4",{className:"text-sm font-semibold",children:"Parameters"}),_.map(I=>{const z=o.params_schema[I],F=b[I],B=z.default;if(z.type==="boolean")return m.jsxs("div",{className:"flex flex-col gap-1",children:[m.jsx(mt,{className:"text-xs font-mono",children:I}),z.description&&m.jsx("p",{className:"text-xs text-muted-foreground",children:z.description}),m.jsxs(Ra,{value:F!=null?String(F):B!=null?String(B):"",onValueChange:q=>w(X=>({...X,[I]:q==="true"})),children:[m.jsx(La,{className:"h-8 text-xs",children:m.jsx(Ia,{})}),m.jsxs(za,{children:[m.jsx(In,{value:"true",children:"true"}),m.jsx(In,{value:"false",children:"false"})]})]})]},I);const G=z.type==="int"||z.type==="float"?"number":"text",L=z.type==="float"?"any":void 0,V=I==="default_agent"&&d?d.map(q=>q.name):void 0,D=V?`datalist-${I}`:void 0;return m.jsxs("div",{className:"flex flex-col gap-1",children:[m.jsx(mt,{className:"text-xs font-mono",children:I}),z.description&&m.jsx("p",{className:"text-xs text-muted-foreground",children:z.description}),m.jsx(rt,{type:G,step:L,list:D,value:F!=null?String(F):"",onChange:q=>w(X=>({...X,[I]:G==="number"&&q.target.value!==""?Number(q.target.value):q.target.value})),placeholder:B!=null?String(B):void 0,className:"h-8 text-xs font-mono"}),V&&m.jsx("datalist",{id:D,children:V.map(q=>m.jsx("option",{value:q},q))}),I==="default_agent"&&T&&m.jsx("p",{className:"text-xs text-destructive",children:T})]},I)})]})]}),m.jsxs(je,{size:"sm",onClick:P,disabled:h.isPending||!!T,className:"self-start",children:[m.jsx(jF,{className:"mr-2 h-3.5 w-3.5"}),h.isPending?"Saving...":"Save Configuration"]})]})}function aU({resource:e,resourceType:t,open:n,onOpenChange:r,projectId:i}){var T,P;const a=rU(),o=cue(),l=fue(),c=iU(i??0),f=mue(i??0),h=pue(i??0),d=i?c:a,g=i?f:o,v=i?h:l,[b,w]=y.useState(!1),S=g.isPending||v.isPending||d.isPending;if(!e)return null;const E=()=>{if(!b){w(!0);return}d.mutate({type:t,name:e.name},{onSuccess:I=>{I.exit_code===0?(Ut.success(`Uninstalled ${e.name}`),r(!1)):Ut.error(`Uninstall failed: ${I.stderr||I.stdout}`),w(!1)},onError:()=>{Ut.error("Uninstall request failed"),w(!1)}})},C=()=>{g.mutate({type:t,name:e.name},{onSuccess:I=>{I.exit_code===0?Ut.success(`Updated ${e.name}`):Ut.error(`Update failed: ${I.stderr||I.stdout}`)},onError:()=>Ut.error("Update request failed")})},_=()=>{v.mutate({type:t,name:e.name},{onSuccess:I=>{I.exit_code===0?Ut.success(`Reinstalled ${e.name}`):Ut.error(`Reinstall failed: ${I.stderr||I.stdout}`)},onError:()=>Ut.error("Reinstall request failed")})},O=((T={skills:["denden","strawpot-session-recap"],roles:["imu","ai-ceo","ai-employee"],agents:["strawpot-claude-code"],memories:["dial"]}[t])==null?void 0:T.includes(e.name))??!1,A=(P=e.frontmatter)==null?void 0:P.metadata;return m.jsx(vue,{open:n,onOpenChange:I=>{r(I),w(!1)},children:m.jsxs(bue,{side:"right",className:"flex h-full flex-col sm:max-w-xl overflow-x-hidden",children:[m.jsxs(wue,{className:"shrink-0",children:[m.jsxs(Sue,{className:"flex items-center gap-2",children:[e.name,e.version&&m.jsxs(zt,{variant:"outline",className:"text-xs font-normal",children:["v",e.version]})]}),m.jsx(Eue,{children:e.description||"No description"})]}),m.jsxs("div",{className:"shrink-0 flex flex-col gap-4 px-4",children:[m.jsxs("div",{className:"flex flex-wrap gap-2 text-xs text-muted-foreground",children:[m.jsxs("span",{children:["Source: ",m.jsx("strong",{children:e.source})]}),m.jsxs("span",{children:["Path: ",m.jsx("code",{className:"rounded bg-muted px-1",children:e.path})]})]}),A&&Object.keys(A).length>0&&m.jsxs("details",{className:"text-sm",children:[m.jsx("summary",{className:"cursor-pointer font-medium text-muted-foreground",children:"Metadata"}),m.jsx("pre",{className:"mt-2 max-h-40 overflow-auto rounded-md bg-muted p-3 text-xs",children:JSON.stringify(A,null,2)})]})]}),m.jsx(U0,{className:"min-h-0 flex-1",children:m.jsxs("div",{className:"px-4 overflow-hidden",children:[t==="agents"&&m.jsx(kue,{agentName:e.name}),m.jsx(Nue,{resourceType:t,resourceName:e.name,enabled:n,projectId:i}),m.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none whitespace-pre-wrap mt-4",children:e.body||"No content."})]})}),m.jsxs("div",{className:"shrink-0 border-t border-border p-4 flex gap-2",children:[m.jsx(je,{size:"sm",onClick:C,disabled:S,children:g.isPending?"Updating...":"Update"}),m.jsx(je,{variant:"outline",size:"sm",onClick:_,disabled:S,children:v.isPending?"Reinstalling...":"Reinstall"}),m.jsx("div",{className:"flex-1"}),!O&&m.jsxs(m.Fragment,{children:[m.jsx(je,{variant:b?"destructive":"outline",size:"sm",onClick:E,disabled:S,children:d.isPending?"Uninstalling...":b?"Confirm Uninstall":"Uninstall"}),b&&!d.isPending&&m.jsx(je,{variant:"ghost",size:"sm",onClick:()=>w(!1),children:"Cancel"})]})]})]})})}const Aue=[{value:"roles",label:"Role"},{value:"skills",label:"Skill"},{value:"agents",label:"Agent"},{value:"memories",label:"Memory"}];function SN({open:e,onOpenChange:t,defaultType:n,projectId:r}){const[i,a]=y.useState(n??"roles"),[o,l]=y.useState(""),[c,f]=y.useState(null),[h,d]=y.useState(null);y.useEffect(()=>{e&&n&&a(n)},[e,n]);const g=uue(),v=hue(r??0),b=r?v:g,w=(c==null?void 0:c.status)==="success",S=()=>{o.trim()&&(f(null),d(null),b.mutate({type:i,name:o.trim()},{onSuccess:C=>{C.exit_code===0?(Ut.success(`Installed ${o.trim()}`),f({status:"success",message:`Successfully installed ${o.trim()}`}),d(C.stdout||null)):(f({status:"error",message:"Installation failed"}),d(C.stderr||C.stdout||"Unknown error."))},onError:()=>{f({status:"error",message:"Install request failed"}),Ut.error("Install request failed")}}))},E=C=>{C||(f(null),d(null),l("")),t(C)};return m.jsx(ws,{open:e,onOpenChange:E,children:m.jsxs(Ss,{className:"sm:max-w-md",children:[m.jsxs(Es,{children:[m.jsx(js,{children:r?"Install Resource to Project":"Install Resource"}),m.jsx(GF,{children:"Install a resource from StrawHub by name."})]}),m.jsxs("div",{className:"flex flex-col gap-4",children:[c&&m.jsxs(Sy,{variant:c.status==="error"?"destructive":"default",className:c.status==="success"?"border-green-200 bg-green-50 text-green-800 dark:border-green-800 dark:bg-green-950 dark:text-green-300":"",children:[c.status==="success"?m.jsx(M0,{className:"h-4 w-4 text-green-600 dark:text-green-400"}):m.jsx(cN,{className:"h-4 w-4"}),m.jsx(Ey,{children:c.status==="success"?"Installed":"Error"}),m.jsx(jy,{children:c.message})]}),m.jsxs("div",{className:"flex flex-col gap-2",children:[m.jsx(mt,{htmlFor:"install-type",children:"Type"}),m.jsxs(Ra,{value:i,onValueChange:a,disabled:w,children:[m.jsx(La,{id:"install-type",children:m.jsx(Ia,{})}),m.jsx(za,{children:Aue.map(C=>m.jsx(In,{value:C.value,children:C.label},C.value))})]})]}),m.jsxs("div",{className:"flex flex-col gap-2",children:[m.jsx(mt,{htmlFor:"install-name",children:"Package Name"}),m.jsx(rt,{id:"install-name",autoFocus:!0,value:o,onChange:C=>l(C.target.value),placeholder:"e.g. strawpot-claude-code",readOnly:w,onKeyDown:C=>{C.key==="Enter"&&S()}})]}),h&&m.jsxs("details",{className:"text-sm",children:[m.jsx("summary",{className:"cursor-pointer text-xs font-medium text-muted-foreground",children:"Output"}),m.jsx("pre",{className:"mt-2 max-h-40 overflow-auto rounded-md bg-muted p-3 text-xs",children:h})]})]}),m.jsx(XF,{children:(c==null?void 0:c.status)==="success"?m.jsx(je,{onClick:()=>E(!1),children:"Done"}):m.jsx(je,{onClick:S,disabled:!o.trim()||b.isPending,children:b.isPending?"Installing...":"Install"})})]})})}const mR=["roles","skills","agents","memories"],oU={roles:"Roles",skills:"Skills",agents:"Agents",memories:"Memories"};function Oue({projectId:e,installOpen:t,onInstallOpenChange:n}){const{data:r,isLoading:i}=Pp(e),[a,o]=y.useState(null),[l,c]=y.useState(""),[f,h]=y.useState(!1),[d,g]=y.useState(!1),v=t??d,b=n??g,{data:w}=rue(e,l,a??"",{enabled:f&&!!a&&!!l}),S=E=>{o(E.name),c(E.type),h(!0)};return m.jsxs("div",{className:"space-y-4",children:[m.jsxs("div",{className:"flex items-center justify-between",children:[m.jsx("p",{className:"text-sm text-muted-foreground",children:"Resources available to this project"}),m.jsxs(je,{onClick:()=>b(!0),size:"sm",children:[m.jsx(D0,{className:"mr-2 h-4 w-4"}),"Install"]})]}),i?m.jsx("div",{className:"space-y-2",children:Array.from({length:3}).map((E,C)=>m.jsx(Rn,{className:"h-12 w-full"},C))}):!r||r.length===0?m.jsx("div",{className:"rounded-lg border border-dashed border-border p-8 text-center text-muted-foreground",children:"No resources available yet."}):m.jsxs(Mp,{defaultValue:"all",children:[m.jsxs(Dp,{children:[m.jsx(ar,{value:"all",children:"All"}),mR.map(E=>{const C=r.filter(_=>_.type===E).length;return m.jsxs(ar,{value:E,disabled:C===0,children:[oU[E]," (",C,")"]},E)})]}),m.jsx(or,{value:"all",children:m.jsx(pR,{resources:r,showType:!0,projectId:e,onSelect:S})}),mR.map(E=>m.jsx(or,{value:E,children:m.jsx(pR,{resources:r.filter(C=>C.type===E),projectId:e,onSelect:S})},E))]}),m.jsx(aU,{resource:w??null,resourceType:l,open:f,onOpenChange:h,projectId:e}),m.jsx(SN,{open:v,onOpenChange:b,projectId:e})]})}function pR({resources:e,showType:t,projectId:n,onSelect:r}){return e.length===0?m.jsx("div",{className:"rounded-lg border border-dashed border-border p-8 text-center text-muted-foreground",children:"No resources in this category."}):m.jsx(hn,{children:m.jsx(mn,{className:"p-0",children:m.jsxs(fs,{children:[m.jsx(ds,{children:m.jsxs(sr,{children:[m.jsx(ot,{children:"Name"}),m.jsx(ot,{children:"Source"}),t&&m.jsx(ot,{children:"Type"}),m.jsx(ot,{children:"Version"}),m.jsx(ot,{children:"Description"}),m.jsx(ot,{children:"Config"}),m.jsx(ot,{className:"w-24"})]})}),m.jsx(hs,{children:e.map(i=>m.jsxs(sr,{className:"cursor-pointer",onClick:()=>r(i),children:[m.jsx(it,{className:"font-medium",children:i.name}),m.jsx(it,{children:m.jsx(zt,{variant:"outline",className:`text-xs ${i.source==="global"?"border-dashed":""}`,children:i.source==="global"?"Global":"Project"})}),t&&m.jsx(it,{children:m.jsx(zt,{variant:"outline",className:"text-xs",children:oU[i.type]??i.type})}),m.jsx(it,{className:"text-sm text-muted-foreground",children:i.version??"—"}),m.jsx(it,{className:"max-w-[300px] truncate text-sm",children:i.description||"—"}),m.jsx(it,{children:i.config_count>0&&m.jsxs(zt,{variant:"secondary",className:"text-xs gap-1",children:[m.jsx(R0,{className:"h-3 w-3"}),i.config_count]})}),m.jsx(it,{children:i.source==="project"&&m.jsx(Tue,{projectId:n,resourceType:i.type,name:i.name})})]},`${i.type}-${i.name}`))})]})})})}function Tue({projectId:e,resourceType:t,name:n}){const[r,i]=y.useState(!1),a=iU(e),o=l=>{l.stopPropagation(),a.mutate({type:t,name:n},{onSuccess:c=>{c.exit_code===0?Ut.success(`Uninstalled ${n}`):Ut.error(`Uninstall failed: ${c.stderr||c.stdout}`),i(!1)},onError:()=>{Ut.error("Uninstall request failed"),i(!1)}})};return r?m.jsxs("div",{className:"flex gap-1",children:[m.jsx(je,{size:"sm",variant:"destructive",onClick:o,disabled:a.isPending,children:"Confirm"}),m.jsx(je,{size:"sm",variant:"outline",onClick:l=>{l.stopPropagation(),i(!1)},children:"No"})]}):m.jsx(je,{size:"sm",variant:"ghost",className:"text-muted-foreground hover:text-destructive",onClick:l=>{l.stopPropagation(),i(!0)},children:m.jsx(Eo,{className:"h-4 w-4"})})}function Pue(e,t="30d"){return Wn({queryKey:Ue.projects.stats(e,t),queryFn:()=>Fe.get(`/projects/${e}/stats?period=${t}`)})}var Mue=["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 EN(e){if(typeof e!="string")return!1;var t=Mue;return t.includes(e)}var Due=["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"],Rue=new Set(Due);function sU(e){return typeof e!="string"?!1:Rue.has(e)}function lU(e){return typeof e=="string"&&e.startsWith("data-")}function $i(e){if(typeof e!="object"||e===null)return{};var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(sU(n)||lU(n))&&(t[n]=e[n]);return t}function hc(e){if(e==null)return null;if(y.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return $i(t)}return typeof e=="object"&&!Array.isArray(e)?$i(e):null}function ti(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(sU(n)||lU(n)||EN(n))&&(t[n]=e[n]);return t}function Iue(e){return e==null?null:y.isValidElement(e)?ti(e.props):typeof e=="object"&&!Array.isArray(e)?ti(e):null}var Lue=["children","width","height","viewBox","className","style","title","desc"];function D_(){return D_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},D_.apply(null,arguments)}function zue(e,t){if(e==null)return{};var n,r,i=$ue(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function $ue(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var jN=y.forwardRef((e,t)=>{var{children:n,width:r,height:i,viewBox:a,className:o,style:l,title:c,desc:f}=e,h=zue(e,Lue),d=a||{width:r,height:i,x:0,y:0},g=Pt("recharts-surface",o);return y.createElement("svg",D_({},ti(h),{className:g,width:r,height:i,style:l,viewBox:"".concat(d.x," ").concat(d.y," ").concat(d.width," ").concat(d.height),ref:t}),y.createElement("title",null,c),y.createElement("desc",null,f),n)}),Bue=["children","className"];function R_(){return R_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},R_.apply(null,arguments)}function Fue(e,t){if(e==null)return{};var n,r,i=Uue(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Uue(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var lr=y.forwardRef((e,t)=>{var{children:n,className:r}=e,i=Fue(e,Bue),a=Pt("recharts-layer",r);return y.createElement("g",R_({className:a},ti(i),{ref:t}),n)}),uU=y.createContext(null),Hue=()=>y.useContext(uU);function dn(e){return function(){return e}}const cU=Math.cos,Jy=Math.sin,Ha=Math.sqrt,ex=Math.PI,H0=2*ex,I_=Math.PI,L_=2*I_,Pu=1e-6,que=L_-Pu;function fU(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function Vue(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return fU;const n=10**t;return function(r){this._+=r[0];for(let i=1,a=r.length;i<a;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class Kue{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?fU:Vue(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,a,o){this._append`C${+t},${+n},${+r},${+i},${this._x1=+a},${this._y1=+o}`}arcTo(t,n,r,i,a){if(t=+t,n=+n,r=+r,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,l=this._y1,c=r-t,f=i-n,h=o-t,d=l-n,g=h*h+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(g>Pu)if(!(Math.abs(d*c-f*h)>Pu)||!a)this._append`L${this._x1=t},${this._y1=n}`;else{let v=r-o,b=i-l,w=c*c+f*f,S=v*v+b*b,E=Math.sqrt(w),C=Math.sqrt(g),_=a*Math.tan((I_-Math.acos((w+g-S)/(2*E*C)))/2),N=_/C,O=_/E;Math.abs(N-1)>Pu&&this._append`L${t+N*h},${n+N*d}`,this._append`A${a},${a},0,0,${+(d*v>h*b)},${this._x1=t+O*c},${this._y1=n+O*f}`}}arc(t,n,r,i,a,o){if(t=+t,n=+n,r=+r,o=!!o,r<0)throw new Error(`negative radius: ${r}`);let l=r*Math.cos(i),c=r*Math.sin(i),f=t+l,h=n+c,d=1^o,g=o?i-a:a-i;this._x1===null?this._append`M${f},${h}`:(Math.abs(this._x1-f)>Pu||Math.abs(this._y1-h)>Pu)&&this._append`L${f},${h}`,r&&(g<0&&(g=g%L_+L_),g>que?this._append`A${r},${r},0,1,${d},${t-l},${n-c}A${r},${r},0,1,${d},${this._x1=f},${this._y1=h}`:g>Pu&&this._append`A${r},${r},0,${+(g>=I_)},${d},${this._x1=t+r*Math.cos(a)},${this._y1=n+r*Math.sin(a)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function _N(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new Kue(t)}function CN(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function dU(e){this._context=e}dU.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 q0(e){return new dU(e)}function hU(e){return e[0]}function mU(e){return e[1]}function pU(e,t){var n=dn(!0),r=null,i=q0,a=null,o=_N(l);e=typeof e=="function"?e:e===void 0?hU:dn(e),t=typeof t=="function"?t:t===void 0?mU:dn(t);function l(c){var f,h=(c=CN(c)).length,d,g=!1,v;for(r==null&&(a=i(v=o())),f=0;f<=h;++f)!(f<h&&n(d=c[f],f,c))===g&&((g=!g)?a.lineStart():a.lineEnd()),g&&a.point(+e(d,f,c),+t(d,f,c));if(v)return a=null,v+""||null}return l.x=function(c){return arguments.length?(e=typeof c=="function"?c:dn(+c),l):e},l.y=function(c){return arguments.length?(t=typeof c=="function"?c:dn(+c),l):t},l.defined=function(c){return arguments.length?(n=typeof c=="function"?c:dn(!!c),l):n},l.curve=function(c){return arguments.length?(i=c,r!=null&&(a=i(r)),l):i},l.context=function(c){return arguments.length?(c==null?r=a=null:a=i(r=c),l):r},l}function Uv(e,t,n){var r=null,i=dn(!0),a=null,o=q0,l=null,c=_N(f);e=typeof e=="function"?e:e===void 0?hU:dn(+e),t=typeof t=="function"?t:dn(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?mU:dn(+n);function f(d){var g,v,b,w=(d=CN(d)).length,S,E=!1,C,_=new Array(w),N=new Array(w);for(a==null&&(l=o(C=c())),g=0;g<=w;++g){if(!(g<w&&i(S=d[g],g,d))===E)if(E=!E)v=g,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),b=g-1;b>=v;--b)l.point(_[b],N[b]);l.lineEnd(),l.areaEnd()}E&&(_[g]=+e(S,g,d),N[g]=+t(S,g,d),l.point(r?+r(S,g,d):_[g],n?+n(S,g,d):N[g]))}if(C)return l=null,C+""||null}function h(){return pU().defined(i).curve(o).context(a)}return f.x=function(d){return arguments.length?(e=typeof d=="function"?d:dn(+d),r=null,f):e},f.x0=function(d){return arguments.length?(e=typeof d=="function"?d:dn(+d),f):e},f.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:dn(+d),f):r},f.y=function(d){return arguments.length?(t=typeof d=="function"?d:dn(+d),n=null,f):t},f.y0=function(d){return arguments.length?(t=typeof d=="function"?d:dn(+d),f):t},f.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:dn(+d),f):n},f.lineX0=f.lineY0=function(){return h().x(e).y(t)},f.lineY1=function(){return h().x(e).y(n)},f.lineX1=function(){return h().x(r).y(t)},f.defined=function(d){return arguments.length?(i=typeof d=="function"?d:dn(!!d),f):i},f.curve=function(d){return arguments.length?(o=d,a!=null&&(l=o(a)),f):o},f.context=function(d){return arguments.length?(d==null?a=l=null:l=o(a=d),f):a},f}class gU{constructor(t,n){this._context=t,this._x=n}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,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function Yue(e){return new gU(e,!0)}function Xue(e){return new gU(e,!1)}const kN={draw(e,t){const n=Ha(t/ex);e.moveTo(n,0),e.arc(0,0,n,0,H0)}},Gue={draw(e,t){const n=Ha(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},vU=Ha(1/3),Wue=vU*2,Que={draw(e,t){const n=Ha(t/Wue),r=n*vU;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},Zue={draw(e,t){const n=Ha(t),r=-n/2;e.rect(r,r,n,n)}},Jue=.8908130915292852,yU=Jy(ex/10)/Jy(7*ex/10),ece=Jy(H0/10)*yU,tce=-cU(H0/10)*yU,nce={draw(e,t){const n=Ha(t*Jue),r=ece*n,i=tce*n;e.moveTo(0,-n),e.lineTo(r,i);for(let a=1;a<5;++a){const o=H0*a/5,l=cU(o),c=Jy(o);e.lineTo(c*n,-l*n),e.lineTo(l*r-c*i,c*r+l*i)}e.closePath()}},zS=Ha(3),rce={draw(e,t){const n=-Ha(t/(zS*3));e.moveTo(0,n*2),e.lineTo(-zS*n,-n),e.lineTo(zS*n,-n),e.closePath()}},Ji=-.5,ea=Ha(3)/2,z_=1/Ha(12),ice=(z_/2+1)*3,ace={draw(e,t){const n=Ha(t/ice),r=n/2,i=n*z_,a=r,o=n*z_+n,l=-a,c=o;e.moveTo(r,i),e.lineTo(a,o),e.lineTo(l,c),e.lineTo(Ji*r-ea*i,ea*r+Ji*i),e.lineTo(Ji*a-ea*o,ea*a+Ji*o),e.lineTo(Ji*l-ea*c,ea*l+Ji*c),e.lineTo(Ji*r+ea*i,Ji*i-ea*r),e.lineTo(Ji*a+ea*o,Ji*o-ea*a),e.lineTo(Ji*l+ea*c,Ji*c-ea*l),e.closePath()}};function oce(e,t){let n=null,r=_N(i);e=typeof e=="function"?e:dn(e||kN),t=typeof t=="function"?t:dn(t===void 0?64:+t);function i(){let a;if(n||(n=a=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),a)return n=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:dn(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:dn(+a),i):t},i.context=function(a){return arguments.length?(n=a??null,i):n},i}function tx(){}function nx(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function xU(e){this._context=e}xU.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:nx(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:nx(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function sce(e){return new xU(e)}function bU(e){this._context=e}bU.prototype={areaStart:tx,areaEnd:tx,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:nx(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function lce(e){return new bU(e)}function wU(e){this._context=e}wU.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:nx(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function uce(e){return new wU(e)}function SU(e){this._context=e}SU.prototype={areaStart:tx,areaEnd:tx,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 cce(e){return new SU(e)}function gR(e){return e<0?-1:1}function vR(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),l=(a*i+o*r)/(r+i);return(gR(a)+gR(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(l))||0}function yR(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function $S(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,l=(a-r)/3;e._context.bezierCurveTo(r+l,i+l*t,a-l,o-l*n,a,o)}function rx(e){this._context=e}rx.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,yR(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 n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,$S(this,yR(this,n=vR(this,e,t)),n);break;default:$S(this,this._t0,n=vR(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function EU(e){this._context=new jU(e)}(EU.prototype=Object.create(rx.prototype)).point=function(e,t){rx.prototype.point.call(this,t,e)};function jU(e){this._context=e}jU.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function fce(e){return new rx(e)}function dce(e){return new EU(e)}function _U(e){this._context=e}_U.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=xR(e),i=xR(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function xR(e){var t,n=e.length-1,r,i=new Array(n),a=new Array(n),o=new Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function hce(e){return new _U(e)}function V0(e,t){this._context=e,this._t=t}V0.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function mce(e){return new V0(e,.5)}function pce(e){return new V0(e,0)}function gce(e){return new V0(e,1)}function mc(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,l=a.length;n<o;++n)for(i=a,a=e[t[n]],r=0;r<l;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function $_(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function vce(e,t){return e[t]}function yce(e){const t=[];return t.key=e,t}function xce(){var e=dn([]),t=$_,n=mc,r=vce;function i(a){var o=Array.from(e.apply(this,arguments),yce),l,c=o.length,f=-1,h;for(const d of a)for(l=0,++f;l<c;++l)(o[l][f]=[0,+r(d,o[l].key,f,a)]).data=d;for(l=0,h=CN(t(o));l<c;++l)o[h[l]].index=l;return n(o,h),o}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:dn(Array.from(a)),i):e},i.value=function(a){return arguments.length?(r=typeof a=="function"?a:dn(+a),i):r},i.order=function(a){return arguments.length?(t=a==null?$_:typeof a=="function"?a:dn(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(n=a??mc,i):n},i}function bce(e,t){if((r=e.length)>0){for(var n,r,i=0,a=e[0].length,o;i<a;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}mc(e,t)}}function wce(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,a=r.length;n<a;++n){for(var o=0,l=0;o<i;++o)l+=e[o][n][1]||0;r[n][1]+=r[n][0]=-l/2}mc(e,t)}}function Sce(e,t){if(!(!((o=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,a,o;r<a;++r){for(var l=0,c=0,f=0;l<o;++l){for(var h=e[t[l]],d=h[r][1]||0,g=h[r-1][1]||0,v=(d-g)/2,b=0;b<l;++b){var w=e[t[b]],S=w[r][1]||0,E=w[r-1][1]||0;v+=S-E}c+=d,f+=v*d}i[r-1][1]+=i[r-1][0]=n,c&&(n-=f/c)}i[r-1][1]+=i[r-1][0]=n,mc(e,t)}}var BS={},FS={},bR;function Ece(){return bR||(bR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==="__proto__"}e.isUnsafeProperty=t})(FS)),FS}var US={},wR;function CU(){return wR||(wR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){switch(typeof n){case"number":case"symbol":return!1;case"string":return n.includes(".")||n.includes("[")||n.includes("]")}}e.isDeepKey=t})(US)),US}var HS={},SR;function NN(){return SR||(SR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){var r;return typeof n=="string"||typeof n=="symbol"?n:Object.is((r=n==null?void 0:n.valueOf)==null?void 0:r.call(n),-0)?"-0":String(n)}e.toKey=t})(HS)),HS}var qS={},VS={},ER;function jce(){return ER||(ER=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){if(n==null)return"";if(typeof n=="string")return n;if(Array.isArray(n))return n.map(t).join(",");const r=String(n);return r==="0"&&Object.is(Number(n),-0)?"-0":r}e.toString=t})(VS)),VS}var jR;function AN(){return jR||(jR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=jce(),n=NN();function r(i){if(Array.isArray(i))return i.map(n.toKey);if(typeof i=="symbol")return[i];i=t.toString(i);const a=[],o=i.length;if(o===0)return a;let l=0,c="",f="",h=!1;for(i.charCodeAt(0)===46&&(a.push(""),l++);l<o;){const d=i[l];f?d==="\\"&&l+1<o?(l++,c+=i[l]):d===f?f="":c+=d:h?d==='"'||d==="'"?f=d:d==="]"?(h=!1,a.push(c),c=""):c+=d:d==="["?(h=!0,c&&(a.push(c),c="")):d==="."?c&&(a.push(c),c=""):c+=d,l++}return c&&a.push(c),a}e.toPath=r})(qS)),qS}var _R;function ON(){return _R||(_R=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Ece(),n=CU(),r=NN(),i=AN();function a(l,c,f){if(l==null)return f;switch(typeof c){case"string":{if(t.isUnsafeProperty(c))return f;const h=l[c];return h===void 0?n.isDeepKey(c)?a(l,i.toPath(c),f):f:h}case"number":case"symbol":{typeof c=="number"&&(c=r.toKey(c));const h=l[c];return h===void 0?f:h}default:{if(Array.isArray(c))return o(l,c,f);if(Object.is(c==null?void 0:c.valueOf(),-0)?c="-0":c=String(c),t.isUnsafeProperty(c))return f;const h=l[c];return h===void 0?f:h}}}function o(l,c,f){if(c.length===0)return f;let h=l;for(let d=0;d<c.length;d++){if(h==null||t.isUnsafeProperty(c[d]))return f;h=h[c[d]]}return h===void 0?f:h}e.get=a})(BS)),BS}var KS,CR;function _ce(){return CR||(CR=1,KS=ON().get),KS}var Cce=_ce();const pc=Hi(Cce);var kce=4;function Rl(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:kce,n=10**t,r=Math.round(e*n)/n;return Object.is(r,-0)?0:r}function Mn(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.reduce((i,a,o)=>{var l=n[o-1];return typeof l=="string"?i+l+a:l!==void 0?i+Rl(l)+a:i+a},"")}var vr=e=>e===0?0:e>0?1:-1,go=e=>typeof e=="number"&&e!=+e,gc=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,Me=e=>(typeof e=="number"||e instanceof Number)&&!go(e),vo=e=>Me(e)||typeof e=="string",Nce=0,$m=e=>{var t=++Nce;return"".concat(e||"").concat(t)},Ur=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Me(t)&&typeof t!="string")return r;var a;if(gc(t)){if(n==null)return r;var o=t.indexOf("%");a=n*parseFloat(t.slice(0,o))/100}else a=+t;return go(a)&&(a=r),i&&n!=null&&a>n&&(a=n),a},kU=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++)if(!n[String(e[r])])n[String(e[r])]=!0;else return!0;return!1};function wn(e,t,n){return Me(e)&&Me(t)?Rl(e+n*(t-e)):t}function NU(e,t,n){if(!(!e||!e.length))return e.find(r=>r&&(typeof t=="function"?t(r):pc(r,t))===n)}var jn=e=>e===null||typeof e>"u",Rp=e=>jn(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function yi(e){return e!=null}function eu(){}var Ace=["type","size","sizeType"];function B_(){return B_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},B_.apply(null,arguments)}function kR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function NR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?kR(Object(n),!0).forEach(function(r){Oce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Oce(e,t,n){return(t=Tce(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tce(e){var t=Pce(e,"string");return typeof t=="symbol"?t:t+""}function Pce(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Mce(e,t){if(e==null)return{};var n,r,i=Dce(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Dce(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var AU={symbolCircle:kN,symbolCross:Gue,symbolDiamond:Que,symbolSquare:Zue,symbolStar:nce,symbolTriangle:rce,symbolWye:ace},Rce=Math.PI/180,Ice=e=>{var t="symbol".concat(Rp(e));return AU[t]||kN},Lce=(e,t,n)=>{if(t==="area")return e;switch(n){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var r=18*Rce;return 1.25*e*e*(Math.tan(r)-Math.tan(r*2)*Math.tan(r)**2)}case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},zce=(e,t)=>{AU["symbol".concat(Rp(e))]=t},TN=e=>{var{type:t="circle",size:n=64,sizeType:r="area"}=e,i=Mce(e,Ace),a=NR(NR({},i),{},{type:t,size:n,sizeType:r}),o="circle";typeof t=="string"&&(o=t);var l=()=>{var g=Ice(o),v=oce().type(g).size(Lce(n,r,o)),b=v();if(b!==null)return b},{className:c,cx:f,cy:h}=a,d=ti(a);return Me(f)&&Me(h)&&Me(n)?y.createElement("path",B_({},d,{className:Pt("recharts-symbols",c),transform:"translate(".concat(f,", ").concat(h,")"),d:l()})):null};TN.registerSymbol=zce;var OU=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,PN=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var n=e;if(y.isValidElement(e)&&(n=e.props),typeof n!="object"&&typeof n!="function")return null;var r={};return Object.keys(n).forEach(i=>{EN(i)&&typeof n[i]=="function"&&(r[i]=(a=>n[i](n,a)))}),r},$ce=(e,t,n)=>r=>(e(t,n,r),null),Ip=(e,t,n)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var r=null;return Object.keys(e).forEach(i=>{var a=e[i];EN(i)&&typeof a=="function"&&(r||(r={}),r[i]=$ce(a,t,n))}),r};function AR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Bce(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?AR(Object(n),!0).forEach(function(r){Fce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Fce(e,t,n){return(t=Uce(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Uce(e){var t=Hce(e,"string");return typeof t=="symbol"?t:t+""}function Hce(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Qn(e,t){var n=Bce({},e),r=t,i=Object.keys(t),a=i.reduce((o,l)=>(o[l]===void 0&&r[l]!==void 0&&(o[l]=r[l]),o),n);return a}function ix(){return ix=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ix.apply(null,arguments)}function OR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function TU(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?OR(Object(n),!0).forEach(function(r){qce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qce(e,t,n){return(t=Vce(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vce(e){var t=Kce(e,"string");return typeof t=="symbol"?t:t+""}function Kce(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var na=32,Yce={align:"center",iconSize:14,inactiveColor:"#ccc",layout:"horizontal",verticalAlign:"middle",labelStyle:{}};function Xce(e){if(typeof e=="object"&&e!==null&&"strokeDasharray"in e)return String(e.strokeDasharray)}function Gce(e){var{data:t,iconType:n,inactiveColor:r}=e,i=na/2,a=na/6,o=na/3,l=t.inactive?r:t.color,c=n??t.type;if(c==="none")return null;if(c==="plainline")return y.createElement("line",{strokeWidth:4,fill:"none",stroke:l,strokeDasharray:Xce(t.payload),x1:0,y1:i,x2:na,y2:i,className:"recharts-legend-icon"});if(c==="line")return y.createElement("path",{strokeWidth:4,fill:"none",stroke:l,d:"M0,".concat(i,"h").concat(o,`
            A`).concat(a,",").concat(a,",0,1,1,").concat(2*o,",").concat(i,`
            H`).concat(na,"M").concat(2*o,",").concat(i,`
            A`).concat(a,",").concat(a,",0,1,1,").concat(o,",").concat(i),className:"recharts-legend-icon"});if(c==="rect")return y.createElement("path",{stroke:"none",fill:l,d:"M0,".concat(na/8,"h").concat(na,"v").concat(na*3/4,"h").concat(-na,"z"),className:"recharts-legend-icon"});if(y.isValidElement(t.legendIcon)){var f=TU({},t);return delete f.legendIcon,y.cloneElement(t.legendIcon,f)}return y.createElement(TN,{fill:l,cx:i,cy:i,size:na,sizeType:"diameter",type:c})}function Wce(e){var{payload:t,iconSize:n,layout:r,formatter:i,inactiveColor:a,iconType:o,labelStyle:l}=e,c={x:0,y:0,width:na,height:na},f={display:r==="horizontal"?"inline-block":"block",marginRight:10},h={display:"inline-block",verticalAlign:"middle",marginRight:4};return t.map((d,g)=>{var v=d.formatter||i,b=Pt({"recharts-legend-item":!0,["legend-item-".concat(g)]:!0,inactive:d.inactive});if(d.type==="none")return null;var w=typeof l=="object"?TU({},l):{};w.color=d.inactive?a:w.color||d.color;var S=v?v(d.value,d,g):d.value;return y.createElement("li",ix({className:b,style:f,key:"legend-item-".concat(g)},Ip(e,d,g)),y.createElement(jN,{width:n,height:n,viewBox:c,style:h,"aria-label":"".concat(S," legend icon")},y.createElement(Gce,{data:d,iconType:o,inactiveColor:a})),y.createElement("span",{className:"recharts-legend-item-text",style:w},S))})}var Qce=e=>{var t=Qn(e,Yce),{payload:n,layout:r,align:i}=t;if(!n||!n.length)return null;var a={padding:0,margin:0,textAlign:r==="horizontal"?i:"left"};return y.createElement("ul",{className:"recharts-default-legend",style:a},y.createElement(Wce,ix({},t,{payload:n})))},YS={},XS={},TR;function Zce(){return TR||(TR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){const i=new Map;for(let a=0;a<n.length;a++){const o=n[a],l=r(o,a,n);i.has(l)||i.set(l,o)}return Array.from(i.values())}e.uniqBy=t})(XS)),XS}var GS={},PR;function Jce(){return PR||(PR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){return function(...i){return n.apply(this,i.slice(0,r))}}e.ary=t})(GS)),GS}var WS={},MR;function PU(){return MR||(MR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n}e.identity=t})(WS)),WS}var QS={},ZS={},JS={},DR;function efe(){return DR||(DR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return Number.isSafeInteger(n)&&n>=0}e.isLength=t})(JS)),JS}var RR;function MU(){return RR||(RR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=efe();function n(r){return r!=null&&typeof r!="function"&&t.isLength(r.length)}e.isArrayLike=n})(ZS)),ZS}var eE={},IR;function tfe(){return IR||(IR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="object"&&n!==null}e.isObjectLike=t})(eE)),eE}var LR;function nfe(){return LR||(LR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=MU(),n=tfe();function r(i){return n.isObjectLike(i)&&t.isArrayLike(i)}e.isArrayLikeObject=r})(QS)),QS}var tE={},nE={},zR;function rfe(){return zR||(zR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ON();function n(r){return function(i){return t.get(i,r)}}e.property=n})(nE)),nE}var rE={},iE={},aE={},oE={},$R;function DU(){return $R||($R=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n!==null&&(typeof n=="object"||typeof n=="function")}e.isObject=t})(oE)),oE}var sE={},BR;function RU(){return BR||(BR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==null||typeof n!="object"&&typeof n!="function"}e.isPrimitive=t})(sE)),sE}var lE={},FR;function IU(){return FR||(FR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){return n===r||Number.isNaN(n)&&Number.isNaN(r)}e.isEqualsSameValueZero=t})(lE)),lE}var UR;function ife(){return UR||(UR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=DU(),n=RU(),r=IU();function i(h,d,g){return typeof g!="function"?i(h,d,()=>{}):a(h,d,function v(b,w,S,E,C,_){const N=g(b,w,S,E,C,_);return N!==void 0?!!N:a(b,w,v,_)},new Map)}function a(h,d,g,v){if(d===h)return!0;switch(typeof d){case"object":return o(h,d,g,v);case"function":return Object.keys(d).length>0?a(h,{...d},g,v):r.isEqualsSameValueZero(h,d);default:return t.isObject(h)?typeof d=="string"?d==="":!0:r.isEqualsSameValueZero(h,d)}}function o(h,d,g,v){if(d==null)return!0;if(Array.isArray(d))return c(h,d,g,v);if(d instanceof Map)return l(h,d,g,v);if(d instanceof Set)return f(h,d,g,v);const b=Object.keys(d);if(h==null||n.isPrimitive(h))return b.length===0;if(b.length===0)return!0;if(v!=null&&v.has(d))return v.get(d)===h;v==null||v.set(d,h);try{for(let w=0;w<b.length;w++){const S=b[w];if(!n.isPrimitive(h)&&!(S in h)||d[S]===void 0&&h[S]!==void 0||d[S]===null&&h[S]!==null||!g(h[S],d[S],S,h,d,v))return!1}return!0}finally{v==null||v.delete(d)}}function l(h,d,g,v){if(d.size===0)return!0;if(!(h instanceof Map))return!1;for(const[b,w]of d.entries()){const S=h.get(b);if(g(S,w,b,h,d,v)===!1)return!1}return!0}function c(h,d,g,v){if(d.length===0)return!0;if(!Array.isArray(h))return!1;const b=new Set;for(let w=0;w<d.length;w++){const S=d[w];let E=!1;for(let C=0;C<h.length;C++){if(b.has(C))continue;const _=h[C];let N=!1;if(g(_,S,w,h,d,v)&&(N=!0),N){b.add(C),E=!0;break}}if(!E)return!1}return!0}function f(h,d,g,v){return d.size===0?!0:h instanceof Set?c([...h],[...d],g,v):!1}e.isMatchWith=i,e.isSetMatch=f})(aE)),aE}var HR;function LU(){return HR||(HR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ife();function n(r,i){return t.isMatchWith(r,i,()=>{})}e.isMatch=n})(iE)),iE}var uE={},cE={},fE={},qR;function afe(){return qR||(qR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return Object.getOwnPropertySymbols(n).filter(r=>Object.prototype.propertyIsEnumerable.call(n,r))}e.getSymbols=t})(fE)),fE}var dE={},VR;function MN(){return VR||(VR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==null?n===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(n)}e.getTag=t})(dE)),dE}var hE={},KR;function zU(){return KR||(KR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t="[object RegExp]",n="[object String]",r="[object Number]",i="[object Boolean]",a="[object Arguments]",o="[object Symbol]",l="[object Date]",c="[object Map]",f="[object Set]",h="[object Array]",d="[object Function]",g="[object ArrayBuffer]",v="[object Object]",b="[object Error]",w="[object DataView]",S="[object Uint8Array]",E="[object Uint8ClampedArray]",C="[object Uint16Array]",_="[object Uint32Array]",N="[object BigUint64Array]",O="[object Int8Array]",A="[object Int16Array]",T="[object Int32Array]",P="[object BigInt64Array]",I="[object Float32Array]",z="[object Float64Array]";e.argumentsTag=a,e.arrayBufferTag=g,e.arrayTag=h,e.bigInt64ArrayTag=P,e.bigUint64ArrayTag=N,e.booleanTag=i,e.dataViewTag=w,e.dateTag=l,e.errorTag=b,e.float32ArrayTag=I,e.float64ArrayTag=z,e.functionTag=d,e.int16ArrayTag=A,e.int32ArrayTag=T,e.int8ArrayTag=O,e.mapTag=c,e.numberTag=r,e.objectTag=v,e.regexpTag=t,e.setTag=f,e.stringTag=n,e.symbolTag=o,e.uint16ArrayTag=C,e.uint32ArrayTag=_,e.uint8ArrayTag=S,e.uint8ClampedArrayTag=E})(hE)),hE}var mE={},YR;function ofe(){return YR||(YR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}e.isTypedArray=t})(mE)),mE}var XR;function $U(){return XR||(XR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=afe(),n=MN(),r=zU(),i=RU(),a=ofe();function o(h,d){return l(h,void 0,h,new Map,d)}function l(h,d,g,v=new Map,b=void 0){const w=b==null?void 0:b(h,d,g,v);if(w!==void 0)return w;if(i.isPrimitive(h))return h;if(v.has(h))return v.get(h);if(Array.isArray(h)){const S=new Array(h.length);v.set(h,S);for(let E=0;E<h.length;E++)S[E]=l(h[E],E,g,v,b);return Object.hasOwn(h,"index")&&(S.index=h.index),Object.hasOwn(h,"input")&&(S.input=h.input),S}if(h instanceof Date)return new Date(h.getTime());if(h instanceof RegExp){const S=new RegExp(h.source,h.flags);return S.lastIndex=h.lastIndex,S}if(h instanceof Map){const S=new Map;v.set(h,S);for(const[E,C]of h)S.set(E,l(C,E,g,v,b));return S}if(h instanceof Set){const S=new Set;v.set(h,S);for(const E of h)S.add(l(E,void 0,g,v,b));return S}if(typeof Buffer<"u"&&Buffer.isBuffer(h))return h.subarray();if(a.isTypedArray(h)){const S=new(Object.getPrototypeOf(h)).constructor(h.length);v.set(h,S);for(let E=0;E<h.length;E++)S[E]=l(h[E],E,g,v,b);return S}if(h instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&h instanceof SharedArrayBuffer)return h.slice(0);if(h instanceof DataView){const S=new DataView(h.buffer.slice(0),h.byteOffset,h.byteLength);return v.set(h,S),c(S,h,g,v,b),S}if(typeof File<"u"&&h instanceof File){const S=new File([h],h.name,{type:h.type});return v.set(h,S),c(S,h,g,v,b),S}if(typeof Blob<"u"&&h instanceof Blob){const S=new Blob([h],{type:h.type});return v.set(h,S),c(S,h,g,v,b),S}if(h instanceof Error){const S=structuredClone(h);return v.set(h,S),S.message=h.message,S.name=h.name,S.stack=h.stack,S.cause=h.cause,S.constructor=h.constructor,c(S,h,g,v,b),S}if(h instanceof Boolean){const S=new Boolean(h.valueOf());return v.set(h,S),c(S,h,g,v,b),S}if(h instanceof Number){const S=new Number(h.valueOf());return v.set(h,S),c(S,h,g,v,b),S}if(h instanceof String){const S=new String(h.valueOf());return v.set(h,S),c(S,h,g,v,b),S}if(typeof h=="object"&&f(h)){const S=Object.create(Object.getPrototypeOf(h));return v.set(h,S),c(S,h,g,v,b),S}return h}function c(h,d,g=h,v,b){const w=[...Object.keys(d),...t.getSymbols(d)];for(let S=0;S<w.length;S++){const E=w[S],C=Object.getOwnPropertyDescriptor(h,E);(C==null||C.writable)&&(h[E]=l(d[E],E,g,v,b))}}function f(h){switch(n.getTag(h)){case r.argumentsTag:case r.arrayTag:case r.arrayBufferTag:case r.dataViewTag:case r.booleanTag:case r.dateTag:case r.float32ArrayTag:case r.float64ArrayTag:case r.int8ArrayTag:case r.int16ArrayTag:case r.int32ArrayTag:case r.mapTag:case r.numberTag:case r.objectTag:case r.regexpTag:case r.setTag:case r.stringTag:case r.symbolTag:case r.uint8ArrayTag:case r.uint8ClampedArrayTag:case r.uint16ArrayTag:case r.uint32ArrayTag:return!0;default:return!1}}e.cloneDeepWith=o,e.cloneDeepWithImpl=l,e.copyProperties=c})(cE)),cE}var GR;function sfe(){return GR||(GR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=$U();function n(r){return t.cloneDeepWithImpl(r,void 0,r,new Map,void 0)}e.cloneDeep=n})(uE)),uE}var WR;function lfe(){return WR||(WR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=LU(),n=sfe();function r(i){return i=n.cloneDeep(i),a=>t.isMatch(a,i)}e.matches=r})(rE)),rE}var pE={},gE={},vE={},QR;function ufe(){return QR||(QR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=$U(),n=MN(),r=zU();function i(a,o){return t.cloneDeepWith(a,(l,c,f,h)=>{const d=o==null?void 0:o(l,c,f,h);if(d!==void 0)return d;if(typeof a=="object"){if(n.getTag(a)===r.objectTag&&typeof a.constructor!="function"){const g={};return h.set(a,g),t.copyProperties(g,a,f,h),g}switch(Object.prototype.toString.call(a)){case r.numberTag:case r.stringTag:case r.booleanTag:{const g=new a.constructor(a==null?void 0:a.valueOf());return t.copyProperties(g,a),g}case r.argumentsTag:{const g={};return t.copyProperties(g,a),g.length=a.length,g[Symbol.iterator]=a[Symbol.iterator],g}default:return}}})}e.cloneDeepWith=i})(vE)),vE}var ZR;function cfe(){return ZR||(ZR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ufe();function n(r){return t.cloneDeepWith(r)}e.cloneDeep=n})(gE)),gE}var yE={},xE={},JR;function BU(){return JR||(JR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=/^(?:0|[1-9]\d*)$/;function n(r,i=Number.MAX_SAFE_INTEGER){switch(typeof r){case"number":return Number.isInteger(r)&&r>=0&&r<i;case"symbol":return!1;case"string":return t.test(r)}}e.isIndex=n})(xE)),xE}var bE={},eI;function ffe(){return eI||(eI=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=MN();function n(r){return r!==null&&typeof r=="object"&&t.getTag(r)==="[object Arguments]"}e.isArguments=n})(bE)),bE}var tI;function dfe(){return tI||(tI=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=CU(),n=BU(),r=ffe(),i=AN();function a(o,l){let c;if(Array.isArray(l)?c=l:typeof l=="string"&&t.isDeepKey(l)&&(o==null?void 0:o[l])==null?c=i.toPath(l):c=[l],c.length===0)return!1;let f=o;for(let h=0;h<c.length;h++){const d=c[h];if((f==null||!Object.hasOwn(f,d))&&!((Array.isArray(f)||r.isArguments(f))&&n.isIndex(d)&&d<f.length))return!1;f=f[d]}return!0}e.has=a})(yE)),yE}var nI;function hfe(){return nI||(nI=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=LU(),n=NN(),r=cfe(),i=ON(),a=dfe();function o(l,c){switch(typeof l){case"object":{Object.is(l==null?void 0:l.valueOf(),-0)&&(l="-0");break}case"number":{l=n.toKey(l);break}}return c=r.cloneDeep(c),function(f){const h=i.get(f,l);return h===void 0?a.has(f,l):c===void 0?h===void 0:t.isMatch(h,c)}}e.matchesProperty=o})(pE)),pE}var rI;function mfe(){return rI||(rI=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=PU(),n=rfe(),r=lfe(),i=hfe();function a(o){if(o==null)return t.identity;switch(typeof o){case"function":return o;case"object":return Array.isArray(o)&&o.length===2?i.matchesProperty(o[0],o[1]):r.matches(o);case"string":case"symbol":case"number":return n.property(o)}}e.iteratee=a})(tE)),tE}var iI;function pfe(){return iI||(iI=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Zce(),n=Jce(),r=PU(),i=nfe(),a=mfe();function o(l,c=r.identity){return i.isArrayLikeObject(l)?t.uniqBy(Array.from(l),n.ary(a.iteratee(c),1)):[]}e.uniqBy=o})(YS)),YS}var wE,aI;function gfe(){return aI||(aI=1,wE=pfe().uniqBy),wE}var vfe=gfe();const oI=Hi(vfe);function FU(e,t,n){return t===!0?oI(e,n):typeof t=="function"?oI(e,t):e}var SE={exports:{}},EE={};/**
 * @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 sI;function yfe(){if(sI)return EE;sI=1;var e=Pd(),t=Tee();function n(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,a=e.useRef,o=e.useEffect,l=e.useMemo,c=e.useDebugValue;return EE.useSyncExternalStoreWithSelector=function(f,h,d,g,v){var b=a(null);if(b.current===null){var w={hasValue:!1,value:null};b.current=w}else w=b.current;b=l(function(){function E(A){if(!C){if(C=!0,_=A,A=g(A),v!==void 0&&w.hasValue){var T=w.value;if(v(T,A))return N=T}return N=A}if(T=N,r(_,A))return T;var P=g(A);return v!==void 0&&v(T,P)?(_=A,T):(_=A,N=P)}var C=!1,_,N,O=d===void 0?null:d;return[function(){return E(h())},O===null?void 0:function(){return E(O())}]},[h,d,g,v]);var S=i(f,b[0],b[1]);return o(function(){w.hasValue=!0,w.value=S},[S]),c(S),S},EE}var lI;function xfe(){return lI||(lI=1,SE.exports=yfe()),SE.exports}var UU=xfe();const bfe=Hi(UU);var DN=y.createContext(null),wfe=e=>e,tn=()=>{var e=y.useContext(DN);return e?e.store.dispatch:wfe},_y=()=>{},Sfe=()=>_y,Efe=(e,t)=>e===t;function Ie(e){var t=y.useContext(DN),n=y.useMemo(()=>t?r=>{if(r!=null)return e(r)}:_y,[t,e]);return UU.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:Sfe,t?t.store.getState:_y,t?t.store.getState:_y,n,Efe)}function jfe(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function _fe(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Cfe(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var uI=e=>Array.isArray(e)?e:[e];function kfe(e){const t=Array.isArray(e[0])?e[0]:e;return Cfe(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Nfe(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}var Afe=class{constructor(e){this.value=e}deref(){return this.value}},Ofe=typeof WeakRef<"u"?WeakRef:Afe,Tfe=0,cI=1;function Hv(){return{s:Tfe,v:void 0,o:null,p:null}}function HU(e,t={}){let n=Hv();const{resultEqualityCheck:r}=t;let i,a=0;function o(){var d;let l=n;const{length:c}=arguments;for(let g=0,v=c;g<v;g++){const b=arguments[g];if(typeof b=="function"||typeof b=="object"&&b!==null){let w=l.o;w===null&&(l.o=w=new WeakMap);const S=w.get(b);S===void 0?(l=Hv(),w.set(b,l)):l=S}else{let w=l.p;w===null&&(l.p=w=new Map);const S=w.get(b);S===void 0?(l=Hv(),w.set(b,l)):l=S}}const f=l;let h;if(l.s===cI)h=l.v;else if(h=e.apply(null,arguments),a++,r){const g=((d=i==null?void 0:i.deref)==null?void 0:d.call(i))??i;g!=null&&r(g,h)&&(h=g,a!==0&&a--),i=typeof h=="object"&&h!==null||typeof h=="function"?new Ofe(h):h}return f.s=cI,f.v=h,h}return o.clearCache=()=>{n=Hv(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function Pfe(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let a=0,o=0,l,c={},f=i.pop();typeof f=="object"&&(c=f,f=i.pop()),jfe(f,`createSelector expects an output function after the inputs, but received: [${typeof f}]`);const h={...n,...c},{memoize:d,memoizeOptions:g=[],argsMemoize:v=HU,argsMemoizeOptions:b=[]}=h,w=uI(g),S=uI(b),E=kfe(i),C=d(function(){return a++,f.apply(null,arguments)},...w),_=v(function(){o++;const O=Nfe(E,arguments);return l=C.apply(null,O),l},...S);return Object.assign(_,{resultFunc:f,memoizedResultFunc:C,dependencies:E,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>l,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:d,argsMemoize:v})};return Object.assign(r,{withTypes:()=>r}),r}var le=Pfe(HU),Mfe=Object.assign((e,t=le)=>{_fe(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(a=>e[a]);return t(r,(...a)=>a.reduce((o,l,c)=>(o[n[c]]=l,o),{}))},{withTypes:()=>Mfe}),jE={},_E={},CE={},fI;function Dfe(){return fI||(fI=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="symbol"?1:r===null?2:r===void 0?3:r!==r?4:0}const n=(r,i,a)=>{if(r!==i){const o=t(r),l=t(i);if(o===l&&o===0){if(r<i)return a==="desc"?1:-1;if(r>i)return a==="desc"?-1:1}return a==="desc"?l-o:o-l}return 0};e.compareValues=n})(CE)),CE}var kE={},NE={},dI;function qU(){return dI||(dI=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="symbol"||n instanceof Symbol}e.isSymbol=t})(NE)),NE}var hI;function Rfe(){return hI||(hI=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=qU(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(a,o){return Array.isArray(a)?!1:typeof a=="number"||typeof a=="boolean"||a==null||t.isSymbol(a)?!0:typeof a=="string"&&(r.test(a)||!n.test(a))||o!=null&&Object.hasOwn(o,a)}e.isKey=i})(kE)),kE}var mI;function Ife(){return mI||(mI=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Dfe(),n=Rfe(),r=AN();function i(a,o,l,c){if(a==null)return[];l=c?void 0:l,Array.isArray(a)||(a=Object.values(a)),Array.isArray(o)||(o=o==null?[null]:[o]),o.length===0&&(o=[null]),Array.isArray(l)||(l=l==null?[]:[l]),l=l.map(v=>String(v));const f=(v,b)=>{let w=v;for(let S=0;S<b.length&&w!=null;++S)w=w[b[S]];return w},h=(v,b)=>b==null||v==null?b:typeof v=="object"&&"key"in v?Object.hasOwn(b,v.key)?b[v.key]:f(b,v.path):typeof v=="function"?v(b):Array.isArray(v)?f(b,v):typeof b=="object"?b[v]:b,d=o.map(v=>(Array.isArray(v)&&v.length===1&&(v=v[0]),v==null||typeof v=="function"||Array.isArray(v)||n.isKey(v)?v:{key:v,path:r.toPath(v)}));return a.map(v=>({original:v,criteria:d.map(b=>h(b,v))})).slice().sort((v,b)=>{for(let w=0;w<d.length;w++){const S=t.compareValues(v.criteria[w],b.criteria[w],l[w]);if(S!==0)return S}return 0}).map(v=>v.original)}e.orderBy=i})(_E)),_E}var AE={},pI;function Lfe(){return pI||(pI=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r=1){const i=[],a=Math.floor(r),o=(l,c)=>{for(let f=0;f<l.length;f++){const h=l[f];Array.isArray(h)&&c<a?o(h,c+1):i.push(h)}};return o(n,0),i}e.flatten=t})(AE)),AE}var OE={},gI;function VU(){return gI||(gI=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=BU(),n=MU(),r=DU(),i=IU();function a(o,l,c){return r.isObject(c)&&(typeof l=="number"&&n.isArrayLike(c)&&t.isIndex(l)&&l<c.length||typeof l=="string"&&l in c)?i.isEqualsSameValueZero(c[l],o):!1}e.isIterateeCall=a})(OE)),OE}var vI;function zfe(){return vI||(vI=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Ife(),n=Lfe(),r=VU();function i(a,...o){const l=o.length;return l>1&&r.isIterateeCall(a,o[0],o[1])?o=[]:l>2&&r.isIterateeCall(o[0],o[1],o[2])&&(o=[o[0]]),t.orderBy(a,n.flatten(o),["asc"])}e.sortBy=i})(jE)),jE}var TE,yI;function $fe(){return yI||(yI=1,TE=zfe().sortBy),TE}var Bfe=$fe();const K0=Hi(Bfe);var KU=e=>e.legend.settings,Ffe=e=>e.legend.size,Ufe=e=>e.legend.payload,Hfe=le([Ufe,KU],(e,t)=>{var{itemSorter:n}=t,r=e.flat(1);return n?K0(r,n):r});function qfe(){return Ie(Hfe)}var qv=1;function YU(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[t,n]=y.useState({height:0,left:0,top:0,width:0}),r=y.useCallback(i=>{if(i!=null){var a=i.getBoundingClientRect(),o={height:a.height,left:a.left,top:a.top,width:a.width};(Math.abs(o.height-t.height)>qv||Math.abs(o.left-t.left)>qv||Math.abs(o.top-t.top)>qv||Math.abs(o.width-t.width)>qv)&&n({height:o.height,left:o.left,top:o.top,width:o.width})}},[t.width,t.height,t.top,t.left,...e]);return[t,r]}function kr(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 Vfe=typeof Symbol=="function"&&Symbol.observable||"@@observable",xI=Vfe,PE=()=>Math.random().toString(36).substring(7).split("").join("."),Kfe={INIT:`@@redux/INIT${PE()}`,REPLACE:`@@redux/REPLACE${PE()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${PE()}`},ax=Kfe;function RN(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 XU(e,t,n){if(typeof e!="function")throw new Error(kr(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(kr(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(kr(1));return n(XU)(e,t)}let r=e,i=t,a=new Map,o=a,l=0,c=!1;function f(){o===a&&(o=new Map,a.forEach((S,E)=>{o.set(E,S)}))}function h(){if(c)throw new Error(kr(3));return i}function d(S){if(typeof S!="function")throw new Error(kr(4));if(c)throw new Error(kr(5));let E=!0;f();const C=l++;return o.set(C,S),function(){if(E){if(c)throw new Error(kr(6));E=!1,f(),o.delete(C),a=null}}}function g(S){if(!RN(S))throw new Error(kr(7));if(typeof S.type>"u")throw new Error(kr(8));if(typeof S.type!="string")throw new Error(kr(17));if(c)throw new Error(kr(9));try{c=!0,i=r(i,S)}finally{c=!1}return(a=o).forEach(C=>{C()}),S}function v(S){if(typeof S!="function")throw new Error(kr(10));r=S,g({type:ax.REPLACE})}function b(){const S=d;return{subscribe(E){if(typeof E!="object"||E===null)throw new Error(kr(11));function C(){const N=E;N.next&&N.next(h())}return C(),{unsubscribe:S(C)}},[xI](){return this}}}return g({type:ax.INIT}),{dispatch:g,subscribe:d,getState:h,replaceReducer:v,[xI]:b}}function Yfe(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:ax.INIT})>"u")throw new Error(kr(12));if(typeof n(void 0,{type:ax.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(kr(13))})}function GU(e){const t=Object.keys(e),n={};for(let a=0;a<t.length;a++){const o=t[a];typeof e[o]=="function"&&(n[o]=e[o])}const r=Object.keys(n);let i;try{Yfe(n)}catch(a){i=a}return function(o={},l){if(i)throw i;let c=!1;const f={};for(let h=0;h<r.length;h++){const d=r[h],g=n[d],v=o[d],b=g(v,l);if(typeof b>"u")throw l&&l.type,new Error(kr(14));f[d]=b,c=c||b!==v}return c=c||r.length!==Object.keys(o).length,c?f:o}}function ox(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function Xfe(...e){return t=>(n,r)=>{const i=t(n,r);let a=()=>{throw new Error(kr(15))};const o={getState:i.getState,dispatch:(c,...f)=>a(c,...f)},l=e.map(c=>c(o));return a=ox(...l)(i.dispatch),{...i,dispatch:a}}}function WU(e){return RN(e)&&"type"in e&&typeof e.type=="string"}var QU=Symbol.for("immer-nothing"),bI=Symbol.for("immer-draftable"),ni=Symbol.for("immer-state");function ka(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Di=Object,pd=Di.getPrototypeOf,sx="constructor",Y0="prototype",F_="configurable",lx="enumerable",Cy="writable",Bm="value",ms=e=>!!e&&!!e[ni];function $a(e){var t;return e?ZU(e)||G0(e)||!!e[bI]||!!((t=e[sx])!=null&&t[bI])||W0(e)||Q0(e):!1}var Gfe=Di[Y0][sx].toString(),wI=new WeakMap;function ZU(e){if(!e||!IN(e))return!1;const t=pd(e);if(t===null||t===Di[Y0])return!0;const n=Di.hasOwnProperty.call(t,sx)&&t[sx];if(n===Object)return!0;if(!Rf(n))return!1;let r=wI.get(n);return r===void 0&&(r=Function.toString.call(n),wI.set(n,r)),r===Gfe}function X0(e,t,n=!0){Lp(e)===0?(n?Reflect.ownKeys(e):Di.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((r,i)=>t(i,r,e))}function Lp(e){const t=e[ni];return t?t.type_:G0(e)?1:W0(e)?2:Q0(e)?3:0}var SI=(e,t,n=Lp(e))=>n===2?e.has(t):Di[Y0].hasOwnProperty.call(e,t),U_=(e,t,n=Lp(e))=>n===2?e.get(t):e[t],ux=(e,t,n,r=Lp(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function Wfe(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var G0=Array.isArray,W0=e=>e instanceof Map,Q0=e=>e instanceof Set,IN=e=>typeof e=="object",Rf=e=>typeof e=="function",ME=e=>typeof e=="boolean";function Qfe(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var Xo=e=>e.copy_||e.base_,LN=e=>e.modified_?e.copy_:e.base_;function H_(e,t){if(W0(e))return new Map(e);if(Q0(e))return new Set(e);if(G0(e))return Array[Y0].slice.call(e);const n=ZU(e);if(t===!0||t==="class_only"&&!n){const r=Di.getOwnPropertyDescriptors(e);delete r[ni];let i=Reflect.ownKeys(r);for(let a=0;a<i.length;a++){const o=i[a],l=r[o];l[Cy]===!1&&(l[Cy]=!0,l[F_]=!0),(l.get||l.set)&&(r[o]={[F_]:!0,[Cy]:!0,[lx]:l[lx],[Bm]:e[o]})}return Di.create(pd(e),r)}else{const r=pd(e);if(r!==null&&n)return{...e};const i=Di.create(r);return Di.assign(i,e)}}function zN(e,t=!1){return Z0(e)||ms(e)||!$a(e)||(Lp(e)>1&&Di.defineProperties(e,{set:Vv,add:Vv,clear:Vv,delete:Vv}),Di.freeze(e),t&&X0(e,(n,r)=>{zN(r,!0)},!1)),e}function Zfe(){ka(2)}var Vv={[Bm]:Zfe};function Z0(e){return e===null||!IN(e)?!0:Di.isFrozen(e)}var cx="MapSet",q_="Patches",EI="ArrayMethods",JU={};function vc(e){const t=JU[e];return t||ka(0,e),t}var jI=e=>!!JU[e],Fm,eH=()=>Fm,Jfe=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:jI(cx)?vc(cx):void 0,arrayMethodsPlugin_:jI(EI)?vc(EI):void 0});function _I(e,t){t&&(e.patchPlugin_=vc(q_),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function V_(e){K_(e),e.drafts_.forEach(ede),e.drafts_=null}function K_(e){e===Fm&&(Fm=e.parent_)}var CI=e=>Fm=Jfe(Fm,e);function ede(e){const t=e[ni];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function kI(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(e!==void 0&&e!==n){n[ni].modified_&&(V_(t),ka(4)),$a(e)&&(e=NI(t,e));const{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(n[ni].base_,e,t)}else e=NI(t,n);return tde(t,e,!0),V_(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==QU?e:void 0}function NI(e,t){if(Z0(t))return t;const n=t[ni];if(!n)return fx(t,e.handledSet_,e);if(!J0(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:r}=n;if(r)for(;r.length>0;)r.pop()(e);rH(n,e)}return n.copy_}function tde(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&zN(t,n)}function tH(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var J0=(e,t)=>e.scope_===t,nde=[];function nH(e,t,n,r){const i=Xo(e),a=e.type_;if(r!==void 0&&U_(i,r,a)===t){ux(i,r,n,a);return}if(!e.draftLocations_){const l=e.draftLocations_=new Map;X0(i,(c,f)=>{if(ms(f)){const h=l.get(f)||[];h.push(c),l.set(f,h)}})}const o=e.draftLocations_.get(t)??nde;for(const l of o)ux(i,l,n,a)}function rde(e,t,n){e.callbacks_.push(function(i){var l;const a=t;if(!a||!J0(a,i))return;(l=i.mapSetPlugin_)==null||l.fixSetContents(a);const o=LN(a);nH(e,a.draft_??a,o,n),rH(a,i)})}function rH(e,t){var r;if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(((r=e.assigned_)==null?void 0:r.size)??0)>0)){const{patchPlugin_:i}=t;if(i){const a=i.getPath(e);a&&i.generatePatches_(e,a,t)}tH(e)}}function ide(e,t,n){const{scope_:r}=e;if(ms(n)){const i=n[ni];J0(i,r)&&i.callbacks_.push(function(){ky(e);const o=LN(i);nH(e,n,o,t)})}else $a(n)&&e.callbacks_.push(function(){const a=Xo(e);e.type_===3?a.has(n)&&fx(n,r.handledSet_,r):U_(a,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&fx(U_(e.copy_,t,e.type_),r.handledSet_,r)})}function fx(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||ms(e)||t.has(e)||!$a(e)||Z0(e)||(t.add(e),X0(e,(r,i)=>{if(ms(i)){const a=i[ni];if(J0(a,n)){const o=LN(a);ux(e,r,o,e.type_),tH(a)}}else $a(i)&&fx(i,t,n)})),e}function ade(e,t){const n=G0(e),r={type_:n?1:0,scope_:t?t.scope_:eH(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let i=r,a=dx;n&&(i=[r],a=Um);const{revoke:o,proxy:l}=Proxy.revocable(i,a);return r.draft_=l,r.revoke_=o,[l,r]}var dx={get(e,t){if(t===ni)return e;let n=e.scope_.arrayMethodsPlugin_;const r=e.type_===1&&typeof t=="string";if(r&&n!=null&&n.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);const i=Xo(e);if(!SI(i,t,e.type_))return ode(e,i,t);const a=i[t];if(e.finalized_||!$a(a)||r&&e.operationMethod&&(n!=null&&n.isMutatingArrayMethod(e.operationMethod))&&Qfe(t))return a;if(a===DE(e.base_,t)){ky(e);const o=e.type_===1?+t:t,l=X_(e.scope_,a,e,o);return e.copy_[o]=l}return a},has(e,t){return t in Xo(e)},ownKeys(e){return Reflect.ownKeys(Xo(e))},set(e,t,n){const r=iH(Xo(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=DE(Xo(e),t),a=i==null?void 0:i[ni];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(Wfe(n,i)&&(n!==void 0||SI(e.base_,t,e.type_)))return!0;ky(e),Y_(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),ide(e,t,n)),!0},deleteProperty(e,t){return ky(e),DE(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Y_(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Xo(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[Cy]:!0,[F_]:e.type_!==1||t!=="length",[lx]:r[lx],[Bm]:n[t]}},defineProperty(){ka(11)},getPrototypeOf(e){return pd(e.base_)},setPrototypeOf(){ka(12)}},Um={};for(let e in dx){let t=dx[e];Um[e]=function(){const n=arguments;return n[0]=n[0][0],t.apply(this,n)}}Um.deleteProperty=function(e,t){return Um.set.call(this,e,t,void 0)};Um.set=function(e,t,n){return dx.set.call(this,e[0],t,n,e[0])};function DE(e,t){const n=e[ni];return(n?Xo(n):e)[t]}function ode(e,t,n){var i;const r=iH(t,n);return r?Bm in r?r[Bm]:(i=r.get)==null?void 0:i.call(e.draft_):void 0}function iH(e,t){if(!(t in e))return;let n=pd(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=pd(n)}}function Y_(e){e.modified_||(e.modified_=!0,e.parent_&&Y_(e.parent_))}function ky(e){e.copy_||(e.assigned_=new Map,e.copy_=H_(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var sde=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(n,r,i)=>{if(Rf(n)&&!Rf(r)){const o=r;r=n;const l=this;return function(f=o,...h){return l.produce(f,d=>r.call(this,d,...h))}}Rf(r)||ka(6),i!==void 0&&!Rf(i)&&ka(7);let a;if($a(n)){const o=CI(this),l=X_(o,n,void 0);let c=!0;try{a=r(l),c=!1}finally{c?V_(o):K_(o)}return _I(o,i),kI(a,o)}else if(!n||!IN(n)){if(a=r(n),a===void 0&&(a=n),a===QU&&(a=void 0),this.autoFreeze_&&zN(a,!0),i){const o=[],l=[];vc(q_).generateReplacementPatches_(n,a,{patches_:o,inversePatches_:l}),i(o,l)}return a}else ka(1,n)},this.produceWithPatches=(n,r)=>{if(Rf(n))return(l,...c)=>this.produceWithPatches(l,f=>n(f,...c));let i,a;return[this.produce(n,r,(l,c)=>{i=l,a=c}),i,a]},ME(t==null?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),ME(t==null?void 0:t.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),ME(t==null?void 0:t.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){$a(t)||ka(8),ms(t)&&(t=sa(t));const n=CI(this),r=X_(n,t,void 0);return r[ni].isManual_=!0,K_(n),r}finishDraft(t,n){const r=t&&t[ni];(!r||!r.isManual_)&&ka(9);const{scope_:i}=r;return _I(i,n),kI(void 0,i)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,n){let r;for(r=n.length-1;r>=0;r--){const a=n[r];if(a.path.length===0&&a.op==="replace"){t=a.value;break}}r>-1&&(n=n.slice(r+1));const i=vc(q_).applyPatches_;return ms(t)?i(t,n):this.produce(t,a=>i(a,n))}};function X_(e,t,n,r){const[i,a]=W0(t)?vc(cx).proxyMap_(t,n):Q0(t)?vc(cx).proxySet_(t,n):ade(t,n);return((n==null?void 0:n.scope_)??eH()).drafts_.push(i),a.callbacks_=(n==null?void 0:n.callbacks_)??[],a.key_=r,n&&r!==void 0?rde(n,a,r):a.callbacks_.push(function(c){var h;(h=c.mapSetPlugin_)==null||h.fixSetContents(a);const{patchPlugin_:f}=c;a.modified_&&f&&f.generatePatches_(a,[],c)}),i}function sa(e){return ms(e)||ka(10,e),aH(e)}function aH(e){if(!$a(e)||Z0(e))return e;const t=e[ni];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=H_(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=H_(e,!0);return X0(n,(i,a)=>{ux(n,i,aH(a))},r),t&&(t.finalized_=!1),n}var lde=new sde,oH=lde.produce;function sH(e){return({dispatch:n,getState:r})=>i=>a=>typeof a=="function"?a(n,r,e):i(a)}var ude=sH(),cde=sH,fde=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ox:ox.apply(null,arguments)};function Bi(e,t){function n(...r){if(t){let i=t(...r);if(!i)throw new Error(Ii(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>WU(r)&&r.type===e,n}var lH=class xm extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,xm.prototype)}static get[Symbol.species](){return xm}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new xm(...t[0].concat(this)):new xm(...t.concat(this))}};function AI(e){return $a(e)?oH(e,()=>{}):e}function Kv(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function dde(e){return typeof e=="boolean"}var hde=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:a=!0}=t??{};let o=new lH;return n&&(dde(n)?o.push(ude):o.push(cde(n.extraArgument))),o},uH="RTK_autoBatch",vn=()=>e=>({payload:e,meta:{[uH]:!0}}),OI=e=>t=>{setTimeout(t,e)},cH=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,a=!1,o=!1;const l=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:OI(10):e.type==="callback"?e.queueNotification:OI(e.timeout),f=()=>{o=!1,a&&(a=!1,l.forEach(h=>h()))};return Object.assign({},r,{subscribe(h){const d=()=>i&&h(),g=r.subscribe(d);return l.add(h),()=>{g(),l.delete(h)}},dispatch(h){var d;try{return i=!((d=h==null?void 0:h.meta)!=null&&d[uH]),a=!i,a&&(o||(o=!0,c(f))),r.dispatch(h)}finally{i=!0}}})},mde=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new lH(e);return r&&i.push(cH(typeof r=="object"?r:void 0)),i};function pde(e){const t=hde(),{reducer:n=void 0,middleware:r,devTools:i=!0,preloadedState:a=void 0,enhancers:o=void 0}=e||{};let l;if(typeof n=="function")l=n;else if(RN(n))l=GU(n);else throw new Error(Ii(1));let c;typeof r=="function"?c=r(t):c=t();let f=ox;i&&(f=fde({trace:!1,...typeof i=="object"&&i}));const h=Xfe(...c),d=mde(h);let g=typeof o=="function"?o(d):d();const v=f(...g);return XU(l,a,v)}function fH(e){const t={},n=[];let r;const i={addCase(a,o){const l=typeof a=="string"?a:a.type;if(!l)throw new Error(Ii(28));if(l in t)throw new Error(Ii(29));return t[l]=o,i},addAsyncThunk(a,o){return o.pending&&(t[a.pending.type]=o.pending),o.rejected&&(t[a.rejected.type]=o.rejected),o.fulfilled&&(t[a.fulfilled.type]=o.fulfilled),o.settled&&n.push({matcher:a.settled,reducer:o.settled}),i},addMatcher(a,o){return n.push({matcher:a,reducer:o}),i},addDefaultCase(a){return r=a,i}};return e(i),[t,n,r]}function gde(e){return typeof e=="function"}function vde(e,t){let[n,r,i]=fH(t),a;if(gde(e))a=()=>AI(e());else{const l=AI(e);a=()=>l}function o(l=a(),c){let f=[n[c.type],...r.filter(({matcher:h})=>h(c)).map(({reducer:h})=>h)];return f.filter(h=>!!h).length===0&&(f=[i]),f.reduce((h,d)=>{if(d)if(ms(h)){const v=d(h,c);return v===void 0?h:v}else{if($a(h))return oH(h,g=>d(g,c));{const g=d(h,c);if(g===void 0){if(h===null)return h;throw Error("A case reducer on a non-draftable value must not return undefined")}return g}}return h},l)}return o.getInitialState=a,o}var yde="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",xde=(e=21)=>{let t="",n=e;for(;n--;)t+=yde[Math.random()*64|0];return t},bde=Symbol.for("rtk-slice-createasyncthunk");function wde(e,t){return`${e}/${t}`}function Sde({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[bde];return function(i){const{name:a,reducerPath:o=a}=i;if(!a)throw new Error(Ii(11));const l=(typeof i.reducers=="function"?i.reducers(jde()):i.reducers)||{},c=Object.keys(l),f={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},h={addCase(N,O){const A=typeof N=="string"?N:N.type;if(!A)throw new Error(Ii(12));if(A in f.sliceCaseReducersByType)throw new Error(Ii(13));return f.sliceCaseReducersByType[A]=O,h},addMatcher(N,O){return f.sliceMatchers.push({matcher:N,reducer:O}),h},exposeAction(N,O){return f.actionCreators[N]=O,h},exposeCaseReducer(N,O){return f.sliceCaseReducersByName[N]=O,h}};c.forEach(N=>{const O=l[N],A={reducerName:N,type:wde(a,N),createNotation:typeof i.reducers=="function"};Cde(O)?Nde(A,O,h,t):_de(A,O,h)});function d(){const[N={},O=[],A=void 0]=typeof i.extraReducers=="function"?fH(i.extraReducers):[i.extraReducers],T={...N,...f.sliceCaseReducersByType};return vde(i.initialState,P=>{for(let I in T)P.addCase(I,T[I]);for(let I of f.sliceMatchers)P.addMatcher(I.matcher,I.reducer);for(let I of O)P.addMatcher(I.matcher,I.reducer);A&&P.addDefaultCase(A)})}const g=N=>N,v=new Map,b=new WeakMap;let w;function S(N,O){return w||(w=d()),w(N,O)}function E(){return w||(w=d()),w.getInitialState()}function C(N,O=!1){function A(P){let I=P[N];return typeof I>"u"&&O&&(I=Kv(b,A,E)),I}function T(P=g){const I=Kv(v,O,()=>new WeakMap);return Kv(I,P,()=>{const z={};for(const[F,B]of Object.entries(i.selectors??{}))z[F]=Ede(B,P,()=>Kv(b,P,E),O);return z})}return{reducerPath:N,getSelectors:T,get selectors(){return T(A)},selectSlice:A}}const _={name:a,reducer:S,actions:f.actionCreators,caseReducers:f.sliceCaseReducersByName,getInitialState:E,...C(o),injectInto(N,{reducerPath:O,...A}={}){const T=O??o;return N.inject({reducerPath:T,reducer:S},A),{..._,...C(T,!0)}}};return _}}function Ede(e,t,n,r){function i(a,...o){let l=t(a);return typeof l>"u"&&r&&(l=n()),e(l,...o)}return i.unwrapped=e,i}var qr=Sde();function jde(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function _de({type:e,reducerName:t,createNotation:n},r,i){let a,o;if("reducer"in r){if(n&&!kde(r))throw new Error(Ii(17));a=r.reducer,o=r.prepare}else a=r;i.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,o?Bi(e,o):Bi(e))}function Cde(e){return e._reducerDefinitionType==="asyncThunk"}function kde(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Nde({type:e,reducerName:t},n,r,i){if(!i)throw new Error(Ii(18));const{payloadCreator:a,fulfilled:o,pending:l,rejected:c,settled:f,options:h}=n,d=i(e,a,h);r.exposeAction(t,d),o&&r.addCase(d.fulfilled,o),l&&r.addCase(d.pending,l),c&&r.addCase(d.rejected,c),f&&r.addMatcher(d.settled,f),r.exposeCaseReducer(t,{fulfilled:o||Yv,pending:l||Yv,rejected:c||Yv,settled:f||Yv})}function Yv(){}var Ade="task",dH="listener",hH="completed",$N="cancelled",Ode=`task-${$N}`,Tde=`task-${hH}`,G_=`${dH}-${$N}`,Pde=`${dH}-${hH}`,eb=class{constructor(e){oS(this,"name","TaskAbortError");oS(this,"message");this.code=e,this.message=`${Ade} ${$N} (reason: ${e})`}},BN=(e,t)=>{if(typeof e!="function")throw new TypeError(Ii(32))},hx=()=>{},mH=(e,t=hx)=>(e.catch(t),e),pH=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),ec=e=>{if(e.aborted)throw new eb(e.reason)};function gH(e,t){let n=hx;return new Promise((r,i)=>{const a=()=>i(new eb(e.reason));if(e.aborted){a();return}n=pH(e,a),t.finally(()=>n()).then(r,i)}).finally(()=>{n=hx})}var Mde=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(n){return{status:n instanceof eb?"cancelled":"rejected",error:n}}finally{t==null||t()}},mx=e=>t=>mH(gH(e,t).then(n=>(ec(e),n))),vH=e=>{const t=mx(e);return n=>t(new Promise(r=>setTimeout(r,n)))},{assign:Hf}=Object,TI={},tb="listenerMiddleware",Dde=(e,t)=>{const n=r=>pH(e,()=>r.abort(e.reason));return(r,i)=>{BN(r);const a=new AbortController;n(a);const o=Mde(async()=>{ec(e),ec(a.signal);const l=await r({pause:mx(a.signal),delay:vH(a.signal),signal:a.signal});return ec(a.signal),l},()=>a.abort(Tde));return i!=null&&i.autoJoin&&t.push(o.catch(hx)),{result:mx(e)(o),cancel(){a.abort(Ode)}}}},Rde=(e,t)=>{const n=async(r,i)=>{ec(t);let a=()=>{};const l=[new Promise((c,f)=>{let h=e({predicate:r,effect:(d,g)=>{g.unsubscribe(),c([d,g.getState(),g.getOriginalState()])}});a=()=>{h(),f()}})];i!=null&&l.push(new Promise(c=>setTimeout(c,i,null)));try{const c=await gH(t,Promise.race(l));return ec(t),c}finally{a()}};return(r,i)=>mH(n(r,i))},yH=e=>{let{type:t,actionCreator:n,matcher:r,predicate:i,effect:a}=e;if(t)i=Bi(t).match;else if(n)t=n.type,i=n.match;else if(r)i=r;else if(!i)throw new Error(Ii(21));return BN(a),{predicate:i,type:t,effect:a}},xH=Hf(e=>{const{type:t,predicate:n,effect:r}=yH(e);return{id:xde(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(Ii(22))}}},{withTypes:()=>xH}),PI=(e,t)=>{const{type:n,effect:r,predicate:i}=yH(t);return Array.from(e.values()).find(a=>(typeof n=="string"?a.type===n:a.predicate===i)&&a.effect===r)},W_=e=>{e.pending.forEach(t=>{t.abort(G_)})},Ide=(e,t)=>()=>{for(const n of t.keys())W_(n);e.clear()},MI=(e,t,n)=>{try{e(t,n)}catch(r){setTimeout(()=>{throw r},0)}},bH=Hf(Bi(`${tb}/add`),{withTypes:()=>bH}),Lde=Bi(`${tb}/removeAll`),wH=Hf(Bi(`${tb}/remove`),{withTypes:()=>wH}),zde=(...e)=>{console.error(`${tb}/error`,...e)},zp=(e={})=>{const t=new Map,n=new Map,r=v=>{const b=n.get(v)??0;n.set(v,b+1)},i=v=>{const b=n.get(v)??1;b===1?n.delete(v):n.set(v,b-1)},{extra:a,onError:o=zde}=e;BN(o);const l=v=>(v.unsubscribe=()=>t.delete(v.id),t.set(v.id,v),b=>{v.unsubscribe(),b!=null&&b.cancelActive&&W_(v)}),c=v=>{const b=PI(t,v)??xH(v);return l(b)};Hf(c,{withTypes:()=>c});const f=v=>{const b=PI(t,v);return b&&(b.unsubscribe(),v.cancelActive&&W_(b)),!!b};Hf(f,{withTypes:()=>f});const h=async(v,b,w,S)=>{const E=new AbortController,C=Rde(c,E.signal),_=[];try{v.pending.add(E),r(v),await Promise.resolve(v.effect(b,Hf({},w,{getOriginalState:S,condition:(N,O)=>C(N,O).then(Boolean),take:C,delay:vH(E.signal),pause:mx(E.signal),extra:a,signal:E.signal,fork:Dde(E.signal,_),unsubscribe:v.unsubscribe,subscribe:()=>{t.set(v.id,v)},cancelActiveListeners:()=>{v.pending.forEach((N,O,A)=>{N!==E&&(N.abort(G_),A.delete(N))})},cancel:()=>{E.abort(G_),v.pending.delete(E)},throwIfCancelled:()=>{ec(E.signal)}})))}catch(N){N instanceof eb||MI(o,N,{raisedBy:"effect"})}finally{await Promise.all(_),E.abort(Pde),i(v),v.pending.delete(E)}},d=Ide(t,n);return{middleware:v=>b=>w=>{if(!WU(w))return b(w);if(bH.match(w))return c(w.payload);if(Lde.match(w)){d();return}if(wH.match(w))return f(w.payload);let S=v.getState();const E=()=>{if(S===TI)throw new Error(Ii(23));return S};let C;try{if(C=b(w),t.size>0){const _=v.getState(),N=Array.from(t.values());for(const O of N){let A=!1;try{A=O.predicate(w,_,S)}catch(T){A=!1,MI(o,T,{raisedBy:"predicate"})}A&&h(O,w,v,E)}}}finally{S=TI}return C},startListening:c,stopListening:f,clearListeners:d}};function Ii(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 $de={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},SH=qr({name:"chartLayout",initialState:$de,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 n,r,i,a;e.margin.top=(n=t.payload.top)!==null&&n!==void 0?n:0,e.margin.right=(r=t.payload.right)!==null&&r!==void 0?r: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:Bde,setLayout:Fde,setChartSize:Ude,setScale:Hde}=SH.actions,qde=SH.reducer;function EH(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}function At(e){return Number.isFinite(e)}function yo(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function DI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Lf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?DI(Object(n),!0).forEach(function(r){Vde(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Vde(e,t,n){return(t=Kde(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kde(e){var t=Yde(e,"string");return typeof t=="symbol"?t:t+""}function Yde(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function en(e,t,n){return jn(e)||jn(t)?n:vo(t)?pc(e,t,n):typeof t=="function"?t(e):n}var Xde=(e,t,n)=>{if(t&&n){var{width:r,height:i}=n,{align:a,verticalAlign:o,layout:l}=t;if((l==="vertical"||l==="horizontal"&&o==="middle")&&a!=="center"&&Me(e[a]))return Lf(Lf({},e),{},{[a]:e[a]+(r||0)});if((l==="horizontal"||l==="vertical"&&a==="center")&&o!=="middle"&&Me(e[o]))return Lf(Lf({},e),{},{[o]:e[o]+(i||0)})}return e},_s=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",jH=(e,t,n,r)=>{if(r)return e.map(l=>l.coordinate);var i,a,o=e.map(l=>(l.coordinate===t&&(i=!0),l.coordinate===n&&(a=!0),l.coordinate));return i||o.push(t),a||o.push(n),o},_H=(e,t,n)=>{if(!e)return null;var{duplicateDomain:r,type:i,range:a,scale:o,realScaleType:l,isCategorical:c,categoricalDomain:f,tickCount:h,ticks:d,niceTicks:g,axisType:v}=e;if(!o)return null;var b=l==="scaleBand"&&o.bandwidth?o.bandwidth()/2:2,w=i==="category"&&o.bandwidth?o.bandwidth()/b:0;if(w=v==="angleAxis"&&a&&a.length>=2?vr(a[0]-a[1])*2*w:w,d||g){var S=(d||g||[]).map((E,C)=>{var _=r?r.indexOf(E):E,N=o.map(_);return At(N)?{coordinate:N+w,value:E,offset:w,index:C}:null}).filter(yi);return S}return c&&f?f.map((E,C)=>{var _=o.map(E);return At(_)?{coordinate:_+w,value:E,index:C,offset:w}:null}).filter(yi):o.ticks&&h!=null?o.ticks(h).map((E,C)=>{var _=o.map(E);return At(_)?{coordinate:_+w,value:E,index:C,offset:w}:null}).filter(yi):o.domain().map((E,C)=>{var _=o.map(E);return At(_)?{coordinate:_+w,value:r?r[E]:E,index:C,offset:w}:null}).filter(yi)},Gde=(e,t)=>{if(!t||t.length!==2||!Me(t[0])||!Me(t[1]))return e;var n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]),i=[e[0],e[1]];return(!Me(e[0])||e[0]<n)&&(i[0]=n),(!Me(e[1])||e[1]>r)&&(i[1]=r),i[0]>r&&(i[0]=r),i[1]<n&&(i[1]=n),i},Wde=e=>{var t,n=e.length;if(!(n<=0)){var r=(t=e[0])===null||t===void 0?void 0:t.length;if(!(r==null||r<=0))for(var i=0;i<r;++i)for(var a=0,o=0,l=0;l<n;++l){var c=e[l],f=c==null?void 0:c[i];if(f!=null){var h=f[1],d=f[0],g=go(h)?d:h;g>=0?(f[0]=a,a+=g,f[1]=a):(f[0]=o,o+=g,f[1]=o)}}}},Qde=e=>{var t,n=e.length;if(!(n<=0)){var r=(t=e[0])===null||t===void 0?void 0:t.length;if(!(r==null||r<=0))for(var i=0;i<r;++i)for(var a=0,o=0;o<n;++o){var l=e[o],c=l==null?void 0:l[i];if(c!=null){var f=go(c[1])?c[0]:c[1];f>=0?(c[0]=a,a+=f,c[1]=a):(c[0]=0,c[1]=0)}}}},Zde={sign:Wde,expand:bce,none:mc,silhouette:wce,wiggle:Sce,positive:Qde},Jde=(e,t,n)=>{var r,i=(r=Zde[n])!==null&&r!==void 0?r:mc,a=xce().keys(t).value((l,c)=>Number(en(l,c,0))).order($_).offset(i),o=a(e);return o.forEach((l,c)=>{l.forEach((f,h)=>{var d=en(e[h],t[c],0);Array.isArray(d)&&d.length===2&&Me(d[0])&&Me(d[1])&&(f[0]=d[0],f[1]=d[1])})}),o};function ehe(e){return e==null?void 0:String(e)}function RI(e){var{axis:t,ticks:n,bandSize:r,entry:i,index:a,dataKey:o}=e;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!jn(i[t.dataKey])){var l=NU(n,"value",i[t.dataKey]);if(l)return l.coordinate+r/2}return n!=null&&n[a]?n[a].coordinate+r/2:null}var c=en(i,jn(o)?t.dataKey:o),f=t.scale.map(c);return Me(f)?f:null}var II=e=>{var{axis:t,ticks:n,offset:r,bandSize:i,entry:a,index:o}=e;if(t.type==="category")return n[o]?n[o].coordinate+r:null;var l=en(a,t.dataKey,t.scale.domain()[o]);if(jn(l))return null;var c=t.scale.map(l);return Me(c)?c-i/2+r:null},the=e=>{var{numericAxis:t}=e,n=t.scale.domain();if(t.type==="number"){var r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]);return r<=0&&i>=0?0:i<0?i:r}return n[0]},nhe=e=>{var t=e.flat(2).filter(Me);return[Math.min(...t),Math.max(...t)]},rhe=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],ihe=(e,t,n)=>{if(e!=null)return rhe(Object.keys(e).reduce((r,i)=>{var a=e[i];if(!a)return r;var{stackedData:o}=a,l=o.reduce((c,f)=>{var h=EH(f,t,n),d=nhe(h);return!At(d[0])||!At(d[1])?c:[Math.min(c[0],d[0]),Math.max(c[1],d[1])]},[1/0,-1/0]);return[Math.min(l[0],r[0]),Math.max(l[1],r[1])]},[1/0,-1/0]))},LI=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,zI=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,gd=(e,t,n)=>{if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var i=K0(t,h=>h.coordinate),a=1/0,o=1,l=i.length;o<l;o++){var c=i[o],f=i[o-1];a=Math.min(((c==null?void 0:c.coordinate)||0)-((f==null?void 0:f.coordinate)||0),a)}return a===1/0?0:a}return n?void 0:0};function $I(e){var{tooltipEntrySettings:t,dataKey:n,payload:r,value:i,name:a}=e;return Lf(Lf({},t),{},{dataKey:n,payload:r,value:i,name:a})}function Fd(e,t){if(e)return String(e);if(typeof t=="string")return t}var ahe=(e,t)=>{if(t==="horizontal")return e.relativeX;if(t==="vertical")return e.relativeY},ohe=(e,t)=>t==="centric"?e.angle:e.radius,Cs=e=>e.layout.width,ks=e=>e.layout.height,she=e=>e.layout.scale,CH=e=>e.layout.margin,nb=le(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),rb=le(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),kH="data-recharts-item-index",NH="data-recharts-item-id",$p=60;function BI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Xv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?BI(Object(n),!0).forEach(function(r){lhe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lhe(e,t,n){return(t=uhe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uhe(e){var t=che(e,"string");return typeof t=="symbol"?t:t+""}function che(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var fhe=e=>e.brush.height;function dhe(e){var t=rb(e);return t.reduce((n,r)=>{if(r.orientation==="left"&&!r.mirror&&!r.hide){var i=typeof r.width=="number"?r.width:$p;return n+i}return n},0)}function hhe(e){var t=rb(e);return t.reduce((n,r)=>{if(r.orientation==="right"&&!r.mirror&&!r.hide){var i=typeof r.width=="number"?r.width:$p;return n+i}return n},0)}function mhe(e){var t=nb(e);return t.reduce((n,r)=>r.orientation==="top"&&!r.mirror&&!r.hide?n+r.height:n,0)}function phe(e){var t=nb(e);return t.reduce((n,r)=>r.orientation==="bottom"&&!r.mirror&&!r.hide?n+r.height:n,0)}var ur=le([Cs,ks,CH,fhe,dhe,hhe,mhe,phe,KU,Ffe],(e,t,n,r,i,a,o,l,c,f)=>{var h={left:(n.left||0)+i,right:(n.right||0)+a},d={top:(n.top||0)+o,bottom:(n.bottom||0)+l},g=Xv(Xv({},d),h),v=g.bottom;g.bottom+=r,g=Xde(g,c,f);var b=e-g.left-g.right,w=t-g.top-g.bottom;return Xv(Xv({brushBottom:v},g),{},{width:Math.max(b,0),height:Math.max(w,0)})}),ghe=le(ur,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),FN=le(Cs,ks,(e,t)=>({x:0,y:0,width:e,height:t})),vhe=y.createContext(null),Vr=()=>y.useContext(vhe)!=null,ib=e=>e.brush,ab=le([ib,ur,CH],(e,t,n)=>({height:e.height,x:Me(e.x)?e.x:t.left,y:Me(e.y)?e.y:t.top+t.height+t.brushBottom-((n==null?void 0:n.bottom)||0),width:Me(e.width)?e.width:t.width})),RE={},IE={},LE={},FI;function yhe(){return FI||(FI=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r,{signal:i,edges:a}={}){let o,l=null;const c=a!=null&&a.includes("leading"),f=a==null||a.includes("trailing"),h=()=>{l!==null&&(n.apply(o,l),o=void 0,l=null)},d=()=>{f&&h(),w()};let g=null;const v=()=>{g!=null&&clearTimeout(g),g=setTimeout(()=>{g=null,d()},r)},b=()=>{g!==null&&(clearTimeout(g),g=null)},w=()=>{b(),o=void 0,l=null},S=()=>{h()},E=function(...C){if(i!=null&&i.aborted)return;o=this,l=C;const _=g==null;v(),c&&_&&h()};return E.schedule=v,E.cancel=w,E.flush=S,i==null||i.addEventListener("abort",w,{once:!0}),E}e.debounce=t})(LE)),LE}var UI;function xhe(){return UI||(UI=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=yhe();function n(r,i=0,a={}){typeof a!="object"&&(a={});const{leading:o=!1,trailing:l=!0,maxWait:c}=a,f=Array(2);o&&(f[0]="leading"),l&&(f[1]="trailing");let h,d=null;const g=t.debounce(function(...w){h=r.apply(this,w),d=null},i,{edges:f}),v=function(...w){return c!=null&&(d===null&&(d=Date.now()),Date.now()-d>=c)?(h=r.apply(this,w),d=Date.now(),g.cancel(),g.schedule(),h):(g.apply(this,w),h)},b=()=>(g.flush(),h);return v.cancel=g.cancel,v.flush=b,v}e.debounce=n})(IE)),IE}var HI;function bhe(){return HI||(HI=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=xhe();function n(r,i=0,a={}){const{leading:o=!0,trailing:l=!0}=a;return t.debounce(r,i,{leading:o,maxWait:i,trailing:l})}e.throttle=n})(RE)),RE}var zE,qI;function whe(){return qI||(qI=1,zE=bhe().throttle),zE}var She=whe();const Ehe=Hi(She);var px=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),a=2;a<r;a++)i[a-2]=arguments[a];if(typeof console<"u"&&console.warn&&(n===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(n===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var o=0;console.warn(n.replace(/%s/g,()=>i[o++]))}},lo={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},AH=(e,t,n)=>{var{width:r=lo.width,height:i=lo.height,aspect:a,maxHeight:o}=n,l=gc(r)?e:Number(r),c=gc(i)?t:Number(i);return a&&a>0&&(l?c=l/a:c&&(l=c*a),o&&c!=null&&c>o&&(c=o)),{calculatedWidth:l,calculatedHeight:c}},jhe={width:0,height:0,overflow:"visible"},_he={width:0,overflowX:"visible"},Che={height:0,overflowY:"visible"},khe={},Nhe=e=>{var{width:t,height:n}=e,r=gc(t),i=gc(n);return r&&i?jhe:r?_he:i?Che:khe};function Ahe(e){var{width:t,height:n,aspect:r}=e,i=t,a=n;return i===void 0&&a===void 0?(i=lo.width,a=lo.height):i===void 0?i=r&&r>0?void 0:lo.width:a===void 0&&(a=r&&r>0?void 0:lo.height),{width:i,height:a}}function Q_(){return Q_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Q_.apply(null,arguments)}function VI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function KI(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?VI(Object(n),!0).forEach(function(r){Ohe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ohe(e,t,n){return(t=The(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function The(e){var t=Phe(e,"string");return typeof t=="symbol"?t:t+""}function Phe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var OH=y.createContext(lo.initialDimension);function Mhe(e){return yo(e.width)&&yo(e.height)}function TH(e){var{children:t,width:n,height:r}=e,i=y.useMemo(()=>({width:n,height:r}),[n,r]);return Mhe(i)?y.createElement(OH.Provider,{value:i},t):null}var UN=()=>y.useContext(OH),Dhe=y.forwardRef((e,t)=>{var{aspect:n,initialDimension:r=lo.initialDimension,width:i,height:a,minWidth:o=lo.minWidth,minHeight:l,maxHeight:c,children:f,debounce:h=lo.debounce,id:d,className:g,onResize:v,style:b={}}=e,w=y.useRef(null),S=y.useRef();S.current=v,y.useImperativeHandle(t,()=>w.current);var[E,C]=y.useState({containerWidth:r.width,containerHeight:r.height}),_=y.useCallback((P,I)=>{C(z=>{var F=Math.round(P),B=Math.round(I);return z.containerWidth===F&&z.containerHeight===B?z:{containerWidth:F,containerHeight:B}})},[]);y.useEffect(()=>{if(w.current==null||typeof ResizeObserver>"u")return eu;var P=B=>{var G,L=B[0];if(L!=null){var{width:V,height:D}=L.contentRect;_(V,D),(G=S.current)===null||G===void 0||G.call(S,V,D)}};h>0&&(P=Ehe(P,h,{trailing:!0,leading:!1}));var I=new ResizeObserver(P),{width:z,height:F}=w.current.getBoundingClientRect();return _(z,F),I.observe(w.current),()=>{I.disconnect()}},[_,h]);var{containerWidth:N,containerHeight:O}=E;px(!n||n>0,"The aspect(%s) must be greater than zero.",n);var{calculatedWidth:A,calculatedHeight:T}=AH(N,O,{width:i,height:a,aspect:n,maxHeight:c});return px(A!=null&&A>0||T!=null&&T>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.`,A,T,i,a,o,l,n),y.createElement("div",{id:d?"".concat(d):void 0,className:Pt("recharts-responsive-container",g),style:KI(KI({},b),{},{width:i,height:a,minWidth:o,minHeight:l,maxHeight:c}),ref:w},y.createElement("div",{style:Nhe({width:i,height:a})},y.createElement(TH,{width:A,height:T},f)))}),HN=y.forwardRef((e,t)=>{var n=UN();if(yo(n.width)&&yo(n.height))return e.children;var{width:r,height:i}=Ahe({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:a,calculatedHeight:o}=AH(void 0,void 0,{width:r,height:i,aspect:e.aspect,maxHeight:e.maxHeight});return Me(a)&&Me(o)?y.createElement(TH,{width:a,height:o},e.children):y.createElement(Dhe,Q_({},e,{width:r,height:i,ref:t}))});function qN(e){if(e)return{x:e.x,y:e.y,upperWidth:"upperWidth"in e?e.upperWidth:e.width,lowerWidth:"lowerWidth"in e?e.lowerWidth:e.width,width:e.width,height:e.height}}var ob=()=>{var e,t=Vr(),n=Ie(ghe),r=Ie(ab),i=(e=Ie(ib))===null||e===void 0?void 0:e.padding;return!t||!r||!i?n:{width:r.width-i.left-i.right,height:r.height-i.top-i.bottom,x:i.left,y:i.top}},Rhe={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},PH=()=>{var e;return(e=Ie(ur))!==null&&e!==void 0?e:Rhe},VN=()=>Ie(Cs),KN=()=>Ie(ks),Ihe=()=>Ie(e=>e.layout.margin),Bt=e=>e.layout.layoutType,Pc=()=>Ie(Bt),MH=()=>{var e=Pc();if(e==="horizontal"||e==="vertical")return e},DH=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t},Lhe=()=>{var e=Pc();return e!==void 0},Bp=e=>{var t=tn(),n=Vr(),{width:r,height:i}=e,a=UN(),o=r,l=i;return a&&(o=a.width>0?a.width:r,l=a.height>0?a.height:i),y.useEffect(()=>{!n&&yo(o)&&yo(l)&&t(Ude({width:o,height:l}))},[t,n,o,l]),null},RH=Symbol.for("immer-nothing"),YI=Symbol.for("immer-draftable"),Fi=Symbol.for("immer-state");function Na(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Hm=Object.getPrototypeOf;function vd(e){return!!e&&!!e[Fi]}function yc(e){var t;return e?IH(e)||Array.isArray(e)||!!e[YI]||!!((t=e.constructor)!=null&&t[YI])||Fp(e)||lb(e):!1}var zhe=Object.prototype.constructor.toString(),XI=new WeakMap;function IH(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(n===Object)return!0;if(typeof n!="function")return!1;let r=XI.get(n);return r===void 0&&(r=Function.toString.call(n),XI.set(n,r)),r===zhe}function gx(e,t,n=!0){sb(e)===0?(n?Reflect.ownKeys(e):Object.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((r,i)=>t(i,r,e))}function sb(e){const t=e[Fi];return t?t.type_:Array.isArray(e)?1:Fp(e)?2:lb(e)?3:0}function Z_(e,t){return sb(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function LH(e,t,n){const r=sb(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function $he(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Fp(e){return e instanceof Map}function lb(e){return e instanceof Set}function Mu(e){return e.copy_||e.base_}function J_(e,t){if(Fp(e))return new Map(e);if(lb(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=IH(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[Fi];let i=Reflect.ownKeys(r);for(let a=0;a<i.length;a++){const o=i[a],l=r[o];l.writable===!1&&(l.writable=!0,l.configurable=!0),(l.get||l.set)&&(r[o]={configurable:!0,writable:!0,enumerable:l.enumerable,value:e[o]})}return Object.create(Hm(e),r)}else{const r=Hm(e);if(r!==null&&n)return{...e};const i=Object.create(r);return Object.assign(i,e)}}function YN(e,t=!1){return ub(e)||vd(e)||!yc(e)||(sb(e)>1&&Object.defineProperties(e,{set:Gv,add:Gv,clear:Gv,delete:Gv}),Object.freeze(e),t&&Object.values(e).forEach(n=>YN(n,!0))),e}function Bhe(){Na(2)}var Gv={value:Bhe};function ub(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var Fhe={};function xc(e){const t=Fhe[e];return t||Na(0,e),t}var qm;function zH(){return qm}function Uhe(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function GI(e,t){t&&(xc("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function eC(e){tC(e),e.drafts_.forEach(Hhe),e.drafts_=null}function tC(e){e===qm&&(qm=e.parent_)}function WI(e){return qm=Uhe(qm,e)}function Hhe(e){const t=e[Fi];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function QI(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Fi].modified_&&(eC(t),Na(4)),yc(e)&&(e=vx(t,e),t.parent_||yx(t,e)),t.patches_&&xc("Patches").generateReplacementPatches_(n[Fi].base_,e,t.patches_,t.inversePatches_)):e=vx(t,n,[]),eC(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==RH?e:void 0}function vx(e,t,n){if(ub(t))return t;const r=e.immer_.shouldUseStrictIteration(),i=t[Fi];if(!i)return gx(t,(a,o)=>ZI(e,i,t,a,o,n),r),t;if(i.scope_!==e)return t;if(!i.modified_)return yx(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const a=i.copy_;let o=a,l=!1;i.type_===3&&(o=new Set(a),a.clear(),l=!0),gx(o,(c,f)=>ZI(e,i,a,c,f,n,l),r),yx(e,a,!1),n&&e.patches_&&xc("Patches").generatePatches_(i,n,e.patches_,e.inversePatches_)}return i.copy_}function ZI(e,t,n,r,i,a,o){if(i==null||typeof i!="object"&&!o)return;const l=ub(i);if(!(l&&!o)){if(vd(i)){const c=a&&t&&t.type_!==3&&!Z_(t.assigned_,r)?a.concat(r):void 0,f=vx(e,i,c);if(LH(n,r,f),vd(f))e.canAutoFreeze_=!1;else return}else o&&n.add(i);if(yc(i)&&!l){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[r]===i&&l)return;vx(e,i),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(Fp(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&yx(e,i)}}}function yx(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&YN(t,n)}function qhe(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:zH(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,a=XN;n&&(i=[r],a=Vm);const{revoke:o,proxy:l}=Proxy.revocable(i,a);return r.draft_=l,r.revoke_=o,l}var XN={get(e,t){if(t===Fi)return e;const n=Mu(e);if(!Z_(n,t))return Vhe(e,n,t);const r=n[t];return e.finalized_||!yc(r)?r:r===$E(e.base_,t)?(BE(e),e.copy_[t]=rC(r,e)):r},has(e,t){return t in Mu(e)},ownKeys(e){return Reflect.ownKeys(Mu(e))},set(e,t,n){const r=$H(Mu(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=$E(Mu(e),t),a=i==null?void 0:i[Fi];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if($he(n,i)&&(n!==void 0||Z_(e.base_,t)))return!0;BE(e),nC(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return $E(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,BE(e),nC(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Mu(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Na(11)},getPrototypeOf(e){return Hm(e.base_)},setPrototypeOf(){Na(12)}},Vm={};gx(XN,(e,t)=>{Vm[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Vm.deleteProperty=function(e,t){return Vm.set.call(this,e,t,void 0)};Vm.set=function(e,t,n){return XN.set.call(this,e[0],t,n,e[0])};function $E(e,t){const n=e[Fi];return(n?Mu(n):e)[t]}function Vhe(e,t,n){var i;const r=$H(t,n);return r?"value"in r?r.value:(i=r.get)==null?void 0:i.call(e.draft_):void 0}function $H(e,t){if(!(t in e))return;let n=Hm(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Hm(n)}}function nC(e){e.modified_||(e.modified_=!0,e.parent_&&nC(e.parent_))}function BE(e){e.copy_||(e.copy_=J_(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Khe=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const a=n;n=t;const o=this;return function(c=a,...f){return o.produce(c,h=>n.call(this,h,...f))}}typeof n!="function"&&Na(6),r!==void 0&&typeof r!="function"&&Na(7);let i;if(yc(t)){const a=WI(this),o=rC(t,void 0);let l=!0;try{i=n(o),l=!1}finally{l?eC(a):tC(a)}return GI(a,r),QI(i,a)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===RH&&(i=void 0),this.autoFreeze_&&YN(i,!0),r){const a=[],o=[];xc("Patches").generateReplacementPatches_(t,i,a,o),r(a,o)}return i}else Na(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(o,...l)=>this.produceWithPatches(o,c=>t(c,...l));let r,i;return[this.produce(t,n,(o,l)=>{r=o,i=l}),r,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),typeof(e==null?void 0:e.useStrictIteration)=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){yc(e)||Na(8),vd(e)&&(e=Yhe(e));const t=WI(this),n=rC(e,void 0);return n[Fi].isManual_=!0,tC(t),n}finishDraft(e,t){const n=e&&e[Fi];(!n||!n.isManual_)&&Na(9);const{scope_:r}=n;return GI(r,t),QI(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=xc("Patches").applyPatches_;return vd(e)?r(e,t):this.produce(e,i=>r(i,t))}};function rC(e,t){const n=Fp(e)?xc("MapSet").proxyMap_(e,t):lb(e)?xc("MapSet").proxySet_(e,t):qhe(e,t);return(t?t.scope_:zH()).drafts_.push(n),n}function Yhe(e){return vd(e)||Na(10,e),BH(e)}function BH(e){if(!yc(e)||ub(e))return e;const t=e[Fi];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=J_(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=J_(e,!0);return gx(n,(i,a)=>{LH(n,i,BH(a))},r),t&&(t.finalized_=!1),n}var Xhe=new Khe;Xhe.produce;var Ghe={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},FH=qr({name:"legend",initialState:Ghe,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:{reducer(e,t){e.payload.push(t.payload)},prepare:vn()},replaceLegendPayload:{reducer(e,t){var{prev:n,next:r}=t.payload,i=sa(e).payload.indexOf(n);i>-1&&(e.payload[i]=r)},prepare:vn()},removeLegendPayload:{reducer(e,t){var n=sa(e).payload.indexOf(t.payload);n>-1&&e.payload.splice(n,1)},prepare:vn()}}}),{setLegendSize:JI,setLegendSettings:Whe,addLegendPayload:UH,replaceLegendPayload:HH,removeLegendPayload:qH}=FH.actions,Qhe=FH.reducer,FE={exports:{}},UE={};/**
 * @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 eL;function Zhe(){if(eL)return UE;eL=1;var e=Pd();function t(c,f){return c===f&&(c!==0||1/c===1/f)||c!==c&&f!==f}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,i=e.useRef,a=e.useEffect,o=e.useMemo,l=e.useDebugValue;return UE.useSyncExternalStoreWithSelector=function(c,f,h,d,g){var v=i(null);if(v.current===null){var b={hasValue:!1,value:null};v.current=b}else b=v.current;v=o(function(){function S(O){if(!E){if(E=!0,C=O,O=d(O),g!==void 0&&b.hasValue){var A=b.value;if(g(A,O))return _=A}return _=O}if(A=_,n(C,O))return A;var T=d(O);return g!==void 0&&g(A,T)?(C=O,A):(C=O,_=T)}var E=!1,C,_,N=h===void 0?null:h;return[function(){return S(f())},N===null?void 0:function(){return S(N())}]},[f,h,d,g]);var w=r(c,v[0],v[1]);return a(function(){b.hasValue=!0,b.value=w},[w]),l(w),w},UE}var tL;function Jhe(){return tL||(tL=1,FE.exports=Zhe()),FE.exports}Jhe();function eme(e){e()}function tme(){let e=null,t=null;return{clear(){e=null,t=null},notify(){eme(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const i=t={callback:n,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!r||e===null||(r=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var nL={notify(){},get:()=>[]};function nme(e,t){let n,r=nL,i=0,a=!1;function o(w){h();const S=r.subscribe(w);let E=!1;return()=>{E||(E=!0,S(),d())}}function l(){r.notify()}function c(){b.onStateChange&&b.onStateChange()}function f(){return a}function h(){i++,n||(n=e.subscribe(c),r=tme())}function d(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=nL)}function g(){a||(a=!0,h())}function v(){a&&(a=!1,d())}const b={addNestedSub:o,notifyNestedSubs:l,handleChangeWrapper:c,isSubscribed:f,trySubscribe:g,tryUnsubscribe:v,getListeners:()=>r};return b}var rme=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ime=rme(),ame=()=>typeof navigator<"u"&&navigator.product==="ReactNative",ome=ame(),sme=()=>ime||ome?y.useLayoutEffect:y.useEffect,lme=sme();function rL(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function ume(e,t){if(rL(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(t,n[i])||!rL(e[n[i]],t[n[i]]))return!1;return!0}var HE=Symbol.for("react-redux-context"),qE=typeof globalThis<"u"?globalThis:{};function cme(){if(!y.createContext)return{};const e=qE[HE]??(qE[HE]=new Map);let t=e.get(y.createContext);return t||(t=y.createContext(null),e.set(y.createContext,t)),t}var fme=cme();function dme(e){const{children:t,context:n,serverState:r,store:i}=e,a=y.useMemo(()=>{const c=nme(i);return{store:i,subscription:c,getServerState:r?()=>r:void 0}},[i,r]),o=y.useMemo(()=>i.getState(),[i]);lme(()=>{const{subscription:c}=a;return c.onStateChange=c.notifyNestedSubs,c.trySubscribe(),o!==i.getState()&&c.notifyNestedSubs(),()=>{c.tryUnsubscribe(),c.onStateChange=void 0}},[a,o]);const l=n||fme;return y.createElement(l.Provider,{value:a},t)}var hme=dme,mme=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function pme(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function Ud(e,t){var n=new Set([...Object.keys(e),...Object.keys(t)]);for(var r of n)if(mme.has(r)){if(e[r]==null&&t[r]==null)continue;if(!ume(e[r],t[r]))return!1}else if(!pme(e[r],t[r]))return!1;return!0}var gme=["contextPayload"];function iC(){return iC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},iC.apply(null,arguments)}function iL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function yd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?iL(Object(n),!0).forEach(function(r){vme(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function vme(e,t,n){return(t=yme(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yme(e){var t=xme(e,"string");return typeof t=="symbol"?t:t+""}function xme(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function bme(e,t){if(e==null)return{};var n,r,i=wme(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function wme(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Sme(e){return e.value}function Eme(e){var{contextPayload:t}=e,n=bme(e,gme),r=FU(t,e.payloadUniqBy,Sme),i=yd(yd({},n),{},{payload:r});return y.isValidElement(e.content)?y.cloneElement(e.content,i):typeof e.content=="function"?y.createElement(e.content,i):y.createElement(Qce,i)}function jme(e,t,n,r,i,a){var{layout:o,align:l,verticalAlign:c}=t,f,h;return(!e||(e.left===void 0||e.left===null)&&(e.right===void 0||e.right===null))&&(l==="center"&&o==="vertical"?f={left:((r||0)-a.width)/2}:f=l==="right"?{right:n&&n.right||0}:{left:n&&n.left||0}),(!e||(e.top===void 0||e.top===null)&&(e.bottom===void 0||e.bottom===null))&&(c==="middle"?h={top:((i||0)-a.height)/2}:h=c==="bottom"?{bottom:n&&n.bottom||0}:{top:n&&n.top||0}),yd(yd({},f),h)}function _me(e){var t=tn();return y.useEffect(()=>{t(Whe(e))},[t,e]),null}function Cme(e){var t=tn();return y.useEffect(()=>(t(JI(e)),()=>{t(JI({width:0,height:0}))}),[t,e]),null}function kme(e,t,n,r){return e==="vertical"&&t!=null?{height:t}:e==="horizontal"?{width:n||r}:null}var Nme={align:"center",iconSize:14,inactiveColor:"#ccc",itemSorter:"value",layout:"horizontal",verticalAlign:"bottom"};function Ame(e){var t=Qn(e,Nme),n=qfe(),r=Hue(),i=Ihe(),{width:a,height:o,wrapperStyle:l,portal:c}=t,[f,h]=YU([n]),d=VN(),g=KN();if(d==null||g==null)return null;var v=d-((i==null?void 0:i.left)||0)-((i==null?void 0:i.right)||0),b=kme(t.layout,o,a,v),w=c?l:yd(yd({position:"absolute",width:(b==null?void 0:b.width)||a||"auto",height:(b==null?void 0:b.height)||o||"auto"},jme(l,t,i,d,g,f)),l),S=c??r;if(S==null||n==null)return null;var E=y.createElement("div",{className:"recharts-legend-wrapper",style:w,ref:h},y.createElement(_me,{layout:t.layout,align:t.align,verticalAlign:t.verticalAlign,itemSorter:t.itemSorter}),!c&&y.createElement(Cme,{width:f.width,height:f.height}),y.createElement(Eme,iC({},t,b,{margin:i,chartWidth:d,chartHeight:g,contextPayload:n})));return Wl.createPortal(E,S)}var VH=y.memo(Ame,Ud);VH.displayName="Legend";function aC(){return aC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},aC.apply(null,arguments)}function aL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Zh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?aL(Object(n),!0).forEach(function(r){Ome(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ome(e,t,n){return(t=Tme(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tme(e){var t=Pme(e,"string");return typeof t=="symbol"?t:t+""}function Pme(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Mme(e){return Array.isArray(e)&&vo(e[0])&&vo(e[1])?e.join(" ~ "):e}var Sf={separator:" : ",contentStyle:{margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},itemStyle:{display:"block",paddingTop:4,paddingBottom:4,color:"#000"},labelStyle:{},accessibilityLayer:!1};function Dme(e,t){return t==null?e:K0(e,t)}var Rme=e=>{var{separator:t=Sf.separator,contentStyle:n,itemStyle:r,labelStyle:i=Sf.labelStyle,payload:a,formatter:o,itemSorter:l,wrapperClassName:c,labelClassName:f,label:h,labelFormatter:d,accessibilityLayer:g=Sf.accessibilityLayer}=e,v=()=>{if(a&&a.length){var O={padding:0,margin:0},A=Dme(a,l),T=A.map((P,I)=>{if(P.type==="none")return null;var z=P.formatter||o||Mme,{value:F,name:B}=P,G=F,L=B;if(z){var V=z(F,B,P,I,a);if(Array.isArray(V))[G,L]=V;else if(V!=null)G=V;else return null}var D=Zh(Zh({},Sf.itemStyle),{},{color:P.color||Sf.itemStyle.color},r);return y.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(I),style:D},vo(L)?y.createElement("span",{className:"recharts-tooltip-item-name"},L):null,vo(L)?y.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,y.createElement("span",{className:"recharts-tooltip-item-value"},G),y.createElement("span",{className:"recharts-tooltip-item-unit"},P.unit||""))});return y.createElement("ul",{className:"recharts-tooltip-item-list",style:O},T)}return null},b=Zh(Zh({},Sf.contentStyle),n),w=Zh({margin:0},i),S=!jn(h),E=S?h:"",C=Pt("recharts-default-tooltip",c),_=Pt("recharts-tooltip-label",f);S&&d&&a!==void 0&&a!==null&&(E=d(h,a));var N=g?{role:"status","aria-live":"assertive"}:{};return y.createElement("div",aC({className:C,style:b},N),y.createElement("p",{className:_,style:w},y.isValidElement(E)?E:"".concat(E)),v())},Jh="recharts-tooltip-wrapper",Ime={visibility:"hidden"};function Lme(e){var{coordinate:t,translateX:n,translateY:r}=e;return Pt(Jh,{["".concat(Jh,"-right")]:Me(n)&&t&&Me(t.x)&&n>=t.x,["".concat(Jh,"-left")]:Me(n)&&t&&Me(t.x)&&n<t.x,["".concat(Jh,"-bottom")]:Me(r)&&t&&Me(t.y)&&r>=t.y,["".concat(Jh,"-top")]:Me(r)&&t&&Me(t.y)&&r<t.y})}function oL(e){var{allowEscapeViewBox:t,coordinate:n,key:r,offset:i,position:a,reverseDirection:o,tooltipDimension:l,viewBox:c,viewBoxDimension:f}=e;if(a&&Me(a[r]))return a[r];var h=n[r]-l-(i>0?i:0),d=n[r]+i;if(t[r])return o[r]?h:d;var g=c[r];if(g==null)return 0;if(o[r]){var v=h,b=g;return v<b?Math.max(d,g):Math.max(h,g)}if(f==null)return 0;var w=d+l,S=g+f;return w>S?Math.max(h,g):Math.max(d,g)}function zme(e){var{translateX:t,translateY:n,useTranslate3d:r}=e;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function $me(e){var{allowEscapeViewBox:t,coordinate:n,offsetTop:r,offsetLeft:i,position:a,reverseDirection:o,tooltipBox:l,useTranslate3d:c,viewBox:f}=e,h,d,g;return l.height>0&&l.width>0&&n?(d=oL({allowEscapeViewBox:t,coordinate:n,key:"x",offset:i,position:a,reverseDirection:o,tooltipDimension:l.width,viewBox:f,viewBoxDimension:f.width}),g=oL({allowEscapeViewBox:t,coordinate:n,key:"y",offset:r,position:a,reverseDirection:o,tooltipDimension:l.height,viewBox:f,viewBoxDimension:f.height}),h=zme({translateX:d,translateY:g,useTranslate3d:c})):h=Ime,{cssProperties:h,cssClasses:Lme({translateX:d,translateY:g,coordinate:n})}}var Bme=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),Up={isSsr:Bme()};function KH(){var[e,t]=y.useState(()=>Up.isSsr||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches);return y.useEffect(()=>{if(window.matchMedia){var n=window.matchMedia("(prefers-reduced-motion: reduce)"),r=()=>{t(n.matches)};return n.addEventListener("change",r),()=>{n.removeEventListener("change",r)}}},[]),e}function sL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ef(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?sL(Object(n),!0).forEach(function(r){Fme(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Fme(e,t,n){return(t=Ume(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ume(e){var t=Hme(e,"string");return typeof t=="symbol"?t:t+""}function Hme(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function qme(e){if(!(e.prefersReducedMotion&&e.isAnimationActive==="auto")&&e.isAnimationActive&&e.active)return"transform ".concat(e.animationDuration,"ms ").concat(e.animationEasing)}function Vme(e){var t,n,r,i,a,o,l=KH(),[c,f]=y.useState(()=>({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}));y.useEffect(()=>{var b=w=>{if(w.key==="Escape"){var S,E,C,_;f({dismissed:!0,dismissedAtCoordinate:{x:(S=(E=e.coordinate)===null||E===void 0?void 0:E.x)!==null&&S!==void 0?S:0,y:(C=(_=e.coordinate)===null||_===void 0?void 0:_.y)!==null&&C!==void 0?C:0}})}};return document.addEventListener("keydown",b),()=>{document.removeEventListener("keydown",b)}},[(t=e.coordinate)===null||t===void 0?void 0:t.x,(n=e.coordinate)===null||n===void 0?void 0:n.y]),c.dismissed&&(((r=(i=e.coordinate)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)!==c.dismissedAtCoordinate.x||((a=(o=e.coordinate)===null||o===void 0?void 0:o.y)!==null&&a!==void 0?a:0)!==c.dismissedAtCoordinate.y)&&f(Ef(Ef({},c),{},{dismissed:!1}));var{cssClasses:h,cssProperties:d}=$me({allowEscapeViewBox:e.allowEscapeViewBox,coordinate:e.coordinate,offsetLeft:typeof e.offset=="number"?e.offset:e.offset.x,offsetTop:typeof e.offset=="number"?e.offset:e.offset.y,position:e.position,reverseDirection:e.reverseDirection,tooltipBox:{height:e.lastBoundingBox.height,width:e.lastBoundingBox.width},useTranslate3d:e.useTranslate3d,viewBox:e.viewBox}),g=e.hasPortalFromProps?{}:Ef(Ef({transition:qme({prefersReducedMotion:l,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},d),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),v=Ef(Ef({},g),{},{visibility:!c.dismissed&&e.active&&e.hasPayload?"visible":"hidden"},e.wrapperStyle);return y.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:h,style:v,ref:e.innerRef},e.children)}var Kme=y.memo(Vme),YH=()=>{var e;return(e=Ie(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function oC(){return oC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},oC.apply(null,arguments)}function lL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function uL(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lL(Object(n),!0).forEach(function(r){Yme(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Yme(e,t,n){return(t=Xme(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xme(e){var t=Gme(e,"string");return typeof t=="symbol"?t:t+""}function Gme(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var cL={curveBasisClosed:lce,curveBasisOpen:uce,curveBasis:sce,curveBumpX:Yue,curveBumpY:Xue,curveLinearClosed:cce,curveLinear:q0,curveMonotoneX:fce,curveMonotoneY:dce,curveNatural:hce,curveStep:mce,curveStepAfter:gce,curveStepBefore:pce},xx=e=>At(e.x)&&At(e.y),fL=e=>e.base!=null&&xx(e.base)&&xx(e),em=e=>e.x,tm=e=>e.y,Wme=(e,t)=>{if(typeof e=="function")return e;var n="curve".concat(Rp(e));if((n==="curveMonotone"||n==="curveBump")&&t){var r=cL["".concat(n).concat(t==="vertical"?"Y":"X")];if(r)return r}return cL[n]||q0},dL={connectNulls:!1,type:"linear"},Qme=e=>{var{type:t=dL.type,points:n=[],baseLine:r,layout:i,connectNulls:a=dL.connectNulls}=e,o=Wme(t,i),l=a?n.filter(xx):n;if(Array.isArray(r)){var c,f=n.map((b,w)=>uL(uL({},b),{},{base:r[w]}));i==="vertical"?c=Uv().y(tm).x1(em).x0(b=>b.base.x):c=Uv().x(em).y1(tm).y0(b=>b.base.y);var h=c.defined(fL).curve(o),d=a?f.filter(fL):f;return h(d)}var g;i==="vertical"&&Me(r)?g=Uv().y(tm).x1(em).x0(r):Me(r)?g=Uv().x(em).y1(tm).y0(r):g=pU().x(em).y(tm);var v=g.defined(xx).curve(o);return v(l)},GN=e=>{var{className:t,points:n,path:r,pathRef:i}=e,a=Pc();if((!n||!n.length)&&!r)return null;var o={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||a,connectNulls:e.connectNulls},l=n&&n.length?Qme(o):r;return y.createElement("path",oC({},$i(e),PN(e),{className:Pt("recharts-curve",t),d:l===null?void 0:l,ref:i}))},Zme=["x","y","top","left","width","height","className"];function sC(){return sC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sC.apply(null,arguments)}function hL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Jme(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?hL(Object(n),!0).forEach(function(r){epe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function epe(e,t,n){return(t=tpe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tpe(e){var t=npe(e,"string");return typeof t=="symbol"?t:t+""}function npe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function rpe(e,t){if(e==null)return{};var n,r,i=ipe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function ipe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var ape=(e,t,n,r,i,a)=>"M".concat(e,",").concat(i,"v").concat(r,"M").concat(a,",").concat(t,"h").concat(n),ope=e=>{var{x:t=0,y:n=0,top:r=0,left:i=0,width:a=0,height:o=0,className:l}=e,c=rpe(e,Zme),f=Jme({x:t,y:n,top:r,left:i,width:a,height:o},c);return!Me(t)||!Me(n)||!Me(a)||!Me(o)||!Me(r)||!Me(i)?null:y.createElement("path",sC({},ti(f),{className:Pt("recharts-cross",l),d:ape(t,n,a,o,r,i)}))};function spe(e,t,n,r){var i=r/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-i,width:e==="horizontal"?r:n.width-1,height:e==="horizontal"?n.height-1:r}}function mL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function pL(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?mL(Object(n),!0).forEach(function(r){lpe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lpe(e,t,n){return(t=upe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function upe(e){var t=cpe(e,"string");return typeof t=="symbol"?t:t+""}function cpe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var fpe=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),XH=(e,t,n)=>e.map(r=>"".concat(fpe(r)," ").concat(t,"ms ").concat(n)).join(","),dpe=(e,t)=>[Object.keys(e),Object.keys(t)].reduce((n,r)=>n.filter(i=>r.includes(i))),Km=(e,t)=>Object.keys(t).reduce((n,r)=>pL(pL({},n),{},{[r]:e(r,t[r])}),{});function gL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ir(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?gL(Object(n),!0).forEach(function(r){hpe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function hpe(e,t,n){return(t=mpe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mpe(e){var t=ppe(e,"string");return typeof t=="symbol"?t:t+""}function ppe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var bx=(e,t,n)=>e+(t-e)*n,lC=e=>{var{from:t,to:n}=e;return t!==n},GH=(e,t,n)=>{var r=Km((i,a)=>{if(lC(a)){var[o,l]=e(a.from,a.to,a.velocity);return ir(ir({},a),{},{from:o,velocity:l})}return a},t);return n<1?Km((i,a)=>lC(a)&&r[i]!=null?ir(ir({},a),{},{velocity:bx(a.velocity,r[i].velocity,n),from:bx(a.from,r[i].from,n)}):a,t):GH(e,r,n-1)};function gpe(e,t,n,r,i,a){var o,l=r.reduce((g,v)=>ir(ir({},g),{},{[v]:{from:e[v],velocity:0,to:t[v]}}),{}),c=()=>Km((g,v)=>v.from,l),f=()=>!Object.values(l).filter(lC).length,h=null,d=g=>{o||(o=g);var v=g-o,b=v/n.dt;l=GH(n,l,b),i(ir(ir(ir({},e),t),c())),o=g,f()||(h=a.setTimeout(d))};return()=>(h=a.setTimeout(d),()=>{var g;(g=h)===null||g===void 0||g()})}function vpe(e,t,n,r,i,a,o){var l=null,c=i.reduce((d,g)=>{var v=e[g],b=t[g];return v==null||b==null?d:ir(ir({},d),{},{[g]:[v,b]})},{}),f,h=d=>{f||(f=d);var g=(d-f)/r,v=Km((w,S)=>bx(...S,n(g)),c);if(a(ir(ir(ir({},e),t),v)),g<1)l=o.setTimeout(h);else{var b=Km((w,S)=>bx(...S,n(1)),c);a(ir(ir(ir({},e),t),b))}};return()=>(l=o.setTimeout(h),()=>{var d;(d=l)===null||d===void 0||d()})}const ype=(e,t,n,r,i,a)=>{var o=dpe(e,t);return n==null?()=>(i(ir(ir({},e),t)),()=>{}):n.isStepper===!0?gpe(e,t,n,o,i,a):vpe(e,t,n,r,o,i,a)};var wx=1e-4,WH=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],QH=(e,t)=>e.map((n,r)=>n*t**r).reduce((n,r)=>n+r),vL=(e,t)=>n=>{var r=WH(e,t);return QH(r,n)},xpe=(e,t)=>n=>{var r=WH(e,t),i=[...r.map((a,o)=>a*o).slice(1),0];return QH(i,n)},bpe=e=>{var t,n=e.split("(");if(n.length!==2||n[0]!=="cubic-bezier")return null;var r=(t=n[1])===null||t===void 0||(t=t.split(")")[0])===null||t===void 0?void 0:t.split(",");if(r==null||r.length!==4)return null;var i=r.map(a=>parseFloat(a));return[i[0],i[1],i[2],i[3]]},wpe=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(n.length===1)switch(n[0]){case"linear":return[0,0,1,1];case"ease":return[.25,.1,.25,1];case"ease-in":return[.42,0,1,1];case"ease-out":return[.42,0,.58,1];case"ease-in-out":return[0,0,.58,1];default:{var i=bpe(n[0]);if(i)return i}}return n.length===4?n:[0,0,1,1]},Spe=(e,t,n,r)=>{var i=vL(e,n),a=vL(t,r),o=xpe(e,n),l=f=>f>1?1:f<0?0:f,c=f=>{for(var h=f>1?1:f,d=h,g=0;g<8;++g){var v=i(d)-h,b=o(d);if(Math.abs(v-h)<wx||b<wx)return a(d);d=l(d-v/b)}return a(d)};return c.isStepper=!1,c},yL=function(){return Spe(...wpe(...arguments))},Epe=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{stiff:n=100,damping:r=8,dt:i=17}=t,a=(o,l,c)=>{var f=-(o-l)*n,h=c*r,d=c+(f-h)*i/1e3,g=c*i/1e3+o;return Math.abs(g-l)<wx&&Math.abs(d)<wx?[l,0]:[g,d]};return a.isStepper=!0,a.dt=i,a},jpe=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return yL(e);case"spring":return Epe();default:if(e.split("(")[0]==="cubic-bezier")return yL(e)}return typeof e=="function"?e:null};function _pe(e){var t,n=()=>null,r=!1,i=null,a=o=>{if(!r){if(Array.isArray(o)){if(!o.length)return;var l=o,[c,...f]=l;if(typeof c=="number"){i=e.setTimeout(a.bind(null,f),c);return}a(c),i=e.setTimeout(a.bind(null,f));return}typeof o=="string"&&(t=o,n(t)),typeof o=="object"&&(t=o,n(t)),typeof o=="function"&&o()}};return{stop:()=>{r=!0},start:o=>{r=!1,i&&(i(),i=null),a(o)},subscribe:o=>(n=o,()=>{n=()=>null}),getTimeoutController:()=>e}}class Cpe{setTimeout(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=performance.now(),i=null,a=o=>{o-r>=n?t(o):typeof requestAnimationFrame=="function"&&(i=requestAnimationFrame(a))};return i=requestAnimationFrame(a),()=>{i!=null&&cancelAnimationFrame(i)}}}function kpe(){return _pe(new Cpe)}var Npe=y.createContext(kpe);function Ape(e,t){var n=y.useContext(Npe);return y.useMemo(()=>t??n(e),[e,t,n])}var Ope={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},xL={t:0},VE={t:1};function Hp(e){var t=Qn(e,Ope),{isActive:n,canBegin:r,duration:i,easing:a,begin:o,onAnimationEnd:l,onAnimationStart:c,children:f}=t,h=KH(),d=n==="auto"?!Up.isSsr&&!h:n,g=Ape(t.animationId,t.animationManager),[v,b]=y.useState(d?xL:VE),w=y.useRef(null);return y.useEffect(()=>{d||b(VE)},[d]),y.useEffect(()=>{if(!d||!r)return eu;var S=ype(xL,VE,jpe(a),i,b,g.getTimeoutController()),E=()=>{w.current=S()};return g.start([c,o,E,i,l]),()=>{g.stop(),w.current&&w.current(),l()}},[d,r,i,a,o,c,l,g]),f(v.t)}function qp(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",n=y.useRef($m(t)),r=y.useRef(e);return r.current!==e&&(n.current=$m(t),r.current=e),n.current}var Tpe=["radius"],Ppe=["radius"],bL,wL,SL,EL,jL,_L,CL,kL,NL,AL;function OL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function TL(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?OL(Object(n),!0).forEach(function(r){Mpe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Mpe(e,t,n){return(t=Dpe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dpe(e){var t=Rpe(e,"string");return typeof t=="symbol"?t:t+""}function Rpe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Sx(){return Sx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sx.apply(null,arguments)}function PL(e,t){if(e==null)return{};var n,r,i=Ipe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Ipe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Za(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var ML=(e,t,n,r,i)=>{var a=Rl(n),o=Rl(r),l=Math.min(Math.abs(a)/2,Math.abs(o)/2),c=o>=0?1:-1,f=a>=0?1:-1,h=o>=0&&a>=0||o<0&&a<0?1:0,d;if(l>0&&Array.isArray(i)){for(var g=[0,0,0,0],v=0,b=4;v<b;v++){var w,S=(w=i[v])!==null&&w!==void 0?w:0;g[v]=S>l?l:S}d=Mn(bL||(bL=Za(["M",",",""])),e,t+c*g[0]),g[0]>0&&(d+=Mn(wL||(wL=Za(["A ",",",",0,0,",",",",",""])),g[0],g[0],h,e+f*g[0],t)),d+=Mn(SL||(SL=Za(["L ",",",""])),e+n-f*g[1],t),g[1]>0&&(d+=Mn(EL||(EL=Za(["A ",",",",0,0,",`,
        `,",",""])),g[1],g[1],h,e+n,t+c*g[1])),d+=Mn(jL||(jL=Za(["L ",",",""])),e+n,t+r-c*g[2]),g[2]>0&&(d+=Mn(_L||(_L=Za(["A ",",",",0,0,",`,
        `,",",""])),g[2],g[2],h,e+n-f*g[2],t+r)),d+=Mn(CL||(CL=Za(["L ",",",""])),e+f*g[3],t+r),g[3]>0&&(d+=Mn(kL||(kL=Za(["A ",",",",0,0,",`,
        `,",",""])),g[3],g[3],h,e,t+r-c*g[3])),d+="Z"}else if(l>0&&i===+i&&i>0){var E=Math.min(l,i);d=Mn(NL||(NL=Za(["M ",",",`
            A `,",",",0,0,",",",",",`
            L `,",",`
            A `,",",",0,0,",",",",",`
            L `,",",`
            A `,",",",0,0,",",",",",`
            L `,",",`
            A `,",",",0,0,",",",","," Z"])),e,t+c*E,E,E,h,e+f*E,t,e+n-f*E,t,E,E,h,e+n,t+c*E,e+n,t+r-c*E,E,E,h,e+n-f*E,t+r,e+f*E,t+r,E,E,h,e,t+r-c*E)}else d=Mn(AL||(AL=Za(["M ",","," h "," v "," h "," Z"])),e,t,n,r,-n);return d},DL={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},ZH=e=>{var t=Qn(e,DL),n=y.useRef(null),[r,i]=y.useState(-1);y.useEffect(()=>{if(n.current&&n.current.getTotalLength)try{var q=n.current.getTotalLength();q&&i(q)}catch{}},[]);var{x:a,y:o,width:l,height:c,radius:f,className:h}=t,{animationEasing:d,animationDuration:g,animationBegin:v,isAnimationActive:b,isUpdateAnimationActive:w}=t,S=y.useRef(l),E=y.useRef(c),C=y.useRef(a),_=y.useRef(o),N=y.useMemo(()=>({x:a,y:o,width:l,height:c,radius:f}),[a,o,l,c,f]),O=qp(N,"rectangle-");if(a!==+a||o!==+o||l!==+l||c!==+c||l===0||c===0)return null;var A=Pt("recharts-rectangle",h);if(!w){var T=ti(t),{radius:P}=T,I=PL(T,Tpe);return y.createElement("path",Sx({},I,{x:Rl(a),y:Rl(o),width:Rl(l),height:Rl(c),radius:typeof f=="number"?f:void 0,className:A,d:ML(a,o,l,c,f)}))}var z=S.current,F=E.current,B=C.current,G=_.current,L="0px ".concat(r===-1?1:r,"px"),V="".concat(r,"px ").concat(r,"px"),D=XH(["strokeDasharray"],g,typeof d=="string"?d:DL.animationEasing);return y.createElement(Hp,{animationId:O,key:O,canBegin:r>0,duration:g,easing:d,isActive:w,begin:v},q=>{var X=wn(z,l,q),K=wn(F,c,q),R=wn(B,a,q),H=wn(G,o,q);n.current&&(S.current=X,E.current=K,C.current=R,_.current=H);var U;b?q>0?U={transition:D,strokeDasharray:V}:U={strokeDasharray:L}:U={strokeDasharray:V};var $=ti(t),{radius:Q}=$,J=PL($,Ppe);return y.createElement("path",Sx({},J,{radius:typeof f=="number"?f:void 0,className:A,d:ML(R,H,X,K,f),ref:n,style:TL(TL({},U),t.style)}))})};function RL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function IL(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?RL(Object(n),!0).forEach(function(r){Lpe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Lpe(e,t,n){return(t=zpe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zpe(e){var t=$pe(e,"string");return typeof t=="symbol"?t:t+""}function $pe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ex=Math.PI/180,Bpe=e=>e*180/Math.PI,Yn=(e,t,n,r)=>({x:e+Math.cos(-Ex*r)*n,y:t+Math.sin(-Ex*r)*n}),JH=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(r.left||0)-(r.right||0)),Math.abs(n-(r.top||0)-(r.bottom||0)))/2},Fpe=(e,t)=>{var{x:n,y:r}=e,{x:i,y:a}=t;return Math.sqrt((n-i)**2+(r-a)**2)},Upe=(e,t)=>{var{x:n,y:r}=e,{cx:i,cy:a}=t,o=Fpe({x:n,y:r},{x:i,y:a});if(o<=0)return{radius:o,angle:0};var l=(n-i)/o,c=Math.acos(l);return r>a&&(c=2*Math.PI-c),{radius:o,angle:Bpe(c),angleInRadian:c}},Hpe=e=>{var{startAngle:t,endAngle:n}=e,r=Math.floor(t/360),i=Math.floor(n/360),a=Math.min(r,i);return{startAngle:t-a*360,endAngle:n-a*360}},qpe=(e,t)=>{var{startAngle:n,endAngle:r}=t,i=Math.floor(n/360),a=Math.floor(r/360),o=Math.min(i,a);return e+o*360},Vpe=(e,t)=>{var{relativeX:n,relativeY:r}=e,{radius:i,angle:a}=Upe({x:n,y:r},t),{innerRadius:o,outerRadius:l}=t;if(i<o||i>l||i===0)return null;var{startAngle:c,endAngle:f}=Hpe(t),h=a,d;if(c<=f){for(;h>f;)h-=360;for(;h<c;)h+=360;d=h>=c&&h<=f}else{for(;h>c;)h-=360;for(;h<f;)h+=360;d=h>=f&&h<=c}return d?IL(IL({},t),{},{radius:i,angle:qpe(h,t)}):null};function eq(e){var{cx:t,cy:n,radius:r,startAngle:i,endAngle:a}=e,o=Yn(t,n,r,i),l=Yn(t,n,r,a);return{points:[o,l],cx:t,cy:n,radius:r,startAngle:i,endAngle:a}}var LL,zL,$L,BL,FL,UL,HL;function uC(){return uC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},uC.apply(null,arguments)}function Bu(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Kpe=(e,t)=>{var n=vr(t-e),r=Math.min(Math.abs(t-e),359.999);return n*r},Wv=e=>{var{cx:t,cy:n,radius:r,angle:i,sign:a,isExternal:o,cornerRadius:l,cornerIsExternal:c}=e,f=l*(o?1:-1)+r,h=Math.asin(l/f)/Ex,d=c?i:i+a*h,g=Yn(t,n,f,d),v=Yn(t,n,r,d),b=c?i-a*h:i,w=Yn(t,n,f*Math.cos(h*Ex),b);return{center:g,circleTangency:v,lineTangency:w,theta:h}},tq=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:i,startAngle:a,endAngle:o}=e,l=Kpe(a,o),c=a+l,f=Yn(t,n,i,a),h=Yn(t,n,i,c),d=Mn(LL||(LL=Bu(["M ",",",`
    A `,",",`,0,
    `,",",`,
    `,",",`
  `])),f.x,f.y,i,i,+(Math.abs(l)>180),+(a>c),h.x,h.y);if(r>0){var g=Yn(t,n,r,a),v=Yn(t,n,r,c);d+=Mn(zL||(zL=Bu(["L ",",",`
            A `,",",`,0,
            `,",",`,
            `,","," Z"])),v.x,v.y,r,r,+(Math.abs(l)>180),+(a<=c),g.x,g.y)}else d+=Mn($L||($L=Bu(["L ",","," Z"])),t,n);return d},Ype=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:i,cornerRadius:a,forceCornerRadius:o,cornerIsExternal:l,startAngle:c,endAngle:f}=e,h=vr(f-c),{circleTangency:d,lineTangency:g,theta:v}=Wv({cx:t,cy:n,radius:i,angle:c,sign:h,cornerRadius:a,cornerIsExternal:l}),{circleTangency:b,lineTangency:w,theta:S}=Wv({cx:t,cy:n,radius:i,angle:f,sign:-h,cornerRadius:a,cornerIsExternal:l}),E=l?Math.abs(c-f):Math.abs(c-f)-v-S;if(E<0)return o?Mn(BL||(BL=Bu(["M ",",",`
        a`,",",",0,0,1,",`,0
        a`,",",",0,0,1,",`,0
      `])),g.x,g.y,a,a,a*2,a,a,-a*2):tq({cx:t,cy:n,innerRadius:r,outerRadius:i,startAngle:c,endAngle:f});var C=Mn(FL||(FL=Bu(["M ",",",`
    A`,",",",0,0,",",",",",`
    A`,",",",0,",",",",",",",`
    A`,",",",0,0,",",",",",`
  `])),g.x,g.y,a,a,+(h<0),d.x,d.y,i,i,+(E>180),+(h<0),b.x,b.y,a,a,+(h<0),w.x,w.y);if(r>0){var{circleTangency:_,lineTangency:N,theta:O}=Wv({cx:t,cy:n,radius:r,angle:c,sign:h,isExternal:!0,cornerRadius:a,cornerIsExternal:l}),{circleTangency:A,lineTangency:T,theta:P}=Wv({cx:t,cy:n,radius:r,angle:f,sign:-h,isExternal:!0,cornerRadius:a,cornerIsExternal:l}),I=l?Math.abs(c-f):Math.abs(c-f)-O-P;if(I<0&&a===0)return"".concat(C,"L").concat(t,",").concat(n,"Z");C+=Mn(UL||(UL=Bu(["L",",",`
      A`,",",",0,0,",",",",",`
      A`,",",",0,",",",",",",",`
      A`,",",",0,0,",",",",","Z"])),T.x,T.y,a,a,+(h<0),A.x,A.y,r,r,+(I>180),+(h>0),_.x,_.y,a,a,+(h<0),N.x,N.y)}else C+=Mn(HL||(HL=Bu(["L",",","Z"])),t,n);return C},Xpe={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},nq=e=>{var t=Qn(e,Xpe),{cx:n,cy:r,innerRadius:i,outerRadius:a,cornerRadius:o,forceCornerRadius:l,cornerIsExternal:c,startAngle:f,endAngle:h,className:d}=t;if(a<i||f===h)return null;var g=Pt("recharts-sector",d),v=a-i,b=Ur(o,v,0,!0),w;return b>0&&Math.abs(f-h)<360?w=Ype({cx:n,cy:r,innerRadius:i,outerRadius:a,cornerRadius:Math.min(b,v/2),forceCornerRadius:l,cornerIsExternal:c,startAngle:f,endAngle:h}):w=tq({cx:n,cy:r,innerRadius:i,outerRadius:a,startAngle:f,endAngle:h}),y.createElement("path",uC({},ti(t),{className:g,d:w}))};function Gpe(e,t,n){if(e==="horizontal")return[{x:t.x,y:n.top},{x:t.x,y:n.top+n.height}];if(e==="vertical")return[{x:n.left,y:t.y},{x:n.left+n.width,y:t.y}];if(OU(t)){if(e==="centric"){var{cx:r,cy:i,innerRadius:a,outerRadius:o,angle:l}=t,c=Yn(r,i,a,l),f=Yn(r,i,o,l);return[{x:c.x,y:c.y},{x:f.x,y:f.y}]}return eq(t)}}var KE={},YE={},XE={},qL;function Wpe(){return qL||(qL=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=qU();function n(r){return t.isSymbol(r)?NaN:Number(r)}e.toNumber=n})(XE)),XE}var VL;function Qpe(){return VL||(VL=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Wpe();function n(r){return r?(r=t.toNumber(r),r===1/0||r===-1/0?(r<0?-1:1)*Number.MAX_VALUE:r===r?r:0):r===0?r:0}e.toFinite=n})(YE)),YE}var KL;function Zpe(){return KL||(KL=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=VU(),n=Qpe();function r(i,a,o){o&&typeof o!="number"&&t.isIterateeCall(i,a,o)&&(a=o=void 0),i=n.toFinite(i),a===void 0?(a=i,i=0):a=n.toFinite(a),o=o===void 0?i<a?1:-1:n.toFinite(o);const l=Math.max(Math.ceil((a-i)/(o||1)),0),c=new Array(l);for(let f=0;f<l;f++)c[f]=i,i+=o;return c}e.range=r})(KE)),KE}var GE,YL;function Jpe(){return YL||(YL=1,GE=Zpe().range),GE}var ege=Jpe();const rq=Hi(ege);var Ns=e=>e.chartData,cb=le([Ns],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),WN=(e,t,n,r)=>r?cb(e):Ns(e),tge=(e,t,n)=>n?cb(e):Ns(e);function ho(e){if(Array.isArray(e)&&e.length===2){var[t,n]=e;if(At(t)&&At(n))return!0}return!1}function XL(e,t,n){return n?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function iq(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[n,r]=e,i,a;if(At(n))i=n;else if(typeof n=="function")return;if(At(r))a=r;else if(typeof r=="function")return;var o=[i,a];if(ho(o))return o}}function nge(e,t,n){if(!(!n&&t==null)){if(typeof e=="function"&&t!=null)try{var r=e(t,n);if(ho(r))return XL(r,t,n)}catch{}if(Array.isArray(e)&&e.length===2){var[i,a]=e,o,l;if(i==="auto")t!=null&&(o=Math.min(...t));else if(Me(i))o=i;else if(typeof i=="function")try{t!=null&&(o=i(t==null?void 0:t[0]))}catch{}else if(typeof i=="string"&&LI.test(i)){var c=LI.exec(i);if(c==null||c[1]==null||t==null)o=void 0;else{var f=+c[1];o=t[0]-f}}else o=t==null?void 0:t[0];if(a==="auto")t!=null&&(l=Math.max(...t));else if(Me(a))l=a;else if(typeof a=="function")try{t!=null&&(l=a(t==null?void 0:t[1]))}catch{}else if(typeof a=="string"&&zI.test(a)){var h=zI.exec(a);if(h==null||h[1]==null||t==null)l=void 0;else{var d=+h[1];l=t[1]+d}}else l=t==null?void 0:t[1];var g=[o,l];if(ho(g))return t==null?g:XL(g,t,n)}}}var Hd=1e9,rge={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},ZN,En=!0,fa="[DecimalError] ",tc=fa+"Invalid argument: ",QN=fa+"Exponent out of range: ",qd=Math.floor,Du=Math.pow,ige=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Pi,gr=1e7,yn=7,aq=9007199254740991,jx=qd(aq/yn),De={};De.absoluteValue=De.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};De.comparedTo=De.cmp=function(e){var t,n,r,i,a=this;if(e=new a.constructor(e),a.s!==e.s)return a.s||-e.s;if(a.e!==e.e)return a.e>e.e^a.s<0?1:-1;for(r=a.d.length,i=e.d.length,t=0,n=r<i?r:i;t<n;++t)if(a.d[t]!==e.d[t])return a.d[t]>e.d[t]^a.s<0?1:-1;return r===i?0:r>i^a.s<0?1:-1};De.decimalPlaces=De.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*yn;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};De.dividedBy=De.div=function(e){return rs(this,new this.constructor(e))};De.dividedToIntegerBy=De.idiv=function(e){var t=this,n=t.constructor;return ln(rs(t,new n(e),0,1),n.precision)};De.equals=De.eq=function(e){return!this.cmp(e)};De.exponent=function(){return Gn(this)};De.greaterThan=De.gt=function(e){return this.cmp(e)>0};De.greaterThanOrEqualTo=De.gte=function(e){return this.cmp(e)>=0};De.isInteger=De.isint=function(){return this.e>this.d.length-2};De.isNegative=De.isneg=function(){return this.s<0};De.isPositive=De.ispos=function(){return this.s>0};De.isZero=function(){return this.s===0};De.lessThan=De.lt=function(e){return this.cmp(e)<0};De.lessThanOrEqualTo=De.lte=function(e){return this.cmp(e)<1};De.logarithm=De.log=function(e){var t,n=this,r=n.constructor,i=r.precision,a=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Pi))throw Error(fa+"NaN");if(n.s<1)throw Error(fa+(n.s?"NaN":"-Infinity"));return n.eq(Pi)?new r(0):(En=!1,t=rs(Ym(n,a),Ym(e,a),a),En=!0,ln(t,i))};De.minus=De.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?lq(t,e):oq(t,(e.s=-e.s,e))};De.modulo=De.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(fa+"NaN");return n.s?(En=!1,t=rs(n,e,0,1).times(e),En=!0,n.minus(t)):ln(new r(n),i)};De.naturalExponential=De.exp=function(){return sq(this)};De.naturalLogarithm=De.ln=function(){return Ym(this)};De.negated=De.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};De.plus=De.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?oq(t,e):lq(t,(e.s=-e.s,e))};De.precision=De.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(tc+e);if(t=Gn(i)+1,r=i.d.length-1,n=r*yn+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};De.squareRoot=De.sqrt=function(){var e,t,n,r,i,a,o,l=this,c=l.constructor;if(l.s<1){if(!l.s)return new c(0);throw Error(fa+"NaN")}for(e=Gn(l),En=!1,i=Math.sqrt(+l),i==0||i==1/0?(t=uo(l.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=qd((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),r=new c(t)):r=new c(i.toString()),n=c.precision,i=o=n+3;;)if(a=r,r=a.plus(rs(l,a,o+2)).times(.5),uo(a.d).slice(0,o)===(t=uo(r.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if(ln(a,n+1,0),a.times(a).eq(l)){r=a;break}}else if(t!="9999")break;o+=4}return En=!0,ln(r,n)};De.times=De.mul=function(e){var t,n,r,i,a,o,l,c,f,h=this,d=h.constructor,g=h.d,v=(e=new d(e)).d;if(!h.s||!e.s)return new d(0);for(e.s*=h.s,n=h.e+e.e,c=g.length,f=v.length,c<f&&(a=g,g=v,v=a,o=c,c=f,f=o),a=[],o=c+f,r=o;r--;)a.push(0);for(r=f;--r>=0;){for(t=0,i=c+r;i>r;)l=a[i]+v[r]*g[i-r-1]+t,a[i--]=l%gr|0,t=l/gr|0;a[i]=(a[i]+t)%gr|0}for(;!a[--o];)a.pop();return t?++n:a.shift(),e.d=a,e.e=n,En?ln(e,d.precision):e};De.toDecimalPlaces=De.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(xo(e,0,Hd),t===void 0?t=r.rounding:xo(t,0,8),ln(n,e+Gn(n)+1,t))};De.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=bc(r,!0):(xo(e,0,Hd),t===void 0?t=i.rounding:xo(t,0,8),r=ln(new i(r),e+1,t),n=bc(r,!0,e+1)),n};De.toFixed=function(e,t){var n,r,i=this,a=i.constructor;return e===void 0?bc(i):(xo(e,0,Hd),t===void 0?t=a.rounding:xo(t,0,8),r=ln(new a(i),e+Gn(i)+1,t),n=bc(r.abs(),!1,e+Gn(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};De.toInteger=De.toint=function(){var e=this,t=e.constructor;return ln(new t(e),Gn(e)+1,t.rounding)};De.toNumber=function(){return+this};De.toPower=De.pow=function(e){var t,n,r,i,a,o,l=this,c=l.constructor,f=12,h=+(e=new c(e));if(!e.s)return new c(Pi);if(l=new c(l),!l.s){if(e.s<1)throw Error(fa+"Infinity");return l}if(l.eq(Pi))return l;if(r=c.precision,e.eq(Pi))return ln(l,r);if(t=e.e,n=e.d.length-1,o=t>=n,a=l.s,o){if((n=h<0?-h:h)<=aq){for(i=new c(Pi),t=Math.ceil(r/yn+4),En=!1;n%2&&(i=i.times(l),WL(i.d,t)),n=qd(n/2),n!==0;)l=l.times(l),WL(l.d,t);return En=!0,e.s<0?new c(Pi).div(i):ln(i,r)}}else if(a<0)throw Error(fa+"NaN");return a=a<0&&e.d[Math.max(t,n)]&1?-1:1,l.s=1,En=!1,i=e.times(Ym(l,r+f)),En=!0,i=sq(i),i.s=a,i};De.toPrecision=function(e,t){var n,r,i=this,a=i.constructor;return e===void 0?(n=Gn(i),r=bc(i,n<=a.toExpNeg||n>=a.toExpPos)):(xo(e,1,Hd),t===void 0?t=a.rounding:xo(t,0,8),i=ln(new a(i),e,t),n=Gn(i),r=bc(i,e<=n||n<=a.toExpNeg,e)),r};De.toSignificantDigits=De.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(xo(e,1,Hd),t===void 0?t=r.rounding:xo(t,0,8)),ln(new r(n),e,t)};De.toString=De.valueOf=De.val=De.toJSON=De[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Gn(e),n=e.constructor;return bc(e,t<=n.toExpNeg||t>=n.toExpPos)};function oq(e,t){var n,r,i,a,o,l,c,f,h=e.constructor,d=h.precision;if(!e.s||!t.s)return t.s||(t=new h(e)),En?ln(t,d):t;if(c=e.d,f=t.d,o=e.e,i=t.e,c=c.slice(),a=o-i,a){for(a<0?(r=c,a=-a,l=f.length):(r=f,i=o,l=c.length),o=Math.ceil(d/yn),l=o>l?o+1:l+1,a>l&&(a=l,r.length=1),r.reverse();a--;)r.push(0);r.reverse()}for(l=c.length,a=f.length,l-a<0&&(a=l,r=f,f=c,c=r),n=0;a;)n=(c[--a]=c[a]+f[a]+n)/gr|0,c[a]%=gr;for(n&&(c.unshift(n),++i),l=c.length;c[--l]==0;)c.pop();return t.d=c,t.e=i,En?ln(t,d):t}function xo(e,t,n){if(e!==~~e||e<t||e>n)throw Error(tc+e)}function uo(e){var t,n,r,i=e.length-1,a="",o=e[0];if(i>0){for(a+=o,t=1;t<i;t++)r=e[t]+"",n=yn-r.length,n&&(a+=xl(n)),a+=r;o=e[t],r=o+"",n=yn-r.length,n&&(a+=xl(n))}else if(o===0)return"0";for(;o%10===0;)o/=10;return a+o}var rs=(function(){function e(r,i){var a,o=0,l=r.length;for(r=r.slice();l--;)a=r[l]*i+o,r[l]=a%gr|0,o=a/gr|0;return o&&r.unshift(o),r}function t(r,i,a,o){var l,c;if(a!=o)c=a>o?1:-1;else for(l=c=0;l<a;l++)if(r[l]!=i[l]){c=r[l]>i[l]?1:-1;break}return c}function n(r,i,a){for(var o=0;a--;)r[a]-=o,o=r[a]<i[a]?1:0,r[a]=o*gr+r[a]-i[a];for(;!r[0]&&r.length>1;)r.shift()}return function(r,i,a,o){var l,c,f,h,d,g,v,b,w,S,E,C,_,N,O,A,T,P,I=r.constructor,z=r.s==i.s?1:-1,F=r.d,B=i.d;if(!r.s)return new I(r);if(!i.s)throw Error(fa+"Division by zero");for(c=r.e-i.e,T=B.length,O=F.length,v=new I(z),b=v.d=[],f=0;B[f]==(F[f]||0);)++f;if(B[f]>(F[f]||0)&&--c,a==null?C=a=I.precision:o?C=a+(Gn(r)-Gn(i))+1:C=a,C<0)return new I(0);if(C=C/yn+2|0,f=0,T==1)for(h=0,B=B[0],C++;(f<O||h)&&C--;f++)_=h*gr+(F[f]||0),b[f]=_/B|0,h=_%B|0;else{for(h=gr/(B[0]+1)|0,h>1&&(B=e(B,h),F=e(F,h),T=B.length,O=F.length),N=T,w=F.slice(0,T),S=w.length;S<T;)w[S++]=0;P=B.slice(),P.unshift(0),A=B[0],B[1]>=gr/2&&++A;do h=0,l=t(B,w,T,S),l<0?(E=w[0],T!=S&&(E=E*gr+(w[1]||0)),h=E/A|0,h>1?(h>=gr&&(h=gr-1),d=e(B,h),g=d.length,S=w.length,l=t(d,w,g,S),l==1&&(h--,n(d,T<g?P:B,g))):(h==0&&(l=h=1),d=B.slice()),g=d.length,g<S&&d.unshift(0),n(w,d,S),l==-1&&(S=w.length,l=t(B,w,T,S),l<1&&(h++,n(w,T<S?P:B,S))),S=w.length):l===0&&(h++,w=[0]),b[f++]=h,l&&w[0]?w[S++]=F[N]||0:(w=[F[N]],S=1);while((N++<O||w[0]!==void 0)&&C--)}return b[0]||b.shift(),v.e=c,ln(v,o?a+Gn(v)+1:a)}})();function sq(e,t){var n,r,i,a,o,l,c=0,f=0,h=e.constructor,d=h.precision;if(Gn(e)>16)throw Error(QN+Gn(e));if(!e.s)return new h(Pi);for(En=!1,l=d,o=new h(.03125);e.abs().gte(.1);)e=e.times(o),f+=5;for(r=Math.log(Du(2,f))/Math.LN10*2+5|0,l+=r,n=i=a=new h(Pi),h.precision=l;;){if(i=ln(i.times(e),l),n=n.times(++c),o=a.plus(rs(i,n,l)),uo(o.d).slice(0,l)===uo(a.d).slice(0,l)){for(;f--;)a=ln(a.times(a),l);return h.precision=d,t==null?(En=!0,ln(a,d)):a}a=o}}function Gn(e){for(var t=e.e*yn,n=e.d[0];n>=10;n/=10)t++;return t}function WE(e,t,n){if(t>e.LN10.sd())throw En=!0,n&&(e.precision=n),Error(fa+"LN10 precision limit exceeded");return ln(new e(e.LN10),t)}function xl(e){for(var t="";e--;)t+="0";return t}function Ym(e,t){var n,r,i,a,o,l,c,f,h,d=1,g=10,v=e,b=v.d,w=v.constructor,S=w.precision;if(v.s<1)throw Error(fa+(v.s?"NaN":"-Infinity"));if(v.eq(Pi))return new w(0);if(t==null?(En=!1,f=S):f=t,v.eq(10))return t==null&&(En=!0),WE(w,f);if(f+=g,w.precision=f,n=uo(b),r=n.charAt(0),a=Gn(v),Math.abs(a)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)v=v.times(e),n=uo(v.d),r=n.charAt(0),d++;a=Gn(v),r>1?(v=new w("0."+n),a++):v=new w(r+"."+n.slice(1))}else return c=WE(w,f+2,S).times(a+""),v=Ym(new w(r+"."+n.slice(1)),f-g).plus(c),w.precision=S,t==null?(En=!0,ln(v,S)):v;for(l=o=v=rs(v.minus(Pi),v.plus(Pi),f),h=ln(v.times(v),f),i=3;;){if(o=ln(o.times(h),f),c=l.plus(rs(o,new w(i),f)),uo(c.d).slice(0,f)===uo(l.d).slice(0,f))return l=l.times(2),a!==0&&(l=l.plus(WE(w,f+2,S).times(a+""))),l=rs(l,new w(d),f),w.precision=S,t==null?(En=!0,ln(l,S)):l;l=c,i+=2}}function GL(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(r,i),t){if(i-=r,n=n-r-1,e.e=qd(n/yn),e.d=[],r=(n+1)%yn,n<0&&(r+=yn),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=yn;r<i;)e.d.push(+t.slice(r,r+=yn));t=t.slice(r),r=yn-t.length}else r-=i;for(;r--;)t+="0";if(e.d.push(+t),En&&(e.e>jx||e.e<-jx))throw Error(QN+n)}else e.s=0,e.e=0,e.d=[0];return e}function ln(e,t,n){var r,i,a,o,l,c,f,h,d=e.d;for(o=1,a=d[0];a>=10;a/=10)o++;if(r=t-o,r<0)r+=yn,i=t,f=d[h=0];else{if(h=Math.ceil((r+1)/yn),a=d.length,h>=a)return e;for(f=a=d[h],o=1;a>=10;a/=10)o++;r%=yn,i=r-yn+o}if(n!==void 0&&(a=Du(10,o-i-1),l=f/a%10|0,c=t<0||d[h+1]!==void 0||f%a,c=n<4?(l||c)&&(n==0||n==(e.s<0?3:2)):l>5||l==5&&(n==4||c||n==6&&(r>0?i>0?f/Du(10,o-i):0:d[h-1])%10&1||n==(e.s<0?8:7))),t<1||!d[0])return c?(a=Gn(e),d.length=1,t=t-a-1,d[0]=Du(10,(yn-t%yn)%yn),e.e=qd(-t/yn)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(r==0?(d.length=h,a=1,h--):(d.length=h+1,a=Du(10,yn-r),d[h]=i>0?(f/Du(10,o-i)%Du(10,i)|0)*a:0),c)for(;;)if(h==0){(d[0]+=a)==gr&&(d[0]=1,++e.e);break}else{if(d[h]+=a,d[h]!=gr)break;d[h--]=0,a=1}for(r=d.length;d[--r]===0;)d.pop();if(En&&(e.e>jx||e.e<-jx))throw Error(QN+Gn(e));return e}function lq(e,t){var n,r,i,a,o,l,c,f,h,d,g=e.constructor,v=g.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new g(e),En?ln(t,v):t;if(c=e.d,d=t.d,r=t.e,f=e.e,c=c.slice(),o=f-r,o){for(h=o<0,h?(n=c,o=-o,l=d.length):(n=d,r=f,l=c.length),i=Math.max(Math.ceil(v/yn),l)+2,o>i&&(o=i,n.length=1),n.reverse(),i=o;i--;)n.push(0);n.reverse()}else{for(i=c.length,l=d.length,h=i<l,h&&(l=i),i=0;i<l;i++)if(c[i]!=d[i]){h=c[i]<d[i];break}o=0}for(h&&(n=c,c=d,d=n,t.s=-t.s),l=c.length,i=d.length-l;i>0;--i)c[l++]=0;for(i=d.length;i>o;){if(c[--i]<d[i]){for(a=i;a&&c[--a]===0;)c[a]=gr-1;--c[a],c[i]+=gr}c[i]-=d[i]}for(;c[--l]===0;)c.pop();for(;c[0]===0;c.shift())--r;return c[0]?(t.d=c,t.e=r,En?ln(t,v):t):new g(0)}function bc(e,t,n){var r,i=Gn(e),a=uo(e.d),o=a.length;return t?(n&&(r=n-o)>0?a=a.charAt(0)+"."+a.slice(1)+xl(r):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+xl(-i-1)+a,n&&(r=n-o)>0&&(a+=xl(r))):i>=o?(a+=xl(i+1-o),n&&(r=n-i-1)>0&&(a=a+"."+xl(r))):((r=i+1)<o&&(a=a.slice(0,r)+"."+a.slice(r)),n&&(r=n-o)>0&&(i+1===o&&(a+="."),a+=xl(r))),e.s<0?"-"+a:a}function WL(e,t){if(e.length>t)return e.length=t,!0}function uq(e){var t,n,r;function i(a){var o=this;if(!(o instanceof i))return new i(a);if(o.constructor=i,a instanceof i){o.s=a.s,o.e=a.e,o.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(tc+a);if(a>0)o.s=1;else if(a<0)a=-a,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(a===~~a&&a<1e7){o.e=0,o.d=[a];return}return GL(o,a.toString())}else if(typeof a!="string")throw Error(tc+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,ige.test(a))GL(o,a);else throw Error(tc+a)}if(i.prototype=De,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=uq,i.config=i.set=age,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return i.config(e),i}function age(e){if(!e||typeof e!="object")throw Error(fa+"Object expected");var t,n,r,i=["precision",1,Hd,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((r=e[n=i[t]])!==void 0)if(qd(r)===r&&r>=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(tc+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(tc+n+": "+r);return this}var ZN=uq(rge);Pi=new ZN(1);const Nt=ZN;function cq(e){var t;return e===0?t=1:t=Math.floor(new Nt(e).abs().log(10).toNumber())+1,t}function fq(e,t,n){for(var r=new Nt(e),i=0,a=[];r.lt(t)&&i<1e5;)a.push(r.toNumber()),r=r.add(n),i++;return a}var dq=e=>{var[t,n]=e,[r,i]=[t,n];return t>n&&([r,i]=[n,t]),[r,i]},JN=(e,t,n)=>{if(e.lte(0))return new Nt(0);var r=cq(e.toNumber()),i=new Nt(10).pow(r),a=e.div(i),o=r!==1?.05:.1,l=new Nt(Math.ceil(a.div(o).toNumber())).add(n).mul(o),c=l.mul(i);return t?new Nt(c.toNumber()):new Nt(Math.ceil(c.toNumber()))},hq=(e,t,n)=>{var r;if(e.lte(0))return new Nt(0);var i=[1,2,2.5,5],a=e.toNumber(),o=Math.floor(new Nt(a).abs().log(10).toNumber()),l=new Nt(10).pow(o),c=e.div(l).toNumber(),f=i.findIndex(v=>v>=c-1e-10);if(f===-1&&(l=l.mul(10),f=0),f+=n,f>=i.length){var h=Math.floor(f/i.length);f%=i.length,l=l.mul(new Nt(10).pow(h))}var d=(r=i[f])!==null&&r!==void 0?r:1,g=new Nt(d).mul(l);return t?g:new Nt(Math.ceil(g.toNumber()))},oge=(e,t,n)=>{var r=new Nt(1),i=new Nt(e);if(!i.isint()&&n){var a=Math.abs(e);a<1?(r=new Nt(10).pow(cq(e)-1),i=new Nt(Math.floor(i.div(r).toNumber())).mul(r)):a>1&&(i=new Nt(Math.floor(e)))}else e===0?i=new Nt(Math.floor((t-1)/2)):n||(i=new Nt(Math.floor(e)));for(var o=Math.floor((t-1)/2),l=[],c=0;c<t;c++)l.push(i.add(new Nt(c-o).mul(r)).toNumber());return l},mq=function(t,n,r,i){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:JN;if(!Number.isFinite((n-t)/(r-1)))return{step:new Nt(0),tickMin:new Nt(0),tickMax:new Nt(0)};var l=o(new Nt(n).sub(t).div(r-1),i,a),c;t<=0&&n>=0?c=new Nt(0):(c=new Nt(t).add(n).div(2),c=c.sub(new Nt(c).mod(l)));var f=Math.ceil(c.sub(t).div(l).toNumber()),h=Math.ceil(new Nt(n).sub(c).div(l).toNumber()),d=f+h+1;return d>r?mq(t,n,r,i,a+1,o):(d<r&&(h=n>0?h+(r-d):h,f=n>0?f:f+(r-d)),{step:l,tickMin:c.sub(new Nt(f).mul(l)),tickMax:c.add(new Nt(h).mul(l))})},QL=function(t){var[n,r]=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",l=Math.max(i,2),[c,f]=dq([n,r]);if(c===-1/0||f===1/0){var h=f===1/0?[c,...Array(i-1).fill(1/0)]:[...Array(i-1).fill(-1/0),f];return n>r?h.reverse():h}if(c===f)return oge(c,i,a);var d=o==="snap125"?hq:JN,{step:g,tickMin:v,tickMax:b}=mq(c,f,l,a,0,d),w=fq(v,b.add(new Nt(.1).mul(g)),g);return n>r?w.reverse():w},ZL=function(t,n){var[r,i]=t,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",[l,c]=dq([r,i]);if(l===-1/0||c===1/0)return[r,i];if(l===c)return[l];var f=o==="snap125"?hq:JN,h=Math.max(n,2),d=f(new Nt(c).sub(l).div(h-1),a,0),g=[...fq(new Nt(l),new Nt(c),d),c];return a===!1&&(g=g.map(v=>Math.round(v))),r>i?g.reverse():g},pq=e=>e.rootProps.maxBarSize,sge=e=>e.rootProps.barGap,gq=e=>e.rootProps.barCategoryGap,lge=e=>e.rootProps.barSize,Vp=e=>e.rootProps.stackOffset,vq=e=>e.rootProps.reverseStackOrder,eA=e=>e.options.chartName,tA=e=>e.rootProps.syncId,yq=e=>e.rootProps.syncMethod,nA=e=>e.options.eventEmitter,Xn={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},Cu={allowDecimals:!1,allowDataOverflow:!1,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"auto"},Ja={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,includeHidden:!1,radiusAxisId:0,reversed:!1,scale:"auto",tick:!0,tickCount:5,type:"auto"},fb=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t};function db(e,t,n){if(n!=="auto")return n;if(e!=null)return _s(e,t)?"category":"number"}function JL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function _x(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?JL(Object(n),!0).forEach(function(r){uge(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function uge(e,t,n){return(t=cge(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cge(e){var t=fge(e,"string");return typeof t=="symbol"?t:t+""}function fge(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ez={allowDataOverflow:Cu.allowDataOverflow,allowDecimals:Cu.allowDecimals,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:Cu.angleAxisId,includeHidden:!1,name:void 0,reversed:Cu.reversed,scale:Cu.scale,tick:Cu.tick,tickCount:void 0,ticks:void 0,type:Cu.type,unit:void 0,niceTicks:"auto"},tz={allowDataOverflow:Ja.allowDataOverflow,allowDecimals:Ja.allowDecimals,allowDuplicatedCategory:Ja.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:Ja.radiusAxisId,includeHidden:Ja.includeHidden,name:void 0,reversed:Ja.reversed,scale:Ja.scale,tick:Ja.tick,tickCount:Ja.tickCount,ticks:void 0,type:Ja.type,unit:void 0,niceTicks:"auto"},dge=(e,t)=>{if(t!=null)return e.polarAxis.angleAxis[t]},rA=le([dge,DH],(e,t)=>{var n;if(e!=null)return e;var r=(n=db(t,"angleAxis",ez.type))!==null&&n!==void 0?n:"category";return _x(_x({},ez),{},{type:r})}),hge=(e,t)=>e.polarAxis.radiusAxis[t],iA=le([hge,DH],(e,t)=>{var n;if(e!=null)return e;var r=(n=db(t,"radiusAxis",tz.type))!==null&&n!==void 0?n:"category";return _x(_x({},tz),{},{type:r})}),hb=e=>e.polarOptions,aA=le([Cs,ks,ur],JH),xq=le([hb,aA],(e,t)=>{if(e!=null)return Ur(e.innerRadius,t,0)}),bq=le([hb,aA],(e,t)=>{if(e!=null)return Ur(e.outerRadius,t,t*.8)}),mge=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:n}=e;return[t,n]},wq=le([hb],mge);le([rA,wq],fb);var Sq=le([aA,xq,bq],(e,t,n)=>{if(!(e==null||t==null||n==null))return[t,n]});le([iA,Sq],fb);var Eq=le([Bt,hb,xq,bq,Cs,ks],(e,t,n,r,i,a)=>{if(!(e!=="centric"&&e!=="radial"||t==null||n==null||r==null)){var{cx:o,cy:l,startAngle:c,endAngle:f}=t;return{cx:Ur(o,i,i/2),cy:Ur(l,a,a/2),innerRadius:n,outerRadius:r,startAngle:c,endAngle:f,clockWise:!1}}}),kn=(e,t)=>t,Kp=(e,t,n)=>n;function oA(e){return e==null?void 0:e.id}function jq(e,t,n){var{chartData:r=[]}=t,{allowDuplicatedCategory:i,dataKey:a}=n,o=new Map;return e.forEach(l=>{var c,f=(c=l.data)!==null&&c!==void 0?c:r;if(!(f==null||f.length===0)){var h=oA(l);f.forEach((d,g)=>{var v=a==null||i?g:String(en(d,a,null)),b=en(d,l.dataKey,0),w;o.has(v)?w=o.get(v):w={},Object.assign(w,{[h]:b}),o.set(v,w)})}}),Array.from(o.values())}function mb(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var pb=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function gb(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function pge(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return!1}var br=e=>{var t=Bt(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},Vd=e=>e.tooltip.settings.axisId;function sA(e){if(e!=null){var t=e.ticks,n=e.bandwidth,r=e.range(),i=[Math.min(...r),Math.max(...r)];return{domain:()=>e.domain(),range:(function(a){function o(){return a.apply(this,arguments)}return o.toString=function(){return a.toString()},o})(()=>i),rangeMin:()=>i[0],rangeMax:()=>i[1],isInRange(a){var o=i[0],l=i[1];return o<=l?a>=o&&a<=l:a>=l&&a<=o},bandwidth:n?()=>n.call(e):void 0,ticks:t?a=>t.call(e,a):void 0,map:(a,o)=>{var l=e(a);if(l!=null){if(e.bandwidth&&o!==null&&o!==void 0&&o.position){var c=e.bandwidth();switch(o.position){case"middle":l+=c/2;break;case"end":l+=c;break}}return l}}}}}var _q=(e,t)=>{if(t!=null)switch(e){case"linear":{if(!ho(t)){for(var n,r,i=0;i<t.length;i++){var a=t[i];At(a)&&((n===void 0||a<n)&&(n=a),(r===void 0||a>r)&&(r=a))}return n!==void 0&&r!==void 0?[n,r]:void 0}return t}default:return t}};function Ll(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function gge(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function lA(e){let t,n,r;e.length!==2?(t=Ll,n=(l,c)=>Ll(e(l),c),r=(l,c)=>e(l)-c):(t=e===Ll||e===gge?e:vge,n=e,r=e);function i(l,c,f=0,h=l.length){if(f<h){if(t(c,c)!==0)return h;do{const d=f+h>>>1;n(l[d],c)<0?f=d+1:h=d}while(f<h)}return f}function a(l,c,f=0,h=l.length){if(f<h){if(t(c,c)!==0)return h;do{const d=f+h>>>1;n(l[d],c)<=0?f=d+1:h=d}while(f<h)}return f}function o(l,c,f=0,h=l.length){const d=i(l,c,f,h-1);return d>f&&r(l[d-1],c)>-r(l[d],c)?d-1:d}return{left:i,center:o,right:a}}function vge(){return 0}function Cq(e){return e===null?NaN:+e}function*yge(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const xge=lA(Ll),Yp=xge.right;lA(Cq).center;class nz extends Map{constructor(t,n=Sge){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(rz(this,t))}has(t){return super.has(rz(this,t))}set(t,n){return super.set(bge(this,t),n)}delete(t){return super.delete(wge(this,t))}}function rz({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function bge({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function wge({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function Sge(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Ege(e=Ll){if(e===Ll)return kq;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function kq(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const jge=Math.sqrt(50),_ge=Math.sqrt(10),Cge=Math.sqrt(2);function Cx(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),o=a>=jge?10:a>=_ge?5:a>=Cge?2:1;let l,c,f;return i<0?(f=Math.pow(10,-i)/o,l=Math.round(e*f),c=Math.round(t*f),l/f<e&&++l,c/f>t&&--c,f=-f):(f=Math.pow(10,i)*o,l=Math.round(e/f),c=Math.round(t/f),l*f<e&&++l,c*f>t&&--c),c<l&&.5<=n&&n<2?Cx(e,t,n*2):[l,c,f]}function cC(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,a,o]=r?Cx(t,e,n):Cx(e,t,n);if(!(a>=i))return[];const l=a-i+1,c=new Array(l);if(r)if(o<0)for(let f=0;f<l;++f)c[f]=(a-f)/-o;else for(let f=0;f<l;++f)c[f]=(a-f)*o;else if(o<0)for(let f=0;f<l;++f)c[f]=(i+f)/-o;else for(let f=0;f<l;++f)c[f]=(i+f)*o;return c}function fC(e,t,n){return t=+t,e=+e,n=+n,Cx(e,t,n)[2]}function dC(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?fC(t,e,n):fC(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function iz(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function az(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function Nq(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?kq:Ege(i);r>n;){if(r-n>600){const c=r-n+1,f=t-n+1,h=Math.log(c),d=.5*Math.exp(2*h/3),g=.5*Math.sqrt(h*d*(c-d)/c)*(f-c/2<0?-1:1),v=Math.max(n,Math.floor(t-f*d/c+g)),b=Math.min(r,Math.floor(t+(c-f)*d/c+g));Nq(e,t,v,b,i)}const a=e[t];let o=n,l=r;for(nm(e,n,t),i(e[r],a)>0&&nm(e,n,r);o<l;){for(nm(e,o,l),++o,--l;i(e[o],a)<0;)++o;for(;i(e[l],a)>0;)--l}i(e[n],a)===0?nm(e,n,l):(++l,nm(e,l,r)),l<=t&&(n=l+1),t<=l&&(r=l-1)}return e}function nm(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function kge(e,t,n){if(e=Float64Array.from(yge(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return az(e);if(t>=1)return iz(e);var r,i=(r-1)*t,a=Math.floor(i),o=iz(Nq(e,a).subarray(0,a+1)),l=az(e.subarray(a+1));return o+(l-o)*(i-a)}}function Nge(e,t,n=Cq){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,a=Math.floor(i),o=+n(e[a],a,e),l=+n(e[a+1],a+1,e);return o+(l-o)*(i-a)}}function Age(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=new Array(i);++r<i;)a[r]=e+r*n;return a}function pa(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function As(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 hC=Symbol("implicit");function uA(){var e=new nz,t=[],n=[],r=hC;function i(a){let o=e.get(a);if(o===void 0){if(r!==hC)return r;e.set(a,o=t.push(a)-1)}return n[o%n.length]}return i.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new nz;for(const o of a)e.has(o)||e.set(o,t.push(o)-1);return i},i.range=function(a){return arguments.length?(n=Array.from(a),i):n.slice()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return uA(t,n).unknown(r)},pa.apply(i,arguments),i}function cA(){var e=uA().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,a,o,l=!1,c=0,f=0,h=.5;delete e.unknown;function d(){var g=t().length,v=i<r,b=v?i:r,w=v?r:i;a=(w-b)/Math.max(1,g-c+f*2),l&&(a=Math.floor(a)),b+=(w-b-a*(g-c))*h,o=a*(1-c),l&&(b=Math.round(b),o=Math.round(o));var S=Age(g).map(function(E){return b+a*E});return n(v?S.reverse():S)}return e.domain=function(g){return arguments.length?(t(g),d()):t()},e.range=function(g){return arguments.length?([r,i]=g,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(g){return[r,i]=g,r=+r,i=+i,l=!0,d()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(g){return arguments.length?(l=!!g,d()):l},e.padding=function(g){return arguments.length?(c=Math.min(1,f=+g),d()):c},e.paddingInner=function(g){return arguments.length?(c=Math.min(1,g),d()):c},e.paddingOuter=function(g){return arguments.length?(f=+g,d()):f},e.align=function(g){return arguments.length?(h=Math.max(0,Math.min(1,g)),d()):h},e.copy=function(){return cA(t(),[r,i]).round(l).paddingInner(c).paddingOuter(f).align(h)},pa.apply(d(),arguments)}function Aq(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Aq(t())},e}function Oge(){return Aq(cA.apply(null,arguments).paddingInner(1))}function fA(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Oq(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Xp(){}var Xm=.7,kx=1/Xm,qf="\\s*([+-]?\\d+)\\s*",Gm="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",mo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Tge=/^#([0-9a-f]{3,8})$/,Pge=new RegExp(`^rgb\\(${qf},${qf},${qf}\\)$`),Mge=new RegExp(`^rgb\\(${mo},${mo},${mo}\\)$`),Dge=new RegExp(`^rgba\\(${qf},${qf},${qf},${Gm}\\)$`),Rge=new RegExp(`^rgba\\(${mo},${mo},${mo},${Gm}\\)$`),Ige=new RegExp(`^hsl\\(${Gm},${mo},${mo}\\)$`),Lge=new RegExp(`^hsla\\(${Gm},${mo},${mo},${Gm}\\)$`),oz={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};fA(Xp,wc,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:sz,formatHex:sz,formatHex8:zge,formatHsl:$ge,formatRgb:lz,toString:lz});function sz(){return this.rgb().formatHex()}function zge(){return this.rgb().formatHex8()}function $ge(){return Tq(this).formatHsl()}function lz(){return this.rgb().formatRgb()}function wc(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Tge.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?uz(t):n===3?new xi(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Qv(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Qv(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=Pge.exec(e))?new xi(t[1],t[2],t[3],1):(t=Mge.exec(e))?new xi(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Dge.exec(e))?Qv(t[1],t[2],t[3],t[4]):(t=Rge.exec(e))?Qv(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Ige.exec(e))?dz(t[1],t[2]/100,t[3]/100,1):(t=Lge.exec(e))?dz(t[1],t[2]/100,t[3]/100,t[4]):oz.hasOwnProperty(e)?uz(oz[e]):e==="transparent"?new xi(NaN,NaN,NaN,0):null}function uz(e){return new xi(e>>16&255,e>>8&255,e&255,1)}function Qv(e,t,n,r){return r<=0&&(e=t=n=NaN),new xi(e,t,n,r)}function Bge(e){return e instanceof Xp||(e=wc(e)),e?(e=e.rgb(),new xi(e.r,e.g,e.b,e.opacity)):new xi}function mC(e,t,n,r){return arguments.length===1?Bge(e):new xi(e,t,n,r??1)}function xi(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}fA(xi,mC,Oq(Xp,{brighter(e){return e=e==null?kx:Math.pow(kx,e),new xi(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Xm:Math.pow(Xm,e),new xi(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new xi(nc(this.r),nc(this.g),nc(this.b),Nx(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:cz,formatHex:cz,formatHex8:Fge,formatRgb:fz,toString:fz}));function cz(){return`#${Fu(this.r)}${Fu(this.g)}${Fu(this.b)}`}function Fge(){return`#${Fu(this.r)}${Fu(this.g)}${Fu(this.b)}${Fu((isNaN(this.opacity)?1:this.opacity)*255)}`}function fz(){const e=Nx(this.opacity);return`${e===1?"rgb(":"rgba("}${nc(this.r)}, ${nc(this.g)}, ${nc(this.b)}${e===1?")":`, ${e})`}`}function Nx(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function nc(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Fu(e){return e=nc(e),(e<16?"0":"")+e.toString(16)}function dz(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Aa(e,t,n,r)}function Tq(e){if(e instanceof Aa)return new Aa(e.h,e.s,e.l,e.opacity);if(e instanceof Xp||(e=wc(e)),!e)return new Aa;if(e instanceof Aa)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,l=a-i,c=(a+i)/2;return l?(t===a?o=(n-r)/l+(n<r)*6:n===a?o=(r-t)/l+2:o=(t-n)/l+4,l/=c<.5?a+i:2-a-i,o*=60):l=c>0&&c<1?0:o,new Aa(o,l,c,e.opacity)}function Uge(e,t,n,r){return arguments.length===1?Tq(e):new Aa(e,t,n,r??1)}function Aa(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}fA(Aa,Uge,Oq(Xp,{brighter(e){return e=e==null?kx:Math.pow(kx,e),new Aa(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Xm:Math.pow(Xm,e),new Aa(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new xi(QE(e>=240?e-240:e+120,i,r),QE(e,i,r),QE(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Aa(hz(this.h),Zv(this.s),Zv(this.l),Nx(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=Nx(this.opacity);return`${e===1?"hsl(":"hsla("}${hz(this.h)}, ${Zv(this.s)*100}%, ${Zv(this.l)*100}%${e===1?")":`, ${e})`}`}}));function hz(e){return e=(e||0)%360,e<0?e+360:e}function Zv(e){return Math.max(0,Math.min(1,e||0))}function QE(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const dA=e=>()=>e;function Hge(e,t){return function(n){return e+n*t}}function qge(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function Vge(e){return(e=+e)==1?Pq:function(t,n){return n-t?qge(t,n,e):dA(isNaN(t)?n:t)}}function Pq(e,t){var n=t-e;return n?Hge(e,n):dA(isNaN(e)?t:e)}const Ax=(function e(t){var n=Vge(t);function r(i,a){var o=n((i=mC(i)).r,(a=mC(a)).r),l=n(i.g,a.g),c=n(i.b,a.b),f=Pq(i.opacity,a.opacity);return function(h){return i.r=o(h),i.g=l(h),i.b=c(h),i.opacity=f(h),i+""}}return r.gamma=e,r})(1);function Kge(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function Yge(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Xge(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),a=new Array(n),o;for(o=0;o<r;++o)i[o]=is(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(l){for(o=0;o<r;++o)a[o]=i[o](l);return a}}function Gge(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Ca(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Wge(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=is(e[i],t[i]):r[i]=t[i];return function(a){for(i in n)r[i]=n[i](a);return r}}var pC=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ZE=new RegExp(pC.source,"g");function Qge(e){return function(){return e}}function Zge(e){return function(t){return e(t)+""}}function Mq(e,t){var n=pC.lastIndex=ZE.lastIndex=0,r,i,a,o=-1,l=[],c=[];for(e=e+"",t=t+"";(r=pC.exec(e))&&(i=ZE.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),l[o]?l[o]+=a:l[++o]=a),(r=r[0])===(i=i[0])?l[o]?l[o]+=i:l[++o]=i:(l[++o]=null,c.push({i:o,x:Ca(r,i)})),n=ZE.lastIndex;return n<t.length&&(a=t.slice(n),l[o]?l[o]+=a:l[++o]=a),l.length<2?c[0]?Zge(c[0].x):Qge(t):(t=c.length,function(f){for(var h=0,d;h<t;++h)l[(d=c[h]).i]=d.x(f);return l.join("")})}function is(e,t){var n=typeof t,r;return t==null||n==="boolean"?dA(t):(n==="number"?Ca:n==="string"?(r=wc(t))?(t=r,Ax):Mq:t instanceof wc?Ax:t instanceof Date?Gge:Yge(t)?Kge:Array.isArray(t)?Xge:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Wge:Ca)(e,t)}function hA(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var mz=180/Math.PI,gC={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Dq(e,t,n,r,i,a){var o,l,c;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(c=e*n+t*r)&&(n-=e*c,r-=t*c),(l=Math.sqrt(n*n+r*r))&&(n/=l,r/=l,c/=l),e*r<t*n&&(e=-e,t=-t,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*mz,skewX:Math.atan(c)*mz,scaleX:o,scaleY:l}}var Jv;function Jge(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?gC:Dq(t.a,t.b,t.c,t.d,t.e,t.f)}function eve(e){return e==null||(Jv||(Jv=document.createElementNS("http://www.w3.org/2000/svg","g")),Jv.setAttribute("transform",e),!(e=Jv.transform.baseVal.consolidate()))?gC:(e=e.matrix,Dq(e.a,e.b,e.c,e.d,e.e,e.f))}function Rq(e,t,n,r){function i(f){return f.length?f.pop()+" ":""}function a(f,h,d,g,v,b){if(f!==d||h!==g){var w=v.push("translate(",null,t,null,n);b.push({i:w-4,x:Ca(f,d)},{i:w-2,x:Ca(h,g)})}else(d||g)&&v.push("translate("+d+t+g+n)}function o(f,h,d,g){f!==h?(f-h>180?h+=360:h-f>180&&(f+=360),g.push({i:d.push(i(d)+"rotate(",null,r)-2,x:Ca(f,h)})):h&&d.push(i(d)+"rotate("+h+r)}function l(f,h,d,g){f!==h?g.push({i:d.push(i(d)+"skewX(",null,r)-2,x:Ca(f,h)}):h&&d.push(i(d)+"skewX("+h+r)}function c(f,h,d,g,v,b){if(f!==d||h!==g){var w=v.push(i(v)+"scale(",null,",",null,")");b.push({i:w-4,x:Ca(f,d)},{i:w-2,x:Ca(h,g)})}else(d!==1||g!==1)&&v.push(i(v)+"scale("+d+","+g+")")}return function(f,h){var d=[],g=[];return f=e(f),h=e(h),a(f.translateX,f.translateY,h.translateX,h.translateY,d,g),o(f.rotate,h.rotate,d,g),l(f.skewX,h.skewX,d,g),c(f.scaleX,f.scaleY,h.scaleX,h.scaleY,d,g),f=h=null,function(v){for(var b=-1,w=g.length,S;++b<w;)d[(S=g[b]).i]=S.x(v);return d.join("")}}}var tve=Rq(Jge,"px, ","px)","deg)"),nve=Rq(eve,", ",")",")"),rve=1e-12;function pz(e){return((e=Math.exp(e))+1/e)/2}function ive(e){return((e=Math.exp(e))-1/e)/2}function ave(e){return((e=Math.exp(2*e))-1)/(e+1)}const Ny=(function e(t,n,r){function i(a,o){var l=a[0],c=a[1],f=a[2],h=o[0],d=o[1],g=o[2],v=h-l,b=d-c,w=v*v+b*b,S,E;if(w<rve)E=Math.log(g/f)/t,S=function(T){return[l+T*v,c+T*b,f*Math.exp(t*T*E)]};else{var C=Math.sqrt(w),_=(g*g-f*f+r*w)/(2*f*n*C),N=(g*g-f*f-r*w)/(2*g*n*C),O=Math.log(Math.sqrt(_*_+1)-_),A=Math.log(Math.sqrt(N*N+1)-N);E=(A-O)/t,S=function(T){var P=T*E,I=pz(O),z=f/(n*C)*(I*ave(t*P+O)-ive(O));return[l+z*v,c+z*b,f*I/pz(t*P+O)]}}return S.duration=E*1e3*t/Math.SQRT2,S}return i.rho=function(a){var o=Math.max(.001,+a),l=o*o,c=l*l;return e(o,l,c)},i})(Math.SQRT2,2,4);function ove(e,t){t===void 0&&(t=e,e=is);for(var n=0,r=t.length-1,i=t[0],a=new Array(r<0?0:r);n<r;)a[n]=e(i,i=t[++n]);return function(o){var l=Math.max(0,Math.min(r-1,Math.floor(o*=r)));return a[l](o-l)}}function sve(e){return function(){return e}}function Ox(e){return+e}var gz=[0,1];function ei(e){return e}function vC(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:sve(isNaN(t)?NaN:.5)}function lve(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function uve(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=vC(i,r),a=n(o,a)):(r=vC(r,i),a=n(a,o)),function(l){return a(r(l))}}function cve(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),a=new Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=vC(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(l){var c=Yp(e,l,1,r)-1;return a[c](i[c](l))}}function Gp(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function vb(){var e=gz,t=gz,n=is,r,i,a,o=ei,l,c,f;function h(){var g=Math.min(e.length,t.length);return o!==ei&&(o=lve(e[0],e[g-1])),l=g>2?cve:uve,c=f=null,d}function d(g){return g==null||isNaN(g=+g)?a:(c||(c=l(e.map(r),t,n)))(r(o(g)))}return d.invert=function(g){return o(i((f||(f=l(t,e.map(r),Ca)))(g)))},d.domain=function(g){return arguments.length?(e=Array.from(g,Ox),h()):e.slice()},d.range=function(g){return arguments.length?(t=Array.from(g),h()):t.slice()},d.rangeRound=function(g){return t=Array.from(g),n=hA,h()},d.clamp=function(g){return arguments.length?(o=g?!0:ei,h()):o!==ei},d.interpolate=function(g){return arguments.length?(n=g,h()):n},d.unknown=function(g){return arguments.length?(a=g,d):a},function(g,v){return r=g,i=v,h()}}function mA(){return vb()(ei,ei)}function fve(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Tx(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function xd(e){return e=Tx(Math.abs(e)),e?e[1]:NaN}function dve(e,t){return function(n,r){for(var i=n.length,a=[],o=0,l=e[0],c=0;i>0&&l>0&&(c+l+1>r&&(l=Math.max(1,r-c)),a.push(n.substring(i-=l,i+l)),!((c+=l+1)>r));)l=e[o=(o+1)%e.length];return a.reverse().join(t)}}function hve(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var mve=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Wm(e){if(!(t=mve.exec(e)))throw new Error("invalid format: "+e);var t;return new pA({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]})}Wm.prototype=pA.prototype;function pA(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+""}pA.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 pve(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var Px;function gve(e,t){var n=Tx(e,t);if(!n)return Px=void 0,e.toPrecision(t);var r=n[0],i=n[1],a=i-(Px=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+Tx(e,Math.max(0,t+a-1))[0]}function vz(e,t){var n=Tx(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const yz={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:fve,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)=>vz(e*100,t),r:vz,s:gve,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function xz(e){return e}var bz=Array.prototype.map,wz=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function vve(e){var t=e.grouping===void 0||e.thousands===void 0?xz:dve(bz.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?xz:hve(bz.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"−":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function f(d,g){d=Wm(d);var v=d.fill,b=d.align,w=d.sign,S=d.symbol,E=d.zero,C=d.width,_=d.comma,N=d.precision,O=d.trim,A=d.type;A==="n"?(_=!0,A="g"):yz[A]||(N===void 0&&(N=12),O=!0,A="g"),(E||v==="0"&&b==="=")&&(E=!0,v="0",b="=");var T=(g&&g.prefix!==void 0?g.prefix:"")+(S==="$"?n:S==="#"&&/[boxX]/.test(A)?"0"+A.toLowerCase():""),P=(S==="$"?r:/[%p]/.test(A)?o:"")+(g&&g.suffix!==void 0?g.suffix:""),I=yz[A],z=/[defgprs%]/.test(A);N=N===void 0?6:/[gprs]/.test(A)?Math.max(1,Math.min(21,N)):Math.max(0,Math.min(20,N));function F(B){var G=T,L=P,V,D,q;if(A==="c")L=I(B)+L,B="";else{B=+B;var X=B<0||1/B<0;if(B=isNaN(B)?c:I(Math.abs(B),N),O&&(B=pve(B)),X&&+B==0&&w!=="+"&&(X=!1),G=(X?w==="("?w:l:w==="-"||w==="("?"":w)+G,L=(A==="s"&&!isNaN(B)&&Px!==void 0?wz[8+Px/3]:"")+L+(X&&w==="("?")":""),z){for(V=-1,D=B.length;++V<D;)if(q=B.charCodeAt(V),48>q||q>57){L=(q===46?i+B.slice(V+1):B.slice(V))+L,B=B.slice(0,V);break}}}_&&!E&&(B=t(B,1/0));var K=G.length+B.length+L.length,R=K<C?new Array(C-K+1).join(v):"";switch(_&&E&&(B=t(R+B,R.length?C-L.length:1/0),R=""),b){case"<":B=G+B+L+R;break;case"=":B=G+R+B+L;break;case"^":B=R.slice(0,K=R.length>>1)+G+B+L+R.slice(K);break;default:B=R+G+B+L;break}return a(B)}return F.toString=function(){return d+""},F}function h(d,g){var v=Math.max(-8,Math.min(8,Math.floor(xd(g)/3)))*3,b=Math.pow(10,-v),w=f((d=Wm(d),d.type="f",d),{suffix:wz[8+v/3]});return function(S){return w(b*S)}}return{format:f,formatPrefix:h}}var ey,gA,Iq;yve({thousands:",",grouping:[3],currency:["$",""]});function yve(e){return ey=vve(e),gA=ey.format,Iq=ey.formatPrefix,ey}function xve(e){return Math.max(0,-xd(Math.abs(e)))}function bve(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(xd(t)/3)))*3-xd(Math.abs(e)))}function wve(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,xd(t)-xd(e))+1}function Lq(e,t,n,r){var i=dC(e,t,n),a;switch(r=Wm(r??",f"),r.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=bve(i,o))&&(r.precision=a),Iq(r,o)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(a=wve(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(a=xve(i))&&(r.precision=a-(r.type==="%")*2);break}}return gA(r)}function tu(e){var t=e.domain;return e.ticks=function(n){var r=t();return cC(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return Lq(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,a=r.length-1,o=r[i],l=r[a],c,f,h=10;for(l<o&&(f=o,o=l,l=f,f=i,i=a,a=f);h-- >0;){if(f=fC(o,l,n),f===c)return r[i]=o,r[a]=l,t(r);if(f>0)o=Math.floor(o/f)*f,l=Math.ceil(l/f)*f;else if(f<0)o=Math.ceil(o*f)/f,l=Math.floor(l*f)/f;else break;c=f}return e},e}function zq(){var e=mA();return e.copy=function(){return Gp(e,zq())},pa.apply(e,arguments),tu(e)}function $q(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,Ox),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return $q(e).unknown(t)},e=arguments.length?Array.from(e,Ox):[0,1],tu(n)}function Bq(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],o;return a<i&&(o=n,n=r,r=o,o=i,i=a,a=o),e[n]=t.floor(i),e[r]=t.ceil(a),e}function Sz(e){return Math.log(e)}function Ez(e){return Math.exp(e)}function Sve(e){return-Math.log(-e)}function Eve(e){return-Math.exp(-e)}function jve(e){return isFinite(e)?+("1e"+e):e<0?0:e}function _ve(e){return e===10?jve:e===Math.E?Math.exp:t=>Math.pow(e,t)}function Cve(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 jz(e){return(t,n)=>-e(-t,n)}function vA(e){const t=e(Sz,Ez),n=t.domain;let r=10,i,a;function o(){return i=Cve(r),a=_ve(r),n()[0]<0?(i=jz(i),a=jz(a),e(Sve,Eve)):e(Sz,Ez),t}return t.base=function(l){return arguments.length?(r=+l,o()):r},t.domain=function(l){return arguments.length?(n(l),o()):n()},t.ticks=l=>{const c=n();let f=c[0],h=c[c.length-1];const d=h<f;d&&([f,h]=[h,f]);let g=i(f),v=i(h),b,w;const S=l==null?10:+l;let E=[];if(!(r%1)&&v-g<S){if(g=Math.floor(g),v=Math.ceil(v),f>0){for(;g<=v;++g)for(b=1;b<r;++b)if(w=g<0?b/a(-g):b*a(g),!(w<f)){if(w>h)break;E.push(w)}}else for(;g<=v;++g)for(b=r-1;b>=1;--b)if(w=g>0?b/a(-g):b*a(g),!(w<f)){if(w>h)break;E.push(w)}E.length*2<S&&(E=cC(f,h,S))}else E=cC(g,v,Math.min(v-g,S)).map(a);return d?E.reverse():E},t.tickFormat=(l,c)=>{if(l==null&&(l=10),c==null&&(c=r===10?"s":","),typeof c!="function"&&(!(r%1)&&(c=Wm(c)).precision==null&&(c.trim=!0),c=gA(c)),l===1/0)return c;const f=Math.max(1,r*l/t.ticks().length);return h=>{let d=h/a(Math.round(i(h)));return d*r<r-.5&&(d*=r),d<=f?c(h):""}},t.nice=()=>n(Bq(n(),{floor:l=>a(Math.floor(i(l))),ceil:l=>a(Math.ceil(i(l)))})),t}function Fq(){const e=vA(vb()).domain([1,10]);return e.copy=()=>Gp(e,Fq()).base(e.base()),pa.apply(e,arguments),e}function _z(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Cz(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function yA(e){var t=1,n=e(_z(t),Cz(t));return n.constant=function(r){return arguments.length?e(_z(t=+r),Cz(t)):t},tu(n)}function Uq(){var e=yA(vb());return e.copy=function(){return Gp(e,Uq()).constant(e.constant())},pa.apply(e,arguments)}function kz(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function kve(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Nve(e){return e<0?-e*e:e*e}function xA(e){var t=e(ei,ei),n=1;function r(){return n===1?e(ei,ei):n===.5?e(kve,Nve):e(kz(n),kz(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},tu(t)}function bA(){var e=xA(vb());return e.copy=function(){return Gp(e,bA()).exponent(e.exponent())},pa.apply(e,arguments),e}function Ave(){return bA.apply(null,arguments).exponent(.5)}function Nz(e){return Math.sign(e)*e*e}function Ove(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function Hq(){var e=mA(),t=[0,1],n=!1,r;function i(a){var o=Ove(e(a));return isNaN(o)?r:n?Math.round(o):o}return i.invert=function(a){return e.invert(Nz(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,Ox)).map(Nz)),i):t.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(n=!!a,i):n},i.clamp=function(a){return arguments.length?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return Hq(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},pa.apply(i,arguments),tu(i)}function qq(){var e=[],t=[],n=[],r;function i(){var o=0,l=Math.max(1,t.length);for(n=new Array(l-1);++o<l;)n[o-1]=Nge(e,o/l);return a}function a(o){return o==null||isNaN(o=+o)?r:t[Yp(n,o)]}return a.invertExtent=function(o){var l=t.indexOf(o);return l<0?[NaN,NaN]:[l>0?n[l-1]:e[0],l<n.length?n[l]:e[e.length-1]]},a.domain=function(o){if(!arguments.length)return e.slice();e=[];for(let l of o)l!=null&&!isNaN(l=+l)&&e.push(l);return e.sort(Ll),i()},a.range=function(o){return arguments.length?(t=Array.from(o),i()):t.slice()},a.unknown=function(o){return arguments.length?(r=o,a):r},a.quantiles=function(){return n.slice()},a.copy=function(){return qq().domain(e).range(t).unknown(r)},pa.apply(a,arguments)}function Vq(){var e=0,t=1,n=1,r=[.5],i=[0,1],a;function o(c){return c!=null&&c<=c?i[Yp(r,c,0,n)]:a}function l(){var c=-1;for(r=new Array(n);++c<n;)r[c]=((c+1)*t-(c-n)*e)/(n+1);return o}return o.domain=function(c){return arguments.length?([e,t]=c,e=+e,t=+t,l()):[e,t]},o.range=function(c){return arguments.length?(n=(i=Array.from(c)).length-1,l()):i.slice()},o.invertExtent=function(c){var f=i.indexOf(c);return f<0?[NaN,NaN]:f<1?[e,r[0]]:f>=n?[r[n-1],t]:[r[f-1],r[f]]},o.unknown=function(c){return arguments.length&&(a=c),o},o.thresholds=function(){return r.slice()},o.copy=function(){return Vq().domain([e,t]).range(i).unknown(a)},pa.apply(tu(o),arguments)}function Kq(){var e=[.5],t=[0,1],n,r=1;function i(a){return a!=null&&a<=a?t[Yp(e,a,0,r)]:n}return i.domain=function(a){return arguments.length?(e=Array.from(a),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var o=t.indexOf(a);return[e[o-1],e[o]]},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return Kq().domain(e).range(t).unknown(n)},pa.apply(i,arguments)}const JE=new Date,ej=new Date;function cr(e,t,n,r){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 o=i(a),l=i.ceil(a);return a-o<l-a?o:l},i.offset=(a,o)=>(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,l)=>{const c=[];if(a=i.ceil(a),l=l==null?1:Math.floor(l),!(a<o)||!(l>0))return c;let f;do c.push(f=new Date(+a)),t(a,l),e(a);while(f<a&&a<o);return c},i.filter=a=>cr(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,l)=>{if(o>=o)if(l<0)for(;++l<=0;)for(;t(o,-1),!a(o););else for(;--l>=0;)for(;t(o,1),!a(o););}),n&&(i.count=(a,o)=>(JE.setTime(+a),ej.setTime(+o),e(JE),e(ej),Math.floor(n(JE,ej))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(r?o=>r(o)%a===0:o=>i.count(0,o)%a===0):i)),i}const Mx=cr(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Mx.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?cr(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Mx);Mx.range;const es=1e3,la=es*60,ts=la*60,ps=ts*24,wA=ps*7,Az=ps*30,tj=ps*365,Uu=cr(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*es)},(e,t)=>(t-e)/es,e=>e.getUTCSeconds());Uu.range;const SA=cr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*es)},(e,t)=>{e.setTime(+e+t*la)},(e,t)=>(t-e)/la,e=>e.getMinutes());SA.range;const EA=cr(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*la)},(e,t)=>(t-e)/la,e=>e.getUTCMinutes());EA.range;const jA=cr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*es-e.getMinutes()*la)},(e,t)=>{e.setTime(+e+t*ts)},(e,t)=>(t-e)/ts,e=>e.getHours());jA.range;const _A=cr(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ts)},(e,t)=>(t-e)/ts,e=>e.getUTCHours());_A.range;const Wp=cr(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*la)/ps,e=>e.getDate()-1);Wp.range;const yb=cr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ps,e=>e.getUTCDate()-1);yb.range;const Yq=cr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ps,e=>Math.floor(e/ps));Yq.range;function Mc(e){return cr(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*la)/wA)}const xb=Mc(0),Dx=Mc(1),Tve=Mc(2),Pve=Mc(3),bd=Mc(4),Mve=Mc(5),Dve=Mc(6);xb.range;Dx.range;Tve.range;Pve.range;bd.range;Mve.range;Dve.range;function Dc(e){return cr(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/wA)}const bb=Dc(0),Rx=Dc(1),Rve=Dc(2),Ive=Dc(3),wd=Dc(4),Lve=Dc(5),zve=Dc(6);bb.range;Rx.range;Rve.range;Ive.range;wd.range;Lve.range;zve.range;const CA=cr(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());CA.range;const kA=cr(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());kA.range;const gs=cr(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());gs.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:cr(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});gs.range;const vs=cr(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());vs.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:cr(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});vs.range;function Xq(e,t,n,r,i,a){const o=[[Uu,1,es],[Uu,5,5*es],[Uu,15,15*es],[Uu,30,30*es],[a,1,la],[a,5,5*la],[a,15,15*la],[a,30,30*la],[i,1,ts],[i,3,3*ts],[i,6,6*ts],[i,12,12*ts],[r,1,ps],[r,2,2*ps],[n,1,wA],[t,1,Az],[t,3,3*Az],[e,1,tj]];function l(f,h,d){const g=h<f;g&&([f,h]=[h,f]);const v=d&&typeof d.range=="function"?d:c(f,h,d),b=v?v.range(f,+h+1):[];return g?b.reverse():b}function c(f,h,d){const g=Math.abs(h-f)/d,v=lA(([,,S])=>S).right(o,g);if(v===o.length)return e.every(dC(f/tj,h/tj,d));if(v===0)return Mx.every(Math.max(dC(f,h,d),1));const[b,w]=o[g/o[v-1][2]<o[v][2]/g?v-1:v];return b.every(w)}return[l,c]}const[$ve,Bve]=Xq(vs,kA,bb,Yq,_A,EA),[Fve,Uve]=Xq(gs,CA,xb,Wp,jA,SA);function nj(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 rj(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 rm(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function Hve(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,l=e.months,c=e.shortMonths,f=im(i),h=am(i),d=im(a),g=am(a),v=im(o),b=am(o),w=im(l),S=am(l),E=im(c),C=am(c),_={a:q,A:X,b:K,B:R,c:null,d:Rz,e:Rz,f:dye,g:Sye,G:jye,H:uye,I:cye,j:fye,L:Gq,m:hye,M:mye,p:H,q:U,Q:zz,s:$z,S:pye,u:gye,U:vye,V:yye,w:xye,W:bye,x:null,X:null,y:wye,Y:Eye,Z:_ye,"%":Lz},N={a:$,A:Q,b:J,B:ne,c:null,d:Iz,e:Iz,f:Aye,g:$ye,G:Fye,H:Cye,I:kye,j:Nye,L:Qq,m:Oye,M:Tye,p:ae,q:ie,Q:zz,s:$z,S:Pye,u:Mye,U:Dye,V:Rye,w:Iye,W:Lye,x:null,X:null,y:zye,Y:Bye,Z:Uye,"%":Lz},O={a:z,A:F,b:B,B:G,c:L,d:Mz,e:Mz,f:aye,g:Pz,G:Tz,H:Dz,I:Dz,j:tye,L:iye,m:eye,M:nye,p:I,q:Jve,Q:sye,s:lye,S:rye,u:Xve,U:Gve,V:Wve,w:Yve,W:Qve,x:V,X:D,y:Pz,Y:Tz,Z:Zve,"%":oye};_.x=A(n,_),_.X=A(r,_),_.c=A(t,_),N.x=A(n,N),N.X=A(r,N),N.c=A(t,N);function A(ee,se){return function(pe){var re=[],we=-1,Ee=0,$e=ee.length,Ne,et,Xe;for(pe instanceof Date||(pe=new Date(+pe));++we<$e;)ee.charCodeAt(we)===37&&(re.push(ee.slice(Ee,we)),(et=Oz[Ne=ee.charAt(++we)])!=null?Ne=ee.charAt(++we):et=Ne==="e"?" ":"0",(Xe=se[Ne])&&(Ne=Xe(pe,et)),re.push(Ne),Ee=we+1);return re.push(ee.slice(Ee,we)),re.join("")}}function T(ee,se){return function(pe){var re=rm(1900,void 0,1),we=P(re,ee,pe+="",0),Ee,$e;if(we!=pe.length)return null;if("Q"in re)return new Date(re.Q);if("s"in re)return new Date(re.s*1e3+("L"in re?re.L:0));if(se&&!("Z"in re)&&(re.Z=0),"p"in re&&(re.H=re.H%12+re.p*12),re.m===void 0&&(re.m="q"in re?re.q:0),"V"in re){if(re.V<1||re.V>53)return null;"w"in re||(re.w=1),"Z"in re?(Ee=rj(rm(re.y,0,1)),$e=Ee.getUTCDay(),Ee=$e>4||$e===0?Rx.ceil(Ee):Rx(Ee),Ee=yb.offset(Ee,(re.V-1)*7),re.y=Ee.getUTCFullYear(),re.m=Ee.getUTCMonth(),re.d=Ee.getUTCDate()+(re.w+6)%7):(Ee=nj(rm(re.y,0,1)),$e=Ee.getDay(),Ee=$e>4||$e===0?Dx.ceil(Ee):Dx(Ee),Ee=Wp.offset(Ee,(re.V-1)*7),re.y=Ee.getFullYear(),re.m=Ee.getMonth(),re.d=Ee.getDate()+(re.w+6)%7)}else("W"in re||"U"in re)&&("w"in re||(re.w="u"in re?re.u%7:"W"in re?1:0),$e="Z"in re?rj(rm(re.y,0,1)).getUTCDay():nj(rm(re.y,0,1)).getDay(),re.m=0,re.d="W"in re?(re.w+6)%7+re.W*7-($e+5)%7:re.w+re.U*7-($e+6)%7);return"Z"in re?(re.H+=re.Z/100|0,re.M+=re.Z%100,rj(re)):nj(re)}}function P(ee,se,pe,re){for(var we=0,Ee=se.length,$e=pe.length,Ne,et;we<Ee;){if(re>=$e)return-1;if(Ne=se.charCodeAt(we++),Ne===37){if(Ne=se.charAt(we++),et=O[Ne in Oz?se.charAt(we++):Ne],!et||(re=et(ee,pe,re))<0)return-1}else if(Ne!=pe.charCodeAt(re++))return-1}return re}function I(ee,se,pe){var re=f.exec(se.slice(pe));return re?(ee.p=h.get(re[0].toLowerCase()),pe+re[0].length):-1}function z(ee,se,pe){var re=v.exec(se.slice(pe));return re?(ee.w=b.get(re[0].toLowerCase()),pe+re[0].length):-1}function F(ee,se,pe){var re=d.exec(se.slice(pe));return re?(ee.w=g.get(re[0].toLowerCase()),pe+re[0].length):-1}function B(ee,se,pe){var re=E.exec(se.slice(pe));return re?(ee.m=C.get(re[0].toLowerCase()),pe+re[0].length):-1}function G(ee,se,pe){var re=w.exec(se.slice(pe));return re?(ee.m=S.get(re[0].toLowerCase()),pe+re[0].length):-1}function L(ee,se,pe){return P(ee,t,se,pe)}function V(ee,se,pe){return P(ee,n,se,pe)}function D(ee,se,pe){return P(ee,r,se,pe)}function q(ee){return o[ee.getDay()]}function X(ee){return a[ee.getDay()]}function K(ee){return c[ee.getMonth()]}function R(ee){return l[ee.getMonth()]}function H(ee){return i[+(ee.getHours()>=12)]}function U(ee){return 1+~~(ee.getMonth()/3)}function $(ee){return o[ee.getUTCDay()]}function Q(ee){return a[ee.getUTCDay()]}function J(ee){return c[ee.getUTCMonth()]}function ne(ee){return l[ee.getUTCMonth()]}function ae(ee){return i[+(ee.getUTCHours()>=12)]}function ie(ee){return 1+~~(ee.getUTCMonth()/3)}return{format:function(ee){var se=A(ee+="",_);return se.toString=function(){return ee},se},parse:function(ee){var se=T(ee+="",!1);return se.toString=function(){return ee},se},utcFormat:function(ee){var se=A(ee+="",N);return se.toString=function(){return ee},se},utcParse:function(ee){var se=T(ee+="",!0);return se.toString=function(){return ee},se}}}var Oz={"-":"",_:" ",0:"0"},wr=/^\s*\d+/,qve=/^%/,Vve=/[\\^$*+?|[\]().{}]/g;function $t(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(t)+i:i)}function Kve(e){return e.replace(Vve,"\\$&")}function im(e){return new RegExp("^(?:"+e.map(Kve).join("|")+")","i")}function am(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function Yve(e,t,n){var r=wr.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Xve(e,t,n){var r=wr.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Gve(e,t,n){var r=wr.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Wve(e,t,n){var r=wr.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Qve(e,t,n){var r=wr.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Tz(e,t,n){var r=wr.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Pz(e,t,n){var r=wr.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Zve(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Jve(e,t,n){var r=wr.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function eye(e,t,n){var r=wr.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Mz(e,t,n){var r=wr.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function tye(e,t,n){var r=wr.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Dz(e,t,n){var r=wr.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function nye(e,t,n){var r=wr.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function rye(e,t,n){var r=wr.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function iye(e,t,n){var r=wr.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function aye(e,t,n){var r=wr.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function oye(e,t,n){var r=qve.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function sye(e,t,n){var r=wr.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function lye(e,t,n){var r=wr.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Rz(e,t){return $t(e.getDate(),t,2)}function uye(e,t){return $t(e.getHours(),t,2)}function cye(e,t){return $t(e.getHours()%12||12,t,2)}function fye(e,t){return $t(1+Wp.count(gs(e),e),t,3)}function Gq(e,t){return $t(e.getMilliseconds(),t,3)}function dye(e,t){return Gq(e,t)+"000"}function hye(e,t){return $t(e.getMonth()+1,t,2)}function mye(e,t){return $t(e.getMinutes(),t,2)}function pye(e,t){return $t(e.getSeconds(),t,2)}function gye(e){var t=e.getDay();return t===0?7:t}function vye(e,t){return $t(xb.count(gs(e)-1,e),t,2)}function Wq(e){var t=e.getDay();return t>=4||t===0?bd(e):bd.ceil(e)}function yye(e,t){return e=Wq(e),$t(bd.count(gs(e),e)+(gs(e).getDay()===4),t,2)}function xye(e){return e.getDay()}function bye(e,t){return $t(Dx.count(gs(e)-1,e),t,2)}function wye(e,t){return $t(e.getFullYear()%100,t,2)}function Sye(e,t){return e=Wq(e),$t(e.getFullYear()%100,t,2)}function Eye(e,t){return $t(e.getFullYear()%1e4,t,4)}function jye(e,t){var n=e.getDay();return e=n>=4||n===0?bd(e):bd.ceil(e),$t(e.getFullYear()%1e4,t,4)}function _ye(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+$t(t/60|0,"0",2)+$t(t%60,"0",2)}function Iz(e,t){return $t(e.getUTCDate(),t,2)}function Cye(e,t){return $t(e.getUTCHours(),t,2)}function kye(e,t){return $t(e.getUTCHours()%12||12,t,2)}function Nye(e,t){return $t(1+yb.count(vs(e),e),t,3)}function Qq(e,t){return $t(e.getUTCMilliseconds(),t,3)}function Aye(e,t){return Qq(e,t)+"000"}function Oye(e,t){return $t(e.getUTCMonth()+1,t,2)}function Tye(e,t){return $t(e.getUTCMinutes(),t,2)}function Pye(e,t){return $t(e.getUTCSeconds(),t,2)}function Mye(e){var t=e.getUTCDay();return t===0?7:t}function Dye(e,t){return $t(bb.count(vs(e)-1,e),t,2)}function Zq(e){var t=e.getUTCDay();return t>=4||t===0?wd(e):wd.ceil(e)}function Rye(e,t){return e=Zq(e),$t(wd.count(vs(e),e)+(vs(e).getUTCDay()===4),t,2)}function Iye(e){return e.getUTCDay()}function Lye(e,t){return $t(Rx.count(vs(e)-1,e),t,2)}function zye(e,t){return $t(e.getUTCFullYear()%100,t,2)}function $ye(e,t){return e=Zq(e),$t(e.getUTCFullYear()%100,t,2)}function Bye(e,t){return $t(e.getUTCFullYear()%1e4,t,4)}function Fye(e,t){var n=e.getUTCDay();return e=n>=4||n===0?wd(e):wd.ceil(e),$t(e.getUTCFullYear()%1e4,t,4)}function Uye(){return"+0000"}function Lz(){return"%"}function zz(e){return+e}function $z(e){return Math.floor(+e/1e3)}var jf,Jq,e9;Hye({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 Hye(e){return jf=Hve(e),Jq=jf.format,jf.parse,e9=jf.utcFormat,jf.utcParse,jf}function qye(e){return new Date(e)}function Vye(e){return e instanceof Date?+e:+new Date(+e)}function NA(e,t,n,r,i,a,o,l,c,f){var h=mA(),d=h.invert,g=h.domain,v=f(".%L"),b=f(":%S"),w=f("%I:%M"),S=f("%I %p"),E=f("%a %d"),C=f("%b %d"),_=f("%B"),N=f("%Y");function O(A){return(c(A)<A?v:l(A)<A?b:o(A)<A?w:a(A)<A?S:r(A)<A?i(A)<A?E:C:n(A)<A?_:N)(A)}return h.invert=function(A){return new Date(d(A))},h.domain=function(A){return arguments.length?g(Array.from(A,Vye)):g().map(qye)},h.ticks=function(A){var T=g();return e(T[0],T[T.length-1],A??10)},h.tickFormat=function(A,T){return T==null?O:f(T)},h.nice=function(A){var T=g();return(!A||typeof A.range!="function")&&(A=t(T[0],T[T.length-1],A??10)),A?g(Bq(T,A)):h},h.copy=function(){return Gp(h,NA(e,t,n,r,i,a,o,l,c,f))},h}function Kye(){return pa.apply(NA(Fve,Uve,gs,CA,xb,Wp,jA,SA,Uu,Jq).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Yye(){return pa.apply(NA($ve,Bve,vs,kA,bb,yb,_A,EA,Uu,e9).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function wb(){var e=0,t=1,n,r,i,a,o=ei,l=!1,c;function f(d){return d==null||isNaN(d=+d)?c:o(i===0?.5:(d=(a(d)-n)*i,l?Math.max(0,Math.min(1,d)):d))}f.domain=function(d){return arguments.length?([e,t]=d,n=a(e=+e),r=a(t=+t),i=n===r?0:1/(r-n),f):[e,t]},f.clamp=function(d){return arguments.length?(l=!!d,f):l},f.interpolator=function(d){return arguments.length?(o=d,f):o};function h(d){return function(g){var v,b;return arguments.length?([v,b]=g,o=d(v,b),f):[o(0),o(1)]}}return f.range=h(is),f.rangeRound=h(hA),f.unknown=function(d){return arguments.length?(c=d,f):c},function(d){return a=d,n=d(e),r=d(t),i=n===r?0:1/(r-n),f}}function nu(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function t9(){var e=tu(wb()(ei));return e.copy=function(){return nu(e,t9())},As.apply(e,arguments)}function n9(){var e=vA(wb()).domain([1,10]);return e.copy=function(){return nu(e,n9()).base(e.base())},As.apply(e,arguments)}function r9(){var e=yA(wb());return e.copy=function(){return nu(e,r9()).constant(e.constant())},As.apply(e,arguments)}function AA(){var e=xA(wb());return e.copy=function(){return nu(e,AA()).exponent(e.exponent())},As.apply(e,arguments)}function Xye(){return AA.apply(null,arguments).exponent(.5)}function i9(){var e=[],t=ei;function n(r){if(r!=null&&!isNaN(r=+r))return t((Yp(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let i of r)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(Ll),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,i)=>t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,a)=>kge(e,a/r))},n.copy=function(){return i9(t).domain(e)},As.apply(n,arguments)}function Sb(){var e=0,t=.5,n=1,r=1,i,a,o,l,c,f=ei,h,d=!1,g;function v(w){return isNaN(w=+w)?g:(w=.5+((w=+h(w))-a)*(r*w<r*a?l:c),f(d?Math.max(0,Math.min(1,w)):w))}v.domain=function(w){return arguments.length?([e,t,n]=w,i=h(e=+e),a=h(t=+t),o=h(n=+n),l=i===a?0:.5/(a-i),c=a===o?0:.5/(o-a),r=a<i?-1:1,v):[e,t,n]},v.clamp=function(w){return arguments.length?(d=!!w,v):d},v.interpolator=function(w){return arguments.length?(f=w,v):f};function b(w){return function(S){var E,C,_;return arguments.length?([E,C,_]=S,f=ove(w,[E,C,_]),v):[f(0),f(.5),f(1)]}}return v.range=b(is),v.rangeRound=b(hA),v.unknown=function(w){return arguments.length?(g=w,v):g},function(w){return h=w,i=w(e),a=w(t),o=w(n),l=i===a?0:.5/(a-i),c=a===o?0:.5/(o-a),r=a<i?-1:1,v}}function a9(){var e=tu(Sb()(ei));return e.copy=function(){return nu(e,a9())},As.apply(e,arguments)}function o9(){var e=vA(Sb()).domain([.1,1,10]);return e.copy=function(){return nu(e,o9()).base(e.base())},As.apply(e,arguments)}function s9(){var e=yA(Sb());return e.copy=function(){return nu(e,s9()).constant(e.constant())},As.apply(e,arguments)}function OA(){var e=xA(Sb());return e.copy=function(){return nu(e,OA()).exponent(e.exponent())},As.apply(e,arguments)}function Gye(){return OA.apply(null,arguments).exponent(.5)}const bm=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:cA,scaleDiverging:a9,scaleDivergingLog:o9,scaleDivergingPow:OA,scaleDivergingSqrt:Gye,scaleDivergingSymlog:s9,scaleIdentity:$q,scaleImplicit:hC,scaleLinear:zq,scaleLog:Fq,scaleOrdinal:uA,scalePoint:Oge,scalePow:bA,scaleQuantile:qq,scaleQuantize:Vq,scaleRadial:Hq,scaleSequential:t9,scaleSequentialLog:n9,scaleSequentialPow:AA,scaleSequentialQuantile:i9,scaleSequentialSqrt:Xye,scaleSequentialSymlog:r9,scaleSqrt:Ave,scaleSymlog:Uq,scaleThreshold:Kq,scaleTime:Kye,scaleUtc:Yye,tickFormat:Lq},Symbol.toStringTag,{value:"Module"}));function Wye(e){if(e in bm)return bm[e]();var t="scale".concat(Rp(e));if(t in bm)return bm[t]()}function Bz(e,t,n){if(typeof e=="function")return e.copy().domain(t).range(n);if(e!=null){var r=Wye(e);if(r!=null)return r.domain(t).range(n),r}}function TA(e,t,n,r){if(!(n==null||r==null))return typeof e.scale=="function"?Bz(e.scale,n,r):Bz(t,n,r)}function Qye(e){return"scale".concat(Rp(e))}function Zye(e){return Qye(e)in bm}var l9=(e,t,n)=>{if(e!=null){var{scale:r,type:i}=e;if(r==="auto")return i==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!t)?"point":i==="category"?"band":"linear";if(typeof r=="string")return Zye(r)?r:"point"}};function Jye(e,t){for(var n=0,r=e.length,i=e[0]<e[e.length-1];n<r;){var a=Math.floor((n+r)/2);(i?e[a]<t:e[a]>t)?n=a+1:r=a}return n}function u9(e,t){if(e){var n=t??e.domain(),r=n.map(a=>{var o;return(o=e(a))!==null&&o!==void 0?o:0}),i=e.range();if(!(n.length===0||i.length<2))return a=>{var o,l,c=Jye(r,a);if(c<=0)return n[0];if(c>=n.length)return n[n.length-1];var f=(o=r[c-1])!==null&&o!==void 0?o:0,h=(l=r[c])!==null&&l!==void 0?l:0;return Math.abs(a-f)<=Math.abs(a-h)?n[c-1]:n[c]}}}function exe(e){if(e!=null)return"invert"in e&&typeof e.invert=="function"?e.invert.bind(e):u9(e,void 0)}function Fz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ix(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Fz(Object(n),!0).forEach(function(r){txe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fz(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function txe(e,t,n){return(t=nxe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nxe(e){var t=rxe(e,"string");return typeof t=="symbol"?t:t+""}function rxe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var yC=[0,"auto"],nr={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,niceTicks:"auto"},c9=(e,t)=>e.cartesianAxis.xAxis[t],Os=(e,t)=>{var n=c9(e,t);return n??nr},rr={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:yC,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,niceTicks:"auto",width:$p},f9=(e,t)=>e.cartesianAxis.yAxis[t],Ts=(e,t)=>{var n=f9(e,t);return n??rr},ixe={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:""},PA=(e,t)=>{var n=e.cartesianAxis.zAxis[t];return n??ixe},Ln=(e,t,n)=>{switch(t){case"xAxis":return Os(e,n);case"yAxis":return Ts(e,n);case"zAxis":return PA(e,n);case"angleAxis":return rA(e,n);case"radiusAxis":return iA(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},axe=(e,t,n)=>{switch(t){case"xAxis":return Os(e,n);case"yAxis":return Ts(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},Kd=(e,t,n)=>{switch(t){case"xAxis":return Os(e,n);case"yAxis":return Ts(e,n);case"angleAxis":return rA(e,n);case"radiusAxis":return iA(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},d9=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function MA(e,t){return n=>{switch(e){case"xAxis":return"xAxisId"in n&&n.xAxisId===t;case"yAxis":return"yAxisId"in n&&n.yAxisId===t;case"zAxis":return"zAxisId"in n&&n.zAxisId===t;case"angleAxis":return"angleAxisId"in n&&n.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in n&&n.radiusAxisId===t;default:return!1}}}var Eb=e=>e.graphicalItems.cartesianItems,oxe=le([kn,Kp],MA),DA=(e,t,n)=>e.filter(n).filter(r=>(t==null?void 0:t.includeHidden)===!0?!0:!r.hide),Qp=le([Eb,Ln,oxe],DA,{memoizeOptions:{resultEqualityCheck:gb}}),h9=le([Qp],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(mb)),m9=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),sxe=le([Qp],m9),RA=e=>e.map(t=>t.data).filter(Boolean).flat(1),lxe=le([Qp],RA,{memoizeOptions:{resultEqualityCheck:gb}}),IA=(e,t)=>{var{chartData:n=[],dataStartIndex:r,dataEndIndex:i}=t;return e.length>0?e:n.slice(r,i+1)},LA=le([lxe,WN],IA),zA=(e,t,n)=>(t==null?void 0:t.dataKey)!=null?e.map(r=>({value:en(r,t.dataKey)})):n.length>0?n.map(r=>r.dataKey).flatMap(r=>e.map(i=>({value:en(i,r)}))):e.map(r=>({value:r})),Zp=le([LA,Ln,Qp],zA);function Vf(e){if(vo(e)||e instanceof Date){var t=Number(e);if(At(t))return t}}function Uz(e){if(Array.isArray(e)){var t=[Vf(e[0]),Vf(e[1])];return ho(t)?t:void 0}var n=Vf(e);if(n!=null)return[n,n]}function ys(e){return e.map(Vf).filter(yi)}function uxe(e,t){var n=Vf(e),r=Vf(t);return n==null&&r==null?0:n==null?-1:r==null?1:n-r}var cxe=le([Zp],e=>e==null?void 0:e.map(t=>t.value).sort(uxe));function p9(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function fxe(e,t,n){return!n||typeof t!="number"||go(t)?[]:n.length?ys(n.flatMap(r=>{var i=en(e,r.dataKey),a,o;if(Array.isArray(i)?[a,o]=i:a=o=i,!(!At(a)||!At(o)))return[t-a,t+o]})):[]}var fr=e=>{var t=br(e),n=Vd(e);return Kd(e,t,n)},Jp=le([fr],e=>e==null?void 0:e.dataKey),dxe=le([h9,WN,fr],jq),g9=(e,t,n,r)=>{var i={},a=t.reduce((o,l)=>{if(l.stackId==null)return o;var c=o[l.stackId];return c==null&&(c=[]),c.push(l),o[l.stackId]=c,o},i);return Object.fromEntries(Object.entries(a).map(o=>{var[l,c]=o,f=r?[...c].reverse():c,h=f.map(oA);return[l,{stackedData:Jde(e,h,n),graphicalItems:f}]}))},xC=le([dxe,h9,Vp,vq],g9),v9=(e,t,n,r)=>{var{dataStartIndex:i,dataEndIndex:a}=t;if(r==null&&n!=="zAxis"){var o=ihe(e,i,a);if(!(o!=null&&o[0]===0&&o[1]===0))return o}},hxe=le([Ln],e=>e.allowDataOverflow),$A=e=>{var t;if(e==null||!("domain"in e))return yC;if(e.domain!=null)return e.domain;if("ticks"in e&&e.ticks!=null){if(e.type==="number"){var n=ys(e.ticks);return[Math.min(...n),Math.max(...n)]}if(e.type==="category")return e.ticks.map(String)}return(t=e==null?void 0:e.domain)!==null&&t!==void 0?t:yC},BA=le([Ln],$A),FA=le([BA,hxe],iq),mxe=le([xC,Ns,kn,FA],v9,{memoizeOptions:{resultEqualityCheck:pb}}),jb=e=>e.errorBars,pxe=(e,t,n)=>e.flatMap(r=>t[r.id]).filter(Boolean).filter(r=>p9(n,r)),Lx=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n.filter(Boolean);if(i.length!==0){var a=i.flat(),o=Math.min(...a),l=Math.max(...a);return[o,l]}},UA=(e,t,n,r,i)=>{var a,o;if(n.length>0&&e.forEach(l=>{n.forEach(c=>{var f,h,d=(f=r[c.id])===null||f===void 0?void 0:f.filter(E=>p9(i,E)),g=en(l,(h=t.dataKey)!==null&&h!==void 0?h:c.dataKey),v=fxe(l,g,d);if(v.length>=2){var b=Math.min(...v),w=Math.max(...v);(a==null||b<a)&&(a=b),(o==null||w>o)&&(o=w)}var S=Uz(g);S!=null&&(a=a==null?S[0]:Math.min(a,S[0]),o=o==null?S[1]:Math.max(o,S[1]))})}),(t==null?void 0:t.dataKey)!=null&&e.forEach(l=>{var c=Uz(en(l,t.dataKey));c!=null&&(a=a==null?c[0]:Math.min(a,c[0]),o=o==null?c[1]:Math.max(o,c[1]))}),At(a)&&At(o))return[a,o]},gxe=le([LA,Ln,sxe,jb,kn],UA,{memoizeOptions:{resultEqualityCheck:pb}});function vxe(e){var{value:t}=e;if(vo(t)||t instanceof Date)return t}var yxe=(e,t,n)=>{var r=e.map(vxe).filter(i=>i!=null);return n&&(t.dataKey==null||t.allowDuplicatedCategory&&kU(r))?rq(0,e.length):t.allowDuplicatedCategory?r:Array.from(new Set(r))},y9=e=>e.referenceElements.dots,Yd=(e,t,n)=>e.filter(r=>r.ifOverflow==="extendDomain").filter(r=>t==="xAxis"?r.xAxisId===n:r.yAxisId===n),xxe=le([y9,kn,Kp],Yd),x9=e=>e.referenceElements.areas,bxe=le([x9,kn,Kp],Yd),b9=e=>e.referenceElements.lines,wxe=le([b9,kn,Kp],Yd),w9=(e,t)=>{if(e!=null){var n=ys(e.map(r=>t==="xAxis"?r.x:r.y));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},Sxe=le(xxe,kn,w9),S9=(e,t)=>{if(e!=null){var n=ys(e.flatMap(r=>[t==="xAxis"?r.x1:r.y1,t==="xAxis"?r.x2:r.y2]));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},Exe=le([bxe,kn],S9);function jxe(e){var t;if(e.x!=null)return ys([e.x]);var n=(t=e.segment)===null||t===void 0?void 0:t.map(r=>r.x);return n==null||n.length===0?[]:ys(n)}function _xe(e){var t;if(e.y!=null)return ys([e.y]);var n=(t=e.segment)===null||t===void 0?void 0:t.map(r=>r.y);return n==null||n.length===0?[]:ys(n)}var E9=(e,t)=>{if(e!=null){var n=e.flatMap(r=>t==="xAxis"?jxe(r):_xe(r));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},Cxe=le([wxe,kn],E9),kxe=le(Sxe,Cxe,Exe,(e,t,n)=>Lx(e,n,t)),HA=(e,t,n,r,i,a,o,l)=>{if(n!=null)return n;var c=o==="vertical"&&l==="xAxis"||o==="horizontal"&&l==="yAxis",f=c?Lx(r,a,i):Lx(a,i);return nge(t,f,e.allowDataOverflow)},Nxe=le([Ln,BA,FA,mxe,gxe,kxe,Bt,kn],HA,{memoizeOptions:{resultEqualityCheck:pb}}),Axe=[0,1],qA=(e,t,n,r,i,a,o)=>{if(!((e==null||n==null||n.length===0)&&o===void 0)){var{dataKey:l,type:c}=e,f=_s(t,a);if(f&&l==null){var h;return rq(0,(h=n==null?void 0:n.length)!==null&&h!==void 0?h:0)}return c==="category"?yxe(r,e,f):i==="expand"?Axe:o}},VA=le([Ln,Bt,LA,Zp,Vp,kn,Nxe],qA),ru=le([Ln,d9,eA],l9),KA=(e,t,n)=>{var{niceTicks:r}=t;if(r!=="none"){var i=$A(t),a=Array.isArray(i)&&(i[0]==="auto"||i[1]==="auto");if((r==="snap125"||r==="adaptive")&&t!=null&&t.tickCount&&ho(e)){if(a)return QL(e,t.tickCount,t.allowDecimals,r);if(t.type==="number")return ZL(e,t.tickCount,t.allowDecimals,r)}if(r==="auto"&&n==="linear"&&t!=null&&t.tickCount){if(a&&ho(e))return QL(e,t.tickCount,t.allowDecimals,"adaptive");if(t.type==="number"&&ho(e))return ZL(e,t.tickCount,t.allowDecimals,"adaptive")}}},YA=le([VA,Kd,ru],KA),XA=(e,t,n,r)=>{if(r!=="angleAxis"&&(e==null?void 0:e.type)==="number"&&ho(t)&&Array.isArray(n)&&n.length>0){var i,a,o=t[0],l=(i=n[0])!==null&&i!==void 0?i:0,c=t[1],f=(a=n[n.length-1])!==null&&a!==void 0?a:0;return[Math.min(o,l),Math.max(c,f)]}return t},Oxe=le([Ln,VA,YA,kn],XA),Txe=le(Zp,Ln,(e,t)=>{if(!(!t||t.type!=="number")){var n=1/0,r=Array.from(ys(e.map(d=>d.value))).sort((d,g)=>d-g),i=r[0],a=r[r.length-1];if(i==null||a==null)return 1/0;var o=a-i;if(o===0)return 1/0;for(var l=0;l<r.length-1;l++){var c=r[l],f=r[l+1];if(!(c==null||f==null)){var h=f-c;n=Math.min(n,h)}}return n/o}}),j9=le(Txe,Bt,gq,ur,(e,t,n,r,i)=>i,(e,t,n,r,i)=>{if(!At(e))return 0;var a=t==="vertical"?r.height:r.width;if(i==="gap")return e*a/2;if(i==="no-gap"){var o=Ur(n,e*a),l=e*a/2;return l-o-(l-o)/a*o}return 0}),Pxe=(e,t,n)=>{var r=Os(e,t);return r==null||typeof r.padding!="string"?0:j9(e,"xAxis",t,n,r.padding)},Mxe=(e,t,n)=>{var r=Ts(e,t);return r==null||typeof r.padding!="string"?0:j9(e,"yAxis",t,n,r.padding)},Dxe=le(Os,Pxe,(e,t)=>{var n,r;if(e==null)return{left:0,right:0};var{padding:i}=e;return typeof i=="string"?{left:t,right:t}:{left:((n=i.left)!==null&&n!==void 0?n:0)+t,right:((r=i.right)!==null&&r!==void 0?r:0)+t}}),Rxe=le(Ts,Mxe,(e,t)=>{var n,r;if(e==null)return{top:0,bottom:0};var{padding:i}=e;return typeof i=="string"?{top:t,bottom:t}:{top:((n=i.top)!==null&&n!==void 0?n:0)+t,bottom:((r=i.bottom)!==null&&r!==void 0?r:0)+t}}),Ixe=le([ur,Dxe,ab,ib,(e,t,n)=>n],(e,t,n,r,i)=>{var{padding:a}=r;return i?[a.left,n.width-a.right]:[e.left+t.left,e.left+e.width-t.right]}),Lxe=le([ur,Bt,Rxe,ab,ib,(e,t,n)=>n],(e,t,n,r,i,a)=>{var{padding:o}=i;return a?[r.height-o.bottom,o.top]:t==="horizontal"?[e.top+e.height-n.bottom,e.top+n.top]:[e.top+n.top,e.top+e.height-n.bottom]}),eg=(e,t,n,r)=>{var i;switch(t){case"xAxis":return Ixe(e,n,r);case"yAxis":return Lxe(e,n,r);case"zAxis":return(i=PA(e,n))===null||i===void 0?void 0:i.range;case"angleAxis":return wq(e);case"radiusAxis":return Sq(e,n);default:return}},_9=le([Ln,eg],fb),zxe=le([ru,Oxe],_q),GA=le([Ln,ru,zxe,_9],TA),C9=(e,t,n,r)=>{if(!(n==null||n.dataKey==null)){var{type:i,scale:a}=n,o=_s(e,r);if(o&&(i==="number"||a!=="auto"))return t.map(l=>l.value)}},WA=le([Bt,Zp,Kd,kn],C9),_b=le([GA],sA);le([GA],exe);le([GA,cxe],u9);le([Qp,jb,kn],pxe);function k9(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var Cb=(e,t)=>t,kb=(e,t,n)=>n,$xe=le(nb,Cb,kb,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(k9)),Bxe=le(rb,Cb,kb,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(k9)),N9=(e,t)=>({width:e.width,height:t.height}),Fxe=(e,t)=>{var n=typeof t.width=="number"?t.width:$p;return{width:n,height:e.height}},A9=le(ur,Os,N9),Uxe=(e,t,n)=>{switch(t){case"top":return e.top;case"bottom":return n-e.bottom;default:return 0}},Hxe=(e,t,n)=>{switch(t){case"left":return e.left;case"right":return n-e.right;default:return 0}},qxe=le(ks,ur,$xe,Cb,kb,(e,t,n,r,i)=>{var a={},o;return n.forEach(l=>{var c=N9(t,l);o==null&&(o=Uxe(t,r,e));var f=r==="top"&&!i||r==="bottom"&&i;a[l.id]=o-Number(f)*c.height,o+=(f?-1:1)*c.height}),a}),Vxe=le(Cs,ur,Bxe,Cb,kb,(e,t,n,r,i)=>{var a={},o;return n.forEach(l=>{var c=Fxe(t,l);o==null&&(o=Hxe(t,r,e));var f=r==="left"&&!i||r==="right"&&i;a[l.id]=o-Number(f)*c.width,o+=(f?-1:1)*c.width}),a}),Kxe=(e,t)=>{var n=Os(e,t);if(n!=null)return qxe(e,n.orientation,n.mirror)},Yxe=le([ur,Os,Kxe,(e,t)=>t],(e,t,n,r)=>{if(t!=null){var i=n==null?void 0:n[r];return i==null?{x:e.left,y:0}:{x:e.left,y:i}}}),Xxe=(e,t)=>{var n=Ts(e,t);if(n!=null)return Vxe(e,n.orientation,n.mirror)},Gxe=le([ur,Ts,Xxe,(e,t)=>t],(e,t,n,r)=>{if(t!=null){var i=n==null?void 0:n[r];return i==null?{x:0,y:e.top}:{x:i,y:e.top}}}),O9=le(ur,Ts,(e,t)=>{var n=typeof t.width=="number"?t.width:$p;return{width:n,height:e.height}}),Hz=(e,t,n)=>{switch(t){case"xAxis":return A9(e,n).width;case"yAxis":return O9(e,n).height;default:return}},T9=(e,t,n,r)=>{if(n!=null){var{allowDuplicatedCategory:i,type:a,dataKey:o}=n,l=_s(e,r),c=t.map(f=>f.value);if(o&&l&&a==="category"&&i&&kU(c))return c}},QA=le([Bt,Zp,Ln,kn],T9),qz=le([Bt,axe,ru,_b,QA,WA,eg,YA,kn],(e,t,n,r,i,a,o,l,c)=>{if(t!=null){var f=_s(e,c);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:c,categoricalDomain:a,duplicateDomain:i,isCategorical:f,niceTicks:l,range:o,realScaleType:n,scale:r}}}),Wxe=(e,t,n,r,i,a,o,l,c)=>{if(!(t==null||r==null)){var f=_s(e,c),{type:h,ticks:d,tickCount:g}=t,v=n==="scaleBand"&&typeof r.bandwidth=="function"?r.bandwidth()/2:2,b=h==="category"&&r.bandwidth?r.bandwidth()/v:0;b=c==="angleAxis"&&a!=null&&a.length>=2?vr(a[0]-a[1])*2*b:b;var w=d||i;return w?w.map((S,E)=>{var C=o?o.indexOf(S):S,_=r.map(C);return At(_)?{index:E,coordinate:_+b,value:S,offset:b}:null}).filter(yi):f&&l?l.map((S,E)=>{var C=r.map(S);return At(C)?{coordinate:C+b,value:S,index:E,offset:b}:null}).filter(yi):r.ticks?r.ticks(g).map((S,E)=>{var C=r.map(S);return At(C)?{coordinate:C+b,value:S,index:E,offset:b}:null}).filter(yi):r.domain().map((S,E)=>{var C=r.map(S);return At(C)?{coordinate:C+b,value:o?o[S]:S,index:E,offset:b}:null}).filter(yi)}},P9=le([Bt,Kd,ru,_b,YA,eg,QA,WA,kn],Wxe),Qxe=(e,t,n,r,i,a,o)=>{if(!(t==null||n==null||r==null||r[0]===r[1])){var l=_s(e,o),{tickCount:c}=t,f=0;return f=o==="angleAxis"&&(r==null?void 0:r.length)>=2?vr(r[0]-r[1])*2*f:f,l&&a?a.map((h,d)=>{var g=n.map(h);return At(g)?{coordinate:g+f,value:h,index:d,offset:f}:null}).filter(yi):n.ticks?n.ticks(c).map((h,d)=>{var g=n.map(h);return At(g)?{coordinate:g+f,value:h,index:d,offset:f}:null}).filter(yi):n.domain().map((h,d)=>{var g=n.map(h);return At(g)?{coordinate:g+f,value:i?i[h]:h,index:d,offset:f}:null}).filter(yi)}},Vl=le([Bt,Kd,_b,eg,QA,WA,kn],Qxe),Kl=le(Ln,_b,(e,t)=>{if(!(e==null||t==null))return Ix(Ix({},e),{},{scale:t})}),Zxe=le([Ln,ru,VA,_9],TA),Jxe=le([Zxe],sA);le((e,t,n)=>PA(e,n),Jxe,(e,t)=>{if(!(e==null||t==null))return Ix(Ix({},e),{},{scale:t})});var e0e=le([Bt,nb,rb],(e,t,n)=>{switch(e){case"horizontal":return t.some(r=>r.reversed)?"right-to-left":"left-to-right";case"vertical":return n.some(r=>r.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),t0e=(e,t,n)=>{var r;return(r=e.renderedTicks[t])===null||r===void 0?void 0:r[n]};le([t0e],e=>{if(!(!e||e.length===0))return t=>{var n,r=1/0,i=e[0];for(var a of e){var o=Math.abs(a.coordinate-t);o<r&&(r=o,i=a)}return(n=i)===null||n===void 0?void 0:n.value}});var M9=e=>e.options.defaultTooltipEventType,D9=e=>e.options.validateTooltipEventTypes;function R9(e,t,n){if(e==null)return t;var r=e?"axis":"item";return n==null?t:n.includes(r)?r:t}function ZA(e,t){var n=M9(e),r=D9(e);return R9(t,n,r)}function n0e(e){return Ie(t=>ZA(t,e))}var I9=(e,t)=>{var n,r=Number(t);if(!(go(r)||t==null))return r>=0?e==null||(n=e[r])===null||n===void 0?void 0:n.value:void 0},r0e=e=>e.tooltip.settings,Sl={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},i0e={itemInteraction:{click:Sl,hover:Sl},axisInteraction:{click:Sl,hover:Sl},keyboardInteraction:Sl,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0,graphicalItemId:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},L9=qr({name:"tooltip",initialState:i0e,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:vn()},replaceTooltipEntrySettings:{reducer(e,t){var{prev:n,next:r}=t.payload,i=sa(e).tooltipItemPayloads.indexOf(n);i>-1&&(e.tooltipItemPayloads[i]=r)},prepare:vn()},removeTooltipEntrySettings:{reducer(e,t){var n=sa(e).tooltipItemPayloads.indexOf(t.payload);n>-1&&e.tooltipItemPayloads.splice(n,1)},prepare:vn()},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.graphicalItemId=t.payload.activeGraphicalItemId,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.graphicalItemId=t.payload.activeGraphicalItemId,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}}}),{addTooltipEntrySettings:a0e,replaceTooltipEntrySettings:o0e,removeTooltipEntrySettings:s0e,setTooltipSettingsState:l0e,setActiveMouseOverItemIndex:z9,mouseLeaveItem:u0e,mouseLeaveChart:$9,setActiveClickItemIndex:c0e,setMouseOverAxisIndex:B9,setMouseClickAxisIndex:f0e,setSyncInteraction:bC,setKeyboardInteraction:zx}=L9.actions,d0e=L9.reducer;function Vz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ty(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Vz(Object(n),!0).forEach(function(r){h0e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vz(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function h0e(e,t,n){return(t=m0e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m0e(e){var t=p0e(e,"string");return typeof t=="symbol"?t:t+""}function p0e(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function g0e(e,t,n){return t==="axis"?n==="click"?e.axisInteraction.click:e.axisInteraction.hover:n==="click"?e.itemInteraction.click:e.itemInteraction.hover}function v0e(e){return e.index!=null}var F9=(e,t,n,r)=>{if(t==null)return Sl;var i=g0e(e,t,n);if(i==null)return Sl;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(v0e(i)){if(a)return ty(ty({},i),{},{active:!0})}else if(r!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:r,graphicalItemId:void 0};return ty(ty({},Sl),{},{coordinate:i.coordinate})};function y0e(e){if(typeof e=="number")return Number.isFinite(e)?e:void 0;if(e instanceof Date){var t=e.valueOf();return Number.isFinite(t)?t:void 0}var n=Number(e);return Number.isFinite(n)?n:void 0}function x0e(e,t){var n=y0e(e),r=t[0],i=t[1];if(n===void 0)return!1;var a=Math.min(r,i),o=Math.max(r,i);return n>=a&&n<=o}function b0e(e,t,n){if(n==null||t==null)return!0;var r=en(e,t);return r==null||!ho(n)?!0:x0e(r,n)}var JA=(e,t,n,r)=>{var i=e==null?void 0:e.index;if(i==null)return null;var a=Number(i);if(!At(a))return i;var o=0,l=1/0;t.length>0&&(l=t.length-1);var c=Math.max(o,Math.min(a,l)),f=t[c];return f==null||b0e(f,n,r)?String(c):null},U9=(e,t,n,r,i,a,o)=>{if(a!=null){var l=o[0],c=l==null?void 0:l.getPosition(a);if(c!=null)return c;var f=i==null?void 0:i[Number(a)];if(f)switch(n){case"horizontal":return{x:f.coordinate,y:(r.top+t)/2};default:return{x:(r.left+e)/2,y:f.coordinate}}}},H9=(e,t,n,r)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var i;if(n==="hover"?i=e.itemInteraction.hover.graphicalItemId:i=e.itemInteraction.click.graphicalItemId,e.syncInteraction.active&&i==null)return e.tooltipItemPayloads;if(i==null&&r!=null){var a=e.tooltipItemPayloads[0];return a!=null?[a]:[]}return e.tooltipItemPayloads.filter(o=>{var l;return((l=o.settings)===null||l===void 0?void 0:l.graphicalItemId)===i})},q9=e=>e.options.tooltipPayloadSearcher,Xd=e=>e.tooltip;function Kz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Yz(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Kz(Object(n),!0).forEach(function(r){w0e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kz(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function w0e(e,t,n){return(t=S0e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function S0e(e){var t=E0e(e,"string");return typeof t=="symbol"?t:t+""}function E0e(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function j0e(e){if(typeof e=="string"||typeof e=="number")return e}function _0e(e){if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e}function C0e(e){if(typeof e=="string"||typeof e=="number")return e;if(typeof e=="function")return t=>e(t)}function Xz(e){if(typeof e=="string")return e}function k0e(e){if(!(e==null||typeof e!="object")){var t="name"in e?j0e(e.name):void 0,n="unit"in e?_0e(e.unit):void 0,r="dataKey"in e?C0e(e.dataKey):void 0,i="payload"in e?e.payload:void 0,a="color"in e?Xz(e.color):void 0,o="fill"in e?Xz(e.fill):void 0;return{name:t,unit:n,dataKey:r,payload:i,color:a,fill:o}}}function N0e(e,t){return e??t}var V9=(e,t,n,r,i,a,o)=>{if(!(t==null||a==null)){var{chartData:l,computedData:c,dataStartIndex:f,dataEndIndex:h}=n,d=[];return e.reduce((g,v)=>{var b,{dataDefinedOnItem:w,settings:S}=v,E=N0e(w,l),C=Array.isArray(E)?EH(E,f,h):E,_=(b=S==null?void 0:S.dataKey)!==null&&b!==void 0?b:r,N=S==null?void 0:S.nameKey,O;if(r&&Array.isArray(C)&&!Array.isArray(C[0])&&o==="axis"?O=NU(C,r,i):O=a(C,t,c,N),Array.isArray(O))O.forEach(T=>{var P,I,z=k0e(T),F=z==null?void 0:z.name,B=z==null?void 0:z.dataKey,G=z==null?void 0:z.payload,L=Yz(Yz({},S),{},{name:F,unit:z==null?void 0:z.unit,color:(P=z==null?void 0:z.color)!==null&&P!==void 0?P:S==null?void 0:S.color,fill:(I=z==null?void 0:z.fill)!==null&&I!==void 0?I:S==null?void 0:S.fill});g.push($I({tooltipEntrySettings:L,dataKey:B,payload:G,value:en(G,B),name:F==null?void 0:String(F)}))});else{var A;g.push($I({tooltipEntrySettings:S,dataKey:_,payload:O,value:en(O,_),name:(A=en(O,N))!==null&&A!==void 0?A:S==null?void 0:S.name}))}return g},d)}},eO=le([fr,d9,eA],l9),A0e=le([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),O0e=le([br,Vd],MA),Gd=le([A0e,fr,O0e],DA,{memoizeOptions:{resultEqualityCheck:gb}}),T0e=le([Gd],e=>e.filter(mb)),P0e=le([Gd],RA,{memoizeOptions:{resultEqualityCheck:gb}}),Wd=le([P0e,Ns],IA),M0e=le([T0e,Ns,fr],jq),tO=le([Wd,fr,Gd],zA),K9=le([fr],$A),D0e=le([fr],e=>e.allowDataOverflow),Y9=le([K9,D0e],iq),R0e=le([Gd],e=>e.filter(mb)),I0e=le([M0e,R0e,Vp,vq],g9),L0e=le([I0e,Ns,br,Y9],v9),z0e=le([Gd],m9),$0e=le([Wd,fr,z0e,jb,br],UA,{memoizeOptions:{resultEqualityCheck:pb}}),B0e=le([y9,br,Vd],Yd),F0e=le([B0e,br],w9),U0e=le([x9,br,Vd],Yd),H0e=le([U0e,br],S9),q0e=le([b9,br,Vd],Yd),V0e=le([q0e,br],E9),K0e=le([F0e,V0e,H0e],Lx),Y0e=le([fr,K9,Y9,L0e,$0e,K0e,Bt,br],HA),tg=le([fr,Bt,Wd,tO,Vp,br,Y0e],qA),X0e=le([tg,fr,eO],KA),G0e=le([fr,tg,X0e,br],XA),X9=e=>{var t=br(e),n=Vd(e),r=!1;return eg(e,t,n,r)},G9=le([fr,X9],fb),W0e=le([fr,eO,G0e,G9],TA),W9=le([W0e],sA),Q0e=le([Bt,tO,fr,br],T9),Z0e=le([Bt,tO,fr,br],C9),J0e=(e,t,n,r,i,a,o,l)=>{if(t){var{type:c}=t,f=_s(e,l);if(r){var h=n==="scaleBand"&&r.bandwidth?r.bandwidth()/2:2,d=c==="category"&&r.bandwidth?r.bandwidth()/h:0;return d=l==="angleAxis"&&i!=null&&(i==null?void 0:i.length)>=2?vr(i[0]-i[1])*2*d:d,f&&o?o.map((g,v)=>{var b=r.map(g);return At(b)?{coordinate:b+d,value:g,index:v,offset:d}:null}).filter(yi):r.domain().map((g,v)=>{var b=r.map(g);return At(b)?{coordinate:b+d,value:a?a[g]:g,index:v,offset:d}:null}).filter(yi)}}},Ps=le([Bt,fr,eO,W9,X9,Q0e,Z0e,br],J0e),nO=le([M9,D9,r0e],(e,t,n)=>R9(n.shared,e,t)),Q9=e=>e.tooltip.settings.trigger,rO=e=>e.tooltip.settings.defaultIndex,ng=le([Xd,nO,Q9,rO],F9),Yl=le([ng,Wd,Jp,tg],JA),Z9=le([Ps,Yl],I9),iO=le([ng],e=>{if(e)return e.dataKey}),J9=le([ng],e=>{if(e)return e.graphicalItemId}),e7=le([Xd,nO,Q9,rO],H9),ebe=le([Cs,ks,Bt,ur,Ps,rO,e7],U9),tbe=le([ng,ebe],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),nbe=le([ng],e=>{var t;return(t=e==null?void 0:e.active)!==null&&t!==void 0?t:!1}),rbe=le([e7,Yl,Ns,Jp,Z9,q9,nO],V9),ibe=le([rbe],e=>{if(e!=null){var t=e.map(n=>n.payload).filter(n=>n!=null);return Array.from(new Set(t))}});function Gz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Wz(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Gz(Object(n),!0).forEach(function(r){abe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gz(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function abe(e,t,n){return(t=obe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function obe(e){var t=sbe(e,"string");return typeof t=="symbol"?t:t+""}function sbe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var lbe=()=>Ie(fr),ube=()=>{var e=lbe(),t=Ie(Ps),n=Ie(W9);return gd(!e||!n?void 0:Wz(Wz({},e),{},{scale:n}),t)};function Qz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function _f(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Qz(Object(n),!0).forEach(function(r){cbe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qz(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cbe(e,t,n){return(t=fbe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fbe(e){var t=dbe(e,"string");return typeof t=="symbol"?t:t+""}function dbe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var hbe=(e,t,n,r)=>{var i=t.find(a=>a&&a.index===n);if(i){if(e==="horizontal")return{x:i.coordinate,y:r.relativeY};if(e==="vertical")return{x:r.relativeX,y:i.coordinate}}return{x:0,y:0}},mbe=(e,t,n,r)=>{var i=t.find(f=>f&&f.index===n);if(i){if(e==="centric"){var a=i.coordinate,{radius:o}=r;return _f(_f(_f({},r),Yn(r.cx,r.cy,o,a)),{},{angle:a,radius:o})}var l=i.coordinate,{angle:c}=r;return _f(_f(_f({},r),Yn(r.cx,r.cy,l,c)),{},{angle:c,radius:l})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function pbe(e,t){var{relativeX:n,relativeY:r}=e;return n>=t.left&&n<=t.left+t.width&&r>=t.top&&r<=t.top+t.height}var t7=(e,t,n,r,i)=>{var a,o=(a=t==null?void 0:t.length)!==null&&a!==void 0?a:0;if(o<=1||e==null)return 0;if(r==="angleAxis"&&i!=null&&Math.abs(Math.abs(i[1]-i[0])-360)<=1e-6)for(var l=0;l<o;l++){var c,f,h,d,g,v=l>0?(c=n[l-1])===null||c===void 0?void 0:c.coordinate:(f=n[o-1])===null||f===void 0?void 0:f.coordinate,b=(h=n[l])===null||h===void 0?void 0:h.coordinate,w=l>=o-1?(d=n[0])===null||d===void 0?void 0:d.coordinate:(g=n[l+1])===null||g===void 0?void 0:g.coordinate,S=void 0;if(!(v==null||b==null||w==null))if(vr(b-v)!==vr(w-b)){var E=[];if(vr(w-b)===vr(i[1]-i[0])){S=w;var C=b+i[1]-i[0];E[0]=Math.min(C,(C+v)/2),E[1]=Math.max(C,(C+v)/2)}else{S=v;var _=w+i[1]-i[0];E[0]=Math.min(b,(_+b)/2),E[1]=Math.max(b,(_+b)/2)}var N=[Math.min(b,(S+b)/2),Math.max(b,(S+b)/2)];if(e>N[0]&&e<=N[1]||e>=E[0]&&e<=E[1]){var O;return(O=n[l])===null||O===void 0?void 0:O.index}}else{var A=Math.min(v,w),T=Math.max(v,w);if(e>(A+b)/2&&e<=(T+b)/2){var P;return(P=n[l])===null||P===void 0?void 0:P.index}}}else if(t)for(var I=0;I<o;I++){var z=t[I];if(z!=null){var F=t[I+1],B=t[I-1];if(I===0&&F!=null&&e<=(z.coordinate+F.coordinate)/2||I===o-1&&B!=null&&e>(z.coordinate+B.coordinate)/2||I>0&&I<o-1&&B!=null&&F!=null&&e>(z.coordinate+B.coordinate)/2&&e<=(z.coordinate+F.coordinate)/2)return z.index}}return-1},gbe=()=>Ie(eA),aO=(e,t)=>t,n7=(e,t,n)=>n,oO=(e,t,n,r)=>r,vbe=le(Ps,e=>K0(e,t=>t.coordinate)),sO=le([Xd,aO,n7,oO],F9),lO=le([sO,Wd,Jp,tg],JA),ybe=(e,t,n)=>{if(t!=null){var r=Xd(e);return t==="axis"?n==="hover"?r.axisInteraction.hover.dataKey:r.axisInteraction.click.dataKey:n==="hover"?r.itemInteraction.hover.dataKey:r.itemInteraction.click.dataKey}},r7=le([Xd,aO,n7,oO],H9),$x=le([Cs,ks,Bt,ur,Ps,oO,r7],U9),xbe=le([sO,$x],(e,t)=>{var n;return(n=e.coordinate)!==null&&n!==void 0?n:t}),i7=le([Ps,lO],I9),bbe=le([r7,lO,Ns,Jp,i7,q9,aO],V9),wbe=le([sO,lO],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),Sbe=(e,t,n,r,i,a,o)=>{if(!(!e||!n||!r||!i)&&pbe(e,o)){var l=ahe(e,t),c=t7(l,a,i,n,r),f=hbe(t,i,c,e);return{activeIndex:String(c),activeCoordinate:f}}},Ebe=(e,t,n,r,i,a,o)=>{if(!(!e||!r||!i||!a||!n)){var l=Vpe(e,n);if(l){var c=ohe(l,t),f=t7(c,o,a,r,i),h=mbe(t,a,f,l);return{activeIndex:String(f),activeCoordinate:h}}}},jbe=(e,t,n,r,i,a,o,l)=>{if(!(!e||!t||!r||!i||!a))return t==="horizontal"||t==="vertical"?Sbe(e,t,r,i,a,o,l):Ebe(e,t,n,r,i,a,o)},_be=le(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,n)=>n,(e,t,n)=>{if(t!=null){var r=e[t];if(r!=null)return n?r.panoramaElement:r.element}}),Cbe=le(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(r=>parseInt(r,10)).concat(Object.values(Xn)),n=Array.from(new Set(t));return n.sort((r,i)=>r-i)},{memoizeOptions:{resultEqualityCheck:pge}});function Zz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Jz(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Zz(Object(n),!0).forEach(function(r){kbe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zz(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kbe(e,t,n){return(t=Nbe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nbe(e){var t=Abe(e,"string");return typeof t=="symbol"?t:t+""}function Abe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Obe={},Tbe={zIndexMap:Object.values(Xn).reduce((e,t)=>Jz(Jz({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),Obe)},Pbe=new Set(Object.values(Xn));function Mbe(e){return Pbe.has(e)}var a7=qr({name:"zIndex",initialState:Tbe,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]?e.zIndexMap[n].consumers+=1:e.zIndexMap[n]={consumers:1,element:void 0,panoramaElement:void 0}},prepare:vn()},unregisterZIndexPortal:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]&&(e.zIndexMap[n].consumers-=1,e.zIndexMap[n].consumers<=0&&!Mbe(n)&&delete e.zIndexMap[n])},prepare:vn()},registerZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:n,element:r,isPanorama:i}=t.payload;e.zIndexMap[n]?i?e.zIndexMap[n].panoramaElement=r:e.zIndexMap[n].element=r:e.zIndexMap[n]={consumers:0,element:i?void 0:r,panoramaElement:i?r:void 0}},prepare:vn()},unregisterZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]&&(t.payload.isPanorama?e.zIndexMap[n].panoramaElement=void 0:e.zIndexMap[n].element=void 0)},prepare:vn()}}}),{registerZIndexPortal:Dbe,unregisterZIndexPortal:Rbe,registerZIndexPortalElement:Ibe,unregisterZIndexPortalElement:Lbe}=a7.actions,zbe=a7.reducer;function bi(e){var{zIndex:t,children:n}=e,r=Lhe(),i=r&&t!==void 0&&t!==0,a=Vr(),o=tn();y.useLayoutEffect(()=>i?(o(Dbe({zIndex:t})),()=>{o(Rbe({zIndex:t}))}):eu,[o,t,i]);var l=Ie(c=>_be(c,t,a));return i?l?Wl.createPortal(n,l):null:n}function wC(){return wC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wC.apply(null,arguments)}function e3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ny(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?e3(Object(n),!0).forEach(function(r){$be(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):e3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $be(e,t,n){return(t=Bbe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bbe(e){var t=Fbe(e,"string");return typeof t=="symbol"?t:t+""}function Fbe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ube(e){var{cursor:t,cursorComp:n,cursorProps:r}=e;return y.isValidElement(t)?y.cloneElement(t,r):y.createElement(n,r)}function Hbe(e){var t,{coordinate:n,payload:r,index:i,offset:a,tooltipAxisBandSize:o,layout:l,cursor:c,tooltipEventType:f,chartName:h}=e,d=n,g=r,v=i;if(!c||!d||h!=="ScatterChart"&&f!=="axis")return null;var b,w,S;if(h==="ScatterChart")b=d,w=ope,S=Xn.cursorLine;else if(h==="BarChart")b=spe(l,d,a,o),w=ZH,S=Xn.cursorRectangle;else if(l==="radial"&&OU(d)){var{cx:E,cy:C,radius:_,startAngle:N,endAngle:O}=eq(d);b={cx:E,cy:C,startAngle:N,endAngle:O,innerRadius:_,outerRadius:_},w=nq,S=Xn.cursorLine}else b={points:Gpe(l,d,a)},w=GN,S=Xn.cursorLine;var A=typeof c=="object"&&"className"in c?c.className:void 0,T=ny(ny(ny(ny({stroke:"#ccc",pointerEvents:"none"},a),b),hc(c)),{},{payload:g,payloadIndex:v,className:Pt("recharts-tooltip-cursor",A)});return y.createElement(bi,{zIndex:(t=e.zIndex)!==null&&t!==void 0?t:S},y.createElement(Ube,{cursor:c,cursorComp:w,cursorProps:T}))}function qbe(e){var t=ube(),n=PH(),r=Pc(),i=gbe();return t==null||n==null||r==null||i==null?null:y.createElement(Hbe,wC({},e,{offset:n,layout:r,tooltipAxisBandSize:t,chartName:i}))}var o7=y.createContext(null),Vbe=()=>y.useContext(o7),ij={exports:{}},t3;function Kbe(){return t3||(t3=1,(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(c,f,h){this.fn=c,this.context=f,this.once=h||!1}function a(c,f,h,d,g){if(typeof h!="function")throw new TypeError("The listener must be a function");var v=new i(h,d||c,g),b=n?n+f:f;return c._events[b]?c._events[b].fn?c._events[b]=[c._events[b],v]:c._events[b].push(v):(c._events[b]=v,c._eventsCount++),c}function o(c,f){--c._eventsCount===0?c._events=new r:delete c._events[f]}function l(){this._events=new r,this._eventsCount=0}l.prototype.eventNames=function(){var f=[],h,d;if(this._eventsCount===0)return f;for(d in h=this._events)t.call(h,d)&&f.push(n?d.slice(1):d);return Object.getOwnPropertySymbols?f.concat(Object.getOwnPropertySymbols(h)):f},l.prototype.listeners=function(f){var h=n?n+f:f,d=this._events[h];if(!d)return[];if(d.fn)return[d.fn];for(var g=0,v=d.length,b=new Array(v);g<v;g++)b[g]=d[g].fn;return b},l.prototype.listenerCount=function(f){var h=n?n+f:f,d=this._events[h];return d?d.fn?1:d.length:0},l.prototype.emit=function(f,h,d,g,v,b){var w=n?n+f:f;if(!this._events[w])return!1;var S=this._events[w],E=arguments.length,C,_;if(S.fn){switch(S.once&&this.removeListener(f,S.fn,void 0,!0),E){case 1:return S.fn.call(S.context),!0;case 2:return S.fn.call(S.context,h),!0;case 3:return S.fn.call(S.context,h,d),!0;case 4:return S.fn.call(S.context,h,d,g),!0;case 5:return S.fn.call(S.context,h,d,g,v),!0;case 6:return S.fn.call(S.context,h,d,g,v,b),!0}for(_=1,C=new Array(E-1);_<E;_++)C[_-1]=arguments[_];S.fn.apply(S.context,C)}else{var N=S.length,O;for(_=0;_<N;_++)switch(S[_].once&&this.removeListener(f,S[_].fn,void 0,!0),E){case 1:S[_].fn.call(S[_].context);break;case 2:S[_].fn.call(S[_].context,h);break;case 3:S[_].fn.call(S[_].context,h,d);break;case 4:S[_].fn.call(S[_].context,h,d,g);break;default:if(!C)for(O=1,C=new Array(E-1);O<E;O++)C[O-1]=arguments[O];S[_].fn.apply(S[_].context,C)}}return!0},l.prototype.on=function(f,h,d){return a(this,f,h,d,!1)},l.prototype.once=function(f,h,d){return a(this,f,h,d,!0)},l.prototype.removeListener=function(f,h,d,g){var v=n?n+f:f;if(!this._events[v])return this;if(!h)return o(this,v),this;var b=this._events[v];if(b.fn)b.fn===h&&(!g||b.once)&&(!d||b.context===d)&&o(this,v);else{for(var w=0,S=[],E=b.length;w<E;w++)(b[w].fn!==h||g&&!b[w].once||d&&b[w].context!==d)&&S.push(b[w]);S.length?this._events[v]=S.length===1?S[0]:S:o(this,v)}return this},l.prototype.removeAllListeners=function(f){var h;return f?(h=n?n+f:f,this._events[h]&&o(this,h)):(this._events=new r,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=n,l.EventEmitter=l,e.exports=l})(ij)),ij.exports}var Ybe=Kbe();const Xbe=Hi(Ybe);var Qm=new Xbe,SC="recharts.syncEvent.tooltip",n3="recharts.syncEvent.brush",uO=(e,t)=>{if(t&&Array.isArray(e)){var n=Number.parseInt(t,10);if(!go(n))return e[n]}},Gbe={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},s7=qr({name:"options",initialState:Gbe,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),Wbe=s7.reducer,{createEventEmitter:Qbe}=s7.actions;function Zbe(e){return e.tooltip.syncInteraction}var Jbe={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},l7=qr({name:"chartData",initialState:Jbe,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:n,endIndex:r}=t.payload;n!=null&&(e.dataStartIndex=n),r!=null&&(e.dataEndIndex=r)}}}),{setChartData:r3,setDataStartEndIndexes:ewe,setComputedData:s5e}=l7.actions,twe=l7.reducer,nwe=["x","y"];function i3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Cf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?i3(Object(n),!0).forEach(function(r){rwe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function rwe(e,t,n){return(t=iwe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iwe(e){var t=awe(e,"string");return typeof t=="symbol"?t:t+""}function awe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function owe(e,t){if(e==null)return{};var n,r,i=swe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function swe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function lwe(){var e=Ie(tA),t=Ie(nA),n=tn(),r=Ie(yq),i=Ie(Ps),a=Pc(),o=ob(),l=Ie(c=>c.rootProps.className);y.useEffect(()=>{if(e==null)return eu;var c=(f,h,d)=>{if(t!==d&&e===f){if(r==="index"){var g;if(o&&h!==null&&h!==void 0&&(g=h.payload)!==null&&g!==void 0&&g.coordinate&&h.payload.sourceViewBox){var v=h.payload.coordinate,{x:b,y:w}=v,S=owe(v,nwe),{x:E,y:C,width:_,height:N}=h.payload.sourceViewBox,O=Cf(Cf({},S),{},{x:o.x+(_?(b-E)/_:0)*o.width,y:o.y+(N?(w-C)/N:0)*o.height});n(Cf(Cf({},h),{},{payload:Cf(Cf({},h.payload),{},{coordinate:O})}))}else n(h);return}if(i!=null){var A;if(typeof r=="function"){var T={activeTooltipIndex:h.payload.index==null?void 0:Number(h.payload.index),isTooltipActive:h.payload.active,activeIndex:h.payload.index==null?void 0:Number(h.payload.index),activeLabel:h.payload.label,activeDataKey:h.payload.dataKey,activeCoordinate:h.payload.coordinate},P=r(i,T);A=i[P]}else r==="value"&&(A=i.find(D=>String(D.value)===h.payload.label));var{coordinate:I}=h.payload;if(A==null||h.payload.active===!1||I==null||o==null){n(bC({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}var{x:z,y:F}=I,B=Math.min(z,o.x+o.width),G=Math.min(F,o.y+o.height),L={x:a==="horizontal"?A.coordinate:B,y:a==="horizontal"?G:A.coordinate},V=bC({active:h.payload.active,coordinate:L,dataKey:h.payload.dataKey,index:String(A.index),label:h.payload.label,sourceViewBox:h.payload.sourceViewBox,graphicalItemId:h.payload.graphicalItemId});n(V)}}};return Qm.on(SC,c),()=>{Qm.off(SC,c)}},[l,n,t,e,r,i,a,o])}function uwe(){var e=Ie(tA),t=Ie(nA),n=tn();y.useEffect(()=>{if(e==null)return eu;var r=(i,a,o)=>{t!==o&&e===i&&n(ewe(a))};return Qm.on(n3,r),()=>{Qm.off(n3,r)}},[n,t,e])}function cwe(){var e=tn();y.useEffect(()=>{e(Qbe())},[e]),lwe(),uwe()}function fwe(e,t,n,r,i,a){var o=Ie(b=>ybe(b,e,t)),l=Ie(J9),c=Ie(nA),f=Ie(tA),h=Ie(yq),d=Ie(Zbe),g=d==null?void 0:d.active,v=ob();y.useEffect(()=>{if(!g&&f!=null&&c!=null){var b=bC({active:a,coordinate:n,dataKey:o,index:i,label:typeof r=="number"?String(r):r,sourceViewBox:v,graphicalItemId:l});Qm.emit(SC,f,b,c)}},[g,n,o,l,i,r,c,f,h,a,v])}function a3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function o3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?a3(Object(n),!0).forEach(function(r){dwe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function dwe(e,t,n){return(t=hwe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hwe(e){var t=mwe(e,"string");return typeof t=="symbol"?t:t+""}function mwe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function pwe(e){return e.dataKey}function gwe(e,t){return y.isValidElement(e)?y.cloneElement(e,t):typeof e=="function"?y.createElement(e,t):y.createElement(Rme,t)}var s3=[],vwe={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,includeHidden:!1,isAnimationActive:"auto",itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function u7(e){var t,n,r=Qn(e,vwe),{active:i,allowEscapeViewBox:a,animationDuration:o,animationEasing:l,content:c,filterNull:f,isAnimationActive:h,offset:d,payloadUniqBy:g,position:v,reverseDirection:b,useTranslate3d:w,wrapperStyle:S,cursor:E,shared:C,trigger:_,defaultIndex:N,portal:O,axisId:A}=r,T=tn(),P=typeof N=="number"?String(N):N;y.useEffect(()=>{T(l0e({shared:C,trigger:_,axisId:A,active:i,defaultIndex:P}))},[T,C,_,A,i,P]);var I=ob(),z=YH(),F=n0e(C),{activeIndex:B,isActive:G}=(t=Ie(ie=>wbe(ie,F,_,P)))!==null&&t!==void 0?t:{},L=Ie(ie=>bbe(ie,F,_,P)),V=Ie(ie=>i7(ie,F,_,P)),D=Ie(ie=>xbe(ie,F,_,P)),q=L,X=Vbe(),K=(n=i??G)!==null&&n!==void 0?n:!1,[R,H]=YU([q,K]),U=F==="axis"?V:void 0;fwe(F,_,D,U,B,K);var $=O??X;if($==null||I==null||F==null)return null;var Q=q??s3;K||(Q=s3),f&&Q.length&&(Q=FU(Q.filter(ie=>ie.value!=null&&(ie.hide!==!0||r.includeHidden)),g,pwe));var J=Q.length>0,ne=o3(o3({},r),{},{payload:Q,label:U,active:K,activeIndex:B,coordinate:D,accessibilityLayer:z}),ae=y.createElement(Kme,{allowEscapeViewBox:a,animationDuration:o,animationEasing:l,isAnimationActive:h,active:K,coordinate:D,hasPayload:J,offset:d,position:v,reverseDirection:b,useTranslate3d:w,viewBox:I,wrapperStyle:S,lastBoundingBox:R,innerRef:H,hasPortalFromProps:!!O},gwe(c,ne));return y.createElement(y.Fragment,null,Wl.createPortal(ae,$),K&&y.createElement(qbe,{cursor:E,tooltipEventType:F,coordinate:D,payload:Q,index:B}))}var rg=e=>null;rg.displayName="Cell";function ywe(e,t,n){return(t=xwe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xwe(e){var t=bwe(e,"string");return typeof t=="symbol"?t:t+""}function bwe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class wwe{constructor(t){ywe(this,"cache",new Map),this.maxSize=t}get(t){var n=this.cache.get(t);return n!==void 0&&(this.cache.delete(t),this.cache.set(t,n)),n}set(t,n){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxSize){var r=this.cache.keys().next().value;r!=null&&this.cache.delete(r)}this.cache.set(t,n)}clear(){this.cache.clear()}size(){return this.cache.size}}function l3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Swe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?l3(Object(n),!0).forEach(function(r){Ewe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ewe(e,t,n){return(t=jwe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jwe(e){var t=_we(e,"string");return typeof t=="symbol"?t:t+""}function _we(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Cwe={cacheSize:2e3,enableCache:!0},c7=Swe({},Cwe),u3=new wwe(c7.cacheSize),kwe={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},c3="recharts_measurement_span";function Nwe(e,t){var n=t.fontSize||"",r=t.fontFamily||"",i=t.fontWeight||"",a=t.fontStyle||"",o=t.letterSpacing||"",l=t.textTransform||"";return"".concat(e,"|").concat(n,"|").concat(r,"|").concat(i,"|").concat(a,"|").concat(o,"|").concat(l)}var f3=(e,t)=>{try{var n=document.getElementById(c3);n||(n=document.createElement("span"),n.setAttribute("id",c3),n.setAttribute("aria-hidden","true"),document.body.appendChild(n)),Object.assign(n.style,kwe,t),n.textContent="".concat(e);var r=n.getBoundingClientRect();return{width:r.width,height:r.height}}catch{return{width:0,height:0}}},jm=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Up.isSsr)return{width:0,height:0};if(!c7.enableCache)return f3(t,n);var r=Nwe(t,n),i=u3.get(r);if(i)return i;var a=f3(t,n);return u3.set(r,a),a},f7;function Awe(e,t,n){return(t=Owe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Owe(e){var t=Twe(e,"string");return typeof t=="symbol"?t:t+""}function Twe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var d3=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,h3=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Pwe=/^(px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q)$/,Mwe=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,Dwe={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},Rwe=["cm","mm","pt","pc","in","Q","px"];function Iwe(e){return Rwe.includes(e)}var zf="NaN";function Lwe(e,t){return e*Dwe[t]}class Nr{static parse(t){var n,[,r,i]=(n=Mwe.exec(t))!==null&&n!==void 0?n:[];return r==null?Nr.NaN:new Nr(parseFloat(r),i??"")}constructor(t,n){this.num=t,this.unit=n,this.num=t,this.unit=n,go(t)&&(this.unit=""),n!==""&&!Pwe.test(n)&&(this.num=NaN,this.unit=""),Iwe(n)&&(this.num=Lwe(t,n),this.unit="px")}add(t){return this.unit!==t.unit?new Nr(NaN,""):new Nr(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new Nr(NaN,""):new Nr(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new Nr(NaN,""):new Nr(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new Nr(NaN,""):new Nr(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return go(this.num)}}f7=Nr;Awe(Nr,"NaN",new f7(NaN,""));function d7(e){if(e==null||e.includes(zf))return zf;for(var t=e;t.includes("*")||t.includes("/");){var n,[,r,i,a]=(n=d3.exec(t))!==null&&n!==void 0?n:[],o=Nr.parse(r??""),l=Nr.parse(a??""),c=i==="*"?o.multiply(l):o.divide(l);if(c.isNaN())return zf;t=t.replace(d3,c.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var f,[,h,d,g]=(f=h3.exec(t))!==null&&f!==void 0?f:[],v=Nr.parse(h??""),b=Nr.parse(g??""),w=d==="+"?v.add(b):v.subtract(b);if(w.isNaN())return zf;t=t.replace(h3,w.toString())}return t}var m3=/\(([^()]*)\)/;function zwe(e){for(var t=e,n;(n=m3.exec(t))!=null;){var[,r]=n;t=t.replace(m3,d7(r))}return t}function $we(e){var t=e.replace(/\s+/g,"");return t=zwe(t),t=d7(t),t}function Bwe(e){try{return $we(e)}catch{return zf}}function aj(e){var t=Bwe(e.slice(5,-1));return t===zf?"":t}var Fwe=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],Uwe=["dx","dy","angle","className","breakAll"];function EC(){return EC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},EC.apply(null,arguments)}function p3(e,t){if(e==null)return{};var n,r,i=Hwe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Hwe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var h7=/[ \f\n\r\t\v\u2028\u2029]+/,m7=e=>{var{children:t,breakAll:n,style:r}=e;try{var i=[];jn(t)||(n?i=t.toString().split(""):i=t.toString().split(h7));var a=i.map(l=>({word:l,width:jm(l,r).width})),o=n?0:jm(" ",r).width;return{wordsWithComputedWidth:a,spaceWidth:o}}catch{return null}};function p7(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}function qwe(e){return jn(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean"}var g7=(e,t,n,r)=>e.reduce((i,a)=>{var{word:o,width:l}=a,c=i[i.length-1];if(c&&l!=null&&(t==null||r||c.width+l+n<Number(t)))c.words.push(o),c.width+=l+n;else{var f={words:[o],width:l};i.push(f)}return i},[]),v7=e=>e.reduce((t,n)=>t.width>n.width?t:n),Vwe="…",g3=(e,t,n,r,i,a,o,l)=>{var c=e.slice(0,t),f=m7({breakAll:n,style:r,children:c+Vwe});if(!f)return[!1,[]];var h=g7(f.wordsWithComputedWidth,a,o,l),d=h.length>i||v7(h).width>Number(a);return[d,h]},Kwe=(e,t,n,r,i)=>{var{maxLines:a,children:o,style:l,breakAll:c}=e,f=Me(a),h=String(o),d=g7(t,r,n,i);if(!f||i)return d;var g=d.length>a||v7(d).width>Number(r);if(!g)return d;for(var v=0,b=h.length-1,w=0,S;v<=b&&w<=h.length-1;){var E=Math.floor((v+b)/2),C=E-1,[_,N]=g3(h,C,c,l,a,r,n,i),[O]=g3(h,E,c,l,a,r,n,i);if(!_&&!O&&(v=E+1),_&&O&&(b=E-1),!_&&O){S=N;break}w++}return S||d},v3=e=>{var t=jn(e)?[]:e.toString().split(h7);return[{words:t,width:void 0}]},Ywe=e=>{var{width:t,scaleToFit:n,children:r,style:i,breakAll:a,maxLines:o}=e;if((t||n)&&!Up.isSsr){var l,c,f=m7({breakAll:a,children:r,style:i});if(f){var{wordsWithComputedWidth:h,spaceWidth:d}=f;l=h,c=d}else return v3(r);return Kwe({breakAll:a,children:r,maxLines:o,style:i},l,c,t,!!n)}return v3(r)},y7="#808080",Xwe={angle:0,breakAll:!1,capHeight:"0.71em",fill:y7,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},Nb=y.forwardRef((e,t)=>{var n=Qn(e,Xwe),{x:r,y:i,lineHeight:a,capHeight:o,fill:l,scaleToFit:c,textAnchor:f,verticalAnchor:h}=n,d=p3(n,Fwe),g=y.useMemo(()=>Ywe({breakAll:d.breakAll,children:d.children,maxLines:d.maxLines,scaleToFit:c,style:d.style,width:d.width}),[d.breakAll,d.children,d.maxLines,c,d.style,d.width]),{dx:v,dy:b,angle:w,className:S,breakAll:E}=d,C=p3(d,Uwe);if(!vo(r)||!vo(i)||g.length===0)return null;var _=Number(r)+(Me(v)?v:0),N=Number(i)+(Me(b)?b:0);if(!At(_)||!At(N))return null;var O;switch(h){case"start":O=aj("calc(".concat(o,")"));break;case"middle":O=aj("calc(".concat((g.length-1)/2," * -").concat(a," + (").concat(o," / 2))"));break;default:O=aj("calc(".concat(g.length-1," * -").concat(a,")"));break}var A=[],T=g[0];if(c&&T!=null){var P=T.width,{width:I}=d;A.push("scale(".concat(Me(I)&&Me(P)?I/P:1,")"))}return w&&A.push("rotate(".concat(w,", ").concat(_,", ").concat(N,")")),A.length&&(C.transform=A.join(" ")),y.createElement("text",EC({},ti(C),{ref:t,x:_,y:N,className:Pt("recharts-text",S),textAnchor:f,fill:l.includes("url")?y7:l}),g.map((z,F)=>{var B=z.words.join(E?"":" ");return y.createElement("tspan",{x:_,dy:F===0?O:a,key:"".concat(B,"-").concat(F)},B)}))});Nb.displayName="Text";function y3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function eo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?y3(Object(n),!0).forEach(function(r){Gwe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Gwe(e,t,n){return(t=Wwe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wwe(e){var t=Qwe(e,"string");return typeof t=="symbol"?t:t+""}function Qwe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Zwe=e=>{var{viewBox:t,position:n,offset:r=0,parentViewBox:i}=e,{x:a,y:o,height:l,upperWidth:c,lowerWidth:f}=qN(t),h=a,d=a+(c-f)/2,g=(h+d)/2,v=(c+f)/2,b=h+c/2,w=l>=0?1:-1,S=w*r,E=w>0?"end":"start",C=w>0?"start":"end",_=c>=0?1:-1,N=_*r,O=_>0?"end":"start",A=_>0?"start":"end",T=i;if(n==="top"){var P={x:h+c/2,y:o-S,horizontalAnchor:"middle",verticalAnchor:E};return T&&(P.height=Math.max(o-T.y,0),P.width=c),P}if(n==="bottom"){var I={x:d+f/2,y:o+l+S,horizontalAnchor:"middle",verticalAnchor:C};return T&&(I.height=Math.max(T.y+T.height-(o+l),0),I.width=f),I}if(n==="left"){var z={x:g-N,y:o+l/2,horizontalAnchor:O,verticalAnchor:"middle"};return T&&(z.width=Math.max(z.x-T.x,0),z.height=l),z}if(n==="right"){var F={x:g+v+N,y:o+l/2,horizontalAnchor:A,verticalAnchor:"middle"};return T&&(F.width=Math.max(T.x+T.width-F.x,0),F.height=l),F}var B=T?{width:v,height:l}:{};return n==="insideLeft"?eo({x:g+N,y:o+l/2,horizontalAnchor:A,verticalAnchor:"middle"},B):n==="insideRight"?eo({x:g+v-N,y:o+l/2,horizontalAnchor:O,verticalAnchor:"middle"},B):n==="insideTop"?eo({x:h+c/2,y:o+S,horizontalAnchor:"middle",verticalAnchor:C},B):n==="insideBottom"?eo({x:d+f/2,y:o+l-S,horizontalAnchor:"middle",verticalAnchor:E},B):n==="insideTopLeft"?eo({x:h+N,y:o+S,horizontalAnchor:A,verticalAnchor:C},B):n==="insideTopRight"?eo({x:h+c-N,y:o+S,horizontalAnchor:O,verticalAnchor:C},B):n==="insideBottomLeft"?eo({x:d+N,y:o+l-S,horizontalAnchor:A,verticalAnchor:E},B):n==="insideBottomRight"?eo({x:d+f-N,y:o+l-S,horizontalAnchor:O,verticalAnchor:E},B):n&&typeof n=="object"&&(Me(n.x)||gc(n.x))&&(Me(n.y)||gc(n.y))?eo({x:a+Ur(n.x,v),y:o+Ur(n.y,l),horizontalAnchor:"end",verticalAnchor:"end"},B):eo({x:b,y:o+l/2,horizontalAnchor:"middle",verticalAnchor:"middle"},B)},Jwe=["labelRef"],e1e=["content"];function x3(e,t){if(e==null)return{};var n,r,i=t1e(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function t1e(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function b3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function wm(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?b3(Object(n),!0).forEach(function(r){n1e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function n1e(e,t,n){return(t=r1e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r1e(e){var t=i1e(e,"string");return typeof t=="symbol"?t:t+""}function i1e(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Jo(){return Jo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jo.apply(null,arguments)}var x7=y.createContext(null),a1e=e=>{var{x:t,y:n,upperWidth:r,lowerWidth:i,width:a,height:o,children:l}=e,c=y.useMemo(()=>({x:t,y:n,upperWidth:r,lowerWidth:i,width:a,height:o}),[t,n,r,i,a,o]);return y.createElement(x7.Provider,{value:c},l)},b7=()=>{var e=y.useContext(x7),t=ob();return e||(t?qN(t):void 0)},o1e=y.createContext(null),s1e=()=>{var e=y.useContext(o1e),t=Ie(Eq);return e||t},l1e=e=>{var{value:t,formatter:n}=e,r=jn(e.children)?t:e.children;return typeof n=="function"?n(r):r},cO=e=>e!=null&&typeof e=="function",u1e=(e,t)=>{var n=vr(t-e),r=Math.min(Math.abs(t-e),360);return n*r},c1e=(e,t,n,r,i)=>{var{offset:a,className:o}=e,{cx:l,cy:c,innerRadius:f,outerRadius:h,startAngle:d,endAngle:g,clockWise:v}=i,b=(f+h)/2,w=u1e(d,g),S=w>=0?1:-1,E,C;switch(t){case"insideStart":E=d+S*a,C=v;break;case"insideEnd":E=g-S*a,C=!v;break;case"end":E=g+S*a,C=v;break;default:throw new Error("Unsupported position ".concat(t))}C=w<=0?C:!C;var _=Yn(l,c,b,E),N=Yn(l,c,b,E+(C?1:-1)*359),O="M".concat(_.x,",").concat(_.y,`
    A`).concat(b,",").concat(b,",0,1,").concat(C?0:1,`,
    `).concat(N.x,",").concat(N.y),A=jn(e.id)?$m("recharts-radial-line-"):e.id;return y.createElement("text",Jo({},r,{dominantBaseline:"central",className:Pt("recharts-radial-bar-label",o)}),y.createElement("defs",null,y.createElement("path",{id:A,d:O})),y.createElement("textPath",{xlinkHref:"#".concat(A)},n))},f1e=(e,t,n)=>{var{cx:r,cy:i,innerRadius:a,outerRadius:o,startAngle:l,endAngle:c}=e,f=(l+c)/2;if(n==="outside"){var{x:h,y:d}=Yn(r,i,o+t,f);return{x:h,y:d,textAnchor:h>=r?"start":"end",verticalAnchor:"middle"}}if(n==="center")return{x:r,y:i,textAnchor:"middle",verticalAnchor:"middle"};if(n==="centerTop")return{x:r,y:i,textAnchor:"middle",verticalAnchor:"start"};if(n==="centerBottom")return{x:r,y:i,textAnchor:"middle",verticalAnchor:"end"};var g=(a+o)/2,{x:v,y:b}=Yn(r,i,g,f);return{x:v,y:b,textAnchor:"middle",verticalAnchor:"middle"}},Ay=e=>e!=null&&"cx"in e&&Me(e.cx),d1e={angle:0,offset:5,zIndex:Xn.label,position:"middle",textBreakAll:!1};function h1e(e){if(!Ay(e))return e;var{cx:t,cy:n,outerRadius:r}=e,i=r*2;return{x:t-r,y:n-r,width:i,upperWidth:i,lowerWidth:i,height:i}}function bl(e){var t=Qn(e,d1e),{viewBox:n,parentViewBox:r,position:i,value:a,children:o,content:l,className:c="",textBreakAll:f,labelRef:h}=t,d=s1e(),g=b7(),v=i==="center"?g:d??g,b,w,S;n==null?b=v:Ay(n)?b=n:b=qN(n);var E=h1e(b);if(!b||jn(a)&&jn(o)&&!y.isValidElement(l)&&typeof l!="function")return null;var C=wm(wm({},t),{},{viewBox:b});if(y.isValidElement(l)){var{labelRef:_}=C,N=x3(C,Jwe);return y.cloneElement(l,N)}if(typeof l=="function"){var{content:O}=C,A=x3(C,e1e);if(w=y.createElement(l,A),y.isValidElement(w))return w}else w=l1e(t);var T=ti(t);if(Ay(b)){if(i==="insideStart"||i==="insideEnd"||i==="end")return c1e(t,i,w,T,b);S=f1e(b,t.offset,t.position)}else{if(!E)return null;var P=Zwe({viewBox:E,position:i,offset:t.offset,parentViewBox:Ay(r)?void 0:r});S=wm(wm({x:P.x,y:P.y,textAnchor:P.horizontalAnchor,verticalAnchor:P.verticalAnchor},P.width!==void 0?{width:P.width}:{}),P.height!==void 0?{height:P.height}:{})}return y.createElement(bi,{zIndex:t.zIndex},y.createElement(Nb,Jo({ref:h,className:Pt("recharts-label",c)},T,S,{textAnchor:p7(T.textAnchor)?T.textAnchor:S.textAnchor,breakAll:f}),w))}bl.displayName="Label";var m1e=(e,t,n)=>{if(!e)return null;var r={viewBox:t,labelRef:n};return e===!0?y.createElement(bl,Jo({key:"label-implicit"},r)):vo(e)?y.createElement(bl,Jo({key:"label-implicit",value:e},r)):y.isValidElement(e)?e.type===bl?y.cloneElement(e,wm({key:"label-implicit"},r)):y.createElement(bl,Jo({key:"label-implicit",content:e},r)):cO(e)?y.createElement(bl,Jo({key:"label-implicit",content:e},r)):e&&typeof e=="object"?y.createElement(bl,Jo({},e,{key:"label-implicit"},r)):null};function p1e(e){var{label:t,labelRef:n}=e,r=b7();return m1e(t,r,n)||null}var g1e=["valueAccessor"],v1e=["dataKey","clockWise","id","textBreakAll","zIndex"];function Bx(){return Bx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Bx.apply(null,arguments)}function w3(e,t){if(e==null)return{};var n,r,i=y1e(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function y1e(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var x1e=e=>{var t=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(qwe(t))return t},w7=y.createContext(void 0),S7=w7.Provider,E7=y.createContext(void 0),b1e=E7.Provider;function w1e(){return y.useContext(w7)}function S1e(){return y.useContext(E7)}function Oy(e){var{valueAccessor:t=x1e}=e,n=w3(e,g1e),{dataKey:r,clockWise:i,id:a,textBreakAll:o,zIndex:l}=n,c=w3(n,v1e),f=w1e(),h=S1e(),d=f||h;return!d||!d.length?null:y.createElement(bi,{zIndex:l??Xn.label},y.createElement(lr,{className:"recharts-label-list"},d.map((g,v)=>{var b,w=jn(r)?t(g,v):en(g.payload,r),S=jn(a)?{}:{id:"".concat(a,"-").concat(v)};return y.createElement(bl,Bx({key:"label-".concat(v)},ti(g),c,S,{fill:(b=n.fill)!==null&&b!==void 0?b:g.fill,parentViewBox:g.parentViewBox,value:w,textBreakAll:o,viewBox:g.viewBox,index:v,zIndex:0}))})))}Oy.displayName="LabelList";function fO(e){var{label:t}=e;return t?t===!0?y.createElement(Oy,{key:"labelList-implicit"}):y.isValidElement(t)||cO(t)?y.createElement(Oy,{key:"labelList-implicit",content:t}):typeof t=="object"?y.createElement(Oy,Bx({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function jC(){return jC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jC.apply(null,arguments)}var j7=e=>{var{cx:t,cy:n,r,className:i}=e,a=Pt("recharts-dot",i);return Me(t)&&Me(n)&&Me(r)?y.createElement("circle",jC({},$i(e),PN(e),{className:a,cx:t,cy:n,r})):null},_7=e=>e.graphicalItems.polarItems,E1e=le([kn,Kp],MA),Ab=le([_7,Ln,E1e],DA),j1e=le([Ab],RA),Ob=le([j1e,cb],IA),_1e=le([Ob,Ln,Ab],zA);le([Ob,Ln,Ab],(e,t,n)=>n.length>0?e.flatMap(r=>n.flatMap(i=>{var a,o=en(r,(a=t.dataKey)!==null&&a!==void 0?a:i.dataKey);return{value:o,errorDomain:[]}})).filter(Boolean):(t==null?void 0:t.dataKey)!=null?e.map(r=>({value:en(r,t.dataKey),errorDomain:[]})):e.map(r=>({value:r,errorDomain:[]})));var S3=()=>{},C1e=le([Ob,Ln,Ab,jb,kn],UA),k1e=le([Ln,BA,FA,S3,C1e,S3,Bt,kn],HA),C7=le([Ln,Bt,Ob,_1e,Vp,kn,k1e],qA),N1e=le([C7,Kd,ru],KA),A1e=le([Ln,C7,N1e,kn],XA);le([ru,A1e],_q);var O1e={radiusAxis:{},angleAxis:{}},k7=qr({name:"polarAxis",initialState:O1e,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:l5e,removeRadiusAxis:u5e,addAngleAxis:c5e,removeAngleAxis:f5e}=k7.actions,T1e=k7.reducer;function N7(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}function E3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function j3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?E3(Object(n),!0).forEach(function(r){P1e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function P1e(e,t,n){return(t=M1e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function M1e(e){var t=D1e(e,"string");return typeof t=="symbol"?t:t+""}function D1e(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var R1e=(e,t)=>t,dO=le([_7,R1e],(e,t)=>e.filter(n=>n.type==="pie").find(n=>n.id===t)),I1e=[],hO=(e,t,n)=>(n==null?void 0:n.length)===0?I1e:n,A7=le([cb,dO,hO],(e,t,n)=>{var{chartData:r}=e;if(t!=null){var i;if((t==null?void 0:t.data)!=null&&t.data.length>0?i=t.data:i=r,(!i||!i.length)&&n!=null&&(i=n.map(a=>j3(j3({},t.presentationProps),a.props))),i!=null)return i}}),L1e=le([A7,dO,hO],(e,t,n)=>{if(!(e==null||t==null))return e.map((r,i)=>{var a,o=en(r,t.nameKey,t.name),l;return n!=null&&(a=n[i])!==null&&a!==void 0&&(a=a.props)!==null&&a!==void 0&&a.fill?l=n[i].props.fill:typeof r=="object"&&r!=null&&"fill"in r?l=r.fill:l=t.fill,{value:Fd(o,t.dataKey),color:l,payload:r,type:t.legendType}})}),z1e=le([A7,dO,hO,ur],(e,t,n,r)=>{if(!(t==null||e==null))return USe({offset:r,pieSettings:t,displayedData:e,cells:n})}),oj={exports:{}},Jt={};/**
 * @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 _3;function $1e(){if(_3)return Jt;_3=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),g=Symbol.for("react.view_transition"),v=Symbol.for("react.client.reference");function b(w){if(typeof w=="object"&&w!==null){var S=w.$$typeof;switch(S){case e:switch(w=w.type,w){case n:case i:case r:case c:case f:case g:return w;default:switch(w=w&&w.$$typeof,w){case o:case l:case d:case h:return w;case a:return w;default:return S}}case t:return S}}}return Jt.ContextConsumer=a,Jt.ContextProvider=o,Jt.Element=e,Jt.ForwardRef=l,Jt.Fragment=n,Jt.Lazy=d,Jt.Memo=h,Jt.Portal=t,Jt.Profiler=i,Jt.StrictMode=r,Jt.Suspense=c,Jt.SuspenseList=f,Jt.isContextConsumer=function(w){return b(w)===a},Jt.isContextProvider=function(w){return b(w)===o},Jt.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===e},Jt.isForwardRef=function(w){return b(w)===l},Jt.isFragment=function(w){return b(w)===n},Jt.isLazy=function(w){return b(w)===d},Jt.isMemo=function(w){return b(w)===h},Jt.isPortal=function(w){return b(w)===t},Jt.isProfiler=function(w){return b(w)===i},Jt.isStrictMode=function(w){return b(w)===r},Jt.isSuspense=function(w){return b(w)===c},Jt.isSuspenseList=function(w){return b(w)===f},Jt.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===n||w===i||w===r||w===c||w===f||typeof w=="object"&&w!==null&&(w.$$typeof===d||w.$$typeof===h||w.$$typeof===o||w.$$typeof===a||w.$$typeof===l||w.$$typeof===v||w.getModuleId!==void 0)},Jt.typeOf=b,Jt}var C3;function B1e(){return C3||(C3=1,oj.exports=$1e()),oj.exports}var F1e=B1e(),k3=e=>typeof e=="string"?e:e?e.displayName||e.name||"Component":"",N3=null,sj=null,O7=e=>{if(e===N3&&Array.isArray(sj))return sj;var t=[];return y.Children.forEach(e,n=>{jn(n)||(F1e.isFragment(n)?t=t.concat(O7(n.props.children)):t.push(n))}),sj=t,N3=e,t};function mO(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(i=>k3(i)):r=[k3(t)],O7(e).forEach(i=>{var a=pc(i,"type.displayName")||pc(i,"type.name");a&&r.indexOf(a)!==-1&&n.push(i)}),n}var T7=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0,lj={},A3;function U1e(){return A3||(A3=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){var i;if(typeof n!="object"||n==null)return!1;if(Object.getPrototypeOf(n)===null)return!0;if(Object.prototype.toString.call(n)!=="[object Object]"){const a=n[Symbol.toStringTag];return a==null||!((i=Object.getOwnPropertyDescriptor(n,Symbol.toStringTag))!=null&&i.writable)?!1:n.toString()===`[object ${a}]`}let r=n;for(;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(n)===r}e.isPlainObject=t})(lj)),lj}var uj,O3;function H1e(){return O3||(O3=1,uj=U1e().isPlainObject),uj}var q1e=H1e();const V1e=Hi(q1e);var T3,P3,M3,D3,R3;function I3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function L3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?I3(Object(n),!0).forEach(function(r){K1e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function K1e(e,t,n){return(t=Y1e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Y1e(e){var t=X1e(e,"string");return typeof t=="symbol"?t:t+""}function X1e(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Fx(){return Fx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fx.apply(null,arguments)}function om(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var z3=(e,t,n,r,i)=>{var a=n-r,o;return o=Mn(T3||(T3=om(["M ",",",""])),e,t),o+=Mn(P3||(P3=om(["L ",",",""])),e+n,t),o+=Mn(M3||(M3=om(["L ",",",""])),e+n-a/2,t+i),o+=Mn(D3||(D3=om(["L ",",",""])),e+n-a/2-r,t+i),o+=Mn(R3||(R3=om(["L ",","," Z"])),e,t),o},G1e={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},W1e=e=>{var t=Qn(e,G1e),{x:n,y:r,upperWidth:i,lowerWidth:a,height:o,className:l}=t,{animationEasing:c,animationDuration:f,animationBegin:h,isUpdateAnimationActive:d}=t,g=y.useRef(null),[v,b]=y.useState(-1),w=y.useRef(i),S=y.useRef(a),E=y.useRef(o),C=y.useRef(n),_=y.useRef(r),N=qp(e,"trapezoid-");if(y.useEffect(()=>{if(g.current&&g.current.getTotalLength)try{var L=g.current.getTotalLength();L&&b(L)}catch{}},[]),n!==+n||r!==+r||i!==+i||a!==+a||o!==+o||i===0&&a===0||o===0)return null;var O=Pt("recharts-trapezoid",l);if(!d)return y.createElement("g",null,y.createElement("path",Fx({},ti(t),{className:O,d:z3(n,r,i,a,o)})));var A=w.current,T=S.current,P=E.current,I=C.current,z=_.current,F="0px ".concat(v===-1?1:v,"px"),B="".concat(v,"px ").concat(v,"px"),G=XH(["strokeDasharray"],f,c);return y.createElement(Hp,{animationId:N,key:N,canBegin:v>0,duration:f,easing:c,isActive:d,begin:h},L=>{var V=wn(A,i,L),D=wn(T,a,L),q=wn(P,o,L),X=wn(I,n,L),K=wn(z,r,L);g.current&&(w.current=V,S.current=D,E.current=q,C.current=X,_.current=K);var R=L>0?{transition:G,strokeDasharray:B}:{strokeDasharray:F};return y.createElement("path",Fx({},ti(t),{className:O,d:z3(X,K,V,D,q),ref:g,style:L3(L3({},R),t.style)}))})},Q1e=["option","shapeType","activeClassName","inActiveClassName"];function Z1e(e,t){if(e==null)return{};var n,r,i=J1e(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function J1e(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function $3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ux(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$3(Object(n),!0).forEach(function(r){eSe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function eSe(e,t,n){return(t=tSe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tSe(e){var t=nSe(e,"string");return typeof t=="symbol"?t:t+""}function nSe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function rSe(e,t){return Ux(Ux({},t),e)}function iSe(e,t){return e==="symbols"}function B3(e){var{shapeType:t,elementProps:n}=e;switch(t){case"rectangle":return y.createElement(ZH,n);case"trapezoid":return y.createElement(W1e,n);case"sector":return y.createElement(nq,n);case"symbols":if(iSe(t))return y.createElement(TN,n);break;case"curve":return y.createElement(GN,n);default:return null}}function aSe(e){return y.isValidElement(e)?e.props:e}function pO(e){var{option:t,shapeType:n,activeClassName:r="recharts-active-shape",inActiveClassName:i="recharts-shape"}=e,a=Z1e(e,Q1e),o;if(y.isValidElement(t))o=y.cloneElement(t,Ux(Ux({},a),aSe(t)));else if(typeof t=="function")o=t(a,a.index);else if(V1e(t)&&typeof t!="boolean"){var l=rSe(t,a);o=y.createElement(B3,{shapeType:n,elementProps:l})}else{var c=a;o=y.createElement(B3,{shapeType:n,elementProps:c})}return a.isActive?y.createElement(lr,{className:r},o):y.createElement(lr,{className:i},o)}var gO=(e,t,n)=>{var r=tn();return(i,a)=>o=>{e==null||e(i,a,o),r(z9({activeIndex:String(a),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:n}))}},vO=e=>{var t=tn();return(n,r)=>i=>{e==null||e(n,r,i),t(u0e())}},yO=(e,t,n)=>{var r=tn();return(i,a)=>o=>{e==null||e(i,a,o),r(c0e({activeIndex:String(a),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:n}))}};function xO(e){var{tooltipEntrySettings:t}=e,n=tn(),r=Vr(),i=y.useRef(null);return y.useLayoutEffect(()=>{r||(i.current===null?n(a0e(t)):i.current!==t&&n(o0e({prev:i.current,next:t})),i.current=t)},[t,n,r]),y.useLayoutEffect(()=>()=>{i.current&&(n(s0e(i.current)),i.current=null)},[n]),null}function P7(e){var{legendPayload:t}=e,n=tn(),r=Vr(),i=y.useRef(null);return y.useLayoutEffect(()=>{r||(i.current===null?n(UH(t)):i.current!==t&&n(HH({prev:i.current,next:t})),i.current=t)},[n,r,t]),y.useLayoutEffect(()=>()=>{i.current&&(n(qH(i.current)),i.current=null)},[n]),null}function oSe(e){var{legendPayload:t}=e,n=tn(),r=Ie(Bt),i=y.useRef(null);return y.useLayoutEffect(()=>{r!=="centric"&&r!=="radial"||(i.current===null?n(UH(t)):i.current!==t&&n(HH({prev:i.current,next:t})),i.current=t)},[n,r,t]),y.useLayoutEffect(()=>()=>{i.current&&(n(qH(i.current)),i.current=null)},[n]),null}var cj,sSe=()=>{var[e]=y.useState(()=>$m("uid-"));return e},lSe=(cj=ik.useId)!==null&&cj!==void 0?cj:sSe;function uSe(e,t){var n=lSe();return t||(e?"".concat(e,"-").concat(n):n)}var cSe=y.createContext(void 0),bO=e=>{var{id:t,type:n,children:r}=e,i=uSe("recharts-".concat(n),t);return y.createElement(cSe.Provider,{value:i},r(i))},fSe={cartesianItems:[],polarItems:[]},M7=qr({name:"graphicalItems",initialState:fSe,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:vn()},replaceCartesianGraphicalItem:{reducer(e,t){var{prev:n,next:r}=t.payload,i=sa(e).cartesianItems.indexOf(n);i>-1&&(e.cartesianItems[i]=r)},prepare:vn()},removeCartesianGraphicalItem:{reducer(e,t){var n=sa(e).cartesianItems.indexOf(t.payload);n>-1&&e.cartesianItems.splice(n,1)},prepare:vn()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:vn()},removePolarGraphicalItem:{reducer(e,t){var n=sa(e).polarItems.indexOf(t.payload);n>-1&&e.polarItems.splice(n,1)},prepare:vn()},replacePolarGraphicalItem:{reducer(e,t){var{prev:n,next:r}=t.payload,i=sa(e).polarItems.indexOf(n);i>-1&&(e.polarItems[i]=r)},prepare:vn()}}}),{addCartesianGraphicalItem:dSe,replaceCartesianGraphicalItem:hSe,removeCartesianGraphicalItem:mSe,addPolarGraphicalItem:pSe,removePolarGraphicalItem:gSe,replacePolarGraphicalItem:vSe}=M7.actions,ySe=M7.reducer,xSe=e=>{var t=tn(),n=y.useRef(null);return y.useLayoutEffect(()=>{n.current===null?t(dSe(e)):n.current!==e&&t(hSe({prev:n.current,next:e})),n.current=e},[t,e]),y.useLayoutEffect(()=>()=>{n.current&&(t(mSe(n.current)),n.current=null)},[t]),null},D7=y.memo(xSe),bSe=e=>{var t=tn(),n=y.useRef(null);return y.useLayoutEffect(()=>{n.current===null?t(pSe(e)):n.current!==e&&t(vSe({prev:n.current,next:e})),n.current=e},[t,e]),y.useLayoutEffect(()=>()=>{n.current&&(t(gSe(n.current)),n.current=null)},[t]),null},wSe=y.memo(bSe),SSe=["key"],ESe=["onMouseEnter","onClick","onMouseLeave"],jSe=["id"],_Se=["id"];function Xl(){return Xl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xl.apply(null,arguments)}function Tb(e,t){if(e==null)return{};var n,r,i=CSe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function CSe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function F3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Sn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?F3(Object(n),!0).forEach(function(r){kSe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kSe(e,t,n){return(t=NSe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function NSe(e){var t=ASe(e,"string");return typeof t=="symbol"?t:t+""}function ASe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function OSe(e){var t=y.useMemo(()=>mO(e.children,rg),[e.children]),n=Ie(r=>L1e(r,e.id,t));return n==null?null:y.createElement(oSe,{legendPayload:n})}function TSe(e){if(!(e==null||typeof e=="boolean"||typeof e=="function")){if(y.isValidElement(e)){var t,n=(t=e.props)===null||t===void 0?void 0:t.fill;return typeof n=="string"?n:void 0}var{fill:r}=e;return typeof r=="string"?r:void 0}}var PSe=y.memo(e=>{var{dataKey:t,nameKey:n,sectors:r,stroke:i,strokeWidth:a,fill:o,name:l,hide:c,tooltipType:f,id:h,activeShape:d}=e,g=TSe(d),v=r.map(w=>{var S=w.tooltipPayload;return g==null||S==null?S:S.map(E=>Sn(Sn({},E),{},{color:g,fill:g}))}),b={dataDefinedOnItem:v,getPosition:w=>{var S;return(S=r[Number(w)])===null||S===void 0?void 0:S.tooltipPosition},settings:{stroke:i,strokeWidth:a,fill:o,dataKey:t,nameKey:n,name:Fd(l,t),hide:c,type:f,color:o,unit:"",graphicalItemId:h}};return y.createElement(xO,{tooltipEntrySettings:b})}),MSe=(e,t)=>e>t?"start":e<t?"end":"middle",DSe=(e,t,n)=>Ur(typeof t=="function"?t(e):t,n,n*.8),RSe=(e,t,n)=>{var{top:r,left:i,width:a,height:o}=t,l=JH(a,o),c=i+Ur(e.cx,a,a/2),f=r+Ur(e.cy,o,o/2),h=Ur(e.innerRadius,l,0),d=DSe(n,e.outerRadius,l),g=e.maxRadius||Math.sqrt(a*a+o*o)/2;return{cx:c,cy:f,innerRadius:h,outerRadius:d,maxRadius:g}},ISe=(e,t)=>{var n=vr(t-e),r=Math.min(Math.abs(t-e),360);return n*r},LSe=(e,t)=>{if(y.isValidElement(e))return y.cloneElement(e,t);if(typeof e=="function")return e(t);var n=Pt("recharts-pie-label-line",typeof e!="boolean"?e.className:""),{key:r}=t,i=Tb(t,SSe);return y.createElement(GN,Xl({},i,{type:"linear",className:n}))},zSe=(e,t,n)=>{if(y.isValidElement(e))return y.cloneElement(e,t);var r=n;if(typeof e=="function"&&(r=e(t),y.isValidElement(r)))return r;var i=Pt("recharts-pie-label-text",N7(e));return y.createElement(Nb,Xl({},t,{alignmentBaseline:"middle",className:i}),r)};function $Se(e){var{sectors:t,props:n,showLabels:r}=e,{label:i,labelLine:a,dataKey:o}=n;if(!r||!i||!t)return null;var l=$i(n),c=hc(i),f=hc(a),h=typeof i=="object"&&"offsetRadius"in i&&typeof i.offsetRadius=="number"&&i.offsetRadius||20,d=t.map((g,v)=>{var b=(g.startAngle+g.endAngle)/2,w=Yn(g.cx,g.cy,g.outerRadius+h,b),S=Sn(Sn(Sn(Sn({},l),g),{},{stroke:"none"},c),{},{index:v,textAnchor:MSe(w.x,g.cx)},w),E=Sn(Sn(Sn(Sn({},l),g),{},{fill:"none",stroke:g.fill},f),{},{index:v,points:[Yn(g.cx,g.cy,g.outerRadius,b),w],key:"line"});return y.createElement(bi,{zIndex:Xn.label,key:"label-".concat(g.startAngle,"-").concat(g.endAngle,"-").concat(g.midAngle,"-").concat(v)},y.createElement(lr,null,a&&LSe(a,E),zSe(i,S,en(g,o))))});return y.createElement(lr,{className:"recharts-pie-labels"},d)}function BSe(e){var{sectors:t,props:n,showLabels:r}=e,{label:i}=n;return typeof i=="object"&&i!=null&&"position"in i?y.createElement(fO,{label:i}):y.createElement($Se,{sectors:t,props:n,showLabels:r})}function FSe(e){var{sectors:t,activeShape:n,inactiveShape:r,allOtherPieProps:i,shape:a,id:o}=e,l=Ie(Yl),c=Ie(iO),f=Ie(J9),{onMouseEnter:h,onClick:d,onMouseLeave:g}=i,v=Tb(i,ESe),b=gO(h,i.dataKey,o),w=vO(g),S=yO(d,i.dataKey,o);return t==null||t.length===0?null:y.createElement(y.Fragment,null,t.map((E,C)=>{if((E==null?void 0:E.startAngle)===0&&(E==null?void 0:E.endAngle)===0&&t.length!==1)return null;var _=f==null||f===o,N=String(C)===l&&(c==null||i.dataKey===c)&&_,O=l?r:null,A=n&&N?n:O,T=Sn(Sn({},E),{},{stroke:E.stroke,tabIndex:-1,[kH]:C,[NH]:o});return y.createElement(lr,Xl({key:"sector-".concat(E==null?void 0:E.startAngle,"-").concat(E==null?void 0:E.endAngle,"-").concat(E.midAngle,"-").concat(C),tabIndex:-1,className:"recharts-pie-sector"},Ip(v,E,C),{onMouseEnter:b(E,C),onMouseLeave:w(E,C),onClick:S(E,C)}),y.createElement(pO,Xl({option:a??A,index:C,shapeType:"sector",isActive:N},T)))}))}function USe(e){var t,{pieSettings:n,displayedData:r,cells:i,offset:a}=e,{cornerRadius:o,startAngle:l,endAngle:c,dataKey:f,nameKey:h,tooltipType:d}=n,g=Math.abs(n.minAngle),v=ISe(l,c),b=Math.abs(v),w=r.length<=1?0:(t=n.paddingAngle)!==null&&t!==void 0?t:0,S=r.filter(A=>en(A,f,0)!==0).length,E=(b>=360?S:S-1)*w,C=b-S*g-E,_=r.reduce((A,T)=>{var P=en(T,f,0);return A+(Me(P)?P:0)},0),N;if(_>0){var O;N=r.map((A,T)=>{var P=en(A,f,0),I=en(A,h,T),z=RSe(n,a,A),F=(Me(P)?P:0)/_,B,G=Sn(Sn({},A),i&&i[T]&&i[T].props),L=G!=null&&"fill"in G&&typeof G.fill=="string"?G.fill:n.fill;T?B=O.endAngle+vr(v)*w*(P!==0?1:0):B=l;var V=B+vr(v)*((P!==0?g:0)+F*C),D=(B+V)/2,q=(z.innerRadius+z.outerRadius)/2,X=[{name:I,value:P,payload:G,dataKey:f,type:d,color:L,fill:L,graphicalItemId:n.id}],K=Yn(z.cx,z.cy,q,D);return O=Sn(Sn(Sn(Sn({},n.presentationProps),{},{percent:F,cornerRadius:typeof o=="string"?parseFloat(o):o,name:I,tooltipPayload:X,midAngle:D,middleRadius:q,tooltipPosition:K},G),z),{},{value:P,dataKey:f,startAngle:B,endAngle:V,payload:G,paddingAngle:vr(v)*w}),O})}return N}function HSe(e){var{showLabels:t,sectors:n,children:r}=e,i=y.useMemo(()=>!t||!n?[]:n.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})),[n,t]);return y.createElement(b1e,{value:t?i:void 0},r)}function qSe(e){var{props:t,previousSectorsRef:n,id:r}=e,{sectors:i,isAnimationActive:a,animationBegin:o,animationDuration:l,animationEasing:c,activeShape:f,inactiveShape:h,onAnimationStart:d,onAnimationEnd:g}=t,v=qp(t,"recharts-pie-"),b=n.current,[w,S]=y.useState(!1),E=y.useCallback(()=>{typeof g=="function"&&g(),S(!1)},[g]),C=y.useCallback(()=>{typeof d=="function"&&d(),S(!0)},[d]);return y.createElement(HSe,{showLabels:!w,sectors:i},y.createElement(Hp,{animationId:v,begin:o,duration:l,isActive:a,easing:c,onAnimationStart:C,onAnimationEnd:E,key:v},_=>{var N,O=[],A=i&&i[0],T=(N=A==null?void 0:A.startAngle)!==null&&N!==void 0?N:0;return i==null||i.forEach((P,I)=>{var z=b&&b[I],F=I>0?pc(P,"paddingAngle",0):0;if(z){var B=wn(z.endAngle-z.startAngle,P.endAngle-P.startAngle,_),G=Sn(Sn({},P),{},{startAngle:T+F,endAngle:T+B+F});O.push(G),T=G.endAngle}else{var{endAngle:L,startAngle:V}=P,D=wn(0,L-V,_),q=Sn(Sn({},P),{},{startAngle:T+F,endAngle:T+D+F});O.push(q),T=q.endAngle}}),n.current=O,y.createElement(lr,null,y.createElement(FSe,{sectors:O,activeShape:f,inactiveShape:h,allOtherPieProps:t,shape:t.shape,id:r}))}),y.createElement(BSe,{showLabels:!w,sectors:i,props:t}),t.children)}var VSe={animationBegin:400,animationDuration:1500,animationEasing:"ease",cx:"50%",cy:"50%",dataKey:"value",endAngle:360,fill:"#808080",hide:!1,innerRadius:0,isAnimationActive:"auto",label:!1,labelLine:!0,legendType:"rect",minAngle:0,nameKey:"name",outerRadius:"80%",paddingAngle:0,rootTabIndex:0,startAngle:0,stroke:"#fff",zIndex:Xn.area};function KSe(e){var{id:t}=e,n=Tb(e,jSe),{hide:r,className:i,rootTabIndex:a}=e,o=y.useMemo(()=>mO(e.children,rg),[e.children]),l=Ie(h=>z1e(h,t,o)),c=y.useRef(null),f=Pt("recharts-pie",i);return r||l==null?(c.current=null,y.createElement(lr,{tabIndex:a,className:f})):y.createElement(bi,{zIndex:e.zIndex},y.createElement(PSe,{dataKey:e.dataKey,nameKey:e.nameKey,sectors:l,stroke:e.stroke,strokeWidth:e.strokeWidth,fill:e.fill,name:e.name,hide:e.hide,tooltipType:e.tooltipType,id:t,activeShape:e.activeShape}),y.createElement(lr,{tabIndex:a,className:f},y.createElement(qSe,{props:Sn(Sn({},n),{},{sectors:l}),previousSectorsRef:c,id:t})))}function YSe(e){var t=Qn(e,VSe),{id:n}=t,r=Tb(t,_Se),i=$i(r);return y.createElement(bO,{id:n,type:"pie"},a=>y.createElement(y.Fragment,null,y.createElement(wSe,{type:"pie",id:a,data:r.data,dataKey:r.dataKey,hide:r.hide,angleAxisId:0,radiusAxisId:0,name:r.name,nameKey:r.nameKey,tooltipType:r.tooltipType,legendType:r.legendType,fill:r.fill,cx:r.cx,cy:r.cy,startAngle:r.startAngle,endAngle:r.endAngle,paddingAngle:r.paddingAngle,minAngle:r.minAngle,innerRadius:r.innerRadius,outerRadius:r.outerRadius,cornerRadius:r.cornerRadius,presentationProps:i,maxRadius:t.maxRadius}),y.createElement(OSe,Xl({},r,{id:a})),y.createElement(KSe,Xl({},r,{id:a}))))}var R7=YSe;R7.displayName="Pie";var XSe=["points"];function U3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function fj(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?U3(Object(n),!0).forEach(function(r){GSe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):U3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function GSe(e,t,n){return(t=WSe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WSe(e){var t=QSe(e,"string");return typeof t=="symbol"?t:t+""}function QSe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Hx(){return Hx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hx.apply(null,arguments)}function ZSe(e,t){if(e==null)return{};var n,r,i=JSe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function JSe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function eEe(e){var{option:t,dotProps:n,className:r}=e;if(y.isValidElement(t))return y.cloneElement(t,n);if(typeof t=="function")return t(n);var i=Pt(r,typeof t!="boolean"?t.className:""),a=n??{},{points:o}=a,l=ZSe(a,XSe);return y.createElement(j7,Hx({},l,{className:i}))}function tEe(e,t){return e==null?!1:t?!0:e.length===1}function nEe(e){var{points:t,dot:n,className:r,dotClassName:i,dataKey:a,baseProps:o,needClip:l,clipPathId:c,zIndex:f=Xn.scatter}=e;if(!tEe(t,n))return null;var h=T7(n),d=Iue(n),g=t.map((b,w)=>{var S,E,C=fj(fj(fj({r:3},o),d),{},{index:w,cx:(S=b.x)!==null&&S!==void 0?S:void 0,cy:(E=b.y)!==null&&E!==void 0?E:void 0,dataKey:a,value:b.value,payload:b.payload,points:t});return y.createElement(eEe,{key:"dot-".concat(w),option:n,dotProps:C,className:i})}),v={};return l&&c!=null&&(v.clipPath="url(#clipPath-".concat(h?"":"dots-").concat(c,")")),y.createElement(bi,{zIndex:f},y.createElement(lr,Hx({className:r},v),g))}function H3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function q3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?H3(Object(n),!0).forEach(function(r){rEe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function rEe(e,t,n){return(t=iEe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iEe(e){var t=aEe(e,"string");return typeof t=="symbol"?t:t+""}function aEe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var I7=0,oEe={xAxis:{},yAxis:{},zAxis:{}},L7=qr({name:"cartesianAxis",initialState:oEe,reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=t.payload},prepare:vn()},replaceXAxis:{reducer(e,t){var{prev:n,next:r}=t.payload;e.xAxis[n.id]!==void 0&&(n.id!==r.id&&delete e.xAxis[n.id],e.xAxis[r.id]=r)},prepare:vn()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:vn()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=t.payload},prepare:vn()},replaceYAxis:{reducer(e,t){var{prev:n,next:r}=t.payload;e.yAxis[n.id]!==void 0&&(n.id!==r.id&&delete e.yAxis[n.id],e.yAxis[r.id]=r)},prepare:vn()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:vn()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=t.payload},prepare:vn()},replaceZAxis:{reducer(e,t){var{prev:n,next:r}=t.payload;e.zAxis[n.id]!==void 0&&(n.id!==r.id&&delete e.zAxis[n.id],e.zAxis[r.id]=r)},prepare:vn()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:vn()},updateYAxisWidth(e,t){var{id:n,width:r}=t.payload,i=e.yAxis[n];if(i){var a,o=i.widthHistory||[];if(o.length===3&&o[0]===o[2]&&r===o[1]&&r!==i.width&&Math.abs(r-((a=o[0])!==null&&a!==void 0?a:0))<=1)return;var l=[...o,r].slice(-3);e.yAxis[n]=q3(q3({},i),{},{width:r,widthHistory:l})}}}}),{addXAxis:sEe,replaceXAxis:lEe,removeXAxis:uEe,addYAxis:cEe,replaceYAxis:fEe,removeYAxis:dEe,addZAxis:d5e,replaceZAxis:h5e,removeZAxis:m5e,updateYAxisWidth:hEe}=L7.actions,mEe=L7.reducer,pEe=le([ur],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),gEe=le([pEe,Cs,ks],(e,t,n)=>{if(!(!e||t==null||n==null))return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,n-e.top-e.bottom)}}),wO=()=>Ie(gEe),vEe=()=>Ie(ibe);function V3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function dj(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?V3(Object(n),!0).forEach(function(r){yEe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):V3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yEe(e,t,n){return(t=xEe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xEe(e){var t=bEe(e,"string");return typeof t=="symbol"?t:t+""}function bEe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var wEe=e=>{var{point:t,childIndex:n,mainColor:r,activeDot:i,dataKey:a,clipPath:o}=e;if(i===!1||t.x==null||t.y==null)return null;var l={index:n,dataKey:a,cx:t.x,cy:t.y,r:4,fill:r??"none",strokeWidth:2,stroke:"#fff",payload:t.payload,value:t.value},c=dj(dj(dj({},l),hc(i)),PN(i)),f;return y.isValidElement(i)?f=y.cloneElement(i,c):typeof i=="function"?f=i(c):f=y.createElement(j7,c),y.createElement(lr,{className:"recharts-active-dot",clipPath:o},f)};function SEe(e){var{points:t,mainColor:n,activeDot:r,itemDataKey:i,clipPath:a,zIndex:o=Xn.activeDot}=e,l=Ie(Yl),c=vEe();if(t==null||c==null)return null;var f=t.find(h=>c.includes(h.payload));return jn(f)?null:y.createElement(bi,{zIndex:o},y.createElement(wEe,{point:f,childIndex:Number(l),mainColor:n,dataKey:i,activeDot:r,clipPath:a}))}var K3=(e,t,n)=>{var r=n??e;if(!jn(r))return Ur(r,t,0)},EEe=(e,t,n)=>{var r={},i=e.filter(mb),a=e.filter(f=>f.stackId==null),o=i.reduce((f,h)=>{var d=f[h.stackId];return d==null&&(d=[]),d.push(h),f[h.stackId]=d,f},r),l=Object.entries(o).map(f=>{var h,[d,g]=f,v=g.map(w=>w.dataKey),b=K3(t,n,(h=g[0])===null||h===void 0?void 0:h.barSize);return{stackId:d,dataKeys:v,barSize:b}}),c=a.map(f=>{var h=[f.dataKey].filter(g=>g!=null),d=K3(t,n,f.barSize);return{stackId:void 0,dataKeys:h,barSize:d}});return[...l,...c]};function Y3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ry(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Y3(Object(n),!0).forEach(function(r){jEe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jEe(e,t,n){return(t=_Ee(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _Ee(e){var t=CEe(e,"string");return typeof t=="symbol"?t:t+""}function CEe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function kEe(e,t,n,r,i){var a,o=r.length;if(!(o<1)){var l=Ur(e,n,0,!0),c,f=[];if(At((a=r[0])===null||a===void 0?void 0:a.barSize)){var h=!1,d=n/o,g=r.reduce((C,_)=>C+(_.barSize||0),0);g+=(o-1)*l,g>=n&&(g-=(o-1)*l,l=0),g>=n&&d>0&&(h=!0,d*=.9,g=o*d);var v=(n-g)/2>>0,b={offset:v-l,size:0};c=r.reduce((C,_)=>{var N,O={stackId:_.stackId,dataKeys:_.dataKeys,position:{offset:b.offset+b.size+l,size:h?d:(N=_.barSize)!==null&&N!==void 0?N:0}},A=[...C,O];return b=O.position,A},f)}else{var w=Ur(t,n,0,!0);n-2*w-(o-1)*l<=0&&(l=0);var S=(n-2*w-(o-1)*l)/o;S>1&&(S>>=0);var E=At(i)?Math.min(S,i):S;c=r.reduce((C,_,N)=>[...C,{stackId:_.stackId,dataKeys:_.dataKeys,position:{offset:w+(S+l)*N+(S-E)/2,size:E}}],f)}return c}}var NEe=(e,t,n,r,i,a,o)=>{var l=jn(o)?t:o,c=kEe(n,r,i!==a?i:a,e,l);return i!==a&&c!=null&&(c=c.map(f=>ry(ry({},f),{},{position:ry(ry({},f.position),{},{offset:f.position.offset-i/2})}))),c},AEe=(e,t)=>{var n=oA(t);if(!(!e||n==null||t==null)){var{stackId:r}=t;if(r!=null){var i=e[r];if(i){var{stackedData:a}=i;if(a)return a.find(o=>o.key===n)}}}},OEe=(e,t)=>{if(!(e==null||t==null)){var n=e.find(r=>r.stackId===t.stackId&&t.dataKey!=null&&r.dataKeys.includes(t.dataKey));if(n!=null)return n.position}};function TEe(e,t){return e&&typeof e=="object"&&"zIndex"in e&&typeof e.zIndex=="number"&&At(e.zIndex)?e.zIndex:t}var z7=e=>{var{chartData:t}=e,n=tn(),r=Vr();return y.useEffect(()=>r?()=>{}:(n(r3(t)),()=>{n(r3(void 0))}),[t,n,r]),null},X3={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},$7=qr({name:"brush",initialState:X3,reducers:{setBrushSettings(e,t){return t.payload==null?X3:t.payload}}}),{setBrushSettings:p5e}=$7.actions,PEe=$7.reducer;function MEe(e){return(e%180+180)%180}var DEe=function(t){var{width:n,height:r}=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=MEe(i),o=a*Math.PI/180,l=Math.atan(r/n),c=o>l&&o<Math.PI-l?r/Math.sin(o):n/Math.cos(o);return Math.abs(c)},REe={dots:[],areas:[],lines:[]},B7=qr({name:"referenceElements",initialState:REe,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var n=sa(e).dots.findIndex(r=>r===t.payload);n!==-1&&e.dots.splice(n,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var n=sa(e).areas.findIndex(r=>r===t.payload);n!==-1&&e.areas.splice(n,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var n=sa(e).lines.findIndex(r=>r===t.payload);n!==-1&&e.lines.splice(n,1)}}}),{addDot:g5e,removeDot:v5e,addArea:y5e,removeArea:x5e,addLine:b5e,removeLine:w5e}=B7.actions,IEe=B7.reducer,LEe=y.createContext(void 0),zEe=e=>{var{children:t}=e,[n]=y.useState("".concat($m("recharts"),"-clip")),r=wO();if(r==null)return null;var{x:i,y:a,width:o,height:l}=r;return y.createElement(LEe.Provider,{value:n},y.createElement("defs",null,y.createElement("clipPath",{id:n},y.createElement("rect",{x:i,y:a,height:l,width:o}))),t)};function F7(e,t){if(t<1)return[];if(t===1)return e;for(var n=[],r=0;r<e.length;r+=t){var i=e[r];i!==void 0&&n.push(i)}return n}function $Ee(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return DEe(r,n)}function BEe(e,t,n){var r=n==="width",{x:i,y:a,width:o,height:l}=e;return t===1?{start:r?i:a,end:r?i+o:a+l}:{start:r?i+o:a+l,end:r?i:a}}function Zm(e,t,n,r,i){if(e*t<e*r||e*t>e*i)return!1;var a=n();return e*(t-e*a/2-r)>=0&&e*(t+e*a/2-i)<=0}function FEe(e,t){return F7(e,t+1)}function UEe(e,t,n,r,i){for(var a=(r||[]).slice(),{start:o,end:l}=t,c=0,f=1,h=o,d=function(){var b=r==null?void 0:r[c];if(b===void 0)return{v:F7(r,f)};var w=c,S,E=()=>(S===void 0&&(S=n(b,w)),S),C=b.coordinate,_=c===0||Zm(e,C,E,h,l);_||(c=0,h=o,f+=1),_&&(h=C+e*(E()/2+i),c+=f)},g;f<=a.length;)if(g=d(),g)return g.v;return[]}function HEe(e,t,n,r,i){var a=(r||[]).slice(),o=a.length;if(o===0)return[];for(var{start:l,end:c}=t,f=1;f<=o;f++){for(var h=(o-1)%f,d=l,g=!0,v=function(){var N=r[w];if(N==null)return 0;var O=w,A,T=()=>(A===void 0&&(A=n(N,O)),A),P=N.coordinate,I=w===h||Zm(e,P,T,d,c);if(!I)return g=!1,1;I&&(d=P+e*(T()/2+i))},b,w=h;w<o&&(b=v(),!(b!==0&&b===1));w+=f);if(g){for(var S=[],E=h;E<o;E+=f){var C=r[E];C!=null&&S.push(C)}return S}}return[]}function G3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Lr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?G3(Object(n),!0).forEach(function(r){qEe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):G3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qEe(e,t,n){return(t=VEe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VEe(e){var t=KEe(e,"string");return typeof t=="symbol"?t:t+""}function KEe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function YEe(e,t,n,r,i){for(var a=(r||[]).slice(),o=a.length,{start:l}=t,{end:c}=t,f=function(g){var v=a[g];if(v==null)return 1;var b=v,w,S=()=>(w===void 0&&(w=n(v,g)),w);if(g===o-1){var E=e*(b.coordinate+e*S()/2-c);a[g]=b=Lr(Lr({},b),{},{tickCoord:E>0?b.coordinate-E*e:b.coordinate})}else a[g]=b=Lr(Lr({},b),{},{tickCoord:b.coordinate});if(b.tickCoord!=null){var C=Zm(e,b.tickCoord,S,l,c);C&&(c=b.tickCoord-e*(S()/2+i),a[g]=Lr(Lr({},b),{},{isShow:!0}))}},h=o-1;h>=0;h--)f(h);return a}function XEe(e,t,n,r,i,a){var o=(r||[]).slice(),l=o.length,{start:c,end:f}=t;if(a){var h=r[l-1];if(h!=null){var d=n(h,l-1),g=e*(h.coordinate+e*d/2-f);if(o[l-1]=h=Lr(Lr({},h),{},{tickCoord:g>0?h.coordinate-g*e:h.coordinate}),h.tickCoord!=null){var v=Zm(e,h.tickCoord,()=>d,c,f);v&&(f=h.tickCoord-e*(d/2+i),o[l-1]=Lr(Lr({},h),{},{isShow:!0}))}}}for(var b=a?l-1:l,w=function(C){var _=o[C];if(_==null)return 1;var N=_,O,A=()=>(O===void 0&&(O=n(_,C)),O);if(C===0){var T=e*(N.coordinate-e*A()/2-c);o[C]=N=Lr(Lr({},N),{},{tickCoord:T<0?N.coordinate-T*e:N.coordinate})}else o[C]=N=Lr(Lr({},N),{},{tickCoord:N.coordinate});if(N.tickCoord!=null){var P=Zm(e,N.tickCoord,A,c,f);P&&(c=N.tickCoord+e*(A()/2+i),o[C]=Lr(Lr({},N),{},{isShow:!0}))}},S=0;S<b;S++)w(S);return o}function SO(e,t,n){var{tick:r,ticks:i,viewBox:a,minTickGap:o,orientation:l,interval:c,tickFormatter:f,unit:h,angle:d}=e;if(!i||!i.length||!r)return[];if(Me(c)||Up.isSsr){var g;return(g=FEe(i,Me(c)?c:0))!==null&&g!==void 0?g:[]}var v=[],b=l==="top"||l==="bottom"?"width":"height",w=h&&b==="width"?jm(h,{fontSize:t,letterSpacing:n}):{width:0,height:0},S=(O,A)=>{var T=typeof f=="function"?f(O.value,A):O.value;return b==="width"?$Ee(jm(T,{fontSize:t,letterSpacing:n}),w,d):jm(T,{fontSize:t,letterSpacing:n})[b]},E=i[0],C=i[1],_=i.length>=2&&E!=null&&C!=null?vr(C.coordinate-E.coordinate):1,N=BEe(a,_,b);return c==="equidistantPreserveStart"?UEe(_,N,S,i,o):c==="equidistantPreserveEnd"?HEe(_,N,S,i,o):(c==="preserveStart"||c==="preserveStartEnd"?v=XEe(_,N,S,i,o,c==="preserveStartEnd"):v=YEe(_,N,S,i,o),v.filter(O=>O.isShow))}var GEe=e=>{var{ticks:t,label:n,labelGapWithTick:r=5,tickSize:i=0,tickMargin:a=0}=e,o=0;if(t){Array.from(t).forEach(h=>{if(h){var d=h.getBoundingClientRect();d.width>o&&(o=d.width)}});var l=n?n.getBoundingClientRect().width:0,c=i+a,f=o+c+l+(n?r:0);return Math.round(f)}return 0},WEe={xAxis:{},yAxis:{}},U7=qr({name:"renderedTicks",initialState:WEe,reducers:{setRenderedTicks:(e,t)=>{var{axisType:n,axisId:r,ticks:i}=t.payload;e[n][r]=i},removeRenderedTicks:(e,t)=>{var{axisType:n,axisId:r}=t.payload;delete e[n][r]}}}),{setRenderedTicks:QEe,removeRenderedTicks:ZEe}=U7.actions,JEe=U7.reducer,eje=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function tje(e,t){if(e==null)return{};var n,r,i=nje(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function nje(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Sc(){return Sc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sc.apply(null,arguments)}function W3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Pn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?W3(Object(n),!0).forEach(function(r){rje(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function rje(e,t,n){return(t=ije(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ije(e){var t=aje(e,"string");return typeof t=="symbol"?t:t+""}function aje(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var as={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",zIndex:Xn.axis};function oje(e){var{x:t,y:n,width:r,height:i,orientation:a,mirror:o,axisLine:l,otherSvgProps:c}=e;if(!l)return null;var f=Pn(Pn(Pn({},c),$i(l)),{},{fill:"none"});if(a==="top"||a==="bottom"){var h=+(a==="top"&&!o||a==="bottom"&&o);f=Pn(Pn({},f),{},{x1:t,y1:n+h*i,x2:t+r,y2:n+h*i})}else{var d=+(a==="left"&&!o||a==="right"&&o);f=Pn(Pn({},f),{},{x1:t+d*r,y1:n,x2:t+d*r,y2:n+i})}return y.createElement("line",Sc({},f,{className:Pt("recharts-cartesian-axis-line",pc(l,"className"))}))}function sje(e,t,n,r,i,a,o,l,c){var f,h,d,g,v,b,w=l?-1:1,S=e.tickSize||o,E=Me(e.tickCoord)?e.tickCoord:e.coordinate;switch(a){case"top":f=h=e.coordinate,g=n+ +!l*i,d=g-w*S,b=d-w*c,v=E;break;case"left":d=g=e.coordinate,h=t+ +!l*r,f=h-w*S,v=f-w*c,b=E;break;case"right":d=g=e.coordinate,h=t+ +l*r,f=h+w*S,v=f+w*c,b=E;break;default:f=h=e.coordinate,g=n+ +l*i,d=g+w*S,b=d+w*c,v=E;break}return{line:{x1:f,y1:d,x2:h,y2:g},tick:{x:v,y:b}}}function lje(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function uje(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function cje(e){var{option:t,tickProps:n,value:r}=e,i,a=Pt(n.className,"recharts-cartesian-axis-tick-value");if(y.isValidElement(t))i=y.cloneElement(t,Pn(Pn({},n),{},{className:a}));else if(typeof t=="function")i=t(Pn(Pn({},n),{},{className:a}));else{var o="recharts-cartesian-axis-tick-value";typeof t!="boolean"&&(o=Pt(o,N7(t))),i=y.createElement(Nb,Sc({},n,{className:o}),r)}return i}function fje(e){var{ticks:t,axisType:n,axisId:r}=e,i=tn();return y.useEffect(()=>{if(r==null||n==null)return eu;var a=t.map(o=>({value:o.value,coordinate:o.coordinate,offset:o.offset,index:o.index}));return i(QEe({ticks:a,axisId:r,axisType:n})),()=>{i(ZEe({axisId:r,axisType:n}))}},[i,t,r,n]),null}var dje=y.forwardRef((e,t)=>{var{ticks:n=[],tick:r,tickLine:i,stroke:a,tickFormatter:o,unit:l,padding:c,tickTextProps:f,orientation:h,mirror:d,x:g,y:v,width:b,height:w,tickSize:S,tickMargin:E,fontSize:C,letterSpacing:_,getTicksConfig:N,events:O,axisType:A,axisId:T}=e,P=SO(Pn(Pn({},N),{},{ticks:n}),C,_),I=$i(N),z=hc(r),F=p7(I.textAnchor)?I.textAnchor:lje(h,d),B=uje(h,d),G={};typeof i=="object"&&(G=i);var L=Pn(Pn({},I),{},{fill:"none"},G),V=P.map(X=>Pn({entry:X},sje(X,g,v,b,w,h,S,d,E))),D=V.map(X=>{var{entry:K,line:R}=X;return y.createElement(lr,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(K.value,"-").concat(K.coordinate,"-").concat(K.tickCoord)},i&&y.createElement("line",Sc({},L,R,{className:Pt("recharts-cartesian-axis-tick-line",pc(i,"className"))})))}),q=V.map((X,K)=>{var R,H,{entry:U,tick:$}=X,Q=Pn(Pn(Pn(Pn({verticalAnchor:B},I),{},{textAnchor:F,stroke:"none",fill:a},$),{},{index:K,payload:U,visibleTicksCount:P.length,tickFormatter:o,padding:c},f),{},{angle:(R=(H=f==null?void 0:f.angle)!==null&&H!==void 0?H:I.angle)!==null&&R!==void 0?R:0}),J=Pn(Pn({},Q),z);return y.createElement(lr,Sc({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(U.value,"-").concat(U.coordinate,"-").concat(U.tickCoord)},Ip(O,U,K)),r&&y.createElement(cje,{option:r,tickProps:J,value:"".concat(typeof o=="function"?o(U.value,K):U.value).concat(l||"")}))});return y.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(A,"-ticks")},y.createElement(fje,{ticks:P,axisId:T,axisType:A}),q.length>0&&y.createElement(bi,{zIndex:Xn.label},y.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(A,"-tick-labels"),ref:t},q)),D.length>0&&y.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(A,"-tick-lines")},D))}),hje=y.forwardRef((e,t)=>{var{axisLine:n,width:r,height:i,className:a,hide:o,ticks:l,axisType:c,axisId:f}=e,h=tje(e,eje),[d,g]=y.useState(""),[v,b]=y.useState(""),w=y.useRef(null);y.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var E;return GEe({ticks:w.current,label:(E=e.labelRef)===null||E===void 0?void 0:E.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var S=y.useCallback(E=>{if(E){var C=E.getElementsByClassName("recharts-cartesian-axis-tick-value");w.current=C;var _=C[0];if(_){var N=window.getComputedStyle(_),O=N.fontSize,A=N.letterSpacing;(O!==d||A!==v)&&(g(O),b(A))}}},[d,v]);return o||r!=null&&r<=0||i!=null&&i<=0?null:y.createElement(bi,{zIndex:e.zIndex},y.createElement(lr,{className:Pt("recharts-cartesian-axis",a)},y.createElement(oje,{x:e.x,y:e.y,width:r,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:n,otherSvgProps:$i(e)}),y.createElement(dje,{ref:S,axisType:c,events:h,fontSize:d,getTicksConfig:e,height:e.height,letterSpacing:v,mirror:e.mirror,orientation:e.orientation,padding:e.padding,stroke:e.stroke,tick:e.tick,tickFormatter:e.tickFormatter,tickLine:e.tickLine,tickMargin:e.tickMargin,tickSize:e.tickSize,tickTextProps:e.tickTextProps,ticks:l,unit:e.unit,width:e.width,x:e.x,y:e.y,axisId:f}),y.createElement(a1e,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},y.createElement(p1e,{label:e.label,labelRef:e.labelRef}),e.children)))}),EO=y.forwardRef((e,t)=>{var n=Qn(e,as);return y.createElement(hje,Sc({},n,{ref:t}))});EO.displayName="CartesianAxis";var mje=["x1","y1","x2","y2","key"],pje=["offset"],gje=["xAxisId","yAxisId"],vje=["xAxisId","yAxisId"];function Q3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function $r(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Q3(Object(n),!0).forEach(function(r){yje(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Q3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yje(e,t,n){return(t=xje(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xje(e){var t=bje(e,"string");return typeof t=="symbol"?t:t+""}function bje(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Hu(){return Hu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hu.apply(null,arguments)}function qx(e,t){if(e==null)return{};var n,r,i=wje(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function wje(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Sje=e=>{var{fill:t}=e;if(!t||t==="none")return null;var{fillOpacity:n,x:r,y:i,width:a,height:o,ry:l}=e;return y.createElement("rect",{x:r,y:i,ry:l,width:a,height:o,stroke:"none",fill:t,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function H7(e){var{option:t,lineItemProps:n}=e,r;if(y.isValidElement(t))r=y.cloneElement(t,n);else if(typeof t=="function")r=t(n);else{var i,{x1:a,y1:o,x2:l,y2:c,key:f}=n,h=qx(n,mje),d=(i=$i(h))!==null&&i!==void 0?i:{},{offset:g}=d,v=qx(d,pje);r=y.createElement("line",Hu({},v,{x1:a,y1:o,x2:l,y2:c,fill:"none",key:f}))}return r}function Eje(e){var{x:t,width:n,horizontal:r=!0,horizontalPoints:i}=e;if(!r||!i||!i.length)return null;var{xAxisId:a,yAxisId:o}=e,l=qx(e,gje),c=i.map((f,h)=>{var d=$r($r({},l),{},{x1:t,y1:f,x2:t+n,y2:f,key:"line-".concat(h),index:h});return y.createElement(H7,{key:"line-".concat(h),option:r,lineItemProps:d})});return y.createElement("g",{className:"recharts-cartesian-grid-horizontal"},c)}function jje(e){var{y:t,height:n,vertical:r=!0,verticalPoints:i}=e;if(!r||!i||!i.length)return null;var{xAxisId:a,yAxisId:o}=e,l=qx(e,vje),c=i.map((f,h)=>{var d=$r($r({},l),{},{x1:f,y1:t,x2:f,y2:t+n,key:"line-".concat(h),index:h});return y.createElement(H7,{option:r,lineItemProps:d,key:"line-".concat(h)})});return y.createElement("g",{className:"recharts-cartesian-grid-vertical"},c)}function _je(e){var{horizontalFill:t,fillOpacity:n,x:r,y:i,width:a,height:o,horizontalPoints:l,horizontal:c=!0}=e;if(!c||!t||!t.length||l==null)return null;var f=l.map(d=>Math.round(d+i-i)).sort((d,g)=>d-g);i!==f[0]&&f.unshift(0);var h=f.map((d,g)=>{var v=f[g+1],b=v==null,w=b?i+o-d:v-d;if(w<=0)return null;var S=g%t.length;return y.createElement("rect",{key:"react-".concat(g),y:d,x:r,height:w,width:a,stroke:"none",fill:t[S],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return y.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},h)}function Cje(e){var{vertical:t=!0,verticalFill:n,fillOpacity:r,x:i,y:a,width:o,height:l,verticalPoints:c}=e;if(!t||!n||!n.length)return null;var f=c.map(d=>Math.round(d+i-i)).sort((d,g)=>d-g);i!==f[0]&&f.unshift(0);var h=f.map((d,g)=>{var v=f[g+1],b=v==null,w=b?i+o-d:v-d;if(w<=0)return null;var S=g%n.length;return y.createElement("rect",{key:"react-".concat(g),x:d,y:a,width:w,height:l,stroke:"none",fill:n[S],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return y.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},h)}var kje=(e,t)=>{var{xAxis:n,width:r,height:i,offset:a}=e;return jH(SO($r($r($r({},as),n),{},{ticks:_H(n),viewBox:{x:0,y:0,width:r,height:i}})),a.left,a.left+a.width,t)},Nje=(e,t)=>{var{yAxis:n,width:r,height:i,offset:a}=e;return jH(SO($r($r($r({},as),n),{},{ticks:_H(n),viewBox:{x:0,y:0,width:r,height:i}})),a.top,a.top+a.height,t)},Aje={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:Xn.grid};function jO(e){var t=VN(),n=KN(),r=PH(),i=$r($r({},Qn(e,Aje)),{},{x:Me(e.x)?e.x:r.left,y:Me(e.y)?e.y:r.top,width:Me(e.width)?e.width:r.width,height:Me(e.height)?e.height:r.height}),{xAxisId:a,yAxisId:o,x:l,y:c,width:f,height:h,syncWithTicks:d,horizontalValues:g,verticalValues:v}=i,b=Vr(),w=Ie(I=>qz(I,"xAxis",a,b)),S=Ie(I=>qz(I,"yAxis",o,b));if(!yo(f)||!yo(h)||!Me(l)||!Me(c))return null;var E=i.verticalCoordinatesGenerator||kje,C=i.horizontalCoordinatesGenerator||Nje,{horizontalPoints:_,verticalPoints:N}=i;if((!_||!_.length)&&typeof C=="function"){var O=g&&g.length,A=C({yAxis:S?$r($r({},S),{},{ticks:O?g:S.ticks}):void 0,width:t??f,height:n??h,offset:r},O?!0:d);px(Array.isArray(A),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof A,"]")),Array.isArray(A)&&(_=A)}if((!N||!N.length)&&typeof E=="function"){var T=v&&v.length,P=E({xAxis:w?$r($r({},w),{},{ticks:T?v:w.ticks}):void 0,width:t??f,height:n??h,offset:r},T?!0:d);px(Array.isArray(P),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof P,"]")),Array.isArray(P)&&(N=P)}return y.createElement(bi,{zIndex:i.zIndex},y.createElement("g",{className:"recharts-cartesian-grid"},y.createElement(Sje,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),y.createElement(_je,Hu({},i,{horizontalPoints:_})),y.createElement(Cje,Hu({},i,{verticalPoints:N})),y.createElement(Eje,Hu({},i,{offset:r,horizontalPoints:_,xAxis:w,yAxis:S})),y.createElement(jje,Hu({},i,{offset:r,verticalPoints:N,xAxis:w,yAxis:S}))))}jO.displayName="CartesianGrid";var Oje={},q7=qr({name:"errorBars",initialState:Oje,reducers:{addErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]||(e[n]=[]),e[n].push(r)},replaceErrorBar:(e,t)=>{var{itemId:n,prev:r,next:i}=t.payload;e[n]&&(e[n]=e[n].map(a=>a.dataKey===r.dataKey&&a.direction===r.direction?i:a))},removeErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]&&(e[n]=e[n].filter(i=>i.dataKey!==r.dataKey||i.direction!==r.direction))}}}),{addErrorBar:S5e,replaceErrorBar:E5e,removeErrorBar:j5e}=q7.actions,Tje=q7.reducer,Pje=["children"];function Mje(e,t){if(e==null)return{};var n,r,i=Dje(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Dje(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Rje={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},Ije=y.createContext(Rje);function V7(e){var{children:t}=e,n=Mje(e,Pje);return y.createElement(Ije.Provider,{value:n},t)}function _O(e,t){var n,r,i=Ie(f=>Os(f,e)),a=Ie(f=>Ts(f,t)),o=(n=i==null?void 0:i.allowDataOverflow)!==null&&n!==void 0?n:nr.allowDataOverflow,l=(r=a==null?void 0:a.allowDataOverflow)!==null&&r!==void 0?r:rr.allowDataOverflow,c=o||l;return{needClip:c,needClipX:o,needClipY:l}}function K7(e){var{xAxisId:t,yAxisId:n,clipPathId:r}=e,i=wO(),{needClipX:a,needClipY:o,needClip:l}=_O(t,n);if(!l||!i)return null;var{x:c,y:f,width:h,height:d}=i;return y.createElement("clipPath",{id:"clipPath-".concat(r)},y.createElement("rect",{x:a?c:c-h/2,y:o?f:f-d/2,width:a?h:h*2,height:o?d:d*2}))}var Y7=(e,t,n,r)=>Kl(e,"xAxis",t,r),X7=(e,t,n,r)=>Vl(e,"xAxis",t,r),G7=(e,t,n,r)=>Kl(e,"yAxis",n,r),W7=(e,t,n,r)=>Vl(e,"yAxis",n,r),Lje=le([Bt,Y7,G7,X7,W7],(e,t,n,r,i)=>_s(e,"xAxis")?gd(t,r,!1):gd(n,i,!1)),zje=(e,t,n,r,i)=>i;function $je(e){return e.type==="line"}var Bje=le([Eb,zje],(e,t)=>e.filter($je).find(n=>n.id===t)),Fje=le([Bt,Y7,G7,X7,W7,Bje,Lje,WN],(e,t,n,r,i,a,o,l)=>{var{chartData:c,dataStartIndex:f,dataEndIndex:h}=l;if(!(a==null||t==null||n==null||r==null||i==null||r.length===0||i.length===0||o==null||e!=="horizontal"&&e!=="vertical")){var{dataKey:d,data:g}=a,v;if(g!=null&&g.length>0?v=g:v=c==null?void 0:c.slice(f,h+1),v!=null)return l_e({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataKey:d,bandSize:o,displayedData:v})}});function Uje(e){var t=hc(e),n=3,r=2;if(t!=null){var{r:i,strokeWidth:a}=t,o=Number(i),l=Number(a);return(Number.isNaN(o)||o<0)&&(o=n),(Number.isNaN(l)||l<0)&&(l=r),{r:o,strokeWidth:l}}return{r:n,strokeWidth:r}}var Hje=["id"],qje=["type","layout","connectNulls","needClip","shape"],Vje=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function Jm(){return Jm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jm.apply(null,arguments)}function Z3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ao(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Z3(Object(n),!0).forEach(function(r){Kje(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Z3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Kje(e,t,n){return(t=Yje(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yje(e){var t=Xje(e,"string");return typeof t=="symbol"?t:t+""}function Xje(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function CO(e,t){if(e==null)return{};var n,r,i=Gje(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Gje(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Wje=e=>{var{dataKey:t,name:n,stroke:r,legendType:i,hide:a}=e;return[{inactive:a,dataKey:t,type:i,color:r,value:Fd(n,t),payload:e}]},Qje=y.memo(e=>{var{dataKey:t,data:n,stroke:r,strokeWidth:i,fill:a,name:o,hide:l,unit:c,tooltipType:f,id:h}=e,d={dataDefinedOnItem:n,getPosition:eu,settings:{stroke:r,strokeWidth:i,fill:a,dataKey:t,nameKey:void 0,name:Fd(o,t),hide:l,type:f,color:r,unit:c,graphicalItemId:h}};return y.createElement(xO,{tooltipEntrySettings:d})}),Q7=(e,t)=>"".concat(t,"px ").concat(e,"px");function Zje(e,t){for(var n=e.length%2!==0?[...e,0]:e,r=[],i=0;i<t;++i)r.push(...n);return r}var Jje=(e,t,n)=>{var r=n.reduce((g,v)=>g+v,0);if(!r)return Q7(t,e);for(var i=Math.floor(e/r),a=e%r,o=[],l=0,c=0;l<n.length;c+=(f=n[l])!==null&&f!==void 0?f:0,++l){var f,h=n[l];if(h!=null&&c+h>a){o=[...n.slice(0,l),a-c];break}}var d=o.length%2===0?[0,t]:[t];return[...Zje(n,i),...o,...d].map(g=>"".concat(g,"px")).join(", ")};function e_e(e){var{clipPathId:t,points:n,props:r}=e,{dot:i,dataKey:a,needClip:o}=r,{id:l}=r,c=CO(r,Hje),f=$i(c);return y.createElement(nEe,{points:n,dot:i,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:a,baseProps:f,needClip:o,clipPathId:t})}function t_e(e){var{showLabels:t,children:n,points:r}=e,i=y.useMemo(()=>r==null?void 0:r.map(a=>{var o,l,c={x:(o=a.x)!==null&&o!==void 0?o:0,y:(l=a.y)!==null&&l!==void 0?l:0,width:0,lowerWidth:0,upperWidth:0,height:0};return ao(ao({},c),{},{value:a.value,payload:a.payload,viewBox:c,parentViewBox:void 0,fill:void 0})}),[r]);return y.createElement(S7,{value:t?i:void 0},n)}function J3(e){var{clipPathId:t,pathRef:n,points:r,strokeDasharray:i,props:a}=e,{type:o,layout:l,connectNulls:c,needClip:f,shape:h}=a,d=CO(a,qje),g=ao(ao({},ti(d)),{},{fill:"none",className:"recharts-line-curve",clipPath:f?"url(#clipPath-".concat(t,")"):void 0,points:r,type:o,layout:l,connectNulls:c,strokeDasharray:i??a.strokeDasharray});return y.createElement(y.Fragment,null,(r==null?void 0:r.length)>1&&y.createElement(pO,Jm({shapeType:"curve",option:h},g,{pathRef:n})),y.createElement(e_e,{points:r,clipPathId:t,props:a}))}function n_e(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function r_e(e){var{clipPathId:t,props:n,pathRef:r,previousPointsRef:i,longestAnimatedLengthRef:a}=e,{points:o,strokeDasharray:l,isAnimationActive:c,animationBegin:f,animationDuration:h,animationEasing:d,animateNewValues:g,width:v,height:b,onAnimationEnd:w,onAnimationStart:S}=n,E=i.current,C=qp(o,"recharts-line-"),_=y.useRef(C),[N,O]=y.useState(!1),A=!N,T=y.useCallback(()=>{typeof w=="function"&&w(),O(!1)},[w]),P=y.useCallback(()=>{typeof S=="function"&&S(),O(!0)},[S]),I=n_e(r.current),z=y.useRef(0);_.current!==C&&(z.current=a.current,_.current=C);var F=z.current;return y.createElement(t_e,{points:o,showLabels:A},n.children,y.createElement(Hp,{animationId:C,begin:f,duration:h,isActive:c,easing:d,onAnimationEnd:T,onAnimationStart:P,key:C},B=>{var G=wn(F,I+F,B),L=Math.min(G,I),V;if(c)if(l){var D="".concat(l).split(/[,\s]+/gim).map(K=>parseFloat(K));V=Jje(L,I,D)}else V=Q7(I,L);else V=l==null?void 0:String(l);if(B>0&&I>0&&(i.current=o,a.current=Math.max(a.current,L)),E){var q=E.length/o.length,X=B===1?o:o.map((K,R)=>{var H=Math.floor(R*q);if(E[H]){var U=E[H];return ao(ao({},K),{},{x:wn(U.x,K.x,B),y:wn(U.y,K.y,B)})}return g?ao(ao({},K),{},{x:wn(v*2,K.x,B),y:wn(b/2,K.y,B)}):ao(ao({},K),{},{x:K.x,y:K.y})});return i.current=X,y.createElement(J3,{props:n,points:X,clipPathId:t,pathRef:r,strokeDasharray:V})}return y.createElement(J3,{props:n,points:o,clipPathId:t,pathRef:r,strokeDasharray:V})}),y.createElement(fO,{label:n.label}))}function i_e(e){var{clipPathId:t,props:n}=e,r=y.useRef(null),i=y.useRef(0),a=y.useRef(null);return y.createElement(r_e,{props:n,clipPathId:t,previousPointsRef:r,longestAnimatedLengthRef:i,pathRef:a})}var a_e=(e,t)=>{var n,r;return{x:(n=e.x)!==null&&n!==void 0?n:void 0,y:(r=e.y)!==null&&r!==void 0?r:void 0,value:e.value,errorVal:en(e.payload,t)}};class o_e extends y.Component{render(){var{hide:t,dot:n,points:r,className:i,xAxisId:a,yAxisId:o,top:l,left:c,width:f,height:h,id:d,needClip:g,zIndex:v}=this.props;if(t)return null;var b=Pt("recharts-line",i),w=d,{r:S,strokeWidth:E}=Uje(n),C=T7(n),_=S*2+E,N=g?"url(#clipPath-".concat(C?"":"dots-").concat(w,")"):void 0;return y.createElement(bi,{zIndex:v},y.createElement(lr,{className:b},g&&y.createElement("defs",null,y.createElement(K7,{clipPathId:w,xAxisId:a,yAxisId:o}),!C&&y.createElement("clipPath",{id:"clipPath-dots-".concat(w)},y.createElement("rect",{x:c-_/2,y:l-_/2,width:f+_,height:h+_}))),y.createElement(V7,{xAxisId:a,yAxisId:o,data:r,dataPointFormatter:a_e,errorBarOffset:0},y.createElement(i_e,{props:this.props,clipPathId:w}))),y.createElement(SEe,{activeDot:this.props.activeDot,points:r,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:N}))}}var Z7={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:"auto",label:!1,legendType:"line",stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0,zIndex:Xn.line,type:"linear"};function s_e(e){var t=Qn(e,Z7),{activeDot:n,animateNewValues:r,animationBegin:i,animationDuration:a,animationEasing:o,connectNulls:l,dot:c,hide:f,isAnimationActive:h,label:d,legendType:g,xAxisId:v,yAxisId:b,id:w}=t,S=CO(t,Vje),{needClip:E}=_O(v,b),C=wO(),_=Pc(),N=Vr(),O=Ie(z=>Fje(z,v,b,N,w));if(_!=="horizontal"&&_!=="vertical"||O==null||C==null)return null;var{height:A,width:T,x:P,y:I}=C;return y.createElement(o_e,Jm({},S,{id:w,connectNulls:l,dot:c,activeDot:n,animateNewValues:r,animationBegin:i,animationDuration:a,animationEasing:o,isAnimationActive:h,hide:f,label:d,legendType:g,xAxisId:v,yAxisId:b,points:O,layout:_,height:A,width:T,left:P,top:I,needClip:E}))}function l_e(e){var{layout:t,xAxis:n,yAxis:r,xAxisTicks:i,yAxisTicks:a,dataKey:o,bandSize:l,displayedData:c}=e;return c.map((f,h)=>{var d=en(f,o);if(t==="horizontal"){var g=RI({axis:n,ticks:i,bandSize:l,entry:f,index:h}),v=jn(d)?null:r.scale.map(d);return{x:g,y:v??null,value:d,payload:f}}var b=jn(d)?null:n.scale.map(d),w=RI({axis:r,ticks:a,bandSize:l,entry:f,index:h});return b==null||w==null?null:{x:b,y:w,value:d,payload:f}}).filter(Boolean)}function u_e(e){var t=Qn(e,Z7),n=Vr();return y.createElement(bO,{id:t.id,type:"line"},r=>y.createElement(y.Fragment,null,y.createElement(P7,{legendPayload:Wje(t)}),y.createElement(Qje,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:r}),y.createElement(D7,{type:"line",id:r,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:n}),y.createElement(s_e,Jm({},t,{id:r}))))}var J7=y.memo(u_e,Ud);J7.displayName="Line";function Rc(e,t){var n,r;return(n=(r=e.graphicalItems.cartesianItems.find(i=>i.id===t))===null||r===void 0?void 0:r.xAxisId)!==null&&n!==void 0?n:I7}function Ic(e,t){var n,r;return(n=(r=e.graphicalItems.cartesianItems.find(i=>i.id===t))===null||r===void 0?void 0:r.yAxisId)!==null&&n!==void 0?n:I7}var c_e="Invariant failed";function f_e(e,t){throw new Error(c_e)}function _C(){return _C=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_C.apply(null,arguments)}function kO(e){return y.createElement(pO,_C({shapeType:"rectangle",activeClassName:"recharts-active-bar",inActiveClassName:"recharts-inactive-bar"},e))}var d_e=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return(r,i)=>{if(Me(t))return t;var a=Me(r)||jn(r);return a?t(r,i):(a||f_e(),n)}},h_e=(e,t,n)=>n,m_e=(e,t)=>t,ig=le([Eb,m_e],(e,t)=>e.filter(n=>n.type==="bar").find(n=>n.id===t)),p_e=le([ig],e=>e==null?void 0:e.maxBarSize),g_e=(e,t,n,r)=>r,v_e=le([Bt,Eb,Rc,Ic,h_e],(e,t,n,r,i)=>t.filter(a=>e==="horizontal"?a.xAxisId===n:a.yAxisId===r).filter(a=>a.isPanorama===i).filter(a=>a.hide===!1).filter(a=>a.type==="bar")),y_e=(e,t,n)=>{var r=Bt(e),i=Rc(e,t),a=Ic(e,t);if(!(i==null||a==null))return r==="horizontal"?xC(e,"yAxis",a,n):xC(e,"xAxis",i,n)},x_e=(e,t)=>{var n=Bt(e),r=Rc(e,t),i=Ic(e,t);if(!(r==null||i==null))return n==="horizontal"?Hz(e,"xAxis",r):Hz(e,"yAxis",i)},b_e=le([v_e,lge,x_e],EEe),w_e=(e,t,n)=>{var r,i,a=ig(e,t);if(a==null)return 0;var o=Rc(e,t),l=Ic(e,t);if(o==null||l==null)return 0;var c=Bt(e),f=pq(e),{maxBarSize:h}=a,d=jn(h)?f:h,g,v;return c==="horizontal"?(g=Kl(e,"xAxis",o,n),v=Vl(e,"xAxis",o,n)):(g=Kl(e,"yAxis",l,n),v=Vl(e,"yAxis",l,n)),(r=(i=gd(g,v,!0))!==null&&i!==void 0?i:d)!==null&&r!==void 0?r:0},eV=(e,t,n)=>{var r=Bt(e),i=Rc(e,t),a=Ic(e,t);if(!(i==null||a==null)){var o,l;return r==="horizontal"?(o=Kl(e,"xAxis",i,n),l=Vl(e,"xAxis",i,n)):(o=Kl(e,"yAxis",a,n),l=Vl(e,"yAxis",a,n)),gd(o,l)}},S_e=le([b_e,pq,sge,gq,w_e,eV,p_e],NEe),E_e=(e,t,n)=>{var r=Rc(e,t);if(r!=null)return Kl(e,"xAxis",r,n)},j_e=(e,t,n)=>{var r=Ic(e,t);if(r!=null)return Kl(e,"yAxis",r,n)},__e=(e,t,n)=>{var r=Rc(e,t);if(r!=null)return Vl(e,"xAxis",r,n)},C_e=(e,t,n)=>{var r=Ic(e,t);if(r!=null)return Vl(e,"yAxis",r,n)},k_e=le([S_e,ig],OEe),N_e=le([y_e,ig],AEe),A_e=le([ur,FN,E_e,j_e,__e,C_e,k_e,Bt,tge,eV,N_e,ig,g_e],(e,t,n,r,i,a,o,l,c,f,h,d,g)=>{var{chartData:v,dataStartIndex:b,dataEndIndex:w}=c;if(!(d==null||o==null||t==null||l!=="horizontal"&&l!=="vertical"||n==null||r==null||i==null||a==null||f==null)){var{data:S}=d,E;if(S!=null&&S.length>0?E=S:E=v==null?void 0:v.slice(b,w+1),E!=null)return rCe({layout:l,barSettings:d,pos:o,parentViewBox:t,bandSize:f,xAxis:n,yAxis:r,xAxisTicks:i,yAxisTicks:a,stackedData:h,displayedData:E,offset:e,cells:g,dataStartIndex:b})}}),O_e=["index"];function CC(){return CC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},CC.apply(null,arguments)}function T_e(e,t){if(e==null)return{};var n,r,i=P_e(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function P_e(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var tV=y.createContext(void 0),M_e=e=>{var t=y.useContext(tV);if(t!=null)return t.stackId;if(e!=null)return ehe(e)},D_e=(e,t)=>"recharts-bar-stack-clip-path-".concat(e,"-").concat(t),R_e=e=>{var t=y.useContext(tV);if(t!=null){var{stackId:n}=t;return"url(#".concat(D_e(n,e),")")}},nV=e=>{var{index:t}=e,n=T_e(e,O_e),r=R_e(t);return y.createElement(lr,CC({className:"recharts-bar-stack-layer",clipPath:r},n))},I_e=["onMouseEnter","onMouseLeave","onClick"],L_e=["value","background","tooltipPosition"],z_e=["id"],$_e=["onMouseEnter","onClick","onMouseLeave"];function Gl(){return Gl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Gl.apply(null,arguments)}function e4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Zr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?e4(Object(n),!0).forEach(function(r){B_e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):e4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function B_e(e,t,n){return(t=F_e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function F_e(e){var t=U_e(e,"string");return typeof t=="symbol"?t:t+""}function U_e(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Vx(e,t){if(e==null)return{};var n,r,i=H_e(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function H_e(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var q_e=e=>{var{dataKey:t,name:n,fill:r,legendType:i,hide:a}=e;return[{inactive:a,dataKey:t,type:i,color:r,value:Fd(n,t),payload:e}]},V_e=y.memo(e=>{var{dataKey:t,stroke:n,strokeWidth:r,fill:i,name:a,hide:o,unit:l,tooltipType:c,id:f}=e,h={dataDefinedOnItem:void 0,getPosition:eu,settings:{stroke:n,strokeWidth:r,fill:i,dataKey:t,nameKey:void 0,name:Fd(a,t),hide:o,type:c,color:i,unit:l,graphicalItemId:f}};return y.createElement(xO,{tooltipEntrySettings:h})});function K_e(e){var t=Ie(Yl),{data:n,dataKey:r,background:i,allOtherBarProps:a}=e,{onMouseEnter:o,onMouseLeave:l,onClick:c}=a,f=Vx(a,I_e),h=gO(o,r,a.id),d=vO(l),g=yO(c,r,a.id);if(!i||n==null)return null;var v=hc(i);return y.createElement(bi,{zIndex:TEe(i,Xn.barBackground)},n.map((b,w)=>{var{value:S,background:E,tooltipPosition:C}=b,_=Vx(b,L_e);if(!E)return null;var N=h(b,w),O=d(b,w),A=g(b,w),T=Zr(Zr(Zr(Zr(Zr({option:i,isActive:String(w)===t},_),{},{fill:"#eee"},E),v),Ip(f,b,w)),{},{onMouseEnter:N,onMouseLeave:O,onClick:A,dataKey:r,index:w,className:"recharts-bar-background-rectangle"});return y.createElement(kO,Gl({key:"background-bar-".concat(w)},T))}))}function Y_e(e){var{showLabels:t,children:n,rects:r}=e,i=r==null?void 0:r.map(a=>{var o={x:a.x,y:a.y,width:a.width,lowerWidth:a.width,upperWidth:a.width,height:a.height};return Zr(Zr({},o),{},{value:a.value,payload:a.payload,parentViewBox:a.parentViewBox,viewBox:o,fill:a.fill})});return y.createElement(S7,{value:t?i:void 0},n)}function X_e(e){var{shape:t,activeBar:n,baseProps:r,entry:i,index:a,dataKey:o}=e,l=Ie(Yl),c=Ie(iO),f=n&&String(i.originalDataIndex)===l&&(c==null||o===c),[h,d]=y.useState(!1),[g,v]=y.useState(!1);y.useEffect(()=>{var _;return f?(d(!0),_=requestAnimationFrame(()=>{v(!0)})):v(!1),()=>{cancelAnimationFrame(_)}},[f]);var b=y.useCallback(()=>{f||d(!1)},[f]),w=f&&g,S=f||h,E;f?n===!0?E=t:E=n:E=t;var C=y.createElement(kO,Gl({},r,{name:String(r.name)},i,{isActive:w,option:E,index:a,dataKey:o,onTransitionEnd:b}));return S?y.createElement(bi,{zIndex:Xn.activeBar},y.createElement(nV,{index:i.originalDataIndex},C)):C}function G_e(e){var{shape:t,baseProps:n,entry:r,index:i,dataKey:a}=e;return y.createElement(kO,Gl({},n,{name:String(n.name)},r,{isActive:!1,option:t,index:i,dataKey:a}))}function W_e(e){var t,{data:n,props:r}=e,i=(t=$i(r))!==null&&t!==void 0?t:{},{id:a}=i,o=Vx(i,z_e),{shape:l,dataKey:c,activeBar:f}=r,{onMouseEnter:h,onClick:d,onMouseLeave:g}=r,v=Vx(r,$_e),b=gO(h,c,a),w=vO(g),S=yO(d,c,a);return n?y.createElement(y.Fragment,null,n.map((E,C)=>y.createElement(nV,Gl({index:E.originalDataIndex,key:"rectangle-".concat(E==null?void 0:E.x,"-").concat(E==null?void 0:E.y,"-").concat(E==null?void 0:E.value,"-").concat(C),className:"recharts-bar-rectangle"},Ip(v,E,C),{onMouseEnter:b(E,C),onMouseLeave:w(E,C),onClick:S(E,C)}),f?y.createElement(X_e,{shape:l,activeBar:f,baseProps:o,entry:E,index:C,dataKey:c}):y.createElement(G_e,{shape:l,baseProps:o,entry:E,index:C,dataKey:c})))):null}function Q_e(e){var{props:t,previousRectanglesRef:n}=e,{data:r,layout:i,isAnimationActive:a,animationBegin:o,animationDuration:l,animationEasing:c,onAnimationEnd:f,onAnimationStart:h}=t,d=n.current,g=qp(t,"recharts-bar-"),[v,b]=y.useState(!1),w=!v,S=y.useCallback(()=>{typeof f=="function"&&f(),b(!1)},[f]),E=y.useCallback(()=>{typeof h=="function"&&h(),b(!0)},[h]);return y.createElement(Y_e,{showLabels:w,rects:r},y.createElement(Hp,{animationId:g,begin:o,duration:l,isActive:a,easing:c,onAnimationEnd:S,onAnimationStart:E,key:g},C=>{var _=C===1?r:r==null?void 0:r.map((N,O)=>{var A=d&&d[O];if(A)return Zr(Zr({},N),{},{x:wn(A.x,N.x,C),y:wn(A.y,N.y,C),width:wn(A.width,N.width,C),height:wn(A.height,N.height,C)});if(i==="horizontal"){var T=wn(0,N.height,C),P=wn(N.stackedBarStart,N.y,C);return Zr(Zr({},N),{},{y:P,height:T})}var I=wn(0,N.width,C),z=wn(N.stackedBarStart,N.x,C);return Zr(Zr({},N),{},{width:I,x:z})});return C>0&&(n.current=_??null),_==null?null:y.createElement(lr,null,y.createElement(W_e,{props:t,data:_}))}),y.createElement(fO,{label:t.label}),t.children)}function Z_e(e){var t=y.useRef(null);return y.createElement(Q_e,{previousRectanglesRef:t,props:e})}var rV=0,J_e=(e,t)=>{var n=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:n,errorVal:en(e,t)}};class eCe extends y.PureComponent{render(){var{hide:t,data:n,dataKey:r,className:i,xAxisId:a,yAxisId:o,needClip:l,background:c,id:f}=this.props;if(t||n==null)return null;var h=Pt("recharts-bar",i),d=f;return y.createElement(lr,{className:h,id:f},l&&y.createElement("defs",null,y.createElement(K7,{clipPathId:d,xAxisId:a,yAxisId:o})),y.createElement(lr,{className:"recharts-bar-rectangles",clipPath:l?"url(#clipPath-".concat(d,")"):void 0},y.createElement(K_e,{data:n,dataKey:r,background:c,allOtherBarProps:this.props}),y.createElement(Z_e,this.props)))}}var tCe={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",background:!1,hide:!1,isAnimationActive:"auto",label:!1,legendType:"rect",minPointSize:rV,xAxisId:0,yAxisId:0,zIndex:Xn.bar};function nCe(e){var{xAxisId:t,yAxisId:n,hide:r,legendType:i,minPointSize:a,activeBar:o,animationBegin:l,animationDuration:c,animationEasing:f,isAnimationActive:h}=e,{needClip:d}=_O(t,n),g=Pc(),v=Vr(),b=mO(e.children,rg),w=Ie(C=>A_e(C,e.id,v,b));if(g!=="vertical"&&g!=="horizontal")return null;var S,E=w==null?void 0:w[0];return E==null||E.height==null||E.width==null?S=0:S=g==="vertical"?E.height/2:E.width/2,y.createElement(V7,{xAxisId:t,yAxisId:n,data:w,dataPointFormatter:J_e,errorBarOffset:S},y.createElement(eCe,Gl({},e,{layout:g,needClip:d,data:w,xAxisId:t,yAxisId:n,hide:r,legendType:i,minPointSize:a,activeBar:o,animationBegin:l,animationDuration:c,animationEasing:f,isAnimationActive:h})))}function rCe(e){var{layout:t,barSettings:{dataKey:n,minPointSize:r,hasCustomShape:i},pos:a,bandSize:o,xAxis:l,yAxis:c,xAxisTicks:f,yAxisTicks:h,stackedData:d,displayedData:g,offset:v,cells:b,parentViewBox:w,dataStartIndex:S}=e,E=t==="horizontal"?c:l,C=d?E.scale.domain():null,_=the({numericAxis:E}),N=E.scale.map(_);return g.map((O,A)=>{var T,P,I,z,F,B;if(d){var G=d[A+S];if(G==null)return null;T=Gde(G,C)}else T=en(O,n),Array.isArray(T)||(T=[_,T]);var L=d_e(r,rV)(T[1],A);if(t==="horizontal"){var V,D=c.scale.map(T[0]),q=c.scale.map(T[1]);if(D==null||q==null)return null;P=II({axis:l,ticks:f,bandSize:o,offset:a.offset,entry:O,index:A}),I=(V=q??D)!==null&&V!==void 0?V:void 0,z=a.size;var X=D-q;if(F=go(X)?0:X,B={x:P,y:v.top,width:z,height:v.height},Math.abs(L)>0&&Math.abs(F)<Math.abs(L)){var K=vr(F||L)*(Math.abs(L)-Math.abs(F));I-=K,F+=K}}else{var R=l.scale.map(T[0]),H=l.scale.map(T[1]);if(R==null||H==null)return null;if(P=R,I=II({axis:c,ticks:h,bandSize:o,offset:a.offset,entry:O,index:A}),z=H-R,F=a.size,B={x:v.left,y:I,width:v.width,height:F},Math.abs(L)>0&&Math.abs(z)<Math.abs(L)){var U=vr(z||L)*(Math.abs(L)-Math.abs(z));z+=U}}if(P==null||I==null||z==null||F==null||!i&&(z===0||F===0))return null;var $=Zr(Zr({},O),{},{stackedBarStart:N,x:P,y:I,width:z,height:F,value:d?T:T[1],payload:O,background:B,tooltipPosition:{x:P+z/2,y:I+F/2},parentViewBox:w,originalDataIndex:A},b&&b[A]&&b[A].props);return $}).filter(Boolean)}function iCe(e){var t=Qn(e,tCe),n=M_e(t.stackId),r=Vr();return y.createElement(bO,{id:t.id,type:"bar"},i=>y.createElement(y.Fragment,null,y.createElement(P7,{legendPayload:q_e(t)}),y.createElement(V_e,{dataKey:t.dataKey,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:i}),y.createElement(D7,{type:"bar",id:i,data:void 0,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,stackId:n,hide:t.hide,barSize:t.barSize,minPointSize:t.minPointSize,maxBarSize:t.maxBarSize,isPanorama:r,hasCustomShape:t.shape!=null}),y.createElement(bi,{zIndex:t.zIndex},y.createElement(nCe,Gl({},t,{id:i})))))}var kC=y.memo(iCe,Ud);kC.displayName="Bar";var aCe=["domain","range"],oCe=["domain","range"];function t4(e,t){if(e==null)return{};var n,r,i=sCe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function sCe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function n4(e,t){return e===t?!0:Array.isArray(e)&&e.length===2&&Array.isArray(t)&&t.length===2?e[0]===t[0]&&e[1]===t[1]:!1}function iV(e,t){if(e===t)return!0;var{domain:n,range:r}=e,i=t4(e,aCe),{domain:a,range:o}=t,l=t4(t,oCe);return!n4(n,a)||!n4(r,o)?!1:Ud(i,l)}var lCe=["type"],uCe=["dangerouslySetInnerHTML","ticks","scale"],cCe=["id","scale"];function NC(){return NC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},NC.apply(null,arguments)}function r4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function i4(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?r4(Object(n),!0).forEach(function(r){fCe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function fCe(e,t,n){return(t=dCe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dCe(e){var t=hCe(e,"string");return typeof t=="symbol"?t:t+""}function hCe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function AC(e,t){if(e==null)return{};var n,r,i=mCe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function mCe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function pCe(e){var t=tn(),n=y.useRef(null),r=MH(),{type:i}=e,a=AC(e,lCe),o=db(r,"xAxis",i),l=y.useMemo(()=>{if(o!=null)return i4(i4({},a),{},{type:o})},[a,o]);return y.useLayoutEffect(()=>{l!=null&&(n.current===null?t(sEe(l)):n.current!==l&&t(lEe({prev:n.current,next:l})),n.current=l)},[l,t]),y.useLayoutEffect(()=>()=>{n.current&&(t(uEe(n.current)),n.current=null)},[t]),null}var gCe=e=>{var{xAxisId:t,className:n}=e,r=Ie(FN),i=Vr(),a="xAxis",o=Ie(E=>P9(E,a,t,i)),l=Ie(E=>A9(E,t)),c=Ie(E=>Yxe(E,t)),f=Ie(E=>c9(E,t));if(l==null||c==null||f==null)return null;var{dangerouslySetInnerHTML:h,ticks:d,scale:g}=e,v=AC(e,uCe),{id:b,scale:w}=f,S=AC(f,cCe);return y.createElement(EO,NC({},v,S,{x:c.x,y:c.y,width:l.width,height:l.height,className:Pt("recharts-".concat(a," ").concat(a),n),viewBox:r,ticks:o,axisType:a,axisId:t}))},vCe={allowDataOverflow:nr.allowDataOverflow,allowDecimals:nr.allowDecimals,allowDuplicatedCategory:nr.allowDuplicatedCategory,angle:nr.angle,axisLine:as.axisLine,height:nr.height,hide:!1,includeHidden:nr.includeHidden,interval:nr.interval,label:!1,minTickGap:nr.minTickGap,mirror:nr.mirror,orientation:nr.orientation,padding:nr.padding,reversed:nr.reversed,scale:nr.scale,tick:nr.tick,tickCount:nr.tickCount,tickLine:as.tickLine,tickSize:as.tickSize,type:nr.type,niceTicks:nr.niceTicks,xAxisId:0},yCe=e=>{var t=Qn(e,vCe);return y.createElement(y.Fragment,null,y.createElement(pCe,{allowDataOverflow:t.allowDataOverflow,allowDecimals:t.allowDecimals,allowDuplicatedCategory:t.allowDuplicatedCategory,angle:t.angle,dataKey:t.dataKey,domain:t.domain,height:t.height,hide:t.hide,id:t.xAxisId,includeHidden:t.includeHidden,interval:t.interval,minTickGap:t.minTickGap,mirror:t.mirror,name:t.name,orientation:t.orientation,padding:t.padding,reversed:t.reversed,scale:t.scale,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,niceTicks:t.niceTicks}),y.createElement(gCe,t))},NO=y.memo(yCe,iV);NO.displayName="XAxis";var xCe=["type"],bCe=["dangerouslySetInnerHTML","ticks","scale"],wCe=["id","scale"];function OC(){return OC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},OC.apply(null,arguments)}function a4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function o4(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?a4(Object(n),!0).forEach(function(r){SCe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function SCe(e,t,n){return(t=ECe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ECe(e){var t=jCe(e,"string");return typeof t=="symbol"?t:t+""}function jCe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function TC(e,t){if(e==null)return{};var n,r,i=_Ce(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function _Ce(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function CCe(e){var t=tn(),n=y.useRef(null),r=MH(),{type:i}=e,a=TC(e,xCe),o=db(r,"yAxis",i),l=y.useMemo(()=>{if(o!=null)return o4(o4({},a),{},{type:o})},[o,a]);return y.useLayoutEffect(()=>{l!=null&&(n.current===null?t(cEe(l)):n.current!==l&&t(fEe({prev:n.current,next:l})),n.current=l)},[l,t]),y.useLayoutEffect(()=>()=>{n.current&&(t(dEe(n.current)),n.current=null)},[t]),null}function kCe(e){var{yAxisId:t,className:n,width:r,label:i}=e,a=y.useRef(null),o=y.useRef(null),l=Ie(FN),c=Vr(),f=tn(),h="yAxis",d=Ie(A=>O9(A,t)),g=Ie(A=>Gxe(A,t)),v=Ie(A=>P9(A,h,t,c)),b=Ie(A=>f9(A,t));if(y.useLayoutEffect(()=>{if(!(r!=="auto"||!d||cO(i)||y.isValidElement(i)||b==null)){var A=a.current;if(A){var T=A.getCalculatedWidth();Math.round(d.width)!==Math.round(T)&&f(hEe({id:t,width:T}))}}},[v,d,f,i,t,r,b]),d==null||g==null||b==null)return null;var{dangerouslySetInnerHTML:w,ticks:S,scale:E}=e,C=TC(e,bCe),{id:_,scale:N}=b,O=TC(b,wCe);return y.createElement(EO,OC({},C,O,{ref:a,labelRef:o,x:g.x,y:g.y,tickTextProps:r==="auto"?{width:void 0}:{width:r},width:d.width,height:d.height,className:Pt("recharts-".concat(h," ").concat(h),n),viewBox:l,ticks:v,axisType:h,axisId:t}))}var NCe={allowDataOverflow:rr.allowDataOverflow,allowDecimals:rr.allowDecimals,allowDuplicatedCategory:rr.allowDuplicatedCategory,angle:rr.angle,axisLine:as.axisLine,hide:!1,includeHidden:rr.includeHidden,interval:rr.interval,label:!1,minTickGap:rr.minTickGap,mirror:rr.mirror,orientation:rr.orientation,padding:rr.padding,reversed:rr.reversed,scale:rr.scale,tick:rr.tick,tickCount:rr.tickCount,tickLine:as.tickLine,tickSize:as.tickSize,type:rr.type,niceTicks:rr.niceTicks,width:rr.width,yAxisId:0},ACe=e=>{var t=Qn(e,NCe);return y.createElement(y.Fragment,null,y.createElement(CCe,{interval:t.interval,id:t.yAxisId,scale:t.scale,type:t.type,domain:t.domain,allowDataOverflow:t.allowDataOverflow,dataKey:t.dataKey,allowDuplicatedCategory:t.allowDuplicatedCategory,allowDecimals:t.allowDecimals,tickCount:t.tickCount,padding:t.padding,includeHidden:t.includeHidden,reversed:t.reversed,ticks:t.ticks,width:t.width,orientation:t.orientation,mirror:t.mirror,hide:t.hide,unit:t.unit,name:t.name,angle:t.angle,minTickGap:t.minTickGap,tick:t.tick,tickFormatter:t.tickFormatter,niceTicks:t.niceTicks}),y.createElement(kCe,t))},AO=y.memo(ACe,iV);AO.displayName="YAxis";var OCe=(e,t)=>t,OO=le([OCe,Bt,Eq,br,G9,Ps,vbe,ur],jbe);function TCe(e){return"getBBox"in e.currentTarget&&typeof e.currentTarget.getBBox=="function"}function TO(e){var t=e.currentTarget.getBoundingClientRect(),n,r;if(TCe(e)){var i=e.currentTarget.getBBox();n=i.width>0?t.width/i.width:1,r=i.height>0?t.height/i.height:1}else{var a=e.currentTarget;n=a.offsetWidth>0?t.width/a.offsetWidth:1,r=a.offsetHeight>0?t.height/a.offsetHeight:1}var o=(l,c)=>({relativeX:Math.round((l-t.left)/n),relativeY:Math.round((c-t.top)/r)});return"touches"in e?Array.from(e.touches).map(l=>o(l.clientX,l.clientY)):o(e.clientX,e.clientY)}var aV=Bi("mouseClick"),oV=zp();oV.startListening({actionCreator:aV,effect:(e,t)=>{var n=e.payload,r=OO(t.getState(),TO(n));(r==null?void 0:r.activeIndex)!=null&&t.dispatch(f0e({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate}))}});var PC=Bi("mouseMove"),sV=zp(),kf=null,ku=null,hj=null;sV.startListening({actionCreator:PC,effect:(e,t)=>{var n=e.payload,r=t.getState(),{throttleDelay:i,throttledEvents:a}=r.eventSettings,o=a==="all"||(a==null?void 0:a.includes("mousemove"));kf!==null&&(cancelAnimationFrame(kf),kf=null),ku!==null&&(typeof i!="number"||!o)&&(clearTimeout(ku),ku=null),hj=TO(n);var l=()=>{var c=t.getState(),f=ZA(c,c.tooltip.settings.shared);if(!hj){kf=null,ku=null;return}if(f==="axis"){var h=OO(c,hj);(h==null?void 0:h.activeIndex)!=null?t.dispatch(B9({activeIndex:h.activeIndex,activeDataKey:void 0,activeCoordinate:h.activeCoordinate})):t.dispatch($9())}kf=null,ku=null};if(!o){l();return}i==="raf"?kf=requestAnimationFrame(l):typeof i=="number"&&ku===null&&(ku=setTimeout(l,i))}});function PCe(e,t){return t instanceof HTMLElement?"HTMLElement <".concat(t.tagName,' class="').concat(t.className,'">'):t===window?"global.window":e==="children"&&typeof t=="object"&&t!==null?"<<CHILDREN>>":t}var s4={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index",baseValue:void 0,reverseStackOrder:!1},lV=qr({name:"rootProps",initialState:s4,reducers:{updateOptions:(e,t)=>{var n;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(n=t.payload.barGap)!==null&&n!==void 0?n:s4.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,e.baseValue=t.payload.baseValue,e.reverseStackOrder=t.payload.reverseStackOrder}}}),MCe=lV.reducer,{updateOptions:DCe}=lV.actions,RCe=null,ICe={updatePolarOptions:(e,t)=>e===null?t.payload:(e.startAngle=t.payload.startAngle,e.endAngle=t.payload.endAngle,e.cx=t.payload.cx,e.cy=t.payload.cy,e.innerRadius=t.payload.innerRadius,e.outerRadius=t.payload.outerRadius,e)},uV=qr({name:"polarOptions",initialState:RCe,reducers:ICe}),{updatePolarOptions:LCe}=uV.actions,zCe=uV.reducer,cV=Bi("keyDown"),fV=Bi("focus"),dV=Bi("blur"),Pb=zp(),Nf=null,Nu=null,iy=null;Pb.startListening({actionCreator:cV,effect:(e,t)=>{iy=e.payload,Nf!==null&&(cancelAnimationFrame(Nf),Nf=null);var n=t.getState(),{throttleDelay:r,throttledEvents:i}=n.eventSettings,a=i==="all"||i.includes("keydown");Nu!==null&&(typeof r!="number"||!a)&&(clearTimeout(Nu),Nu=null);var o=()=>{try{var l=t.getState(),c=l.rootProps.accessibilityLayer!==!1;if(!c)return;var{keyboardInteraction:f}=l.tooltip,h=iy;if(h!=="ArrowRight"&&h!=="ArrowLeft"&&h!=="Enter")return;var d=JA(f,Wd(l),Jp(l),tg(l)),g=d==null?-1:Number(d);if(!Number.isFinite(g)||g<0)return;var v=Ps(l);if(h==="Enter"){var b=$x(l,"axis","hover",String(f.index));t.dispatch(zx({active:!f.active,activeIndex:f.index,activeCoordinate:b}));return}var w=e0e(l),S=w==="left-to-right"?1:-1,E=h==="ArrowRight"?1:-1,C=g+E*S;if(v==null||C>=v.length||C<0)return;var _=$x(l,"axis","hover",String(C));t.dispatch(zx({active:!0,activeIndex:C.toString(),activeCoordinate:_}))}finally{Nf=null,Nu=null}};if(!a){o();return}r==="raf"?Nf=requestAnimationFrame(o):typeof r=="number"&&Nu===null&&(o(),iy=null,Nu=setTimeout(()=>{iy?o():(Nu=null,Nf=null)},r))}});Pb.startListening({actionCreator:fV,effect:(e,t)=>{var n=t.getState(),r=n.rootProps.accessibilityLayer!==!1;if(r){var{keyboardInteraction:i}=n.tooltip;if(!i.active&&i.index==null){var a="0",o=$x(n,"axis","hover",String(a));t.dispatch(zx({active:!0,activeIndex:a,activeCoordinate:o}))}}}});Pb.startListening({actionCreator:dV,effect:(e,t)=>{var n=t.getState(),r=n.rootProps.accessibilityLayer!==!1;if(r){var{keyboardInteraction:i}=n.tooltip;i.active&&t.dispatch(zx({active:!1,activeIndex:i.index,activeCoordinate:i.coordinate}))}}});function hV(e){e.persist();var{currentTarget:t}=e;return new Proxy(e,{get:(n,r)=>{if(r==="currentTarget")return t;var i=Reflect.get(n,r);return typeof i=="function"?i.bind(n):i}})}var ta=Bi("externalEvent"),mV=zp(),ay=new Map,sm=new Map,mj=new Map;mV.startListening({actionCreator:ta,effect:(e,t)=>{var{handler:n,reactEvent:r}=e.payload;if(n!=null){var i=r.type,a=hV(r);mj.set(i,{handler:n,reactEvent:a});var o=ay.get(i);o!==void 0&&(cancelAnimationFrame(o),ay.delete(i));var l=t.getState(),{throttleDelay:c,throttledEvents:f}=l.eventSettings,h=f,d=h==="all"||(h==null?void 0:h.includes(i)),g=sm.get(i);g!==void 0&&(typeof c!="number"||!d)&&(clearTimeout(g),sm.delete(i));var v=()=>{var S=mj.get(i);try{if(!S)return;var{handler:E,reactEvent:C}=S,_=t.getState(),N={activeCoordinate:tbe(_),activeDataKey:iO(_),activeIndex:Yl(_),activeLabel:Z9(_),activeTooltipIndex:Yl(_),isTooltipActive:nbe(_)};E&&E(N,C)}finally{ay.delete(i),sm.delete(i),mj.delete(i)}};if(!d){v();return}if(c==="raf"){var b=requestAnimationFrame(v);ay.set(i,b)}else if(typeof c=="number"){if(!sm.has(i)){v();var w=setTimeout(v,c);sm.set(i,w)}}else v()}}});var $Ce=le([Xd],e=>e.tooltipItemPayloads),BCe=le([$Ce,(e,t)=>t,(e,t,n)=>n],(e,t,n)=>{if(t!=null){var r=e.find(a=>a.settings.graphicalItemId===n);if(r!=null){var{getPosition:i}=r;if(i!=null)return i(t)}}}),pV=Bi("touchMove"),gV=zp(),Au=null,hl=null,l4=null,lm=null;gV.startListening({actionCreator:pV,effect:(e,t)=>{var n=e.payload;if(!(n.touches==null||n.touches.length===0)){lm=hV(n);var r=t.getState(),{throttleDelay:i,throttledEvents:a}=r.eventSettings,o=a==="all"||a.includes("touchmove");Au!==null&&(cancelAnimationFrame(Au),Au=null),hl!==null&&(typeof i!="number"||!o)&&(clearTimeout(hl),hl=null),l4=Array.from(n.touches).map(c=>TO({clientX:c.clientX,clientY:c.clientY,currentTarget:n.currentTarget}));var l=()=>{if(lm!=null){var c=t.getState(),f=ZA(c,c.tooltip.settings.shared);if(f==="axis"){var h,d=(h=l4)===null||h===void 0?void 0:h[0];if(d==null){Au=null,hl=null;return}var g=OO(c,d);(g==null?void 0:g.activeIndex)!=null&&t.dispatch(B9({activeIndex:g.activeIndex,activeDataKey:void 0,activeCoordinate:g.activeCoordinate}))}else if(f==="item"){var v,b=lm.touches[0];if(document.elementFromPoint==null||b==null)return;var w=document.elementFromPoint(b.clientX,b.clientY);if(!w||!w.getAttribute)return;var S=w.getAttribute(kH),E=(v=w.getAttribute(NH))!==null&&v!==void 0?v:void 0,C=Gd(c).find(O=>O.id===E);if(S==null||C==null||E==null)return;var{dataKey:_}=C,N=BCe(c,S,E);t.dispatch(z9({activeDataKey:_,activeIndex:S,activeCoordinate:N,activeGraphicalItemId:E}))}Au=null,hl=null}};if(!o){l();return}i==="raf"?Au=requestAnimationFrame(l):typeof i=="number"&&hl===null&&(l(),lm=null,hl=setTimeout(()=>{lm?l():(hl=null,Au=null)},i))}}});var PO={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},vV=qr({name:"eventSettings",initialState:PO,reducers:{setEventSettings:(e,t)=>{t.payload.throttleDelay!=null&&(e.throttleDelay=t.payload.throttleDelay),t.payload.throttledEvents!=null&&(e.throttledEvents=t.payload.throttledEvents)}}}),{setEventSettings:FCe}=vV.actions,UCe=vV.reducer,HCe=GU({brush:PEe,cartesianAxis:mEe,chartData:twe,errorBars:Tje,eventSettings:UCe,graphicalItems:ySe,layout:qde,legend:Qhe,options:Wbe,polarAxis:T1e,polarOptions:zCe,referenceElements:IEe,renderedTicks:JEe,rootProps:MCe,tooltip:d0e,zIndex:zbe}),qCe=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return pde({reducer:HCe,preloadedState:t,middleware:r=>{var i;return r({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((i="es6")!==null&&i!==void 0?i:"")}).concat([oV.middleware,sV.middleware,Pb.middleware,mV.middleware,gV.middleware])},enhancers:r=>{var i=r;return typeof r=="function"&&(i=r()),i.concat(cH({type:"raf"}))},devTools:{serialize:{replacer:PCe},name:"recharts-".concat(n)}})};function yV(e){var{preloadedState:t,children:n,reduxStoreName:r}=e,i=Vr(),a=y.useRef(null);if(i)return n;a.current==null&&(a.current=qCe(t,r));var o=DN;return y.createElement(hme,{context:o,store:a.current},n)}function VCe(e){var{layout:t,margin:n}=e,r=tn(),i=Vr();return y.useEffect(()=>{i||(r(Fde(t)),r(Bde(n)))},[r,i,t,n]),null}var xV=y.memo(VCe,Ud);function bV(e){var t=tn();return y.useEffect(()=>{t(DCe(e))},[t,e]),null}var KCe=e=>{var t=tn();return y.useEffect(()=>{t(FCe(e))},[t,e]),null},wV=y.memo(KCe,Ud);function u4(e){var{zIndex:t,isPanorama:n}=e,r=y.useRef(null),i=tn();return y.useLayoutEffect(()=>(r.current&&i(Ibe({zIndex:t,element:r.current,isPanorama:n})),()=>{i(Lbe({zIndex:t,isPanorama:n}))}),[i,t,n]),y.createElement("g",{tabIndex:-1,ref:r,className:"recharts-zIndex-layer_".concat(t)})}function c4(e){var{children:t,isPanorama:n}=e,r=Ie(Cbe);if(!r||r.length===0)return t;var i=r.filter(o=>o<0),a=r.filter(o=>o>0);return y.createElement(y.Fragment,null,i.map(o=>y.createElement(u4,{key:o,zIndex:o,isPanorama:n})),t,a.map(o=>y.createElement(u4,{key:o,zIndex:o,isPanorama:n})))}var YCe=["children"];function XCe(e,t){if(e==null)return{};var n,r,i=GCe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function GCe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Kx(){return Kx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Kx.apply(null,arguments)}var WCe={width:"100%",height:"100%",display:"block"},QCe=y.forwardRef((e,t)=>{var n=VN(),r=KN(),i=YH();if(!yo(n)||!yo(r))return null;var{children:a,otherAttributes:o,title:l,desc:c}=e,f,h;return o!=null&&(typeof o.tabIndex=="number"?f=o.tabIndex:f=i?0:void 0,typeof o.role=="string"?h=o.role:h=i?"application":void 0),y.createElement(jN,Kx({},o,{title:l,desc:c,role:h,tabIndex:f,width:n,height:r,style:WCe,ref:t}),a)}),ZCe=e=>{var{children:t}=e,n=Ie(ab);if(!n)return null;var{width:r,height:i,y:a,x:o}=n;return y.createElement(jN,{width:r,height:i,x:o,y:a},t)},f4=y.forwardRef((e,t)=>{var{children:n}=e,r=XCe(e,YCe),i=Vr();return i?y.createElement(ZCe,null,y.createElement(c4,{isPanorama:!0},n)):y.createElement(QCe,Kx({ref:t},r),y.createElement(c4,{isPanorama:!1},n))});function JCe(){var e=tn(),[t,n]=y.useState(null),r=Ie(she);return y.useEffect(()=>{if(t!=null){var i=t.getBoundingClientRect(),a=i.width/t.offsetWidth;At(a)&&a!==r&&e(Hde(a))}},[t,e,r]),n}function d4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function eke(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?d4(Object(n),!0).forEach(function(r){tke(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function tke(e,t,n){return(t=nke(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nke(e){var t=rke(e,"string");return typeof t=="symbol"?t:t+""}function rke(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function zl(){return zl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zl.apply(null,arguments)}var ike=()=>(cwe(),null);function Yx(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var ake=y.forwardRef((e,t)=>{var n,r,i=y.useRef(null),[a,o]=y.useState({containerWidth:Yx((n=e.style)===null||n===void 0?void 0:n.width),containerHeight:Yx((r=e.style)===null||r===void 0?void 0:r.height)}),l=y.useCallback((f,h)=>{o(d=>{var g=Math.round(f),v=Math.round(h);return d.containerWidth===g&&d.containerHeight===v?d:{containerWidth:g,containerHeight:v}})},[]),c=y.useCallback(f=>{if(typeof t=="function"&&t(f),f!=null&&typeof ResizeObserver<"u"){var{width:h,height:d}=f.getBoundingClientRect();l(h,d);var g=b=>{var w=b[0];if(w!=null){var{width:S,height:E}=w.contentRect;l(S,E)}},v=new ResizeObserver(g);v.observe(f),i.current=v}},[t,l]);return y.useEffect(()=>()=>{var f=i.current;f!=null&&f.disconnect()},[l]),y.createElement(y.Fragment,null,y.createElement(Bp,{width:a.containerWidth,height:a.containerHeight}),y.createElement("div",zl({ref:c},e)))}),oke=y.forwardRef((e,t)=>{var{width:n,height:r}=e,[i,a]=y.useState({containerWidth:Yx(n),containerHeight:Yx(r)}),o=y.useCallback((c,f)=>{a(h=>{var d=Math.round(c),g=Math.round(f);return h.containerWidth===d&&h.containerHeight===g?h:{containerWidth:d,containerHeight:g}})},[]),l=y.useCallback(c=>{if(typeof t=="function"&&t(c),c!=null){var{width:f,height:h}=c.getBoundingClientRect();o(f,h)}},[t,o]);return y.createElement(y.Fragment,null,y.createElement(Bp,{width:i.containerWidth,height:i.containerHeight}),y.createElement("div",zl({ref:l},e)))}),ske=y.forwardRef((e,t)=>{var{width:n,height:r}=e;return y.createElement(y.Fragment,null,y.createElement(Bp,{width:n,height:r}),y.createElement("div",zl({ref:t},e)))}),lke=y.forwardRef((e,t)=>{var{width:n,height:r}=e;return typeof n=="string"||typeof r=="string"?y.createElement(oke,zl({},e,{ref:t})):typeof n=="number"&&typeof r=="number"?y.createElement(ske,zl({},e,{width:n,height:r,ref:t})):y.createElement(y.Fragment,null,y.createElement(Bp,{width:n,height:r}),y.createElement("div",zl({ref:t},e)))});function uke(e){return e?ake:lke}var cke=y.forwardRef((e,t)=>{var{children:n,className:r,height:i,onClick:a,onContextMenu:o,onDoubleClick:l,onMouseDown:c,onMouseEnter:f,onMouseLeave:h,onMouseMove:d,onMouseUp:g,onTouchEnd:v,onTouchMove:b,onTouchStart:w,style:S,width:E,responsive:C,dispatchTouchEvents:_=!0}=e,N=y.useRef(null),O=tn(),[A,T]=y.useState(null),[P,I]=y.useState(null),z=JCe(),F=UN(),B=(F==null?void 0:F.width)>0?F.width:E,G=(F==null?void 0:F.height)>0?F.height:i,L=y.useCallback(se=>{z(se),typeof t=="function"&&t(se),T(se),I(se),se!=null&&(N.current=se)},[z,t,T,I]),V=y.useCallback(se=>{O(aV(se)),O(ta({handler:a,reactEvent:se}))},[O,a]),D=y.useCallback(se=>{O(PC(se)),O(ta({handler:f,reactEvent:se}))},[O,f]),q=y.useCallback(se=>{O($9()),O(ta({handler:h,reactEvent:se}))},[O,h]),X=y.useCallback(se=>{O(PC(se)),O(ta({handler:d,reactEvent:se}))},[O,d]),K=y.useCallback(()=>{O(fV())},[O]),R=y.useCallback(()=>{O(dV())},[O]),H=y.useCallback(se=>{O(cV(se.key))},[O]),U=y.useCallback(se=>{O(ta({handler:o,reactEvent:se}))},[O,o]),$=y.useCallback(se=>{O(ta({handler:l,reactEvent:se}))},[O,l]),Q=y.useCallback(se=>{O(ta({handler:c,reactEvent:se}))},[O,c]),J=y.useCallback(se=>{O(ta({handler:g,reactEvent:se}))},[O,g]),ne=y.useCallback(se=>{O(ta({handler:w,reactEvent:se}))},[O,w]),ae=y.useCallback(se=>{_&&O(pV(se)),O(ta({handler:b,reactEvent:se}))},[O,_,b]),ie=y.useCallback(se=>{O(ta({handler:v,reactEvent:se}))},[O,v]),ee=uke(C);return y.createElement(o7.Provider,{value:A},y.createElement(uU.Provider,{value:P},y.createElement(ee,{width:B??(S==null?void 0:S.width),height:G??(S==null?void 0:S.height),className:Pt("recharts-wrapper",r),style:eke({position:"relative",cursor:"default",width:B,height:G},S),onClick:V,onContextMenu:U,onDoubleClick:$,onFocus:K,onBlur:R,onKeyDown:H,onMouseDown:Q,onMouseEnter:D,onMouseLeave:q,onMouseMove:X,onMouseUp:J,onTouchEnd:ie,onTouchMove:ae,onTouchStart:ne,ref:L},y.createElement(ike,null),n)))}),fke=["width","height","responsive","children","className","style","compact","title","desc"];function dke(e,t){if(e==null)return{};var n,r,i=hke(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function hke(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var SV=y.forwardRef((e,t)=>{var{width:n,height:r,responsive:i,children:a,className:o,style:l,compact:c,title:f,desc:h}=e,d=dke(e,fke),g=$i(d);return c?y.createElement(y.Fragment,null,y.createElement(Bp,{width:n,height:r}),y.createElement(f4,{otherAttributes:g,title:f,desc:h},a)):y.createElement(cke,{className:o,style:l,width:n,height:r,responsive:i??!1,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},y.createElement(f4,{otherAttributes:g,title:f,desc:h,ref:t},y.createElement(zEe,null,a)))});function MC(){return MC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},MC.apply(null,arguments)}function h4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function mke(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?h4(Object(n),!0).forEach(function(r){pke(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function pke(e,t,n){return(t=gke(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gke(e){var t=vke(e,"string");return typeof t=="symbol"?t:t+""}function vke(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var yke={top:5,right:5,bottom:5,left:5},xke=mke({accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:yke,responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},PO),EV=y.forwardRef(function(t,n){var r,i=Qn(t.categoricalChartProps,xke),{chartName:a,defaultTooltipEventType:o,validateTooltipEventTypes:l,tooltipPayloadSearcher:c,categoricalChartProps:f}=t,h={chartName:a,defaultTooltipEventType:o,validateTooltipEventTypes:l,tooltipPayloadSearcher:c,eventEmitter:void 0};return y.createElement(yV,{preloadedState:{options:h},reduxStoreName:(r=f.id)!==null&&r!==void 0?r:a},y.createElement(z7,{chartData:f.data}),y.createElement(xV,{layout:i.layout,margin:i.margin}),y.createElement(wV,{throttleDelay:i.throttleDelay,throttledEvents:i.throttledEvents}),y.createElement(bV,{baseValue:i.baseValue,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,reverseStackOrder:i.reverseStackOrder}),y.createElement(SV,MC({},i,{ref:n})))}),bke=["axis"],wke=y.forwardRef((e,t)=>y.createElement(EV,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:bke,tooltipPayloadSearcher:uO,categoricalChartProps:e,ref:t})),Ske=["axis","item"],Eke=y.forwardRef((e,t)=>y.createElement(EV,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:Ske,tooltipPayloadSearcher:uO,categoricalChartProps:e,ref:t}));function jke(e){var t=tn();return y.useEffect(()=>{t(LCe(e))},[t,e]),null}var _ke=["layout"];function DC(){return DC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},DC.apply(null,arguments)}function Cke(e,t){if(e==null)return{};var n,r,i=kke(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function kke(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function m4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Nke(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?m4(Object(n),!0).forEach(function(r){Ake(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ake(e,t,n){return(t=Oke(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Oke(e){var t=Tke(e,"string");return typeof t=="symbol"?t:t+""}function Tke(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Pke={top:5,right:5,bottom:5,left:5},jV=Nke({accessibilityLayer:!0,stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:Pke,reverseStackOrder:!1,syncMethod:"index",layout:"radial",responsive:!1,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"},PO),Mke=y.forwardRef(function(t,n){var r,i=Qn(t.categoricalChartProps,jV),{layout:a}=i,o=Cke(i,_ke),{chartName:l,defaultTooltipEventType:c,validateTooltipEventTypes:f,tooltipPayloadSearcher:h}=t,d={chartName:l,defaultTooltipEventType:c,validateTooltipEventTypes:f,tooltipPayloadSearcher:h,eventEmitter:void 0};return y.createElement(yV,{preloadedState:{options:d},reduxStoreName:(r=i.id)!==null&&r!==void 0?r:l},y.createElement(z7,{chartData:i.data}),y.createElement(xV,{layout:a,margin:i.margin}),y.createElement(wV,{throttleDelay:i.throttleDelay,throttledEvents:i.throttledEvents}),y.createElement(bV,{baseValue:void 0,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,reverseStackOrder:i.reverseStackOrder}),y.createElement(jke,{cx:i.cx,cy:i.cy,startAngle:i.startAngle,endAngle:i.endAngle,innerRadius:i.innerRadius,outerRadius:i.outerRadius}),y.createElement(SV,DC({},o,{ref:n})))});function p4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function g4(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?p4(Object(n),!0).forEach(function(r){Dke(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Dke(e,t,n){return(t=Rke(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rke(e){var t=Ike(e,"string");return typeof t=="symbol"?t:t+""}function Ike(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Lke=["item"],zke=g4(g4({},jV),{},{layout:"centric",startAngle:0,endAngle:360}),$ke=y.forwardRef((e,t)=>{var n=Qn(e,zke);return y.createElement(Mke,{chartName:"PieChart",defaultTooltipEventType:"item",validateTooltipEventTypes:Lke,tooltipPayloadSearcher:uO,categoricalChartProps:n,ref:t})});function Bke({completed:e,failed:t}){const n=e+t;if(n===0)return m.jsx("div",{className:"flex h-full items-center justify-center",children:m.jsxs("div",{className:"relative h-32 w-32",children:[m.jsx("svg",{viewBox:"0 0 100 100",className:"h-full w-full",children:m.jsx("circle",{cx:"50",cy:"50",r:"40",fill:"none",stroke:"hsl(var(--muted))",strokeWidth:"12"})}),m.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:m.jsx("span",{className:"text-sm text-muted-foreground",children:"N/A"})})]})});const r=Math.round(e/n*1e3)/10,i=[{name:"Completed",value:e},{name:"Failed",value:t}],a=["#2e7d32","#c62828"];return m.jsxs("div",{className:"relative flex h-full items-center justify-center",children:[m.jsx(HN,{width:140,height:140,children:m.jsx($ke,{children:m.jsx(R7,{data:i,cx:"50%",cy:"50%",innerRadius:40,outerRadius:56,dataKey:"value",strokeWidth:0,children:i.map((o,l)=>m.jsx(rg,{fill:a[l]},l))})})}),m.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:m.jsxs("span",{className:"text-lg font-semibold",children:[r,"%"]})})]})}function v4(e){return new Date(e+"T00:00:00").toLocaleDateString(void 0,{month:"short",day:"numeric"})}function Fke({data:e}){return e.some(n=>n.total>0)?m.jsx(HN,{width:"100%",height:280,children:m.jsxs(Eke,{data:e,margin:{top:8,right:8,left:-16,bottom:0},children:[m.jsx(jO,{strokeDasharray:"3 3",stroke:"hsl(var(--border))",vertical:!1}),m.jsx(NO,{dataKey:"date",tickFormatter:v4,tick:{fontSize:12,fill:"hsl(var(--muted-foreground))"},tickLine:!1,axisLine:!1}),m.jsx(AO,{allowDecimals:!1,tick:{fontSize:12,fill:"hsl(var(--muted-foreground))"},tickLine:!1,axisLine:!1}),m.jsx(u7,{contentStyle:{backgroundColor:"hsl(var(--popover))",color:"hsl(var(--popover-foreground))",border:"1px solid hsl(var(--border))",borderRadius:"6px",fontSize:13},labelFormatter:n=>v4(String(n))}),m.jsx(VH,{wrapperStyle:{fontSize:12,paddingTop:8}}),m.jsx(kC,{dataKey:"completed",name:"Completed",stackId:"a",fill:"#2e7d32",radius:[0,0,0,0]}),m.jsx(kC,{dataKey:"failed",name:"Failed",stackId:"a",fill:"#c62828",radius:[2,2,0,0]})]})}):m.jsx("div",{className:"flex h-64 items-center justify-center text-muted-foreground",children:"No data"})}function y4(e){return new Date(e+"T00:00:00").toLocaleDateString(void 0,{month:"short",day:"numeric"})}function Uke(e){return e<6e4?`${Math.round(e/1e3)}s`:`${(e/6e4).toFixed(1)}m`}function Hke({data:e}){if(e.filter(r=>r.avg_duration_ms!==null).length===0)return m.jsx("div",{className:"flex h-64 items-center justify-center text-muted-foreground",children:"No data"});const n=e.map(r=>({...r,avg_minutes:r.avg_duration_ms!==null?r.avg_duration_ms/6e4:null}));return m.jsx(HN,{width:"100%",height:280,children:m.jsxs(wke,{data:n,margin:{top:8,right:8,left:-16,bottom:0},children:[m.jsx(jO,{strokeDasharray:"3 3",stroke:"hsl(var(--border))",vertical:!1}),m.jsx(NO,{dataKey:"date",tickFormatter:y4,tick:{fontSize:12,fill:"hsl(var(--muted-foreground))"},tickLine:!1,axisLine:!1}),m.jsx(AO,{tick:{fontSize:12,fill:"hsl(var(--muted-foreground))"},tickLine:!1,axisLine:!1,tickFormatter:r=>`${r.toFixed(0)}m`}),m.jsx(u7,{contentStyle:{backgroundColor:"hsl(var(--popover))",color:"hsl(var(--popover-foreground))",border:"1px solid hsl(var(--border))",borderRadius:"6px",fontSize:13},labelFormatter:r=>y4(String(r)),formatter:r=>[Uke(Number(r)*6e4),"Avg Duration"]}),m.jsx(J7,{type:"monotone",dataKey:"avg_minutes",name:"Avg Duration",stroke:"#1565c0",strokeWidth:2,dot:{r:3,fill:"#1565c0"},connectNulls:!0})]})})}const qke=["7d","30d","90d"];function Vke(e){return e===null?"—":e<6e4?`${Math.round(e/1e3)}s`:`${(e/6e4).toFixed(1)}m`}function _V({projectId:e}){const[t,n]=y.useState("30d"),{data:r,isLoading:i}=Pue(e,t);return i?m.jsxs("div",{className:"space-y-4",children:[m.jsx(Rn,{className:"h-8 w-48"}),m.jsxs("div",{className:"grid gap-4 sm:grid-cols-3",children:[m.jsx(Rn,{className:"h-32"}),m.jsx(Rn,{className:"h-32"}),m.jsx(Rn,{className:"h-32"})]}),m.jsx(Rn,{className:"h-72"})]}):r?m.jsxs("div",{className:"space-y-6",children:[m.jsx("div",{className:"flex gap-1",children:qke.map(a=>m.jsx(je,{size:"sm",variant:t===a?"default":"outline",onClick:()=>n(a),children:a},a))}),m.jsxs("div",{className:"grid gap-4 sm:grid-cols-3",children:[m.jsxs(hn,{children:[m.jsx(Wh,{className:"pb-2",children:m.jsx(Qh,{className:"text-sm font-medium text-muted-foreground",children:"Total Runs"})}),m.jsxs(mn,{children:[m.jsx("div",{className:"text-3xl font-bold",children:r.total_runs}),m.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:[r.completed," completed · ",r.failed," failed"]})]})]}),m.jsxs(hn,{children:[m.jsx(Wh,{className:"pb-2",children:m.jsx(Qh,{className:"text-sm font-medium text-muted-foreground",children:"Success Rate"})}),m.jsx(mn,{className:"h-36",children:m.jsx(Bke,{completed:r.completed,failed:r.failed})})]}),m.jsxs(hn,{children:[m.jsx(Wh,{className:"pb-2",children:m.jsx(Qh,{className:"text-sm font-medium text-muted-foreground",children:"Avg Duration"})}),m.jsxs(mn,{children:[m.jsx("div",{className:"text-3xl font-bold",children:Vke(r.avg_duration_ms)}),m.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"per session"})]})]})]}),m.jsxs(hn,{children:[m.jsx(Wh,{children:m.jsx(Qh,{className:"text-base",children:"Run Frequency"})}),m.jsx(mn,{children:m.jsx(Fke,{data:r.daily})})]}),m.jsxs(hn,{children:[m.jsx(Wh,{children:m.jsx(Qh,{className:"text-base",children:"Duration Trends"})}),m.jsx(mn,{children:m.jsx(Hke,{data:r.daily})})]})]}):null}function Kke(){return m.jsxs("div",{className:"space-y-6",children:[m.jsx(Rn,{className:"h-8 w-48"}),m.jsx(Rn,{className:"h-24 rounded-lg"}),m.jsx(Rn,{className:"h-64 rounded-lg"})]})}function Yke({projectId:e,conversationId:t,title:n,fallback:r}){const[i,a]=y.useState(!1),[o,l]=y.useState(""),c=y.useRef(null),f=gN(e);function h(v){v.stopPropagation(),l(n??""),a(!0),setTimeout(()=>{var b;return(b=c.current)==null?void 0:b.select()},0)}function d(v){v.stopPropagation();const b=o.trim();f.mutate({conversationId:t,title:b||null}),a(!1)}function g(v){v.key==="Enter"&&(v.preventDefault(),d(v)),v.key==="Escape"&&(v.stopPropagation(),a(!1))}return i?m.jsx(rt,{ref:c,value:o,onChange:v=>l(v.target.value),onBlur:d,onKeyDown:g,onClick:v=>v.stopPropagation(),className:"h-7 text-sm font-medium w-full",placeholder:r}):m.jsxs("div",{className:"flex items-center gap-1.5 group",children:[m.jsx("span",{className:"font-medium",children:n??r}),m.jsx(je,{variant:"ghost",size:"icon",className:"h-5 w-5 text-muted-foreground hover:text-foreground",onClick:h,"aria-label":"Rename",children:m.jsx(Op,{className:"h-3 w-3"})})]})}function Xke({projectId:e,conversationId:t,label:n}){const[r,i]=y.useState(!1),a=LF(e);return r?m.jsxs("div",{className:"flex justify-end gap-1",onClick:o=>o.stopPropagation(),children:[m.jsx(je,{size:"sm",variant:"destructive",disabled:a.isPending,onClick:o=>{o.stopPropagation(),a.mutate(t,{onSuccess:()=>i(!1),onError:()=>i(!1)})},children:"Confirm"}),m.jsx(je,{size:"sm",variant:"outline",onClick:o=>{o.stopPropagation(),i(!1)},children:"No"})]}):m.jsx(je,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-destructive",onClick:o=>{o.stopPropagation(),i(!0)},"aria-label":`Delete ${n}`,children:m.jsx(Eo,{className:"h-3.5 w-3.5"})})}const x4={roles:"Role",skills:"Skill",agents:"Agent",memories:"Memory"};function Gke(){var z,F,B;const{projectId:e}=xp(),t=Number(e),n=Ba(),r=hN(t),[i,a]=y.useState(1),[o]=y.useState(1),l=$F(t,i),c=Pp(t),f=pN(t,o),h=PF(),[d,g]=y.useState(!1),[v,b]=y.useState(!1),[w,S]=y.useState("conversations"),E=r.isLoading||l.isLoading,C=r.error||l.error;if(E)return m.jsx(Kke,{});if(C)return m.jsxs("div",{className:"flex items-center gap-2 text-destructive",children:[m.jsx(po,{className:"h-4 w-4"}),m.jsxs("span",{children:["Error: ",C.message]})]});if(!r.data)return m.jsxs("div",{className:"flex items-center gap-2 text-destructive",children:[m.jsx(po,{className:"h-4 w-4"}),m.jsx("span",{children:"Project not found"})]});const _=r.data,N=l.data,O=(N==null?void 0:N.items)??[],A=(N==null?void 0:N.total)??0,T=N?Math.ceil(N.total/N.per_page):0,P=c.data??[],I=P.reduce((G,L)=>(G[L.type]=(G[L.type]||0)+1,G),{});return m.jsxs("div",{className:"space-y-6",children:[m.jsxs("div",{className:"flex items-center justify-between",children:[m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx(je,{variant:"outline",size:"sm",asChild:!0,children:m.jsxs(Br,{to:"/projects",children:[m.jsx(P0,{className:"mr-2 h-4 w-4"}),"Back"]})}),m.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:_.display_name})]}),m.jsxs("div",{className:"flex gap-2",children:[m.jsxs(je,{disabled:!_.dir_exists||h.isPending,onClick:()=>{h.mutate({project_id:t},{onSuccess:G=>n(`/projects/${t}/conversations/${G.id}`)})},children:[m.jsx(Ap,{className:"mr-2 h-4 w-4"}),"New Conversation"]}),m.jsxs(je,{variant:"outline",onClick:()=>g(!0),disabled:!_.dir_exists,children:[m.jsx(dN,{className:"mr-2 h-4 w-4"}),"Launch Session"]}),m.jsxs(je,{variant:"outline",onClick:()=>{S("resources"),b(!0)},children:[m.jsx(D0,{className:"mr-2 h-4 w-4"}),"Install Resource"]})]})]}),m.jsx(hn,{children:m.jsx(mn,{className:"pt-6",children:m.jsxs("dl",{className:"grid grid-cols-[auto_1fr] gap-x-4 gap-y-2 text-sm",children:[m.jsx("dt",{className:"font-medium text-muted-foreground",children:"Directory"}),m.jsxs("dd",{className:"flex items-center gap-2 break-all",children:[_.working_dir,_.dir_exists?m.jsx(zt,{variant:"outline",className:"border-green-200 bg-green-50 text-xs text-green-700 dark:border-green-800 dark:bg-green-950 dark:text-green-400",children:"OK"}):m.jsx(zt,{variant:"outline",className:"border-orange-200 bg-orange-50 text-xs text-orange-700 dark:border-orange-800 dark:bg-orange-950 dark:text-orange-400",children:"Missing"})]}),m.jsx("dt",{className:"font-medium text-muted-foreground",children:"Created"}),m.jsx("dd",{children:new Date(_.created_at).toLocaleString()}),m.jsx("dt",{className:"font-medium text-muted-foreground",children:"Resources"}),m.jsx("dd",{children:P.length===0?m.jsx("span",{className:"text-sm text-muted-foreground",children:"None installed"}):m.jsx("div",{className:"flex flex-wrap gap-1.5",children:Object.entries(I).map(([G,L])=>m.jsxs(zt,{variant:"secondary",className:"cursor-pointer text-xs",onClick:()=>S("resources"),children:[L," ",L===1?x4[G]??G:`${x4[G]??G}s`]},G))})})]})})}),m.jsx(oue,{projectId:t,open:d,onOpenChange:g}),m.jsx(SN,{open:v,onOpenChange:b,projectId:t}),m.jsxs(Mp,{value:w,onValueChange:S,children:[m.jsxs(Dp,{children:[m.jsxs(ar,{value:"conversations",children:["Conversations (",((z=f.data)==null?void 0:z.total)??0,")"]}),m.jsxs(ar,{value:"sessions",children:["Sessions (",A,")"]}),m.jsx(ar,{value:"activity",children:"Activity"}),m.jsxs(ar,{value:"resources",children:["Resources (",P.length,")"]}),m.jsx(ar,{value:"files",children:"Files"})]}),m.jsx(or,{value:"sessions",className:"mt-4 space-y-3",children:A===0?m.jsx("p",{className:"text-sm italic text-muted-foreground",children:"No sessions yet."}):m.jsxs(m.Fragment,{children:[m.jsx(hn,{children:m.jsx(mn,{className:"p-0",children:m.jsx(Qy,{sessions:O})})}),m.jsx(eU,{page:i,totalPages:T,onPageChange:a})]})}),m.jsx(or,{value:"conversations",className:"mt-4 space-y-3",children:(((F=f.data)==null?void 0:F.items)??[]).length===0?m.jsx("p",{className:"text-sm italic text-muted-foreground",children:'No conversations yet. Click "New Conversation" to start one.'}):m.jsx(hn,{children:m.jsx(mn,{className:"p-0",children:m.jsxs("table",{className:"w-full text-sm",children:[m.jsx("thead",{children:m.jsxs("tr",{className:"border-b border-border text-left text-xs text-muted-foreground",children:[m.jsx("th",{className:"px-4 py-2 font-medium",children:"Title"}),m.jsx("th",{className:"px-4 py-2 font-medium",children:"Sessions"}),m.jsx("th",{className:"px-4 py-2 font-medium",children:"Last activity"}),m.jsx("th",{className:"px-4 py-2"})]})}),m.jsx("tbody",{children:(((B=f.data)==null?void 0:B.items)??[]).map(G=>m.jsxs("tr",{className:"cursor-pointer border-b border-border last:border-0 hover:bg-muted/50",onClick:()=>n(`/projects/${t}/conversations/${G.id}`),children:[m.jsx("td",{className:"px-4 py-2",children:m.jsx(Yke,{projectId:t,conversationId:G.id,title:G.title,fallback:`Conversation #${G.id}`})}),m.jsx("td",{className:"px-4 py-2 text-muted-foreground",children:G.session_count}),m.jsx("td",{className:"px-4 py-2 text-muted-foreground",children:G.last_activity?new Date(G.last_activity).toLocaleString():"—"}),m.jsx("td",{className:"px-4 py-2 text-right",children:m.jsx(Xke,{projectId:t,conversationId:G.id,label:G.title??`Conversation #${G.id}`})})]},G.id))})]})})})}),m.jsx(or,{value:"activity",className:"mt-4",children:m.jsx(_V,{projectId:t})}),m.jsx(or,{value:"resources",className:"mt-4",children:m.jsx(Oue,{projectId:t,installOpen:v,onInstallOpenChange:b})}),m.jsx(or,{value:"files",className:"mt-4",children:m.jsx(nU,{projectId:t})})]})]})}function Zn(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,r;n<e.length;n++)(r=Zn(e[n]))!==""&&(t+=(t&&" ")+r);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var Wke={value:()=>{}};function Mb(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Ty(n)}function Ty(e){this._=e}function Qke(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Ty.prototype=Mb.prototype={constructor:Ty,on:function(e,t){var n=this._,r=Qke(e+"",n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a<o;)if((i=(e=r[a]).type)&&(i=Zke(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<o;)if(i=(e=r[a]).type)n[i]=b4(n[i],e.name,t);else if(t==null)for(i in n)n[i]=b4(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Ty(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],r=0,i=a.length;r<i;++r)a[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};function Zke(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function b4(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=Wke,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var RC="http://www.w3.org/1999/xhtml";const w4={svg:"http://www.w3.org/2000/svg",xhtml:RC,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Db(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),w4.hasOwnProperty(t)?{space:w4[t],local:e}:e}function Jke(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===RC&&t.documentElement.namespaceURI===RC?t.createElement(e):t.createElementNS(n,e)}}function eNe(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function CV(e){var t=Db(e);return(t.local?eNe:Jke)(t)}function tNe(){}function MO(e){return e==null?tNe:function(){return this.querySelector(e)}}function nNe(e){typeof e!="function"&&(e=MO(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,l=r[i]=new Array(o),c,f,h=0;h<o;++h)(c=a[h])&&(f=e.call(c,c.__data__,h,a))&&("__data__"in c&&(f.__data__=c.__data__),l[h]=f);return new Ui(r,this._parents)}function rNe(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function iNe(){return[]}function kV(e){return e==null?iNe:function(){return this.querySelectorAll(e)}}function aNe(e){return function(){return rNe(e.apply(this,arguments))}}function oNe(e){typeof e=="function"?e=aNe(e):e=kV(e);for(var t=this._groups,n=t.length,r=[],i=[],a=0;a<n;++a)for(var o=t[a],l=o.length,c,f=0;f<l;++f)(c=o[f])&&(r.push(e.call(c,c.__data__,f,o)),i.push(c));return new Ui(r,i)}function NV(e){return function(){return this.matches(e)}}function AV(e){return function(t){return t.matches(e)}}var sNe=Array.prototype.find;function lNe(e){return function(){return sNe.call(this.children,e)}}function uNe(){return this.firstElementChild}function cNe(e){return this.select(e==null?uNe:lNe(typeof e=="function"?e:AV(e)))}var fNe=Array.prototype.filter;function dNe(){return Array.from(this.children)}function hNe(e){return function(){return fNe.call(this.children,e)}}function mNe(e){return this.selectAll(e==null?dNe:hNe(typeof e=="function"?e:AV(e)))}function pNe(e){typeof e!="function"&&(e=NV(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,l=r[i]=[],c,f=0;f<o;++f)(c=a[f])&&e.call(c,c.__data__,f,a)&&l.push(c);return new Ui(r,this._parents)}function OV(e){return new Array(e.length)}function gNe(){return new Ui(this._enter||this._groups.map(OV),this._parents)}function Xx(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Xx.prototype={constructor:Xx,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function vNe(e){return function(){return e}}function yNe(e,t,n,r,i,a){for(var o=0,l,c=t.length,f=a.length;o<f;++o)(l=t[o])?(l.__data__=a[o],r[o]=l):n[o]=new Xx(e,a[o]);for(;o<c;++o)(l=t[o])&&(i[o]=l)}function xNe(e,t,n,r,i,a,o){var l,c,f=new Map,h=t.length,d=a.length,g=new Array(h),v;for(l=0;l<h;++l)(c=t[l])&&(g[l]=v=o.call(c,c.__data__,l,t)+"",f.has(v)?i[l]=c:f.set(v,c));for(l=0;l<d;++l)v=o.call(e,a[l],l,a)+"",(c=f.get(v))?(r[l]=c,c.__data__=a[l],f.delete(v)):n[l]=new Xx(e,a[l]);for(l=0;l<h;++l)(c=t[l])&&f.get(g[l])===c&&(i[l]=c)}function bNe(e){return e.__data__}function wNe(e,t){if(!arguments.length)return Array.from(this,bNe);var n=t?xNe:yNe,r=this._parents,i=this._groups;typeof e!="function"&&(e=vNe(e));for(var a=i.length,o=new Array(a),l=new Array(a),c=new Array(a),f=0;f<a;++f){var h=r[f],d=i[f],g=d.length,v=SNe(e.call(h,h&&h.__data__,f,r)),b=v.length,w=l[f]=new Array(b),S=o[f]=new Array(b),E=c[f]=new Array(g);n(h,d,w,S,E,v,t);for(var C=0,_=0,N,O;C<b;++C)if(N=w[C]){for(C>=_&&(_=C+1);!(O=S[_])&&++_<b;);N._next=O||null}}return o=new Ui(o,r),o._enter=l,o._exit=c,o}function SNe(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function ENe(){return new Ui(this._exit||this._groups.map(OV),this._parents)}function jNe(e,t,n){var r=this.enter(),i=this,a=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?a.remove():n(a),r&&i?r.merge(i).order():i}function _Ne(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,a=r.length,o=Math.min(i,a),l=new Array(i),c=0;c<o;++c)for(var f=n[c],h=r[c],d=f.length,g=l[c]=new Array(d),v,b=0;b<d;++b)(v=f[b]||h[b])&&(g[b]=v);for(;c<i;++c)l[c]=n[c];return new Ui(l,this._parents)}function CNe(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,a=r[i],o;--i>=0;)(o=r[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function kNe(e){e||(e=NNe);function t(d,g){return d&&g?e(d.__data__,g.__data__):!d-!g}for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o=n[a],l=o.length,c=i[a]=new Array(l),f,h=0;h<l;++h)(f=o[h])&&(c[h]=f);c.sort(t)}return new Ui(i,this._parents).order()}function NNe(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function ANe(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function ONe(){return Array.from(this)}function TNe(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null}function PNe(){let e=0;for(const t of this)++e;return e}function MNe(){return!this.node()}function DNe(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],a=0,o=i.length,l;a<o;++a)(l=i[a])&&e.call(l,l.__data__,a,i);return this}function RNe(e){return function(){this.removeAttribute(e)}}function INe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function LNe(e,t){return function(){this.setAttribute(e,t)}}function zNe(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function $Ne(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function BNe(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function FNe(e,t){var n=Db(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?INe:RNe:typeof t=="function"?n.local?BNe:$Ne:n.local?zNe:LNe)(n,t))}function TV(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function UNe(e){return function(){this.style.removeProperty(e)}}function HNe(e,t,n){return function(){this.style.setProperty(e,t,n)}}function qNe(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function VNe(e,t,n){return arguments.length>1?this.each((t==null?UNe:typeof t=="function"?qNe:HNe)(e,t,n??"")):Sd(this.node(),e)}function Sd(e,t){return e.style.getPropertyValue(t)||TV(e).getComputedStyle(e,null).getPropertyValue(t)}function KNe(e){return function(){delete this[e]}}function YNe(e,t){return function(){this[e]=t}}function XNe(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function GNe(e,t){return arguments.length>1?this.each((t==null?KNe:typeof t=="function"?XNe:YNe)(e,t)):this.node()[e]}function PV(e){return e.trim().split(/^|\s+/)}function DO(e){return e.classList||new MV(e)}function MV(e){this._node=e,this._names=PV(e.getAttribute("class")||"")}MV.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function DV(e,t){for(var n=DO(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function RV(e,t){for(var n=DO(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function WNe(e){return function(){DV(this,e)}}function QNe(e){return function(){RV(this,e)}}function ZNe(e,t){return function(){(t.apply(this,arguments)?DV:RV)(this,e)}}function JNe(e,t){var n=PV(e+"");if(arguments.length<2){for(var r=DO(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?ZNe:t?WNe:QNe)(n,t))}function eAe(){this.textContent=""}function tAe(e){return function(){this.textContent=e}}function nAe(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function rAe(e){return arguments.length?this.each(e==null?eAe:(typeof e=="function"?nAe:tAe)(e)):this.node().textContent}function iAe(){this.innerHTML=""}function aAe(e){return function(){this.innerHTML=e}}function oAe(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function sAe(e){return arguments.length?this.each(e==null?iAe:(typeof e=="function"?oAe:aAe)(e)):this.node().innerHTML}function lAe(){this.nextSibling&&this.parentNode.appendChild(this)}function uAe(){return this.each(lAe)}function cAe(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function fAe(){return this.each(cAe)}function dAe(e){var t=typeof e=="function"?e:CV(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function hAe(){return null}function mAe(e,t){var n=typeof e=="function"?e:CV(e),r=t==null?hAe:typeof t=="function"?t:MO(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function pAe(){var e=this.parentNode;e&&e.removeChild(this)}function gAe(){return this.each(pAe)}function vAe(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function yAe(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function xAe(e){return this.select(e?yAe:vAe)}function bAe(e){return arguments.length?this.property("__data__",e):this.node().__data__}function wAe(e){return function(t){e.call(this,t,this.__data__)}}function SAe(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function EAe(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,a;n<i;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++r]=a;++r?t.length=r:delete this.__on}}}function jAe(e,t,n){return function(){var r=this.__on,i,a=wAe(t);if(r){for(var o=0,l=r.length;o<l;++o)if((i=r[o]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=t;return}}this.addEventListener(e.type,a,n),i={type:e.type,name:e.name,value:t,listener:a,options:n},r?r.push(i):this.__on=[i]}}function _Ae(e,t,n){var r=SAe(e+""),i,a=r.length,o;if(arguments.length<2){var l=this.node().__on;if(l){for(var c=0,f=l.length,h;c<f;++c)for(i=0,h=l[c];i<a;++i)if((o=r[i]).type===h.type&&o.name===h.name)return h.value}return}for(l=t?jAe:EAe,i=0;i<a;++i)this.each(l(r[i],t,n));return this}function IV(e,t,n){var r=TV(e),i=r.CustomEvent;typeof i=="function"?i=new i(t,n):(i=r.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function CAe(e,t){return function(){return IV(this,e,t)}}function kAe(e,t){return function(){return IV(this,e,t.apply(this,arguments))}}function NAe(e,t){return this.each((typeof t=="function"?kAe:CAe)(e,t))}function*AAe(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length,o;i<a;++i)(o=r[i])&&(yield o)}var LV=[null];function Ui(e,t){this._groups=e,this._parents=t}function ag(){return new Ui([[document.documentElement]],LV)}function OAe(){return this}Ui.prototype=ag.prototype={constructor:Ui,select:nNe,selectAll:oNe,selectChild:cNe,selectChildren:mNe,filter:pNe,data:wNe,enter:gNe,exit:ENe,join:jNe,merge:_Ne,selection:OAe,order:CNe,sort:kNe,call:ANe,nodes:ONe,node:TNe,size:PNe,empty:MNe,each:DNe,attr:FNe,style:VNe,property:GNe,classed:JNe,text:rAe,html:sAe,raise:uAe,lower:fAe,append:dAe,insert:mAe,remove:gAe,clone:xAe,datum:bAe,on:_Ae,dispatch:NAe,[Symbol.iterator]:AAe};function Mi(e){return typeof e=="string"?new Ui([[document.querySelector(e)]],[document.documentElement]):new Ui([[e]],LV)}function TAe(e){let t;for(;t=e.sourceEvent;)e=t;return e}function _a(e,t){if(e=TAe(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}const PAe={passive:!1},ep={capture:!0,passive:!1};function pj(e){e.stopImmediatePropagation()}function Kf(e){e.preventDefault(),e.stopImmediatePropagation()}function zV(e){var t=e.document.documentElement,n=Mi(e).on("dragstart.drag",Kf,ep);"onselectstart"in t?n.on("selectstart.drag",Kf,ep):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function $V(e,t){var n=e.document.documentElement,r=Mi(e).on("dragstart.drag",null);t&&(r.on("click.drag",Kf,ep),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const oy=e=>()=>e;function IC(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:a,x:o,y:l,dx:c,dy:f,dispatch:h}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:o,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:f,enumerable:!0,configurable:!0},_:{value:h}})}IC.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function MAe(e){return!e.ctrlKey&&!e.button}function DAe(){return this.parentNode}function RAe(e,t){return t??{x:e.x,y:e.y}}function IAe(){return navigator.maxTouchPoints||"ontouchstart"in this}function BV(){var e=MAe,t=DAe,n=RAe,r=IAe,i={},a=Mb("start","drag","end"),o=0,l,c,f,h,d=0;function g(N){N.on("mousedown.drag",v).filter(r).on("touchstart.drag",S).on("touchmove.drag",E,PAe).on("touchend.drag touchcancel.drag",C).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function v(N,O){if(!(h||!e.call(this,N,O))){var A=_(this,t.call(this,N,O),N,O,"mouse");A&&(Mi(N.view).on("mousemove.drag",b,ep).on("mouseup.drag",w,ep),zV(N.view),pj(N),f=!1,l=N.clientX,c=N.clientY,A("start",N))}}function b(N){if(Kf(N),!f){var O=N.clientX-l,A=N.clientY-c;f=O*O+A*A>d}i.mouse("drag",N)}function w(N){Mi(N.view).on("mousemove.drag mouseup.drag",null),$V(N.view,f),Kf(N),i.mouse("end",N)}function S(N,O){if(e.call(this,N,O)){var A=N.changedTouches,T=t.call(this,N,O),P=A.length,I,z;for(I=0;I<P;++I)(z=_(this,T,N,O,A[I].identifier,A[I]))&&(pj(N),z("start",N,A[I]))}}function E(N){var O=N.changedTouches,A=O.length,T,P;for(T=0;T<A;++T)(P=i[O[T].identifier])&&(Kf(N),P("drag",N,O[T]))}function C(N){var O=N.changedTouches,A=O.length,T,P;for(h&&clearTimeout(h),h=setTimeout(function(){h=null},500),T=0;T<A;++T)(P=i[O[T].identifier])&&(pj(N),P("end",N,O[T]))}function _(N,O,A,T,P,I){var z=a.copy(),F=_a(I||A,O),B,G,L;if((L=n.call(N,new IC("beforestart",{sourceEvent:A,target:g,identifier:P,active:o,x:F[0],y:F[1],dx:0,dy:0,dispatch:z}),T))!=null)return B=L.x-F[0]||0,G=L.y-F[1]||0,function V(D,q,X){var K=F,R;switch(D){case"start":i[P]=V,R=o++;break;case"end":delete i[P],--o;case"drag":F=_a(X||q,O),R=o;break}z.call(D,N,new IC(D,{sourceEvent:q,subject:L,target:g,identifier:P,active:R,x:F[0]+B,y:F[1]+G,dx:F[0]-K[0],dy:F[1]-K[1],dispatch:z}),T)}}return g.filter=function(N){return arguments.length?(e=typeof N=="function"?N:oy(!!N),g):e},g.container=function(N){return arguments.length?(t=typeof N=="function"?N:oy(N),g):t},g.subject=function(N){return arguments.length?(n=typeof N=="function"?N:oy(N),g):n},g.touchable=function(N){return arguments.length?(r=typeof N=="function"?N:oy(!!N),g):r},g.on=function(){var N=a.on.apply(a,arguments);return N===a?g:N},g.clickDistance=function(N){return arguments.length?(d=(N=+N)*N,g):Math.sqrt(d)},g}var Ed=0,Sm=0,um=0,FV=1e3,Gx,Em,Wx=0,Ec=0,Rb=0,tp=typeof performance=="object"&&performance.now?performance:Date,UV=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function RO(){return Ec||(UV(LAe),Ec=tp.now()+Rb)}function LAe(){Ec=0}function Qx(){this._call=this._time=this._next=null}Qx.prototype=HV.prototype={constructor:Qx,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?RO():+n)+(t==null?0:+t),!this._next&&Em!==this&&(Em?Em._next=this:Gx=this,Em=this),this._call=e,this._time=n,LC()},stop:function(){this._call&&(this._call=null,this._time=1/0,LC())}};function HV(e,t,n){var r=new Qx;return r.restart(e,t,n),r}function zAe(){RO(),++Ed;for(var e=Gx,t;e;)(t=Ec-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Ed}function S4(){Ec=(Wx=tp.now())+Rb,Ed=Sm=0;try{zAe()}finally{Ed=0,BAe(),Ec=0}}function $Ae(){var e=tp.now(),t=e-Wx;t>FV&&(Rb-=t,Wx=e)}function BAe(){for(var e,t=Gx,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Gx=n);Em=e,LC(r)}function LC(e){if(!Ed){Sm&&(Sm=clearTimeout(Sm));var t=e-Ec;t>24?(e<1/0&&(Sm=setTimeout(S4,e-tp.now()-Rb)),um&&(um=clearInterval(um))):(um||(Wx=tp.now(),um=setInterval($Ae,FV)),Ed=1,UV(S4))}}function E4(e,t,n){var r=new Qx;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var FAe=Mb("start","end","cancel","interrupt"),UAe=[],qV=0,j4=1,zC=2,Py=3,_4=4,$C=5,My=6;function Ib(e,t,n,r,i,a){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;HAe(e,n,{name:t,index:r,group:i,on:FAe,tween:UAe,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:qV})}function IO(e,t){var n=qa(e,t);if(n.state>qV)throw new Error("too late; already scheduled");return n}function jo(e,t){var n=qa(e,t);if(n.state>Py)throw new Error("too late; already running");return n}function qa(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function HAe(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=HV(a,0,n.time);function a(f){n.state=j4,n.timer.restart(o,n.delay,n.time),n.delay<=f&&o(f-n.delay)}function o(f){var h,d,g,v;if(n.state!==j4)return c();for(h in r)if(v=r[h],v.name===n.name){if(v.state===Py)return E4(o);v.state===_4?(v.state=My,v.timer.stop(),v.on.call("interrupt",e,e.__data__,v.index,v.group),delete r[h]):+h<t&&(v.state=My,v.timer.stop(),v.on.call("cancel",e,e.__data__,v.index,v.group),delete r[h])}if(E4(function(){n.state===Py&&(n.state=_4,n.timer.restart(l,n.delay,n.time),l(f))}),n.state=zC,n.on.call("start",e,e.__data__,n.index,n.group),n.state===zC){for(n.state=Py,i=new Array(g=n.tween.length),h=0,d=-1;h<g;++h)(v=n.tween[h].value.call(e,e.__data__,n.index,n.group))&&(i[++d]=v);i.length=d+1}}function l(f){for(var h=f<n.duration?n.ease.call(null,f/n.duration):(n.timer.restart(c),n.state=$C,1),d=-1,g=i.length;++d<g;)i[d].call(e,h);n.state===$C&&(n.on.call("end",e,e.__data__,n.index,n.group),c())}function c(){n.state=My,n.timer.stop(),delete r[t];for(var f in r)return;delete e.__transition}}function Dy(e,t){var n=e.__transition,r,i,a=!0,o;if(n){t=t==null?null:t+"";for(o in n){if((r=n[o]).name!==t){a=!1;continue}i=r.state>zC&&r.state<$C,r.state=My,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[o]}a&&delete e.__transition}}function qAe(e){return this.each(function(){Dy(this,e)})}function VAe(e,t){var n,r;return function(){var i=jo(this,e),a=i.tween;if(a!==n){r=n=a;for(var o=0,l=r.length;o<l;++o)if(r[o].name===t){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function KAe(e,t,n){var r,i;if(typeof n!="function")throw new Error;return function(){var a=jo(this,e),o=a.tween;if(o!==r){i=(r=o).slice();for(var l={name:t,value:n},c=0,f=i.length;c<f;++c)if(i[c].name===t){i[c]=l;break}c===f&&i.push(l)}a.tween=i}}function YAe(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=qa(this.node(),n).tween,i=0,a=r.length,o;i<a;++i)if((o=r[i]).name===e)return o.value;return null}return this.each((t==null?VAe:KAe)(n,e,t))}function LO(e,t,n){var r=e._id;return e.each(function(){var i=jo(this,r);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return qa(i,r).value[t]}}function VV(e,t){var n;return(typeof t=="number"?Ca:t instanceof wc?Ax:(n=wc(t))?(t=n,Ax):Mq)(e,t)}function XAe(e){return function(){this.removeAttribute(e)}}function GAe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function WAe(e,t,n){var r,i=n+"",a;return function(){var o=this.getAttribute(e);return o===i?null:o===r?a:a=t(r=o,n)}}function QAe(e,t,n){var r,i=n+"",a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===i?null:o===r?a:a=t(r=o,n)}}function ZAe(e,t,n){var r,i,a;return function(){var o,l=n(this),c;return l==null?void this.removeAttribute(e):(o=this.getAttribute(e),c=l+"",o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,l)))}}function JAe(e,t,n){var r,i,a;return function(){var o,l=n(this),c;return l==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),c=l+"",o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,l)))}}function eOe(e,t){var n=Db(e),r=n==="transform"?nve:VV;return this.attrTween(e,typeof t=="function"?(n.local?JAe:ZAe)(n,r,LO(this,"attr."+e,t)):t==null?(n.local?GAe:XAe)(n):(n.local?QAe:WAe)(n,r,t))}function tOe(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function nOe(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function rOe(e,t){var n,r;function i(){var a=t.apply(this,arguments);return a!==r&&(n=(r=a)&&nOe(e,a)),n}return i._value=t,i}function iOe(e,t){var n,r;function i(){var a=t.apply(this,arguments);return a!==r&&(n=(r=a)&&tOe(e,a)),n}return i._value=t,i}function aOe(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=Db(e);return this.tween(n,(r.local?rOe:iOe)(r,t))}function oOe(e,t){return function(){IO(this,e).delay=+t.apply(this,arguments)}}function sOe(e,t){return t=+t,function(){IO(this,e).delay=t}}function lOe(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?oOe:sOe)(t,e)):qa(this.node(),t).delay}function uOe(e,t){return function(){jo(this,e).duration=+t.apply(this,arguments)}}function cOe(e,t){return t=+t,function(){jo(this,e).duration=t}}function fOe(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?uOe:cOe)(t,e)):qa(this.node(),t).duration}function dOe(e,t){if(typeof t!="function")throw new Error;return function(){jo(this,e).ease=t}}function hOe(e){var t=this._id;return arguments.length?this.each(dOe(t,e)):qa(this.node(),t).ease}function mOe(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;jo(this,e).ease=n}}function pOe(e){if(typeof e!="function")throw new Error;return this.each(mOe(this._id,e))}function gOe(e){typeof e!="function"&&(e=NV(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,l=r[i]=[],c,f=0;f<o;++f)(c=a[f])&&e.call(c,c.__data__,f,a)&&l.push(c);return new xs(r,this._parents,this._name,this._id)}function vOe(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,a=Math.min(r,i),o=new Array(r),l=0;l<a;++l)for(var c=t[l],f=n[l],h=c.length,d=o[l]=new Array(h),g,v=0;v<h;++v)(g=c[v]||f[v])&&(d[v]=g);for(;l<r;++l)o[l]=t[l];return new xs(o,this._parents,this._name,this._id)}function yOe(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function xOe(e,t,n){var r,i,a=yOe(t)?IO:jo;return function(){var o=a(this,e),l=o.on;l!==r&&(i=(r=l).copy()).on(t,n),o.on=i}}function bOe(e,t){var n=this._id;return arguments.length<2?qa(this.node(),n).on.on(e):this.each(xOe(n,e,t))}function wOe(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function SOe(){return this.on("end.remove",wOe(this._id))}function EOe(e){var t=this._name,n=this._id;typeof e!="function"&&(e=MO(e));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var l=r[o],c=l.length,f=a[o]=new Array(c),h,d,g=0;g<c;++g)(h=l[g])&&(d=e.call(h,h.__data__,g,l))&&("__data__"in h&&(d.__data__=h.__data__),f[g]=d,Ib(f[g],t,n,g,f,qa(h,n)));return new xs(a,this._parents,t,n)}function jOe(e){var t=this._name,n=this._id;typeof e!="function"&&(e=kV(e));for(var r=this._groups,i=r.length,a=[],o=[],l=0;l<i;++l)for(var c=r[l],f=c.length,h,d=0;d<f;++d)if(h=c[d]){for(var g=e.call(h,h.__data__,d,c),v,b=qa(h,n),w=0,S=g.length;w<S;++w)(v=g[w])&&Ib(v,t,n,w,g,b);a.push(g),o.push(h)}return new xs(a,o,t,n)}var _Oe=ag.prototype.constructor;function COe(){return new _Oe(this._groups,this._parents)}function kOe(e,t){var n,r,i;return function(){var a=Sd(this,e),o=(this.style.removeProperty(e),Sd(this,e));return a===o?null:a===n&&o===r?i:i=t(n=a,r=o)}}function KV(e){return function(){this.style.removeProperty(e)}}function NOe(e,t,n){var r,i=n+"",a;return function(){var o=Sd(this,e);return o===i?null:o===r?a:a=t(r=o,n)}}function AOe(e,t,n){var r,i,a;return function(){var o=Sd(this,e),l=n(this),c=l+"";return l==null&&(c=l=(this.style.removeProperty(e),Sd(this,e))),o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,l))}}function OOe(e,t){var n,r,i,a="style."+t,o="end."+a,l;return function(){var c=jo(this,e),f=c.on,h=c.value[a]==null?l||(l=KV(t)):void 0;(f!==n||i!==h)&&(r=(n=f).copy()).on(o,i=h),c.on=r}}function TOe(e,t,n){var r=(e+="")=="transform"?tve:VV;return t==null?this.styleTween(e,kOe(e,r)).on("end.style."+e,KV(e)):typeof t=="function"?this.styleTween(e,AOe(e,r,LO(this,"style."+e,t))).each(OOe(this._id,e)):this.styleTween(e,NOe(e,r,t),n).on("end.style."+e,null)}function POe(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function MOe(e,t,n){var r,i;function a(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&POe(e,o,n)),r}return a._value=t,a}function DOe(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,MOe(e,t,n??""))}function ROe(e){return function(){this.textContent=e}}function IOe(e){return function(){var t=e(this);this.textContent=t??""}}function LOe(e){return this.tween("text",typeof e=="function"?IOe(LO(this,"text",e)):ROe(e==null?"":e+""))}function zOe(e){return function(t){this.textContent=e.call(this,t)}}function $Oe(e){var t,n;function r(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&zOe(i)),t}return r._value=e,r}function BOe(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,$Oe(e))}function FOe(){for(var e=this._name,t=this._id,n=YV(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],l=o.length,c,f=0;f<l;++f)if(c=o[f]){var h=qa(c,t);Ib(c,e,n,f,o,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new xs(r,this._parents,e,n)}function UOe(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(a,o){var l={value:o},c={value:function(){--i===0&&a()}};n.each(function(){var f=jo(this,r),h=f.on;h!==e&&(t=(e=h).copy(),t._.cancel.push(l),t._.interrupt.push(l),t._.end.push(c)),f.on=t}),i===0&&a()})}var HOe=0;function xs(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function YV(){return++HOe}var Ko=ag.prototype;xs.prototype={constructor:xs,select:EOe,selectAll:jOe,selectChild:Ko.selectChild,selectChildren:Ko.selectChildren,filter:gOe,merge:vOe,selection:COe,transition:FOe,call:Ko.call,nodes:Ko.nodes,node:Ko.node,size:Ko.size,empty:Ko.empty,each:Ko.each,on:bOe,attr:eOe,attrTween:aOe,style:TOe,styleTween:DOe,text:LOe,textTween:BOe,remove:SOe,tween:YAe,delay:lOe,duration:fOe,ease:hOe,easeVarying:pOe,end:UOe,[Symbol.iterator]:Ko[Symbol.iterator]};function qOe(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var VOe={time:null,delay:0,duration:250,ease:qOe};function KOe(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function YOe(e){var t,n;e instanceof xs?(t=e._id,e=e._name):(t=YV(),(n=VOe).time=RO(),e=e==null?null:e+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],l=o.length,c,f=0;f<l;++f)(c=o[f])&&Ib(c,e,t,f,o,n||KOe(c,t));return new xs(r,this._parents,e,t)}ag.prototype.interrupt=qAe;ag.prototype.transition=YOe;const sy=e=>()=>e;function XOe(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function ns(e,t,n){this.k=e,this.x=t,this.y=n}ns.prototype={constructor:ns,scale:function(e){return e===1?this:new ns(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new ns(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Lb=new ns(1,0,0);XV.prototype=ns.prototype;function XV(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Lb;return e.__zoom}function gj(e){e.stopImmediatePropagation()}function cm(e){e.preventDefault(),e.stopImmediatePropagation()}function GOe(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function WOe(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function C4(){return this.__zoom||Lb}function QOe(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function ZOe(){return navigator.maxTouchPoints||"ontouchstart"in this}function JOe(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],a=e.invertY(t[0][1])-n[0][1],o=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}function GV(){var e=GOe,t=WOe,n=JOe,r=QOe,i=ZOe,a=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],l=250,c=Ny,f=Mb("start","zoom","end"),h,d,g,v=500,b=150,w=0,S=10;function E(L){L.property("__zoom",C4).on("wheel.zoom",P,{passive:!1}).on("mousedown.zoom",I).on("dblclick.zoom",z).filter(i).on("touchstart.zoom",F).on("touchmove.zoom",B).on("touchend.zoom touchcancel.zoom",G).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}E.transform=function(L,V,D,q){var X=L.selection?L.selection():L;X.property("__zoom",C4),L!==X?O(L,V,D,q):X.interrupt().each(function(){A(this,arguments).event(q).start().zoom(null,typeof V=="function"?V.apply(this,arguments):V).end()})},E.scaleBy=function(L,V,D,q){E.scaleTo(L,function(){var X=this.__zoom.k,K=typeof V=="function"?V.apply(this,arguments):V;return X*K},D,q)},E.scaleTo=function(L,V,D,q){E.transform(L,function(){var X=t.apply(this,arguments),K=this.__zoom,R=D==null?N(X):typeof D=="function"?D.apply(this,arguments):D,H=K.invert(R),U=typeof V=="function"?V.apply(this,arguments):V;return n(_(C(K,U),R,H),X,o)},D,q)},E.translateBy=function(L,V,D,q){E.transform(L,function(){return n(this.__zoom.translate(typeof V=="function"?V.apply(this,arguments):V,typeof D=="function"?D.apply(this,arguments):D),t.apply(this,arguments),o)},null,q)},E.translateTo=function(L,V,D,q,X){E.transform(L,function(){var K=t.apply(this,arguments),R=this.__zoom,H=q==null?N(K):typeof q=="function"?q.apply(this,arguments):q;return n(Lb.translate(H[0],H[1]).scale(R.k).translate(typeof V=="function"?-V.apply(this,arguments):-V,typeof D=="function"?-D.apply(this,arguments):-D),K,o)},q,X)};function C(L,V){return V=Math.max(a[0],Math.min(a[1],V)),V===L.k?L:new ns(V,L.x,L.y)}function _(L,V,D){var q=V[0]-D[0]*L.k,X=V[1]-D[1]*L.k;return q===L.x&&X===L.y?L:new ns(L.k,q,X)}function N(L){return[(+L[0][0]+ +L[1][0])/2,(+L[0][1]+ +L[1][1])/2]}function O(L,V,D,q){L.on("start.zoom",function(){A(this,arguments).event(q).start()}).on("interrupt.zoom end.zoom",function(){A(this,arguments).event(q).end()}).tween("zoom",function(){var X=this,K=arguments,R=A(X,K).event(q),H=t.apply(X,K),U=D==null?N(H):typeof D=="function"?D.apply(X,K):D,$=Math.max(H[1][0]-H[0][0],H[1][1]-H[0][1]),Q=X.__zoom,J=typeof V=="function"?V.apply(X,K):V,ne=c(Q.invert(U).concat($/Q.k),J.invert(U).concat($/J.k));return function(ae){if(ae===1)ae=J;else{var ie=ne(ae),ee=$/ie[2];ae=new ns(ee,U[0]-ie[0]*ee,U[1]-ie[1]*ee)}R.zoom(null,ae)}})}function A(L,V,D){return!D&&L.__zooming||new T(L,V)}function T(L,V){this.that=L,this.args=V,this.active=0,this.sourceEvent=null,this.extent=t.apply(L,V),this.taps=0}T.prototype={event:function(L){return L&&(this.sourceEvent=L),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(L,V){return this.mouse&&L!=="mouse"&&(this.mouse[1]=V.invert(this.mouse[0])),this.touch0&&L!=="touch"&&(this.touch0[1]=V.invert(this.touch0[0])),this.touch1&&L!=="touch"&&(this.touch1[1]=V.invert(this.touch1[0])),this.that.__zoom=V,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(L){var V=Mi(this.that).datum();f.call(L,this.that,new XOe(L,{sourceEvent:this.sourceEvent,target:E,transform:this.that.__zoom,dispatch:f}),V)}};function P(L,...V){if(!e.apply(this,arguments))return;var D=A(this,V).event(L),q=this.__zoom,X=Math.max(a[0],Math.min(a[1],q.k*Math.pow(2,r.apply(this,arguments)))),K=_a(L);if(D.wheel)(D.mouse[0][0]!==K[0]||D.mouse[0][1]!==K[1])&&(D.mouse[1]=q.invert(D.mouse[0]=K)),clearTimeout(D.wheel);else{if(q.k===X)return;D.mouse=[K,q.invert(K)],Dy(this),D.start()}cm(L),D.wheel=setTimeout(R,b),D.zoom("mouse",n(_(C(q,X),D.mouse[0],D.mouse[1]),D.extent,o));function R(){D.wheel=null,D.end()}}function I(L,...V){if(g||!e.apply(this,arguments))return;var D=L.currentTarget,q=A(this,V,!0).event(L),X=Mi(L.view).on("mousemove.zoom",U,!0).on("mouseup.zoom",$,!0),K=_a(L,D),R=L.clientX,H=L.clientY;zV(L.view),gj(L),q.mouse=[K,this.__zoom.invert(K)],Dy(this),q.start();function U(Q){if(cm(Q),!q.moved){var J=Q.clientX-R,ne=Q.clientY-H;q.moved=J*J+ne*ne>w}q.event(Q).zoom("mouse",n(_(q.that.__zoom,q.mouse[0]=_a(Q,D),q.mouse[1]),q.extent,o))}function $(Q){X.on("mousemove.zoom mouseup.zoom",null),$V(Q.view,q.moved),cm(Q),q.event(Q).end()}}function z(L,...V){if(e.apply(this,arguments)){var D=this.__zoom,q=_a(L.changedTouches?L.changedTouches[0]:L,this),X=D.invert(q),K=D.k*(L.shiftKey?.5:2),R=n(_(C(D,K),q,X),t.apply(this,V),o);cm(L),l>0?Mi(this).transition().duration(l).call(O,R,q,L):Mi(this).call(E.transform,R,q,L)}}function F(L,...V){if(e.apply(this,arguments)){var D=L.touches,q=D.length,X=A(this,V,L.changedTouches.length===q).event(L),K,R,H,U;for(gj(L),R=0;R<q;++R)H=D[R],U=_a(H,this),U=[U,this.__zoom.invert(U),H.identifier],X.touch0?!X.touch1&&X.touch0[2]!==U[2]&&(X.touch1=U,X.taps=0):(X.touch0=U,K=!0,X.taps=1+!!h);h&&(h=clearTimeout(h)),K&&(X.taps<2&&(d=U[0],h=setTimeout(function(){h=null},v)),Dy(this),X.start())}}function B(L,...V){if(this.__zooming){var D=A(this,V).event(L),q=L.changedTouches,X=q.length,K,R,H,U;for(cm(L),K=0;K<X;++K)R=q[K],H=_a(R,this),D.touch0&&D.touch0[2]===R.identifier?D.touch0[0]=H:D.touch1&&D.touch1[2]===R.identifier&&(D.touch1[0]=H);if(R=D.that.__zoom,D.touch1){var $=D.touch0[0],Q=D.touch0[1],J=D.touch1[0],ne=D.touch1[1],ae=(ae=J[0]-$[0])*ae+(ae=J[1]-$[1])*ae,ie=(ie=ne[0]-Q[0])*ie+(ie=ne[1]-Q[1])*ie;R=C(R,Math.sqrt(ae/ie)),H=[($[0]+J[0])/2,($[1]+J[1])/2],U=[(Q[0]+ne[0])/2,(Q[1]+ne[1])/2]}else if(D.touch0)H=D.touch0[0],U=D.touch0[1];else return;D.zoom("touch",n(_(R,H,U),D.extent,o))}}function G(L,...V){if(this.__zooming){var D=A(this,V).event(L),q=L.changedTouches,X=q.length,K,R;for(gj(L),g&&clearTimeout(g),g=setTimeout(function(){g=null},v),K=0;K<X;++K)R=q[K],D.touch0&&D.touch0[2]===R.identifier?delete D.touch0:D.touch1&&D.touch1[2]===R.identifier&&delete D.touch1;if(D.touch1&&!D.touch0&&(D.touch0=D.touch1,delete D.touch1),D.touch0)D.touch0[1]=this.__zoom.invert(D.touch0[0]);else if(D.end(),D.taps===2&&(R=_a(R,this),Math.hypot(d[0]-R[0],d[1]-R[1])<S)){var H=Mi(this).on("dblclick.zoom");H&&H.apply(this,arguments)}}}return E.wheelDelta=function(L){return arguments.length?(r=typeof L=="function"?L:sy(+L),E):r},E.filter=function(L){return arguments.length?(e=typeof L=="function"?L:sy(!!L),E):e},E.touchable=function(L){return arguments.length?(i=typeof L=="function"?L:sy(!!L),E):i},E.extent=function(L){return arguments.length?(t=typeof L=="function"?L:sy([[+L[0][0],+L[0][1]],[+L[1][0],+L[1][1]]]),E):t},E.scaleExtent=function(L){return arguments.length?(a[0]=+L[0],a[1]=+L[1],E):[a[0],a[1]]},E.translateExtent=function(L){return arguments.length?(o[0][0]=+L[0][0],o[1][0]=+L[1][0],o[0][1]=+L[0][1],o[1][1]=+L[1][1],E):[[o[0][0],o[0][1]],[o[1][0],o[1][1]]]},E.constrain=function(L){return arguments.length?(n=L,E):n},E.duration=function(L){return arguments.length?(l=+L,E):l},E.interpolate=function(L){return arguments.length?(c=L,E):c},E.on=function(){var L=f.on.apply(f,arguments);return L===f?E:L},E.clickDistance=function(L){return arguments.length?(w=(L=+L)*L,E):Math.sqrt(w)},E.tapDistance=function(L){return arguments.length?(S=+L,E):S},E}const bo={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:r})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:r}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."},np=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],WV=["Enter"," ","Escape"],QV={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var jd;(function(e){e.Strict="strict",e.Loose="loose"})(jd||(jd={}));var rc;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(rc||(rc={}));var rp;(function(e){e.Partial="partial",e.Full="full"})(rp||(rp={}));const ZV={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var El;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(El||(El={}));var _d;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(_d||(_d={}));var qe;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(qe||(qe={}));const k4={[qe.Left]:qe.Right,[qe.Right]:qe.Left,[qe.Top]:qe.Bottom,[qe.Bottom]:qe.Top};function JV(e){return e===null?null:e?"valid":"invalid"}const eK=e=>"id"in e&&"source"in e&&"target"in e,eTe=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),zO=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),og=(e,t=[0,0])=>{const{width:n,height:r}=Ms(e),i=e.origin??t,a=n*i[0],o=r*i[1];return{x:e.position.x-a,y:e.position.y-o}},tTe=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((r,i)=>{const a=typeof i=="string";let o=!t.nodeLookup&&!a?i:void 0;t.nodeLookup&&(o=a?t.nodeLookup.get(i):zO(i)?i:t.nodeLookup.get(i.id));const l=o?Zx(o,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return zb(r,l)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return $b(n)},sg=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return e.forEach(i=>{(t.filter===void 0||t.filter(i))&&(n=zb(n,Zx(i)),r=!0)}),r?$b(n):{x:0,y:0,width:0,height:0}},$O=(e,t,[n,r,i]=[0,0,1],a=!1,o=!1)=>{const l={...ug(t,[n,r,i]),width:t.width/i,height:t.height/i},c=[];for(const f of e.values()){const{measured:h,selectable:d=!0,hidden:g=!1}=f;if(o&&!d||g)continue;const v=h.width??f.width??f.initialWidth??null,b=h.height??f.height??f.initialHeight??null,w=ip(l,kd(f)),S=(v??0)*(b??0),E=a&&w>0;(!f.internals.handleBounds||E||w>=S||f.dragging)&&c.push(f)}return c},nTe=(e,t)=>{const n=new Set;return e.forEach(r=>{n.add(r.id)}),t.filter(r=>n.has(r.source)||n.has(r.target))};function rTe(e,t){const n=new Map,r=t!=null&&t.nodes?new Set(t.nodes.map(i=>i.id)):null;return e.forEach(i=>{i.measured.width&&i.measured.height&&((t==null?void 0:t.includeHiddenNodes)||!i.hidden)&&(!r||r.has(i.id))&&n.set(i.id,i)}),n}async function iTe({nodes:e,width:t,height:n,panZoom:r,minZoom:i,maxZoom:a},o){if(e.size===0)return Promise.resolve(!0);const l=rTe(e,o),c=sg(l),f=BO(c,t,n,(o==null?void 0:o.minZoom)??i,(o==null?void 0:o.maxZoom)??a,(o==null?void 0:o.padding)??.1);return await r.setViewport(f,{duration:o==null?void 0:o.duration,ease:o==null?void 0:o.ease,interpolate:o==null?void 0:o.interpolate}),Promise.resolve(!0)}function tK({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:r=[0,0],nodeExtent:i,onError:a}){const o=n.get(e),l=o.parentId?n.get(o.parentId):void 0,{x:c,y:f}=l?l.internals.positionAbsolute:{x:0,y:0},h=o.origin??r;let d=o.extent||i;if(o.extent==="parent"&&!o.expandParent)if(!l)a==null||a("005",bo.error005());else{const v=l.measured.width,b=l.measured.height;v&&b&&(d=[[c,f],[c+v,f+b]])}else l&&Nd(o.extent)&&(d=[[o.extent[0][0]+c,o.extent[0][1]+f],[o.extent[1][0]+c,o.extent[1][1]+f]]);const g=Nd(d)?jc(t,d,o.measured):t;return(o.measured.width===void 0||o.measured.height===void 0)&&(a==null||a("015",bo.error015())),{position:{x:g.x-c+(o.measured.width??0)*h[0],y:g.y-f+(o.measured.height??0)*h[1]},positionAbsolute:g}}async function aTe({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:r,onBeforeDelete:i}){const a=new Set(e.map(g=>g.id)),o=[];for(const g of n){if(g.deletable===!1)continue;const v=a.has(g.id),b=!v&&g.parentId&&o.find(w=>w.id===g.parentId);(v||b)&&o.push(g)}const l=new Set(t.map(g=>g.id)),c=r.filter(g=>g.deletable!==!1),h=nTe(o,c);for(const g of c)l.has(g.id)&&!h.find(b=>b.id===g.id)&&h.push(g);if(!i)return{edges:h,nodes:o};const d=await i({nodes:o,edges:h});return typeof d=="boolean"?d?{edges:h,nodes:o}:{edges:[],nodes:[]}:d}const Cd=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),jc=(e={x:0,y:0},t,n)=>({x:Cd(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:Cd(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function nK(e,t,n){const{width:r,height:i}=Ms(n),{x:a,y:o}=n.internals.positionAbsolute;return jc(e,[[a,o],[a+r,o+i]],t)}const N4=(e,t,n)=>e<t?Cd(Math.abs(e-t),1,t)/t:e>n?-Cd(Math.abs(e-n),1,t)/t:0,rK=(e,t,n=15,r=40)=>{const i=N4(e.x,r,t.width-r)*n,a=N4(e.y,r,t.height-r)*n;return[i,a]},zb=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),BC=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),$b=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),kd=(e,t=[0,0])=>{var i,a;const{x:n,y:r}=zO(e)?e.internals.positionAbsolute:og(e,t);return{x:n,y:r,width:((i=e.measured)==null?void 0:i.width)??e.width??e.initialWidth??0,height:((a=e.measured)==null?void 0:a.height)??e.height??e.initialHeight??0}},Zx=(e,t=[0,0])=>{var i,a;const{x:n,y:r}=zO(e)?e.internals.positionAbsolute:og(e,t);return{x:n,y:r,x2:n+(((i=e.measured)==null?void 0:i.width)??e.width??e.initialWidth??0),y2:r+(((a=e.measured)==null?void 0:a.height)??e.height??e.initialHeight??0)}},iK=(e,t)=>$b(zb(BC(e),BC(t))),ip=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),r=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*r)},A4=e=>Oa(e.width)&&Oa(e.height)&&Oa(e.x)&&Oa(e.y),Oa=e=>!isNaN(e)&&isFinite(e),oTe=(e,t)=>{},lg=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),ug=({x:e,y:t},[n,r,i],a=!1,o=[1,1])=>{const l={x:(e-n)/i,y:(t-r)/i};return a?lg(l,o):l},Jx=({x:e,y:t},[n,r,i])=>({x:e*i+n,y:t*i+r});function Af(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function sTe(e,t,n){if(typeof e=="string"||typeof e=="number"){const r=Af(e,n),i=Af(e,t);return{top:r,right:i,bottom:r,left:i,x:i*2,y:r*2}}if(typeof e=="object"){const r=Af(e.top??e.y??0,n),i=Af(e.bottom??e.y??0,n),a=Af(e.left??e.x??0,t),o=Af(e.right??e.x??0,t);return{top:r,right:o,bottom:i,left:a,x:a+o,y:r+i}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function lTe(e,t,n,r,i,a){const{x:o,y:l}=Jx(e,[t,n,r]),{x:c,y:f}=Jx({x:e.x+e.width,y:e.y+e.height},[t,n,r]),h=i-c,d=a-f;return{left:Math.floor(o),top:Math.floor(l),right:Math.floor(h),bottom:Math.floor(d)}}const BO=(e,t,n,r,i,a)=>{const o=sTe(a,t,n),l=(t-o.x)/e.width,c=(n-o.y)/e.height,f=Math.min(l,c),h=Cd(f,r,i),d=e.x+e.width/2,g=e.y+e.height/2,v=t/2-d*h,b=n/2-g*h,w=lTe(e,v,b,h,t,n),S={left:Math.min(w.left-o.left,0),top:Math.min(w.top-o.top,0),right:Math.min(w.right-o.right,0),bottom:Math.min(w.bottom-o.bottom,0)};return{x:v-S.left+S.right,y:b-S.top+S.bottom,zoom:h}},ap=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function Nd(e){return e!=null&&e!=="parent"}function Ms(e){var t,n;return{width:((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth??0,height:((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight??0}}function aK(e){var t,n;return(((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth)!==void 0&&(((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight)!==void 0}function oK(e,t={width:0,height:0},n,r,i){const a={...e},o=r.get(n);if(o){const l=o.origin||i;a.x+=o.internals.positionAbsolute.x-(t.width??0)*l[0],a.y+=o.internals.positionAbsolute.y-(t.height??0)*l[1]}return a}function O4(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function uTe(){let e,t;return{promise:new Promise((r,i)=>{e=r,t=i}),resolve:e,reject:t}}function cTe(e){return{...QV,...e||{}}}function _m(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:i}){const{x:a,y:o}=Ta(e),l=ug({x:a-((i==null?void 0:i.left)??0),y:o-((i==null?void 0:i.top)??0)},r),{x:c,y:f}=n?lg(l,t):l;return{xSnapped:c,ySnapped:f,...l}}const FO=e=>({width:e.offsetWidth,height:e.offsetHeight}),sK=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},fTe=["INPUT","SELECT","TEXTAREA"];function lK(e){var r,i;const t=((i=(r=e.composedPath)==null?void 0:r.call(e))==null?void 0:i[0])||e.target;return(t==null?void 0:t.nodeType)!==1?!1:fTe.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const uK=e=>"clientX"in e,Ta=(e,t)=>{var a,o;const n=uK(e),r=n?e.clientX:(a=e.touches)==null?void 0:a[0].clientX,i=n?e.clientY:(o=e.touches)==null?void 0:o[0].clientY;return{x:r-((t==null?void 0:t.left)??0),y:i-((t==null?void 0:t.top)??0)}},T4=(e,t,n,r,i)=>{const a=t.querySelectorAll(`.${e}`);return!a||!a.length?null:Array.from(a).map(o=>{const l=o.getBoundingClientRect();return{id:o.getAttribute("data-handleid"),type:e,nodeId:i,position:o.getAttribute("data-handlepos"),x:(l.left-n.left)/r,y:(l.top-n.top)/r,...FO(o)}})};function cK({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:i,sourceControlY:a,targetControlX:o,targetControlY:l}){const c=e*.125+i*.375+o*.375+n*.125,f=t*.125+a*.375+l*.375+r*.125,h=Math.abs(c-e),d=Math.abs(f-t);return[c,f,h,d]}function ly(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function P4({pos:e,x1:t,y1:n,x2:r,y2:i,c:a}){switch(e){case qe.Left:return[t-ly(t-r,a),n];case qe.Right:return[t+ly(r-t,a),n];case qe.Top:return[t,n-ly(n-i,a)];case qe.Bottom:return[t,n+ly(i-n,a)]}}function fK({sourceX:e,sourceY:t,sourcePosition:n=qe.Bottom,targetX:r,targetY:i,targetPosition:a=qe.Top,curvature:o=.25}){const[l,c]=P4({pos:n,x1:e,y1:t,x2:r,y2:i,c:o}),[f,h]=P4({pos:a,x1:r,y1:i,x2:e,y2:t,c:o}),[d,g,v,b]=cK({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:l,sourceControlY:c,targetControlX:f,targetControlY:h});return[`M${e},${t} C${l},${c} ${f},${h} ${r},${i}`,d,g,v,b]}function dK({sourceX:e,sourceY:t,targetX:n,targetY:r}){const i=Math.abs(n-e)/2,a=n<e?n+i:n-i,o=Math.abs(r-t)/2,l=r<t?r+o:r-o;return[a,l,i,o]}function dTe({sourceNode:e,targetNode:t,selected:n=!1,zIndex:r=0,elevateOnSelect:i=!1,zIndexMode:a="basic"}){if(a==="manual")return r;const o=i&&n?r+1e3:r,l=Math.max(e.parentId||i&&e.selected?e.internals.z:0,t.parentId||i&&t.selected?t.internals.z:0);return o+l}function hTe({sourceNode:e,targetNode:t,width:n,height:r,transform:i}){const a=zb(Zx(e),Zx(t));a.x===a.x2&&(a.x2+=1),a.y===a.y2&&(a.y2+=1);const o={x:-i[0]/i[2],y:-i[1]/i[2],width:n/i[2],height:r/i[2]};return ip(o,$b(a))>0}const mTe=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||""}-${n}${r||""}`,pTe=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),gTe=(e,t,n={})=>{if(!e.source||!e.target)return t;const r=n.getEdgeId||mTe;let i;return eK(e)?i={...e}:i={...e,id:r(e)},pTe(i,t)?t:(i.sourceHandle===null&&delete i.sourceHandle,i.targetHandle===null&&delete i.targetHandle,t.concat(i))};function hK({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[i,a,o,l]=dK({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,i,a,o,l]}const M4={[qe.Left]:{x:-1,y:0},[qe.Right]:{x:1,y:0},[qe.Top]:{x:0,y:-1},[qe.Bottom]:{x:0,y:1}},vTe=({source:e,sourcePosition:t=qe.Bottom,target:n})=>t===qe.Left||t===qe.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},D4=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function yTe({source:e,sourcePosition:t=qe.Bottom,target:n,targetPosition:r=qe.Top,center:i,offset:a,stepPosition:o}){const l=M4[t],c=M4[r],f={x:e.x+l.x*a,y:e.y+l.y*a},h={x:n.x+c.x*a,y:n.y+c.y*a},d=vTe({source:f,sourcePosition:t,target:h}),g=d.x!==0?"x":"y",v=d[g];let b=[],w,S;const E={x:0,y:0},C={x:0,y:0},[,,_,N]=dK({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(l[g]*c[g]===-1){g==="x"?(w=i.x??f.x+(h.x-f.x)*o,S=i.y??(f.y+h.y)/2):(w=i.x??(f.x+h.x)/2,S=i.y??f.y+(h.y-f.y)*o);const A=[{x:w,y:f.y},{x:w,y:h.y}],T=[{x:f.x,y:S},{x:h.x,y:S}];l[g]===v?b=g==="x"?A:T:b=g==="x"?T:A}else{const A=[{x:f.x,y:h.y}],T=[{x:h.x,y:f.y}];if(g==="x"?b=l.x===v?T:A:b=l.y===v?A:T,t===r){const B=Math.abs(e[g]-n[g]);if(B<=a){const G=Math.min(a-1,a-B);l[g]===v?E[g]=(f[g]>e[g]?-1:1)*G:C[g]=(h[g]>n[g]?-1:1)*G}}if(t!==r){const B=g==="x"?"y":"x",G=l[g]===c[B],L=f[B]>h[B],V=f[B]<h[B];(l[g]===1&&(!G&&L||G&&V)||l[g]!==1&&(!G&&V||G&&L))&&(b=g==="x"?A:T)}const P={x:f.x+E.x,y:f.y+E.y},I={x:h.x+C.x,y:h.y+C.y},z=Math.max(Math.abs(P.x-b[0].x),Math.abs(I.x-b[0].x)),F=Math.max(Math.abs(P.y-b[0].y),Math.abs(I.y-b[0].y));z>=F?(w=(P.x+I.x)/2,S=b[0].y):(w=b[0].x,S=(P.y+I.y)/2)}return[[e,{x:f.x+E.x,y:f.y+E.y},...b,{x:h.x+C.x,y:h.y+C.y},n],w,S,_,N]}function xTe(e,t,n,r){const i=Math.min(D4(e,t)/2,D4(t,n)/2,r),{x:a,y:o}=t;if(e.x===a&&a===n.x||e.y===o&&o===n.y)return`L${a} ${o}`;if(e.y===o){const f=e.x<n.x?-1:1,h=e.y<n.y?1:-1;return`L ${a+i*f},${o}Q ${a},${o} ${a},${o+i*h}`}const l=e.x<n.x?1:-1,c=e.y<n.y?-1:1;return`L ${a},${o+i*c}Q ${a},${o} ${a+i*l},${o}`}function FC({sourceX:e,sourceY:t,sourcePosition:n=qe.Bottom,targetX:r,targetY:i,targetPosition:a=qe.Top,borderRadius:o=5,centerX:l,centerY:c,offset:f=20,stepPosition:h=.5}){const[d,g,v,b,w]=yTe({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:i},targetPosition:a,center:{x:l,y:c},offset:f,stepPosition:h});return[d.reduce((E,C,_)=>{let N="";return _>0&&_<d.length-1?N=xTe(d[_-1],C,d[_+1],o):N=`${_===0?"M":"L"}${C.x} ${C.y}`,E+=N,E},""),g,v,b,w]}function R4(e){var t;return e&&!!(e.internals.handleBounds||(t=e.handles)!=null&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function bTe(e){var d;const{sourceNode:t,targetNode:n}=e;if(!R4(t)||!R4(n))return null;const r=t.internals.handleBounds||I4(t.handles),i=n.internals.handleBounds||I4(n.handles),a=L4((r==null?void 0:r.source)??[],e.sourceHandle),o=L4(e.connectionMode===jd.Strict?(i==null?void 0:i.target)??[]:((i==null?void 0:i.target)??[]).concat((i==null?void 0:i.source)??[]),e.targetHandle);if(!a||!o)return(d=e.onError)==null||d.call(e,"008",bo.error008(a?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const l=(a==null?void 0:a.position)||qe.Bottom,c=(o==null?void 0:o.position)||qe.Top,f=_c(t,a,l),h=_c(n,o,c);return{sourceX:f.x,sourceY:f.y,targetX:h.x,targetY:h.y,sourcePosition:l,targetPosition:c}}function I4(e){if(!e)return null;const t=[],n=[];for(const r of e)r.width=r.width??1,r.height=r.height??1,r.type==="source"?t.push(r):r.type==="target"&&n.push(r);return{source:t,target:n}}function _c(e,t,n=qe.Left,r=!1){const i=((t==null?void 0:t.x)??0)+e.internals.positionAbsolute.x,a=((t==null?void 0:t.y)??0)+e.internals.positionAbsolute.y,{width:o,height:l}=t??Ms(e);if(r)return{x:i+o/2,y:a+l/2};switch((t==null?void 0:t.position)??n){case qe.Top:return{x:i+o/2,y:a};case qe.Right:return{x:i+o,y:a+l/2};case qe.Bottom:return{x:i+o/2,y:a+l};case qe.Left:return{x:i,y:a+l/2}}}function L4(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function UC(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function wTe(e,{id:t,defaultColor:n,defaultMarkerStart:r,defaultMarkerEnd:i}){const a=new Set;return e.reduce((o,l)=>([l.markerStart||r,l.markerEnd||i].forEach(c=>{if(c&&typeof c=="object"){const f=UC(c,t);a.has(f)||(o.push({id:f,color:c.color||n,...c}),a.add(f))}}),o),[]).sort((o,l)=>o.id.localeCompare(l.id))}const mK=1e3,STe=10,UO={nodeOrigin:[0,0],nodeExtent:np,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},ETe={...UO,checkEquality:!0};function HO(e,t){const n={...e};for(const r in t)t[r]!==void 0&&(n[r]=t[r]);return n}function jTe(e,t,n){const r=HO(UO,n);for(const i of e.values())if(i.parentId)VO(i,e,t,r);else{const a=og(i,r.nodeOrigin),o=Nd(i.extent)?i.extent:r.nodeExtent,l=jc(a,o,Ms(i));i.internals.positionAbsolute=l}}function _Te(e,t){if(!e.handles)return e.measured?t==null?void 0:t.internals.handleBounds:void 0;const n=[],r=[];for(const i of e.handles){const a={id:i.id,width:i.width??1,height:i.height??1,nodeId:e.id,x:i.x,y:i.y,position:i.position,type:i.type};i.type==="source"?n.push(a):i.type==="target"&&r.push(a)}return{source:n,target:r}}function qO(e){return e==="manual"}function HC(e,t,n,r={}){var f,h;const i=HO(ETe,r),a={i:0},o=new Map(t),l=i!=null&&i.elevateNodesOnSelect&&!qO(i.zIndexMode)?mK:0;let c=e.length>0;t.clear(),n.clear();for(const d of e){let g=o.get(d.id);if(i.checkEquality&&d===(g==null?void 0:g.internals.userNode))t.set(d.id,g);else{const v=og(d,i.nodeOrigin),b=Nd(d.extent)?d.extent:i.nodeExtent,w=jc(v,b,Ms(d));g={...i.defaults,...d,measured:{width:(f=d.measured)==null?void 0:f.width,height:(h=d.measured)==null?void 0:h.height},internals:{positionAbsolute:w,handleBounds:_Te(d,g),z:pK(d,l,i.zIndexMode),userNode:d}},t.set(d.id,g)}(g.measured===void 0||g.measured.width===void 0||g.measured.height===void 0)&&!g.hidden&&(c=!1),d.parentId&&VO(g,t,n,r,a)}return c}function CTe(e,t){if(!e.parentId)return;const n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function VO(e,t,n,r,i){const{elevateNodesOnSelect:a,nodeOrigin:o,nodeExtent:l,zIndexMode:c}=HO(UO,r),f=e.parentId,h=t.get(f);if(!h){console.warn(`Parent node ${f} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}CTe(e,n),i&&!h.parentId&&h.internals.rootParentIndex===void 0&&c==="auto"&&(h.internals.rootParentIndex=++i.i,h.internals.z=h.internals.z+i.i*STe),i&&h.internals.rootParentIndex!==void 0&&(i.i=h.internals.rootParentIndex);const d=a&&!qO(c)?mK:0,{x:g,y:v,z:b}=kTe(e,h,o,l,d,c),{positionAbsolute:w}=e.internals,S=g!==w.x||v!==w.y;(S||b!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:S?{x:g,y:v}:w,z:b}})}function pK(e,t,n){const r=Oa(e.zIndex)?e.zIndex:0;return qO(n)?r:r+(e.selected?t:0)}function kTe(e,t,n,r,i,a){const{x:o,y:l}=t.internals.positionAbsolute,c=Ms(e),f=og(e,n),h=Nd(e.extent)?jc(f,e.extent,c):f;let d=jc({x:o+h.x,y:l+h.y},r,c);e.extent==="parent"&&(d=nK(d,c,t));const g=pK(e,i,a),v=t.internals.z??0;return{x:d.x,y:d.y,z:v>=g?v+1:g}}function KO(e,t,n,r=[0,0]){var o;const i=[],a=new Map;for(const l of e){const c=t.get(l.parentId);if(!c)continue;const f=((o=a.get(l.parentId))==null?void 0:o.expandedRect)??kd(c),h=iK(f,l.rect);a.set(l.parentId,{expandedRect:h,parent:c})}return a.size>0&&a.forEach(({expandedRect:l,parent:c},f)=>{var _;const h=c.internals.positionAbsolute,d=Ms(c),g=c.origin??r,v=l.x<h.x?Math.round(Math.abs(h.x-l.x)):0,b=l.y<h.y?Math.round(Math.abs(h.y-l.y)):0,w=Math.max(d.width,Math.round(l.width)),S=Math.max(d.height,Math.round(l.height)),E=(w-d.width)*g[0],C=(S-d.height)*g[1];(v>0||b>0||E||C)&&(i.push({id:f,type:"position",position:{x:c.position.x-v+E,y:c.position.y-b+C}}),(_=n.get(f))==null||_.forEach(N=>{e.some(O=>O.id===N.id)||i.push({id:N.id,type:"position",position:{x:N.position.x+v,y:N.position.y+b}})})),(d.width<l.width||d.height<l.height||v||b)&&i.push({id:f,type:"dimensions",setAttributes:!0,dimensions:{width:w+(v?g[0]*v-E:0),height:S+(b?g[1]*b-C:0)}})}),i}function NTe(e,t,n,r,i,a,o){const l=r==null?void 0:r.querySelector(".xyflow__viewport");let c=!1;if(!l)return{changes:[],updatedInternals:c};const f=[],h=window.getComputedStyle(l),{m22:d}=new window.DOMMatrixReadOnly(h.transform),g=[];for(const v of e.values()){const b=t.get(v.id);if(!b)continue;if(b.hidden){t.set(b.id,{...b,internals:{...b.internals,handleBounds:void 0}}),c=!0;continue}const w=FO(v.nodeElement),S=b.measured.width!==w.width||b.measured.height!==w.height;if(!!(w.width&&w.height&&(S||!b.internals.handleBounds||v.force))){const C=v.nodeElement.getBoundingClientRect(),_=Nd(b.extent)?b.extent:a;let{positionAbsolute:N}=b.internals;b.parentId&&b.extent==="parent"?N=nK(N,w,t.get(b.parentId)):_&&(N=jc(N,_,w));const O={...b,measured:w,internals:{...b.internals,positionAbsolute:N,handleBounds:{source:T4("source",v.nodeElement,C,d,b.id),target:T4("target",v.nodeElement,C,d,b.id)}}};t.set(b.id,O),b.parentId&&VO(O,t,n,{nodeOrigin:i,zIndexMode:o}),c=!0,S&&(f.push({id:b.id,type:"dimensions",dimensions:w}),b.expandParent&&b.parentId&&g.push({id:b.id,parentId:b.parentId,rect:kd(O,i)}))}}if(g.length>0){const v=KO(g,t,n,i);f.push(...v)}return{changes:f,updatedInternals:c}}async function ATe({delta:e,panZoom:t,transform:n,translateExtent:r,width:i,height:a}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);const o=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[i,a]],r),l=!!o&&(o.x!==n[0]||o.y!==n[1]||o.k!==n[2]);return Promise.resolve(l)}function z4(e,t,n,r,i,a){let o=i;const l=r.get(o)||new Map;r.set(o,l.set(n,t)),o=`${i}-${e}`;const c=r.get(o)||new Map;if(r.set(o,c.set(n,t)),a){o=`${i}-${e}-${a}`;const f=r.get(o)||new Map;r.set(o,f.set(n,t))}}function gK(e,t,n){e.clear(),t.clear();for(const r of n){const{source:i,target:a,sourceHandle:o=null,targetHandle:l=null}=r,c={edgeId:r.id,source:i,target:a,sourceHandle:o,targetHandle:l},f=`${i}-${o}--${a}-${l}`,h=`${a}-${l}--${i}-${o}`;z4("source",c,h,e,i,o),z4("target",c,f,e,a,l),t.set(r.id,r)}}function vK(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:vK(n,t):!1}function $4(e,t,n){var i;let r=e;do{if((i=r==null?void 0:r.matches)!=null&&i.call(r,t))return!0;if(r===n)return!1;r=r==null?void 0:r.parentElement}while(r);return!1}function OTe(e,t,n,r){const i=new Map;for(const[a,o]of e)if((o.selected||o.id===r)&&(!o.parentId||!vK(o,e))&&(o.draggable||t&&typeof o.draggable>"u")){const l=e.get(a);l&&i.set(a,{id:a,position:l.position||{x:0,y:0},distance:{x:n.x-l.internals.positionAbsolute.x,y:n.y-l.internals.positionAbsolute.y},extent:l.extent,parentId:l.parentId,origin:l.origin,expandParent:l.expandParent,internals:{positionAbsolute:l.internals.positionAbsolute||{x:0,y:0}},measured:{width:l.measured.width??0,height:l.measured.height??0}})}return i}function vj({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){var o,l,c;const i=[];for(const[f,h]of t){const d=(o=n.get(f))==null?void 0:o.internals.userNode;d&&i.push({...d,position:h.position,dragging:r})}if(!e)return[i[0],i];const a=(l=n.get(e))==null?void 0:l.internals.userNode;return[a?{...a,position:((c=t.get(e))==null?void 0:c.position)||a.position,dragging:r}:i[0],i]}function TTe({dragItems:e,snapGrid:t,x:n,y:r}){const i=e.values().next().value;if(!i)return null;const a={x:n-i.distance.x,y:r-i.distance.y},o=lg(a,t);return{x:o.x-a.x,y:o.y-a.y}}function PTe({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:r,onDragStop:i}){let a={x:null,y:null},o=0,l=new Map,c=!1,f={x:0,y:0},h=null,d=!1,g=null,v=!1,b=!1,w=null;function S({noDragClassName:C,handleSelector:_,domNode:N,isSelectable:O,nodeId:A,nodeClickDistance:T=0}){g=Mi(N);function P({x:B,y:G}){const{nodeLookup:L,nodeExtent:V,snapGrid:D,snapToGrid:q,nodeOrigin:X,onNodeDrag:K,onSelectionDrag:R,onError:H,updateNodePositions:U}=t();a={x:B,y:G};let $=!1;const Q=l.size>1,J=Q&&V?BC(sg(l)):null,ne=Q&&q?TTe({dragItems:l,snapGrid:D,x:B,y:G}):null;for(const[ae,ie]of l){if(!L.has(ae))continue;let ee={x:B-ie.distance.x,y:G-ie.distance.y};q&&(ee=ne?{x:Math.round(ee.x+ne.x),y:Math.round(ee.y+ne.y)}:lg(ee,D));let se=null;if(Q&&V&&!ie.extent&&J){const{positionAbsolute:we}=ie.internals,Ee=we.x-J.x+V[0][0],$e=we.x+ie.measured.width-J.x2+V[1][0],Ne=we.y-J.y+V[0][1],et=we.y+ie.measured.height-J.y2+V[1][1];se=[[Ee,Ne],[$e,et]]}const{position:pe,positionAbsolute:re}=tK({nodeId:ae,nextPosition:ee,nodeLookup:L,nodeExtent:se||V,nodeOrigin:X,onError:H});$=$||ie.position.x!==pe.x||ie.position.y!==pe.y,ie.position=pe,ie.internals.positionAbsolute=re}if(b=b||$,!!$&&(U(l,!0),w&&(r||K||!A&&R))){const[ae,ie]=vj({nodeId:A,dragItems:l,nodeLookup:L});r==null||r(w,l,ae,ie),K==null||K(w,ae,ie),A||R==null||R(w,ie)}}async function I(){if(!h)return;const{transform:B,panBy:G,autoPanSpeed:L,autoPanOnNodeDrag:V}=t();if(!V){c=!1,cancelAnimationFrame(o);return}const[D,q]=rK(f,h,L);(D!==0||q!==0)&&(a.x=(a.x??0)-D/B[2],a.y=(a.y??0)-q/B[2],await G({x:D,y:q})&&P(a)),o=requestAnimationFrame(I)}function z(B){var Q;const{nodeLookup:G,multiSelectionActive:L,nodesDraggable:V,transform:D,snapGrid:q,snapToGrid:X,selectNodesOnDrag:K,onNodeDragStart:R,onSelectionDragStart:H,unselectNodesAndEdges:U}=t();d=!0,(!K||!O)&&!L&&A&&((Q=G.get(A))!=null&&Q.selected||U()),O&&K&&A&&(e==null||e(A));const $=_m(B.sourceEvent,{transform:D,snapGrid:q,snapToGrid:X,containerBounds:h});if(a=$,l=OTe(G,V,$,A),l.size>0&&(n||R||!A&&H)){const[J,ne]=vj({nodeId:A,dragItems:l,nodeLookup:G});n==null||n(B.sourceEvent,l,J,ne),R==null||R(B.sourceEvent,J,ne),A||H==null||H(B.sourceEvent,ne)}}const F=BV().clickDistance(T).on("start",B=>{const{domNode:G,nodeDragThreshold:L,transform:V,snapGrid:D,snapToGrid:q}=t();h=(G==null?void 0:G.getBoundingClientRect())||null,v=!1,b=!1,w=B.sourceEvent,L===0&&z(B),a=_m(B.sourceEvent,{transform:V,snapGrid:D,snapToGrid:q,containerBounds:h}),f=Ta(B.sourceEvent,h)}).on("drag",B=>{const{autoPanOnNodeDrag:G,transform:L,snapGrid:V,snapToGrid:D,nodeDragThreshold:q,nodeLookup:X}=t(),K=_m(B.sourceEvent,{transform:L,snapGrid:V,snapToGrid:D,containerBounds:h});if(w=B.sourceEvent,(B.sourceEvent.type==="touchmove"&&B.sourceEvent.touches.length>1||A&&!X.has(A))&&(v=!0),!v){if(!c&&G&&d&&(c=!0,I()),!d){const R=Ta(B.sourceEvent,h),H=R.x-f.x,U=R.y-f.y;Math.sqrt(H*H+U*U)>q&&z(B)}(a.x!==K.xSnapped||a.y!==K.ySnapped)&&l&&d&&(f=Ta(B.sourceEvent,h),P(K))}}).on("end",B=>{if(!(!d||v)&&(c=!1,d=!1,cancelAnimationFrame(o),l.size>0)){const{nodeLookup:G,updateNodePositions:L,onNodeDragStop:V,onSelectionDragStop:D}=t();if(b&&(L(l,!1),b=!1),i||V||!A&&D){const[q,X]=vj({nodeId:A,dragItems:l,nodeLookup:G,dragging:!1});i==null||i(B.sourceEvent,l,q,X),V==null||V(B.sourceEvent,q,X),A||D==null||D(B.sourceEvent,X)}}}).filter(B=>{const G=B.target;return!B.button&&(!C||!$4(G,`.${C}`,N))&&(!_||$4(G,_,N))});g.call(F)}function E(){g==null||g.on(".drag",null)}return{update:S,destroy:E}}function MTe(e,t,n){const r=[],i={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const a of t.values())ip(i,kd(a))>0&&r.push(a);return r}const DTe=250;function RTe(e,t,n,r){var l,c;let i=[],a=1/0;const o=MTe(e,n,t+DTe);for(const f of o){const h=[...((l=f.internals.handleBounds)==null?void 0:l.source)??[],...((c=f.internals.handleBounds)==null?void 0:c.target)??[]];for(const d of h){if(r.nodeId===d.nodeId&&r.type===d.type&&r.id===d.id)continue;const{x:g,y:v}=_c(f,d,d.position,!0),b=Math.sqrt(Math.pow(g-e.x,2)+Math.pow(v-e.y,2));b>t||(b<a?(i=[{...d,x:g,y:v}],a=b):b===a&&i.push({...d,x:g,y:v}))}}if(!i.length)return null;if(i.length>1){const f=r.type==="source"?"target":"source";return i.find(h=>h.type===f)??i[0]}return i[0]}function yK(e,t,n,r,i,a=!1){var f,h,d;const o=r.get(e);if(!o)return null;const l=i==="strict"?(f=o.internals.handleBounds)==null?void 0:f[t]:[...((h=o.internals.handleBounds)==null?void 0:h.source)??[],...((d=o.internals.handleBounds)==null?void 0:d.target)??[]],c=(n?l==null?void 0:l.find(g=>g.id===n):l==null?void 0:l[0])??null;return c&&a?{...c,..._c(o,c,c.position,!0)}:c}function xK(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function ITe(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const bK=()=>!0;function LTe(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:i,edgeUpdaterType:a,isTarget:o,domNode:l,nodeLookup:c,lib:f,autoPanOnConnect:h,flowId:d,panBy:g,cancelConnection:v,onConnectStart:b,onConnect:w,onConnectEnd:S,isValidConnection:E=bK,onReconnectEnd:C,updateConnection:_,getTransform:N,getFromHandle:O,autoPanSpeed:A,dragThreshold:T=1,handleDomNode:P}){const I=sK(e.target);let z=0,F;const{x:B,y:G}=Ta(e),L=xK(a,P),V=l==null?void 0:l.getBoundingClientRect();let D=!1;if(!V||!L)return;const q=yK(i,L,r,c,t);if(!q)return;let X=Ta(e,V),K=!1,R=null,H=!1,U=null;function $(){if(!h||!V)return;const[pe,re]=rK(X,V,A);g({x:pe,y:re}),z=requestAnimationFrame($)}const Q={...q,nodeId:i,type:L,position:q.position},J=c.get(i);let ae={inProgress:!0,isValid:null,from:_c(J,Q,qe.Left,!0),fromHandle:Q,fromPosition:Q.position,fromNode:J,to:X,toHandle:null,toPosition:k4[Q.position],toNode:null,pointer:X};function ie(){D=!0,_(ae),b==null||b(e,{nodeId:i,handleId:r,handleType:L})}T===0&&ie();function ee(pe){if(!D){const{x:et,y:Xe}=Ta(pe),Ke=et-B,Rt=Xe-G;if(!(Ke*Ke+Rt*Rt>T*T))return;ie()}if(!O()||!Q){se(pe);return}const re=N();X=Ta(pe,V),F=RTe(ug(X,re,!1,[1,1]),n,c,Q),K||($(),K=!0);const we=wK(pe,{handle:F,connectionMode:t,fromNodeId:i,fromHandleId:r,fromType:o?"target":"source",isValidConnection:E,doc:I,lib:f,flowId:d,nodeLookup:c});U=we.handleDomNode,R=we.connection,H=ITe(!!F,we.isValid);const Ee=c.get(i),$e=Ee?_c(Ee,Q,qe.Left,!0):ae.from,Ne={...ae,from:$e,isValid:H,to:we.toHandle&&H?Jx({x:we.toHandle.x,y:we.toHandle.y},re):X,toHandle:we.toHandle,toPosition:H&&we.toHandle?we.toHandle.position:k4[Q.position],toNode:we.toHandle?c.get(we.toHandle.nodeId):null,pointer:X};_(Ne),ae=Ne}function se(pe){if(!("touches"in pe&&pe.touches.length>0)){if(D){(F||U)&&R&&H&&(w==null||w(R));const{inProgress:re,...we}=ae,Ee={...we,toPosition:ae.toHandle?ae.toPosition:null};S==null||S(pe,Ee),a&&(C==null||C(pe,Ee))}v(),cancelAnimationFrame(z),K=!1,H=!1,R=null,U=null,I.removeEventListener("mousemove",ee),I.removeEventListener("mouseup",se),I.removeEventListener("touchmove",ee),I.removeEventListener("touchend",se)}}I.addEventListener("mousemove",ee),I.addEventListener("mouseup",se),I.addEventListener("touchmove",ee),I.addEventListener("touchend",se)}function wK(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:i,fromType:a,doc:o,lib:l,flowId:c,isValidConnection:f=bK,nodeLookup:h}){const d=a==="target",g=t?o.querySelector(`.${l}-flow__handle[data-id="${c}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`):null,{x:v,y:b}=Ta(e),w=o.elementFromPoint(v,b),S=w!=null&&w.classList.contains(`${l}-flow__handle`)?w:g,E={handleDomNode:S,isValid:!1,connection:null,toHandle:null};if(S){const C=xK(void 0,S),_=S.getAttribute("data-nodeid"),N=S.getAttribute("data-handleid"),O=S.classList.contains("connectable"),A=S.classList.contains("connectableend");if(!_||!C)return E;const T={source:d?_:r,sourceHandle:d?N:i,target:d?r:_,targetHandle:d?i:N};E.connection=T;const I=O&&A&&(n===jd.Strict?d&&C==="source"||!d&&C==="target":_!==r||N!==i);E.isValid=I&&f(T),E.toHandle=yK(_,C,N,h,n,!0)}return E}const qC={onPointerDown:LTe,isValid:wK};function zTe({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){const i=Mi(e);function a({translateExtent:l,width:c,height:f,zoomStep:h=1,pannable:d=!0,zoomable:g=!0,inversePan:v=!1}){const b=_=>{if(_.sourceEvent.type!=="wheel"||!t)return;const N=n(),O=_.sourceEvent.ctrlKey&&ap()?10:1,A=-_.sourceEvent.deltaY*(_.sourceEvent.deltaMode===1?.05:_.sourceEvent.deltaMode?1:.002)*h,T=N[2]*Math.pow(2,A*O);t.scaleTo(T)};let w=[0,0];const S=_=>{(_.sourceEvent.type==="mousedown"||_.sourceEvent.type==="touchstart")&&(w=[_.sourceEvent.clientX??_.sourceEvent.touches[0].clientX,_.sourceEvent.clientY??_.sourceEvent.touches[0].clientY])},E=_=>{const N=n();if(_.sourceEvent.type!=="mousemove"&&_.sourceEvent.type!=="touchmove"||!t)return;const O=[_.sourceEvent.clientX??_.sourceEvent.touches[0].clientX,_.sourceEvent.clientY??_.sourceEvent.touches[0].clientY],A=[O[0]-w[0],O[1]-w[1]];w=O;const T=r()*Math.max(N[2],Math.log(N[2]))*(v?-1:1),P={x:N[0]-A[0]*T,y:N[1]-A[1]*T},I=[[0,0],[c,f]];t.setViewportConstrained({x:P.x,y:P.y,zoom:N[2]},I,l)},C=GV().on("start",S).on("zoom",d?E:null).on("zoom.wheel",g?b:null);i.call(C,{})}function o(){i.on("zoom",null)}return{update:a,destroy:o,pointer:_a}}const Bb=e=>({x:e.x,y:e.y,zoom:e.k}),yj=({x:e,y:t,zoom:n})=>Lb.translate(e,t).scale(n),$f=(e,t)=>e.target.closest(`.${t}`),SK=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),$Te=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,xj=(e,t=0,n=$Te,r=()=>{})=>{const i=typeof t=="number"&&t>0;return i||r(),i?e.transition().duration(t).ease(n).on("end",r):e},EK=e=>{const t=e.ctrlKey&&ap()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function BTe({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:i,panOnScrollSpeed:a,zoomOnPinch:o,onPanZoomStart:l,onPanZoom:c,onPanZoomEnd:f}){return h=>{if($f(h,t))return h.ctrlKey&&h.preventDefault(),!1;h.preventDefault(),h.stopImmediatePropagation();const d=n.property("__zoom").k||1;if(h.ctrlKey&&o){const S=_a(h),E=EK(h),C=d*Math.pow(2,E);r.scaleTo(n,C,S,h);return}const g=h.deltaMode===1?20:1;let v=i===rc.Vertical?0:h.deltaX*g,b=i===rc.Horizontal?0:h.deltaY*g;!ap()&&h.shiftKey&&i!==rc.Vertical&&(v=h.deltaY*g,b=0),r.translateBy(n,-(v/d)*a,-(b/d)*a,{internal:!0});const w=Bb(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(c==null||c(h,w),e.panScrollTimeout=setTimeout(()=>{f==null||f(h,w),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,l==null||l(h,w))}}function FTe({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,i){const a=r.type==="wheel",o=!t&&a&&!r.ctrlKey,l=$f(r,e);if(r.ctrlKey&&a&&l&&r.preventDefault(),o||l)return null;r.preventDefault(),n.call(this,r,i)}}function UTe({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{var a,o,l;if((a=r.sourceEvent)!=null&&a.internal)return;const i=Bb(r.transform);e.mouseButton=((o=r.sourceEvent)==null?void 0:o.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=i,((l=r.sourceEvent)==null?void 0:l.type)==="mousedown"&&t(!0),n&&(n==null||n(r.sourceEvent,i))}}function HTe({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:i}){return a=>{var o,l;e.usedRightMouseButton=!!(n&&SK(t,e.mouseButton??0)),(o=a.sourceEvent)!=null&&o.sync||r([a.transform.x,a.transform.y,a.transform.k]),i&&!((l=a.sourceEvent)!=null&&l.internal)&&(i==null||i(a.sourceEvent,Bb(a.transform)))}}function qTe({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:i,onPaneContextMenu:a}){return o=>{var l;if(!((l=o.sourceEvent)!=null&&l.internal)&&(e.isZoomingOrPanning=!1,a&&SK(t,e.mouseButton??0)&&!e.usedRightMouseButton&&o.sourceEvent&&a(o.sourceEvent),e.usedRightMouseButton=!1,r(!1),i)){const c=Bb(o.transform);e.prevViewport=c,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{i==null||i(o.sourceEvent,c)},n?150:0)}}}function VTe({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:r,panOnScroll:i,zoomOnDoubleClick:a,userSelectionActive:o,noWheelClassName:l,noPanClassName:c,lib:f,connectionInProgress:h}){return d=>{var S;const g=e||t,v=n&&d.ctrlKey,b=d.type==="wheel";if(d.button===1&&d.type==="mousedown"&&($f(d,`${f}-flow__node`)||$f(d,`${f}-flow__edge`)))return!0;if(!r&&!g&&!i&&!a&&!n||o||h&&!b||$f(d,l)&&b||$f(d,c)&&(!b||i&&b&&!e)||!n&&d.ctrlKey&&b)return!1;if(!n&&d.type==="touchstart"&&((S=d.touches)==null?void 0:S.length)>1)return d.preventDefault(),!1;if(!g&&!i&&!v&&b||!r&&(d.type==="mousedown"||d.type==="touchstart")||Array.isArray(r)&&!r.includes(d.button)&&d.type==="mousedown")return!1;const w=Array.isArray(r)&&r.includes(d.button)||!d.button||d.button<=1;return(!d.ctrlKey||b)&&w}}function KTe({domNode:e,minZoom:t,maxZoom:n,translateExtent:r,viewport:i,onPanZoom:a,onPanZoomStart:o,onPanZoomEnd:l,onDraggingChange:c}){const f={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},h=e.getBoundingClientRect(),d=GV().scaleExtent([t,n]).translateExtent(r),g=Mi(e).call(d);C({x:i.x,y:i.y,zoom:Cd(i.zoom,t,n)},[[0,0],[h.width,h.height]],r);const v=g.on("wheel.zoom"),b=g.on("dblclick.zoom");d.wheelDelta(EK);function w(F,B){return g?new Promise(G=>{d==null||d.interpolate((B==null?void 0:B.interpolate)==="linear"?is:Ny).transform(xj(g,B==null?void 0:B.duration,B==null?void 0:B.ease,()=>G(!0)),F)}):Promise.resolve(!1)}function S({noWheelClassName:F,noPanClassName:B,onPaneContextMenu:G,userSelectionActive:L,panOnScroll:V,panOnDrag:D,panOnScrollMode:q,panOnScrollSpeed:X,preventScrolling:K,zoomOnPinch:R,zoomOnScroll:H,zoomOnDoubleClick:U,zoomActivationKeyPressed:$,lib:Q,onTransformChange:J,connectionInProgress:ne,paneClickDistance:ae,selectionOnDrag:ie}){L&&!f.isZoomingOrPanning&&E();const ee=V&&!$&&!L;d.clickDistance(ie?1/0:!Oa(ae)||ae<0?0:ae);const se=ee?BTe({zoomPanValues:f,noWheelClassName:F,d3Selection:g,d3Zoom:d,panOnScrollMode:q,panOnScrollSpeed:X,zoomOnPinch:R,onPanZoomStart:o,onPanZoom:a,onPanZoomEnd:l}):FTe({noWheelClassName:F,preventScrolling:K,d3ZoomHandler:v});if(g.on("wheel.zoom",se,{passive:!1}),!L){const re=UTe({zoomPanValues:f,onDraggingChange:c,onPanZoomStart:o});d.on("start",re);const we=HTe({zoomPanValues:f,panOnDrag:D,onPaneContextMenu:!!G,onPanZoom:a,onTransformChange:J});d.on("zoom",we);const Ee=qTe({zoomPanValues:f,panOnDrag:D,panOnScroll:V,onPaneContextMenu:G,onPanZoomEnd:l,onDraggingChange:c});d.on("end",Ee)}const pe=VTe({zoomActivationKeyPressed:$,panOnDrag:D,zoomOnScroll:H,panOnScroll:V,zoomOnDoubleClick:U,zoomOnPinch:R,userSelectionActive:L,noPanClassName:B,noWheelClassName:F,lib:Q,connectionInProgress:ne});d.filter(pe),U?g.on("dblclick.zoom",b):g.on("dblclick.zoom",null)}function E(){d.on("zoom",null)}async function C(F,B,G){const L=yj(F),V=d==null?void 0:d.constrain()(L,B,G);return V&&await w(V),new Promise(D=>D(V))}async function _(F,B){const G=yj(F);return await w(G,B),new Promise(L=>L(G))}function N(F){if(g){const B=yj(F),G=g.property("__zoom");(G.k!==F.zoom||G.x!==F.x||G.y!==F.y)&&(d==null||d.transform(g,B,null,{sync:!0}))}}function O(){const F=g?XV(g.node()):{x:0,y:0,k:1};return{x:F.x,y:F.y,zoom:F.k}}function A(F,B){return g?new Promise(G=>{d==null||d.interpolate((B==null?void 0:B.interpolate)==="linear"?is:Ny).scaleTo(xj(g,B==null?void 0:B.duration,B==null?void 0:B.ease,()=>G(!0)),F)}):Promise.resolve(!1)}function T(F,B){return g?new Promise(G=>{d==null||d.interpolate((B==null?void 0:B.interpolate)==="linear"?is:Ny).scaleBy(xj(g,B==null?void 0:B.duration,B==null?void 0:B.ease,()=>G(!0)),F)}):Promise.resolve(!1)}function P(F){d==null||d.scaleExtent(F)}function I(F){d==null||d.translateExtent(F)}function z(F){const B=!Oa(F)||F<0?0:F;d==null||d.clickDistance(B)}return{update:S,destroy:E,setViewport:_,setViewportConstrained:C,getViewport:O,scaleTo:A,scaleBy:T,setScaleExtent:P,setTranslateExtent:I,syncViewport:N,setClickDistance:z}}var Ad;(function(e){e.Line="line",e.Handle="handle"})(Ad||(Ad={}));function YTe({width:e,prevWidth:t,height:n,prevHeight:r,affectsX:i,affectsY:a}){const o=e-t,l=n-r,c=[o>0?1:o<0?-1:0,l>0?1:l<0?-1:0];return o&&i&&(c[0]=c[0]*-1),l&&a&&(c[1]=c[1]*-1),c}function B4(e){const t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),r=e.includes("left"),i=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:r,affectsY:i}}function ml(e,t){return Math.max(0,t-e)}function pl(e,t){return Math.max(0,e-t)}function uy(e,t,n){return Math.max(0,t-e,e-n)}function F4(e,t){return e?!t:t}function XTe(e,t,n,r,i,a,o,l){let{affectsX:c,affectsY:f}=t;const{isHorizontal:h,isVertical:d}=t,g=h&&d,{xSnapped:v,ySnapped:b}=n,{minWidth:w,maxWidth:S,minHeight:E,maxHeight:C}=r,{x:_,y:N,width:O,height:A,aspectRatio:T}=e;let P=Math.floor(h?v-e.pointerX:0),I=Math.floor(d?b-e.pointerY:0);const z=O+(c?-P:P),F=A+(f?-I:I),B=-a[0]*O,G=-a[1]*A;let L=uy(z,w,S),V=uy(F,E,C);if(o){let X=0,K=0;c&&P<0?X=ml(_+P+B,o[0][0]):!c&&P>0&&(X=pl(_+z+B,o[1][0])),f&&I<0?K=ml(N+I+G,o[0][1]):!f&&I>0&&(K=pl(N+F+G,o[1][1])),L=Math.max(L,X),V=Math.max(V,K)}if(l){let X=0,K=0;c&&P>0?X=pl(_+P,l[0][0]):!c&&P<0&&(X=ml(_+z,l[1][0])),f&&I>0?K=pl(N+I,l[0][1]):!f&&I<0&&(K=ml(N+F,l[1][1])),L=Math.max(L,X),V=Math.max(V,K)}if(i){if(h){const X=uy(z/T,E,C)*T;if(L=Math.max(L,X),o){let K=0;!c&&!f||c&&!f&&g?K=pl(N+G+z/T,o[1][1])*T:K=ml(N+G+(c?P:-P)/T,o[0][1])*T,L=Math.max(L,K)}if(l){let K=0;!c&&!f||c&&!f&&g?K=ml(N+z/T,l[1][1])*T:K=pl(N+(c?P:-P)/T,l[0][1])*T,L=Math.max(L,K)}}if(d){const X=uy(F*T,w,S)/T;if(V=Math.max(V,X),o){let K=0;!c&&!f||f&&!c&&g?K=pl(_+F*T+B,o[1][0])/T:K=ml(_+(f?I:-I)*T+B,o[0][0])/T,V=Math.max(V,K)}if(l){let K=0;!c&&!f||f&&!c&&g?K=ml(_+F*T,l[1][0])/T:K=pl(_+(f?I:-I)*T,l[0][0])/T,V=Math.max(V,K)}}}I=I+(I<0?V:-V),P=P+(P<0?L:-L),i&&(g?z>F*T?I=(F4(c,f)?-P:P)/T:P=(F4(c,f)?-I:I)*T:h?(I=P/T,f=c):(P=I*T,c=f));const D=c?_+P:_,q=f?N+I:N;return{width:O+(c?-P:P),height:A+(f?-I:I),x:a[0]*P*(c?-1:1)+D,y:a[1]*I*(f?-1:1)+q}}const jK={width:0,height:0,x:0,y:0},GTe={...jK,pointerX:0,pointerY:0,aspectRatio:1};function WTe(e){return[[0,0],[e.measured.width,e.measured.height]]}function QTe(e,t,n){const r=t.position.x+e.position.x,i=t.position.y+e.position.y,a=e.measured.width??0,o=e.measured.height??0,l=n[0]*a,c=n[1]*o;return[[r-l,i-c],[r+a-l,i+o-c]]}function ZTe({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:i}){const a=Mi(e);let o={controlDirection:B4("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function l({controlPosition:f,boundaries:h,keepAspectRatio:d,resizeDirection:g,onResizeStart:v,onResize:b,onResizeEnd:w,shouldResize:S}){let E={...jK},C={...GTe};o={boundaries:h,resizeDirection:g,keepAspectRatio:d,controlDirection:B4(f)};let _,N=null,O=[],A,T,P,I=!1;const z=BV().on("start",F=>{const{nodeLookup:B,transform:G,snapGrid:L,snapToGrid:V,nodeOrigin:D,paneDomNode:q}=n();if(_=B.get(t),!_)return;N=(q==null?void 0:q.getBoundingClientRect())??null;const{xSnapped:X,ySnapped:K}=_m(F.sourceEvent,{transform:G,snapGrid:L,snapToGrid:V,containerBounds:N});E={width:_.measured.width??0,height:_.measured.height??0,x:_.position.x??0,y:_.position.y??0},C={...E,pointerX:X,pointerY:K,aspectRatio:E.width/E.height},A=void 0,_.parentId&&(_.extent==="parent"||_.expandParent)&&(A=B.get(_.parentId),T=A&&_.extent==="parent"?WTe(A):void 0),O=[],P=void 0;for(const[R,H]of B)if(H.parentId===t&&(O.push({id:R,position:{...H.position},extent:H.extent}),H.extent==="parent"||H.expandParent)){const U=QTe(H,_,H.origin??D);P?P=[[Math.min(U[0][0],P[0][0]),Math.min(U[0][1],P[0][1])],[Math.max(U[1][0],P[1][0]),Math.max(U[1][1],P[1][1])]]:P=U}v==null||v(F,{...E})}).on("drag",F=>{const{transform:B,snapGrid:G,snapToGrid:L,nodeOrigin:V}=n(),D=_m(F.sourceEvent,{transform:B,snapGrid:G,snapToGrid:L,containerBounds:N}),q=[];if(!_)return;const{x:X,y:K,width:R,height:H}=E,U={},$=_.origin??V,{width:Q,height:J,x:ne,y:ae}=XTe(C,o.controlDirection,D,o.boundaries,o.keepAspectRatio,$,T,P),ie=Q!==R,ee=J!==H,se=ne!==X&&ie,pe=ae!==K&&ee;if(!se&&!pe&&!ie&&!ee)return;if((se||pe||$[0]===1||$[1]===1)&&(U.x=se?ne:E.x,U.y=pe?ae:E.y,E.x=U.x,E.y=U.y,O.length>0)){const $e=ne-X,Ne=ae-K;for(const et of O)et.position={x:et.position.x-$e+$[0]*(Q-R),y:et.position.y-Ne+$[1]*(J-H)},q.push(et)}if((ie||ee)&&(U.width=ie&&(!o.resizeDirection||o.resizeDirection==="horizontal")?Q:E.width,U.height=ee&&(!o.resizeDirection||o.resizeDirection==="vertical")?J:E.height,E.width=U.width,E.height=U.height),A&&_.expandParent){const $e=$[0]*(U.width??0);U.x&&U.x<$e&&(E.x=$e,C.x=C.x-(U.x-$e));const Ne=$[1]*(U.height??0);U.y&&U.y<Ne&&(E.y=Ne,C.y=C.y-(U.y-Ne))}const re=YTe({width:E.width,prevWidth:R,height:E.height,prevHeight:H,affectsX:o.controlDirection.affectsX,affectsY:o.controlDirection.affectsY}),we={...E,direction:re};(S==null?void 0:S(F,we))!==!1&&(I=!0,b==null||b(F,we),r(U,q))}).on("end",F=>{I&&(w==null||w(F,{...E}),i==null||i({...E}),I=!1)});a.call(z)}function c(){a.on(".drag",null)}return{update:l,destroy:c}}const JTe={},U4=e=>{let t;const n=new Set,r=(h,d)=>{const g=typeof h=="function"?h(t):h;if(!Object.is(g,t)){const v=t;t=d??(typeof g!="object"||g===null)?g:Object.assign({},t,g),n.forEach(b=>b(t,v))}},i=()=>t,c={setState:r,getState:i,getInitialState:()=>f,subscribe:h=>(n.add(h),()=>n.delete(h)),destroy:()=>{(JTe?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},f=t=e(r,i,c);return c},e2e=e=>e?U4(e):U4,{useDebugValue:t2e}=Ce,{useSyncExternalStoreWithSelector:n2e}=bfe,r2e=e=>e;function _K(e,t=r2e,n){const r=n2e(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return t2e(r),r}const H4=(e,t)=>{const n=e2e(e),r=(i,a=t)=>_K(n,i,a);return Object.assign(r,n),r},i2e=(e,t)=>e?H4(e,t):H4;function _n(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,i]of e)if(!Object.is(i,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}const Fb=y.createContext(null),a2e=Fb.Provider,CK=bo.error001();function Tt(e,t){const n=y.useContext(Fb);if(n===null)throw new Error(CK);return _K(n,e,t)}function Cn(){const e=y.useContext(Fb);if(e===null)throw new Error(CK);return y.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const q4={display:"none"},o2e={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},kK="react-flow__node-desc",NK="react-flow__edge-desc",s2e="react-flow__aria-live",l2e=e=>e.ariaLiveMessage,u2e=e=>e.ariaLabelConfig;function c2e({rfId:e}){const t=Tt(l2e);return m.jsx("div",{id:`${s2e}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:o2e,children:t})}function f2e({rfId:e,disableKeyboardA11y:t}){const n=Tt(u2e);return m.jsxs(m.Fragment,{children:[m.jsx("div",{id:`${kK}-${e}`,style:q4,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),m.jsx("div",{id:`${NK}-${e}`,style:q4,children:n["edge.a11yDescription.default"]}),!t&&m.jsx(c2e,{rfId:e})]})}const Ub=y.forwardRef(({position:e="top-left",children:t,className:n,style:r,...i},a)=>{const o=`${e}`.split("-");return m.jsx("div",{className:Zn(["react-flow__panel",n,...o]),style:r,ref:a,...i,children:t})});Ub.displayName="Panel";function d2e({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:m.jsx(Ub,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:m.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const h2e=e=>{const t=[],n=[];for(const[,r]of e.nodeLookup)r.selected&&t.push(r.internals.userNode);for(const[,r]of e.edgeLookup)r.selected&&n.push(r);return{selectedNodes:t,selectedEdges:n}},cy=e=>e.id;function m2e(e,t){return _n(e.selectedNodes.map(cy),t.selectedNodes.map(cy))&&_n(e.selectedEdges.map(cy),t.selectedEdges.map(cy))}function p2e({onSelectionChange:e}){const t=Cn(),{selectedNodes:n,selectedEdges:r}=Tt(h2e,m2e);return y.useEffect(()=>{const i={nodes:n,edges:r};e==null||e(i),t.getState().onSelectionChangeHandlers.forEach(a=>a(i))},[n,r,e]),null}const g2e=e=>!!e.onSelectionChangeHandlers;function v2e({onSelectionChange:e}){const t=Tt(g2e);return e||t?m.jsx(p2e,{onSelectionChange:e}):null}const AK=[0,0],y2e={x:0,y:0,zoom:1},x2e=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],V4=[...x2e,"rfId"],b2e=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),K4={translateExtent:np,nodeOrigin:AK,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function w2e(e){const{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:i,setTranslateExtent:a,setNodeExtent:o,reset:l,setDefaultNodesAndEdges:c}=Tt(b2e,_n),f=Cn();y.useEffect(()=>(c(e.defaultNodes,e.defaultEdges),()=>{h.current=K4,l()}),[]);const h=y.useRef(K4);return y.useEffect(()=>{for(const d of V4){const g=e[d],v=h.current[d];g!==v&&(typeof e[d]>"u"||(d==="nodes"?t(g):d==="edges"?n(g):d==="minZoom"?r(g):d==="maxZoom"?i(g):d==="translateExtent"?a(g):d==="nodeExtent"?o(g):d==="ariaLabelConfig"?f.setState({ariaLabelConfig:cTe(g)}):d==="fitView"?f.setState({fitViewQueued:g}):d==="fitViewOptions"?f.setState({fitViewOptions:g}):f.setState({[d]:g})))}h.current=e},V4.map(d=>e[d])),null}function Y4(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function S2e(e){var r;const[t,n]=y.useState(e==="system"?null:e);return y.useEffect(()=>{if(e!=="system"){n(e);return}const i=Y4(),a=()=>n(i!=null&&i.matches?"dark":"light");return a(),i==null||i.addEventListener("change",a),()=>{i==null||i.removeEventListener("change",a)}},[e]),t!==null?t:(r=Y4())!=null&&r.matches?"dark":"light"}const X4=typeof document<"u"?document:null;function op(e=null,t={target:X4,actInsideInputWithModifier:!0}){const[n,r]=y.useState(!1),i=y.useRef(!1),a=y.useRef(new Set([])),[o,l]=y.useMemo(()=>{if(e!==null){const f=(Array.isArray(e)?e:[e]).filter(d=>typeof d=="string").map(d=>d.replace("+",`
`).replace(`

`,`
+`).split(`
`)),h=f.reduce((d,g)=>d.concat(...g),[]);return[f,h]}return[[],[]]},[e]);return y.useEffect(()=>{const c=(t==null?void 0:t.target)??X4,f=(t==null?void 0:t.actInsideInputWithModifier)??!0;if(e!==null){const h=v=>{var S,E;if(i.current=v.ctrlKey||v.metaKey||v.shiftKey||v.altKey,(!i.current||i.current&&!f)&&lK(v))return!1;const w=W4(v.code,l);if(a.current.add(v[w]),G4(o,a.current,!1)){const C=((E=(S=v.composedPath)==null?void 0:S.call(v))==null?void 0:E[0])||v.target,_=(C==null?void 0:C.nodeName)==="BUTTON"||(C==null?void 0:C.nodeName)==="A";t.preventDefault!==!1&&(i.current||!_)&&v.preventDefault(),r(!0)}},d=v=>{const b=W4(v.code,l);G4(o,a.current,!0)?(r(!1),a.current.clear()):a.current.delete(v[b]),v.key==="Meta"&&a.current.clear(),i.current=!1},g=()=>{a.current.clear(),r(!1)};return c==null||c.addEventListener("keydown",h),c==null||c.addEventListener("keyup",d),window.addEventListener("blur",g),window.addEventListener("contextmenu",g),()=>{c==null||c.removeEventListener("keydown",h),c==null||c.removeEventListener("keyup",d),window.removeEventListener("blur",g),window.removeEventListener("contextmenu",g)}}},[e,r]),n}function G4(e,t,n){return e.filter(r=>n||r.length===t.size).some(r=>r.every(i=>t.has(i)))}function W4(e,t){return t.includes(e)?"code":"key"}const E2e=()=>{const e=Cn();return y.useMemo(()=>({zoomIn:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,{duration:t==null?void 0:t.duration}):Promise.resolve(!1)},zoomOut:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,{duration:t==null?void 0:t.duration}):Promise.resolve(!1)},zoomTo:(t,n)=>{const{panZoom:r}=e.getState();return r?r.scaleTo(t,{duration:n==null?void 0:n.duration}):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{const{transform:[r,i,a],panZoom:o}=e.getState();return o?(await o.setViewport({x:t.x??r,y:t.y??i,zoom:t.zoom??a},n),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[t,n,r]=e.getState().transform;return{x:t,y:n,zoom:r}},setCenter:async(t,n,r)=>e.getState().setCenter(t,n,r),fitBounds:async(t,n)=>{const{width:r,height:i,minZoom:a,maxZoom:o,panZoom:l}=e.getState(),c=BO(t,r,i,a,o,(n==null?void 0:n.padding)??.1);return l?(await l.setViewport(c,{duration:n==null?void 0:n.duration,ease:n==null?void 0:n.ease,interpolate:n==null?void 0:n.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={})=>{const{transform:r,snapGrid:i,snapToGrid:a,domNode:o}=e.getState();if(!o)return t;const{x:l,y:c}=o.getBoundingClientRect(),f={x:t.x-l,y:t.y-c},h=n.snapGrid??i,d=n.snapToGrid??a;return ug(f,r,d,h)},flowToScreenPosition:t=>{const{transform:n,domNode:r}=e.getState();if(!r)return t;const{x:i,y:a}=r.getBoundingClientRect(),o=Jx(t,n);return{x:o.x+i,y:o.y+a}}}),[])};function OK(e,t){const n=[],r=new Map,i=[];for(const a of e)if(a.type==="add"){i.push(a);continue}else if(a.type==="remove"||a.type==="replace")r.set(a.id,[a]);else{const o=r.get(a.id);o?o.push(a):r.set(a.id,[a])}for(const a of t){const o=r.get(a.id);if(!o){n.push(a);continue}if(o[0].type==="remove")continue;if(o[0].type==="replace"){n.push({...o[0].item});continue}const l={...a};for(const c of o)j2e(c,l);n.push(l)}return i.length&&i.forEach(a=>{a.index!==void 0?n.splice(a.index,0,{...a.item}):n.push({...a.item})}),n}function j2e(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(t.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function _2e(e,t){return OK(e,t)}function C2e(e,t){return OK(e,t)}function Ru(e,t){return{id:e,type:"select",selected:t}}function Bf(e,t=new Set,n=!1){const r=[];for(const[i,a]of e){const o=t.has(i);!(a.selected===void 0&&!o)&&a.selected!==o&&(n&&(a.selected=o),r.push(Ru(a.id,o)))}return r}function Q4({items:e=[],lookup:t}){var i;const n=[],r=new Map(e.map(a=>[a.id,a]));for(const[a,o]of e.entries()){const l=t.get(o.id),c=((i=l==null?void 0:l.internals)==null?void 0:i.userNode)??l;c!==void 0&&c!==o&&n.push({id:o.id,item:o,type:"replace"}),c===void 0&&n.push({item:o,type:"add",index:a})}for(const[a]of t)r.get(a)===void 0&&n.push({id:a,type:"remove"});return n}function Z4(e){return{id:e.id,type:"remove"}}const J4=e=>eTe(e),k2e=e=>eK(e);function TK(e){return y.forwardRef(e)}const N2e=typeof window<"u"?y.useLayoutEffect:y.useEffect;function e5(e){const[t,n]=y.useState(BigInt(0)),[r]=y.useState(()=>A2e(()=>n(i=>i+BigInt(1))));return N2e(()=>{const i=r.get();i.length&&(e(i),r.reset())},[t]),r}function A2e(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const PK=y.createContext(null);function O2e({children:e}){const t=Cn(),n=y.useCallback(l=>{const{nodes:c=[],setNodes:f,hasDefaultNodes:h,onNodesChange:d,nodeLookup:g,fitViewQueued:v,onNodesChangeMiddlewareMap:b}=t.getState();let w=c;for(const E of l)w=typeof E=="function"?E(w):E;let S=Q4({items:w,lookup:g});for(const E of b.values())S=E(S);h&&f(w),S.length>0?d==null||d(S):v&&window.requestAnimationFrame(()=>{const{fitViewQueued:E,nodes:C,setNodes:_}=t.getState();E&&_(C)})},[]),r=e5(n),i=y.useCallback(l=>{const{edges:c=[],setEdges:f,hasDefaultEdges:h,onEdgesChange:d,edgeLookup:g}=t.getState();let v=c;for(const b of l)v=typeof b=="function"?b(v):b;h?f(v):d&&d(Q4({items:v,lookup:g}))},[]),a=e5(i),o=y.useMemo(()=>({nodeQueue:r,edgeQueue:a}),[]);return m.jsx(PK.Provider,{value:o,children:e})}function T2e(){const e=y.useContext(PK);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const P2e=e=>!!e.panZoom;function Hb(){const e=E2e(),t=Cn(),n=T2e(),r=Tt(P2e),i=y.useMemo(()=>{const a=d=>t.getState().nodeLookup.get(d),o=d=>{n.nodeQueue.push(d)},l=d=>{n.edgeQueue.push(d)},c=d=>{var E,C;const{nodeLookup:g,nodeOrigin:v}=t.getState(),b=J4(d)?d:g.get(d.id),w=b.parentId?oK(b.position,b.measured,b.parentId,g,v):b.position,S={...b,position:w,width:((E=b.measured)==null?void 0:E.width)??b.width,height:((C=b.measured)==null?void 0:C.height)??b.height};return kd(S)},f=(d,g,v={replace:!1})=>{o(b=>b.map(w=>{if(w.id===d){const S=typeof g=="function"?g(w):g;return v.replace&&J4(S)?S:{...w,...S}}return w}))},h=(d,g,v={replace:!1})=>{l(b=>b.map(w=>{if(w.id===d){const S=typeof g=="function"?g(w):g;return v.replace&&k2e(S)?S:{...w,...S}}return w}))};return{getNodes:()=>t.getState().nodes.map(d=>({...d})),getNode:d=>{var g;return(g=a(d))==null?void 0:g.internals.userNode},getInternalNode:a,getEdges:()=>{const{edges:d=[]}=t.getState();return d.map(g=>({...g}))},getEdge:d=>t.getState().edgeLookup.get(d),setNodes:o,setEdges:l,addNodes:d=>{const g=Array.isArray(d)?d:[d];n.nodeQueue.push(v=>[...v,...g])},addEdges:d=>{const g=Array.isArray(d)?d:[d];n.edgeQueue.push(v=>[...v,...g])},toObject:()=>{const{nodes:d=[],edges:g=[],transform:v}=t.getState(),[b,w,S]=v;return{nodes:d.map(E=>({...E})),edges:g.map(E=>({...E})),viewport:{x:b,y:w,zoom:S}}},deleteElements:async({nodes:d=[],edges:g=[]})=>{const{nodes:v,edges:b,onNodesDelete:w,onEdgesDelete:S,triggerNodeChanges:E,triggerEdgeChanges:C,onDelete:_,onBeforeDelete:N}=t.getState(),{nodes:O,edges:A}=await aTe({nodesToRemove:d,edgesToRemove:g,nodes:v,edges:b,onBeforeDelete:N}),T=A.length>0,P=O.length>0;if(T){const I=A.map(Z4);S==null||S(A),C(I)}if(P){const I=O.map(Z4);w==null||w(O),E(I)}return(P||T)&&(_==null||_({nodes:O,edges:A})),{deletedNodes:O,deletedEdges:A}},getIntersectingNodes:(d,g=!0,v)=>{const b=A4(d),w=b?d:c(d),S=v!==void 0;return w?(v||t.getState().nodes).filter(E=>{const C=t.getState().nodeLookup.get(E.id);if(C&&!b&&(E.id===d.id||!C.internals.positionAbsolute))return!1;const _=kd(S?E:C),N=ip(_,w);return g&&N>0||N>=_.width*_.height||N>=w.width*w.height}):[]},isNodeIntersecting:(d,g,v=!0)=>{const w=A4(d)?d:c(d);if(!w)return!1;const S=ip(w,g);return v&&S>0||S>=g.width*g.height||S>=w.width*w.height},updateNode:f,updateNodeData:(d,g,v={replace:!1})=>{f(d,b=>{const w=typeof g=="function"?g(b):g;return v.replace?{...b,data:w}:{...b,data:{...b.data,...w}}},v)},updateEdge:h,updateEdgeData:(d,g,v={replace:!1})=>{h(d,b=>{const w=typeof g=="function"?g(b):g;return v.replace?{...b,data:w}:{...b,data:{...b.data,...w}}},v)},getNodesBounds:d=>{const{nodeLookup:g,nodeOrigin:v}=t.getState();return tTe(d,{nodeLookup:g,nodeOrigin:v})},getHandleConnections:({type:d,id:g,nodeId:v})=>{var b;return Array.from(((b=t.getState().connectionLookup.get(`${v}-${d}${g?`-${g}`:""}`))==null?void 0:b.values())??[])},getNodeConnections:({type:d,handleId:g,nodeId:v})=>{var b;return Array.from(((b=t.getState().connectionLookup.get(`${v}${d?g?`-${d}-${g}`:`-${d}`:""}`))==null?void 0:b.values())??[])},fitView:async d=>{const g=t.getState().fitViewResolver??uTe();return t.setState({fitViewQueued:!0,fitViewOptions:d,fitViewResolver:g}),n.nodeQueue.push(v=>[...v]),g.promise}}},[]);return y.useMemo(()=>({...i,...e,viewportInitialized:r}),[r])}const t5=e=>e.selected,M2e=typeof window<"u"?window:void 0;function D2e({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=Cn(),{deleteElements:r}=Hb(),i=op(e,{actInsideInputWithModifier:!1}),a=op(t,{target:M2e});y.useEffect(()=>{if(i){const{edges:o,nodes:l}=n.getState();r({nodes:l.filter(t5),edges:o.filter(t5)}),n.setState({nodesSelectionActive:!1})}},[i]),y.useEffect(()=>{n.setState({multiSelectionActive:a})},[a])}function R2e(e){const t=Cn();y.useEffect(()=>{const n=()=>{var i,a,o,l;if(!e.current||!(((a=(i=e.current).checkVisibility)==null?void 0:a.call(i))??!0))return!1;const r=FO(e.current);(r.height===0||r.width===0)&&((l=(o=t.getState()).onError)==null||l.call(o,"004",bo.error004())),t.setState({width:r.width||500,height:r.height||500})};if(e.current){n(),window.addEventListener("resize",n);const r=new ResizeObserver(()=>n());return r.observe(e.current),()=>{window.removeEventListener("resize",n),r&&e.current&&r.unobserve(e.current)}}},[])}const qb={position:"absolute",width:"100%",height:"100%",top:0,left:0},I2e=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function L2e({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panOnScrollSpeed:i=.5,panOnScrollMode:a=rc.Free,zoomOnDoubleClick:o=!0,panOnDrag:l=!0,defaultViewport:c,translateExtent:f,minZoom:h,maxZoom:d,zoomActivationKeyCode:g,preventScrolling:v=!0,children:b,noWheelClassName:w,noPanClassName:S,onViewportChange:E,isControlledViewport:C,paneClickDistance:_,selectionOnDrag:N}){const O=Cn(),A=y.useRef(null),{userSelectionActive:T,lib:P,connectionInProgress:I}=Tt(I2e,_n),z=op(g),F=y.useRef();R2e(A);const B=y.useCallback(G=>{E==null||E({x:G[0],y:G[1],zoom:G[2]}),C||O.setState({transform:G})},[E,C]);return y.useEffect(()=>{if(A.current){F.current=KTe({domNode:A.current,minZoom:h,maxZoom:d,translateExtent:f,viewport:c,onDraggingChange:D=>O.setState(q=>q.paneDragging===D?q:{paneDragging:D}),onPanZoomStart:(D,q)=>{const{onViewportChangeStart:X,onMoveStart:K}=O.getState();K==null||K(D,q),X==null||X(q)},onPanZoom:(D,q)=>{const{onViewportChange:X,onMove:K}=O.getState();K==null||K(D,q),X==null||X(q)},onPanZoomEnd:(D,q)=>{const{onViewportChangeEnd:X,onMoveEnd:K}=O.getState();K==null||K(D,q),X==null||X(q)}});const{x:G,y:L,zoom:V}=F.current.getViewport();return O.setState({panZoom:F.current,transform:[G,L,V],domNode:A.current.closest(".react-flow")}),()=>{var D;(D=F.current)==null||D.destroy()}}},[]),y.useEffect(()=>{var G;(G=F.current)==null||G.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:r,panOnScrollSpeed:i,panOnScrollMode:a,zoomOnDoubleClick:o,panOnDrag:l,zoomActivationKeyPressed:z,preventScrolling:v,noPanClassName:S,userSelectionActive:T,noWheelClassName:w,lib:P,onTransformChange:B,connectionInProgress:I,selectionOnDrag:N,paneClickDistance:_})},[e,t,n,r,i,a,o,l,z,v,S,T,w,P,B,I,N,_]),m.jsx("div",{className:"react-flow__renderer",ref:A,style:qb,children:b})}const z2e=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function $2e(){const{userSelectionActive:e,userSelectionRect:t}=Tt(z2e,_n);return e&&t?m.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}const bj=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},B2e=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function F2e({isSelecting:e,selectionKeyPressed:t,selectionMode:n=rp.Full,panOnDrag:r,paneClickDistance:i,selectionOnDrag:a,onSelectionStart:o,onSelectionEnd:l,onPaneClick:c,onPaneContextMenu:f,onPaneScroll:h,onPaneMouseEnter:d,onPaneMouseMove:g,onPaneMouseLeave:v,children:b}){const w=Cn(),{userSelectionActive:S,elementsSelectable:E,dragging:C,connectionInProgress:_}=Tt(B2e,_n),N=E&&(e||S),O=y.useRef(null),A=y.useRef(),T=y.useRef(new Set),P=y.useRef(new Set),I=y.useRef(!1),z=X=>{if(I.current||_){I.current=!1;return}c==null||c(X),w.getState().resetSelectedElements(),w.setState({nodesSelectionActive:!1})},F=X=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){X.preventDefault();return}f==null||f(X)},B=h?X=>h(X):void 0,G=X=>{I.current&&(X.stopPropagation(),I.current=!1)},L=X=>{var J,ne;const{domNode:K}=w.getState();if(A.current=K==null?void 0:K.getBoundingClientRect(),!A.current)return;const R=X.target===O.current;if(!R&&!!X.target.closest(".nokey")||!e||!(a&&R||t)||X.button!==0||!X.isPrimary)return;(ne=(J=X.target)==null?void 0:J.setPointerCapture)==null||ne.call(J,X.pointerId),I.current=!1;const{x:$,y:Q}=Ta(X.nativeEvent,A.current);w.setState({userSelectionRect:{width:0,height:0,startX:$,startY:Q,x:$,y:Q}}),R||(X.stopPropagation(),X.preventDefault())},V=X=>{const{userSelectionRect:K,transform:R,nodeLookup:H,edgeLookup:U,connectionLookup:$,triggerNodeChanges:Q,triggerEdgeChanges:J,defaultEdgeOptions:ne,resetSelectedElements:ae}=w.getState();if(!A.current||!K)return;const{x:ie,y:ee}=Ta(X.nativeEvent,A.current),{startX:se,startY:pe}=K;if(!I.current){const Ne=t?0:i;if(Math.hypot(ie-se,ee-pe)<=Ne)return;ae(),o==null||o(X)}I.current=!0;const re={startX:se,startY:pe,x:ie<se?ie:se,y:ee<pe?ee:pe,width:Math.abs(ie-se),height:Math.abs(ee-pe)},we=T.current,Ee=P.current;T.current=new Set($O(H,re,R,n===rp.Partial,!0).map(Ne=>Ne.id)),P.current=new Set;const $e=(ne==null?void 0:ne.selectable)??!0;for(const Ne of T.current){const et=$.get(Ne);if(et)for(const{edgeId:Xe}of et.values()){const Ke=U.get(Xe);Ke&&(Ke.selectable??$e)&&P.current.add(Xe)}}if(!O4(we,T.current)){const Ne=Bf(H,T.current,!0);Q(Ne)}if(!O4(Ee,P.current)){const Ne=Bf(U,P.current);J(Ne)}w.setState({userSelectionRect:re,userSelectionActive:!0,nodesSelectionActive:!1})},D=X=>{var K,R;X.button===0&&((R=(K=X.target)==null?void 0:K.releasePointerCapture)==null||R.call(K,X.pointerId),!S&&X.target===O.current&&w.getState().userSelectionRect&&(z==null||z(X)),w.setState({userSelectionActive:!1,userSelectionRect:null}),I.current&&(l==null||l(X),w.setState({nodesSelectionActive:T.current.size>0})))},q=r===!0||Array.isArray(r)&&r.includes(0);return m.jsxs("div",{className:Zn(["react-flow__pane",{draggable:q,dragging:C,selection:e}]),onClick:N?void 0:bj(z,O),onContextMenu:bj(F,O),onWheel:bj(B,O),onPointerEnter:N?void 0:d,onPointerMove:N?V:g,onPointerUp:N?D:void 0,onPointerDownCapture:N?L:void 0,onClickCapture:N?G:void 0,onPointerLeave:v,ref:O,style:qb,children:[b,m.jsx($2e,{})]})}function VC({id:e,store:t,unselect:n=!1,nodeRef:r}){const{addSelectedNodes:i,unselectNodesAndEdges:a,multiSelectionActive:o,nodeLookup:l,onError:c}=t.getState(),f=l.get(e);if(!f){c==null||c("012",bo.error012(e));return}t.setState({nodesSelectionActive:!1}),f.selected?(n||f.selected&&o)&&(a({nodes:[f],edges:[]}),requestAnimationFrame(()=>{var h;return(h=r==null?void 0:r.current)==null?void 0:h.blur()})):i([e])}function MK({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:i,isSelectable:a,nodeClickDistance:o}){const l=Cn(),[c,f]=y.useState(!1),h=y.useRef();return y.useEffect(()=>{h.current=PTe({getStoreItems:()=>l.getState(),onNodeMouseDown:d=>{VC({id:d,store:l,nodeRef:e})},onDragStart:()=>{f(!0)},onDragStop:()=>{f(!1)}})},[]),y.useEffect(()=>{if(!(t||!e.current||!h.current))return h.current.update({noDragClassName:n,handleSelector:r,domNode:e.current,isSelectable:a,nodeId:i,nodeClickDistance:o}),()=>{var d;(d=h.current)==null||d.destroy()}},[n,r,t,a,e,i,o]),c}const U2e=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function DK(){const e=Cn();return y.useCallback(n=>{const{nodeExtent:r,snapToGrid:i,snapGrid:a,nodesDraggable:o,onError:l,updateNodePositions:c,nodeLookup:f,nodeOrigin:h}=e.getState(),d=new Map,g=U2e(o),v=i?a[0]:5,b=i?a[1]:5,w=n.direction.x*v*n.factor,S=n.direction.y*b*n.factor;for(const[,E]of f){if(!g(E))continue;let C={x:E.internals.positionAbsolute.x+w,y:E.internals.positionAbsolute.y+S};i&&(C=lg(C,a));const{position:_,positionAbsolute:N}=tK({nodeId:E.id,nextPosition:C,nodeLookup:f,nodeExtent:r,nodeOrigin:h,onError:l});E.position=_,E.internals.positionAbsolute=N,d.set(E.id,E)}c(d)},[])}const YO=y.createContext(null),H2e=YO.Provider;YO.Consumer;const RK=()=>y.useContext(YO),q2e=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),V2e=(e,t,n)=>r=>{const{connectionClickStartHandle:i,connectionMode:a,connection:o}=r,{fromHandle:l,toHandle:c,isValid:f}=o,h=(c==null?void 0:c.nodeId)===e&&(c==null?void 0:c.id)===t&&(c==null?void 0:c.type)===n;return{connectingFrom:(l==null?void 0:l.nodeId)===e&&(l==null?void 0:l.id)===t&&(l==null?void 0:l.type)===n,connectingTo:h,clickConnecting:(i==null?void 0:i.nodeId)===e&&(i==null?void 0:i.id)===t&&(i==null?void 0:i.type)===n,isPossibleEndHandle:a===jd.Strict?(l==null?void 0:l.type)!==n:e!==(l==null?void 0:l.nodeId)||t!==(l==null?void 0:l.id),connectionInProcess:!!l,clickConnectionInProcess:!!i,valid:h&&f}};function K2e({type:e="source",position:t=qe.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:i=!0,isConnectableEnd:a=!0,id:o,onConnect:l,children:c,className:f,onMouseDown:h,onTouchStart:d,...g},v){var V,D;const b=o||null,w=e==="target",S=Cn(),E=RK(),{connectOnClick:C,noPanClassName:_,rfId:N}=Tt(q2e,_n),{connectingFrom:O,connectingTo:A,clickConnecting:T,isPossibleEndHandle:P,connectionInProcess:I,clickConnectionInProcess:z,valid:F}=Tt(V2e(E,b,e),_n);E||(D=(V=S.getState()).onError)==null||D.call(V,"010",bo.error010());const B=q=>{const{defaultEdgeOptions:X,onConnect:K,hasDefaultEdges:R}=S.getState(),H={...X,...q};if(R){const{edges:U,setEdges:$}=S.getState();$(gTe(H,U))}K==null||K(H),l==null||l(H)},G=q=>{if(!E)return;const X=uK(q.nativeEvent);if(i&&(X&&q.button===0||!X)){const K=S.getState();qC.onPointerDown(q.nativeEvent,{handleDomNode:q.currentTarget,autoPanOnConnect:K.autoPanOnConnect,connectionMode:K.connectionMode,connectionRadius:K.connectionRadius,domNode:K.domNode,nodeLookup:K.nodeLookup,lib:K.lib,isTarget:w,handleId:b,nodeId:E,flowId:K.rfId,panBy:K.panBy,cancelConnection:K.cancelConnection,onConnectStart:K.onConnectStart,onConnectEnd:(...R)=>{var H,U;return(U=(H=S.getState()).onConnectEnd)==null?void 0:U.call(H,...R)},updateConnection:K.updateConnection,onConnect:B,isValidConnection:n||((...R)=>{var H,U;return((U=(H=S.getState()).isValidConnection)==null?void 0:U.call(H,...R))??!0}),getTransform:()=>S.getState().transform,getFromHandle:()=>S.getState().connection.fromHandle,autoPanSpeed:K.autoPanSpeed,dragThreshold:K.connectionDragThreshold})}X?h==null||h(q):d==null||d(q)},L=q=>{const{onClickConnectStart:X,onClickConnectEnd:K,connectionClickStartHandle:R,connectionMode:H,isValidConnection:U,lib:$,rfId:Q,nodeLookup:J,connection:ne}=S.getState();if(!E||!R&&!i)return;if(!R){X==null||X(q.nativeEvent,{nodeId:E,handleId:b,handleType:e}),S.setState({connectionClickStartHandle:{nodeId:E,type:e,id:b}});return}const ae=sK(q.target),ie=n||U,{connection:ee,isValid:se}=qC.isValid(q.nativeEvent,{handle:{nodeId:E,id:b,type:e},connectionMode:H,fromNodeId:R.nodeId,fromHandleId:R.id||null,fromType:R.type,isValidConnection:ie,flowId:Q,doc:ae,lib:$,nodeLookup:J});se&&ee&&B(ee);const pe=structuredClone(ne);delete pe.inProgress,pe.toPosition=pe.toHandle?pe.toHandle.position:null,K==null||K(q,pe),S.setState({connectionClickStartHandle:null})};return m.jsx("div",{"data-handleid":b,"data-nodeid":E,"data-handlepos":t,"data-id":`${N}-${E}-${b}-${e}`,className:Zn(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",_,f,{source:!w,target:w,connectable:r,connectablestart:i,connectableend:a,clickconnecting:T,connectingfrom:O,connectingto:A,valid:F,connectionindicator:r&&(!I||P)&&(I||z?a:i)}]),onMouseDown:G,onTouchStart:G,onClick:C?L:void 0,ref:v,...g,children:c})}const Od=y.memo(TK(K2e));function Y2e({data:e,isConnectable:t,sourcePosition:n=qe.Bottom}){return m.jsxs(m.Fragment,{children:[e==null?void 0:e.label,m.jsx(Od,{type:"source",position:n,isConnectable:t})]})}function X2e({data:e,isConnectable:t,targetPosition:n=qe.Top,sourcePosition:r=qe.Bottom}){return m.jsxs(m.Fragment,{children:[m.jsx(Od,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,m.jsx(Od,{type:"source",position:r,isConnectable:t})]})}function G2e(){return null}function W2e({data:e,isConnectable:t,targetPosition:n=qe.Top}){return m.jsxs(m.Fragment,{children:[m.jsx(Od,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label]})}const e0={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},n5={input:Y2e,default:X2e,output:W2e,group:G2e};function Q2e(e){var t,n,r,i;return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??((t=e.style)==null?void 0:t.width),height:e.height??e.initialHeight??((n=e.style)==null?void 0:n.height)}:{width:e.width??((r=e.style)==null?void 0:r.width),height:e.height??((i=e.style)==null?void 0:i.height)}}const Z2e=e=>{const{width:t,height:n,x:r,y:i}=sg(e.nodeLookup,{filter:a=>!!a.selected});return{width:Oa(t)?t:null,height:Oa(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${r}px,${i}px)`}};function J2e({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=Cn(),{width:i,height:a,transformString:o,userSelectionActive:l}=Tt(Z2e,_n),c=DK(),f=y.useRef(null);y.useEffect(()=>{var v;n||(v=f.current)==null||v.focus({preventScroll:!0})},[n]);const h=!l&&i!==null&&a!==null;if(MK({nodeRef:f,disabled:!h}),!h)return null;const d=e?v=>{const b=r.getState().nodes.filter(w=>w.selected);e(v,b)}:void 0,g=v=>{Object.prototype.hasOwnProperty.call(e0,v.key)&&(v.preventDefault(),c({direction:e0[v.key],factor:v.shiftKey?4:1}))};return m.jsx("div",{className:Zn(["react-flow__nodesselection","react-flow__container",t]),style:{transform:o},children:m.jsx("div",{ref:f,className:"react-flow__nodesselection-rect",onContextMenu:d,tabIndex:n?void 0:-1,onKeyDown:n?void 0:g,style:{width:i,height:a}})})}const r5=typeof window<"u"?window:void 0,ePe=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function IK({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:o,paneClickDistance:l,deleteKeyCode:c,selectionKeyCode:f,selectionOnDrag:h,selectionMode:d,onSelectionStart:g,onSelectionEnd:v,multiSelectionKeyCode:b,panActivationKeyCode:w,zoomActivationKeyCode:S,elementsSelectable:E,zoomOnScroll:C,zoomOnPinch:_,panOnScroll:N,panOnScrollSpeed:O,panOnScrollMode:A,zoomOnDoubleClick:T,panOnDrag:P,defaultViewport:I,translateExtent:z,minZoom:F,maxZoom:B,preventScrolling:G,onSelectionContextMenu:L,noWheelClassName:V,noPanClassName:D,disableKeyboardA11y:q,onViewportChange:X,isControlledViewport:K}){const{nodesSelectionActive:R,userSelectionActive:H}=Tt(ePe,_n),U=op(f,{target:r5}),$=op(w,{target:r5}),Q=$||P,J=$||N,ne=h&&Q!==!0,ae=U||H||ne;return D2e({deleteKeyCode:c,multiSelectionKeyCode:b}),m.jsx(L2e,{onPaneContextMenu:a,elementsSelectable:E,zoomOnScroll:C,zoomOnPinch:_,panOnScroll:J,panOnScrollSpeed:O,panOnScrollMode:A,zoomOnDoubleClick:T,panOnDrag:!U&&Q,defaultViewport:I,translateExtent:z,minZoom:F,maxZoom:B,zoomActivationKeyCode:S,preventScrolling:G,noWheelClassName:V,noPanClassName:D,onViewportChange:X,isControlledViewport:K,paneClickDistance:l,selectionOnDrag:ne,children:m.jsxs(F2e,{onSelectionStart:g,onSelectionEnd:v,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:o,panOnDrag:Q,isSelecting:!!ae,selectionMode:d,selectionKeyPressed:U,paneClickDistance:l,selectionOnDrag:ne,children:[e,R&&m.jsx(J2e,{onSelectionContextMenu:L,noPanClassName:D,disableKeyboardA11y:q})]})})}IK.displayName="FlowRenderer";const tPe=y.memo(IK),nPe=e=>t=>e?$O(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(n=>n.id):Array.from(t.nodeLookup.keys());function rPe(e){return Tt(y.useCallback(nPe(e),[e]),_n)}const iPe=e=>e.updateNodeInternals;function aPe(){const e=Tt(iPe),[t]=y.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{const r=new Map;n.forEach(i=>{const a=i.target.getAttribute("data-id");r.set(a,{id:a,nodeElement:i.target,force:!0})}),e(r)}));return y.useEffect(()=>()=>{t==null||t.disconnect()},[t]),t}function oPe({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){const i=Cn(),a=y.useRef(null),o=y.useRef(null),l=y.useRef(e.sourcePosition),c=y.useRef(e.targetPosition),f=y.useRef(t),h=n&&!!e.internals.handleBounds;return y.useEffect(()=>{a.current&&!e.hidden&&(!h||o.current!==a.current)&&(o.current&&(r==null||r.unobserve(o.current)),r==null||r.observe(a.current),o.current=a.current)},[h,e.hidden]),y.useEffect(()=>()=>{o.current&&(r==null||r.unobserve(o.current),o.current=null)},[]),y.useEffect(()=>{if(a.current){const d=f.current!==t,g=l.current!==e.sourcePosition,v=c.current!==e.targetPosition;(d||g||v)&&(f.current=t,l.current=e.sourcePosition,c.current=e.targetPosition,i.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:a.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),a}function sPe({id:e,onClick:t,onMouseEnter:n,onMouseMove:r,onMouseLeave:i,onContextMenu:a,onDoubleClick:o,nodesDraggable:l,elementsSelectable:c,nodesConnectable:f,nodesFocusable:h,resizeObserver:d,noDragClassName:g,noPanClassName:v,disableKeyboardA11y:b,rfId:w,nodeTypes:S,nodeClickDistance:E,onError:C}){const{node:_,internals:N,isParent:O}=Tt(ie=>{const ee=ie.nodeLookup.get(e),se=ie.parentLookup.has(e);return{node:ee,internals:ee.internals,isParent:se}},_n);let A=_.type||"default",T=(S==null?void 0:S[A])||n5[A];T===void 0&&(C==null||C("003",bo.error003(A)),A="default",T=(S==null?void 0:S.default)||n5.default);const P=!!(_.draggable||l&&typeof _.draggable>"u"),I=!!(_.selectable||c&&typeof _.selectable>"u"),z=!!(_.connectable||f&&typeof _.connectable>"u"),F=!!(_.focusable||h&&typeof _.focusable>"u"),B=Cn(),G=aK(_),L=oPe({node:_,nodeType:A,hasDimensions:G,resizeObserver:d}),V=MK({nodeRef:L,disabled:_.hidden||!P,noDragClassName:g,handleSelector:_.dragHandle,nodeId:e,isSelectable:I,nodeClickDistance:E}),D=DK();if(_.hidden)return null;const q=Ms(_),X=Q2e(_),K=I||P||t||n||r||i,R=n?ie=>n(ie,{...N.userNode}):void 0,H=r?ie=>r(ie,{...N.userNode}):void 0,U=i?ie=>i(ie,{...N.userNode}):void 0,$=a?ie=>a(ie,{...N.userNode}):void 0,Q=o?ie=>o(ie,{...N.userNode}):void 0,J=ie=>{const{selectNodesOnDrag:ee,nodeDragThreshold:se}=B.getState();I&&(!ee||!P||se>0)&&VC({id:e,store:B,nodeRef:L}),t&&t(ie,{...N.userNode})},ne=ie=>{if(!(lK(ie.nativeEvent)||b)){if(WV.includes(ie.key)&&I){const ee=ie.key==="Escape";VC({id:e,store:B,unselect:ee,nodeRef:L})}else if(P&&_.selected&&Object.prototype.hasOwnProperty.call(e0,ie.key)){ie.preventDefault();const{ariaLabelConfig:ee}=B.getState();B.setState({ariaLiveMessage:ee["node.a11yDescription.ariaLiveMessage"]({direction:ie.key.replace("Arrow","").toLowerCase(),x:~~N.positionAbsolute.x,y:~~N.positionAbsolute.y})}),D({direction:e0[ie.key],factor:ie.shiftKey?4:1})}}},ae=()=>{var Ee;if(b||!((Ee=L.current)!=null&&Ee.matches(":focus-visible")))return;const{transform:ie,width:ee,height:se,autoPanOnNodeFocus:pe,setCenter:re}=B.getState();if(!pe)return;$O(new Map([[e,_]]),{x:0,y:0,width:ee,height:se},ie,!0).length>0||re(_.position.x+q.width/2,_.position.y+q.height/2,{zoom:ie[2]})};return m.jsx("div",{className:Zn(["react-flow__node",`react-flow__node-${A}`,{[v]:P},_.className,{selected:_.selected,selectable:I,parent:O,draggable:P,dragging:V}]),ref:L,style:{zIndex:N.z,transform:`translate(${N.positionAbsolute.x}px,${N.positionAbsolute.y}px)`,pointerEvents:K?"all":"none",visibility:G?"visible":"hidden",..._.style,...X},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:R,onMouseMove:H,onMouseLeave:U,onContextMenu:$,onClick:J,onDoubleClick:Q,onKeyDown:F?ne:void 0,tabIndex:F?0:void 0,onFocus:F?ae:void 0,role:_.ariaRole??(F?"group":void 0),"aria-roledescription":"node","aria-describedby":b?void 0:`${kK}-${w}`,"aria-label":_.ariaLabel,..._.domAttributes,children:m.jsx(H2e,{value:e,children:m.jsx(T,{id:e,data:_.data,type:A,positionAbsoluteX:N.positionAbsolute.x,positionAbsoluteY:N.positionAbsolute.y,selected:_.selected??!1,selectable:I,draggable:P,deletable:_.deletable??!0,isConnectable:z,sourcePosition:_.sourcePosition,targetPosition:_.targetPosition,dragging:V,dragHandle:_.dragHandle,zIndex:N.z,parentId:_.parentId,...q})})})}var lPe=y.memo(sPe);const uPe=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function LK(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:i,onError:a}=Tt(uPe,_n),o=rPe(e.onlyRenderVisibleElements),l=aPe();return m.jsx("div",{className:"react-flow__nodes",style:qb,children:o.map(c=>m.jsx(lPe,{id:c,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:l,nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:i,nodeClickDistance:e.nodeClickDistance,onError:a},c))})}LK.displayName="NodeRenderer";const cPe=y.memo(LK);function fPe(e){return Tt(y.useCallback(n=>{if(!e)return n.edges.map(i=>i.id);const r=[];if(n.width&&n.height)for(const i of n.edges){const a=n.nodeLookup.get(i.source),o=n.nodeLookup.get(i.target);a&&o&&hTe({sourceNode:a,targetNode:o,width:n.width,height:n.height,transform:n.transform})&&r.push(i.id)}return r},[e]),_n)}const dPe=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e}};return m.jsx("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},hPe=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e,fill:e}};return m.jsx("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},i5={[_d.Arrow]:dPe,[_d.ArrowClosed]:hPe};function mPe(e){const t=Cn();return y.useMemo(()=>{var i,a;return Object.prototype.hasOwnProperty.call(i5,e)?i5[e]:((a=(i=t.getState()).onError)==null||a.call(i,"009",bo.error009(e)),null)},[e])}const pPe=({id:e,type:t,color:n,width:r=12.5,height:i=12.5,markerUnits:a="strokeWidth",strokeWidth:o,orient:l="auto-start-reverse"})=>{const c=mPe(t);return c?m.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${i}`,viewBox:"-10 -10 20 20",markerUnits:a,orient:l,refX:"0",refY:"0",children:m.jsx(c,{color:n,strokeWidth:o})}):null},zK=({defaultColor:e,rfId:t})=>{const n=Tt(a=>a.edges),r=Tt(a=>a.defaultEdgeOptions),i=y.useMemo(()=>wTe(n,{id:t,defaultColor:e,defaultMarkerStart:r==null?void 0:r.markerStart,defaultMarkerEnd:r==null?void 0:r.markerEnd}),[n,r,t,e]);return i.length?m.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:m.jsx("defs",{children:i.map(a=>m.jsx(pPe,{id:a.id,type:a.type,color:a.color,width:a.width,height:a.height,markerUnits:a.markerUnits,strokeWidth:a.strokeWidth,orient:a.orient},a.id))})}):null};zK.displayName="MarkerDefinitions";var gPe=y.memo(zK);function $K({x:e,y:t,label:n,labelStyle:r,labelShowBg:i=!0,labelBgStyle:a,labelBgPadding:o=[2,4],labelBgBorderRadius:l=2,children:c,className:f,...h}){const[d,g]=y.useState({x:1,y:0,width:0,height:0}),v=Zn(["react-flow__edge-textwrapper",f]),b=y.useRef(null);return y.useEffect(()=>{if(b.current){const w=b.current.getBBox();g({x:w.x,y:w.y,width:w.width,height:w.height})}},[n]),n?m.jsxs("g",{transform:`translate(${e-d.width/2} ${t-d.height/2})`,className:v,visibility:d.width?"visible":"hidden",...h,children:[i&&m.jsx("rect",{width:d.width+2*o[0],x:-o[0],y:-o[1],height:d.height+2*o[1],className:"react-flow__edge-textbg",style:a,rx:l,ry:l}),m.jsx("text",{className:"react-flow__edge-text",y:d.height/2,dy:"0.3em",ref:b,style:r,children:n}),c]}):null}$K.displayName="EdgeText";const vPe=y.memo($K);function Vb({path:e,labelX:t,labelY:n,label:r,labelStyle:i,labelShowBg:a,labelBgStyle:o,labelBgPadding:l,labelBgBorderRadius:c,interactionWidth:f=20,...h}){return m.jsxs(m.Fragment,{children:[m.jsx("path",{...h,d:e,fill:"none",className:Zn(["react-flow__edge-path",h.className])}),f?m.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:f,className:"react-flow__edge-interaction"}):null,r&&Oa(t)&&Oa(n)?m.jsx(vPe,{x:t,y:n,label:r,labelStyle:i,labelShowBg:a,labelBgStyle:o,labelBgPadding:l,labelBgBorderRadius:c}):null]})}function a5({pos:e,x1:t,y1:n,x2:r,y2:i}){return e===qe.Left||e===qe.Right?[.5*(t+r),n]:[t,.5*(n+i)]}function BK({sourceX:e,sourceY:t,sourcePosition:n=qe.Bottom,targetX:r,targetY:i,targetPosition:a=qe.Top}){const[o,l]=a5({pos:n,x1:e,y1:t,x2:r,y2:i}),[c,f]=a5({pos:a,x1:r,y1:i,x2:e,y2:t}),[h,d,g,v]=cK({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:o,sourceControlY:l,targetControlX:c,targetControlY:f});return[`M${e},${t} C${o},${l} ${c},${f} ${r},${i}`,h,d,g,v]}function FK(e){return y.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,sourcePosition:o,targetPosition:l,label:c,labelStyle:f,labelShowBg:h,labelBgStyle:d,labelBgPadding:g,labelBgBorderRadius:v,style:b,markerEnd:w,markerStart:S,interactionWidth:E})=>{const[C,_,N]=BK({sourceX:n,sourceY:r,sourcePosition:o,targetX:i,targetY:a,targetPosition:l}),O=e.isInternal?void 0:t;return m.jsx(Vb,{id:O,path:C,labelX:_,labelY:N,label:c,labelStyle:f,labelShowBg:h,labelBgStyle:d,labelBgPadding:g,labelBgBorderRadius:v,style:b,markerEnd:w,markerStart:S,interactionWidth:E})})}const yPe=FK({isInternal:!1}),UK=FK({isInternal:!0});yPe.displayName="SimpleBezierEdge";UK.displayName="SimpleBezierEdgeInternal";function HK(e){return y.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,label:o,labelStyle:l,labelShowBg:c,labelBgStyle:f,labelBgPadding:h,labelBgBorderRadius:d,style:g,sourcePosition:v=qe.Bottom,targetPosition:b=qe.Top,markerEnd:w,markerStart:S,pathOptions:E,interactionWidth:C})=>{const[_,N,O]=FC({sourceX:n,sourceY:r,sourcePosition:v,targetX:i,targetY:a,targetPosition:b,borderRadius:E==null?void 0:E.borderRadius,offset:E==null?void 0:E.offset,stepPosition:E==null?void 0:E.stepPosition}),A=e.isInternal?void 0:t;return m.jsx(Vb,{id:A,path:_,labelX:N,labelY:O,label:o,labelStyle:l,labelShowBg:c,labelBgStyle:f,labelBgPadding:h,labelBgBorderRadius:d,style:g,markerEnd:w,markerStart:S,interactionWidth:C})})}const qK=HK({isInternal:!1}),VK=HK({isInternal:!0});qK.displayName="SmoothStepEdge";VK.displayName="SmoothStepEdgeInternal";function KK(e){return y.memo(({id:t,...n})=>{var i;const r=e.isInternal?void 0:t;return m.jsx(qK,{...n,id:r,pathOptions:y.useMemo(()=>{var a;return{borderRadius:0,offset:(a=n.pathOptions)==null?void 0:a.offset}},[(i=n.pathOptions)==null?void 0:i.offset])})})}const xPe=KK({isInternal:!1}),YK=KK({isInternal:!0});xPe.displayName="StepEdge";YK.displayName="StepEdgeInternal";function XK(e){return y.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,label:o,labelStyle:l,labelShowBg:c,labelBgStyle:f,labelBgPadding:h,labelBgBorderRadius:d,style:g,markerEnd:v,markerStart:b,interactionWidth:w})=>{const[S,E,C]=hK({sourceX:n,sourceY:r,targetX:i,targetY:a}),_=e.isInternal?void 0:t;return m.jsx(Vb,{id:_,path:S,labelX:E,labelY:C,label:o,labelStyle:l,labelShowBg:c,labelBgStyle:f,labelBgPadding:h,labelBgBorderRadius:d,style:g,markerEnd:v,markerStart:b,interactionWidth:w})})}const bPe=XK({isInternal:!1}),GK=XK({isInternal:!0});bPe.displayName="StraightEdge";GK.displayName="StraightEdgeInternal";function WK(e){return y.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,sourcePosition:o=qe.Bottom,targetPosition:l=qe.Top,label:c,labelStyle:f,labelShowBg:h,labelBgStyle:d,labelBgPadding:g,labelBgBorderRadius:v,style:b,markerEnd:w,markerStart:S,pathOptions:E,interactionWidth:C})=>{const[_,N,O]=fK({sourceX:n,sourceY:r,sourcePosition:o,targetX:i,targetY:a,targetPosition:l,curvature:E==null?void 0:E.curvature}),A=e.isInternal?void 0:t;return m.jsx(Vb,{id:A,path:_,labelX:N,labelY:O,label:c,labelStyle:f,labelShowBg:h,labelBgStyle:d,labelBgPadding:g,labelBgBorderRadius:v,style:b,markerEnd:w,markerStart:S,interactionWidth:C})})}const wPe=WK({isInternal:!1}),QK=WK({isInternal:!0});wPe.displayName="BezierEdge";QK.displayName="BezierEdgeInternal";const o5={default:QK,straight:GK,step:YK,smoothstep:VK,simplebezier:UK},s5={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},SPe=(e,t,n)=>n===qe.Left?e-t:n===qe.Right?e+t:e,EPe=(e,t,n)=>n===qe.Top?e-t:n===qe.Bottom?e+t:e,l5="react-flow__edgeupdater";function u5({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:i,onMouseEnter:a,onMouseOut:o,type:l}){return m.jsx("circle",{onMouseDown:i,onMouseEnter:a,onMouseOut:o,className:Zn([l5,`${l5}-${l}`]),cx:SPe(t,r,e),cy:EPe(n,r,e),r,stroke:"transparent",fill:"transparent"})}function jPe({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:r,sourceY:i,targetX:a,targetY:o,sourcePosition:l,targetPosition:c,onReconnect:f,onReconnectStart:h,onReconnectEnd:d,setReconnecting:g,setUpdateHover:v}){const b=Cn(),w=(N,O)=>{if(N.button!==0)return;const{autoPanOnConnect:A,domNode:T,connectionMode:P,connectionRadius:I,lib:z,onConnectStart:F,cancelConnection:B,nodeLookup:G,rfId:L,panBy:V,updateConnection:D}=b.getState(),q=O.type==="target",X=(H,U)=>{g(!1),d==null||d(H,n,O.type,U)},K=H=>f==null?void 0:f(n,H),R=(H,U)=>{g(!0),h==null||h(N,n,O.type),F==null||F(H,U)};qC.onPointerDown(N.nativeEvent,{autoPanOnConnect:A,connectionMode:P,connectionRadius:I,domNode:T,handleId:O.id,nodeId:O.nodeId,nodeLookup:G,isTarget:q,edgeUpdaterType:O.type,lib:z,flowId:L,cancelConnection:B,panBy:V,isValidConnection:(...H)=>{var U,$;return(($=(U=b.getState()).isValidConnection)==null?void 0:$.call(U,...H))??!0},onConnect:K,onConnectStart:R,onConnectEnd:(...H)=>{var U,$;return($=(U=b.getState()).onConnectEnd)==null?void 0:$.call(U,...H)},onReconnectEnd:X,updateConnection:D,getTransform:()=>b.getState().transform,getFromHandle:()=>b.getState().connection.fromHandle,dragThreshold:b.getState().connectionDragThreshold,handleDomNode:N.currentTarget})},S=N=>w(N,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),E=N=>w(N,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),C=()=>v(!0),_=()=>v(!1);return m.jsxs(m.Fragment,{children:[(e===!0||e==="source")&&m.jsx(u5,{position:l,centerX:r,centerY:i,radius:t,onMouseDown:S,onMouseEnter:C,onMouseOut:_,type:"source"}),(e===!0||e==="target")&&m.jsx(u5,{position:c,centerX:a,centerY:o,radius:t,onMouseDown:E,onMouseEnter:C,onMouseOut:_,type:"target"})]})}function _Pe({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:r,onClick:i,onDoubleClick:a,onContextMenu:o,onMouseEnter:l,onMouseMove:c,onMouseLeave:f,reconnectRadius:h,onReconnect:d,onReconnectStart:g,onReconnectEnd:v,rfId:b,edgeTypes:w,noPanClassName:S,onError:E,disableKeyboardA11y:C}){let _=Tt(re=>re.edgeLookup.get(e));const N=Tt(re=>re.defaultEdgeOptions);_=N?{...N,..._}:_;let O=_.type||"default",A=(w==null?void 0:w[O])||o5[O];A===void 0&&(E==null||E("011",bo.error011(O)),O="default",A=(w==null?void 0:w.default)||o5.default);const T=!!(_.focusable||t&&typeof _.focusable>"u"),P=typeof d<"u"&&(_.reconnectable||n&&typeof _.reconnectable>"u"),I=!!(_.selectable||r&&typeof _.selectable>"u"),z=y.useRef(null),[F,B]=y.useState(!1),[G,L]=y.useState(!1),V=Cn(),{zIndex:D,sourceX:q,sourceY:X,targetX:K,targetY:R,sourcePosition:H,targetPosition:U}=Tt(y.useCallback(re=>{const we=re.nodeLookup.get(_.source),Ee=re.nodeLookup.get(_.target);if(!we||!Ee)return{zIndex:_.zIndex,...s5};const $e=bTe({id:e,sourceNode:we,targetNode:Ee,sourceHandle:_.sourceHandle||null,targetHandle:_.targetHandle||null,connectionMode:re.connectionMode,onError:E});return{zIndex:dTe({selected:_.selected,zIndex:_.zIndex,sourceNode:we,targetNode:Ee,elevateOnSelect:re.elevateEdgesOnSelect,zIndexMode:re.zIndexMode}),...$e||s5}},[_.source,_.target,_.sourceHandle,_.targetHandle,_.selected,_.zIndex]),_n),$=y.useMemo(()=>_.markerStart?`url('#${UC(_.markerStart,b)}')`:void 0,[_.markerStart,b]),Q=y.useMemo(()=>_.markerEnd?`url('#${UC(_.markerEnd,b)}')`:void 0,[_.markerEnd,b]);if(_.hidden||q===null||X===null||K===null||R===null)return null;const J=re=>{var Ne;const{addSelectedEdges:we,unselectNodesAndEdges:Ee,multiSelectionActive:$e}=V.getState();I&&(V.setState({nodesSelectionActive:!1}),_.selected&&$e?(Ee({nodes:[],edges:[_]}),(Ne=z.current)==null||Ne.blur()):we([e])),i&&i(re,_)},ne=a?re=>{a(re,{..._})}:void 0,ae=o?re=>{o(re,{..._})}:void 0,ie=l?re=>{l(re,{..._})}:void 0,ee=c?re=>{c(re,{..._})}:void 0,se=f?re=>{f(re,{..._})}:void 0,pe=re=>{var we;if(!C&&WV.includes(re.key)&&I){const{unselectNodesAndEdges:Ee,addSelectedEdges:$e}=V.getState();re.key==="Escape"?((we=z.current)==null||we.blur(),Ee({edges:[_]})):$e([e])}};return m.jsx("svg",{style:{zIndex:D},children:m.jsxs("g",{className:Zn(["react-flow__edge",`react-flow__edge-${O}`,_.className,S,{selected:_.selected,animated:_.animated,inactive:!I&&!i,updating:F,selectable:I}]),onClick:J,onDoubleClick:ne,onContextMenu:ae,onMouseEnter:ie,onMouseMove:ee,onMouseLeave:se,onKeyDown:T?pe:void 0,tabIndex:T?0:void 0,role:_.ariaRole??(T?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":_.ariaLabel===null?void 0:_.ariaLabel||`Edge from ${_.source} to ${_.target}`,"aria-describedby":T?`${NK}-${b}`:void 0,ref:z,..._.domAttributes,children:[!G&&m.jsx(A,{id:e,source:_.source,target:_.target,type:_.type,selected:_.selected,animated:_.animated,selectable:I,deletable:_.deletable??!0,label:_.label,labelStyle:_.labelStyle,labelShowBg:_.labelShowBg,labelBgStyle:_.labelBgStyle,labelBgPadding:_.labelBgPadding,labelBgBorderRadius:_.labelBgBorderRadius,sourceX:q,sourceY:X,targetX:K,targetY:R,sourcePosition:H,targetPosition:U,data:_.data,style:_.style,sourceHandleId:_.sourceHandle,targetHandleId:_.targetHandle,markerStart:$,markerEnd:Q,pathOptions:"pathOptions"in _?_.pathOptions:void 0,interactionWidth:_.interactionWidth}),P&&m.jsx(jPe,{edge:_,isReconnectable:P,reconnectRadius:h,onReconnect:d,onReconnectStart:g,onReconnectEnd:v,sourceX:q,sourceY:X,targetX:K,targetY:R,sourcePosition:H,targetPosition:U,setUpdateHover:B,setReconnecting:L})]})})}var CPe=y.memo(_Pe);const kPe=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function ZK({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:r,noPanClassName:i,onReconnect:a,onEdgeContextMenu:o,onEdgeMouseEnter:l,onEdgeMouseMove:c,onEdgeMouseLeave:f,onEdgeClick:h,reconnectRadius:d,onEdgeDoubleClick:g,onReconnectStart:v,onReconnectEnd:b,disableKeyboardA11y:w}){const{edgesFocusable:S,edgesReconnectable:E,elementsSelectable:C,onError:_}=Tt(kPe,_n),N=fPe(t);return m.jsxs("div",{className:"react-flow__edges",children:[m.jsx(gPe,{defaultColor:e,rfId:n}),N.map(O=>m.jsx(CPe,{id:O,edgesFocusable:S,edgesReconnectable:E,elementsSelectable:C,noPanClassName:i,onReconnect:a,onContextMenu:o,onMouseEnter:l,onMouseMove:c,onMouseLeave:f,onClick:h,reconnectRadius:d,onDoubleClick:g,onReconnectStart:v,onReconnectEnd:b,rfId:n,onError:_,edgeTypes:r,disableKeyboardA11y:w},O))]})}ZK.displayName="EdgeRenderer";const NPe=y.memo(ZK),APe=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function OPe({children:e}){const t=Tt(APe);return m.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function TPe(e){const t=Hb(),n=y.useRef(!1);y.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const PPe=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function MPe(e){const t=Tt(PPe),n=Cn();return y.useEffect(()=>{e&&(t==null||t(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function DPe(e){return e.connection.inProgress?{...e.connection,to:ug(e.connection.to,e.transform)}:{...e.connection}}function RPe(e){return DPe}function IPe(e){const t=RPe();return Tt(t,_n)}const LPe=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function zPe({containerStyle:e,style:t,type:n,component:r}){const{nodesConnectable:i,width:a,height:o,isValid:l,inProgress:c}=Tt(LPe,_n);return!(a&&i&&c)?null:m.jsx("svg",{style:e,width:a,height:o,className:"react-flow__connectionline react-flow__container",children:m.jsx("g",{className:Zn(["react-flow__connection",JV(l)]),children:m.jsx(JK,{style:t,type:n,CustomComponent:r,isValid:l})})})}const JK=({style:e,type:t=El.Bezier,CustomComponent:n,isValid:r})=>{const{inProgress:i,from:a,fromNode:o,fromHandle:l,fromPosition:c,to:f,toNode:h,toHandle:d,toPosition:g,pointer:v}=IPe();if(!i)return;if(n)return m.jsx(n,{connectionLineType:t,connectionLineStyle:e,fromNode:o,fromHandle:l,fromX:a.x,fromY:a.y,toX:f.x,toY:f.y,fromPosition:c,toPosition:g,connectionStatus:JV(r),toNode:h,toHandle:d,pointer:v});let b="";const w={sourceX:a.x,sourceY:a.y,sourcePosition:c,targetX:f.x,targetY:f.y,targetPosition:g};switch(t){case El.Bezier:[b]=fK(w);break;case El.SimpleBezier:[b]=BK(w);break;case El.Step:[b]=FC({...w,borderRadius:0});break;case El.SmoothStep:[b]=FC(w);break;default:[b]=hK(w)}return m.jsx("path",{d:b,fill:"none",className:"react-flow__connection-path",style:e})};JK.displayName="ConnectionLine";const $Pe={};function c5(e=$Pe){y.useRef(e),Cn(),y.useEffect(()=>{},[e])}function BPe(){Cn(),y.useRef(!1),y.useEffect(()=>{},[])}function eY({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:r,onEdgeClick:i,onNodeDoubleClick:a,onEdgeDoubleClick:o,onNodeMouseEnter:l,onNodeMouseMove:c,onNodeMouseLeave:f,onNodeContextMenu:h,onSelectionContextMenu:d,onSelectionStart:g,onSelectionEnd:v,connectionLineType:b,connectionLineStyle:w,connectionLineComponent:S,connectionLineContainerStyle:E,selectionKeyCode:C,selectionOnDrag:_,selectionMode:N,multiSelectionKeyCode:O,panActivationKeyCode:A,zoomActivationKeyCode:T,deleteKeyCode:P,onlyRenderVisibleElements:I,elementsSelectable:z,defaultViewport:F,translateExtent:B,minZoom:G,maxZoom:L,preventScrolling:V,defaultMarkerColor:D,zoomOnScroll:q,zoomOnPinch:X,panOnScroll:K,panOnScrollSpeed:R,panOnScrollMode:H,zoomOnDoubleClick:U,panOnDrag:$,onPaneClick:Q,onPaneMouseEnter:J,onPaneMouseMove:ne,onPaneMouseLeave:ae,onPaneScroll:ie,onPaneContextMenu:ee,paneClickDistance:se,nodeClickDistance:pe,onEdgeContextMenu:re,onEdgeMouseEnter:we,onEdgeMouseMove:Ee,onEdgeMouseLeave:$e,reconnectRadius:Ne,onReconnect:et,onReconnectStart:Xe,onReconnectEnd:Ke,noDragClassName:Rt,noWheelClassName:ct,noPanClassName:wt,disableKeyboardA11y:Xt,nodeExtent:Mt,rfId:cn,viewport:de,onViewportChange:xe}){return c5(e),c5(t),BPe(),TPe(n),MPe(de),m.jsx(tPe,{onPaneClick:Q,onPaneMouseEnter:J,onPaneMouseMove:ne,onPaneMouseLeave:ae,onPaneContextMenu:ee,onPaneScroll:ie,paneClickDistance:se,deleteKeyCode:P,selectionKeyCode:C,selectionOnDrag:_,selectionMode:N,onSelectionStart:g,onSelectionEnd:v,multiSelectionKeyCode:O,panActivationKeyCode:A,zoomActivationKeyCode:T,elementsSelectable:z,zoomOnScroll:q,zoomOnPinch:X,zoomOnDoubleClick:U,panOnScroll:K,panOnScrollSpeed:R,panOnScrollMode:H,panOnDrag:$,defaultViewport:F,translateExtent:B,minZoom:G,maxZoom:L,onSelectionContextMenu:d,preventScrolling:V,noDragClassName:Rt,noWheelClassName:ct,noPanClassName:wt,disableKeyboardA11y:Xt,onViewportChange:xe,isControlledViewport:!!de,children:m.jsxs(OPe,{children:[m.jsx(NPe,{edgeTypes:t,onEdgeClick:i,onEdgeDoubleClick:o,onReconnect:et,onReconnectStart:Xe,onReconnectEnd:Ke,onlyRenderVisibleElements:I,onEdgeContextMenu:re,onEdgeMouseEnter:we,onEdgeMouseMove:Ee,onEdgeMouseLeave:$e,reconnectRadius:Ne,defaultMarkerColor:D,noPanClassName:wt,disableKeyboardA11y:Xt,rfId:cn}),m.jsx(zPe,{style:w,type:b,component:S,containerStyle:E}),m.jsx("div",{className:"react-flow__edgelabel-renderer"}),m.jsx(cPe,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:a,onNodeMouseEnter:l,onNodeMouseMove:c,onNodeMouseLeave:f,onNodeContextMenu:h,nodeClickDistance:pe,onlyRenderVisibleElements:I,noPanClassName:wt,noDragClassName:Rt,disableKeyboardA11y:Xt,nodeExtent:Mt,rfId:cn}),m.jsx("div",{className:"react-flow__viewport-portal"})]})})}eY.displayName="GraphView";const FPe=y.memo(eY),f5=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:a,fitView:o,fitViewOptions:l,minZoom:c=.5,maxZoom:f=2,nodeOrigin:h,nodeExtent:d,zIndexMode:g="basic"}={})=>{const v=new Map,b=new Map,w=new Map,S=new Map,E=r??t??[],C=n??e??[],_=h??[0,0],N=d??np;gK(w,S,E);const O=HC(C,v,b,{nodeOrigin:_,nodeExtent:N,zIndexMode:g});let A=[0,0,1];if(o&&i&&a){const T=sg(v,{filter:F=>!!((F.width||F.initialWidth)&&(F.height||F.initialHeight))}),{x:P,y:I,zoom:z}=BO(T,i,a,c,f,(l==null?void 0:l.padding)??.1);A=[P,I,z]}return{rfId:"1",width:i??0,height:a??0,transform:A,nodes:C,nodesInitialized:O,nodeLookup:v,parentLookup:b,edges:E,edgeLookup:S,connectionLookup:w,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:c,maxZoom:f,translateExtent:np,nodeExtent:N,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:jd.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:_,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:o??!1,fitViewOptions:l,fitViewResolver:null,connection:{...ZV},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:oTe,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:QV,zIndexMode:g,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},UPe=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:a,fitView:o,fitViewOptions:l,minZoom:c,maxZoom:f,nodeOrigin:h,nodeExtent:d,zIndexMode:g})=>i2e((v,b)=>{async function w(){const{nodeLookup:S,panZoom:E,fitViewOptions:C,fitViewResolver:_,width:N,height:O,minZoom:A,maxZoom:T}=b();E&&(await iTe({nodes:S,width:N,height:O,panZoom:E,minZoom:A,maxZoom:T},C),_==null||_.resolve(!0),v({fitViewResolver:null}))}return{...f5({nodes:e,edges:t,width:i,height:a,fitView:o,fitViewOptions:l,minZoom:c,maxZoom:f,nodeOrigin:h,nodeExtent:d,defaultNodes:n,defaultEdges:r,zIndexMode:g}),setNodes:S=>{const{nodeLookup:E,parentLookup:C,nodeOrigin:_,elevateNodesOnSelect:N,fitViewQueued:O,zIndexMode:A}=b(),T=HC(S,E,C,{nodeOrigin:_,nodeExtent:d,elevateNodesOnSelect:N,checkEquality:!0,zIndexMode:A});O&&T?(w(),v({nodes:S,nodesInitialized:T,fitViewQueued:!1,fitViewOptions:void 0})):v({nodes:S,nodesInitialized:T})},setEdges:S=>{const{connectionLookup:E,edgeLookup:C}=b();gK(E,C,S),v({edges:S})},setDefaultNodesAndEdges:(S,E)=>{if(S){const{setNodes:C}=b();C(S),v({hasDefaultNodes:!0})}if(E){const{setEdges:C}=b();C(E),v({hasDefaultEdges:!0})}},updateNodeInternals:S=>{const{triggerNodeChanges:E,nodeLookup:C,parentLookup:_,domNode:N,nodeOrigin:O,nodeExtent:A,debug:T,fitViewQueued:P,zIndexMode:I}=b(),{changes:z,updatedInternals:F}=NTe(S,C,_,N,O,A,I);F&&(jTe(C,_,{nodeOrigin:O,nodeExtent:A,zIndexMode:I}),P?(w(),v({fitViewQueued:!1,fitViewOptions:void 0})):v({}),(z==null?void 0:z.length)>0&&(T&&console.log("React Flow: trigger node changes",z),E==null||E(z)))},updateNodePositions:(S,E=!1)=>{const C=[];let _=[];const{nodeLookup:N,triggerNodeChanges:O,connection:A,updateConnection:T,onNodesChangeMiddlewareMap:P}=b();for(const[I,z]of S){const F=N.get(I),B=!!(F!=null&&F.expandParent&&(F!=null&&F.parentId)&&(z!=null&&z.position)),G={id:I,type:"position",position:B?{x:Math.max(0,z.position.x),y:Math.max(0,z.position.y)}:z.position,dragging:E};if(F&&A.inProgress&&A.fromNode.id===F.id){const L=_c(F,A.fromHandle,qe.Left,!0);T({...A,from:L})}B&&F.parentId&&C.push({id:I,parentId:F.parentId,rect:{...z.internals.positionAbsolute,width:z.measured.width??0,height:z.measured.height??0}}),_.push(G)}if(C.length>0){const{parentLookup:I,nodeOrigin:z}=b(),F=KO(C,N,I,z);_.push(...F)}for(const I of P.values())_=I(_);O(_)},triggerNodeChanges:S=>{const{onNodesChange:E,setNodes:C,nodes:_,hasDefaultNodes:N,debug:O}=b();if(S!=null&&S.length){if(N){const A=_2e(S,_);C(A)}O&&console.log("React Flow: trigger node changes",S),E==null||E(S)}},triggerEdgeChanges:S=>{const{onEdgesChange:E,setEdges:C,edges:_,hasDefaultEdges:N,debug:O}=b();if(S!=null&&S.length){if(N){const A=C2e(S,_);C(A)}O&&console.log("React Flow: trigger edge changes",S),E==null||E(S)}},addSelectedNodes:S=>{const{multiSelectionActive:E,edgeLookup:C,nodeLookup:_,triggerNodeChanges:N,triggerEdgeChanges:O}=b();if(E){const A=S.map(T=>Ru(T,!0));N(A);return}N(Bf(_,new Set([...S]),!0)),O(Bf(C))},addSelectedEdges:S=>{const{multiSelectionActive:E,edgeLookup:C,nodeLookup:_,triggerNodeChanges:N,triggerEdgeChanges:O}=b();if(E){const A=S.map(T=>Ru(T,!0));O(A);return}O(Bf(C,new Set([...S]))),N(Bf(_,new Set,!0))},unselectNodesAndEdges:({nodes:S,edges:E}={})=>{const{edges:C,nodes:_,nodeLookup:N,triggerNodeChanges:O,triggerEdgeChanges:A}=b(),T=S||_,P=E||C,I=[];for(const F of T){if(!F.selected)continue;const B=N.get(F.id);B&&(B.selected=!1),I.push(Ru(F.id,!1))}const z=[];for(const F of P)F.selected&&z.push(Ru(F.id,!1));O(I),A(z)},setMinZoom:S=>{const{panZoom:E,maxZoom:C}=b();E==null||E.setScaleExtent([S,C]),v({minZoom:S})},setMaxZoom:S=>{const{panZoom:E,minZoom:C}=b();E==null||E.setScaleExtent([C,S]),v({maxZoom:S})},setTranslateExtent:S=>{var E;(E=b().panZoom)==null||E.setTranslateExtent(S),v({translateExtent:S})},resetSelectedElements:()=>{const{edges:S,nodes:E,triggerNodeChanges:C,triggerEdgeChanges:_,elementsSelectable:N}=b();if(!N)return;const O=E.reduce((T,P)=>P.selected?[...T,Ru(P.id,!1)]:T,[]),A=S.reduce((T,P)=>P.selected?[...T,Ru(P.id,!1)]:T,[]);C(O),_(A)},setNodeExtent:S=>{const{nodes:E,nodeLookup:C,parentLookup:_,nodeOrigin:N,elevateNodesOnSelect:O,nodeExtent:A,zIndexMode:T}=b();S[0][0]===A[0][0]&&S[0][1]===A[0][1]&&S[1][0]===A[1][0]&&S[1][1]===A[1][1]||(HC(E,C,_,{nodeOrigin:N,nodeExtent:S,elevateNodesOnSelect:O,checkEquality:!1,zIndexMode:T}),v({nodeExtent:S}))},panBy:S=>{const{transform:E,width:C,height:_,panZoom:N,translateExtent:O}=b();return ATe({delta:S,panZoom:N,transform:E,translateExtent:O,width:C,height:_})},setCenter:async(S,E,C)=>{const{width:_,height:N,maxZoom:O,panZoom:A}=b();if(!A)return Promise.resolve(!1);const T=typeof(C==null?void 0:C.zoom)<"u"?C.zoom:O;return await A.setViewport({x:_/2-S*T,y:N/2-E*T,zoom:T},{duration:C==null?void 0:C.duration,ease:C==null?void 0:C.ease,interpolate:C==null?void 0:C.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{v({connection:{...ZV}})},updateConnection:S=>{v({connection:S})},reset:()=>v({...f5()})}},Object.is);function tY({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:r,initialWidth:i,initialHeight:a,initialMinZoom:o,initialMaxZoom:l,initialFitViewOptions:c,fitView:f,nodeOrigin:h,nodeExtent:d,zIndexMode:g,children:v}){const[b]=y.useState(()=>UPe({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:a,fitView:f,minZoom:o,maxZoom:l,fitViewOptions:c,nodeOrigin:h,nodeExtent:d,zIndexMode:g}));return m.jsx(a2e,{value:b,children:m.jsx(O2e,{children:v})})}function HPe({children:e,nodes:t,edges:n,defaultNodes:r,defaultEdges:i,width:a,height:o,fitView:l,fitViewOptions:c,minZoom:f,maxZoom:h,nodeOrigin:d,nodeExtent:g,zIndexMode:v}){return y.useContext(Fb)?m.jsx(m.Fragment,{children:e}):m.jsx(tY,{initialNodes:t,initialEdges:n,defaultNodes:r,defaultEdges:i,initialWidth:a,initialHeight:o,fitView:l,initialFitViewOptions:c,initialMinZoom:f,initialMaxZoom:h,nodeOrigin:d,nodeExtent:g,zIndexMode:v,children:e})}const qPe={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function VPe({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:i,nodeTypes:a,edgeTypes:o,onNodeClick:l,onEdgeClick:c,onInit:f,onMove:h,onMoveStart:d,onMoveEnd:g,onConnect:v,onConnectStart:b,onConnectEnd:w,onClickConnectStart:S,onClickConnectEnd:E,onNodeMouseEnter:C,onNodeMouseMove:_,onNodeMouseLeave:N,onNodeContextMenu:O,onNodeDoubleClick:A,onNodeDragStart:T,onNodeDrag:P,onNodeDragStop:I,onNodesDelete:z,onEdgesDelete:F,onDelete:B,onSelectionChange:G,onSelectionDragStart:L,onSelectionDrag:V,onSelectionDragStop:D,onSelectionContextMenu:q,onSelectionStart:X,onSelectionEnd:K,onBeforeDelete:R,connectionMode:H,connectionLineType:U=El.Bezier,connectionLineStyle:$,connectionLineComponent:Q,connectionLineContainerStyle:J,deleteKeyCode:ne="Backspace",selectionKeyCode:ae="Shift",selectionOnDrag:ie=!1,selectionMode:ee=rp.Full,panActivationKeyCode:se="Space",multiSelectionKeyCode:pe=ap()?"Meta":"Control",zoomActivationKeyCode:re=ap()?"Meta":"Control",snapToGrid:we,snapGrid:Ee,onlyRenderVisibleElements:$e=!1,selectNodesOnDrag:Ne,nodesDraggable:et,autoPanOnNodeFocus:Xe,nodesConnectable:Ke,nodesFocusable:Rt,nodeOrigin:ct=AK,edgesFocusable:wt,edgesReconnectable:Xt,elementsSelectable:Mt=!0,defaultViewport:cn=y2e,minZoom:de=.5,maxZoom:xe=2,translateExtent:Te=np,preventScrolling:Ge=!0,nodeExtent:We,defaultMarkerColor:Gt="#b1b1b7",zoomOnScroll:nn=!0,zoomOnPinch:Se=!0,panOnScroll:at=!1,panOnScrollSpeed:vt=.5,panOnScrollMode:st=rc.Free,zoomOnDoubleClick:zn=!0,panOnDrag:rn=!0,onPaneClick:dr,onPaneMouseEnter:Yr,onPaneMouseMove:Pr,onPaneMouseLeave:ii,onPaneScroll:Sr,onPaneContextMenu:Ye,paneClickDistance:qt=1,nodeClickDistance:me=0,children:Ze,onReconnect:an,onReconnectStart:St,onReconnectEnd:Nn,onEdgeContextMenu:Xr,onEdgeDoubleClick:hr,onEdgeMouseEnter:Jn,onEdgeMouseMove:Va,onEdgeMouseLeave:Gr,reconnectRadius:Rs=10,onNodesChange:ge,onEdgesChange:ft,noDragClassName:Dt="nodrag",noWheelClassName:on="nowheel",noPanClassName:ga="nopan",fitView:Ka,fitViewOptions:hg,connectOnClick:Qb,attributionPosition:mg,proOptions:au,defaultEdgeOptions:Jd,elevateNodesOnSelect:Is=!0,elevateEdgesOnSelect:Ls=!1,disableKeyboardA11y:zs=!1,autoPanOnConnect:$s,autoPanOnNodeDrag:Fn,autoPanSpeed:pg,connectionRadius:gg,isValidConnection:Co,onError:Bs,style:Zb,id:eh,nodeDragThreshold:vg,connectionDragThreshold:Jb,viewport:zc,onViewportChange:$c,width:va,height:ai,colorMode:yg="light",debug:ew,onScroll:Fs,ariaLabelConfig:xg,zIndexMode:ou="basic",...tw},oi){const su=eh||"1",bg=S2e(yg),th=y.useCallback(ko=>{ko.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Fs==null||Fs(ko)},[Fs]);return m.jsx("div",{"data-testid":"rf__wrapper",...tw,onScroll:th,style:{...Zb,...qPe},ref:oi,className:Zn(["react-flow",i,bg]),id:eh,role:"application",children:m.jsxs(HPe,{nodes:e,edges:t,width:va,height:ai,fitView:Ka,fitViewOptions:hg,minZoom:de,maxZoom:xe,nodeOrigin:ct,nodeExtent:We,zIndexMode:ou,children:[m.jsx(FPe,{onInit:f,onNodeClick:l,onEdgeClick:c,onNodeMouseEnter:C,onNodeMouseMove:_,onNodeMouseLeave:N,onNodeContextMenu:O,onNodeDoubleClick:A,nodeTypes:a,edgeTypes:o,connectionLineType:U,connectionLineStyle:$,connectionLineComponent:Q,connectionLineContainerStyle:J,selectionKeyCode:ae,selectionOnDrag:ie,selectionMode:ee,deleteKeyCode:ne,multiSelectionKeyCode:pe,panActivationKeyCode:se,zoomActivationKeyCode:re,onlyRenderVisibleElements:$e,defaultViewport:cn,translateExtent:Te,minZoom:de,maxZoom:xe,preventScrolling:Ge,zoomOnScroll:nn,zoomOnPinch:Se,zoomOnDoubleClick:zn,panOnScroll:at,panOnScrollSpeed:vt,panOnScrollMode:st,panOnDrag:rn,onPaneClick:dr,onPaneMouseEnter:Yr,onPaneMouseMove:Pr,onPaneMouseLeave:ii,onPaneScroll:Sr,onPaneContextMenu:Ye,paneClickDistance:qt,nodeClickDistance:me,onSelectionContextMenu:q,onSelectionStart:X,onSelectionEnd:K,onReconnect:an,onReconnectStart:St,onReconnectEnd:Nn,onEdgeContextMenu:Xr,onEdgeDoubleClick:hr,onEdgeMouseEnter:Jn,onEdgeMouseMove:Va,onEdgeMouseLeave:Gr,reconnectRadius:Rs,defaultMarkerColor:Gt,noDragClassName:Dt,noWheelClassName:on,noPanClassName:ga,rfId:su,disableKeyboardA11y:zs,nodeExtent:We,viewport:zc,onViewportChange:$c}),m.jsx(w2e,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:v,onConnectStart:b,onConnectEnd:w,onClickConnectStart:S,onClickConnectEnd:E,nodesDraggable:et,autoPanOnNodeFocus:Xe,nodesConnectable:Ke,nodesFocusable:Rt,edgesFocusable:wt,edgesReconnectable:Xt,elementsSelectable:Mt,elevateNodesOnSelect:Is,elevateEdgesOnSelect:Ls,minZoom:de,maxZoom:xe,nodeExtent:We,onNodesChange:ge,onEdgesChange:ft,snapToGrid:we,snapGrid:Ee,connectionMode:H,translateExtent:Te,connectOnClick:Qb,defaultEdgeOptions:Jd,fitView:Ka,fitViewOptions:hg,onNodesDelete:z,onEdgesDelete:F,onDelete:B,onNodeDragStart:T,onNodeDrag:P,onNodeDragStop:I,onSelectionDrag:V,onSelectionDragStart:L,onSelectionDragStop:D,onMove:h,onMoveStart:d,onMoveEnd:g,noPanClassName:ga,nodeOrigin:ct,rfId:su,autoPanOnConnect:$s,autoPanOnNodeDrag:Fn,autoPanSpeed:pg,onError:Bs,connectionRadius:gg,isValidConnection:Co,selectNodesOnDrag:Ne,nodeDragThreshold:vg,connectionDragThreshold:Jb,onBeforeDelete:R,debug:ew,ariaLabelConfig:xg,zIndexMode:ou}),m.jsx(v2e,{onSelectionChange:G}),Ze,m.jsx(d2e,{proOptions:au,position:mg}),m.jsx(f2e,{rfId:su,disableKeyboardA11y:zs})]})})}var KPe=TK(VPe);function YPe({dimensions:e,lineWidth:t,variant:n,className:r}){return m.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:Zn(["react-flow__background-pattern",n,r])})}function XPe({radius:e,className:t}){return m.jsx("circle",{cx:e,cy:e,r:e,className:Zn(["react-flow__background-pattern","dots",t])})}var $l;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})($l||($l={}));const GPe={[$l.Dots]:1,[$l.Lines]:1,[$l.Cross]:6},WPe=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function nY({id:e,variant:t=$l.Dots,gap:n=20,size:r,lineWidth:i=1,offset:a=0,color:o,bgColor:l,style:c,className:f,patternClassName:h}){const d=y.useRef(null),{transform:g,patternId:v}=Tt(WPe,_n),b=r||GPe[t],w=t===$l.Dots,S=t===$l.Cross,E=Array.isArray(n)?n:[n,n],C=[E[0]*g[2]||1,E[1]*g[2]||1],_=b*g[2],N=Array.isArray(a)?a:[a,a],O=S?[_,_]:C,A=[N[0]*g[2]||1+O[0]/2,N[1]*g[2]||1+O[1]/2],T=`${v}${e||""}`;return m.jsxs("svg",{className:Zn(["react-flow__background",f]),style:{...c,...qb,"--xy-background-color-props":l,"--xy-background-pattern-color-props":o},ref:d,"data-testid":"rf__background",children:[m.jsx("pattern",{id:T,x:g[0]%C[0],y:g[1]%C[1],width:C[0],height:C[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${A[0]},-${A[1]})`,children:w?m.jsx(XPe,{radius:_/2,className:h}):m.jsx(YPe,{dimensions:O,lineWidth:i,variant:t,className:h})}),m.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${T})`})]})}nY.displayName="Background";y.memo(nY);function QPe(){return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:m.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function ZPe(){return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:m.jsx("path",{d:"M0 0h32v4.2H0z"})})}function JPe(){return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:m.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function eMe(){return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:m.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function tMe(){return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:m.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function fy({children:e,className:t,...n}){return m.jsx("button",{type:"button",className:Zn(["react-flow__controls-button",t]),...n,children:e})}const nMe=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function rY({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:i,onZoomIn:a,onZoomOut:o,onFitView:l,onInteractiveChange:c,className:f,children:h,position:d="bottom-left",orientation:g="vertical","aria-label":v}){const b=Cn(),{isInteractive:w,minZoomReached:S,maxZoomReached:E,ariaLabelConfig:C}=Tt(nMe,_n),{zoomIn:_,zoomOut:N,fitView:O}=Hb(),A=()=>{_(),a==null||a()},T=()=>{N(),o==null||o()},P=()=>{O(i),l==null||l()},I=()=>{b.setState({nodesDraggable:!w,nodesConnectable:!w,elementsSelectable:!w}),c==null||c(!w)},z=g==="horizontal"?"horizontal":"vertical";return m.jsxs(Ub,{className:Zn(["react-flow__controls",z,f]),position:d,style:e,"data-testid":"rf__controls","aria-label":v??C["controls.ariaLabel"],children:[t&&m.jsxs(m.Fragment,{children:[m.jsx(fy,{onClick:A,className:"react-flow__controls-zoomin",title:C["controls.zoomIn.ariaLabel"],"aria-label":C["controls.zoomIn.ariaLabel"],disabled:E,children:m.jsx(QPe,{})}),m.jsx(fy,{onClick:T,className:"react-flow__controls-zoomout",title:C["controls.zoomOut.ariaLabel"],"aria-label":C["controls.zoomOut.ariaLabel"],disabled:S,children:m.jsx(ZPe,{})})]}),n&&m.jsx(fy,{className:"react-flow__controls-fitview",onClick:P,title:C["controls.fitView.ariaLabel"],"aria-label":C["controls.fitView.ariaLabel"],children:m.jsx(JPe,{})}),r&&m.jsx(fy,{className:"react-flow__controls-interactive",onClick:I,title:C["controls.interactive.ariaLabel"],"aria-label":C["controls.interactive.ariaLabel"],children:w?m.jsx(tMe,{}):m.jsx(eMe,{})}),h]})}rY.displayName="Controls";y.memo(rY);function rMe({id:e,x:t,y:n,width:r,height:i,style:a,color:o,strokeColor:l,strokeWidth:c,className:f,borderRadius:h,shapeRendering:d,selected:g,onClick:v}){const{background:b,backgroundColor:w}=a||{},S=o||b||w;return m.jsx("rect",{className:Zn(["react-flow__minimap-node",{selected:g},f]),x:t,y:n,rx:h,ry:h,width:r,height:i,style:{fill:S,stroke:l,strokeWidth:c},shapeRendering:d,onClick:v?E=>v(E,e):void 0})}const iMe=y.memo(rMe),aMe=e=>e.nodes.map(t=>t.id),wj=e=>e instanceof Function?e:()=>e;function oMe({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:r=5,nodeStrokeWidth:i,nodeComponent:a=iMe,onClick:o}){const l=Tt(aMe,_n),c=wj(t),f=wj(e),h=wj(n),d=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return m.jsx(m.Fragment,{children:l.map(g=>m.jsx(lMe,{id:g,nodeColorFunc:c,nodeStrokeColorFunc:f,nodeClassNameFunc:h,nodeBorderRadius:r,nodeStrokeWidth:i,NodeComponent:a,onClick:o,shapeRendering:d},g))})}function sMe({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:r,nodeBorderRadius:i,nodeStrokeWidth:a,shapeRendering:o,NodeComponent:l,onClick:c}){const{node:f,x:h,y:d,width:g,height:v}=Tt(b=>{const w=b.nodeLookup.get(e);if(!w)return{node:void 0,x:0,y:0,width:0,height:0};const S=w.internals.userNode,{x:E,y:C}=w.internals.positionAbsolute,{width:_,height:N}=Ms(S);return{node:S,x:E,y:C,width:_,height:N}},_n);return!f||f.hidden||!aK(f)?null:m.jsx(l,{x:h,y:d,width:g,height:v,style:f.style,selected:!!f.selected,className:r(f),color:t(f),borderRadius:i,strokeColor:n(f),strokeWidth:a,shapeRendering:o,onClick:c,id:f.id})}const lMe=y.memo(sMe);var uMe=y.memo(oMe);const cMe=200,fMe=150,dMe=e=>!e.hidden,hMe=e=>{const t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?iK(sg(e.nodeLookup,{filter:dMe}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},mMe="react-flow__minimap-desc";function iY({style:e,className:t,nodeStrokeColor:n,nodeColor:r,nodeClassName:i="",nodeBorderRadius:a=5,nodeStrokeWidth:o,nodeComponent:l,bgColor:c,maskColor:f,maskStrokeColor:h,maskStrokeWidth:d,position:g="bottom-right",onClick:v,onNodeClick:b,pannable:w=!1,zoomable:S=!1,ariaLabel:E,inversePan:C,zoomStep:_=1,offsetScale:N=5}){const O=Cn(),A=y.useRef(null),{boundingRect:T,viewBB:P,rfId:I,panZoom:z,translateExtent:F,flowWidth:B,flowHeight:G,ariaLabelConfig:L}=Tt(hMe,_n),V=(e==null?void 0:e.width)??cMe,D=(e==null?void 0:e.height)??fMe,q=T.width/V,X=T.height/D,K=Math.max(q,X),R=K*V,H=K*D,U=N*K,$=T.x-(R-T.width)/2-U,Q=T.y-(H-T.height)/2-U,J=R+U*2,ne=H+U*2,ae=`${mMe}-${I}`,ie=y.useRef(0),ee=y.useRef();ie.current=K,y.useEffect(()=>{if(A.current&&z)return ee.current=zTe({domNode:A.current,panZoom:z,getTransform:()=>O.getState().transform,getViewScale:()=>ie.current}),()=>{var we;(we=ee.current)==null||we.destroy()}},[z]),y.useEffect(()=>{var we;(we=ee.current)==null||we.update({translateExtent:F,width:B,height:G,inversePan:C,pannable:w,zoomStep:_,zoomable:S})},[w,S,C,_,F,B,G]);const se=v?we=>{var Ne;const[Ee,$e]=((Ne=ee.current)==null?void 0:Ne.pointer(we))||[0,0];v(we,{x:Ee,y:$e})}:void 0,pe=b?y.useCallback((we,Ee)=>{const $e=O.getState().nodeLookup.get(Ee).internals.userNode;b(we,$e)},[]):void 0,re=E??L["minimap.ariaLabel"];return m.jsx(Ub,{position:g,style:{...e,"--xy-minimap-background-color-props":typeof c=="string"?c:void 0,"--xy-minimap-mask-background-color-props":typeof f=="string"?f:void 0,"--xy-minimap-mask-stroke-color-props":typeof h=="string"?h:void 0,"--xy-minimap-mask-stroke-width-props":typeof d=="number"?d*K:void 0,"--xy-minimap-node-background-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof o=="number"?o:void 0},className:Zn(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:m.jsxs("svg",{width:V,height:D,viewBox:`${$} ${Q} ${J} ${ne}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":ae,ref:A,onClick:se,children:[re&&m.jsx("title",{id:ae,children:re}),m.jsx(uMe,{onClick:pe,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:a,nodeClassName:i,nodeStrokeWidth:o,nodeComponent:l}),m.jsx("path",{className:"react-flow__minimap-mask",d:`M${$-U},${Q-U}h${J+U*2}v${ne+U*2}h${-J-U*2}z
        M${P.x},${P.y}h${P.width}v${P.height}h${-P.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}iY.displayName="MiniMap";y.memo(iY);const pMe=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,gMe={[Ad.Line]:"right",[Ad.Handle]:"bottom-right"};function vMe({nodeId:e,position:t,variant:n=Ad.Handle,className:r,style:i=void 0,children:a,color:o,minWidth:l=10,minHeight:c=10,maxWidth:f=Number.MAX_VALUE,maxHeight:h=Number.MAX_VALUE,keepAspectRatio:d=!1,resizeDirection:g,autoScale:v=!0,shouldResize:b,onResizeStart:w,onResize:S,onResizeEnd:E}){const C=RK(),_=typeof e=="string"?e:C,N=Cn(),O=y.useRef(null),A=n===Ad.Handle,T=Tt(y.useCallback(pMe(A&&v),[A,v]),_n),P=y.useRef(null),I=t??gMe[n];y.useEffect(()=>{if(!(!O.current||!_))return P.current||(P.current=ZTe({domNode:O.current,nodeId:_,getStoreItems:()=>{const{nodeLookup:F,transform:B,snapGrid:G,snapToGrid:L,nodeOrigin:V,domNode:D}=N.getState();return{nodeLookup:F,transform:B,snapGrid:G,snapToGrid:L,nodeOrigin:V,paneDomNode:D}},onChange:(F,B)=>{const{triggerNodeChanges:G,nodeLookup:L,parentLookup:V,nodeOrigin:D}=N.getState(),q=[],X={x:F.x,y:F.y},K=L.get(_);if(K&&K.expandParent&&K.parentId){const R=K.origin??D,H=F.width??K.measured.width??0,U=F.height??K.measured.height??0,$={id:K.id,parentId:K.parentId,rect:{width:H,height:U,...oK({x:F.x??K.position.x,y:F.y??K.position.y},{width:H,height:U},K.parentId,L,R)}},Q=KO([$],L,V,D);q.push(...Q),X.x=F.x?Math.max(R[0]*H,F.x):void 0,X.y=F.y?Math.max(R[1]*U,F.y):void 0}if(X.x!==void 0&&X.y!==void 0){const R={id:_,type:"position",position:{...X}};q.push(R)}if(F.width!==void 0&&F.height!==void 0){const H={id:_,type:"dimensions",resizing:!0,setAttributes:g?g==="horizontal"?"width":"height":!0,dimensions:{width:F.width,height:F.height}};q.push(H)}for(const R of B){const H={...R,type:"position"};q.push(H)}G(q)},onEnd:({width:F,height:B})=>{const G={id:_,type:"dimensions",resizing:!1,dimensions:{width:F,height:B}};N.getState().triggerNodeChanges([G])}})),P.current.update({controlPosition:I,boundaries:{minWidth:l,minHeight:c,maxWidth:f,maxHeight:h},keepAspectRatio:d,resizeDirection:g,onResizeStart:w,onResize:S,onResizeEnd:E,shouldResize:b}),()=>{var F;(F=P.current)==null||F.destroy()}},[I,l,c,f,h,d,w,S,E,b]);const z=I.split("-");return m.jsx("div",{className:Zn(["react-flow__resize-control","nodrag",...z,n,r]),ref:O,style:{...i,scale:T,...o&&{[A?"backgroundColor":"borderColor"]:o}},children:a})}y.memo(vMe);const aY=180,yMe=70,t0=24,xMe=60;function bMe({data:e}){const t=e.pending?"agent-flow-node pending":`agent-flow-node ${hR(e.status)}`;return m.jsxs("div",{className:t,children:[m.jsx(Od,{type:"target",position:qe.Top}),m.jsx("div",{className:"agent-flow-role",children:e.pending?`[pending: ${e.role}]`:e.role}),!e.pending&&m.jsxs("div",{className:"agent-flow-meta",children:[m.jsx("span",{className:`status-dot ${hR(e.status)}`}),m.jsx("span",{children:e.status}),e.duration_ms!=null&&m.jsx("span",{children:F0(e.duration_ms)}),e.exit_code!=null&&m.jsxs("span",{children:["exit ",e.exit_code]})]}),m.jsx(Od,{type:"source",position:qe.Bottom})]})}const wMe={agent:bMe};function SMe(e,t){const n=new Map(e.map(l=>[l.agent_id,l])),r=new Map;for(const l of e){const c=l.parent;r.has(c)||r.set(c,[]),r.get(c).push(l.agent_id)}const i=new Map;for(const l of t){const c=l.requested_by;c&&n.has(c)&&(i.has(c)||i.set(c,[]),i.get(c).push(l))}function a(l){const c=(r.get(l)||[]).map(a),f=(i.get(l)||[]).map(h=>({id:`pending-${h.span_id}`,children:[]}));return{id:l,children:[...c,...f]}}return(r.get(null)||[]).map(a)}function n0(e){return e.children.length===0?aY:e.children.reduce((t,n)=>t+n0(n)+t0,-t0)}function oY(e,t,n,r){if(r.set(e.id,{x:t-aY/2,y:n}),e.children.length===0)return;const i=n0(e);let a=t-i/2;for(const o of e.children){const l=n0(o),c=a+l/2;oY(o,c,n+yMe+xMe,r),a+=l+t0}}function EMe({treeData:e,connected:t}){return m.jsx(tY,{children:m.jsx(jMe,{treeData:e,connected:t})})}function jMe({treeData:e,connected:t}){const{fitView:n}=Hb(),r=y.useCallback(()=>{n({duration:300})},[n]),{flowNodes:i,flowEdges:a}=y.useMemo(()=>{if(!e)return{flowNodes:[],flowEdges:[]};const o=SMe(e.nodes,e.pending_delegations),l=new Map;let c=0;for(const v of o){const b=n0(v),w=c+b/2;oY(v,w,0,l),c+=b+t0*2}const f=new Map(e.nodes.map(v=>[v.agent_id,v])),h=new Map(e.pending_delegations.map(v=>[`pending-${v.span_id}`,v])),d=[];for(const[v,b]of l){const w=f.get(v),S=h.get(v);w?d.push({id:v,type:"agent",position:b,data:{label:w.role,role:w.role,status:w.status,runtime:w.runtime,duration_ms:w.duration_ms,exit_code:w.exit_code}}):S&&d.push({id:v,type:"agent",position:b,data:{label:S.role,role:S.role,status:"running",runtime:"",duration_ms:null,exit_code:null,pending:!0}})}const g=[];for(const v of e.nodes)v.parent&&g.push({id:`e-${v.parent}-${v.agent_id}`,source:v.parent,target:v.agent_id,type:"smoothstep",markerEnd:{type:_d.ArrowClosed,width:16,height:16}});for(const v of e.pending_delegations)v.requested_by&&g.push({id:`e-${v.requested_by}-pending-${v.span_id}`,source:v.requested_by,target:`pending-${v.span_id}`,type:"smoothstep",markerEnd:{type:_d.ArrowClosed,width:16,height:16},style:{strokeDasharray:"5 3"}});return{flowNodes:d,flowEdges:g}},[e]);return e?m.jsxs("div",{children:[m.jsxs("div",{className:"react-flow-wrapper",children:[m.jsx(KPe,{nodes:i,edges:a,nodeTypes:wMe,fitView:!0,nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!1,proOptions:{hideAttribution:!0}}),m.jsx("button",{className:"tree-reset-btn",onClick:r,children:"Reset View"})]}),e.denied_delegations.length>0&&m.jsxs("div",{className:"denied-list",children:[m.jsx("strong",{children:"Denied delegations:"}),e.denied_delegations.map(o=>m.jsxs("span",{className:"denied-item",children:[o.role," (",o.reason,")"]},o.span_id))]})]}):m.jsx("div",{className:"agent-tree",children:m.jsx("p",{className:"agent-meta",children:t?"Loading tree...":"Connecting..."})})}const Ou=18,d5=10;function _Me({runId:e,agents:t,active:n}){var V;const r=Object.keys(t),i=r.find(D=>t[D].parent===null)??r[0]??"",[a,o]=y.useState(i),{lines:l,connected:c,done:f}=QF(e,a,!0),[h,d]=y.useState(""),g=h.toLowerCase(),v=h?l.reduce((D,q,X)=>(q.toLowerCase().includes(g)&&D.push(X),D),[]):[],b=y.useRef(null),[w,S]=y.useState(0),[E,C]=y.useState(0),[_,N]=y.useState(!0),O=y.useRef(0),A=l.length*Ou,T=Math.max(0,Math.floor(w/Ou)-d5),P=Math.ceil(E/Ou)+d5*2,I=Math.min(l.length,T+P),z=l.slice(T,I),F=String(l.length).length,B=y.useCallback(()=>{const D=b.current;if(!D)return;S(D.scrollTop),C(D.clientHeight);const q=D.scrollTop+D.clientHeight>=D.scrollHeight-Ou*2;N(q)},[]);y.useEffect(()=>{const D=b.current;D&&C(D.clientHeight)},[]),y.useEffect(()=>{if(_&&l.length>O.current){const D=b.current;D&&(D.scrollTop=D.scrollHeight)}O.current=l.length},[l.length,_]);const G=()=>{const D=b.current;D&&(D.scrollTop=D.scrollHeight,N(!0))},L=async()=>{try{const D=await fetch(`/api/sessions/${e}/logs/${a}/full`);if(!D.ok)return;const q=await D.text(),X=new Blob([q],{type:"text/plain"}),K=URL.createObjectURL(X),R=document.createElement("a");R.href=K,R.download=`${a}.log`,R.click(),URL.revokeObjectURL(K)}catch{}};return m.jsxs("div",{className:"space-y-3",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[r.length>1&&m.jsxs(Ra,{value:a,onValueChange:o,children:[m.jsx(La,{className:"w-[220px]",children:m.jsx(Ia,{})}),m.jsx(za,{children:r.map(D=>m.jsxs(In,{value:D,children:[t[D].role," (",D.slice(0,8),")"]},D))})]}),r.length===1&&m.jsxs("span",{className:"text-sm text-muted-foreground",children:[(V=t[a])==null?void 0:V.role," (",a.slice(0,8),")"]}),m.jsxs("div",{className:"relative ml-auto",children:[m.jsx(_F,{className:"absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground"}),m.jsx(rt,{className:"h-8 w-[200px] pl-7 text-xs",placeholder:"Search logs...",value:h,onChange:D=>d(D.target.value)})]}),h&&m.jsxs("span",{className:"text-xs text-muted-foreground",children:[v.length," match",v.length!==1?"es":""]}),m.jsxs(je,{variant:"outline",size:"sm",onClick:L,children:[m.jsx(D0,{className:"mr-1 h-3.5 w-3.5"}),"Download"]}),m.jsx(CMe,{connected:c,done:f,active:n})]}),m.jsxs("div",{className:"relative",children:[m.jsx("div",{ref:b,className:"h-[500px] overflow-auto rounded-md bg-[#1e1e1e] font-mono text-xs text-[#d4d4d4]",onScroll:B,children:l.length===0?m.jsx("div",{className:"flex h-full items-center justify-center text-[#666]",children:n&&!f?"Waiting for log output...":"No log output."}):m.jsx("div",{style:{height:A,position:"relative"},children:m.jsx("div",{style:{position:"absolute",top:T*Ou,left:0,right:0},children:z.map((D,q)=>{const X=T+q,K=h&&D.toLowerCase().includes(g);return m.jsxs("div",{className:K?"bg-yellow-900/30":void 0,style:{height:Ou,lineHeight:`${Ou}px`,display:"flex",whiteSpace:"pre"},children:[m.jsx("span",{className:"select-none text-right text-[#555]",style:{width:`${(F+2)*.6}em`,paddingRight:"1em",flexShrink:0},children:X+1}),m.jsx("span",{children:K?m.jsx(kMe,{line:D,search:g}):D})]},X)})})})}),!_&&l.length>0&&m.jsxs(je,{size:"sm",variant:"secondary",className:"absolute bottom-3 right-4 shadow-md",onClick:G,children:[m.jsx(Kae,{className:"mr-1 h-3.5 w-3.5"}),"Jump to bottom"]})]})]})}function CMe({connected:e,done:t,active:n}){return t||!n?m.jsx("span",{className:"text-xs text-muted-foreground",children:"Session ended"}):m.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[m.jsx("span",{className:`inline-block h-1.5 w-1.5 rounded-full ${e?"animate-pulse bg-green-500":"bg-orange-400"}`}),e?"Live":"Connecting..."]})}function kMe({line:e,search:t}){const n=[],r=e.toLowerCase();let i=0,a=r.indexOf(t,i),o=0;for(;a!==-1;)a>i&&n.push(e.slice(i,a)),n.push(m.jsx("span",{className:"bg-yellow-500/60 text-white",children:e.slice(a,a+t.length)},o++)),i=a+t.length,a=r.indexOf(t,i);return i<e.length&&n.push(e.slice(i)),m.jsx(m.Fragment,{children:n})}function NMe(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const AMe=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,OMe=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,TMe={};function h5(e,t){return(TMe.jsx?OMe:AMe).test(e)}const PMe=/[ \t\n\f\r]/g;function MMe(e){return typeof e=="object"?e.type==="text"?m5(e.value):!1:m5(e)}function m5(e){return e.replace(PMe,"")===""}class cg{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}cg.prototype.normal={};cg.prototype.property={};cg.prototype.space=void 0;function sY(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new cg(n,r,t)}function KC(e){return e.toLowerCase()}class wi{constructor(t,n){this.attribute=n,this.property=t}}wi.prototype.attribute="";wi.prototype.booleanish=!1;wi.prototype.boolean=!1;wi.prototype.commaOrSpaceSeparated=!1;wi.prototype.commaSeparated=!1;wi.prototype.defined=!1;wi.prototype.mustUseProperty=!1;wi.prototype.number=!1;wi.prototype.overloadedBoolean=!1;wi.prototype.property="";wi.prototype.spaceSeparated=!1;wi.prototype.space=void 0;let DMe=0;const ht=Lc(),Kn=Lc(),YC=Lc(),_e=Lc(),fn=Lc(),Yf=Lc(),Ai=Lc();function Lc(){return 2**++DMe}const XC=Object.freeze(Object.defineProperty({__proto__:null,boolean:ht,booleanish:Kn,commaOrSpaceSeparated:Ai,commaSeparated:Yf,number:_e,overloadedBoolean:YC,spaceSeparated:fn},Symbol.toStringTag,{value:"Module"})),Sj=Object.keys(XC);class XO extends wi{constructor(t,n,r,i){let a=-1;if(super(t,n),p5(this,"space",i),typeof r=="number")for(;++a<Sj.length;){const o=Sj[a];p5(this,Sj[a],(r&XC[o])===XC[o])}}}XO.prototype.defined=!0;function p5(e,t,n){n&&(e[t]=n)}function Qd(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new XO(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[KC(r)]=r,n[KC(a.attribute)]=r}return new cg(t,n,e.space)}const lY=Qd({properties:{ariaActiveDescendant:null,ariaAtomic:Kn,ariaAutoComplete:null,ariaBusy:Kn,ariaChecked:Kn,ariaColCount:_e,ariaColIndex:_e,ariaColSpan:_e,ariaControls:fn,ariaCurrent:null,ariaDescribedBy:fn,ariaDetails:null,ariaDisabled:Kn,ariaDropEffect:fn,ariaErrorMessage:null,ariaExpanded:Kn,ariaFlowTo:fn,ariaGrabbed:Kn,ariaHasPopup:null,ariaHidden:Kn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:fn,ariaLevel:_e,ariaLive:null,ariaModal:Kn,ariaMultiLine:Kn,ariaMultiSelectable:Kn,ariaOrientation:null,ariaOwns:fn,ariaPlaceholder:null,ariaPosInSet:_e,ariaPressed:Kn,ariaReadOnly:Kn,ariaRelevant:null,ariaRequired:Kn,ariaRoleDescription:fn,ariaRowCount:_e,ariaRowIndex:_e,ariaRowSpan:_e,ariaSelected:Kn,ariaSetSize:_e,ariaSort:null,ariaValueMax:_e,ariaValueMin:_e,ariaValueNow:_e,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function uY(e,t){return t in e?e[t]:t}function cY(e,t){return uY(e,t.toLowerCase())}const RMe=Qd({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Yf,acceptCharset:fn,accessKey:fn,action:null,allow:null,allowFullScreen:ht,allowPaymentRequest:ht,allowUserMedia:ht,alt:null,as:null,async:ht,autoCapitalize:null,autoComplete:fn,autoFocus:ht,autoPlay:ht,blocking:fn,capture:null,charSet:null,checked:ht,cite:null,className:fn,cols:_e,colSpan:null,content:null,contentEditable:Kn,controls:ht,controlsList:fn,coords:_e|Yf,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ht,defer:ht,dir:null,dirName:null,disabled:ht,download:YC,draggable:Kn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ht,formTarget:null,headers:fn,height:_e,hidden:YC,high:_e,href:null,hrefLang:null,htmlFor:fn,httpEquiv:fn,id:null,imageSizes:null,imageSrcSet:null,inert:ht,inputMode:null,integrity:null,is:null,isMap:ht,itemId:null,itemProp:fn,itemRef:fn,itemScope:ht,itemType:fn,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ht,low:_e,manifest:null,max:null,maxLength:_e,media:null,method:null,min:null,minLength:_e,multiple:ht,muted:ht,name:null,nonce:null,noModule:ht,noValidate:ht,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:ht,optimum:_e,pattern:null,ping:fn,placeholder:null,playsInline:ht,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ht,referrerPolicy:null,rel:fn,required:ht,reversed:ht,rows:_e,rowSpan:_e,sandbox:fn,scope:null,scoped:ht,seamless:ht,selected:ht,shadowRootClonable:ht,shadowRootDelegatesFocus:ht,shadowRootMode:null,shape:null,size:_e,sizes:null,slot:null,span:_e,spellCheck:Kn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:_e,step:null,style:null,tabIndex:_e,target:null,title:null,translate:null,type:null,typeMustMatch:ht,useMap:null,value:Kn,width:_e,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:fn,axis:null,background:null,bgColor:null,border:_e,borderColor:null,bottomMargin:_e,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ht,declare:ht,event:null,face:null,frame:null,frameBorder:null,hSpace:_e,leftMargin:_e,link:null,longDesc:null,lowSrc:null,marginHeight:_e,marginWidth:_e,noResize:ht,noHref:ht,noShade:ht,noWrap:ht,object:null,profile:null,prompt:null,rev:null,rightMargin:_e,rules:null,scheme:null,scrolling:Kn,standby:null,summary:null,text:null,topMargin:_e,valueType:null,version:null,vAlign:null,vLink:null,vSpace:_e,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ht,disableRemotePlayback:ht,prefix:null,property:null,results:_e,security:null,unselectable:null},space:"html",transform:cY}),IMe=Qd({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:Ai,accentHeight:_e,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:_e,amplitude:_e,arabicForm:null,ascent:_e,attributeName:null,attributeType:null,azimuth:_e,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:_e,by:null,calcMode:null,capHeight:_e,className:fn,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:_e,diffuseConstant:_e,direction:null,display:null,dur:null,divisor:_e,dominantBaseline:null,download:ht,dx:null,dy:null,edgeMode:null,editable:null,elevation:_e,enableBackground:null,end:null,event:null,exponent:_e,externalResourcesRequired:null,fill:null,fillOpacity:_e,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:Yf,g2:Yf,glyphName:Yf,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:_e,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:_e,horizOriginX:_e,horizOriginY:_e,id:null,ideographic:_e,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:_e,k:_e,k1:_e,k2:_e,k3:_e,k4:_e,kernelMatrix:Ai,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:_e,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:_e,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:_e,overlineThickness:_e,paintOrder:null,panose1:null,path:null,pathLength:_e,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:fn,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:_e,pointsAtY:_e,pointsAtZ:_e,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ai,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ai,rev:Ai,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ai,requiredFeatures:Ai,requiredFonts:Ai,requiredFormats:Ai,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:_e,specularExponent:_e,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:_e,strikethroughThickness:_e,string:null,stroke:null,strokeDashArray:Ai,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:_e,strokeOpacity:_e,strokeWidth:null,style:null,surfaceScale:_e,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ai,tabIndex:_e,tableValues:null,target:null,targetX:_e,targetY:_e,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ai,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:_e,underlineThickness:_e,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:_e,values:null,vAlphabetic:_e,vMathematical:_e,vectorEffect:null,vHanging:_e,vIdeographic:_e,version:null,vertAdvY:_e,vertOriginX:_e,vertOriginY:_e,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:_e,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:uY}),fY=Qd({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()}}),dY=Qd({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:cY}),hY=Qd({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),LMe={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"},zMe=/[A-Z]/g,g5=/-[a-z]/g,$Me=/^data[-\w.:]+$/i;function BMe(e,t){const n=KC(t);let r=t,i=wi;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&$Me.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(g5,UMe);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!g5.test(a)){let o=a.replace(zMe,FMe);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=XO}return new i(r,t)}function FMe(e){return"-"+e.toLowerCase()}function UMe(e){return e.charAt(1).toUpperCase()}const HMe=sY([lY,RMe,fY,dY,hY],"html"),GO=sY([lY,IMe,fY,dY,hY],"svg");function qMe(e){return e.join(" ").trim()}var Of={},Ej,v5;function VMe(){if(v5)return Ej;v5=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,l=/^\s+|\s+$/g,c=`
`,f="/",h="*",d="",g="comment",v="declaration";function b(S,E){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];E=E||{};var C=1,_=1;function N(L){var V=L.match(t);V&&(C+=V.length);var D=L.lastIndexOf(c);_=~D?L.length-D:_+L.length}function O(){var L={line:C,column:_};return function(V){return V.position=new A(L),I(),V}}function A(L){this.start=L,this.end={line:C,column:_},this.source=E.source}A.prototype.content=S;function T(L){var V=new Error(E.source+":"+C+":"+_+": "+L);if(V.reason=L,V.filename=E.source,V.line=C,V.column=_,V.source=S,!E.silent)throw V}function P(L){var V=L.exec(S);if(V){var D=V[0];return N(D),S=S.slice(D.length),V}}function I(){P(n)}function z(L){var V;for(L=L||[];V=F();)V!==!1&&L.push(V);return L}function F(){var L=O();if(!(f!=S.charAt(0)||h!=S.charAt(1))){for(var V=2;d!=S.charAt(V)&&(h!=S.charAt(V)||f!=S.charAt(V+1));)++V;if(V+=2,d===S.charAt(V-1))return T("End of comment missing");var D=S.slice(2,V-2);return _+=2,N(D),S=S.slice(V),_+=2,L({type:g,comment:D})}}function B(){var L=O(),V=P(r);if(V){if(F(),!P(i))return T("property missing ':'");var D=P(a),q=L({type:v,property:w(V[0].replace(e,d)),value:D?w(D[0].replace(e,d)):d});return P(o),q}}function G(){var L=[];z(L);for(var V;V=B();)V!==!1&&(L.push(V),z(L));return L}return I(),G()}function w(S){return S?S.replace(l,d):d}return Ej=b,Ej}var y5;function KMe(){if(y5)return Of;y5=1;var e=Of&&Of.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Of,"__esModule",{value:!0}),Of.default=n;const t=e(VMe());function n(r,i){let a=null;if(!r||typeof r!="string")return a;const o=(0,t.default)(r),l=typeof i=="function";return o.forEach(c=>{if(c.type!=="declaration")return;const{property:f,value:h}=c;l?i(f,h,c):h&&(a=a||{},a[f]=h)}),a}return Of}var fm={},x5;function YMe(){if(x5)return fm;x5=1,Object.defineProperty(fm,"__esModule",{value:!0}),fm.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,a=function(f){return!f||n.test(f)||e.test(f)},o=function(f,h){return h.toUpperCase()},l=function(f,h){return"".concat(h,"-")},c=function(f,h){return h===void 0&&(h={}),a(f)?f:(f=f.toLowerCase(),h.reactCompat?f=f.replace(i,l):f=f.replace(r,l),f.replace(t,o))};return fm.camelCase=c,fm}var dm,b5;function XMe(){if(b5)return dm;b5=1;var e=dm&&dm.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(KMe()),n=YMe();function r(i,a){var o={};return!i||typeof i!="string"||(0,t.default)(i,function(l,c){l&&c&&(o[(0,n.camelCase)(l,a)]=c)}),o}return r.default=r,dm=r,dm}var GMe=XMe();const WMe=Hi(GMe),mY=pY("end"),WO=pY("start");function pY(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function QMe(e){const t=WO(e),n=mY(e);if(t&&n)return{start:t,end:n}}function Cm(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?w5(e.position):"start"in e||"end"in e?w5(e):"line"in e||"column"in e?GC(e):""}function GC(e){return S5(e&&e.line)+":"+S5(e&&e.column)}function w5(e){return GC(e&&e.start)+"-"+GC(e&&e.end)}function S5(e){return e&&typeof e=="number"?e:1}class Kr extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",a={},o=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(o=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?a.ruleId=r:(a.source=r.slice(0,c),a.ruleId=r.slice(c+1))}if(!a.place&&a.ancestors&&a.ancestors){const c=a.ancestors[a.ancestors.length-1];c&&(a.place=c.position)}const l=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=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=l?l.line:void 0,this.name=Cm(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=o&&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}}Kr.prototype.file="";Kr.prototype.name="";Kr.prototype.reason="";Kr.prototype.message="";Kr.prototype.stack="";Kr.prototype.column=void 0;Kr.prototype.line=void 0;Kr.prototype.ancestors=void 0;Kr.prototype.cause=void 0;Kr.prototype.fatal=void 0;Kr.prototype.place=void 0;Kr.prototype.ruleId=void 0;Kr.prototype.source=void 0;const QO={}.hasOwnProperty,ZMe=new Map,JMe=/[A-Z]/g,eDe=new Set(["table","tbody","thead","tfoot","tr"]),tDe=new Set(["td","th"]),gY="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function nDe(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=cDe(n,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");r=uDe(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?GO:HMe,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=vY(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function vY(e,t,n){if(t.type==="element")return rDe(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return iDe(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return oDe(e,t,n);if(t.type==="mdxjsEsm")return aDe(e,t);if(t.type==="root")return sDe(e,t,n);if(t.type==="text")return lDe(e,t)}function rDe(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=GO,e.schema=i),e.ancestors.push(t);const a=xY(e,t.tagName,!1),o=fDe(e,t);let l=JO(e,t);return eDe.has(t.tagName)&&(l=l.filter(function(c){return typeof c=="string"?!MMe(c):!0})),yY(e,o,a,t),ZO(o,l),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function iDe(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}sp(e,t.position)}function aDe(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);sp(e,t.position)}function oDe(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=GO,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:xY(e,t.name,!0),o=dDe(e,t),l=JO(e,t);return yY(e,o,a,t),ZO(o,l),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function sDe(e,t,n){const r={};return ZO(r,JO(e,t)),e.create(t,e.Fragment,r,n)}function lDe(e,t){return t.value}function yY(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function ZO(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function uDe(e,t,n){return r;function r(i,a,o,l){const f=Array.isArray(o.children)?n:t;return l?f(a,o,l):f(a,o)}}function cDe(e,t){return n;function n(r,i,a,o){const l=Array.isArray(a.children),c=WO(r);return t(i,a,o,l,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function fDe(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&QO.call(t.properties,i)){const a=hDe(e,i,t.properties[i]);if(a){const[o,l]=a;e.tableCellAlignToStyle&&o==="align"&&typeof l=="string"&&tDe.has(t.tagName)?r=l:n[o]=l}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function dDe(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const o=a.expression;o.type;const l=o.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else sp(e,t.position);else{const i=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,a=e.evaluater.evaluateExpression(l.expression)}else sp(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function JO(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:ZMe;for(;++r<t.children.length;){const a=t.children[r];let o;if(e.passKeys){const c=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(c){const f=i.get(c)||0;o=c+"-"+f,i.set(c,f+1)}}const l=vY(e,a,o);l!==void 0&&n.push(l)}return n}function hDe(e,t,n){const r=BMe(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?NMe(n):qMe(n)),r.property==="style"){let i=typeof n=="object"?n:mDe(e,String(n));return e.stylePropertyNameCase==="css"&&(i=pDe(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?LMe[r.property]||r.property:r.attribute,n]}}function mDe(e,t){try{return WMe(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Kr("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=gY+"#cannot-parse-style-attribute",i}}function xY(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,o;for(;++a<i.length;){const l=h5(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};o=o?{type:"MemberExpression",object:o,property:l,computed:!!(a&&l.type==="Literal"),optional:!1}:l}r=o}else r=h5(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return QO.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);sp(e)}function sp(e,t){const n=new Kr("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=gY+"#cannot-handle-mdx-estrees-without-createevaluater",n}function pDe(e){const t={};let n;for(n in e)QO.call(e,n)&&(t[gDe(n)]=e[n]);return t}function gDe(e){let t=e.replace(JMe,vDe);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function vDe(e){return"-"+e.toLowerCase()}const jj={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"]},yDe={};function eT(e,t){const n=yDe,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return bY(e,r,i)}function bY(e,t,n){if(xDe(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return E5(e.children,t,n)}return Array.isArray(e)?E5(e,t,n):""}function E5(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=bY(e[i],t,n);return r.join("")}function xDe(e){return!!(e&&typeof e=="object")}const j5=document.createElement("i");function tT(e){const t="&"+e+";";j5.innerHTML=t;const n=j5.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Li(e,t,n,r){const i=e.length;let a=0,o;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function oa(e,t){return e.length>0?(Li(e,e.length,0,t),e):t}const _5={}.hasOwnProperty;function wY(e){const t={};let n=-1;for(;++n<e.length;)bDe(t,e[n]);return t}function bDe(e,t){let n;for(n in t){const i=(_5.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let o;if(a)for(o in a){_5.call(i,o)||(i[o]=[]);const l=a[o];wDe(i[o],Array.isArray(l)?l:l?[l]:[])}}}function wDe(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Li(e,0,0,r)}function SY(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Pa(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Jr=iu(/[A-Za-z]/),Fr=iu(/[\dA-Za-z]/),SDe=iu(/[#-'*+\--9=?A-Z^-~]/);function r0(e){return e!==null&&(e<32||e===127)}const WC=iu(/\d/),EDe=iu(/[\dA-Fa-f]/),jDe=iu(/[!-/:-@[-`{-~]/);function Qe(e){return e!==null&&e<-2}function un(e){return e!==null&&(e<0||e===32)}function bt(e){return e===-2||e===-1||e===32}const Kb=iu(new RegExp("\\p{P}|\\p{S}","u")),Cc=iu(/\s/);function iu(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Zd(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let o="";if(a===37&&Fr(e.charCodeAt(n+1))&&Fr(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){const l=e.charCodeAt(n+1);a<56320&&l>56319&&l<57344?(o=String.fromCharCode(a,l),i=1):o="�"}else o=String.fromCharCode(a);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Ot(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return o;function o(c){return bt(c)?(e.enter(n),l(c)):t(c)}function l(c){return bt(c)&&a++<i?(e.consume(c),l):(e.exit(n),t(c))}}const _De={tokenize:CDe};function CDe(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Ot(e,t,"linePrefix")}function i(l){return e.enter("paragraph"),a(l)}function a(l){const c=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=c),n=c,o(l)}function o(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return Qe(l)?(e.consume(l),e.exit("chunkText"),a):(e.consume(l),o)}}const kDe={tokenize:NDe},C5={tokenize:ADe};function NDe(e){const t=this,n=[];let r=0,i,a,o;return l;function l(_){if(r<n.length){const N=n[r];return t.containerState=N[1],e.attempt(N[0].continuation,c,f)(_)}return f(_)}function c(_){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&C();const N=t.events.length;let O=N,A;for(;O--;)if(t.events[O][0]==="exit"&&t.events[O][1].type==="chunkFlow"){A=t.events[O][1].end;break}E(r);let T=N;for(;T<t.events.length;)t.events[T][1].end={...A},T++;return Li(t.events,O+1,0,t.events.slice(N)),t.events.length=T,f(_)}return l(_)}function f(_){if(r===n.length){if(!i)return g(_);if(i.currentConstruct&&i.currentConstruct.concrete)return b(_);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(C5,h,d)(_)}function h(_){return i&&C(),E(r),g(_)}function d(_){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,b(_)}function g(_){return t.containerState={},e.attempt(C5,v,b)(_)}function v(_){return r++,n.push([t.currentConstruct,t.containerState]),g(_)}function b(_){if(_===null){i&&C(),E(0),e.consume(_);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),w(_)}function w(_){if(_===null){S(e.exit("chunkFlow"),!0),E(0),e.consume(_);return}return Qe(_)?(e.consume(_),S(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(_),w)}function S(_,N){const O=t.sliceStream(_);if(N&&O.push(null),_.previous=a,a&&(a.next=_),a=_,i.defineSkip(_.start),i.write(O),t.parser.lazy[_.start.line]){let A=i.events.length;for(;A--;)if(i.events[A][1].start.offset<o&&(!i.events[A][1].end||i.events[A][1].end.offset>o))return;const T=t.events.length;let P=T,I,z;for(;P--;)if(t.events[P][0]==="exit"&&t.events[P][1].type==="chunkFlow"){if(I){z=t.events[P][1].end;break}I=!0}for(E(r),A=T;A<t.events.length;)t.events[A][1].end={...z},A++;Li(t.events,P+1,0,t.events.slice(T)),t.events.length=A}}function E(_){let N=n.length;for(;N-- >_;){const O=n[N];t.containerState=O[1],O[0].exit.call(t,e)}n.length=_}function C(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function ADe(e,t,n){return Ot(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Td(e){if(e===null||un(e)||Cc(e))return 1;if(Kb(e))return 2}function Yb(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const QC={name:"attention",resolveAll:ODe,tokenize:TDe};function ODe(e,t){let n=-1,r,i,a,o,l,c,f,h;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[r][1].end},g={...e[n][1].start};k5(d,-c),k5(g,c),o={type:c>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},l={type:c>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:g},a={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?"strong":"emphasis",start:{...o.start},end:{...l.end}},e[r][1].end={...o.start},e[n][1].start={...l.end},f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=oa(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=oa(f,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",a,t]]),f=oa(f,Yb(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=oa(f,[["exit",a,t],["enter",l,t],["exit",l,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,f=oa(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,Li(e,r-1,n-r+3,f),n=r+f.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function TDe(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Td(r);let a;return o;function o(c){return a=c,e.enter("attentionSequence"),l(c)}function l(c){if(c===a)return e.consume(c),l;const f=e.exit("attentionSequence"),h=Td(c),d=!h||h===2&&i||n.includes(c),g=!i||i===2&&h||n.includes(r);return f._open=!!(a===42?d:d&&(i||!g)),f._close=!!(a===42?g:g&&(h||!d)),t(c)}}function k5(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const PDe={name:"autolink",tokenize:MDe};function MDe(e,t,n){let r=0;return i;function i(v){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(v){return Jr(v)?(e.consume(v),o):v===64?n(v):f(v)}function o(v){return v===43||v===45||v===46||Fr(v)?(r=1,l(v)):f(v)}function l(v){return v===58?(e.consume(v),r=0,c):(v===43||v===45||v===46||Fr(v))&&r++<32?(e.consume(v),l):(r=0,f(v))}function c(v){return v===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):v===null||v===32||v===60||r0(v)?n(v):(e.consume(v),c)}function f(v){return v===64?(e.consume(v),h):SDe(v)?(e.consume(v),f):n(v)}function h(v){return Fr(v)?d(v):n(v)}function d(v){return v===46?(e.consume(v),r=0,h):v===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):g(v)}function g(v){if((v===45||Fr(v))&&r++<63){const b=v===45?g:d;return e.consume(v),b}return n(v)}}const fg={partial:!0,tokenize:DDe};function DDe(e,t,n){return r;function r(a){return bt(a)?Ot(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||Qe(a)?t(a):n(a)}}const EY={continuation:{tokenize:IDe},exit:LDe,name:"blockQuote",tokenize:RDe};function RDe(e,t,n){const r=this;return i;function i(o){if(o===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),a}return n(o)}function a(o){return bt(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function IDe(e,t,n){const r=this;return i;function i(o){return bt(o)?Ot(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):a(o)}function a(o){return e.attempt(EY,t,n)(o)}}function LDe(e){e.exit("blockQuote")}const jY={name:"characterEscape",tokenize:zDe};function zDe(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return jDe(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const _Y={name:"characterReference",tokenize:$De};function $De(e,t,n){const r=this;let i=0,a,o;return l;function l(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),c}function c(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),a=31,o=Fr,h(d))}function f(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,o=EDe,h):(e.enter("characterReferenceValue"),a=7,o=WC,h(d))}function h(d){if(d===59&&i){const g=e.exit("characterReferenceValue");return o===Fr&&!tT(r.sliceSerialize(g))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(d)&&i++<a?(e.consume(d),h):n(d)}}const N5={partial:!0,tokenize:FDe},A5={concrete:!0,name:"codeFenced",tokenize:BDe};function BDe(e,t,n){const r=this,i={partial:!0,tokenize:O};let a=0,o=0,l;return c;function c(A){return f(A)}function f(A){const T=r.events[r.events.length-1];return a=T&&T[1].type==="linePrefix"?T[2].sliceSerialize(T[1],!0).length:0,l=A,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(A)}function h(A){return A===l?(o++,e.consume(A),h):o<3?n(A):(e.exit("codeFencedFenceSequence"),bt(A)?Ot(e,d,"whitespace")(A):d(A))}function d(A){return A===null||Qe(A)?(e.exit("codeFencedFence"),r.interrupt?t(A):e.check(N5,w,N)(A)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),g(A))}function g(A){return A===null||Qe(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(A)):bt(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ot(e,v,"whitespace")(A)):A===96&&A===l?n(A):(e.consume(A),g)}function v(A){return A===null||Qe(A)?d(A):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),b(A))}function b(A){return A===null||Qe(A)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(A)):A===96&&A===l?n(A):(e.consume(A),b)}function w(A){return e.attempt(i,N,S)(A)}function S(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),E}function E(A){return a>0&&bt(A)?Ot(e,C,"linePrefix",a+1)(A):C(A)}function C(A){return A===null||Qe(A)?e.check(N5,w,N)(A):(e.enter("codeFlowValue"),_(A))}function _(A){return A===null||Qe(A)?(e.exit("codeFlowValue"),C(A)):(e.consume(A),_)}function N(A){return e.exit("codeFenced"),t(A)}function O(A,T,P){let I=0;return z;function z(V){return A.enter("lineEnding"),A.consume(V),A.exit("lineEnding"),F}function F(V){return A.enter("codeFencedFence"),bt(V)?Ot(A,B,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(V):B(V)}function B(V){return V===l?(A.enter("codeFencedFenceSequence"),G(V)):P(V)}function G(V){return V===l?(I++,A.consume(V),G):I>=o?(A.exit("codeFencedFenceSequence"),bt(V)?Ot(A,L,"whitespace")(V):L(V)):P(V)}function L(V){return V===null||Qe(V)?(A.exit("codeFencedFence"),T(V)):P(V)}}}function FDe(e,t,n){const r=this;return i;function i(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a)}function a(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const _j={name:"codeIndented",tokenize:HDe},UDe={partial:!0,tokenize:qDe};function HDe(e,t,n){const r=this;return i;function i(f){return e.enter("codeIndented"),Ot(e,a,"linePrefix",5)(f)}function a(f){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?o(f):n(f)}function o(f){return f===null?c(f):Qe(f)?e.attempt(UDe,o,c)(f):(e.enter("codeFlowValue"),l(f))}function l(f){return f===null||Qe(f)?(e.exit("codeFlowValue"),o(f)):(e.consume(f),l)}function c(f){return e.exit("codeIndented"),t(f)}}function qDe(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):Qe(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):Ot(e,a,"linePrefix",5)(o)}function a(o){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(o):Qe(o)?i(o):n(o)}}const VDe={name:"codeText",previous:YDe,resolve:KDe,tokenize:XDe};function KDe(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function YDe(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function XDe(e,t,n){let r=0,i,a;return o;function o(d){return e.enter("codeText"),e.enter("codeTextSequence"),l(d)}function l(d){return d===96?(e.consume(d),r++,l):(e.exit("codeTextSequence"),c(d))}function c(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),c):d===96?(a=e.enter("codeTextSequence"),i=0,h(d)):Qe(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("codeTextData"),f(d))}function f(d){return d===null||d===32||d===96||Qe(d)?(e.exit("codeTextData"),c(d)):(e.consume(d),f)}function h(d){return d===96?(e.consume(d),i++,h):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(a.type="codeTextData",f(d))}}class GDe{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,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&hm(this.left,r),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),hm(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),hm(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 n=this.left.splice(t,Number.POSITIVE_INFINITY);hm(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);hm(this.left,n.reverse())}}}function hm(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function CY(e){const t={};let n=-1,r,i,a,o,l,c,f;const h=new GDe(e);for(;++n<h.length;){for(;n in t;)n=t[n];if(r=h.get(n),n&&r[1].type==="chunkFlow"&&h.get(n-1)[1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type==="lineEndingBlank"&&(a+=2),a<c.length&&c[a][1].type==="content"))for(;++a<c.length&&c[a][1].type!=="content";)c[a][1].type==="chunkText"&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,WDe(h,n)),n=t[n],f=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=h.get(a),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(h.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=a);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(r[1].end={...h.get(i)[1].start},l=h.slice(i,n),l.unshift(r),h.splice(i,n-i+1,l))}}return Li(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!f}function WDe(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const a=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const l=o.events,c=[],f={};let h,d,g=-1,v=n,b=0,w=0;const S=[w];for(;v;){for(;e.get(++i)[1]!==v;);a.push(i),v._tokenizer||(h=r.sliceStream(v),v.next||h.push(null),d&&o.defineSkip(v.start),v._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(h),v._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=v,v=v.next}for(v=n;++g<l.length;)l[g][0]==="exit"&&l[g-1][0]==="enter"&&l[g][1].type===l[g-1][1].type&&l[g][1].start.line!==l[g][1].end.line&&(w=g+1,S.push(w),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(o.events=[],v?(v._tokenizer=void 0,v.previous=void 0):S.pop(),g=S.length;g--;){const E=l.slice(S[g],S[g+1]),C=a.pop();c.push([C,C+E.length-1]),e.splice(C,2,E)}for(c.reverse(),g=-1;++g<c.length;)f[b+c[g][0]]=b+c[g][1],b+=c[g][1]-c[g][0]-1;return f}const QDe={resolve:JDe,tokenize:eRe},ZDe={partial:!0,tokenize:tRe};function JDe(e){return CY(e),e}function eRe(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(l)}function i(l){return l===null?a(l):Qe(l)?e.check(ZDe,o,a)(l):(e.consume(l),i)}function a(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function o(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function tRe(e,t,n){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Ot(e,a,"linePrefix")}function a(o){if(o===null||Qe(o))return n(o);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function kY(e,t,n,r,i,a,o,l,c){const f=c||Number.POSITIVE_INFINITY;let h=0;return d;function d(E){return E===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(E),e.exit(a),g):E===null||E===32||E===41||r0(E)?n(E):(e.enter(r),e.enter(o),e.enter(l),e.enter("chunkString",{contentType:"string"}),w(E))}function g(E){return E===62?(e.enter(a),e.consume(E),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),v(E))}function v(E){return E===62?(e.exit("chunkString"),e.exit(l),g(E)):E===null||E===60||Qe(E)?n(E):(e.consume(E),E===92?b:v)}function b(E){return E===60||E===62||E===92?(e.consume(E),v):v(E)}function w(E){return!h&&(E===null||E===41||un(E))?(e.exit("chunkString"),e.exit(l),e.exit(o),e.exit(r),t(E)):h<f&&E===40?(e.consume(E),h++,w):E===41?(e.consume(E),h--,w):E===null||E===32||E===40||r0(E)?n(E):(e.consume(E),E===92?S:w)}function S(E){return E===40||E===41||E===92?(e.consume(E),w):w(E)}}function NY(e,t,n,r,i,a){const o=this;let l=0,c;return f;function f(v){return e.enter(r),e.enter(i),e.consume(v),e.exit(i),e.enter(a),h}function h(v){return l>999||v===null||v===91||v===93&&!c||v===94&&!l&&"_hiddenFootnoteSupport"in o.parser.constructs?n(v):v===93?(e.exit(a),e.enter(i),e.consume(v),e.exit(i),e.exit(r),t):Qe(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),d(v))}function d(v){return v===null||v===91||v===93||Qe(v)||l++>999?(e.exit("chunkString"),h(v)):(e.consume(v),c||(c=!bt(v)),v===92?g:d)}function g(v){return v===91||v===92||v===93?(e.consume(v),l++,d):d(v)}}function AY(e,t,n,r,i,a){let o;return l;function l(g){return g===34||g===39||g===40?(e.enter(r),e.enter(i),e.consume(g),e.exit(i),o=g===40?41:g,c):n(g)}function c(g){return g===o?(e.enter(i),e.consume(g),e.exit(i),e.exit(r),t):(e.enter(a),f(g))}function f(g){return g===o?(e.exit(a),c(o)):g===null?n(g):Qe(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),Ot(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(g))}function h(g){return g===o||g===null||Qe(g)?(e.exit("chunkString"),f(g)):(e.consume(g),g===92?d:h)}function d(g){return g===o||g===92?(e.consume(g),h):h(g)}}function km(e,t){let n;return r;function r(i){return Qe(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):bt(i)?Ot(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const nRe={name:"definition",tokenize:iRe},rRe={partial:!0,tokenize:aRe};function iRe(e,t,n){const r=this;let i;return a;function a(v){return e.enter("definition"),o(v)}function o(v){return NY.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function l(v){return i=Pa(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),c):n(v)}function c(v){return un(v)?km(e,f)(v):f(v)}function f(v){return kY(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function h(v){return e.attempt(rRe,d,d)(v)}function d(v){return bt(v)?Ot(e,g,"whitespace")(v):g(v)}function g(v){return v===null||Qe(v)?(e.exit("definition"),r.parser.defined.push(i),t(v)):n(v)}}function aRe(e,t,n){return r;function r(l){return un(l)?km(e,i)(l):n(l)}function i(l){return AY(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function a(l){return bt(l)?Ot(e,o,"whitespace")(l):o(l)}function o(l){return l===null||Qe(l)?t(l):n(l)}}const oRe={name:"hardBreakEscape",tokenize:sRe};function sRe(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return Qe(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const lRe={name:"headingAtx",resolve:uRe,tokenize:cRe};function uRe(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Li(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function cRe(e,t,n){let r=0;return i;function i(h){return e.enter("atxHeading"),a(h)}function a(h){return e.enter("atxHeadingSequence"),o(h)}function o(h){return h===35&&r++<6?(e.consume(h),o):h===null||un(h)?(e.exit("atxHeadingSequence"),l(h)):n(h)}function l(h){return h===35?(e.enter("atxHeadingSequence"),c(h)):h===null||Qe(h)?(e.exit("atxHeading"),t(h)):bt(h)?Ot(e,l,"whitespace")(h):(e.enter("atxHeadingText"),f(h))}function c(h){return h===35?(e.consume(h),c):(e.exit("atxHeadingSequence"),l(h))}function f(h){return h===null||h===35||un(h)?(e.exit("atxHeadingText"),l(h)):(e.consume(h),f)}}const fRe=["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"],O5=["pre","script","style","textarea"],dRe={concrete:!0,name:"htmlFlow",resolveTo:pRe,tokenize:gRe},hRe={partial:!0,tokenize:yRe},mRe={partial:!0,tokenize:vRe};function pRe(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 gRe(e,t,n){const r=this;let i,a,o,l,c;return f;function f($){return h($)}function h($){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume($),d}function d($){return $===33?(e.consume($),g):$===47?(e.consume($),a=!0,w):$===63?(e.consume($),i=3,r.interrupt?t:R):Jr($)?(e.consume($),o=String.fromCharCode($),S):n($)}function g($){return $===45?(e.consume($),i=2,v):$===91?(e.consume($),i=5,l=0,b):Jr($)?(e.consume($),i=4,r.interrupt?t:R):n($)}function v($){return $===45?(e.consume($),r.interrupt?t:R):n($)}function b($){const Q="CDATA[";return $===Q.charCodeAt(l++)?(e.consume($),l===Q.length?r.interrupt?t:B:b):n($)}function w($){return Jr($)?(e.consume($),o=String.fromCharCode($),S):n($)}function S($){if($===null||$===47||$===62||un($)){const Q=$===47,J=o.toLowerCase();return!Q&&!a&&O5.includes(J)?(i=1,r.interrupt?t($):B($)):fRe.includes(o.toLowerCase())?(i=6,Q?(e.consume($),E):r.interrupt?t($):B($)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n($):a?C($):_($))}return $===45||Fr($)?(e.consume($),o+=String.fromCharCode($),S):n($)}function E($){return $===62?(e.consume($),r.interrupt?t:B):n($)}function C($){return bt($)?(e.consume($),C):z($)}function _($){return $===47?(e.consume($),z):$===58||$===95||Jr($)?(e.consume($),N):bt($)?(e.consume($),_):z($)}function N($){return $===45||$===46||$===58||$===95||Fr($)?(e.consume($),N):O($)}function O($){return $===61?(e.consume($),A):bt($)?(e.consume($),O):_($)}function A($){return $===null||$===60||$===61||$===62||$===96?n($):$===34||$===39?(e.consume($),c=$,T):bt($)?(e.consume($),A):P($)}function T($){return $===c?(e.consume($),c=null,I):$===null||Qe($)?n($):(e.consume($),T)}function P($){return $===null||$===34||$===39||$===47||$===60||$===61||$===62||$===96||un($)?O($):(e.consume($),P)}function I($){return $===47||$===62||bt($)?_($):n($)}function z($){return $===62?(e.consume($),F):n($)}function F($){return $===null||Qe($)?B($):bt($)?(e.consume($),F):n($)}function B($){return $===45&&i===2?(e.consume($),D):$===60&&i===1?(e.consume($),q):$===62&&i===4?(e.consume($),H):$===63&&i===3?(e.consume($),R):$===93&&i===5?(e.consume($),K):Qe($)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(hRe,U,G)($)):$===null||Qe($)?(e.exit("htmlFlowData"),G($)):(e.consume($),B)}function G($){return e.check(mRe,L,U)($)}function L($){return e.enter("lineEnding"),e.consume($),e.exit("lineEnding"),V}function V($){return $===null||Qe($)?G($):(e.enter("htmlFlowData"),B($))}function D($){return $===45?(e.consume($),R):B($)}function q($){return $===47?(e.consume($),o="",X):B($)}function X($){if($===62){const Q=o.toLowerCase();return O5.includes(Q)?(e.consume($),H):B($)}return Jr($)&&o.length<8?(e.consume($),o+=String.fromCharCode($),X):B($)}function K($){return $===93?(e.consume($),R):B($)}function R($){return $===62?(e.consume($),H):$===45&&i===2?(e.consume($),R):B($)}function H($){return $===null||Qe($)?(e.exit("htmlFlowData"),U($)):(e.consume($),H)}function U($){return e.exit("htmlFlow"),t($)}}function vRe(e,t,n){const r=this;return i;function i(o){return Qe(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a):n(o)}function a(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function yRe(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(fg,t,n)}}const xRe={name:"htmlText",tokenize:bRe};function bRe(e,t,n){const r=this;let i,a,o;return l;function l(R){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(R),c}function c(R){return R===33?(e.consume(R),f):R===47?(e.consume(R),O):R===63?(e.consume(R),_):Jr(R)?(e.consume(R),P):n(R)}function f(R){return R===45?(e.consume(R),h):R===91?(e.consume(R),a=0,b):Jr(R)?(e.consume(R),C):n(R)}function h(R){return R===45?(e.consume(R),v):n(R)}function d(R){return R===null?n(R):R===45?(e.consume(R),g):Qe(R)?(o=d,q(R)):(e.consume(R),d)}function g(R){return R===45?(e.consume(R),v):d(R)}function v(R){return R===62?D(R):R===45?g(R):d(R)}function b(R){const H="CDATA[";return R===H.charCodeAt(a++)?(e.consume(R),a===H.length?w:b):n(R)}function w(R){return R===null?n(R):R===93?(e.consume(R),S):Qe(R)?(o=w,q(R)):(e.consume(R),w)}function S(R){return R===93?(e.consume(R),E):w(R)}function E(R){return R===62?D(R):R===93?(e.consume(R),E):w(R)}function C(R){return R===null||R===62?D(R):Qe(R)?(o=C,q(R)):(e.consume(R),C)}function _(R){return R===null?n(R):R===63?(e.consume(R),N):Qe(R)?(o=_,q(R)):(e.consume(R),_)}function N(R){return R===62?D(R):_(R)}function O(R){return Jr(R)?(e.consume(R),A):n(R)}function A(R){return R===45||Fr(R)?(e.consume(R),A):T(R)}function T(R){return Qe(R)?(o=T,q(R)):bt(R)?(e.consume(R),T):D(R)}function P(R){return R===45||Fr(R)?(e.consume(R),P):R===47||R===62||un(R)?I(R):n(R)}function I(R){return R===47?(e.consume(R),D):R===58||R===95||Jr(R)?(e.consume(R),z):Qe(R)?(o=I,q(R)):bt(R)?(e.consume(R),I):D(R)}function z(R){return R===45||R===46||R===58||R===95||Fr(R)?(e.consume(R),z):F(R)}function F(R){return R===61?(e.consume(R),B):Qe(R)?(o=F,q(R)):bt(R)?(e.consume(R),F):I(R)}function B(R){return R===null||R===60||R===61||R===62||R===96?n(R):R===34||R===39?(e.consume(R),i=R,G):Qe(R)?(o=B,q(R)):bt(R)?(e.consume(R),B):(e.consume(R),L)}function G(R){return R===i?(e.consume(R),i=void 0,V):R===null?n(R):Qe(R)?(o=G,q(R)):(e.consume(R),G)}function L(R){return R===null||R===34||R===39||R===60||R===61||R===96?n(R):R===47||R===62||un(R)?I(R):(e.consume(R),L)}function V(R){return R===47||R===62||un(R)?I(R):n(R)}function D(R){return R===62?(e.consume(R),e.exit("htmlTextData"),e.exit("htmlText"),t):n(R)}function q(R){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),X}function X(R){return bt(R)?Ot(e,K,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):K(R)}function K(R){return e.enter("htmlTextData"),o(R)}}const nT={name:"labelEnd",resolveAll:jRe,resolveTo:_Re,tokenize:CRe},wRe={tokenize:kRe},SRe={tokenize:NRe},ERe={tokenize:ARe};function jRe(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&Li(e,0,e.length,n),e}function _Re(e,t){let n=e.length,r=0,i,a,o,l;for(;n--;)if(i=e[n][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=n);const c={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},f={type:"label",start:{...e[a][1].start},end:{...e[o][1].end}},h={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return l=[["enter",c,t],["enter",f,t]],l=oa(l,e.slice(a+1,a+r+3)),l=oa(l,[["enter",h,t]]),l=oa(l,Yb(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),l=oa(l,[["exit",h,t],e[o-2],e[o-1],["exit",f,t]]),l=oa(l,e.slice(o+1)),l=oa(l,[["exit",c,t]]),Li(e,a,e.length,l),e}function CRe(e,t,n){const r=this;let i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){a=r.events[i][1];break}return l;function l(g){return a?a._inactive?d(g):(o=r.parser.defined.includes(Pa(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(g),e.exit("labelMarker"),e.exit("labelEnd"),c):n(g)}function c(g){return g===40?e.attempt(wRe,h,o?h:d)(g):g===91?e.attempt(SRe,h,o?f:d)(g):o?h(g):d(g)}function f(g){return e.attempt(ERe,h,d)(g)}function h(g){return t(g)}function d(g){return a._balanced=!0,n(g)}}function kRe(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return un(d)?km(e,a)(d):a(d)}function a(d){return d===41?h(d):kY(e,o,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function o(d){return un(d)?km(e,c)(d):h(d)}function l(d){return n(d)}function c(d){return d===34||d===39||d===40?AY(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):h(d)}function f(d){return un(d)?km(e,h)(d):h(d)}function h(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function NRe(e,t,n){const r=this;return i;function i(l){return NY.call(r,e,a,o,"reference","referenceMarker","referenceString")(l)}function a(l){return r.parser.defined.includes(Pa(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function o(l){return n(l)}}function ARe(e,t,n){return r;function r(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):n(a)}}const ORe={name:"labelStartImage",resolveAll:nT.resolveAll,tokenize:TRe};function TRe(e,t,n){const r=this;return i;function i(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),a}function a(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),o):n(l)}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const PRe={name:"labelStartLink",resolveAll:nT.resolveAll,tokenize:MRe};function MRe(e,t,n){const r=this;return i;function i(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),a}function a(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const Cj={name:"lineEnding",tokenize:DRe};function DRe(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Ot(e,t,"linePrefix")}}const Ry={name:"thematicBreak",tokenize:RRe};function RRe(e,t,n){let r=0,i;return a;function a(f){return e.enter("thematicBreak"),o(f)}function o(f){return i=f,l(f)}function l(f){return f===i?(e.enter("thematicBreakSequence"),c(f)):r>=3&&(f===null||Qe(f))?(e.exit("thematicBreak"),t(f)):n(f)}function c(f){return f===i?(e.consume(f),r++,c):(e.exit("thematicBreakSequence"),bt(f)?Ot(e,l,"whitespace")(f):l(f))}}const mi={continuation:{tokenize:$Re},exit:FRe,name:"list",tokenize:zRe},IRe={partial:!0,tokenize:URe},LRe={partial:!0,tokenize:BRe};function zRe(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return l;function l(v){const b=r.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!r.containerState.marker||v===r.containerState.marker:WC(v)){if(r.containerState.type||(r.containerState.type=b,e.enter(b,{_container:!0})),b==="listUnordered")return e.enter("listItemPrefix"),v===42||v===45?e.check(Ry,n,f)(v):f(v);if(!r.interrupt||v===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(v)}return n(v)}function c(v){return WC(v)&&++o<10?(e.consume(v),c):(!r.interrupt||o<2)&&(r.containerState.marker?v===r.containerState.marker:v===41||v===46)?(e.exit("listItemValue"),f(v)):n(v)}function f(v){return e.enter("listItemMarker"),e.consume(v),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||v,e.check(fg,r.interrupt?n:h,e.attempt(IRe,g,d))}function h(v){return r.containerState.initialBlankLine=!0,a++,g(v)}function d(v){return bt(v)?(e.enter("listItemPrefixWhitespace"),e.consume(v),e.exit("listItemPrefixWhitespace"),g):n(v)}function g(v){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(v)}}function $Re(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(fg,i,a);function i(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ot(e,t,"listItemIndent",r.containerState.size+1)(l)}function a(l){return r.containerState.furtherBlankLines||!bt(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(LRe,t,o)(l))}function o(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ot(e,e.attempt(mi,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function BRe(e,t,n){const r=this;return Ot(e,i,"listItemIndent",r.containerState.size+1);function i(a){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(a):n(a)}}function FRe(e){e.exit(this.containerState.type)}function URe(e,t,n){const r=this;return Ot(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const o=r.events[r.events.length-1];return!bt(a)&&o&&o[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const T5={name:"setextUnderline",resolveTo:HRe,tokenize:qRe};function HRe(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",o,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push(["exit",o,t]),e}function qRe(e,t,n){const r=this;let i;return a;function a(f){let h=r.events.length,d;for(;h--;)if(r.events[h][1].type!=="lineEnding"&&r.events[h][1].type!=="linePrefix"&&r.events[h][1].type!=="content"){d=r.events[h][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=f,o(f)):n(f)}function o(f){return e.enter("setextHeadingLineSequence"),l(f)}function l(f){return f===i?(e.consume(f),l):(e.exit("setextHeadingLineSequence"),bt(f)?Ot(e,c,"lineSuffix")(f):c(f))}function c(f){return f===null||Qe(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const VRe={tokenize:KRe};function KRe(e){const t=this,n=e.attempt(fg,r,e.attempt(this.parser.constructs.flowInitial,i,Ot(e,e.attempt(this.parser.constructs.flow,i,e.attempt(QDe,i)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const YRe={resolveAll:TY()},XRe=OY("string"),GRe=OY("text");function OY(e){return{resolveAll:TY(e==="text"?WRe:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,o,l);return o;function o(h){return f(h)?a(h):l(h)}function l(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),c}function c(h){return f(h)?(n.exit("data"),a(h)):(n.consume(h),c)}function f(h){if(h===null)return!0;const d=i[h];let g=-1;if(d)for(;++g<d.length;){const v=d[g];if(!v.previous||v.previous.call(r,r.previous))return!0}return!1}}}function TY(e){return t;function t(n,r){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,r):n}}function WRe(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let a=i.length,o=-1,l=0,c;for(;a--;){const f=i[a];if(typeof f=="string"){for(o=f.length;f.charCodeAt(o-1)===32;)l++,o--;if(o)break;o=-1}else if(f===-2)c=!0,l++;else if(f!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const f={type:n===e.length||c||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...f.start},r.start.offset===r.end.offset?Object.assign(r,f):(e.splice(n,0,["enter",f,t],["exit",f,t]),n+=2)}n++}return e}const QRe={42:mi,43:mi,45:mi,48:mi,49:mi,50:mi,51:mi,52:mi,53:mi,54:mi,55:mi,56:mi,57:mi,62:EY},ZRe={91:nRe},JRe={[-2]:_j,[-1]:_j,32:_j},eIe={35:lRe,42:Ry,45:[T5,Ry],60:dRe,61:T5,95:Ry,96:A5,126:A5},tIe={38:_Y,92:jY},nIe={[-5]:Cj,[-4]:Cj,[-3]:Cj,33:ORe,38:_Y,42:QC,60:[PDe,xRe],91:PRe,92:[oRe,jY],93:nT,95:QC,96:VDe},rIe={null:[QC,YRe]},iIe={null:[42,95]},aIe={null:[]},oIe=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:iIe,contentInitial:ZRe,disable:aIe,document:QRe,flow:eIe,flowInitial:JRe,insideSpan:rIe,string:tIe,text:nIe},Symbol.toStringTag,{value:"Module"}));function sIe(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},a=[];let o=[],l=[];const c={attempt:T(O),check:T(A),consume:C,enter:_,exit:N,interrupt:T(A,{interrupt:!0})},f={code:null,containerState:{},defineSkip:w,events:[],now:b,parser:e,previous:null,sliceSerialize:g,sliceStream:v,write:d};let h=t.tokenize.call(f,c);return t.resolveAll&&a.push(t),f;function d(F){return o=oa(o,F),S(),o[o.length-1]!==null?[]:(P(t,0),f.events=Yb(a,f.events,f),f.events)}function g(F,B){return uIe(v(F),B)}function v(F){return lIe(o,F)}function b(){const{_bufferIndex:F,_index:B,line:G,column:L,offset:V}=r;return{_bufferIndex:F,_index:B,line:G,column:L,offset:V}}function w(F){i[F.line]=F.column,z()}function S(){let F;for(;r._index<o.length;){const B=o[r._index];if(typeof B=="string")for(F=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===F&&r._bufferIndex<B.length;)E(B.charCodeAt(r._bufferIndex));else E(B)}}function E(F){h=h(F)}function C(F){Qe(F)?(r.line++,r.column=1,r.offset+=F===-3?2:1,z()):F!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),f.previous=F}function _(F,B){const G=B||{};return G.type=F,G.start=b(),f.events.push(["enter",G,f]),l.push(G),G}function N(F){const B=l.pop();return B.end=b(),f.events.push(["exit",B,f]),B}function O(F,B){P(F,B.from)}function A(F,B){B.restore()}function T(F,B){return G;function G(L,V,D){let q,X,K,R;return Array.isArray(L)?U(L):"tokenize"in L?U([L]):H(L);function H(ne){return ae;function ae(ie){const ee=ie!==null&&ne[ie],se=ie!==null&&ne.null,pe=[...Array.isArray(ee)?ee:ee?[ee]:[],...Array.isArray(se)?se:se?[se]:[]];return U(pe)(ie)}}function U(ne){return q=ne,X=0,ne.length===0?D:$(ne[X])}function $(ne){return ae;function ae(ie){return R=I(),K=ne,ne.partial||(f.currentConstruct=ne),ne.name&&f.parser.constructs.disable.null.includes(ne.name)?J():ne.tokenize.call(B?Object.assign(Object.create(f),B):f,c,Q,J)(ie)}}function Q(ne){return F(K,R),V}function J(ne){return R.restore(),++X<q.length?$(q[X]):D}}}function P(F,B){F.resolveAll&&!a.includes(F)&&a.push(F),F.resolve&&Li(f.events,B,f.events.length-B,F.resolve(f.events.slice(B),f)),F.resolveTo&&(f.events=F.resolveTo(f.events,f))}function I(){const F=b(),B=f.previous,G=f.currentConstruct,L=f.events.length,V=Array.from(l);return{from:L,restore:D};function D(){r=F,f.previous=B,f.currentConstruct=G,f.events.length=L,l=V,z()}}function z(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function lIe(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){const l=o[0];typeof l=="string"?o[0]=l.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function uIe(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let o;if(typeof a=="string")o=a;else switch(a){case-5:{o="\r";break}case-4:{o=`
`;break}case-3:{o=`\r
`;break}case-2:{o=t?" ":"	";break}case-1:{if(!t&&i)continue;o=" ";break}default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join("")}function cIe(e){const r={constructs:wY([oIe,...(e||{}).extensions||[]]),content:i(_De),defined:[],document:i(kDe),flow:i(VRe),lazy:{},string:i(XRe),text:i(GRe)};return r;function i(a){return o;function o(l){return sIe(r,a,l)}}}function fIe(e){for(;!CY(e););return e}const P5=/[\0\t\n\r]/g;function dIe(){let e=1,t="",n=!0,r;return i;function i(a,o,l){const c=[];let f,h,d,g,v;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(o||void 0).decode(a)),d=0,t="",n&&(a.charCodeAt(0)===65279&&d++,n=void 0);d<a.length;){if(P5.lastIndex=d,f=P5.exec(a),g=f&&f.index!==void 0?f.index:a.length,v=a.charCodeAt(g),!f){t=a.slice(d);break}if(v===10&&d===g&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),d<g&&(c.push(a.slice(d,g)),e+=g-d),v){case 0:{c.push(65533),e++;break}case 9:{for(h=Math.ceil(e/4)*4,c.push(-2);e++<h;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}d=g+1}return l&&(r&&c.push(-5),t&&c.push(t),c.push(null)),c}}const hIe=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function mIe(e){return e.replace(hIe,pIe)}function pIe(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return SY(n.slice(a?2:1),a?16:10)}return tT(n)||e}const PY={}.hasOwnProperty;function gIe(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),vIe(n)(fIe(cIe(n).document().write(dIe()(e,t,!0))))}function vIe(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Ke),autolinkProtocol:I,autolinkEmail:I,atxHeading:a($e),blockQuote:a(se),characterEscape:I,characterReference:I,codeFenced:a(pe),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(pe,o),codeText:a(re,o),codeTextData:I,data:I,codeFlowValue:I,definition:a(we),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(Ee),hardBreakEscape:a(Ne),hardBreakTrailing:a(Ne),htmlFlow:a(et,o),htmlFlowData:I,htmlText:a(et,o),htmlTextData:I,image:a(Xe),label:o,link:a(Ke),listItem:a(ct),listItemValue:g,listOrdered:a(Rt,d),listUnordered:a(Rt),paragraph:a(wt),reference:$,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a($e),strong:a(Xt),thematicBreak:a(cn)},exit:{atxHeading:c(),atxHeadingSequence:O,autolink:c(),autolinkEmail:ee,autolinkProtocol:ie,blockQuote:c(),characterEscapeValue:z,characterReferenceMarkerHexadecimal:J,characterReferenceMarkerNumeric:J,characterReferenceValue:ne,characterReference:ae,codeFenced:c(S),codeFencedFence:w,codeFencedFenceInfo:v,codeFencedFenceMeta:b,codeFlowValue:z,codeIndented:c(E),codeText:c(V),codeTextData:z,data:z,definition:c(),definitionDestinationString:N,definitionLabelString:C,definitionTitleString:_,emphasis:c(),hardBreakEscape:c(B),hardBreakTrailing:c(B),htmlFlow:c(G),htmlFlowData:z,htmlText:c(L),htmlTextData:z,image:c(q),label:K,labelText:X,lineEnding:F,link:c(D),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:Q,resourceDestinationString:R,resourceTitleString:H,resource:U,setextHeading:c(P),setextHeadingLineSequence:T,setextHeadingText:A,strong:c(),thematicBreak:c()}};MY(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(de){let xe={type:"root",children:[]};const Te={stack:[xe],tokenStack:[],config:t,enter:l,exit:f,buffer:o,resume:h,data:n},Ge=[];let We=-1;for(;++We<de.length;)if(de[We][1].type==="listOrdered"||de[We][1].type==="listUnordered")if(de[We][0]==="enter")Ge.push(We);else{const Gt=Ge.pop();We=i(de,Gt,We)}for(We=-1;++We<de.length;){const Gt=t[de[We][0]];PY.call(Gt,de[We][1].type)&&Gt[de[We][1].type].call(Object.assign({sliceSerialize:de[We][2].sliceSerialize},Te),de[We][1])}if(Te.tokenStack.length>0){const Gt=Te.tokenStack[Te.tokenStack.length-1];(Gt[1]||M5).call(Te,void 0,Gt[0])}for(xe.position={start:gl(de.length>0?de[0][1].start:{line:1,column:1,offset:0}),end:gl(de.length>0?de[de.length-2][1].end:{line:1,column:1,offset:0})},We=-1;++We<t.transforms.length;)xe=t.transforms[We](xe)||xe;return xe}function i(de,xe,Te){let Ge=xe-1,We=-1,Gt=!1,nn,Se,at,vt;for(;++Ge<=Te;){const st=de[Ge];switch(st[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{st[0]==="enter"?We++:We--,vt=void 0;break}case"lineEndingBlank":{st[0]==="enter"&&(nn&&!vt&&!We&&!at&&(at=Ge),vt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:vt=void 0}if(!We&&st[0]==="enter"&&st[1].type==="listItemPrefix"||We===-1&&st[0]==="exit"&&(st[1].type==="listUnordered"||st[1].type==="listOrdered")){if(nn){let zn=Ge;for(Se=void 0;zn--;){const rn=de[zn];if(rn[1].type==="lineEnding"||rn[1].type==="lineEndingBlank"){if(rn[0]==="exit")continue;Se&&(de[Se][1].type="lineEndingBlank",Gt=!0),rn[1].type="lineEnding",Se=zn}else if(!(rn[1].type==="linePrefix"||rn[1].type==="blockQuotePrefix"||rn[1].type==="blockQuotePrefixWhitespace"||rn[1].type==="blockQuoteMarker"||rn[1].type==="listItemIndent"))break}at&&(!Se||at<Se)&&(nn._spread=!0),nn.end=Object.assign({},Se?de[Se][1].start:st[1].end),de.splice(Se||Ge,0,["exit",nn,st[2]]),Ge++,Te++}if(st[1].type==="listItemPrefix"){const zn={type:"listItem",_spread:!1,start:Object.assign({},st[1].start),end:void 0};nn=zn,de.splice(Ge,0,["enter",zn,st[2]]),Ge++,Te++,at=void 0,vt=!0}}}return de[xe][1]._spread=Gt,Te}function a(de,xe){return Te;function Te(Ge){l.call(this,de(Ge),Ge),xe&&xe.call(this,Ge)}}function o(){this.stack.push({type:"fragment",children:[]})}function l(de,xe,Te){this.stack[this.stack.length-1].children.push(de),this.stack.push(de),this.tokenStack.push([xe,Te||void 0]),de.position={start:gl(xe.start),end:void 0}}function c(de){return xe;function xe(Te){de&&de.call(this,Te),f.call(this,Te)}}function f(de,xe){const Te=this.stack.pop(),Ge=this.tokenStack.pop();if(Ge)Ge[0].type!==de.type&&(xe?xe.call(this,de,Ge[0]):(Ge[1]||M5).call(this,de,Ge[0]));else throw new Error("Cannot close `"+de.type+"` ("+Cm({start:de.start,end:de.end})+"): it’s not open");Te.position.end=gl(de.end)}function h(){return eT(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function g(de){if(this.data.expectingFirstListItemValue){const xe=this.stack[this.stack.length-2];xe.start=Number.parseInt(this.sliceSerialize(de),10),this.data.expectingFirstListItemValue=void 0}}function v(){const de=this.resume(),xe=this.stack[this.stack.length-1];xe.lang=de}function b(){const de=this.resume(),xe=this.stack[this.stack.length-1];xe.meta=de}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){const de=this.resume(),xe=this.stack[this.stack.length-1];xe.value=de.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function E(){const de=this.resume(),xe=this.stack[this.stack.length-1];xe.value=de.replace(/(\r?\n|\r)$/g,"")}function C(de){const xe=this.resume(),Te=this.stack[this.stack.length-1];Te.label=xe,Te.identifier=Pa(this.sliceSerialize(de)).toLowerCase()}function _(){const de=this.resume(),xe=this.stack[this.stack.length-1];xe.title=de}function N(){const de=this.resume(),xe=this.stack[this.stack.length-1];xe.url=de}function O(de){const xe=this.stack[this.stack.length-1];if(!xe.depth){const Te=this.sliceSerialize(de).length;xe.depth=Te}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function T(de){const xe=this.stack[this.stack.length-1];xe.depth=this.sliceSerialize(de).codePointAt(0)===61?1:2}function P(){this.data.setextHeadingSlurpLineEnding=void 0}function I(de){const Te=this.stack[this.stack.length-1].children;let Ge=Te[Te.length-1];(!Ge||Ge.type!=="text")&&(Ge=Mt(),Ge.position={start:gl(de.start),end:void 0},Te.push(Ge)),this.stack.push(Ge)}function z(de){const xe=this.stack.pop();xe.value+=this.sliceSerialize(de),xe.position.end=gl(de.end)}function F(de){const xe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Te=xe.children[xe.children.length-1];Te.position.end=gl(de.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(xe.type)&&(I.call(this,de),z.call(this,de))}function B(){this.data.atHardBreak=!0}function G(){const de=this.resume(),xe=this.stack[this.stack.length-1];xe.value=de}function L(){const de=this.resume(),xe=this.stack[this.stack.length-1];xe.value=de}function V(){const de=this.resume(),xe=this.stack[this.stack.length-1];xe.value=de}function D(){const de=this.stack[this.stack.length-1];if(this.data.inReference){const xe=this.data.referenceType||"shortcut";de.type+="Reference",de.referenceType=xe,delete de.url,delete de.title}else delete de.identifier,delete de.label;this.data.referenceType=void 0}function q(){const de=this.stack[this.stack.length-1];if(this.data.inReference){const xe=this.data.referenceType||"shortcut";de.type+="Reference",de.referenceType=xe,delete de.url,delete de.title}else delete de.identifier,delete de.label;this.data.referenceType=void 0}function X(de){const xe=this.sliceSerialize(de),Te=this.stack[this.stack.length-2];Te.label=mIe(xe),Te.identifier=Pa(xe).toLowerCase()}function K(){const de=this.stack[this.stack.length-1],xe=this.resume(),Te=this.stack[this.stack.length-1];if(this.data.inReference=!0,Te.type==="link"){const Ge=de.children;Te.children=Ge}else Te.alt=xe}function R(){const de=this.resume(),xe=this.stack[this.stack.length-1];xe.url=de}function H(){const de=this.resume(),xe=this.stack[this.stack.length-1];xe.title=de}function U(){this.data.inReference=void 0}function $(){this.data.referenceType="collapsed"}function Q(de){const xe=this.resume(),Te=this.stack[this.stack.length-1];Te.label=xe,Te.identifier=Pa(this.sliceSerialize(de)).toLowerCase(),this.data.referenceType="full"}function J(de){this.data.characterReferenceType=de.type}function ne(de){const xe=this.sliceSerialize(de),Te=this.data.characterReferenceType;let Ge;Te?(Ge=SY(xe,Te==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ge=tT(xe);const We=this.stack[this.stack.length-1];We.value+=Ge}function ae(de){const xe=this.stack.pop();xe.position.end=gl(de.end)}function ie(de){z.call(this,de);const xe=this.stack[this.stack.length-1];xe.url=this.sliceSerialize(de)}function ee(de){z.call(this,de);const xe=this.stack[this.stack.length-1];xe.url="mailto:"+this.sliceSerialize(de)}function se(){return{type:"blockquote",children:[]}}function pe(){return{type:"code",lang:null,meta:null,value:""}}function re(){return{type:"inlineCode",value:""}}function we(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ee(){return{type:"emphasis",children:[]}}function $e(){return{type:"heading",depth:0,children:[]}}function Ne(){return{type:"break"}}function et(){return{type:"html",value:""}}function Xe(){return{type:"image",title:null,url:"",alt:null}}function Ke(){return{type:"link",title:null,url:"",children:[]}}function Rt(de){return{type:"list",ordered:de.type==="listOrdered",start:null,spread:de._spread,children:[]}}function ct(de){return{type:"listItem",spread:de._spread,checked:null,children:[]}}function wt(){return{type:"paragraph",children:[]}}function Xt(){return{type:"strong",children:[]}}function Mt(){return{type:"text",value:""}}function cn(){return{type:"thematicBreak"}}}function gl(e){return{line:e.line,column:e.column,offset:e.offset}}function MY(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?MY(e,r):yIe(e,r)}}function yIe(e,t){let n;for(n in t)if(PY.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function M5(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Cm({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Cm({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Cm({start:t.start,end:t.end})+") is still open")}function xIe(e){const t=this;t.parser=n;function n(r){return gIe(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function bIe(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function wIe(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
`}]}function SIe(e,t){const n=t.value?t.value+`
`:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};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 EIe(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function jIe(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function _Ie(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Zd(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let o,l=e.footnoteCounts.get(r);l===void 0?(l=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,l+=1,e.footnoteCounts.set(r,l);const c={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,c);const f={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(t,f),e.applyData(t,f)}function CIe(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function kIe(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function DY(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=r:i.push({type:"text",value:r}),i}function NIe(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return DY(e,t);const i={src:Zd(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function AIe(e,t){const n={src:Zd(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function OIe(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function TIe(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return DY(e,t);const i={href:Zd(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function PIe(e,t){const n={href:Zd(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function MIe(e,t,n){const r=e.all(t),i=n?DIe(n):RY(t),a={},o=[];if(typeof t.checked=="boolean"){const h=r[0];let d;h&&h.type==="element"&&h.tagName==="p"?d=h:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let l=-1;for(;++l<r.length;){const h=r[l];(i||l!==0||h.type!=="element"||h.tagName!=="p")&&o.push({type:"text",value:`
`}),h.type==="element"&&h.tagName==="p"&&!i?o.push(...h.children):o.push(h)}const c=r[r.length-1];c&&(i||c.type!=="element"||c.tagName!=="p")&&o.push({type:"text",value:`
`});const f={type:"element",tagName:"li",properties:a,children:o};return e.patch(t,f),e.applyData(t,f)}function DIe(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=RY(n[r])}return t}function RY(e){const t=e.spread;return t??e.children.length>1}function RIe(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const o=r[i];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function IIe(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function LIe(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function zIe(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function $Ie(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],o),i.push(o)}if(n.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=WO(t.children[1]),c=mY(t.children[t.children.length-1]);l&&c&&(o.position={start:l,end:c}),i.push(o)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function BIe(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,l=o?o.length:t.children.length;let c=-1;const f=[];for(;++c<l;){const d=t.children[c],g={},v=o?o[c]:void 0;v&&(g.align=v);let b={type:"element",tagName:a,properties:g,children:[]};d&&(b.children=e.all(d),e.patch(d,b),b=e.applyData(d,b)),f.push(b)}const h={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,h),e.applyData(t,h)}function FIe(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const D5=9,R5=32;function UIe(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const a=[];for(;r;)a.push(I5(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(I5(t.slice(i),i>0,!1)),a.join("")}function I5(e,t,n){let r=0,i=e.length;if(t){let a=e.codePointAt(r);for(;a===D5||a===R5;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(i-1);for(;a===D5||a===R5;)i--,a=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function HIe(e,t){const n={type:"text",value:UIe(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function qIe(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const VIe={blockquote:bIe,break:wIe,code:SIe,delete:EIe,emphasis:jIe,footnoteReference:_Ie,heading:CIe,html:kIe,imageReference:NIe,image:AIe,inlineCode:OIe,linkReference:TIe,link:PIe,listItem:MIe,list:RIe,paragraph:IIe,root:LIe,strong:zIe,table:$Ie,tableCell:FIe,tableRow:BIe,text:HIe,thematicBreak:qIe,toml:dy,yaml:dy,definition:dy,footnoteDefinition:dy};function dy(){}const IY=-1,Xb=0,Nm=1,i0=2,rT=3,iT=4,aT=5,oT=6,LY=7,zY=8,L5=typeof self=="object"?self:globalThis,KIe=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),r=i=>{if(e.has(i))return e.get(i);const[a,o]=t[i];switch(a){case Xb:case IY:return n(o,i);case Nm:{const l=n([],i);for(const c of o)l.push(r(c));return l}case i0:{const l=n({},i);for(const[c,f]of o)l[r(c)]=r(f);return l}case rT:return n(new Date(o),i);case iT:{const{source:l,flags:c}=o;return n(new RegExp(l,c),i)}case aT:{const l=n(new Map,i);for(const[c,f]of o)l.set(r(c),r(f));return l}case oT:{const l=n(new Set,i);for(const c of o)l.add(r(c));return l}case LY:{const{name:l,message:c}=o;return n(new L5[l](c),i)}case zY:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:l}=new Uint8Array(o);return n(new DataView(l),o)}}return n(new L5[a](o),i)};return r},z5=e=>KIe(new Map,e)(0),Tf="",{toString:YIe}={},{keys:XIe}=Object,mm=e=>{const t=typeof e;if(t!=="object"||!e)return[Xb,t];const n=YIe.call(e).slice(8,-1);switch(n){case"Array":return[Nm,Tf];case"Object":return[i0,Tf];case"Date":return[rT,Tf];case"RegExp":return[iT,Tf];case"Map":return[aT,Tf];case"Set":return[oT,Tf];case"DataView":return[Nm,n]}return n.includes("Array")?[Nm,n]:n.includes("Error")?[LY,n]:[i0,n]},hy=([e,t])=>e===Xb&&(t==="function"||t==="symbol"),GIe=(e,t,n,r)=>{const i=(o,l)=>{const c=r.push(o)-1;return n.set(l,c),c},a=o=>{if(n.has(o))return n.get(o);let[l,c]=mm(o);switch(l){case Xb:{let h=o;switch(c){case"bigint":l=zY,h=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);h=null;break;case"undefined":return i([IY],o)}return i([l,h],o)}case Nm:{if(c){let g=o;return c==="DataView"?g=new Uint8Array(o.buffer):c==="ArrayBuffer"&&(g=new Uint8Array(o)),i([c,[...g]],o)}const h=[],d=i([l,h],o);for(const g of o)h.push(a(g));return d}case i0:{if(c)switch(c){case"BigInt":return i([c,o.toString()],o);case"Boolean":case"Number":case"String":return i([c,o.valueOf()],o)}if(t&&"toJSON"in o)return a(o.toJSON());const h=[],d=i([l,h],o);for(const g of XIe(o))(e||!hy(mm(o[g])))&&h.push([a(g),a(o[g])]);return d}case rT:return i([l,o.toISOString()],o);case iT:{const{source:h,flags:d}=o;return i([l,{source:h,flags:d}],o)}case aT:{const h=[],d=i([l,h],o);for(const[g,v]of o)(e||!(hy(mm(g))||hy(mm(v))))&&h.push([a(g),a(v)]);return d}case oT:{const h=[],d=i([l,h],o);for(const g of o)(e||!hy(mm(g)))&&h.push(a(g));return d}}const{message:f}=o;return i([l,{name:c,message:f}],o)};return a},$5=(e,{json:t,lossy:n}={})=>{const r=[];return GIe(!(t||n),!!t,new Map,r)(e),r},a0=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?z5($5(e,t)):structuredClone(e):(e,t)=>z5($5(e,t));function WIe(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function QIe(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function ZIe(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||WIe,r=e.options.footnoteBackLabel||QIe,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let c=-1;for(;++c<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[c]);if(!f)continue;const h=e.all(f),d=String(f.identifier).toUpperCase(),g=Zd(d.toLowerCase());let v=0;const b=[],w=e.footnoteCounts.get(d);for(;w!==void 0&&++v<=w;){b.length>0&&b.push({type:"text",value:" "});let C=typeof n=="string"?n:n(c,v);typeof C=="string"&&(C={type:"text",value:C}),b.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+g+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,v),className:["data-footnote-backref"]},children:Array.isArray(C)?C:[C]})}const S=h[h.length-1];if(S&&S.type==="element"&&S.tagName==="p"){const C=S.children[S.children.length-1];C&&C.type==="text"?C.value+=" ":S.children.push({type:"text",value:" "}),S.children.push(...b)}else h.push(...b);const E={type:"element",tagName:"li",properties:{id:t+"fn-"+g},children:e.wrap(h,!0)};e.patch(f,E),l.push(E)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...a0(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:`
`}]}}const Gb=(function(e){if(e==null)return nLe;if(typeof e=="function")return Wb(e);if(typeof e=="object")return Array.isArray(e)?JIe(e):eLe(e);if(typeof e=="string")return tLe(e);throw new Error("Expected function, string, or object as test")});function JIe(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Gb(e[n]);return Wb(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function eLe(e){const t=e;return Wb(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function tLe(e){return Wb(t);function t(n){return n&&n.type===e}}function Wb(e){return t;function t(n,r,i){return!!(rLe(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function nLe(){return!0}function rLe(e){return e!==null&&typeof e=="object"&&"type"in e}const $Y=[],iLe=!0,ZC=!1,aLe="skip";function BY(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=Gb(i),o=r?-1:1;l(e,void 0,[])();function l(c,f,h){const d=c&&typeof c=="object"?c:{};if(typeof d.type=="string"){const v=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(g,"name",{value:"node ("+(c.type+(v?"<"+v+">":""))+")"})}return g;function g(){let v=$Y,b,w,S;if((!t||a(c,f,h[h.length-1]||void 0))&&(v=oLe(n(c,h)),v[0]===ZC))return v;if("children"in c&&c.children){const E=c;if(E.children&&v[0]!==aLe)for(w=(r?E.children.length:-1)+o,S=h.concat(E);w>-1&&w<E.children.length;){const C=E.children[w];if(b=l(C,w,S)(),b[0]===ZC)return b;w=typeof b[1]=="number"?b[1]:w+o}}return v}}}function oLe(e){return Array.isArray(e)?e:typeof e=="number"?[iLe,e]:e==null?$Y:[e]}function sT(e,t,n,r){let i,a,o;typeof t=="function"&&typeof n!="function"?(a=void 0,o=t,i=n):(a=t,o=n,i=r),BY(e,a,l,i);function l(c,f){const h=f[f.length-1],d=h?h.children.indexOf(c):void 0;return o(c,d,h)}}const JC={}.hasOwnProperty,sLe={};function lLe(e,t){const n=t||sLe,r=new Map,i=new Map,a=new Map,o={...VIe,...n.handlers},l={all:f,applyData:cLe,definitionById:r,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:o,one:c,options:n,patch:uLe,wrap:dLe};return sT(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const d=h.type==="definition"?r:i,g=String(h.identifier).toUpperCase();d.has(g)||d.set(g,h)}}),l;function c(h,d){const g=h.type,v=l.handlers[g];if(JC.call(l.handlers,g)&&v)return v(l,h,d);if(l.options.passThrough&&l.options.passThrough.includes(g)){if("children"in h){const{children:w,...S}=h,E=a0(S);return E.children=l.all(h),E}return a0(h)}return(l.options.unknownHandler||fLe)(l,h,d)}function f(h){const d=[];if("children"in h){const g=h.children;let v=-1;for(;++v<g.length;){const b=l.one(g[v],h);if(b){if(v&&g[v-1].type==="break"&&(!Array.isArray(b)&&b.type==="text"&&(b.value=B5(b.value)),!Array.isArray(b)&&b.type==="element")){const w=b.children[0];w&&w.type==="text"&&(w.value=B5(w.value))}Array.isArray(b)?d.push(...b):d.push(b)}}}return d}}function uLe(e,t){e.position&&(t.position=QMe(e))}function cLe(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const o="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:o}}n.type==="element"&&a&&Object.assign(n.properties,a0(a)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function fLe(e,t){const n=t.data||{},r="value"in t&&!(JC.call(n,"hProperties")||JC.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function dLe(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
`});++r<e.length;)r&&n.push({type:"text",value:`
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
`}),n}function B5(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function F5(e,t){const n=lLe(e,t),r=n.one(e,void 0),i=ZIe(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
`},i),a}function hLe(e,t){return e&&"run"in e?async function(n,r){const i=F5(n,{file:r,...t});await e.run(i,r)}:function(n,r){return F5(n,{file:r,...e||t})}}function U5(e){if(e)throw e}var kj,H5;function mLe(){if(H5)return kj;H5=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(f){return typeof Array.isArray=="function"?Array.isArray(f):t.call(f)==="[object Array]"},a=function(f){if(!f||t.call(f)!=="[object Object]")return!1;var h=e.call(f,"constructor"),d=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!h&&!d)return!1;var g;for(g in f);return typeof g>"u"||e.call(f,g)},o=function(f,h){n&&h.name==="__proto__"?n(f,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):f[h.name]=h.newValue},l=function(f,h){if(h==="__proto__")if(e.call(f,h)){if(r)return r(f,h).value}else return;return f[h]};return kj=function c(){var f,h,d,g,v,b,w=arguments[0],S=1,E=arguments.length,C=!1;for(typeof w=="boolean"&&(C=w,w=arguments[1]||{},S=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});S<E;++S)if(f=arguments[S],f!=null)for(h in f)d=l(w,h),g=l(f,h),w!==g&&(C&&g&&(a(g)||(v=i(g)))?(v?(v=!1,b=d&&i(d)?d:[]):b=d&&a(d)?d:{},o(w,{name:h,newValue:c(C,b,g)})):typeof g<"u"&&o(w,{name:h,newValue:g}));return w},kj}var pLe=mLe();const Nj=Hi(pLe);function ek(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 gLe(){const e=[],t={run:n,use:r};return t;function n(...i){let a=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);l(null,...i);function l(c,...f){const h=e[++a];let d=-1;if(c){o(c);return}for(;++d<i.length;)(f[d]===null||f[d]===void 0)&&(f[d]=i[d]);i=f,h?vLe(h,l)(...f):o(null,...f)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function vLe(e,t){let n;return r;function r(...o){const l=e.length>o.length;let c;l&&o.push(i);try{c=e.apply(this,o)}catch(f){const h=f;if(l&&n)throw h;return i(h)}l||(c&&c.then&&typeof c.then=="function"?c.then(a,i):c instanceof Error?i(c):a(c))}function i(o,...l){n||(n=!0,t(o,...l))}function a(o){i(null,o)}}const to={basename:yLe,dirname:xLe,extname:bLe,join:wLe,sep:"/"};function yLe(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');dg(e);let n=0,r=-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){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let o=-1,l=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),l>-1&&(e.codePointAt(i)===t.codePointAt(l--)?l<0&&(r=i):(l=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function xLe(e){if(dg(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function bLe(e){dg(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){const l=e.codePointAt(t);if(l===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),l===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function wLe(...e){let t=-1,n;for(;++t<e.length;)dg(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":SLe(n)}function SLe(e){dg(e);const t=e.codePointAt(0)===47;let n=ELe(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function ELe(e,t){let n="",r=0,i=-1,a=0,o=-1,l,c;for(;++o<=e.length;){if(o<e.length)l=e.codePointAt(o);else{if(l===47)break;l=47}if(l===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf("/"),c!==n.length-1){c<0?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),i=o,a=0;continue}}else if(n.length>0){n="",r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else l===46&&a>-1?a++:a=-1}return n}function dg(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const jLe={cwd:_Le};function _Le(){return"/"}function tk(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function CLe(e){if(typeof e=="string")e=new URL(e);else if(!tk(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 kLe(e)}function kLe(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===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 Aj=["history","path","basename","stem","extname","dirname"];class FY{constructor(t){let n;t?tk(t)?n={path:t}:typeof t=="string"||NLe(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":jLe.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Aj.length;){const a=Aj[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let i;for(i in n)Aj.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?to.basename(this.path):void 0}set basename(t){Tj(t,"basename"),Oj(t,"basename"),this.path=to.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?to.dirname(this.path):void 0}set dirname(t){q5(this.basename,"dirname"),this.path=to.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?to.extname(this.path):void 0}set extname(t){if(Oj(t,"extname"),q5(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=to.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){tk(t)&&(t=CLe(t)),Tj(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?to.basename(this.path,this.extname):void 0}set stem(t){Tj(t,"stem"),Oj(t,"stem"),this.path=to.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new Kr(t,n,r);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 Oj(e,t){if(e&&e.includes(to.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+to.sep+"`")}function Tj(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function q5(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function NLe(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const ALe=(function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),OLe={}.hasOwnProperty;class lT extends ALe{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=gLe()}copy(){const t=new lT;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Nj(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Dj("data",this.frozen),this.namespace[t]=n,this):OLe.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Dj("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[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=my(t),r=this.parser||this.Parser;return Pj("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Pj("process",this.parser||this.Parser),Mj("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,o){const l=my(t),c=r.parse(l);r.run(c,l,function(h,d,g){if(h||!d||!g)return f(h);const v=d,b=r.stringify(v,g);MLe(b)?g.value=b:g.result=b,f(h,g)});function f(h,d){h||!d?o(h):a?a(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),Pj("processSync",this.parser||this.Parser),Mj("processSync",this.compiler||this.Compiler),this.process(t,i),K5("processSync","process",n),r;function i(a,o){n=!0,U5(a),r=o}}run(t,n,r){V5(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(o,l){const c=my(n);i.run(t,c,f);function f(h,d,g){const v=d||t;h?l(h):o?o(v):r(void 0,v,g)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),K5("runSync","run",r),i;function a(o,l){U5(o),i=l,r=!0}}stringify(t,n){this.freeze();const r=my(n),i=this.compiler||this.Compiler;return Mj("stringify",i),V5(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Dj("use",this.frozen),t!=null)if(typeof t=="function")c(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(f){if(typeof f=="function")c(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[h,...d]=f;c(h,d)}else o(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function o(f){if(!("plugins"in f)&&!("settings"in f))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");l(f.plugins),f.settings&&(i.settings=Nj(!0,i.settings,f.settings))}function l(f){let h=-1;if(f!=null)if(Array.isArray(f))for(;++h<f.length;){const d=f[h];a(d)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function c(f,h){let d=-1,g=-1;for(;++d<r.length;)if(r[d][0]===f){g=d;break}if(g===-1)r.push([f,...h]);else if(h.length>0){let[v,...b]=h;const w=r[g][1];ek(w)&&ek(v)&&(v=Nj(!0,w,v)),r[g]=[f,v,...b]}}}}const TLe=new lT().freeze();function Pj(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Mj(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Dj(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 V5(e){if(!ek(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function K5(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function my(e){return PLe(e)?e:new FY(e)}function PLe(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function MLe(e){return typeof e=="string"||DLe(e)}function DLe(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const RLe="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Y5=[],X5={allowDangerousHtml:!0},ILe=/^(https?|ircs?|mailto|xmpp)$/i,LLe=[{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 zLe(e){const t=$Le(e),n=BLe(e);return FLe(t.runSync(t.parse(n),n),e)}function $Le(e){const t=e.rehypePlugins||Y5,n=e.remarkPlugins||Y5,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...X5}:X5;return TLe().use(xIe).use(n).use(hLe,r).use(t)}function BLe(e){const t=e.children||"",n=new FY;return typeof t=="string"&&(n.value=t),n}function FLe(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,l=t.unwrapDisallowed,c=t.urlTransform||ULe;for(const h of LLe)Object.hasOwn(t,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+RLe+h.id,void 0);return sT(e,f),nDe(e,{Fragment:m.Fragment,components:i,ignoreInvalidStyle:!0,jsx:m.jsx,jsxs:m.jsxs,passKeys:!0,passNode:!0});function f(h,d,g){if(h.type==="raw"&&g&&typeof d=="number")return o?g.children.splice(d,1):g.children[d]={type:"text",value:h.value},d;if(h.type==="element"){let v;for(v in jj)if(Object.hasOwn(jj,v)&&Object.hasOwn(h.properties,v)){const b=h.properties[v],w=jj[v];(w===null||w.includes(h.tagName))&&(h.properties[v]=c(String(b||""),v,h))}}if(h.type==="element"){let v=n?!n.includes(h.tagName):a?a.includes(h.tagName):!1;if(!v&&r&&typeof d=="number"&&(v=!r(h,d,g)),v&&g&&typeof d=="number")return l&&h.children?g.children.splice(d,1,...h.children):g.children.splice(d,1),d}}}function ULe(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||ILe.test(e.slice(0,t))?e:""}function G5(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function HLe(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function qLe(e,t,n){const i=Gb((n||{}).ignore||[]),a=VLe(t);let o=-1;for(;++o<a.length;)BY(e,"text",l);function l(f,h){let d=-1,g;for(;++d<h.length;){const v=h[d],b=g?g.children:void 0;if(i(v,b?b.indexOf(v):void 0,g))return;g=v}if(g)return c(f,h)}function c(f,h){const d=h[h.length-1],g=a[o][0],v=a[o][1];let b=0;const S=d.children.indexOf(f);let E=!1,C=[];g.lastIndex=0;let _=g.exec(f.value);for(;_;){const N=_.index,O={index:_.index,input:_.input,stack:[...h,f]};let A=v(..._,O);if(typeof A=="string"&&(A=A.length>0?{type:"text",value:A}:void 0),A===!1?g.lastIndex=N+1:(b!==N&&C.push({type:"text",value:f.value.slice(b,N)}),Array.isArray(A)?C.push(...A):A&&C.push(A),b=N+_[0].length,E=!0),!g.global)break;_=g.exec(f.value)}return E?(b<f.value.length&&C.push({type:"text",value:f.value.slice(b)}),d.children.splice(S,1,...C)):C=[f],S+C.length}}function VLe(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([KLe(i[0]),YLe(i[1])])}return t}function KLe(e){return typeof e=="string"?new RegExp(HLe(e),"g"):e}function YLe(e){return typeof e=="function"?e:function(){return e}}const Rj="phrasing",Ij=["autolink","link","image","label"];function XLe(){return{transforms:[tze],enter:{literalAutolink:WLe,literalAutolinkEmail:Lj,literalAutolinkHttp:Lj,literalAutolinkWww:Lj},exit:{literalAutolink:eze,literalAutolinkEmail:JLe,literalAutolinkHttp:QLe,literalAutolinkWww:ZLe}}}function GLe(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Rj,notInConstruct:Ij},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Rj,notInConstruct:Ij},{character:":",before:"[ps]",after:"\\/",inConstruct:Rj,notInConstruct:Ij}]}}function WLe(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Lj(e){this.config.enter.autolinkProtocol.call(this,e)}function QLe(e){this.config.exit.autolinkProtocol.call(this,e)}function ZLe(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function JLe(e){this.config.exit.autolinkEmail.call(this,e)}function eze(e){this.exit(e)}function tze(e){qLe(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,nze],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),rze]],{ignore:["link","linkReference"]})}function nze(e,t,n,r,i){let a="";if(!UY(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!ize(n)))return!1;const o=aze(n+r);if(!o[0])return!1;const l={type:"link",title:null,url:a+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[l,{type:"text",value:o[1]}]:l}function rze(e,t,n,r){return!UY(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function ize(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function aze(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=G5(e,"(");let a=G5(e,")");for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function UY(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Cc(n)||Kb(n))&&(!t||n!==47)}HY.peek=mze;function oze(){this.buffer()}function sze(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function lze(){this.buffer()}function uze(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function cze(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Pa(this.sliceSerialize(e)).toLowerCase(),n.label=t}function fze(e){this.exit(e)}function dze(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Pa(this.sliceSerialize(e)).toLowerCase(),n.label=t}function hze(e){this.exit(e)}function mze(){return"["}function HY(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const o=n.enter("footnoteReference"),l=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{after:"]",before:a})),l(),o(),a+=i.move("]"),a}function pze(){return{enter:{gfmFootnoteCallString:oze,gfmFootnoteCall:sze,gfmFootnoteDefinitionLabelString:lze,gfmFootnoteDefinition:uze},exit:{gfmFootnoteCallString:cze,gfmFootnoteCall:fze,gfmFootnoteDefinitionLabelString:dze,gfmFootnoteDefinition:hze}}}function gze(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:HY},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,a,o){const l=a.createTracker(o);let c=l.move("[^");const f=a.enter("footnoteDefinition"),h=a.enter("label");return c+=l.move(a.safe(a.associationId(r),{before:c,after:"]"})),h(),c+=l.move("]:"),r.children&&r.children.length>0&&(l.shift(4),c+=l.move((t?`
`:" ")+a.indentLines(a.containerFlow(r,l.current()),t?qY:vze))),f(),c}}function vze(e,t,n){return t===0?e:qY(e,t,n)}function qY(e,t,n){return(n?"":"    ")+e}const yze=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];VY.peek=Eze;function xze(){return{canContainEols:["delete"],enter:{strikethrough:wze},exit:{strikethrough:Sze}}}function bze(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:yze}],handlers:{delete:VY}}}function wze(e){this.enter({type:"delete",children:[]},e)}function Sze(e){this.exit(e)}function VY(e,t,n,r){const i=n.createTracker(r),a=n.enter("strikethrough");let o=i.move("~~");return o+=n.containerPhrasing(e,{...i.current(),before:o,after:"~"}),o+=i.move("~~"),a(),o}function Eze(){return"~"}function jze(e){return e.length}function _ze(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||jze,a=[],o=[],l=[],c=[];let f=0,h=-1;for(;++h<e.length;){const w=[],S=[];let E=-1;for(e[h].length>f&&(f=e[h].length);++E<e[h].length;){const C=Cze(e[h][E]);if(n.alignDelimiters!==!1){const _=i(C);S[E]=_,(c[E]===void 0||_>c[E])&&(c[E]=_)}w.push(C)}o[h]=w,l[h]=S}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<f;)a[d]=W5(r[d]);else{const w=W5(r);for(;++d<f;)a[d]=w}d=-1;const g=[],v=[];for(;++d<f;){const w=a[d];let S="",E="";w===99?(S=":",E=":"):w===108?S=":":w===114&&(E=":");let C=n.alignDelimiters===!1?1:Math.max(1,c[d]-S.length-E.length);const _=S+"-".repeat(C)+E;n.alignDelimiters!==!1&&(C=S.length+C+E.length,C>c[d]&&(c[d]=C),v[d]=C),g[d]=_}o.splice(1,0,g),l.splice(1,0,v),h=-1;const b=[];for(;++h<o.length;){const w=o[h],S=l[h];d=-1;const E=[];for(;++d<f;){const C=w[d]||"";let _="",N="";if(n.alignDelimiters!==!1){const O=c[d]-(S[d]||0),A=a[d];A===114?_=" ".repeat(O):A===99?O%2?(_=" ".repeat(O/2+.5),N=" ".repeat(O/2-.5)):(_=" ".repeat(O/2),N=_):N=" ".repeat(O)}n.delimiterStart!==!1&&!d&&E.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&C==="")&&(n.delimiterStart!==!1||d)&&E.push(" "),n.alignDelimiters!==!1&&E.push(_),E.push(C),n.alignDelimiters!==!1&&E.push(N),n.padding!==!1&&E.push(" "),(n.delimiterEnd!==!1||d!==f-1)&&E.push("|")}b.push(n.delimiterEnd===!1?E.join("").replace(/ +$/,""):E.join(""))}return b.join(`
`)}function Cze(e){return e==null?"":String(e)}function W5(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function kze(e,t,n,r){const i=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const o=n.indentLines(n.containerFlow(e,a.current()),Nze);return i(),o}function Nze(e,t,n){return">"+(n?"":" ")+e}function Aze(e,t){return Q5(e,t.inConstruct,!0)&&!Q5(e,t.notInConstruct,!1)}function Q5(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Z5(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
`&&Aze(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
`}function Oze(e,t){const n=String(e);let r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function Tze(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function Pze(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Mze(e,t,n,r){const i=Pze(n),a=e.value||"",o=i==="`"?"GraveAccent":"Tilde";if(Tze(e,n)){const d=n.enter("codeIndented"),g=n.indentLines(a,Dze);return d(),g}const l=n.createTracker(r),c=i.repeat(Math.max(Oze(a,i)+1,3)),f=n.enter("codeFenced");let h=l.move(c);if(e.lang){const d=n.enter(`codeFencedLang${o}`);h+=l.move(n.safe(e.lang,{before:h,after:" ",encode:["`"],...l.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${o}`);h+=l.move(" "),h+=l.move(n.safe(e.meta,{before:h,after:`
`,encode:["`"],...l.current()})),d()}return h+=l.move(`
`),a&&(h+=l.move(a+`
`)),h+=l.move(c),f(),h}function Dze(e,t,n){return(n?"":"    ")+e}function uT(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Rze(e,t,n,r){const i=uT(n),a=i==='"'?"Quote":"Apostrophe",o=n.enter("definition");let l=n.enter("label");const c=n.createTracker(r);let f=c.move("[");return f+=c.move(n.safe(n.associationId(e),{before:f,after:"]",...c.current()})),f+=c.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),f+=c.move("<"),f+=c.move(n.safe(e.url,{before:f,after:">",...c.current()})),f+=c.move(">")):(l=n.enter("destinationRaw"),f+=c.move(n.safe(e.url,{before:f,after:e.title?" ":`
`,...c.current()}))),l(),e.title&&(l=n.enter(`title${a}`),f+=c.move(" "+i),f+=c.move(n.safe(e.title,{before:f,after:i,...c.current()})),f+=c.move(i),l()),o(),f}function Ize(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function lp(e){return"&#x"+e.toString(16).toUpperCase()+";"}function o0(e,t,n){const r=Td(e),i=Td(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}KY.peek=Lze;function KY(e,t,n,r){const i=Ize(n),a=n.enter("emphasis"),o=n.createTracker(r),l=o.move(i);let c=o.move(n.containerPhrasing(e,{after:i,before:l,...o.current()}));const f=c.charCodeAt(0),h=o0(r.before.charCodeAt(r.before.length-1),f,i);h.inside&&(c=lp(f)+c.slice(1));const d=c.charCodeAt(c.length-1),g=o0(r.after.charCodeAt(0),d,i);g.inside&&(c=c.slice(0,-1)+lp(d));const v=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:g.outside,before:h.outside},l+c+v}function Lze(e,t,n){return n.options.emphasis||"*"}function zze(e,t){let n=!1;return sT(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,ZC}),!!((!e.depth||e.depth<3)&&eT(e)&&(t.options.setext||n))}function $ze(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(zze(e,n)){const h=n.enter("headingSetext"),d=n.enter("phrasing"),g=n.containerPhrasing(e,{...a.current(),before:`
`,after:`
`});return d(),h(),g+`
`+(i===1?"=":"-").repeat(g.length-(Math.max(g.lastIndexOf("\r"),g.lastIndexOf(`
`))+1))}const o="#".repeat(i),l=n.enter("headingAtx"),c=n.enter("phrasing");a.move(o+" ");let f=n.containerPhrasing(e,{before:"# ",after:`
`,...a.current()});return/^[\t ]/.test(f)&&(f=lp(f.charCodeAt(0))+f.slice(1)),f=f?o+" "+f:o,n.options.closeAtx&&(f+=" "+o),c(),l(),f}YY.peek=Bze;function YY(e){return e.value||""}function Bze(){return"<"}XY.peek=Fze;function XY(e,t,n,r){const i=uT(n),a=i==='"'?"Quote":"Apostrophe",o=n.enter("image");let l=n.enter("label");const c=n.createTracker(r);let f=c.move("![");return f+=c.move(n.safe(e.alt,{before:f,after:"]",...c.current()})),f+=c.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),f+=c.move("<"),f+=c.move(n.safe(e.url,{before:f,after:">",...c.current()})),f+=c.move(">")):(l=n.enter("destinationRaw"),f+=c.move(n.safe(e.url,{before:f,after:e.title?" ":")",...c.current()}))),l(),e.title&&(l=n.enter(`title${a}`),f+=c.move(" "+i),f+=c.move(n.safe(e.title,{before:f,after:i,...c.current()})),f+=c.move(i),l()),f+=c.move(")"),o(),f}function Fze(){return"!"}GY.peek=Uze;function GY(e,t,n,r){const i=e.referenceType,a=n.enter("imageReference");let o=n.enter("label");const l=n.createTracker(r);let c=l.move("![");const f=n.safe(e.alt,{before:c,after:"]",...l.current()});c+=l.move(f+"]["),o();const h=n.stack;n.stack=[],o=n.enter("reference");const d=n.safe(n.associationId(e),{before:c,after:"]",...l.current()});return o(),n.stack=h,a(),i==="full"||!f||f!==d?c+=l.move(d+"]"):i==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function Uze(){return"!"}WY.peek=Hze;function WY(e,t,n){let r=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const o=n.unsafe[a],l=n.compilePattern(o);let c;if(o.atBreak)for(;c=l.exec(r);){let f=c.index;r.charCodeAt(f)===10&&r.charCodeAt(f-1)===13&&f--,r=r.slice(0,f)+" "+r.slice(c.index+1)}}return i+r+i}function Hze(){return"`"}function QY(e,t){const n=eT(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}ZY.peek=qze;function ZY(e,t,n,r){const i=uT(n),a=i==='"'?"Quote":"Apostrophe",o=n.createTracker(r);let l,c;if(QY(e,n)){const h=n.stack;n.stack=[],l=n.enter("autolink");let d=o.move("<");return d+=o.move(n.containerPhrasing(e,{before:d,after:">",...o.current()})),d+=o.move(">"),l(),n.stack=h,d}l=n.enter("link"),c=n.enter("label");let f=o.move("[");return f+=o.move(n.containerPhrasing(e,{before:f,after:"](",...o.current()})),f+=o.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),f+=o.move("<"),f+=o.move(n.safe(e.url,{before:f,after:">",...o.current()})),f+=o.move(">")):(c=n.enter("destinationRaw"),f+=o.move(n.safe(e.url,{before:f,after:e.title?" ":")",...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),f+=o.move(" "+i),f+=o.move(n.safe(e.title,{before:f,after:i,...o.current()})),f+=o.move(i),c()),f+=o.move(")"),l(),f}function qze(e,t,n){return QY(e,n)?"<":"["}JY.peek=Vze;function JY(e,t,n,r){const i=e.referenceType,a=n.enter("linkReference");let o=n.enter("label");const l=n.createTracker(r);let c=l.move("[");const f=n.containerPhrasing(e,{before:c,after:"]",...l.current()});c+=l.move(f+"]["),o();const h=n.stack;n.stack=[],o=n.enter("reference");const d=n.safe(n.associationId(e),{before:c,after:"]",...l.current()});return o(),n.stack=h,a(),i==="full"||!f||f!==d?c+=l.move(d+"]"):i==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function Vze(){return"["}function cT(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Kze(e){const t=cT(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Yze(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function eX(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Xze(e,t,n,r){const i=n.enter("list"),a=n.bulletCurrent;let o=e.ordered?Yze(n):cT(n);const l=e.ordered?o==="."?")":".":Kze(n);let c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&h&&(!h.children||!h.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),eX(n)===o&&h){let d=-1;for(;++d<e.children.length;){const g=e.children[d];if(g&&g.type==="listItem"&&g.children&&g.children[0]&&g.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(o=l),n.bulletCurrent=o;const f=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),f}function Gze(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Wze(e,t,n,r){const i=Gze(n);let a=n.bulletCurrent||cT(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);const l=n.createTracker(r);l.move(a+" ".repeat(o-a.length)),l.shift(o);const c=n.enter("listItem"),f=n.indentLines(n.containerFlow(e,l.current()),h);return c(),f;function h(d,g,v){return g?(v?"":" ".repeat(o))+d:(v?a:a+" ".repeat(o-a.length))+d}}function Qze(e,t,n,r){const i=n.enter("paragraph"),a=n.enter("phrasing"),o=n.containerPhrasing(e,r);return a(),i(),o}const Zze=Gb(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Jze(e,t,n,r){return(e.children.some(function(o){return Zze(o)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function e3e(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}tX.peek=t3e;function tX(e,t,n,r){const i=e3e(n),a=n.enter("strong"),o=n.createTracker(r),l=o.move(i+i);let c=o.move(n.containerPhrasing(e,{after:i,before:l,...o.current()}));const f=c.charCodeAt(0),h=o0(r.before.charCodeAt(r.before.length-1),f,i);h.inside&&(c=lp(f)+c.slice(1));const d=c.charCodeAt(c.length-1),g=o0(r.after.charCodeAt(0),d,i);g.inside&&(c=c.slice(0,-1)+lp(d));const v=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:g.outside,before:h.outside},l+c+v}function t3e(e,t,n){return n.options.strong||"*"}function n3e(e,t,n,r){return n.safe(e.value,r)}function r3e(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function i3e(e,t,n){const r=(eX(n)+(n.options.ruleSpaces?" ":"")).repeat(r3e(n));return n.options.ruleSpaces?r.slice(0,-1):r}const nX={blockquote:kze,break:Z5,code:Mze,definition:Rze,emphasis:KY,hardBreak:Z5,heading:$ze,html:YY,image:XY,imageReference:GY,inlineCode:WY,link:ZY,linkReference:JY,list:Xze,listItem:Wze,paragraph:Qze,root:Jze,strong:tX,text:n3e,thematicBreak:i3e};function a3e(){return{enter:{table:o3e,tableData:J5,tableHeader:J5,tableRow:l3e},exit:{codeText:u3e,table:s3e,tableData:zj,tableHeader:zj,tableRow:zj}}}function o3e(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function s3e(e){this.exit(e),this.data.inTable=void 0}function l3e(e){this.enter({type:"tableRow",children:[]},e)}function zj(e){this.exit(e)}function J5(e){this.enter({type:"tableCell",children:[]},e)}function u3e(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,c3e));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function c3e(e,t){return t==="|"?t:e}function f3e(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[	 :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:g,table:o,tableCell:c,tableRow:l}};function o(v,b,w,S){return f(h(v,w,S),v.align)}function l(v,b,w,S){const E=d(v,w,S),C=f([E]);return C.slice(0,C.indexOf(`
`))}function c(v,b,w,S){const E=w.enter("tableCell"),C=w.enter("phrasing"),_=w.containerPhrasing(v,{...S,before:a,after:a});return C(),E(),_}function f(v,b){return _ze(v,{align:b,alignDelimiters:r,padding:n,stringLength:i})}function h(v,b,w){const S=v.children;let E=-1;const C=[],_=b.enter("table");for(;++E<S.length;)C[E]=d(S[E],b,w);return _(),C}function d(v,b,w){const S=v.children;let E=-1;const C=[],_=b.enter("tableRow");for(;++E<S.length;)C[E]=c(S[E],v,b,w);return _(),C}function g(v,b,w){let S=nX.inlineCode(v,b,w);return w.stack.includes("tableCell")&&(S=S.replace(/\|/g,"\\$&")),S}}function d3e(){return{exit:{taskListCheckValueChecked:e$,taskListCheckValueUnchecked:e$,paragraph:m3e}}}function h3e(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:p3e}}}function e$(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function m3e(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let a=-1,o;for(;++a<i.length;){const l=i[a];if(l.type==="paragraph"){o=l;break}}o===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function p3e(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",l=n.createTracker(r);a&&l.move(o);let c=nX.listItem(e,t,n,{...r,...l.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),c;function f(h){return h+o}}function g3e(){return[XLe(),pze(),xze(),a3e(),d3e()]}function v3e(e){return{extensions:[GLe(),gze(e),bze(),f3e(e),h3e()]}}const y3e={tokenize:j3e,partial:!0},rX={tokenize:_3e,partial:!0},iX={tokenize:C3e,partial:!0},aX={tokenize:k3e,partial:!0},x3e={tokenize:N3e,partial:!0},oX={name:"wwwAutolink",tokenize:S3e,previous:lX},sX={name:"protocolAutolink",tokenize:E3e,previous:uX},Ds={name:"emailAutolink",tokenize:w3e,previous:cX},_o={};function b3e(){return{text:_o}}let Tu=48;for(;Tu<123;)_o[Tu]=Ds,Tu++,Tu===58?Tu=65:Tu===91&&(Tu=97);_o[43]=Ds;_o[45]=Ds;_o[46]=Ds;_o[95]=Ds;_o[72]=[Ds,sX];_o[104]=[Ds,sX];_o[87]=[Ds,oX];_o[119]=[Ds,oX];function w3e(e,t,n){const r=this;let i,a;return o;function o(d){return!nk(d)||!cX.call(r,r.previous)||fT(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(d))}function l(d){return nk(d)?(e.consume(d),l):d===64?(e.consume(d),c):n(d)}function c(d){return d===46?e.check(x3e,h,f)(d):d===45||d===95||Fr(d)?(a=!0,e.consume(d),c):h(d)}function f(d){return e.consume(d),i=!0,c}function h(d){return a&&i&&Jr(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function S3e(e,t,n){const r=this;return i;function i(o){return o!==87&&o!==119||!lX.call(r,r.previous)||fT(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(y3e,e.attempt(rX,e.attempt(iX,a),n),n)(o))}function a(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function E3e(e,t,n){const r=this;let i="",a=!1;return o;function o(d){return(d===72||d===104)&&uX.call(r,r.previous)&&!fT(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),l):n(d)}function l(d){if(Jr(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),l;if(d===58){const g=i.toLowerCase();if(g==="http"||g==="https")return e.consume(d),c}return n(d)}function c(d){return d===47?(e.consume(d),a?f:(a=!0,c)):n(d)}function f(d){return d===null||r0(d)||un(d)||Cc(d)||Kb(d)?n(d):e.attempt(rX,e.attempt(iX,h),n)(d)}function h(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function j3e(e,t,n){let r=0;return i;function i(o){return(o===87||o===119)&&r<3?(r++,e.consume(o),i):o===46&&r===3?(e.consume(o),a):n(o)}function a(o){return o===null?n(o):t(o)}}function _3e(e,t,n){let r,i,a;return o;function o(f){return f===46||f===95?e.check(aX,c,l)(f):f===null||un(f)||Cc(f)||f!==45&&Kb(f)?c(f):(a=!0,e.consume(f),o)}function l(f){return f===95?r=!0:(i=r,r=void 0),e.consume(f),o}function c(f){return i||r||!a?n(f):t(f)}}function C3e(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(aX,t,a)(o):o===null||un(o)||Cc(o)?t(o):(e.consume(o),i)}function a(o){return o===41&&r++,e.consume(o),i}}function k3e(e,t,n){return r;function r(l){return l===33||l===34||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===63||l===95||l===126?(e.consume(l),r):l===38?(e.consume(l),a):l===93?(e.consume(l),i):l===60||l===null||un(l)||Cc(l)?t(l):n(l)}function i(l){return l===null||l===40||l===91||un(l)||Cc(l)?t(l):r(l)}function a(l){return Jr(l)?o(l):n(l)}function o(l){return l===59?(e.consume(l),r):Jr(l)?(e.consume(l),o):n(l)}}function N3e(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return Fr(a)?n(a):t(a)}}function lX(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||un(e)}function uX(e){return!Jr(e)}function cX(e){return!(e===47||nk(e))}function nk(e){return e===43||e===45||e===46||e===95||Fr(e)}function fT(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const A3e={tokenize:L3e,partial:!0};function O3e(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:D3e,continuation:{tokenize:R3e},exit:I3e}},text:{91:{name:"gfmFootnoteCall",tokenize:M3e},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:T3e,resolveTo:P3e}}}}function T3e(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;i--;){const c=r.events[i][1];if(c.type==="labelImage"){o=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return l;function l(c){if(!o||!o._balanced)return n(c);const f=Pa(r.sliceSerialize({start:o.end,end:r.now()}));return f.codePointAt(0)!==94||!a.includes(f.slice(1))?n(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function P3e(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},l=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",o,t],["exit",o,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...l),e}function M3e(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,o;return l;function l(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),c}function c(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(d){if(a>999||d===93&&!o||d===null||d===91||un(d))return n(d);if(d===93){e.exit("chunkString");const g=e.exit("gfmFootnoteCallString");return i.includes(Pa(r.sliceSerialize(g)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return un(d)||(o=!0),a++,e.consume(d),d===92?h:f}function h(d){return d===91||d===92||d===93?(e.consume(d),a++,f):f(d)}}function D3e(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,o=0,l;return c;function c(b){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(b){return b===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):n(b)}function h(b){if(o>999||b===93&&!l||b===null||b===91||un(b))return n(b);if(b===93){e.exit("chunkString");const w=e.exit("gfmFootnoteDefinitionLabelString");return a=Pa(r.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),g}return un(b)||(l=!0),o++,e.consume(b),b===92?d:h}function d(b){return b===91||b===92||b===93?(e.consume(b),o++,h):h(b)}function g(b){return b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),i.includes(a)||i.push(a),Ot(e,v,"gfmFootnoteDefinitionWhitespace")):n(b)}function v(b){return t(b)}}function R3e(e,t,n){return e.check(fg,t,e.attempt(A3e,t,n))}function I3e(e){e.exit("gfmFootnoteDefinition")}function L3e(e,t,n){const r=this;return Ot(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(a):n(a)}}function z3e(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(o,l){let c=-1;for(;++c<o.length;)if(o[c][0]==="enter"&&o[c][1].type==="strikethroughSequenceTemporary"&&o[c][1]._close){let f=c;for(;f--;)if(o[f][0]==="exit"&&o[f][1].type==="strikethroughSequenceTemporary"&&o[f][1]._open&&o[c][1].end.offset-o[c][1].start.offset===o[f][1].end.offset-o[f][1].start.offset){o[c][1].type="strikethroughSequence",o[f][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},o[f][1].start),end:Object.assign({},o[c][1].end)},d={type:"strikethroughText",start:Object.assign({},o[f][1].end),end:Object.assign({},o[c][1].start)},g=[["enter",h,l],["enter",o[f][1],l],["exit",o[f][1],l],["enter",d,l]],v=l.parser.constructs.insideSpan.null;v&&Li(g,g.length,0,Yb(v,o.slice(f+1,c),l)),Li(g,g.length,0,[["exit",d,l],["enter",o[c][1],l],["exit",o[c][1],l],["exit",h,l]]),Li(o,f-1,c-f+3,g),c=f+g.length-2;break}}for(c=-1;++c<o.length;)o[c][1].type==="strikethroughSequenceTemporary"&&(o[c][1].type="data");return o}function a(o,l,c){const f=this.previous,h=this.events;let d=0;return g;function g(b){return f===126&&h[h.length-1][1].type!=="characterEscape"?c(b):(o.enter("strikethroughSequenceTemporary"),v(b))}function v(b){const w=Td(f);if(b===126)return d>1?c(b):(o.consume(b),d++,v);if(d<2&&!n)return c(b);const S=o.exit("strikethroughSequenceTemporary"),E=Td(b);return S._open=!E||E===2&&!!w,S._close=!w||w===2&&!!E,l(b)}}}class $3e{constructor(){this.map=[]}add(t,n,r){B3e(this,t,n,r)}consume(t){if(this.map.sort(function(a,o){return a[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const a of i)t.push(a);i=r.pop()}this.map.length=0}}function B3e(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function F3e(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function U3e(){return{flow:{null:{name:"table",tokenize:H3e,resolveAll:q3e}}}}function H3e(e,t,n){const r=this;let i=0,a=0,o;return l;function l(z){let F=r.events.length-1;for(;F>-1;){const L=r.events[F][1].type;if(L==="lineEnding"||L==="linePrefix")F--;else break}const B=F>-1?r.events[F][1].type:null,G=B==="tableHead"||B==="tableRow"?A:c;return G===A&&r.parser.lazy[r.now().line]?n(z):G(z)}function c(z){return e.enter("tableHead"),e.enter("tableRow"),f(z)}function f(z){return z===124||(o=!0,a+=1),h(z)}function h(z){return z===null?n(z):Qe(z)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),v):n(z):bt(z)?Ot(e,h,"whitespace")(z):(a+=1,o&&(o=!1,i+=1),z===124?(e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),o=!0,h):(e.enter("data"),d(z)))}function d(z){return z===null||z===124||un(z)?(e.exit("data"),h(z)):(e.consume(z),z===92?g:d)}function g(z){return z===92||z===124?(e.consume(z),d):d(z)}function v(z){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(z):(e.enter("tableDelimiterRow"),o=!1,bt(z)?Ot(e,b,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):b(z))}function b(z){return z===45||z===58?S(z):z===124?(o=!0,e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),w):O(z)}function w(z){return bt(z)?Ot(e,S,"whitespace")(z):S(z)}function S(z){return z===58?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(z),e.exit("tableDelimiterMarker"),E):z===45?(a+=1,E(z)):z===null||Qe(z)?N(z):O(z)}function E(z){return z===45?(e.enter("tableDelimiterFiller"),C(z)):O(z)}function C(z){return z===45?(e.consume(z),C):z===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(z),e.exit("tableDelimiterMarker"),_):(e.exit("tableDelimiterFiller"),_(z))}function _(z){return bt(z)?Ot(e,N,"whitespace")(z):N(z)}function N(z){return z===124?b(z):z===null||Qe(z)?!o||i!==a?O(z):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(z)):O(z)}function O(z){return n(z)}function A(z){return e.enter("tableRow"),T(z)}function T(z){return z===124?(e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),T):z===null||Qe(z)?(e.exit("tableRow"),t(z)):bt(z)?Ot(e,T,"whitespace")(z):(e.enter("data"),P(z))}function P(z){return z===null||z===124||un(z)?(e.exit("data"),T(z)):(e.consume(z),z===92?I:P)}function I(z){return z===92||z===124?(e.consume(z),P):P(z)}}function q3e(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],l=!1,c=0,f,h,d;const g=new $3e;for(;++n<e.length;){const v=e[n],b=v[1];v[0]==="enter"?b.type==="tableHead"?(l=!1,c!==0&&(t$(g,t,c,f,h),h=void 0,c=0),f={type:"table",start:Object.assign({},b.start),end:Object.assign({},b.end)},g.add(n,0,[["enter",f,t]])):b.type==="tableRow"||b.type==="tableDelimiterRow"?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],l&&(l=!1,h={type:"tableBody",start:Object.assign({},b.start),end:Object.assign({},b.end)},g.add(n,0,[["enter",h,t]])),i=b.type==="tableDelimiterRow"?2:h?3:1):i&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=py(g,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):b.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=py(g,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):b.type==="tableHead"?(l=!0,c=n):b.type==="tableRow"||b.type==="tableDelimiterRow"?(c=n,a[1]!==0?(o[0]=o[1],d=py(g,t,a,i,n,d)):o[1]!==0&&(d=py(g,t,o,i,n,d)),i=0):i&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")&&(o[3]=n)}for(c!==0&&t$(g,t,c,f,h),g.consume(t.events),n=-1;++n<t.events.length;){const v=t.events[n];v[0]==="enter"&&v[1].type==="table"&&(v[1]._align=F3e(t.events,n))}return e}function py(e,t,n,r,i,a){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(a.end=Object.assign({},If(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const c=If(t.events,n[1]);if(a={type:o,start:Object.assign({},c),end:Object.assign({},c)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const f=If(t.events,n[2]),h=If(t.events,n[3]),d={type:l,start:Object.assign({},f),end:Object.assign({},h)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const g=t.events[n[2]],v=t.events[n[3]];if(g[1].end=Object.assign({},v[1].end),g[1].type="chunkText",g[1].contentType="text",n[3]>n[2]+1){const b=n[2]+1,w=n[3]-n[2]-1;e.add(b,w,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return i!==void 0&&(a.end=Object.assign({},If(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function t$(e,t,n,r,i){const a=[],o=If(t.events,n);i&&(i.end=Object.assign({},o),a.push(["exit",i,t])),r.end=Object.assign({},o),a.push(["exit",r,t]),e.add(n+1,0,a)}function If(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const V3e={name:"tasklistCheck",tokenize:Y3e};function K3e(){return{text:{91:V3e}}}function Y3e(e,t,n){const r=this;return i;function i(c){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),a)}function a(c){return un(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),o):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),o):n(c)}function o(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(c)}function l(c){return Qe(c)?t(c):bt(c)?e.check({tokenize:X3e},t,n)(c):n(c)}}function X3e(e,t,n){return Ot(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function G3e(e){return wY([b3e(),O3e(),z3e(e),U3e(),K3e()])}const W3e={};function Q3e(e){const t=this,n=e||W3e,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(G3e(n)),a.push(g3e()),o.push(v3e(n))}function zi({content:e,className:t}){return m.jsx("div",{className:t,children:m.jsx(zLe,{remarkPlugins:[Q3e],components:{h1:({children:n})=>m.jsx("h1",{className:"mb-2 mt-4 text-base font-bold first:mt-0",children:n}),h2:({children:n})=>m.jsx("h2",{className:"mb-2 mt-3 text-sm font-bold first:mt-0",children:n}),h3:({children:n})=>m.jsx("h3",{className:"mb-1 mt-3 text-sm font-semibold first:mt-0",children:n}),p:({children:n})=>m.jsx("p",{className:"mb-2 last:mb-0 leading-relaxed",children:n}),ul:({children:n})=>m.jsx("ul",{className:"mb-2 ml-4 list-disc space-y-0.5",children:n}),ol:({children:n})=>m.jsx("ol",{className:"mb-2 ml-4 list-decimal space-y-0.5",children:n}),li:({children:n})=>m.jsx("li",{className:"leading-relaxed",children:n}),code:({children:n,className:r})=>(r==null?void 0:r.startsWith("language-"))?m.jsx("code",{className:"block whitespace-pre-wrap break-words rounded bg-muted/60 px-2 py-1.5 font-mono text-xs leading-relaxed",children:n}):m.jsx("code",{className:"rounded bg-muted/60 px-1 py-0.5 font-mono text-xs",children:n}),pre:({children:n})=>m.jsx("pre",{className:"mb-2 overflow-x-auto rounded-md bg-muted/60 p-0",children:n}),blockquote:({children:n})=>m.jsx("blockquote",{className:"mb-2 border-l-2 border-muted-foreground/30 pl-3 text-muted-foreground",children:n}),a:({href:n,children:r})=>m.jsx("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline underline-offset-2 hover:no-underline",children:r}),table:({children:n})=>m.jsx("div",{className:"mb-2 overflow-x-auto",children:m.jsx("table",{className:"w-full border-collapse text-xs",children:n})}),th:({children:n})=>m.jsx("th",{className:"border border-border bg-muted/50 px-2 py-1 text-left font-medium",children:n}),td:({children:n})=>m.jsx("td",{className:"border border-border px-2 py-1",children:n}),hr:()=>m.jsx("hr",{className:"my-3 border-border"}),strong:({children:n})=>m.jsx("strong",{className:"font-semibold",children:n}),em:({children:n})=>m.jsx("em",{className:"italic",children:n})},children:e})})}function Z3e({pendingAskUsers:e,initialMessages:t,respond:n}){const[r,i]=y.useState([]),[a,o]=y.useState(""),l=y.useRef(null),c=y.useRef(new Set);y.useEffect(()=>{!t||t.length===0||i(d=>{const g=new Set(d.map(w=>w.id)),v=t.filter(w=>!g.has(w.id));if(v.length===0)return d;const b=[...v,...d];b.sort((w,S)=>w.timestamp-S.timestamp);for(const w of b)c.current.add(w.id);return b})},[t]),y.useEffect(()=>{if(e.length===0)return;const d=[];for(const g of e)c.current.has(g.request_id)||(c.current.add(g.request_id),d.push({id:g.request_id,role:"agent",text:g.question,timestamp:g.timestamp}));d.length>0&&i(g=>[...g,...d])},[e]),y.useEffect(()=>{var d;(d=l.current)==null||d.scrollIntoView({behavior:"smooth"})},[r]);const f=(d,g)=>{if(!d.trim())return;const v=`user-${g.request_id}`;c.current.has(v)||(c.current.add(v),i(b=>[...b,{id:v,role:"user",text:d.trim(),timestamp:Date.now()/1e3}])),o(""),n(g.request_id,d.trim())},h=e.length>0?e[0]:null;return m.jsx(hn,{className:"flex h-[500px] flex-col",children:m.jsxs(mn,{className:"flex flex-1 flex-col gap-3 overflow-hidden p-4",children:[m.jsx(U0,{className:"flex-1",children:m.jsxs("div",{className:"space-y-3 pr-3",children:[r.length===0&&m.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 py-12 text-muted-foreground",children:[m.jsx(Ap,{className:"h-8 w-8"}),m.jsx("p",{className:"text-sm",children:"Waiting for the agent to ask a question..."})]}),r.map(d=>{const g=d.role==="agent"?e.find(v=>v.request_id===d.id):void 0;return m.jsxs("div",{children:[m.jsx("div",{className:Oe("flex",d.role==="user"?"justify-end":"justify-start"),children:m.jsx("div",{className:Oe("max-w-[80%] rounded-lg px-3 py-2 text-sm",d.role==="user"?"bg-primary text-primary-foreground":"bg-muted"),children:m.jsx(zi,{content:d.text,className:"whitespace-pre-wrap"})})}),(g==null?void 0:g.choices)&&g.choices.length>0&&m.jsx("div",{className:"ml-3 mt-1 flex flex-wrap gap-1.5",children:g.choices.map(v=>m.jsx(je,{variant:"outline",size:"sm",onClick:()=>f(v,g),children:v},v))})]},d.id)}),m.jsx("div",{ref:l})]})}),e.length>0&&m.jsx("div",{className:"flex items-center gap-2",children:m.jsxs(zt,{variant:"outline",className:"border-amber-200 bg-amber-50 text-amber-700 dark:border-amber-800 dark:bg-amber-950 dark:text-amber-400",children:[m.jsx("span",{className:"mr-1.5 inline-block h-1.5 w-1.5 animate-pulse rounded-full bg-amber-500"}),e.length===1?"Waiting for response":`${e.length} questions waiting`]})}),m.jsxs("form",{className:"flex gap-2",onSubmit:d=>{d.preventDefault(),h&&f(a,h)},children:[m.jsx(rt,{value:a,onChange:d=>o(d.target.value),placeholder:h?"Type your response...":"Waiting for agent question...",disabled:!h}),m.jsx(je,{type:"submit",size:"icon",disabled:!h||!a.trim(),children:m.jsx(Voe,{className:"h-4 w-4"})})]})]})})}function dT(e,t){const[n,r]=y.useState([]),[i,a]=y.useState([]),[o,l]=y.useState([]),[c,f]=y.useState(null),[h,d]=y.useState(!1),g=y.useRef(null),v=y.useRef(0),b=y.useRef(void 0),w=y.useRef(1e3),S=y.useRef(!1),E=y.useCallback((C,_)=>{var N;(N=g.current)==null||N.send(JSON.stringify({type:"ask_user_response",request_id:C,text:_}))},[]);return y.useEffect(()=>{r([]),a([]),l([]),f(null),S.current=!1,v.current=0},[e]),y.useEffect(()=>{if(!t){r([]),d(!1);return}function C(){if(S.current)return;const N=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws/sessions/${e}`,O=new WebSocket(N);g.current=O,O.onopen=()=>{d(!0),w.current=1e3,O.send(JSON.stringify({type:"init",trace_offset:v.current}))},O.onmessage=A=>{let T;try{T=JSON.parse(A.data)}catch{return}switch(T.type){case"tree_snapshot":case"tree_delta":{const{type:P,...I}=T;f(I);break}case"trace_snapshot":Array.isArray(T.events)&&l(T.events),typeof T.next_offset=="number"&&(v.current=T.next_offset);break;case"trace_delta":Array.isArray(T.events)&&l(P=>[...P,...T.events]),typeof T.next_offset=="number"&&(v.current=T.next_offset);break;case"ask_user":{const P=T;r(I=>I.some(z=>z.request_id===P.request_id)?I:[...I,P]);break}case"ask_user_resolved":typeof T.request_id=="string"?r(P=>P.filter(I=>I.request_id!==T.request_id)):r([]);break;case"chat_history":Array.isArray(T.messages)&&a(T.messages);break;case"stream_complete":S.current=!0,O.close(),g.current=null,d(!1);break}},O.onclose=()=>{g.current=null,d(!1),!S.current&&(b.current=setTimeout(()=>{w.current=Math.min(w.current*2,15e3),C()},w.current))},O.onerror=()=>{O.close()}}return C(),()=>{var _;(_=g.current)==null||_.close(),g.current=null,b.current&&clearTimeout(b.current)}},[e,t]),{pendingAskUsers:n,chatMessages:i,traceEvents:o,treeData:c,connected:h,respond:E}}function J3e(){return m.jsxs("div",{className:"space-y-6",children:[m.jsx(Rn,{className:"h-8 w-64"}),m.jsx(Rn,{className:"h-32 rounded-lg"}),m.jsx(Rn,{className:"h-64 rounded-lg"})]})}function e4e(){const{projectId:e,runId:t}=xp(),[n]=nZ(),r=Number(e),i=P=>P==="starting"||P==="running",a=zse(r,t??"",{refetchInterval:void 0}),o=a.data,l=i(o==null?void 0:o.status);y.useEffect(()=>{if(!l)return;const P=setInterval(()=>a.refetch(),2e3);return()=>clearInterval(P)},[l,a]);const c=!!(o!=null&&o.interactive),{pendingAskUsers:f,chatMessages:h,traceEvents:d,treeData:g,connected:v,respond:b}=dT(t??"",l||c),w=g??(o==null?void 0:o.tree)??null,S=(o==null?void 0:o.events)??[],E=d.length>0?d:S,[C,_]=y.useState(void 0);if(y.useEffect(()=>{f.length>0&&_("chat")},[f]),a.isLoading)return m.jsx(J3e,{});if(a.error)return m.jsxs("div",{className:"flex items-center gap-2 text-destructive",children:[m.jsx(po,{className:"h-4 w-4"}),m.jsxs("span",{children:["Error: ",a.error.message]})]});if(!o)return m.jsxs("div",{className:"flex items-center gap-2 text-destructive",children:[m.jsx(po,{className:"h-4 w-4"}),m.jsx("span",{children:"Session not found"})]});const N=s4e(E),O=a4e(E),A=o4e(E),T=n.get("tab")??(l?"agent-tree":"overview");return m.jsxs("div",{className:"space-y-6",children:[m.jsx(t4e,{session:o,projectId:r,runId:t??"",onStopped:()=>a.refetch()}),m.jsx(i4e,{session:o}),m.jsxs(Mp,{value:C??T,onValueChange:_,children:[m.jsxs(Dp,{children:[m.jsx(ar,{value:"overview",children:"Overview"}),c&&m.jsxs(ar,{value:"chat",className:"relative",children:["Chat",f.length>0&&m.jsx("span",{className:"ml-1.5 inline-block h-2 w-2 animate-pulse rounded-full bg-amber-500"})]}),m.jsx(ar,{value:"agent-tree",children:"Agent Tree"}),m.jsx(ar,{value:"logs",children:"Logs"}),m.jsxs(ar,{value:"trace",children:["Trace",E.length>0&&` (${E.length})`]}),m.jsxs(ar,{value:"artifacts",children:["Artifacts",N.length>0&&` (${N.length})`]})]}),m.jsxs(or,{value:"overview",className:"space-y-4",children:[o.user_task&&m.jsx(Lu,{defaultOpen:!0,children:m.jsxs("div",{className:"space-y-2",children:[m.jsxs(zu,{className:"flex items-center gap-1 text-sm font-medium text-muted-foreground hover:text-foreground",children:[m.jsx(Dl,{className:"h-3.5 w-3.5 transition-transform [[data-state=open]>&]:rotate-90"}),"User Task"]}),m.jsx($u,{children:m.jsx(hn,{children:m.jsx(mn,{className:"pt-4",children:m.jsx(zi,{content:o.user_task,className:"text-sm"})})})})]})}),o.task&&m.jsx(Lu,{defaultOpen:!o.user_task,children:m.jsxs("div",{className:"space-y-2",children:[m.jsxs(zu,{className:"flex items-center gap-1 text-sm font-medium text-muted-foreground hover:text-foreground",children:[m.jsx(Dl,{className:"h-3.5 w-3.5 transition-transform [[data-state=open]>&]:rotate-90"}),"Task"]}),m.jsx($u,{children:m.jsx(hn,{children:m.jsx(mn,{className:"pt-4",children:m.jsx(zi,{content:o.task,className:"text-sm"})})})})]})}),O&&m.jsx(Lu,{defaultOpen:!0,children:m.jsxs("div",{className:"space-y-2",children:[m.jsxs(zu,{className:"flex items-center gap-1 text-sm font-medium text-muted-foreground hover:text-foreground",children:[m.jsx(Dl,{className:"h-3.5 w-3.5 transition-transform [[data-state=open]>&]:rotate-90"}),"Output"]}),m.jsx($u,{children:m.jsx(hn,{children:m.jsx(mn,{className:"pt-4",children:m.jsx(n$,{runId:o.run_id,hash:O})})})})]})}),A&&m.jsx(Lu,{defaultOpen:!0,children:m.jsxs("div",{className:"space-y-2",children:[m.jsxs(zu,{className:"flex items-center gap-1 text-sm font-medium text-muted-foreground hover:text-foreground",children:[m.jsx(Dl,{className:"h-3.5 w-3.5 transition-transform [[data-state=open]>&]:rotate-90"}),"Recall"]}),m.jsx($u,{children:m.jsx(hn,{children:m.jsx(mn,{className:"pt-4",children:m.jsx(n$,{runId:o.run_id,hash:A})})})})]})}),!o.user_task&&!o.task&&!O&&m.jsx("p",{className:"text-sm text-muted-foreground",children:"No overview information available yet."})]}),c&&m.jsx(or,{value:"chat",children:m.jsx(Z3e,{pendingAskUsers:f,initialMessages:h,respond:b})}),m.jsx(or,{value:"agent-tree",children:m.jsx(EMe,{treeData:w,connected:v})}),m.jsx(or,{value:"logs",children:Object.keys(o.agents).length>0?m.jsx(_Me,{runId:o.run_id,agents:o.agents,active:l}):m.jsx("p",{className:"text-sm text-muted-foreground",children:"No agents registered yet."})}),m.jsx(or,{value:"trace",children:E.length>0?m.jsx(d4e,{events:E,runId:o.run_id}):m.jsx("p",{className:"text-sm text-muted-foreground",children:"No trace events recorded yet."})}),m.jsx(or,{value:"artifacts",children:N.length>0?m.jsx(l4e,{artifacts:N,runId:o.run_id}):m.jsx("p",{className:"text-sm text-muted-foreground",children:"No artifacts recorded yet."})})]})]})}function t4e({session:e,projectId:t,runId:n,onStopped:r}){const[i,a]=y.useState(!1),o=wN(),l=e.status==="starting"||e.status==="running";return m.jsxs("div",{className:"flex items-center justify-between",children:[m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx(je,{variant:"outline",size:"sm",asChild:!0,children:m.jsxs(Br,{to:t===0?"/imu":`/projects/${t}`,children:[m.jsx(P0,{className:"mr-2 h-4 w-4"}),"Back"]})}),m.jsxs("h1",{className:"text-2xl font-bold tracking-tight",children:["Session ",e.run_id.slice(0,16)]})]}),m.jsx("div",{className:"flex gap-2",children:l&&(i?m.jsxs("div",{className:"flex gap-1",children:[m.jsx(je,{size:"sm",variant:"destructive",onClick:async()=>{await o.mutateAsync(n),a(!1),r()},disabled:o.isPending,children:"Confirm"}),m.jsx(je,{size:"sm",variant:"outline",onClick:()=>a(!1),children:"Cancel"})]}):m.jsxs(je,{variant:"destructive",onClick:()=>a(!0),children:[m.jsx(EF,{className:"mr-2 h-4 w-4"}),"Stop Session"]}))})]})}function n4e({status:e}){const t=r4e(e);return m.jsxs(zt,{variant:"outline",className:Oe("text-xs font-medium",t==="running"&&"border-green-200 bg-green-50 text-green-700 dark:border-green-800 dark:bg-green-950 dark:text-green-400",t==="success"&&"border-green-200 bg-green-50 text-green-700 dark:border-green-800 dark:bg-green-950 dark:text-green-400",t==="error"&&"border-red-200 bg-red-50 text-red-700 dark:border-red-800 dark:bg-red-950 dark:text-red-400",t==="warning"&&"border-orange-200 bg-orange-50 text-orange-700 dark:border-orange-800 dark:bg-orange-950 dark:text-orange-400",t==="default"&&"border-muted bg-muted text-muted-foreground"),children:[e==="running"&&m.jsx("span",{className:"mr-1.5 inline-block h-1.5 w-1.5 animate-pulse rounded-full bg-green-500"}),e]})}function r4e(e){switch(e){case"running":case"starting":return"running";case"completed":return"success";case"failed":return"error";case"stopped":return"warning";default:return"default"}}function i4e({session:e}){return m.jsx(hn,{children:m.jsx(mn,{className:"pt-6",children:m.jsxs("dl",{className:"grid grid-cols-[auto_1fr] gap-x-4 gap-y-2 text-sm",children:[m.jsx("dt",{className:"font-medium text-muted-foreground",children:"Status"}),m.jsx("dd",{children:m.jsx(n4e,{status:e.status})}),m.jsx("dt",{className:"font-medium text-muted-foreground",children:"Role"}),m.jsx("dd",{children:e.role}),m.jsx("dt",{className:"font-medium text-muted-foreground",children:"Runtime"}),m.jsx("dd",{children:e.runtime}),m.jsx("dt",{className:"font-medium text-muted-foreground",children:"Isolation"}),m.jsx("dd",{children:e.isolation}),m.jsx("dt",{className:"font-medium text-muted-foreground",children:"Started"}),m.jsx("dd",{children:Zy(e.started_at)}),e.ended_at&&m.jsxs(m.Fragment,{children:[m.jsx("dt",{className:"font-medium text-muted-foreground",children:"Ended"}),m.jsx("dd",{children:Zy(e.ended_at)})]}),m.jsx("dt",{className:"font-medium text-muted-foreground",children:"Duration"}),m.jsx("dd",{children:F0(e.duration_ms)}),e.exit_code!==null&&m.jsxs(m.Fragment,{children:[m.jsx("dt",{className:"font-medium text-muted-foreground",children:"Exit Code"}),m.jsx("dd",{children:e.exit_code})]})]})})})}function n$({runId:e,hash:t}){const[n,r]=y.useState(null),[i,a]=y.useState(null);return y.useEffect(()=>{fetch(`/api/sessions/${e}/artifacts/${t}`).then(o=>{if(!o.ok)throw new Error(`${o.status} ${o.statusText}`);return o.text()}).then(r).catch(o=>a(o.message))},[e,t]),i?m.jsxs("span",{className:"text-destructive",children:["Error: ",i]}):n===null?m.jsx("span",{className:"text-muted-foreground",children:"Loading..."}):m.jsx(zi,{content:n,className:"text-sm"})}function a4e(e){for(const t of e)if(t.event==="session_end"&&t.data.output_ref)return String(t.data.output_ref);return null}function o4e(e){for(const t of e)if(t.event==="memory_get"&&t.data.cards_ref)return String(t.data.cards_ref);return null}function s4e(e){const t=[];for(const n of e){const r=n.data;n.event==="agent_spawn"&&(r.context_ref&&t.push({label:`Agent Context (${r.role||"agent"})`,hash:String(r.context_ref),event:n.event,agentId:r.agent_id?String(r.agent_id):void 0}),r.task_ref&&t.push({label:`Agent Task (${r.role||"agent"})`,hash:String(r.task_ref),event:n.event,agentId:r.agent_id?String(r.agent_id):void 0})),n.event==="session_end"&&r.output_ref&&t.push({label:"Session Output",hash:String(r.output_ref),event:n.event}),n.event==="agent_end"&&r.output_ref&&t.push({label:`Agent Output (${r.agent_id||"agent"})`,hash:String(r.output_ref),event:n.event,agentId:r.agent_id?String(r.agent_id):void 0}),n.event==="memory_get"&&(r.cards_ref&&t.push({label:`Memory Cards (${r.provider||"memory"})`,hash:String(r.cards_ref),event:n.event}),r.behavior_ref&&t.push({label:`Memory Get Behavior (${r.role||"agent"})`,hash:String(r.behavior_ref),event:n.event}),r.task_ref&&t.push({label:`Memory Get Task (${r.role||"agent"})`,hash:String(r.task_ref),event:n.event})),n.event==="memory_dump"&&(r.output_ref&&t.push({label:`Memory Dump Output (${r.provider||"memory"})`,hash:String(r.output_ref),event:n.event}),r.behavior_ref&&t.push({label:`Memory Dump Behavior (${r.provider||"memory"})`,hash:String(r.behavior_ref),event:n.event}),r.task_ref&&t.push({label:`Memory Dump Task (${r.provider||"memory"})`,hash:String(r.task_ref),event:n.event})),n.event==="delegate_start"&&r.context_ref&&t.push({label:`Delegation Context (${r.role||"delegate"})`,hash:String(r.context_ref),event:n.event}),n.event==="delegate_end"&&r.output_ref&&t.push({label:`Delegation Output (${r.role||"delegate"})`,hash:String(r.output_ref),event:n.event})}return t}function l4e({artifacts:e,runId:t}){return m.jsx("div",{className:"space-y-1",children:e.map(n=>m.jsxs(Lu,{children:[m.jsxs(zu,{className:"flex w-full items-center gap-2 rounded-md bg-muted/50 px-3 py-2 text-sm hover:bg-muted",children:[m.jsx(Dl,{className:"h-3 w-3 transition-transform [[data-state=open]>&]:rotate-90"}),m.jsx("span",{className:"font-medium text-primary",children:n.label})]}),m.jsx($u,{children:m.jsx(u4e,{runId:t,hash:n.hash})})]},`${n.event}-${n.hash}`))})}function u4e({runId:e,hash:t}){const[n,r]=y.useState(null),[i,a]=y.useState(null);return y.useEffect(()=>{fetch(`/api/sessions/${e}/artifacts/${t}`).then(o=>{if(!o.ok)throw new Error(`${o.status} ${o.statusText}`);return o.text()}).then(r).catch(o=>a(o.message))},[e,t]),i?m.jsxs("p",{className:"px-3 py-2 text-sm text-destructive",children:["Error: ",i]}):n===null?m.jsx("p",{className:"px-3 py-2 text-sm text-muted-foreground",children:"Loading..."}):m.jsx(U0,{className:"max-h-[300px] overflow-hidden",children:m.jsx("pre",{className:"whitespace-pre-wrap break-words rounded-b-md bg-muted/30 px-3 py-2 font-mono text-xs leading-relaxed",children:n})})}function c4e({event:e}){const t=f4e(e);return m.jsx(zt,{variant:"outline",className:Oe("text-xs font-medium",t==="running"&&"border-green-200 bg-green-50 text-green-700 dark:border-green-800 dark:bg-green-950 dark:text-green-400",t==="success"&&"border-green-200 bg-green-50 text-green-700 dark:border-green-800 dark:bg-green-950 dark:text-green-400",t==="error"&&"border-red-200 bg-red-50 text-red-700 dark:border-red-800 dark:bg-red-950 dark:text-red-400",t==="default"&&"border-muted bg-muted text-muted-foreground"),children:e})}function f4e(e){return e.endsWith("_start")||e==="agent_spawn"?"running":e.endsWith("_end")?"success":e.includes("denied")||e.includes("error")?"error":"default"}function d4e({events:e,runId:t}){const[n,r]=y.useState(null);return m.jsxs(m.Fragment,{children:[m.jsx(hn,{children:m.jsx(mn,{className:"p-0",children:m.jsxs(fs,{children:[m.jsx(ds,{children:m.jsxs(sr,{children:[m.jsx(ot,{children:"Time"}),m.jsx(ot,{children:"Event"}),m.jsx(ot,{children:"Span"}),m.jsx(ot,{children:"Details"})]})}),m.jsx(hs,{children:e.map((i,a)=>m.jsxs(sr,{children:[m.jsx(it,{className:"text-sm text-muted-foreground",children:Zy(i.ts)}),m.jsx(it,{children:m.jsx(c4e,{event:i.event})}),m.jsx(it,{className:"font-mono text-xs text-muted-foreground",children:i.span_id.slice(0,8)}),m.jsx(it,{className:"max-w-[400px] text-sm",children:m4e(i,(o,l)=>r({hash:o,label:l}))})]},a))})]})})}),m.jsx(ws,{open:!!n,onOpenChange:()=>r(null),children:m.jsxs(Ss,{className:"max-w-3xl overflow-hidden",children:[m.jsx(Es,{children:m.jsx(js,{children:n==null?void 0:n.label})}),n&&m.jsx(h4e,{runId:t,hash:n.hash})]})})]})}function h4e({runId:e,hash:t}){const[n,r]=y.useState(null),[i,a]=y.useState(null),[o,l]=y.useState("markdown"),c=y.useRef(null),f=y.useRef(null);return y.useEffect(()=>{const h=d=>{const g=f.current??c.current;if(g&&(d.metaKey||d.ctrlKey)&&d.key==="a"){d.preventDefault();const v=window.getSelection();if(v){v.removeAllRanges();const b=document.createRange();b.selectNodeContents(g),v.addRange(b)}}};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[]),y.useEffect(()=>{fetch(`/api/sessions/${e}/artifacts/${t}`).then(h=>{if(!h.ok)throw new Error(`${h.status} ${h.statusText}`);return h.text()}).then(r).catch(h=>a(h.message))},[e,t]),m.jsx("div",{ref:c,className:"space-y-2",children:i?m.jsxs("p",{className:"text-sm text-destructive",children:["Error: ",i]}):n===null?m.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."}):m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"flex gap-1",children:[m.jsx("button",{className:Oe("rounded px-2 py-1 text-xs font-medium",o==="markdown"?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"),onClick:()=>l("markdown"),children:"Markdown"}),m.jsx("button",{className:Oe("rounded px-2 py-1 text-xs font-medium",o==="raw"?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"),onClick:()=>l("raw"),children:"Raw"})]}),m.jsx("div",{ref:f,className:"max-h-[60vh] overflow-y-auto",children:o==="markdown"?m.jsx("div",{className:"p-4",children:m.jsx(zi,{content:n,className:"text-sm"})}):m.jsx("pre",{className:"whitespace-pre-wrap break-words rounded-md bg-muted/30 p-4 font-mono text-xs leading-relaxed",children:n})})]})})}function m4e(e,t){const n=e.data,r=[];for(const[a,o]of Object.entries(n))if(a.endsWith("_ref")&&o){const l=a.replace(/_ref$/,"");r.push(m.jsx("button",{className:"rounded border border-primary/30 bg-primary/5 px-1.5 py-0.5 font-mono text-xs text-primary hover:bg-primary/10",onClick:()=>t(String(o),l),children:l},a))}const i=[];for(const[a,o]of Object.entries(n)){if(a.endsWith("_ref")||o==null||o==="")continue;const l=a==="duration_ms"?F0(o):Array.isArray(o)?o.join(", "):String(o);i.push(m.jsxs("span",{children:[m.jsxs("span",{className:"text-muted-foreground",children:[a,"="]}),m.jsx("span",{children:l})]},a))}return m.jsxs(m.Fragment,{children:[r.length>0&&m.jsx("div",{className:"mb-1 flex flex-wrap gap-1",children:r}),i.length>0&&m.jsx("div",{className:"flex flex-wrap gap-x-2 gap-y-0.5 text-xs text-muted-foreground",children:i})]})}function p4e(e){if(e===null)return"";const t=Math.round(e/1e3);if(t<60)return`${t}s`;const n=Math.floor(t/60),r=t%60;return r>0?`${n}m ${r}s`:`${n}m`}function g4e({status:e}){return e==="running"||e==="starting"?m.jsxs(zt,{variant:"outline",className:"gap-1 border-blue-200 text-blue-700 dark:border-blue-800 dark:text-blue-400",children:[m.jsx(Or,{className:"h-3 w-3 animate-spin"}),e==="starting"?"Starting":"Running"]}):e==="completed"?m.jsxs(zt,{variant:"outline",className:"gap-1 border-green-200 text-green-700 dark:border-green-800 dark:text-green-400",children:[m.jsx(M0,{className:"h-3 w-3"}),"Completed"]}):e==="failed"?m.jsxs(zt,{variant:"outline",className:"gap-1 border-red-200 text-red-700 dark:border-red-800 dark:text-red-400",children:[m.jsx(cN,{className:"h-3 w-3"}),"Failed"]}):m.jsx(zt,{variant:"outline",children:e})}function v4e({session:e,projectId:t}){const n=e.status==="running"||e.status==="starting";return m.jsxs("div",{className:"flex flex-col gap-1.5",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"StrawPot"}),m.jsx(g4e,{status:e.status}),e.duration_ms!==null&&m.jsx("span",{className:"text-xs text-muted-foreground",children:p4e(e.duration_ms)}),m.jsx("span",{className:"text-xs text-muted-foreground",children:e.role})]}),m.jsx("div",{className:"rounded-lg border border-border bg-muted/30 p-3 text-sm",children:n?m.jsxs("span",{className:"flex items-center gap-2 text-muted-foreground",children:[m.jsx(Or,{className:"h-3.5 w-3.5 animate-spin"}),"Working…"]}):e.summary?m.jsx(zi,{content:e.summary,className:"text-sm text-foreground"}):m.jsx("span",{className:"text-muted-foreground italic",children:e.status==="failed"?"Session failed without output.":e.status==="stopped"?"Interrupted.":"No summary available."})}),m.jsxs("a",{href:`/projects/${t}/sessions/${e.run_id}`,target:"_blank",rel:"noopener noreferrer",className:"flex w-fit items-center gap-1 text-xs text-muted-foreground hover:text-foreground",children:[m.jsx(bF,{className:"h-3 w-3"}),"View session"]})]})}function y4e({task:e}){return m.jsxs("div",{className:"flex flex-col gap-1.5 items-end",children:[m.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"You"}),m.jsx("div",{className:"max-w-[80%] rounded-lg bg-primary px-3 py-2 text-sm text-primary-foreground",children:m.jsx("p",{className:"whitespace-pre-wrap",children:e})})]})}function x4e(){var Rs;const{projectId:e,conversationId:t}=xp(),n=Number(e),r=Number(t),[i,a]=y.useState(""),[o,l]=y.useState(""),[c,f]=y.useState([]),[h,d]=y.useState(!1),[g,v]=y.useState(!1),[b,w]=y.useState(!1),[S,E]=y.useState(""),[C,_]=y.useState(!1),[N,O]=y.useState(""),[A,T]=y.useState(!1),[P,I]=y.useState(""),[z,F]=y.useState(""),[B,G]=y.useState(""),[L,V]=y.useState(""),[D,q]=y.useState(""),[X,K]=y.useState(""),[R,H]=y.useState(""),[U,$]=y.useState(!0),[Q,J]=y.useState(""),ne=y.useRef(null),ae=y.useRef(null),ie=y.useRef(0),ee=y.useRef(void 0),se=y.useRef(0),pe=y.useRef(null),re=y.useRef(null),we=gt(),{data:Ee}=Pp(n),$e=(Ee??[]).filter(ge=>ge.type==="roles").map(ge=>ge.name),Ne=mN(n),et=L0(n),Xe=(Rs=Ne.data)==null?void 0:Rs.merged,{data:Ke,isLoading:Rt,error:ct,fetchPreviousPage:wt,hasPreviousPage:Xt,isFetchingPreviousPage:Mt}=Wy(r),cn=(Ke==null?void 0:Ke.pages.flatMap(ge=>ge.sessions))??[],de=Ke==null?void 0:Ke.pages[Ke.pages.length-1],xe=cn[cn.length-1],Te=(xe==null?void 0:xe.status)==="running"||(xe==null?void 0:xe.status)==="starting";Wy(r,{refetchInterval:Te?2e3:!1});const Ge=MF(r),We=wN(),Gt=DF(r),nn=gN(n),{pendingAskUsers:Se,chatMessages:at,respond:vt}=dT((xe==null?void 0:xe.run_id)??"",Te&&U),st=o.trim()&&!$e.includes(o.trim())?"Role not found in installed roles":"",zn=Te;y.useEffect(()=>{if(!ne.current)return;const ge=ne.current.scrollHeight-ie.current;ge>0&&(ne.current.scrollTop+=ge,ie.current=0)},[Ke==null?void 0:Ke.pages.length]),y.useEffect(()=>{ne.current&&((xe==null?void 0:xe.run_id)!==ee.current&&(ne.current.scrollTop=ne.current.scrollHeight),ee.current=xe==null?void 0:xe.run_id)},[xe==null?void 0:xe.run_id]),y.useEffect(()=>{ne.current&&(at.length>se.current&&(ne.current.scrollTop=ne.current.scrollHeight),se.current=at.length)},[at.length]),y.useEffect(()=>{if(!ae.current||!ne.current)return;const ge=new IntersectionObserver(([ft])=>{var Dt;ft.isIntersecting&&Xt&&!Mt&&(ie.current=((Dt=ne.current)==null?void 0:Dt.scrollHeight)??0,wt())},{root:ne.current,threshold:.1});return ge.observe(ae.current),()=>ge.disconnect()},[Xt,Mt,wt]);const rn=(Ee??[]).filter(ge=>ge.type==="agents").map(ge=>ge.name),dr=[...new Set((Ee??[]).filter(ge=>ge.type==="memories").map(ge=>ge.name)),"none"].sort(),Yr=P.trim()&&rn.length>0&&!rn.includes(P.trim())?"Runtime not found in installed agents":"",Pr=z.trim()&&dr.length>0&&!dr.includes(z.trim())?"Memory not found in installed providers":"",ii=!!Yr||!!Pr,Sr=[P,z,B,L,D,X,R].filter(ge=>ge.trim()).length,Ye=ge=>f(ft=>ft.includes(ge)?ft.filter(Dt=>Dt!==ge):[...ft,ge]),qt=ge=>{ge.preventDefault(),v(!0)},me=ge=>{ge.preventDefault(),v(!0)},Ze=ge=>{ge.preventDefault(),v(!1)},an=async ge=>{ge.preventDefault(),v(!1);const ft=Array.from(ge.dataTransfer.files);if(ft.length){w(!0);try{const Dt=await Fe.upload(`/projects/${n}/files`,ft);we.invalidateQueries({queryKey:Ue.projects.files(n)}),f(on=>{const ga=Dt.map(Ka=>Ka.path).filter(Ka=>!on.includes(Ka));return[...on,...ga]})}catch{}finally{w(!1)}}};function St(ge){ge.preventDefault();const ft=i.trim();if(!ft||st||ii)return;const Dt={task:ft,role:o.trim()||void 0,context_files:c.length>0?c:void 0,interactive:U,system_prompt:B.trim()||void 0,runtime:P.trim()||void 0,memory:z.trim()||void 0,max_num_delegations:L.trim()?Number(L):void 0,cache_delegations:D?D==="true":void 0,cache_max_entries:X.trim()?Number(X):void 0,cache_ttl_seconds:R.trim()?Number(R):void 0};Ge.mutate(Dt,{onSuccess:()=>{a(""),f([]),d(!1),setTimeout(()=>{var on;return(on=re.current)==null?void 0:on.focus()},0)}})}function Nn(ge,ft){ft.trim()&&(vt(ge.request_id,ft.trim()),J(""))}function Xr(ge){ge.key==="Enter"&&!ge.shiftKey&&(ge.preventDefault(),St(ge))}function hr(){O((de==null?void 0:de.title)??""),_(!0),setTimeout(()=>{var ge;return(ge=pe.current)==null?void 0:ge.select()},0)}function Jn(){const ge=N.trim();nn.mutate({conversationId:r,title:ge||null}),_(!1)}function Va(ge){ge.key==="Enter"&&(ge.preventDefault(),Jn()),ge.key==="Escape"&&_(!1)}if(ct)return m.jsxs("div",{className:"flex items-center gap-2 text-destructive",children:[m.jsx(po,{className:"h-4 w-4"}),m.jsxs("span",{children:["Error: ",ct.message]})]});const Gr=(de==null?void 0:de.title)??`Conversation #${r}`;return m.jsxs("div",{className:"flex h-full flex-col",children:[m.jsxs("div",{className:"flex flex-shrink-0 items-center justify-between border-b border-border pb-3 mb-4",children:[m.jsx("div",{className:"flex items-center gap-3",children:C?m.jsx(rt,{ref:pe,value:N,onChange:ge=>O(ge.target.value),onBlur:Jn,onKeyDown:Va,className:"h-7 text-sm font-semibold w-64",placeholder:`Conversation #${r}`}):m.jsx("h1",{className:"text-sm font-semibold cursor-pointer hover:text-muted-foreground",onClick:hr,title:"Click to rename",children:Gr})}),cn.length>0&&m.jsxs("span",{className:"text-xs text-muted-foreground",children:[cn.length," session",cn.length!==1?"s":""]})]}),m.jsx("div",{ref:ne,className:"min-h-0 flex-1 overflow-y-auto",children:m.jsxs("div",{className:"mx-auto w-full max-w-2xl space-y-6 py-4",children:[m.jsx("div",{ref:ae,className:"h-1"}),Mt&&m.jsx("div",{className:"flex justify-center py-2",children:m.jsx(Or,{className:"h-4 w-4 animate-spin text-muted-foreground"})}),!Rt&&cn.length===0&&m.jsx("p",{className:"text-center text-sm text-muted-foreground py-12",children:"Start the conversation by submitting a task below."}),cn.map((ge,ft)=>{const Dt=ft===cn.length-1;return m.jsxs("div",{className:"space-y-4",children:[(ge.user_task??ge.task)&&m.jsx(y4e,{task:ge.user_task??ge.task}),(Dt&&Te?at:ge.chat_messages??[]).map(on=>m.jsx("div",{className:`flex ${on.role==="user"?"justify-end":"justify-start"}`,children:m.jsx("div",{className:`max-w-[80%] rounded-lg px-3 py-2 text-sm ${on.role==="user"?"bg-primary text-primary-foreground":"bg-muted text-foreground"}`,children:m.jsx(zi,{content:on.text,className:"whitespace-pre-wrap"})})},on.id)),m.jsx(v4e,{session:ge,projectId:n})]},ge.run_id)})]})}),(de==null?void 0:de.pending_task)&&(()=>{const ge=de.pending_task.split(`

`).filter(Boolean);return m.jsx("div",{className:"flex-shrink-0 border-t border-border bg-background px-4 py-2",children:m.jsxs("div",{className:"mx-auto max-w-2xl space-y-1.5",children:[ge.map((ft,Dt)=>m.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-dashed border-primary/40 bg-primary/5 px-3 py-2",children:[m.jsx(Or,{className:"h-3.5 w-3.5 animate-spin text-primary flex-shrink-0"}),m.jsxs("span",{className:"text-xs text-muted-foreground flex-1 truncate",children:["Queued",ge.length>1?` (${Dt+1}/${ge.length})`:"",":"," ",m.jsx("span",{className:"text-foreground",children:ft.split(`
`)[0]})]})]},Dt)),m.jsx("div",{className:"flex justify-end",children:m.jsxs(je,{type:"button",variant:"ghost",size:"sm",className:"h-6 px-2 text-xs text-muted-foreground hover:text-destructive",onClick:()=>Gt.mutate(),disabled:Gt.isPending,children:[m.jsx(fc,{className:"h-3 w-3 mr-1"}),"Cancel all"]})})]})})})(),Se.length>0&&m.jsx("div",{className:"flex-shrink-0 border-t border-border bg-background px-4 pt-3 pb-1",children:m.jsx("div",{className:"mx-auto max-w-2xl space-y-2",children:Se.map(ge=>m.jsxs("div",{className:"rounded-lg border border-border bg-muted/30 p-3 space-y-2",children:[m.jsx(zi,{content:ge.question,className:"text-sm font-medium"}),ge.why&&m.jsx(zi,{content:ge.why,className:"text-xs text-muted-foreground"}),ge.choices&&m.jsx("div",{className:"flex flex-wrap gap-1.5",children:ge.choices.map(ft=>m.jsx(je,{type:"button",size:"sm",variant:"outline",onClick:()=>Nn(ge,ft),children:ft},ft))}),m.jsxs("div",{className:"flex gap-2",children:[m.jsx(rt,{value:Q,onChange:ft=>J(ft.target.value),onKeyDown:ft=>{ft.key==="Enter"&&!ft.shiftKey&&(ft.preventDefault(),Nn(ge,Q))},placeholder:"Your answer…",autoFocus:!0,className:"text-sm"}),m.jsx(je,{type:"button",size:"icon",disabled:!Q.trim(),onClick:()=>Nn(ge,Q),children:m.jsx(Gy,{className:"h-4 w-4"})})]})]},ge.request_id))})}),m.jsx("div",{className:"flex-shrink-0 border-t border-border bg-background pt-4",children:m.jsxs("form",{onSubmit:St,className:"mx-auto max-w-2xl space-y-2",children:[m.jsxs("div",{className:"relative",onDragOver:qt,onDragEnter:me,onDragLeave:Ze,onDrop:an,children:[m.jsx(ql,{ref:re,value:i,onChange:ge=>a(ge.target.value),onKeyDown:Xr,placeholder:zn?"Queue a follow-up task… (Enter to queue, runs after current session)":"Describe the next task… (Enter to submit, Shift+Enter for new line, drag & drop files to attach)",disabled:Ge.isPending,className:"h-[80px] resize-none overflow-y-auto",autoFocus:!0}),(g||b)&&m.jsx("div",{className:"absolute inset-0 flex items-center justify-center rounded-md border-2 border-dashed border-primary bg-background/80 pointer-events-none",children:b?m.jsxs("span",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[m.jsx(Or,{className:"h-4 w-4 animate-spin"})," Uploading…"]}):m.jsxs("span",{className:"flex items-center gap-2 text-sm text-primary",children:[m.jsx(I0,{className:"h-4 w-4"})," Drop to upload & attach"]})})]}),(et.data??[]).length>0&&m.jsxs("div",{className:"space-y-1.5",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsxs(dd,{children:[m.jsx(hd,{asChild:!0,children:m.jsxs(je,{type:"button",variant:"outline",size:"sm",className:"h-7 text-xs",children:[m.jsx(fN,{className:"mr-1 h-3 w-3"}),"Annotate files"]})}),m.jsxs(md,{align:"start",className:"w-64",onCloseAutoFocus:ge=>ge.preventDefault(),children:[m.jsx("div",{className:"px-2 py-1.5",children:m.jsx(rt,{placeholder:"Filter files…",value:S,onChange:ge=>E(ge.target.value),className:"h-7 text-xs",onKeyDown:ge=>ge.stopPropagation()})}),m.jsx("div",{className:"max-h-48 overflow-y-auto",children:(et.data??[]).filter(ge=>ge.path.toLowerCase().includes(S.toLowerCase())).map(ge=>m.jsx(bN,{checked:c.includes(ge.path),onCheckedChange:()=>Ye(ge.path),onSelect:ft=>ft.preventDefault(),children:m.jsx("span",{className:"font-mono text-xs",children:ge.path})},ge.path))})]})]}),c.length>0&&m.jsxs("span",{className:"text-xs text-muted-foreground",children:[c.length," attached"]})]}),c.length>0&&m.jsxs("div",{className:"flex flex-wrap gap-1",children:[(h?c:c.slice(0,3)).map(ge=>m.jsxs(zt,{variant:"secondary",className:"gap-1 font-mono text-xs",children:[m.jsx("button",{type:"button",onClick:()=>Ye(ge),className:"mr-0.5 rounded-sm hover:bg-muted",children:m.jsx(fc,{className:"h-3 w-3"})}),"@",ge]},ge)),!h&&c.length>3&&m.jsxs("button",{type:"button",onClick:()=>d(!0),className:"basis-full text-left text-xs text-muted-foreground hover:text-foreground",children:["+",c.length-3," more"]}),h&&c.length>3&&m.jsx("button",{type:"button",onClick:()=>d(!1),className:"basis-full text-left text-xs text-muted-foreground hover:text-foreground",children:"Show less"})]})]}),m.jsx("div",{className:"flex flex-col gap-1.5",children:m.jsxs("div",{className:"flex items-center justify-between gap-2",children:[m.jsxs("div",{className:"flex flex-col gap-1",children:[m.jsx(rt,{list:"datalist-role",value:o,onChange:ge=>l(ge.target.value),placeholder:"Default role",className:"w-48 text-sm"}),st&&m.jsx("p",{className:"text-xs text-destructive",children:st})]}),m.jsx("datalist",{id:"datalist-role",children:$e.map(ge=>m.jsx("option",{value:ge},ge))}),m.jsxs("div",{className:"flex items-center gap-1",children:[m.jsxs(je,{type:"button",variant:U?"secondary":"ghost",size:"sm",className:"h-8 gap-1.5 text-xs text-muted-foreground hover:text-foreground",onClick:()=>$(ge=>!ge),title:U?"Interactive: agent can ask questions":"Auto: agent cannot ask questions",children:[m.jsx(Ap,{className:"h-3.5 w-3.5"}),U?"Interactive":"Auto"]}),m.jsxs(je,{type:"button",variant:"ghost",size:"icon",className:"relative h-8 w-8 text-muted-foreground hover:text-foreground",onClick:()=>T(!0),title:"Advanced options",children:[m.jsx(R0,{className:"h-4 w-4"}),Sr>0&&m.jsx("span",{className:"absolute -right-0.5 -top-0.5 flex h-3.5 w-3.5 items-center justify-center rounded-full bg-primary text-[9px] text-primary-foreground",children:Sr})]}),zn&&m.jsxs(je,{type:"button",variant:"destructive",onClick:()=>xe&&We.mutate(xe.run_id),disabled:We.isPending,children:[We.isPending?m.jsx(Or,{className:"mr-2 h-4 w-4 animate-spin"}):m.jsx(CF,{className:"mr-2 h-4 w-4 fill-current"}),"Stop"]}),m.jsx(je,{type:"submit",disabled:!i.trim()||Ge.isPending||!!st||ii,variant:zn?"outline":"default",title:zn?"Queue task (runs after current session)":void 0,children:Ge.isPending?m.jsx(Or,{className:"h-4 w-4 animate-spin"}):m.jsx(Gy,{className:"h-4 w-4"})})]})]})})]})}),m.jsx(ws,{open:A,onOpenChange:T,children:m.jsxs(Ss,{className:"max-w-lg",children:[m.jsx(Es,{children:m.jsx(js,{children:"Advanced Options"})}),m.jsxs("div",{className:"space-y-4",children:[m.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[m.jsxs("div",{className:"space-y-2",children:[m.jsx(mt,{children:"Runtime"}),m.jsx(rt,{list:"adv-datalist-runtime",value:P,onChange:ge=>I(ge.target.value),placeholder:(Xe==null?void 0:Xe.runtime)??"default",className:"text-sm"}),m.jsx("datalist",{id:"adv-datalist-runtime",children:rn.map(ge=>m.jsx("option",{value:ge},ge))}),Yr&&m.jsx("p",{className:"text-xs text-destructive",children:Yr})]}),m.jsxs("div",{className:"space-y-2",children:[m.jsx(mt,{children:"Memory"}),m.jsx(rt,{list:"adv-datalist-memory",value:z,onChange:ge=>F(ge.target.value),placeholder:(Xe==null?void 0:Xe.memory)??"dial",className:"text-sm"}),m.jsx("datalist",{id:"adv-datalist-memory",children:dr.map(ge=>m.jsx("option",{value:ge},ge))}),Pr&&m.jsx("p",{className:"text-xs text-destructive",children:Pr})]})]}),m.jsxs("div",{className:"space-y-2",children:[m.jsx(mt,{children:"System Prompt"}),m.jsx(ql,{value:B,onChange:ge=>G(ge.target.value),placeholder:"Additional instructions appended to conversation context…",rows:3,className:"text-sm"})]}),m.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[m.jsxs("div",{className:"space-y-2",children:[m.jsx(mt,{children:"Max Delegations"}),m.jsx(rt,{type:"number",min:"0",value:L,onChange:ge=>V(ge.target.value),placeholder:Xe!=null&&Xe.max_num_delegations?String(Xe.max_num_delegations):"0 (unlimited)",className:"h-8 text-xs"})]}),m.jsxs("div",{className:"space-y-2",children:[m.jsx(mt,{children:"Cache Delegations"}),m.jsxs(Ra,{value:D||"__empty__",onValueChange:ge=>q(ge==="__empty__"?"":ge),children:[m.jsx(La,{className:"h-8 text-xs",children:m.jsx(Ia,{placeholder:`Default (${(Xe==null?void 0:Xe.cache_delegations)!==!1?"true":"false"})`})}),m.jsxs(za,{children:[m.jsxs(In,{value:"__empty__",className:"text-muted-foreground",children:["Default (",(Xe==null?void 0:Xe.cache_delegations)!==!1?"true":"false",")"]}),m.jsx(In,{value:"true",children:"true"}),m.jsx(In,{value:"false",children:"false"})]})]})]}),m.jsxs("div",{className:"space-y-2",children:[m.jsx(mt,{children:"Cache Max Entries"}),m.jsx(rt,{type:"number",min:"0",value:X,onChange:ge=>K(ge.target.value),placeholder:Xe!=null&&Xe.cache_max_entries?String(Xe.cache_max_entries):"0 (unlimited)",className:"h-8 text-xs"})]}),m.jsxs("div",{className:"space-y-2",children:[m.jsx(mt,{children:"Cache TTL (seconds)"}),m.jsx(rt,{type:"number",min:"0",value:R,onChange:ge=>H(ge.target.value),placeholder:Xe!=null&&Xe.cache_ttl_seconds?String(Xe.cache_ttl_seconds):"0 (unlimited)",className:"h-8 text-xs"})]})]})]}),m.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[m.jsx(je,{variant:"ghost",size:"sm",onClick:()=>{I(""),F(""),G(""),V(""),q(""),K(""),H("")},children:"Reset"}),m.jsx(je,{size:"sm",onClick:()=>T(!1),children:"Done"})]})]})})]})}const r$="imu";function b4e(e){if(e===null)return"";const t=Math.round(e/1e3);if(t<60)return`${t}s`;const n=Math.floor(t/60),r=t%60;return r>0?`${n}m ${r}s`:`${n}m`}function w4e({status:e}){return e==="running"||e==="starting"?m.jsxs(zt,{variant:"outline",className:"gap-1 border-blue-200 text-blue-700 dark:border-blue-800 dark:text-blue-400",children:[m.jsx(Or,{className:"h-3 w-3 animate-spin"}),e==="starting"?"Starting":"Running"]}):e==="completed"?m.jsxs(zt,{variant:"outline",className:"gap-1 border-green-200 text-green-700 dark:border-green-800 dark:text-green-400",children:[m.jsx(M0,{className:"h-3 w-3"}),"Completed"]}):e==="failed"?m.jsxs(zt,{variant:"outline",className:"gap-1 border-red-200 text-red-700 dark:border-red-800 dark:text-red-400",children:[m.jsx(cN,{className:"h-3 w-3"}),"Failed"]}):m.jsx(zt,{variant:"outline",children:e})}function S4e({session:e}){const t=e.status==="running"||e.status==="starting";return m.jsxs("div",{className:"flex flex-col gap-1.5",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Bot Imu"}),m.jsx(w4e,{status:e.status}),e.duration_ms!==null&&m.jsx("span",{className:"text-xs text-muted-foreground",children:b4e(e.duration_ms)})]}),m.jsx("div",{className:"rounded-lg border border-border bg-muted/30 p-3 text-sm",children:t?m.jsxs("span",{className:"flex items-center gap-2 text-muted-foreground",children:[m.jsx(Or,{className:"h-3.5 w-3.5 animate-spin"}),"Working…"]}):e.summary?m.jsx(zi,{content:e.summary,className:"text-sm text-foreground"}):m.jsx("span",{className:"text-muted-foreground italic",children:e.status==="failed"?"Session failed without output.":e.status==="stopped"?"Interrupted.":"No summary available."})}),m.jsxs("a",{href:`/projects/0/sessions/${e.run_id}`,target:"_blank",rel:"noopener noreferrer",className:"flex w-fit items-center gap-1 text-xs text-muted-foreground hover:text-foreground",children:[m.jsx(bF,{className:"h-3 w-3"}),"View session"]})]})}function E4e({task:e}){return m.jsxs("div",{className:"flex flex-col gap-1.5 items-end",children:[m.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"You"}),m.jsx("div",{className:"max-w-[80%] rounded-lg bg-primary px-3 py-2 text-sm text-primary-foreground",children:m.jsx("p",{className:"whitespace-pre-wrap",children:e})})]})}function j4e({cid:e}){const[t,n]=y.useState(""),[r,i]=y.useState(!0),[a,o]=y.useState(!1),[l,c]=y.useState(""),[f,h]=y.useState(!1),[d,g]=y.useState(""),[v,b]=y.useState(""),[w,S]=y.useState(""),[E,C]=y.useState(""),[_,N]=y.useState(""),[O,A]=y.useState(""),[T,P]=y.useState(""),[I,z]=y.useState(!1),[F,B]=y.useState(!1),[G,L]=y.useState([]),[V,D]=y.useState(!1),[q,X]=y.useState(""),[K,R]=y.useState(""),H=gt(),U=y.useRef(null),$=y.useRef(null),Q=y.useRef(0),J=y.useRef(void 0),ne=y.useRef(0),ae=y.useRef(null),ie=y.useRef(null),{data:ee}=Ju("agents"),{data:se}=Ju("memories"),pe=L0(0),re=me=>L(Ze=>Ze.includes(me)?Ze.filter(an=>an!==me):[...Ze,me]),{data:we,isLoading:Ee,error:$e,fetchPreviousPage:Ne,hasPreviousPage:et,isFetchingPreviousPage:Xe}=Wy(e),Ke=(we==null?void 0:we.pages.flatMap(me=>me.sessions))??[],Rt=we==null?void 0:we.pages[we.pages.length-1],ct=Ke[Ke.length-1],wt=(ct==null?void 0:ct.status)==="running"||(ct==null?void 0:ct.status)==="starting";Wy(e,{refetchInterval:wt?2e3:!1});const Xt=MF(e),Mt=wN(),cn=DF(e),de=vN(),{pendingAskUsers:xe,chatMessages:Te,respond:Ge}=dT((ct==null?void 0:ct.run_id)??"",wt&&r),We=(ee??[]).map(me=>me.name),Gt=[...new Set((se??[]).map(me=>me.name)),"none"].sort(),nn=d.trim()&&We.length>0&&!We.includes(d.trim())?"Runtime not found in installed agents":"",Se=v.trim()&&Gt.length>0&&!Gt.includes(v.trim())?"Memory not found in installed providers":"",at=!!nn||!!Se,vt=[d,v,w,E,_,O,T].filter(me=>me.trim()).length;y.useEffect(()=>{if(!U.current)return;const me=U.current.scrollHeight-Q.current;me>0&&(U.current.scrollTop+=me,Q.current=0)},[we==null?void 0:we.pages.length]),y.useEffect(()=>{U.current&&((ct==null?void 0:ct.run_id)!==J.current&&(U.current.scrollTop=U.current.scrollHeight),J.current=ct==null?void 0:ct.run_id)},[ct==null?void 0:ct.run_id]),y.useEffect(()=>{U.current&&(Te.length>ne.current&&(U.current.scrollTop=U.current.scrollHeight),ne.current=Te.length)},[Te.length]),y.useEffect(()=>{if(!$.current||!U.current)return;const me=new IntersectionObserver(([Ze])=>{var an;Ze.isIntersecting&&et&&!Xe&&(Q.current=((an=U.current)==null?void 0:an.scrollHeight)??0,Ne())},{root:U.current,threshold:.1});return me.observe($.current),()=>me.disconnect()},[et,Xe,Ne]);const st=me=>{me.preventDefault(),z(!0)},zn=me=>{me.preventDefault(),z(!0)},rn=me=>{me.preventDefault(),z(!1)},dr=async me=>{me.preventDefault(),z(!1);const Ze=Array.from(me.dataTransfer.files);if(Ze.length){B(!0);try{const an=await Fe.upload("/projects/0/files",Ze);H.invalidateQueries({queryKey:Ue.projects.files(0)}),L(St=>{const Nn=an.map(Xr=>Xr.path).filter(Xr=>!St.includes(Xr));return[...St,...Nn]})}catch{}finally{B(!1)}}};function Yr(me){me.preventDefault();const Ze=t.trim();!Ze||at||Xt.mutate({task:Ze,role:r$,interactive:r,context_files:G.length>0?G:void 0,system_prompt:w.trim()||void 0,runtime:d.trim()||void 0,memory:v.trim()||void 0,max_num_delegations:E.trim()?Number(E):void 0,cache_delegations:_?_==="true":void 0,cache_max_entries:O.trim()?Number(O):void 0,cache_ttl_seconds:T.trim()?Number(T):void 0},{onSuccess:()=>{n(""),L([]),D(!1),setTimeout(()=>{var an;return(an=ie.current)==null?void 0:an.focus()},0)}})}function Pr(me,Ze){Ze.trim()&&(Ge(me.request_id,Ze.trim()),R(""))}function ii(me){me.key==="Enter"&&!me.shiftKey&&(me.preventDefault(),Yr(me))}function Sr(){c((Rt==null?void 0:Rt.title)??""),o(!0),setTimeout(()=>{var me;return(me=ae.current)==null?void 0:me.select()},0)}function Ye(){const me=l.trim();de.mutate({conversationId:e,title:me||null}),o(!1)}if($e)return m.jsxs("div",{className:"flex items-center gap-2 text-destructive",children:[m.jsx(po,{className:"h-4 w-4"}),m.jsxs("span",{children:["Error: ",$e.message]})]});const qt=(Rt==null?void 0:Rt.title)??`Conversation #${e}`;return m.jsxs("div",{className:"flex h-full flex-col",children:[m.jsxs("div",{className:"flex flex-shrink-0 items-center justify-between border-b border-border pb-3 mb-4",children:[m.jsx("div",{className:"flex items-center gap-3",children:a?m.jsx(rt,{ref:ae,value:l,onChange:me=>c(me.target.value),onBlur:Ye,onKeyDown:me=>{me.key==="Enter"&&(me.preventDefault(),Ye()),me.key==="Escape"&&o(!1)},className:"h-7 text-sm font-semibold w-64",placeholder:`Conversation #${e}`}):m.jsx("h1",{className:"text-sm font-semibold cursor-pointer hover:text-muted-foreground",onClick:Sr,title:"Click to rename",children:qt})}),Ke.length>0&&m.jsxs("span",{className:"text-xs text-muted-foreground",children:[Ke.length," session",Ke.length!==1?"s":""]})]}),m.jsx("div",{ref:U,className:"min-h-0 flex-1 overflow-y-auto",children:m.jsxs("div",{className:"mx-auto w-full max-w-2xl space-y-6 py-4",children:[m.jsx("div",{ref:$,className:"h-1"}),Xe&&m.jsx("div",{className:"flex justify-center py-2",children:m.jsx(Or,{className:"h-4 w-4 animate-spin text-muted-foreground"})}),!Ee&&Ke.length===0&&m.jsx("p",{className:"text-center text-sm text-muted-foreground py-12",children:"Start a conversation with Bot Imu below."}),Ke.map((me,Ze)=>{const an=Ze===Ke.length-1;return m.jsxs("div",{className:"space-y-4",children:[(me.user_task??me.task)&&m.jsx(E4e,{task:me.user_task??me.task}),(an&&wt?Te:me.chat_messages??[]).map(St=>m.jsx("div",{className:`flex ${St.role==="user"?"justify-end":"justify-start"}`,children:m.jsx("div",{className:`max-w-[80%] rounded-lg px-3 py-2 text-sm ${St.role==="user"?"bg-primary text-primary-foreground":"bg-muted text-foreground"}`,children:m.jsx(zi,{content:St.text,className:"whitespace-pre-wrap"})})},St.id)),m.jsx(S4e,{session:me})]},me.run_id)})]})}),(Rt==null?void 0:Rt.pending_task)&&(()=>{const me=Rt.pending_task.split(`

`).filter(Boolean);return m.jsx("div",{className:"flex-shrink-0 border-t border-border bg-background px-4 py-2",children:m.jsxs("div",{className:"mx-auto max-w-2xl space-y-1.5",children:[me.map((Ze,an)=>m.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-dashed border-primary/40 bg-primary/5 px-3 py-2",children:[m.jsx(Or,{className:"h-3.5 w-3.5 animate-spin text-primary flex-shrink-0"}),m.jsxs("span",{className:"text-xs text-muted-foreground flex-1 truncate",children:["Queued",me.length>1?` (${an+1}/${me.length})`:"",":"," ",m.jsx("span",{className:"text-foreground",children:Ze.split(`
`)[0]})]})]},an)),m.jsx("div",{className:"flex justify-end",children:m.jsxs(je,{type:"button",variant:"ghost",size:"sm",className:"h-6 px-2 text-xs text-muted-foreground hover:text-destructive",onClick:()=>cn.mutate(),disabled:cn.isPending,children:[m.jsx(fc,{className:"h-3 w-3 mr-1"}),"Cancel all"]})})]})})})(),xe.length>0&&m.jsx("div",{className:"flex-shrink-0 border-t border-border bg-background px-4 pt-3 pb-1",children:m.jsx("div",{className:"mx-auto max-w-2xl space-y-2",children:xe.map(me=>m.jsxs("div",{className:"rounded-lg border border-border bg-muted/30 p-3 space-y-2",children:[m.jsx(zi,{content:me.question,className:"text-sm font-medium"}),me.why&&m.jsx(zi,{content:me.why,className:"text-xs text-muted-foreground"}),me.choices&&m.jsx("div",{className:"flex flex-wrap gap-1.5",children:me.choices.map(Ze=>m.jsx(je,{type:"button",size:"sm",variant:"outline",onClick:()=>Pr(me,Ze),children:Ze},Ze))}),m.jsxs("div",{className:"flex gap-2",children:[m.jsx(rt,{value:K,onChange:Ze=>R(Ze.target.value),onKeyDown:Ze=>{Ze.key==="Enter"&&!Ze.shiftKey&&(Ze.preventDefault(),Pr(me,K))},placeholder:"Your answer…",autoFocus:!0,className:"text-sm"}),m.jsx(je,{type:"button",size:"icon",disabled:!K.trim(),onClick:()=>Pr(me,K),children:m.jsx(Gy,{className:"h-4 w-4"})})]})]},me.request_id))})}),m.jsx("div",{className:"flex-shrink-0 border-t border-border bg-background pt-4",children:m.jsxs("form",{onSubmit:Yr,className:"mx-auto max-w-2xl space-y-2",children:[m.jsxs("div",{className:"relative",onDragOver:st,onDragEnter:zn,onDragLeave:rn,onDrop:dr,children:[m.jsx(ql,{ref:ie,value:t,onChange:me=>n(me.target.value),onKeyDown:ii,placeholder:wt?"Queue a follow-up task… (Enter to queue, runs after current session)":"Ask Bot Imu anything… (Enter to send, Shift+Enter for new line, drag & drop files to attach)",disabled:Xt.isPending,className:"h-[80px] resize-none overflow-y-auto",autoFocus:!0}),(I||F)&&m.jsx("div",{className:"absolute inset-0 flex items-center justify-center rounded-md border-2 border-dashed border-primary bg-background/80 pointer-events-none",children:F?m.jsxs("span",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[m.jsx(Or,{className:"h-4 w-4 animate-spin"})," Uploading…"]}):m.jsxs("span",{className:"flex items-center gap-2 text-sm text-primary",children:[m.jsx(I0,{className:"h-4 w-4"})," Drop to upload & attach"]})})]}),m.jsxs("div",{className:"space-y-1.5",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsxs(dd,{children:[m.jsx(hd,{asChild:!0,children:m.jsxs(je,{type:"button",variant:"outline",size:"sm",className:"h-7 text-xs",children:[m.jsx(fN,{className:"mr-1 h-3 w-3"}),"Annotate files"]})}),m.jsxs(md,{align:"start",className:"w-64",onCloseAutoFocus:me=>me.preventDefault(),children:[m.jsx("div",{className:"px-2 py-1.5",children:m.jsx(rt,{placeholder:"Filter files…",value:q,onChange:me=>X(me.target.value),className:"h-7 text-xs",onKeyDown:me=>me.stopPropagation()})}),m.jsx("div",{className:"max-h-48 overflow-y-auto",children:(pe.data??[]).filter(me=>me.path.toLowerCase().includes(q.toLowerCase())).map(me=>m.jsx(bN,{checked:G.includes(me.path),onCheckedChange:()=>re(me.path),onSelect:Ze=>Ze.preventDefault(),children:m.jsx("span",{className:"font-mono text-xs",children:me.path})},me.path))})]})]}),G.length>0&&m.jsxs("span",{className:"text-xs text-muted-foreground",children:[G.length," attached"]})]}),G.length>0&&m.jsxs("div",{className:"flex flex-wrap gap-1",children:[(V?G:G.slice(0,3)).map(me=>m.jsxs(zt,{variant:"secondary",className:"gap-1 font-mono text-xs",children:[m.jsx("button",{type:"button",onClick:()=>re(me),className:"mr-0.5 rounded-sm hover:bg-muted",children:m.jsx(fc,{className:"h-3 w-3"})}),"@",me]},me)),!V&&G.length>3&&m.jsxs("button",{type:"button",onClick:()=>D(!0),className:"basis-full text-left text-xs text-muted-foreground hover:text-foreground",children:["+",G.length-3," more"]}),V&&G.length>3&&m.jsx("button",{type:"button",onClick:()=>D(!1),className:"basis-full text-left text-xs text-muted-foreground hover:text-foreground",children:"Show less"})]})]}),m.jsxs("div",{className:"flex items-center justify-between gap-2",children:[m.jsxs("span",{className:"text-xs text-muted-foreground px-1",children:["Role: ",r$]}),m.jsxs("div",{className:"flex items-center gap-1",children:[m.jsxs(je,{type:"button",variant:r?"secondary":"ghost",size:"sm",className:"h-8 gap-1.5 text-xs text-muted-foreground hover:text-foreground",onClick:()=>i(me=>!me),title:r?"Interactive: agent can ask questions":"Auto: agent cannot ask questions",children:[m.jsx(Ap,{className:"h-3.5 w-3.5"}),r?"Interactive":"Auto"]}),m.jsxs(je,{type:"button",variant:"ghost",size:"icon",className:"relative h-8 w-8 text-muted-foreground hover:text-foreground",onClick:()=>h(!0),title:"Advanced options",children:[m.jsx(R0,{className:"h-4 w-4"}),vt>0&&m.jsx("span",{className:"absolute -right-0.5 -top-0.5 flex h-3.5 w-3.5 items-center justify-center rounded-full bg-primary text-[9px] text-primary-foreground",children:vt})]}),wt&&m.jsxs(je,{type:"button",variant:"destructive",onClick:()=>ct&&Mt.mutate(ct.run_id),disabled:Mt.isPending,children:[Mt.isPending?m.jsx(Or,{className:"mr-2 h-4 w-4 animate-spin"}):m.jsx(CF,{className:"mr-2 h-4 w-4 fill-current"}),"Stop"]}),m.jsx(je,{type:"submit",disabled:!t.trim()||Xt.isPending||at,variant:wt?"outline":"default",title:wt?"Queue task (runs after current session)":void 0,children:Xt.isPending?m.jsx(Or,{className:"h-4 w-4 animate-spin"}):m.jsx(Gy,{className:"h-4 w-4"})})]})]})]})}),m.jsx(ws,{open:f,onOpenChange:h,children:m.jsxs(Ss,{className:"max-w-lg",children:[m.jsx(Es,{children:m.jsx(js,{children:"Advanced Options"})}),m.jsxs("div",{className:"space-y-4",children:[m.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[m.jsxs("div",{className:"space-y-2",children:[m.jsx(mt,{children:"Runtime"}),m.jsx(rt,{list:"imu-adv-runtime",value:d,onChange:me=>g(me.target.value),placeholder:"default",className:"text-sm"}),m.jsx("datalist",{id:"imu-adv-runtime",children:We.map(me=>m.jsx("option",{value:me},me))}),nn&&m.jsx("p",{className:"text-xs text-destructive",children:nn})]}),m.jsxs("div",{className:"space-y-2",children:[m.jsx(mt,{children:"Memory"}),m.jsx(rt,{list:"imu-adv-memory",value:v,onChange:me=>b(me.target.value),placeholder:"dial",className:"text-sm"}),m.jsx("datalist",{id:"imu-adv-memory",children:Gt.map(me=>m.jsx("option",{value:me},me))}),Se&&m.jsx("p",{className:"text-xs text-destructive",children:Se})]})]}),m.jsxs("div",{className:"space-y-2",children:[m.jsx(mt,{children:"System Prompt"}),m.jsx(ql,{value:w,onChange:me=>S(me.target.value),placeholder:"Additional instructions appended to conversation context…",rows:3,className:"text-sm"})]}),m.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[m.jsxs("div",{className:"space-y-2",children:[m.jsx(mt,{children:"Max Delegations"}),m.jsx(rt,{type:"number",min:"0",value:E,onChange:me=>C(me.target.value),placeholder:"0 (unlimited)",className:"h-8 text-xs"})]}),m.jsxs("div",{className:"space-y-2",children:[m.jsx(mt,{children:"Cache Delegations"}),m.jsxs(Ra,{value:_||"__empty__",onValueChange:me=>N(me==="__empty__"?"":me),children:[m.jsx(La,{className:"h-8 text-xs",children:m.jsx(Ia,{placeholder:"Default (true)"})}),m.jsxs(za,{children:[m.jsx(In,{value:"__empty__",className:"text-muted-foreground",children:"Default (true)"}),m.jsx(In,{value:"true",children:"true"}),m.jsx(In,{value:"false",children:"false"})]})]})]}),m.jsxs("div",{className:"space-y-2",children:[m.jsx(mt,{children:"Cache Max Entries"}),m.jsx(rt,{type:"number",min:"0",value:O,onChange:me=>A(me.target.value),placeholder:"0 (unlimited)",className:"h-8 text-xs"})]}),m.jsxs("div",{className:"space-y-2",children:[m.jsx(mt,{children:"Cache TTL (seconds)"}),m.jsx(rt,{type:"number",min:"0",value:T,onChange:me=>P(me.target.value),placeholder:"0 (unlimited)",className:"h-8 text-xs"})]})]})]}),m.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[m.jsx(je,{variant:"ghost",size:"sm",onClick:()=>{g(""),b(""),S(""),C(""),N(""),A(""),P("")},children:"Reset"}),m.jsx(je,{size:"sm",onClick:()=>h(!1),children:"Done"})]})]})})]})}function _4e({conv:e}){const[t,n]=y.useState(!1),[r,i]=y.useState(""),a=y.useRef(null),o=vN();function l(f){f.stopPropagation(),i(e.title??""),n(!0),setTimeout(()=>{var h;return(h=a.current)==null?void 0:h.select()},0)}function c(f){f.stopPropagation(),o.mutate({conversationId:e.id,title:r.trim()||null}),n(!1)}return t?m.jsx(rt,{ref:a,value:r,onChange:f=>i(f.target.value),onBlur:c,onKeyDown:f=>{f.key==="Enter"&&(f.preventDefault(),c(f)),f.key==="Escape"&&(f.stopPropagation(),n(!1))},onClick:f=>f.stopPropagation(),className:"h-7 text-sm font-medium w-full",placeholder:`Conversation #${e.id}`}):m.jsxs("div",{className:"flex items-center gap-1.5",children:[m.jsx("span",{className:"font-medium",children:e.title??`Conversation #${e.id}`}),m.jsx(je,{variant:"ghost",size:"icon",className:"h-5 w-5 text-muted-foreground hover:text-foreground",onClick:l,"aria-label":"Rename",children:m.jsx(Op,{className:"h-3 w-3"})})]})}function C4e({conv:e}){const[t,n]=y.useState(!1),r=IF();return t?m.jsxs("div",{className:"flex justify-end gap-1",onClick:i=>i.stopPropagation(),children:[m.jsx(je,{size:"sm",variant:"destructive",disabled:r.isPending,onClick:i=>{i.stopPropagation(),r.mutate(e.id,{onSuccess:()=>n(!1),onError:()=>n(!1)})},children:"Confirm"}),m.jsx(je,{size:"sm",variant:"outline",onClick:i=>{i.stopPropagation(),n(!1)},children:"No"})]}):m.jsx(je,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-destructive",onClick:i=>{i.stopPropagation(),n(!0)},"aria-label":"Delete conversation",children:m.jsx(Eo,{className:"h-3.5 w-3.5"})})}function k4e(){var d,g,v;const e=Ba(),t=z0(),n=RF(),[r,i]=y.useState(1),a=$F(0,r),[o,l]=y.useState("conversations"),c=((d=a.data)==null?void 0:d.items)??[],f=((g=a.data)==null?void 0:g.total)??0,h=a.data?Math.ceil(a.data.total/a.data.per_page):0;return m.jsxs("div",{className:"space-y-6",children:[m.jsxs("div",{className:"flex items-start justify-between",children:[m.jsxs("div",{children:[m.jsxs("h1",{className:"text-2xl font-bold tracking-tight flex items-center gap-2",children:[m.jsx(lN,{className:"h-6 w-6"}),"Bot Imu"]}),m.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Your personal StrawPot overlord. Ask it to manage projects, run agents, configure schedules, or anything else in your StrawPot workspace."})]}),m.jsxs(je,{onClick:()=>n.mutate(void 0,{onSuccess:b=>e(`/imu/${b.id}`)}),disabled:n.isPending,children:[n.isPending?m.jsx(Or,{className:"mr-2 h-4 w-4 animate-spin"}):m.jsx(Ap,{className:"mr-2 h-4 w-4"}),"New Conversation"]})]}),m.jsxs(Mp,{value:o,onValueChange:l,children:[m.jsxs(Dp,{children:[m.jsxs(ar,{value:"conversations",children:["Conversations (",((v=t.data)==null?void 0:v.length)??0,")"]}),m.jsxs(ar,{value:"sessions",children:["Sessions (",f,")"]}),m.jsx(ar,{value:"activity",children:"Activity"}),m.jsx(ar,{value:"files",children:"Files"})]}),m.jsx(or,{value:"conversations",className:"mt-4 space-y-3",children:(t.data??[]).length===0?m.jsx("p",{className:"text-sm italic text-muted-foreground",children:'No conversations yet. Click "New Conversation" to start one.'}):m.jsx(hn,{children:m.jsx(mn,{className:"p-0",children:m.jsxs("table",{className:"w-full text-sm",children:[m.jsx("thead",{children:m.jsxs("tr",{className:"border-b border-border text-left text-xs text-muted-foreground",children:[m.jsx("th",{className:"px-4 py-2 font-medium",children:"Title"}),m.jsx("th",{className:"px-4 py-2 font-medium",children:"Sessions"}),m.jsx("th",{className:"px-4 py-2 font-medium",children:"Last activity"}),m.jsx("th",{className:"px-4 py-2"})]})}),m.jsx("tbody",{children:(t.data??[]).map(b=>m.jsxs("tr",{className:"cursor-pointer border-b border-border last:border-0 hover:bg-muted/50",onClick:()=>e(`/imu/${b.id}`),children:[m.jsx("td",{className:"px-4 py-2",children:m.jsx(_4e,{conv:b})}),m.jsx("td",{className:"px-4 py-2 text-muted-foreground",children:b.session_count}),m.jsx("td",{className:"px-4 py-2 text-muted-foreground",children:b.updated_at?new Date(b.updated_at).toLocaleString():new Date(b.created_at).toLocaleString()}),m.jsx("td",{className:"px-4 py-2 text-right",children:m.jsx(C4e,{conv:b})})]},b.id))})]})})})}),m.jsx(or,{value:"sessions",className:"mt-4 space-y-3",children:f===0?m.jsx("p",{className:"text-sm italic text-muted-foreground",children:"No sessions yet."}):m.jsxs(m.Fragment,{children:[m.jsx(hn,{children:m.jsx(mn,{className:"p-0",children:m.jsx(Qy,{sessions:c})})}),m.jsx(eU,{page:r,totalPages:h,onPageChange:i})]})}),m.jsx(or,{value:"activity",className:"mt-4",children:m.jsx(_V,{projectId:0})}),m.jsx(or,{value:"files",className:"mt-4",children:m.jsx(nU,{projectId:0})})]})]})}function i$(){const{conversationId:e}=xp(),t=e?Number(e):null;return t!==null?m.jsx(j4e,{cid:t}):m.jsx(k4e,{})}const N4e={skills:["denden","strawpot-session-recap"],roles:["imu","ai-ceo","ai-employee"],agents:["strawpot-claude-code"],memories:["dial"]},A4e={roles:"Roles",skills:"Skills",agents:"Agents",memories:"Memory Providers"};function O4e(){const{resourceType:e="roles"}=xp(),{data:t,isLoading:n}=Ju(e),[r,i]=y.useState(null),[a,o]=y.useState(!1),[l,c]=y.useState(!1),{data:f}=_ue(e,r??"",{enabled:a&&!!r}),h=A4e[e]??e;return m.jsxs("div",{className:"space-y-6",children:[m.jsxs("div",{className:"flex items-center justify-between",children:[m.jsxs("div",{children:[m.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:h}),m.jsxs("p",{className:"text-sm text-muted-foreground",children:["Installed ",h.toLowerCase()," from StrawHub"]})]}),m.jsxs(je,{onClick:()=>c(!0),size:"sm",children:[m.jsx(D0,{className:"mr-2 h-4 w-4"}),"Install"]})]}),n?m.jsx("div",{className:"space-y-2",children:Array.from({length:3}).map((d,g)=>m.jsx(Rn,{className:"h-12 w-full"},g))}):!t||t.length===0?m.jsxs("div",{className:"rounded-lg border border-dashed border-border p-8 text-center text-muted-foreground",children:["No ",h.toLowerCase()," installed yet."]}):m.jsxs(fs,{children:[m.jsx(ds,{children:m.jsxs(sr,{children:[m.jsx(ot,{children:"Name"}),m.jsx(ot,{children:"Version"}),m.jsx(ot,{children:"Description"}),m.jsx(ot,{children:"Source"}),m.jsx(ot,{className:"w-24"})]})}),m.jsx(hs,{children:t.map(d=>{var g;return m.jsxs(sr,{className:"cursor-pointer",onClick:()=>{i(d.name),o(!0)},children:[m.jsx(it,{className:"font-medium",children:d.name}),m.jsx(it,{className:"text-sm text-muted-foreground",children:d.version??"—"}),m.jsx(it,{className:"max-w-[300px] truncate text-sm",children:d.description||"—"}),m.jsx(it,{children:m.jsx(zt,{variant:"outline",className:"text-xs",children:d.source})}),m.jsx(it,{children:!((g=N4e[e])!=null&&g.includes(d.name))&&m.jsx(T4e,{resourceType:e,name:d.name})})]},d.name)})})]}),m.jsx(aU,{resource:f??null,resourceType:e,open:a,onOpenChange:o}),m.jsx(SN,{open:l,onOpenChange:c,defaultType:e})]})}function T4e({resourceType:e,name:t}){const[n,r]=y.useState(!1),i=rU(),a=o=>{o.stopPropagation(),i.mutate({type:e,name:t},{onSuccess:l=>{l.exit_code===0?Ut.success(`Uninstalled ${t}`):Ut.error(`Uninstall failed: ${l.stderr||l.stdout}`),r(!1)},onError:()=>{Ut.error("Uninstall request failed"),r(!1)}})};return n?m.jsxs("div",{className:"flex gap-1",children:[m.jsx(je,{size:"sm",variant:"destructive",onClick:a,disabled:i.isPending,children:"Confirm"}),m.jsx(je,{size:"sm",variant:"outline",onClick:o=>{o.stopPropagation(),r(!1)},children:"No"})]}):m.jsx(je,{size:"sm",variant:"ghost",className:"text-muted-foreground hover:text-destructive",onClick:o=>{o.stopPropagation(),r(!0)},children:m.jsx(Eo,{className:"h-4 w-4"})})}function P4e(){return Wn({queryKey:Ue.schedules.all,queryFn:()=>Fe.get("/schedules")})}function M4e(){const e=gt();return Ht({mutationFn:t=>Fe.post("/schedules",t),onSuccess:()=>{e.invalidateQueries({queryKey:Ue.schedules.all})}})}function D4e(){const e=gt();return Ht({mutationFn:({id:t,...n})=>Fe.put(`/schedules/${t}`,n),onSuccess:()=>{e.invalidateQueries({queryKey:Ue.schedules.all})}})}function R4e(){const e=gt();return Ht({mutationFn:t=>Fe.delete(`/schedules/${t}`),onSuccess:()=>{e.invalidateQueries({queryKey:Ue.schedules.all})}})}function I4e(){const e=gt();return Ht({mutationFn:({id:t,enable:n})=>Fe.post(`/schedules/${t}/${n?"enable":"disable"}`),onSuccess:()=>{e.invalidateQueries({queryKey:Ue.schedules.all})}})}var $j={exports:{}},a$;function L4e(){return a$||(a$=1,(function(e,t){(function(r,i){e.exports=i()})(globalThis,()=>(()=>{var n={949(o,l,c){Object.defineProperty(l,"__esModule",{value:!0}),l.CronParser=void 0;var f=c(515),h=(function(){function d(g,v,b){v===void 0&&(v=!0),b===void 0&&(b=!1),this.expression=g,this.dayOfWeekStartIndexZero=v,this.monthStartIndexZero=b}return d.prototype.parse=function(){var g,v,b=(g=this.expression)!==null&&g!==void 0?g:"";if(b==="@reboot")return v=["@reboot","","","","","",""],v;if(b.startsWith("@")){var w=this.parseSpecial(this.expression);v=this.extractParts(w)}else v=this.extractParts(this.expression);return this.normalize(v),this.validate(v),v},d.prototype.parseSpecial=function(g){var v={"@yearly":"0 0 1 1 *","@annually":"0 0 1 1 *","@monthly":"0 0 1 * *","@weekly":"0 0 * * 0","@daily":"0 0 * * *","@midnight":"0 0 * * *","@hourly":"0 * * * *","@reboot":"@reboot"},b=v[g];if(!b)throw new Error("Unknown special expression.");return b},d.prototype.extractParts=function(g){if(!this.expression)throw new Error("cron expression is empty");for(var v=g.trim().split(/[ ]+/),b=0;b<v.length;b++)if(v[b].includes(",")){var w=v[b].split(",").map(function(E){return E.trim()}).filter(function(E){return E!==""}).map(function(E){return isNaN(Number(E))?E:Number(E)}).filter(function(E){return E!==null&&E!==""});w.length===0&&w.push("*"),w.sort(function(E,C){return E!==null&&C!==null?E-C:0}),v[b]=w.map(function(E){return E!==null?E.toString():""}).join(",")}if(v.length<5)throw new Error("Expression has only ".concat(v.length," part").concat(v.length==1?"":"s",". At least 5 parts are required."));if(v.length==5)v.unshift(""),v.push("");else if(v.length==6){var S=/\d{4}$/.test(v[5])||v[4]=="?"||v[2]=="?";S?v.unshift(""):v.push("")}else if(v.length>7)throw new Error("Expression has ".concat(v.length," parts; too many!"));return v},d.prototype.normalize=function(g){var v=this;if(g[3]=g[3].replace("?","*"),g[5]=g[5].replace("?","*"),g[2]=g[2].replace("?","*"),g[0].indexOf("0/")==0&&(g[0]=g[0].replace("0/","*/")),g[1].indexOf("0/")==0&&(g[1]=g[1].replace("0/","*/")),g[2].indexOf("0/")==0&&(g[2]=g[2].replace("0/","*/")),g[3].indexOf("1/")==0&&(g[3]=g[3].replace("1/","*/")),g[4].indexOf("1/")==0&&(g[4]=g[4].replace("1/","*/")),g[6].indexOf("1/")==0&&(g[6]=g[6].replace("1/","*/")),g[5]=g[5].replace(/(^\d)|([^#/\s]\d)/g,function(O){var A=O.replace(/\D/,""),T=A;return v.dayOfWeekStartIndexZero?A=="7"&&(T="0"):T=(parseInt(A)-1).toString(),O.replace(A,T)}),g[5]=="L"&&(g[5]="6"),g[3]=="?"&&(g[3]="*"),g[3].indexOf("W")>-1&&(g[3].indexOf(",")>-1||g[3].indexOf("-")>-1))throw new Error("The 'W' character can be specified only when the day-of-month is a single day, not a range or list of days.");var b={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6};for(var w in b)g[5]=g[5].replace(new RegExp(w,"gi"),b[w].toString());g[4]=g[4].replace(/(^\d{1,2})|([^#/\s]\d{1,2})/g,function(O){var A=O.replace(/\D/,""),T=A;return v.monthStartIndexZero&&(T=(parseInt(A)+1).toString()),O.replace(A,T)});var S={JAN:1,FEB:2,MAR:3,APR:4,MAY:5,JUN:6,JUL:7,AUG:8,SEP:9,OCT:10,NOV:11,DEC:12};for(var E in S)g[4]=g[4].replace(new RegExp(E,"gi"),S[E].toString());g[0]=="0"&&(g[0]=""),!/\*|\-|\,|\//.test(g[2])&&(/\*|\//.test(g[1])||/\*|\//.test(g[0]))&&(g[2]+="-".concat(g[2]));for(var C=0;C<g.length;C++)if(g[C].indexOf(",")!=-1&&(g[C]=g[C].split(",").filter(function(O){return O!==""}).join(",")||"*"),g[C]=="*/1"&&(g[C]="*"),g[C].indexOf("/")>-1&&!/^\*|\-|\,/.test(g[C])){var _=null;switch(C){case 4:_="12";break;case 5:_="6";break;case 6:_="9999";break;default:_=null;break}if(_!==null){var N=g[C].split("/");g[C]="".concat(N[0],"-").concat(_,"/").concat(N[1])}}},d.prototype.validate=function(g){var v="0-9,\\-*/";this.validateOnlyExpectedCharactersFound(g[0],v),this.validateOnlyExpectedCharactersFound(g[1],v),this.validateOnlyExpectedCharactersFound(g[2],v),this.validateOnlyExpectedCharactersFound(g[3],"0-9,\\-*/LW"),this.validateOnlyExpectedCharactersFound(g[4],v),this.validateOnlyExpectedCharactersFound(g[5],"0-9,\\-*/L#"),this.validateOnlyExpectedCharactersFound(g[6],v),this.validateAnyRanges(g)},d.prototype.validateAnyRanges=function(g){f.default.secondRange(g[0]),f.default.minuteRange(g[1]),f.default.hourRange(g[2]),f.default.dayOfMonthRange(g[3]),f.default.monthRange(g[4],this.monthStartIndexZero),f.default.dayOfWeekRange(g[5],this.dayOfWeekStartIndexZero)},d.prototype.validateOnlyExpectedCharactersFound=function(g,v){var b=g.match(new RegExp("[^".concat(v,"]+"),"gi"));if(b&&b.length)throw new Error("Expression contains invalid values: '".concat(b.toString(),"'"))},d})();l.CronParser=h},333(o,l,c){Object.defineProperty(l,"__esModule",{value:!0}),l.ExpressionDescriptor=void 0;var f=c(823),h=c(949),d=(function(){function g(v,b){if(this.expression=v,this.options=b,this.expressionParts=new Array(5),!this.options.locale&&g.defaultLocale&&(this.options.locale=g.defaultLocale),!g.locales[this.options.locale]){var w=Object.keys(g.locales)[0];console.warn("Locale '".concat(this.options.locale,"' could not be found; falling back to '").concat(w,"'.")),this.options.locale=w}this.i18n=g.locales[this.options.locale],b.use24HourTimeFormat===void 0&&(b.use24HourTimeFormat=this.i18n.use24HourTimeFormatByDefault())}return g.toString=function(v,b){var w=b===void 0?{}:b,S=w.throwExceptionOnParseError,E=S===void 0?!0:S,C=w.verbose,_=C===void 0?!1:C,N=w.dayOfWeekStartIndexZero,O=N===void 0?!0:N,A=w.monthStartIndexZero,T=A===void 0?!1:A,P=w.use24HourTimeFormat,I=w.locale,z=I===void 0?null:I,F=w.logicalAndDayFields,B=F===void 0?!1:F,G={throwExceptionOnParseError:E,verbose:_,dayOfWeekStartIndexZero:O,monthStartIndexZero:T,use24HourTimeFormat:P,locale:z,logicalAndDayFields:B};G.tzOffset&&console.warn("'tzOffset' option has been deprecated and is no longer supported.");var L=new g(v,G);return L.getFullDescription()},g.initialize=function(v,b){b===void 0&&(b="en"),g.specialCharacters=["/","-",",","*"],g.defaultLocale=b,v.load(g.locales)},g.prototype.getFullDescription=function(){var v,b,w="";try{var S=new h.CronParser(this.expression,this.options.dayOfWeekStartIndexZero,this.options.monthStartIndexZero);if(this.expressionParts=S.parse(),this.expressionParts[0]==="@reboot")return((b=(v=this.i18n).atReboot)===null||b===void 0?void 0:b.call(v))||"Run once, at startup";var E=this.getTimeOfDayDescription(),C=this.getDayOfMonthDescription(),_=this.getMonthDescription(),N=this.getDayOfWeekDescription(),O=this.getYearDescription();w+=E+C+N+_+O,w=this.transformVerbosity(w,!!this.options.verbose),w=w.charAt(0).toLocaleUpperCase()+w.substr(1)}catch(A){if(!this.options.throwExceptionOnParseError)w=this.i18n.anErrorOccuredWhenGeneratingTheExpressionD();else throw"".concat(A)}return w},g.prototype.getTimeOfDayDescription=function(){var v=this.expressionParts[0],b=this.expressionParts[1],w=this.expressionParts[2],S="";if(!f.StringUtilities.containsAny(b,g.specialCharacters)&&!f.StringUtilities.containsAny(w,g.specialCharacters)&&!f.StringUtilities.containsAny(v,g.specialCharacters))S+=this.i18n.atSpace()+this.formatTime(w,b,v);else if(!v&&b.indexOf("-")>-1&&!(b.indexOf(",")>-1)&&!(b.indexOf("/")>-1)&&!f.StringUtilities.containsAny(w,g.specialCharacters)){var E=b.split("-");S+=f.StringUtilities.format(this.i18n.everyMinuteBetweenX0AndX1(),this.formatTime(w,E[0],""),this.formatTime(w,E[1],""))}else if(!v&&w.indexOf(",")>-1&&w.indexOf("-")==-1&&w.indexOf("/")==-1&&!f.StringUtilities.containsAny(b,g.specialCharacters)){var C=w.split(",");S+=this.i18n.at();for(var _=0;_<C.length;_++)S+=" ",S+=this.formatTime(C[_],b,""),_<C.length-2&&(S+=","),_==C.length-2&&(S+=this.i18n.spaceAnd())}else{var N=this.getSecondsDescription(),O=this.getMinutesDescription(),A=this.getHoursDescription();if(S+=N,S&&O&&(S+=", "),S+=O,O===A)return S;S&&A&&(S+=", "),S+=A}return S},g.prototype.getSecondsDescription=function(){var v=this,b=this.getSegmentDescription(this.expressionParts[0],this.i18n.everySecond(),function(w){return w},function(w){return f.StringUtilities.format(v.i18n.everyX0Seconds(w),w)},function(w){return v.i18n.secondsX0ThroughX1PastTheMinute()},function(w){return w=="0"?"":parseInt(w)<20?v.i18n.atX0SecondsPastTheMinute(w):v.i18n.atX0SecondsPastTheMinuteGt20()||v.i18n.atX0SecondsPastTheMinute(w)});return b},g.prototype.getMinutesDescription=function(){var v=this,b=this.expressionParts[0],w=this.expressionParts[2],S=this.getSegmentDescription(this.expressionParts[1],this.i18n.everyMinute(),function(E){return E},function(E){return f.StringUtilities.format(v.i18n.everyX0Minutes(E),E)},function(E){return v.i18n.minutesX0ThroughX1PastTheHour()},function(E){var C,_;try{return E=="0"&&w.indexOf("/")==-1&&b==""?v.i18n.everyHour():E=="0"?((_=(C=v.i18n).onTheHour)===null||_===void 0?void 0:_.call(C))||v.i18n.atX0MinutesPastTheHour(E):parseInt(E)<20?v.i18n.atX0MinutesPastTheHour(E):v.i18n.atX0MinutesPastTheHourGt20()||v.i18n.atX0MinutesPastTheHour(E)}catch{return v.i18n.atX0MinutesPastTheHour(E)}});return S},g.prototype.getHoursDescription=function(){var v=this,b=this.expressionParts[2],w=0,S=[];b.split("/")[0].split(",").forEach(function(_){var N=_.split("-");N.length===2&&S.push({value:N[1],index:w+1}),w+=N.length});var E=0,C=this.getSegmentDescription(b,this.i18n.everyHour(),function(_){var N=S.find(function(A){return A.value===_&&A.index===E}),O=N&&v.expressionParts[1]!=="0";return E++,O?v.formatTime(_,"59",""):v.formatTime(_,"0","")},function(_){return f.StringUtilities.format(v.i18n.everyX0Hours(_),_)},function(_){return v.i18n.betweenX0AndX1()},function(_){return v.i18n.atX0()});return C},g.prototype.getDayOfWeekDescription=function(){var v=this,b=this.i18n.daysOfTheWeek(),w=null;return this.expressionParts[5]=="*"?w="":w=this.getSegmentDescription(this.expressionParts[5],this.i18n.commaEveryDay(),function(S,E){var C=S;S.indexOf("#")>-1?C=S.substring(0,S.indexOf("#")):S.indexOf("L")>-1&&(C=C.replace("L",""));var _=parseInt(C),N=v.i18n.daysOfTheWeekInCase?v.i18n.daysOfTheWeekInCase(E)[_]:b[_];if(S.indexOf("#")>-1){var O=null,A=S.substring(S.indexOf("#")+1),T=S.substring(0,S.indexOf("#"));switch(A){case"1":O=v.i18n.first(T);break;case"2":O=v.i18n.second(T);break;case"3":O=v.i18n.third(T);break;case"4":O=v.i18n.fourth(T);break;case"5":O=v.i18n.fifth(T);break}N=O+" "+N}return N},function(S){return parseInt(S)==1?"":f.StringUtilities.format(v.i18n.commaEveryX0DaysOfTheWeek(S),S)},function(S){var E=S.substring(0,S.indexOf("-")),C=v.expressionParts[3]!="*";return C?v.i18n.commaAndX0ThroughX1(E):v.i18n.commaX0ThroughX1(E)},function(S){var E=null;if(S.indexOf("#")>-1){var C=S.substring(S.indexOf("#")+1),_=S.substring(0,S.indexOf("#"));E=v.i18n.commaOnThe(C,_).trim()+v.i18n.spaceX0OfTheMonth()}else if(S.indexOf("L")>-1)E=v.i18n.commaOnTheLastX0OfTheMonth(S.replace("L",""));else{var N=v.expressionParts[3]!="*";N?v.options.logicalAndDayFields?E=v.i18n.commaOnlyOnX0(S):E=v.i18n.commaAndOnX0():E=v.i18n.commaOnlyOnX0(S)}return E}),w},g.prototype.getMonthDescription=function(){var v=this,b=this.i18n.monthsOfTheYear(),w=this.getSegmentDescription(this.expressionParts[4],"",function(S,E){return E&&v.i18n.monthsOfTheYearInCase?v.i18n.monthsOfTheYearInCase(E)[parseInt(S)-1]:b[parseInt(S)-1]},function(S){return parseInt(S)==1?"":f.StringUtilities.format(v.i18n.commaEveryX0Months(S),S)},function(S){return v.i18n.commaMonthX0ThroughMonthX1()||v.i18n.commaX0ThroughX1()},function(S){return v.i18n.commaOnlyInMonthX0?v.i18n.commaOnlyInMonthX0():v.i18n.commaOnlyInX0()});return w},g.prototype.getDayOfMonthDescription=function(){var v=this,b=null,w=this.expressionParts[3];switch(w){case"L":b=this.i18n.commaOnTheLastDayOfTheMonth();break;case"WL":case"LW":b=this.i18n.commaOnTheLastWeekdayOfTheMonth();break;default:var S=w.match(/(\d{1,2}W)|(W\d{1,2})/);if(S){var E=parseInt(S[0].replace("W","")),C=E==1?this.i18n.firstWeekday():f.StringUtilities.format(this.i18n.weekdayNearestDayX0(),E.toString());b=f.StringUtilities.format(this.i18n.commaOnTheX0OfTheMonth(),C);break}else{var _=w.match(/L-(\d{1,2})/);if(_){var N=_[1];b=f.StringUtilities.format(this.i18n.commaDaysBeforeTheLastDayOfTheMonth(N),N);break}else{if(w=="*"&&this.expressionParts[5]!="*")return"";b=this.getSegmentDescription(w,this.i18n.commaEveryDay(),function(O){return O=="L"?v.i18n.lastDay():v.i18n.dayX0?f.StringUtilities.format(v.i18n.dayX0(),O):O},function(O){return O=="1"?v.i18n.commaEveryDay():v.i18n.commaEveryX0Days(O)},function(O){return v.i18n.commaBetweenDayX0AndX1OfTheMonth(O)},function(O){return v.i18n.commaOnDayX0OfTheMonth(O)})}break}}return b},g.prototype.getYearDescription=function(){var v=this,b=this.getSegmentDescription(this.expressionParts[6],"",function(w){return/^\d+$/.test(w)?new Date(parseInt(w),1).getFullYear().toString():w},function(w){return f.StringUtilities.format(v.i18n.commaEveryX0Years(w),w)},function(w){return v.i18n.commaYearX0ThroughYearX1()||v.i18n.commaX0ThroughX1()},function(w){return v.i18n.commaOnlyInYearX0?v.i18n.commaOnlyInYearX0():v.i18n.commaOnlyInX0()});return b},g.prototype.getSegmentDescription=function(v,b,w,S,E,C){var _=null,N=v.indexOf("/")>-1,O=v.indexOf("-")>-1,A=v.indexOf(",")>-1;if(!v)_="";else if(v==="*")_=b;else if(!N&&!O&&!A)_=f.StringUtilities.format(C(v),w(v));else if(A){for(var T=v.split(","),P="",I=0;I<T.length;I++)if(I>0&&T.length>2&&(P+=",",I<T.length-1&&(P+=" ")),I>0&&T.length>1&&(I==T.length-1||T.length==2)&&(P+="".concat(this.i18n.spaceAnd()," ")),T[I].indexOf("/")>-1||T[I].indexOf("-")>-1){var z=T[I].indexOf("-")>-1&&T[I].indexOf("/")==-1,F=this.getSegmentDescription(T[I],b,w,S,z?this.i18n.commaX0ThroughX1:E,C);z&&(F=F.replace(", ","")),P+=F}else if(!N)P+=w(T[I]);else{var B=this.getSegmentDescription(T[I],b,w,S,E,C);B&&B.startsWith(", ")&&(B=B.substring(2)),P+=B}N?_=P:_=f.StringUtilities.format(C(v),P)}else if(N){var T=v.split("/");if(_=f.StringUtilities.format(S(T[1]),T[1]),T[0].indexOf("-")>-1){var G=this.generateRangeSegmentDescription(T[0],E,w);G.indexOf(", ")!=0&&(_+=", "),_+=G}else if(T[0].indexOf("*")==-1){var L=f.StringUtilities.format(C(T[0]),w(T[0]));L=L.replace(", ",""),_+=f.StringUtilities.format(this.i18n.commaStartingX0(),L)}}else O&&(_=this.generateRangeSegmentDescription(v,E,w));return _},g.prototype.generateRangeSegmentDescription=function(v,b,w){var S="",E=v.split("-"),C=w(E[0],1),_=w(E[1],2),N=b(v);return S+=f.StringUtilities.format(N,C,_),S},g.prototype.formatTime=function(v,b,w){var S=0,E=0,C=parseInt(v)+S,_=parseInt(b)+E;_>=60?(_-=60,C+=1):_<0&&(_+=60,C-=1),C>=24?C=C-24:C<0&&(C=24+C);var N="",O=!1;this.options.use24HourTimeFormat||(O=!!(this.i18n.setPeriodBeforeTime&&this.i18n.setPeriodBeforeTime()),N=O?"".concat(this.getPeriod(C)," "):" ".concat(this.getPeriod(C)),C>12&&(C-=12),C===0&&(C=12));var A="";return w&&(A=":".concat(("00"+w).substring(w.length))),"".concat(O?N:"").concat(("00"+C.toString()).substring(C.toString().length),":").concat(("00"+_.toString()).substring(_.toString().length)).concat(A).concat(O?"":N)},g.prototype.transformVerbosity=function(v,b){if(!b&&(v=v.replace(new RegExp(", ".concat(this.i18n.everyMinute()),"g"),""),v=v.replace(new RegExp(", ".concat(this.i18n.everyHour()),"g"),""),v=v.replace(new RegExp(this.i18n.commaEveryDay(),"g"),""),v=v.replace(/\, ?$/,""),this.i18n.conciseVerbosityReplacements))for(var w=0,S=Object.entries(this.i18n.conciseVerbosityReplacements());w<S.length;w++){var E=S[w],C=E[0],_=E[1];v=v.replace(new RegExp(C,"g"),_)}return v},g.prototype.getPeriod=function(v){return v>=12?this.i18n.pm&&this.i18n.pm()||"PM":this.i18n.am&&this.i18n.am()||"AM"},g.locales={},g})();l.ExpressionDescriptor=d},747(o,l,c){Object.defineProperty(l,"__esModule",{value:!0}),l.enLocaleLoader=void 0;var f=c(486),h=(function(){function d(){}return d.prototype.load=function(g){g.en=new f.en},d})();l.enLocaleLoader=h},486(o,l){Object.defineProperty(l,"__esModule",{value:!0}),l.en=void 0;var c=(function(){function f(){}return f.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},f.prototype.atX0MinutesPastTheHourGt20=function(){return null},f.prototype.commaMonthX0ThroughMonthX1=function(){return null},f.prototype.commaYearX0ThroughYearX1=function(){return null},f.prototype.use24HourTimeFormatByDefault=function(){return!1},f.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return"An error occurred when generating the expression description. Check the cron expression syntax."},f.prototype.everyMinute=function(){return"every minute"},f.prototype.everyHour=function(){return"every hour"},f.prototype.atSpace=function(){return"At "},f.prototype.everyMinuteBetweenX0AndX1=function(){return"Every minute between %s and %s"},f.prototype.at=function(){return"At"},f.prototype.spaceAnd=function(){return" and"},f.prototype.everySecond=function(){return"every second"},f.prototype.everyX0Seconds=function(){return"every %s seconds"},f.prototype.secondsX0ThroughX1PastTheMinute=function(){return"seconds %s through %s past the minute"},f.prototype.atX0SecondsPastTheMinute=function(){return"at %s seconds past the minute"},f.prototype.everyX0Minutes=function(){return"every %s minutes"},f.prototype.minutesX0ThroughX1PastTheHour=function(){return"minutes %s through %s past the hour"},f.prototype.atX0MinutesPastTheHour=function(){return"at %s minutes past the hour"},f.prototype.everyX0Hours=function(){return"every %s hours"},f.prototype.betweenX0AndX1=function(){return"between %s and %s"},f.prototype.atX0=function(){return"at %s"},f.prototype.commaEveryDay=function(){return", every day"},f.prototype.commaEveryX0DaysOfTheWeek=function(){return", every %s days of the week"},f.prototype.commaX0ThroughX1=function(){return", %s through %s"},f.prototype.commaAndX0ThroughX1=function(){return", %s through %s"},f.prototype.first=function(){return"first"},f.prototype.second=function(){return"second"},f.prototype.third=function(){return"third"},f.prototype.fourth=function(){return"fourth"},f.prototype.fifth=function(){return"fifth"},f.prototype.commaOnThe=function(){return", on the "},f.prototype.spaceX0OfTheMonth=function(){return" %s of the month"},f.prototype.lastDay=function(){return"the last day"},f.prototype.commaOnTheLastX0OfTheMonth=function(){return", on the last %s of the month"},f.prototype.commaOnlyOnX0=function(){return", only on %s"},f.prototype.commaAndOnX0=function(){return", and on %s"},f.prototype.commaEveryX0Months=function(){return", every %s months"},f.prototype.commaOnlyInX0=function(){return", only in %s"},f.prototype.commaOnTheLastDayOfTheMonth=function(){return", on the last day of the month"},f.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return", on the last weekday of the month"},f.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return", %s days before the last day of the month"},f.prototype.firstWeekday=function(){return"first weekday"},f.prototype.weekdayNearestDayX0=function(){return"weekday nearest day %s"},f.prototype.commaOnTheX0OfTheMonth=function(){return", on the %s of the month"},f.prototype.commaEveryX0Days=function(){return", every %s days in a month"},f.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return", between day %s and %s of the month"},f.prototype.commaOnDayX0OfTheMonth=function(){return", on day %s of the month"},f.prototype.commaEveryHour=function(){return", every hour"},f.prototype.commaEveryX0Years=function(){return", every %s years"},f.prototype.commaStartingX0=function(){return", starting %s"},f.prototype.daysOfTheWeek=function(){return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},f.prototype.monthsOfTheYear=function(){return["January","February","March","April","May","June","July","August","September","October","November","December"]},f.prototype.atReboot=function(){return"Run once, at startup"},f.prototype.onTheHour=function(){return"on the hour"},f})();l.en=c},515(o,l){Object.defineProperty(l,"__esModule",{value:!0});function c(h,d){if(!h)throw new Error(d)}var f=(function(){function h(){}return h.secondRange=function(d){for(var g=d.split(","),v=0;v<g.length;v++)if(!isNaN(parseInt(g[v],10))){var b=parseInt(g[v],10);c(b>=0&&b<=59,"seconds part must be >= 0 and <= 59")}},h.minuteRange=function(d){for(var g=d.split(","),v=0;v<g.length;v++)if(!isNaN(parseInt(g[v],10))){var b=parseInt(g[v],10);c(b>=0&&b<=59,"minutes part must be >= 0 and <= 59")}},h.hourRange=function(d){for(var g=d.split(","),v=0;v<g.length;v++)if(!isNaN(parseInt(g[v],10))){var b=parseInt(g[v],10);c(b>=0&&b<=23,"hours part must be >= 0 and <= 23")}},h.dayOfMonthRange=function(d){for(var g=d.split(","),v=0;v<g.length;v++)if(!isNaN(parseInt(g[v],10))){var b=parseInt(g[v],10);c(b>=1&&b<=31,"DOM part must be >= 1 and <= 31")}},h.monthRange=function(d,g){for(var v=d.split(","),b=0;b<v.length;b++)if(!isNaN(parseInt(v[b],10))){var w=parseInt(v[b],10);c(w>=1&&w<=12,g?"month part must be >= 0 and <= 11":"month part must be >= 1 and <= 12")}},h.dayOfWeekRange=function(d,g){for(var v=d.split(","),b=0;b<v.length;b++)if(!isNaN(parseInt(v[b],10))){var w=parseInt(v[b],10);c(w>=0&&w<=6,g?"DOW part must be >= 0 and <= 6":"DOW part must be >= 1 and <= 7")}},h})();l.default=f},823(o,l){Object.defineProperty(l,"__esModule",{value:!0}),l.StringUtilities=void 0;var c=(function(){function f(){}return f.format=function(h){for(var d=[],g=1;g<arguments.length;g++)d[g-1]=arguments[g];return h.replace(/%s/g,function(v){return d.shift()})},f.containsAny=function(h,d){return d.some(function(g){return h.indexOf(g)>-1})},f})();l.StringUtilities=c}},r={};function i(o){var l=r[o];if(l!==void 0)return l.exports;var c=r[o]={exports:{}};return n[o](c,c.exports,i),c.exports}var a={};return(()=>{var o=a;Object.defineProperty(o,"__esModule",{value:!0}),o.toString=void 0;var l=i(333),c=i(747);l.ExpressionDescriptor.initialize(new c.enLocaleLoader),o.default=l.ExpressionDescriptor;var f=l.ExpressionDescriptor.toString;o.toString=f})(),a})())})($j)),$j.exports}var z4e=L4e();const $4e=Hi(z4e),B4e=[{label:"Every 1 minute",value:"* * * * *"},{label:"Every 5 minutes",value:"*/5 * * * *"},{label:"Every hour",value:"0 * * * *"},{label:"Daily at midnight",value:"0 0 * * *"},{label:"Weekdays at 9am",value:"0 9 * * 1-5"},{label:"Weekly Monday 9am",value:"0 9 * * 1"}];function F4e({open:e,onOpenChange:t,editing:n}){const{data:r}=$d(),i=M4e(),a=D4e(),[o,l]=y.useState(""),[c,f]=y.useState(""),[h,d]=y.useState(""),[g,v]=y.useState(""),[b,w]=y.useState(""),[S,E]=y.useState(""),[C,_]=y.useState(!0),[N,O]=y.useState(!1),A=n?n.project_id:Number(c)||0,{data:T}=Pp(A),P=y.useMemo(()=>(T??[]).filter(L=>L.type==="roles").map(L=>L.name),[T]);y.useEffect(()=>{e&&n?(l(n.name),f(String(n.project_id)),d(n.task),v(n.cron_expr),w(n.role??""),E(n.system_prompt??""),_(n.skip_if_running)):e&&!n&&I()},[e,n]);function I(){l(""),f(""),d(""),v(""),w(""),E(""),_(!0),O(!1)}async function z(L){L.preventDefault();try{const V={name:o.trim(),task:h.trim(),cron_expr:g.trim(),role:b.trim()||void 0,system_prompt:S.trim()||void 0,skip_if_running:C};n?await a.mutateAsync({id:n.id,...V}):await i.mutateAsync({...V,project_id:Number(c)}),I(),t(!1)}catch{}}const F=y.useMemo(()=>{if(!g.trim())return null;try{return $4e.toString(g.trim())}catch{return null}},[g]),B=i.isPending||a.isPending,G=i.error||a.error;return m.jsx(ws,{open:e,onOpenChange:t,children:m.jsxs(Ss,{className:"max-w-lg",children:[m.jsx(Es,{children:m.jsx(js,{children:n?"Edit Schedule":"Create Schedule"})}),m.jsxs("form",{onSubmit:z,className:"space-y-4",children:[m.jsxs("div",{className:"space-y-2",children:[m.jsxs(mt,{htmlFor:"sched-name",children:["Name ",m.jsx("span",{className:"text-destructive",children:"*"})]}),m.jsx(rt,{id:"sched-name",value:o,onChange:L=>l(L.target.value),placeholder:"e.g. github-issue-checker",required:!0,autoFocus:!0})]}),!n&&m.jsxs("div",{className:"space-y-2",children:[m.jsxs(mt,{htmlFor:"sched-project",children:["Project ",m.jsx("span",{className:"text-destructive",children:"*"})]}),m.jsxs(Ra,{value:c,onValueChange:f,required:!0,children:[m.jsx(La,{id:"sched-project",children:m.jsx(Ia,{placeholder:"Select a project"})}),m.jsx(za,{children:(r??[]).map(L=>m.jsx(In,{value:String(L.id),children:L.display_name},L.id))})]})]}),m.jsxs("div",{className:"space-y-2",children:[m.jsxs(mt,{htmlFor:"sched-task",children:["Task ",m.jsx("span",{className:"text-destructive",children:"*"})]}),m.jsx(ql,{id:"sched-task",value:h,onChange:L=>d(L.target.value),placeholder:"What should the agent do each time this runs?",required:!0,rows:3})]}),m.jsxs("div",{className:"space-y-2",children:[m.jsxs("div",{className:"flex items-center justify-between",children:[m.jsxs(mt,{htmlFor:"sched-cron",children:["Cron Expression ",m.jsx("span",{className:"text-destructive",children:"*"})]}),m.jsxs(dd,{children:[m.jsx(hd,{asChild:!0,children:m.jsxs(je,{variant:"ghost",size:"sm",className:"h-6 text-xs",children:["Presets",m.jsx(Lm,{className:"ml-1 h-3 w-3"})]})}),m.jsx(md,{align:"end",children:B4e.map(L=>m.jsxs(ym,{onClick:()=>v(L.value),children:[m.jsx("span",{className:"mr-3 font-mono text-xs text-muted-foreground",children:L.value}),L.label]},L.value))})]})]}),m.jsx(rt,{id:"sched-cron",value:g,onChange:L=>v(L.target.value),placeholder:"*/5 * * * *",required:!0,className:"font-mono"}),F&&m.jsx("p",{className:"text-xs text-muted-foreground",children:F})]}),m.jsxs("div",{className:"space-y-2",children:[m.jsx(mt,{htmlFor:"sched-role",children:"Role"}),m.jsx(rt,{id:"sched-role",value:b,onChange:L=>w(L.target.value),placeholder:P[0]??"orchestrator",list:"sched-role-list"}),m.jsx("datalist",{id:"sched-role-list",children:P.map(L=>m.jsx("option",{value:L},L))}),b.trim()&&P.length>0&&!P.includes(b.trim())&&m.jsx("p",{className:"text-xs text-destructive",children:"Role not found in installed roles"})]}),m.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[m.jsx("input",{type:"checkbox",checked:C,onChange:L=>_(L.target.checked),className:"rounded border-input"}),m.jsx("span",{className:"text-sm",children:"Skip if already running"}),m.jsx("span",{className:"text-xs text-muted-foreground",children:"— don't start a new session while a previous one is still active"})]}),m.jsxs(Lu,{open:N,onOpenChange:O,children:[m.jsx(zu,{asChild:!0,children:m.jsxs(je,{type:"button",variant:"ghost",size:"sm",className:"flex items-center gap-1 px-0 text-xs text-muted-foreground",children:[m.jsx(Lm,{className:`h-3 w-3 transition-transform ${N?"rotate-180":""}`}),"Advanced Options"]})}),m.jsx($u,{className:"space-y-4 pt-2",children:m.jsxs("div",{className:"space-y-2",children:[m.jsx(mt,{htmlFor:"sched-prompt",children:"System Prompt"}),m.jsx(ql,{id:"sched-prompt",value:S,onChange:L=>E(L.target.value),placeholder:"Additional instructions for the agent...",rows:3})]})})]}),G&&m.jsx("p",{className:"text-sm text-destructive",children:G.message}),m.jsxs("div",{className:"flex justify-end gap-2",children:[m.jsx(je,{type:"button",variant:"outline",onClick:()=>t(!1),children:"Cancel"}),m.jsx(je,{type:"submit",disabled:B||!!b.trim()&&P.length>0&&!P.includes(b.trim()),children:B?"Saving...":n?"Update":"Create"})]})]})]})})}function o$(e){if(!e)return"—";try{const t=new Date(e),n=new Date,r=t.getTime()-n.getTime(),i=Math.abs(r);if(i<6e4)return r>0?"in < 1m":"< 1m ago";if(i<36e5){const a=Math.round(i/6e4);return r>0?`in ${a}m`:`${a}m ago`}if(i<864e5){const a=Math.round(i/36e5);return r>0?`in ${a}h`:`${a}h ago`}return t.toLocaleDateString()}catch{return"—"}}function U4e({schedule:e}){return e.enabled?e.last_error?m.jsx(gF,{children:m.jsxs(Lae,{children:[m.jsx(zae,{children:m.jsx(zt,{variant:"destructive",children:"Error"})}),m.jsx($ae,{className:"max-w-xs",children:m.jsx("p",{className:"text-xs",children:e.last_error})})]})}):m.jsx(zt,{className:"bg-emerald-600 hover:bg-emerald-600",children:"Active"}):m.jsx(zt,{variant:"secondary",children:"Disabled"})}function H4e(){const{data:e,isLoading:t,error:n}=P4e(),[r,i]=y.useState(!1),[a,o]=y.useState(null),l=R4e(),c=I4e();if(t)return m.jsxs("div",{className:"space-y-6",children:[m.jsx(Rn,{className:"h-8 w-48"}),m.jsx(Rn,{className:"h-64 rounded-lg"})]});if(n)return m.jsxs("div",{className:"flex items-center gap-2 text-destructive",children:[m.jsx(po,{className:"h-4 w-4"}),m.jsxs("span",{children:["Error: ",n.message]})]});const f=e??[];return m.jsxs("div",{className:"space-y-6",children:[m.jsxs("div",{className:"flex items-center justify-between",children:[m.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:"Scheduled Tasks"}),m.jsxs(je,{onClick:()=>{o(null),i(!0)},children:[m.jsx(zm,{className:"mr-2 h-4 w-4"}),"Create Schedule"]})]}),f.length===0?m.jsxs("div",{className:"flex flex-col items-center justify-center rounded-lg border border-dashed p-12 text-center",children:[m.jsx("p",{className:"text-muted-foreground",children:"No scheduled tasks yet."}),m.jsxs(je,{variant:"outline",className:"mt-4",onClick:()=>{o(null),i(!0)},children:[m.jsx(zm,{className:"mr-2 h-4 w-4"}),"Create your first schedule"]})]}):m.jsx("div",{className:"rounded-lg border",children:m.jsxs(fs,{children:[m.jsx(ds,{children:m.jsxs(sr,{children:[m.jsx(ot,{children:"Name"}),m.jsx(ot,{children:"Project"}),m.jsx(ot,{children:"Cron"}),m.jsx(ot,{children:"Next Run"}),m.jsx(ot,{children:"Last Run"}),m.jsx(ot,{children:"Status"}),m.jsx(ot,{className:"w-[120px]",children:"Actions"})]})}),m.jsx(hs,{children:f.map(h=>m.jsxs(sr,{children:[m.jsx(it,{className:"font-medium",children:h.name}),m.jsx(it,{className:"text-muted-foreground",children:h.project_name}),m.jsx(it,{children:m.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5 text-xs",children:h.cron_expr})}),m.jsx(it,{className:"text-sm text-muted-foreground",children:o$(h.next_run_at)}),m.jsx(it,{className:"text-sm text-muted-foreground",children:o$(h.last_run_at)}),m.jsx(it,{children:m.jsx(U4e,{schedule:h})}),m.jsx(it,{children:m.jsxs("div",{className:"flex items-center gap-1",children:[m.jsx(je,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>{o(h),i(!0)},children:m.jsx(Op,{className:"h-3.5 w-3.5"})}),m.jsx(je,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>c.mutate({id:h.id,enable:!h.enabled}),children:h.enabled?m.jsx(zoe,{className:"h-3.5 w-3.5"}):m.jsx(dN,{className:"h-3.5 w-3.5"})}),m.jsx(je,{variant:"ghost",size:"icon",className:"h-8 w-8 text-destructive hover:text-destructive",onClick:()=>{confirm(`Delete schedule "${h.name}"?`)&&l.mutate(h.id)},children:m.jsx(Eo,{className:"h-3.5 w-3.5"})})]})})]},h.id))})]})}),m.jsx(F4e,{open:r,onOpenChange:i,editing:a})]})}function Bj(e){const t=e.orchestrator??{},n=e.policy??{},r=e.session??{},i=e.trace??{};return{runtime:Dr(e.runtime),isolation:Dr(e.isolation),memory:Dr(e.memory),orchestrator_role:Dr(t.role),orchestrator_permission_mode:Dr(t.permission_mode),policy_max_depth:Dr(n.max_depth),policy_agent_timeout:Dr(n.agent_timeout),policy_max_delegate_retries:Dr(n.max_delegate_retries),policy_cache_delegations:Dr(n.cache_delegations),policy_cache_max_entries:Dr(n.cache_max_entries),policy_cache_ttl_seconds:Dr(n.cache_ttl_seconds),policy_max_num_delegations:Dr(n.max_num_delegations),session_merge_strategy:Dr(r.merge_strategy),session_pull_before_session:Dr(r.pull_before_session),session_pr_command:Dr(r.pr_command),trace_enabled:Dr(i.enabled)}}function Dr(e){return e==null?"":String(e)}function q4e(e){const t={};e.runtime&&(t.runtime=e.runtime),e.isolation&&(t.isolation=e.isolation),e.memory&&(t.memory=e.memory);const n={};e.orchestrator_role&&(n.role=e.orchestrator_role),e.orchestrator_permission_mode&&(n.permission_mode=e.orchestrator_permission_mode),Object.keys(n).length>0&&(t.orchestrator=n);const r={};e.policy_max_depth&&(r.max_depth=Number(e.policy_max_depth)),e.policy_agent_timeout&&(r.agent_timeout=Number(e.policy_agent_timeout)),e.policy_max_delegate_retries&&(r.max_delegate_retries=Number(e.policy_max_delegate_retries)),e.policy_cache_delegations&&(r.cache_delegations=e.policy_cache_delegations==="true"),e.policy_cache_max_entries&&(r.cache_max_entries=Number(e.policy_cache_max_entries)),e.policy_cache_ttl_seconds&&(r.cache_ttl_seconds=Number(e.policy_cache_ttl_seconds)),e.policy_max_num_delegations&&(r.max_num_delegations=Number(e.policy_max_num_delegations)),Object.keys(r).length>0&&(t.policy=r);const i={};e.session_merge_strategy&&(i.merge_strategy=e.session_merge_strategy),e.session_pull_before_session&&(i.pull_before_session=e.session_pull_before_session),e.session_pr_command&&(i.pr_command=e.session_pr_command),Object.keys(i).length>0&&(t.session=i);const a={};return e.trace_enabled&&(a.enabled=e.trace_enabled==="true"),Object.keys(a).length>0&&(t.trace=a),t}const V4e=["none","worktree"],K4e=["default","plan","bypassPermissions"],Y4e=["auto","local","pr"],X4e=["prompt","always","never"],s$=["true","false"],Fj="__empty__";function l$({values:e,placeholders:t,onSave:n,saving:r}){const[i,a]=y.useState(Bj(e)),{data:o}=Ju("agents"),{data:l}=Ju("roles"),{data:c}=Ju("memories"),f=t?Bj(t):void 0,h=JSON.stringify(e);y.useEffect(()=>{a(Bj(e))},[h]);const d=O=>A=>a(T=>({...T,[O]:A})),g=()=>{n(q4e(i))},v=(o??[]).map(O=>O.name),b=(l??[]).map(O=>O.name),w=new Set((c??[]).map(O=>O.name));w.add("none");const S=[...w].sort(),E=i.runtime&&v.length>0&&!v.includes(i.runtime)?"Runtime not found in installed agents":"",C=i.orchestrator_role&&b.length>0&&!b.includes(i.orchestrator_role)?"Role not found in installed roles":"",_=i.memory&&!S.includes(i.memory)?"Memory not found in installed providers":"",N=!!E||!!C||!!_;return m.jsxs("div",{className:"flex flex-col gap-6",children:[m.jsxs("section",{className:"flex flex-col gap-3",children:[m.jsx("h3",{className:"text-sm font-semibold",children:"General"}),m.jsx(wl,{}),m.jsxs("div",{className:"grid gap-4 sm:grid-cols-3",children:[m.jsxs(Rr,{label:"Runtime",children:[m.jsx(rt,{list:"cfg-dl-runtime",value:i.runtime,onChange:O=>d("runtime")(O.target.value),placeholder:(f==null?void 0:f.runtime)||"strawpot-claude-code",className:"h-8 text-xs"}),v.length>0&&m.jsx("datalist",{id:"cfg-dl-runtime",children:v.map(O=>m.jsx("option",{value:O},O))}),E&&m.jsx("p",{className:"text-xs text-destructive",children:E})]}),m.jsx(Rr,{label:"Isolation",children:m.jsx(Pf,{value:i.isolation,onChange:d("isolation"),options:V4e,placeholder:(f==null?void 0:f.isolation)||"none",allowEmpty:!0})}),m.jsxs(Rr,{label:"Memory",children:[m.jsx(rt,{list:"cfg-dl-memory",value:i.memory,onChange:O=>d("memory")(O.target.value),placeholder:(f==null?void 0:f.memory)||"dial",className:"h-8 text-xs"}),m.jsx("datalist",{id:"cfg-dl-memory",children:S.map(O=>m.jsx("option",{value:O},O))}),_&&m.jsx("p",{className:"text-xs text-destructive",children:_})]})]})]}),m.jsxs("section",{className:"flex flex-col gap-3",children:[m.jsx("h3",{className:"text-sm font-semibold",children:"Orchestrator"}),m.jsx(wl,{}),m.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[m.jsxs(Rr,{label:"Role",children:[m.jsx(rt,{list:"cfg-dl-role",value:i.orchestrator_role,onChange:O=>d("orchestrator_role")(O.target.value),placeholder:(f==null?void 0:f.orchestrator_role)||"ai-ceo",className:"h-8 text-xs"}),b.length>0&&m.jsx("datalist",{id:"cfg-dl-role",children:b.map(O=>m.jsx("option",{value:O},O))}),C&&m.jsx("p",{className:"text-xs text-destructive",children:C})]}),m.jsx(Rr,{label:"Permission Mode",children:m.jsx(Pf,{value:i.orchestrator_permission_mode,onChange:d("orchestrator_permission_mode"),options:K4e,placeholder:(f==null?void 0:f.orchestrator_permission_mode)||"default",allowEmpty:!0})})]})]}),m.jsxs("section",{className:"flex flex-col gap-3",children:[m.jsx("h3",{className:"text-sm font-semibold",children:"Policy"}),m.jsx(wl,{}),m.jsxs("div",{className:"grid gap-4 sm:grid-cols-3",children:[m.jsx(Rr,{label:"Max Depth",children:m.jsx(rt,{type:"number",value:i.policy_max_depth,onChange:O=>d("policy_max_depth")(O.target.value),placeholder:(f==null?void 0:f.policy_max_depth)||"3",className:"h-8 text-xs"})}),m.jsx(Rr,{label:"Agent Timeout (seconds)",children:m.jsx(rt,{type:"number",value:i.policy_agent_timeout,onChange:O=>d("policy_agent_timeout")(O.target.value),placeholder:(f==null?void 0:f.policy_agent_timeout)||"none",className:"h-8 text-xs"})}),m.jsx(Rr,{label:"Max Delegate Retries",children:m.jsx(rt,{type:"number",value:i.policy_max_delegate_retries,onChange:O=>d("policy_max_delegate_retries")(O.target.value),placeholder:(f==null?void 0:f.policy_max_delegate_retries)||"0",className:"h-8 text-xs"})}),m.jsx(Rr,{label:"Cache Delegations",children:m.jsx(Pf,{value:i.policy_cache_delegations,onChange:d("policy_cache_delegations"),options:s$,placeholder:(f==null?void 0:f.policy_cache_delegations)==="false"?"false":"true",allowEmpty:!0})}),m.jsx(Rr,{label:"Cache Max Entries",children:m.jsx(rt,{value:i.policy_cache_max_entries,onChange:O=>d("policy_cache_max_entries")(O.target.value),placeholder:(f==null?void 0:f.policy_cache_max_entries)||"0 (unlimited)",className:"h-8 text-xs"})}),m.jsx(Rr,{label:"Cache TTL (seconds)",children:m.jsx(rt,{value:i.policy_cache_ttl_seconds,onChange:O=>d("policy_cache_ttl_seconds")(O.target.value),placeholder:(f==null?void 0:f.policy_cache_ttl_seconds)||"0 (unlimited)",className:"h-8 text-xs"})}),m.jsx(Rr,{label:"Max Delegations",children:m.jsx(rt,{type:"number",min:"0",value:i.policy_max_num_delegations,onChange:O=>d("policy_max_num_delegations")(O.target.value),placeholder:(f==null?void 0:f.policy_max_num_delegations)||"0 (unlimited)",className:"h-8 text-xs"})})]})]}),m.jsxs("section",{className:"flex flex-col gap-3",children:[m.jsx("h3",{className:"text-sm font-semibold",children:"Session"}),m.jsx(wl,{}),m.jsxs("div",{className:"grid gap-4 sm:grid-cols-3",children:[m.jsx(Rr,{label:"Merge Strategy",children:m.jsx(Pf,{value:i.session_merge_strategy,onChange:d("session_merge_strategy"),options:Y4e,placeholder:(f==null?void 0:f.session_merge_strategy)||"auto",allowEmpty:!0})}),m.jsx(Rr,{label:"Pull Before Session",children:m.jsx(Pf,{value:i.session_pull_before_session,onChange:d("session_pull_before_session"),options:X4e,placeholder:(f==null?void 0:f.session_pull_before_session)||"prompt",allowEmpty:!0})}),m.jsx(Rr,{label:"PR Command",className:"sm:col-span-3",children:m.jsx(rt,{value:i.session_pr_command,onChange:O=>d("session_pr_command")(O.target.value),placeholder:(f==null?void 0:f.session_pr_command)||"gh pr create --base {base_branch} --head {session_branch}",className:"h-8 text-xs font-mono"})})]})]}),m.jsxs("section",{className:"flex flex-col gap-3",children:[m.jsx("h3",{className:"text-sm font-semibold",children:"Trace"}),m.jsx(wl,{}),m.jsx("div",{className:"grid gap-4 sm:grid-cols-3",children:m.jsx(Rr,{label:"Enabled",children:m.jsx(Pf,{value:i.trace_enabled,onChange:d("trace_enabled"),options:s$,placeholder:(f==null?void 0:f.trace_enabled)||"true",allowEmpty:!0})})})]}),m.jsxs(je,{size:"sm",onClick:g,disabled:r||N,className:"self-start",children:[m.jsx(jF,{className:"mr-2 h-3.5 w-3.5"}),r?"Saving...":"Save Configuration"]})]})}function Rr({label:e,children:t,className:n}){return m.jsxs("div",{className:`flex flex-col gap-1 ${n??""}`,children:[m.jsx(mt,{className:"text-xs",children:e}),t]})}function Pf({value:e,onChange:t,options:n,placeholder:r,allowEmpty:i}){return m.jsxs(Ra,{value:e||(i?Fj:""),onValueChange:a=>t(a===Fj?"":a),children:[m.jsx(La,{className:"h-8 text-xs",children:m.jsx(Ia,{placeholder:r})}),m.jsxs(za,{children:[i&&m.jsx(In,{value:Fj,className:"text-muted-foreground",children:r?`Default (${r})`:"Default"}),n.map(a=>m.jsx(In,{value:a,children:a},a))]})]})}function G4e(){var g,v;const[e,t]=y.useState("global"),[n,r]=y.useState(null),i=gt(),a=ZF(),o=$d(),l=mN(n??0,{enabled:n!=null}),c=Xle(),f=JF(),h=b=>{c.mutate(b,{onSuccess:()=>Ut.success("Global configuration saved"),onError:()=>Ut.error("Failed to save global configuration")})},d=b=>{n!=null&&f.mutate({projectId:n,data:b},{onSuccess:()=>Ut.success("Project configuration saved"),onError:()=>Ut.error("Failed to save project configuration")})};return y.useEffect(()=>{e==="project"&&n!=null&&i.invalidateQueries({queryKey:Ue.projects.config(n)})},[e,n,i]),m.jsxs("div",{className:"space-y-6",children:[m.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:"Settings"}),m.jsxs(Mp,{value:e,onValueChange:t,children:[m.jsxs(Dp,{children:[m.jsx(ar,{value:"global",children:"Global"}),m.jsx(ar,{value:"project",children:"Project"})]}),m.jsx(or,{value:"global",className:"mt-4",children:a.isLoading?m.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."}):m.jsx(l$,{values:((g=a.data)==null?void 0:g.values)??{},placeholders:(v=a.data)==null?void 0:v.defaults,onSave:h,saving:c.isPending})}),m.jsx(or,{value:"project",className:"mt-4",children:m.jsxs("div",{className:"flex flex-col gap-4",children:[m.jsxs("div",{className:"flex flex-col gap-1 max-w-xs",children:[m.jsx(mt,{className:"text-xs",children:"Project"}),m.jsxs(Ra,{value:n!=null?String(n):"",onValueChange:b=>r(Number(b)),children:[m.jsx(La,{className:"h-8 text-xs",children:m.jsx(Ia,{placeholder:"Select a project"})}),m.jsx(za,{children:(o.data??[]).map(b=>m.jsx(In,{value:String(b.id),children:b.display_name},b.id))})]})]}),n!=null&&l.isLoading&&m.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."}),n!=null&&l.data&&m.jsx(l$,{values:l.data.project,placeholders:l.data.merged_nested,onSave:d,saving:f.isPending},n)]})})]})]})}function W4e(){return m.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 py-20",children:[m.jsx("h1",{className:"text-2xl font-bold",children:"Page not found"}),m.jsx(je,{variant:"outline",asChild:!0,children:m.jsxs(Br,{to:"/",children:[m.jsx(joe,{className:"mr-2 h-4 w-4"}),"Back to Dashboard"]})})]})}const Q4e=3,Z4e=1e4,J4e=2e3;function e5e(){const e=gt(),t=y.useRef(null),n=y.useRef(void 0),r=y.useRef(1e3),i=y.useRef(0),a=y.useRef({}),o=y.useRef(!0);y.useEffect(()=>{function l(f){const h=Date.now();if(h-i.current<J4e)return!1;const d=(a.current[f]??[]).filter(g=>h-g<Z4e);return d.length>=Q4e?!1:(d.push(h),a.current[f]=d,!0)}function c(){const f=new EventSource("/api/events");t.current=f,f.onopen=()=>{r.current=1e3,i.current=Date.now(),o.current||(e.invalidateQueries({queryKey:["sessions"]}),e.invalidateQueries({queryKey:["conversations"]})),o.current=!1};const h=d=>{try{const g=JSON.parse(d.data),v=(g.run_id??"unknown").slice(0,12);l(d.type)&&(d.type==="session_started"?Ut.info(`Session ${v} started`):d.type==="session_completed"?Ut.success(`Session ${v} completed`):d.type==="session_failed"?Ut.error(`Session ${v} failed`):d.type==="session_stopped"&&Ut.warning(`Session ${v} stopped`)),e.invalidateQueries({queryKey:["sessions"]}),g.project_id&&(e.invalidateQueries({queryKey:Ue.projects.sessions(g.project_id)}),e.invalidateQueries({queryKey:Ue.conversations.all(g.project_id)})),e.invalidateQueries({queryKey:["conversations","detail"]})}catch{}};f.addEventListener("session_started",h),f.addEventListener("session_completed",h),f.addEventListener("session_failed",h),f.addEventListener("session_stopped",h),f.onerror=()=>{f.close(),t.current=null,n.current=setTimeout(()=>{r.current=Math.min(r.current*2,15e3),c()},r.current)}}return c(),()=>{var f;(f=t.current)==null||f.close(),t.current=null,n.current&&clearTimeout(n.current)}},[e])}function t5e(){return e5e(),m.jsx(kQ,{children:m.jsxs(hi,{element:m.jsx(Mle,{}),children:[m.jsx(hi,{index:!0,element:m.jsx(jQ,{to:"/imu",replace:!0})}),m.jsx(hi,{path:"dashboard",element:m.jsx(Hle,{})}),m.jsx(hi,{path:"projects",element:m.jsx(Jle,{})}),m.jsx(hi,{path:"projects/:projectId",element:m.jsx(Gke,{})}),m.jsx(hi,{path:"projects/:projectId/sessions/:runId",element:m.jsx(e4e,{})}),m.jsx(hi,{path:"projects/:projectId/conversations/:conversationId",element:m.jsx(x4e,{})}),m.jsx(hi,{path:"imu",element:m.jsx(i$,{})}),m.jsx(hi,{path:"imu/:conversationId",element:m.jsx(i$,{})}),m.jsx(hi,{path:"schedules",element:m.jsx(H4e,{})}),m.jsx(hi,{path:"resources/:resourceType",element:m.jsx(O4e,{})}),m.jsx(hi,{path:"settings",element:m.jsx(G4e,{})}),m.jsx(hi,{path:"*",element:m.jsx(W4e,{})})]})})}kW.createRoot(document.getElementById("root")).render(m.jsx(y.StrictMode,{children:m.jsx(qZ,{attribute:"class",defaultTheme:"system",enableSystem:!0,children:m.jsx(RZ,{client:Pse,children:m.jsxs(gF,{children:[m.jsx(ZQ,{children:m.jsx(t5e,{})}),m.jsx(Tse,{position:"top-right",offset:{top:"8px",right:"60px"}})]})})})}));
