@mcpjam/inspector 0.9.1 → 0.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,357 @@
1
+ var VD=Object.defineProperty;var UD=(e,t,n)=>t in e?VD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ua=(e,t,n)=>UD(e,typeof t!="symbol"?t+"":t,n);function HD(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const o=Object.getOwnPropertyDescriptor(r,s);o&&Object.defineProperty(e,s,o.get?o:{enumerable:!0,get:()=>r[s]})}}}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 s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();function Xf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Xp={exports:{}},cc={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var RS;function FD(){if(RS)return cc;RS=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,s,o){var l=null;if(o!==void 0&&(l=""+o),s.key!==void 0&&(l=""+s.key),"key"in s){o={};for(var u in s)u!=="key"&&(o[u]=s[u])}else o=s;return s=o.ref,{$$typeof:e,type:r,key:l,ref:s!==void 0?s:null,props:o}}return cc.Fragment=t,cc.jsx=n,cc.jsxs=n,cc}var MS;function $D(){return MS||(MS=1,Xp.exports=FD()),Xp.exports}var m=$D(),Kp={exports:{}},Ge={};/**
10
+ * @license React
11
+ * react.production.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var OS;function qD(){if(OS)return Ge;OS=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),p=Symbol.iterator;function x(k){return k===null||typeof k!="object"?null:(k=p&&k[p]||k["@@iterator"],typeof k=="function"?k:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,C={};function E(k,G,le){this.props=k,this.context=G,this.refs=C,this.updater=le||v}E.prototype.isReactComponent={},E.prototype.setState=function(k,G){if(typeof k!="object"&&typeof k!="function"&&k!=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,k,G,"setState")},E.prototype.forceUpdate=function(k){this.updater.enqueueForceUpdate(this,k,"forceUpdate")};function T(){}T.prototype=E.prototype;function R(k,G,le){this.props=k,this.context=G,this.refs=C,this.updater=le||v}var O=R.prototype=new T;O.constructor=R,S(O,E.prototype),O.isPureReactComponent=!0;var A=Array.isArray,M={H:null,A:null,T:null,S:null,V:null},N=Object.prototype.hasOwnProperty;function z(k,G,le,j,Q,ee){return le=ee.ref,{$$typeof:e,type:k,key:G,ref:le!==void 0?le:null,props:ee}}function P(k,G){return z(k.type,G,void 0,void 0,void 0,k.props)}function B(k){return typeof k=="object"&&k!==null&&k.$$typeof===e}function D(k){var G={"=":"=0",":":"=2"};return"$"+k.replace(/[=:]/g,function(le){return G[le]})}var H=/\/+/g;function $(k,G){return typeof k=="object"&&k!==null&&k.key!=null?D(""+k.key):G.toString(36)}function X(){}function Y(k){switch(k.status){case"fulfilled":return k.value;case"rejected":throw k.reason;default:switch(typeof k.status=="string"?k.then(X,X):(k.status="pending",k.then(function(G){k.status==="pending"&&(k.status="fulfilled",k.value=G)},function(G){k.status==="pending"&&(k.status="rejected",k.reason=G)})),k.status){case"fulfilled":return k.value;case"rejected":throw k.reason}}throw k}function te(k,G,le,j,Q){var ee=typeof k;(ee==="undefined"||ee==="boolean")&&(k=null);var W=!1;if(k===null)W=!0;else switch(ee){case"bigint":case"string":case"number":W=!0;break;case"object":switch(k.$$typeof){case e:case t:W=!0;break;case g:return W=k._init,te(W(k._payload),G,le,j,Q)}}if(W)return Q=Q(k),W=j===""?"."+$(k,0):j,A(Q)?(le="",W!=null&&(le=W.replace(H,"$&/")+"/"),te(Q,G,le,"",function(ce){return ce})):Q!=null&&(B(Q)&&(Q=P(Q,le+(Q.key==null||k&&k.key===Q.key?"":(""+Q.key).replace(H,"$&/")+"/")+W)),G.push(Q)),1;W=0;var K=j===""?".":j+":";if(A(k))for(var oe=0;oe<k.length;oe++)j=k[oe],ee=K+$(j,oe),W+=te(j,G,le,ee,Q);else if(oe=x(k),typeof oe=="function")for(k=oe.call(k),oe=0;!(j=k.next()).done;)j=j.value,ee=K+$(j,oe++),W+=te(j,G,le,ee,Q);else if(ee==="object"){if(typeof k.then=="function")return te(Y(k),G,le,j,Q);throw G=String(k),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(k).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return W}function I(k,G,le){if(k==null)return k;var j=[],Q=0;return te(k,j,"","",function(ee){return G.call(le,ee,Q++)}),j}function F(k){if(k._status===-1){var G=k._result;G=G(),G.then(function(le){(k._status===0||k._status===-1)&&(k._status=1,k._result=le)},function(le){(k._status===0||k._status===-1)&&(k._status=2,k._result=le)}),k._status===-1&&(k._status=0,k._result=G)}if(k._status===1)return k._result.default;throw k._result}var V=typeof reportError=="function"?reportError:function(k){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof k=="object"&&k!==null&&typeof k.message=="string"?String(k.message):String(k),error:k});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",k);return}console.error(k)};function Z(){}return Ge.Children={map:I,forEach:function(k,G,le){I(k,function(){G.apply(this,arguments)},le)},count:function(k){var G=0;return I(k,function(){G++}),G},toArray:function(k){return I(k,function(G){return G})||[]},only:function(k){if(!B(k))throw Error("React.Children.only expected to receive a single React element child.");return k}},Ge.Component=E,Ge.Fragment=n,Ge.Profiler=s,Ge.PureComponent=R,Ge.StrictMode=r,Ge.Suspense=d,Ge.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,Ge.__COMPILER_RUNTIME={__proto__:null,c:function(k){return M.H.useMemoCache(k)}},Ge.cache=function(k){return function(){return k.apply(null,arguments)}},Ge.cloneElement=function(k,G,le){if(k==null)throw Error("The argument must be a React element, but you passed "+k+".");var j=S({},k.props),Q=k.key,ee=void 0;if(G!=null)for(W in G.ref!==void 0&&(ee=void 0),G.key!==void 0&&(Q=""+G.key),G)!N.call(G,W)||W==="key"||W==="__self"||W==="__source"||W==="ref"&&G.ref===void 0||(j[W]=G[W]);var W=arguments.length-2;if(W===1)j.children=le;else if(1<W){for(var K=Array(W),oe=0;oe<W;oe++)K[oe]=arguments[oe+2];j.children=K}return z(k.type,Q,void 0,void 0,ee,j)},Ge.createContext=function(k){return k={$$typeof:l,_currentValue:k,_currentValue2:k,_threadCount:0,Provider:null,Consumer:null},k.Provider=k,k.Consumer={$$typeof:o,_context:k},k},Ge.createElement=function(k,G,le){var j,Q={},ee=null;if(G!=null)for(j in G.key!==void 0&&(ee=""+G.key),G)N.call(G,j)&&j!=="key"&&j!=="__self"&&j!=="__source"&&(Q[j]=G[j]);var W=arguments.length-2;if(W===1)Q.children=le;else if(1<W){for(var K=Array(W),oe=0;oe<W;oe++)K[oe]=arguments[oe+2];Q.children=K}if(k&&k.defaultProps)for(j in W=k.defaultProps,W)Q[j]===void 0&&(Q[j]=W[j]);return z(k,ee,void 0,void 0,null,Q)},Ge.createRef=function(){return{current:null}},Ge.forwardRef=function(k){return{$$typeof:u,render:k}},Ge.isValidElement=B,Ge.lazy=function(k){return{$$typeof:g,_payload:{_status:-1,_result:k},_init:F}},Ge.memo=function(k,G){return{$$typeof:h,type:k,compare:G===void 0?null:G}},Ge.startTransition=function(k){var G=M.T,le={};M.T=le;try{var j=k(),Q=M.S;Q!==null&&Q(le,j),typeof j=="object"&&j!==null&&typeof j.then=="function"&&j.then(Z,V)}catch(ee){V(ee)}finally{M.T=G}},Ge.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},Ge.use=function(k){return M.H.use(k)},Ge.useActionState=function(k,G,le){return M.H.useActionState(k,G,le)},Ge.useCallback=function(k,G){return M.H.useCallback(k,G)},Ge.useContext=function(k){return M.H.useContext(k)},Ge.useDebugValue=function(){},Ge.useDeferredValue=function(k,G){return M.H.useDeferredValue(k,G)},Ge.useEffect=function(k,G,le){var j=M.H;if(typeof le=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return j.useEffect(k,G)},Ge.useId=function(){return M.H.useId()},Ge.useImperativeHandle=function(k,G,le){return M.H.useImperativeHandle(k,G,le)},Ge.useInsertionEffect=function(k,G){return M.H.useInsertionEffect(k,G)},Ge.useLayoutEffect=function(k,G){return M.H.useLayoutEffect(k,G)},Ge.useMemo=function(k,G){return M.H.useMemo(k,G)},Ge.useOptimistic=function(k,G){return M.H.useOptimistic(k,G)},Ge.useReducer=function(k,G,le){return M.H.useReducer(k,G,le)},Ge.useRef=function(k){return M.H.useRef(k)},Ge.useState=function(k){return M.H.useState(k)},Ge.useSyncExternalStore=function(k,G,le){return M.H.useSyncExternalStore(k,G,le)},Ge.useTransition=function(){return M.H.useTransition()},Ge.version="19.1.0",Ge}var DS;function Bx(){return DS||(DS=1,Kp.exports=qD()),Kp.exports}var w=Bx();const ye=Xf(w),Vx=HD({__proto__:null,default:ye},[w]);var Wp={exports:{}},uc={},Qp={exports:{}},Jp={};/**
18
+ * @license React
19
+ * scheduler.production.js
20
+ *
21
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */var PS;function GD(){return PS||(PS=1,function(e){function t(I,F){var V=I.length;I.push(F);e:for(;0<V;){var Z=V-1>>>1,k=I[Z];if(0<s(k,F))I[Z]=F,I[V]=k,V=Z;else break e}}function n(I){return I.length===0?null:I[0]}function r(I){if(I.length===0)return null;var F=I[0],V=I.pop();if(V!==F){I[0]=V;e:for(var Z=0,k=I.length,G=k>>>1;Z<G;){var le=2*(Z+1)-1,j=I[le],Q=le+1,ee=I[Q];if(0>s(j,V))Q<k&&0>s(ee,j)?(I[Z]=ee,I[Q]=V,Z=Q):(I[Z]=j,I[le]=V,Z=le);else if(Q<k&&0>s(ee,V))I[Z]=ee,I[Q]=V,Z=Q;else break e}}return F}function s(I,F){var V=I.sortIndex-F.sortIndex;return V!==0?V:I.id-F.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var l=Date,u=l.now();e.unstable_now=function(){return l.now()-u}}var d=[],h=[],g=1,p=null,x=3,v=!1,S=!1,C=!1,E=!1,T=typeof setTimeout=="function"?setTimeout:null,R=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;function A(I){for(var F=n(h);F!==null;){if(F.callback===null)r(h);else if(F.startTime<=I)r(h),F.sortIndex=F.expirationTime,t(d,F);else break;F=n(h)}}function M(I){if(C=!1,A(I),!S)if(n(d)!==null)S=!0,N||(N=!0,$());else{var F=n(h);F!==null&&te(M,F.startTime-I)}}var N=!1,z=-1,P=5,B=-1;function D(){return E?!0:!(e.unstable_now()-B<P)}function H(){if(E=!1,N){var I=e.unstable_now();B=I;var F=!0;try{e:{S=!1,C&&(C=!1,R(z),z=-1),v=!0;var V=x;try{t:{for(A(I),p=n(d);p!==null&&!(p.expirationTime>I&&D());){var Z=p.callback;if(typeof Z=="function"){p.callback=null,x=p.priorityLevel;var k=Z(p.expirationTime<=I);if(I=e.unstable_now(),typeof k=="function"){p.callback=k,A(I),F=!0;break t}p===n(d)&&r(d),A(I)}else r(d);p=n(d)}if(p!==null)F=!0;else{var G=n(h);G!==null&&te(M,G.startTime-I),F=!1}}break e}finally{p=null,x=V,v=!1}F=void 0}}finally{F?$():N=!1}}}var $;if(typeof O=="function")$=function(){O(H)};else if(typeof MessageChannel<"u"){var X=new MessageChannel,Y=X.port2;X.port1.onmessage=H,$=function(){Y.postMessage(null)}}else $=function(){T(H,0)};function te(I,F){z=T(function(){I(e.unstable_now())},F)}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(I){I.callback=null},e.unstable_forceFrameRate=function(I){0>I||125<I?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<I?Math.floor(1e3/I):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_next=function(I){switch(x){case 1:case 2:case 3:var F=3;break;default:F=x}var V=x;x=F;try{return I()}finally{x=V}},e.unstable_requestPaint=function(){E=!0},e.unstable_runWithPriority=function(I,F){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var V=x;x=I;try{return F()}finally{x=V}},e.unstable_scheduleCallback=function(I,F,V){var Z=e.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?Z+V:Z):V=Z,I){case 1:var k=-1;break;case 2:k=250;break;case 5:k=1073741823;break;case 4:k=1e4;break;default:k=5e3}return k=V+k,I={id:g++,callback:F,priorityLevel:I,startTime:V,expirationTime:k,sortIndex:-1},V>Z?(I.sortIndex=V,t(h,I),n(d)===null&&I===n(h)&&(C?(R(z),z=-1):C=!0,te(M,V-Z))):(I.sortIndex=k,t(d,I),S||v||(S=!0,N||(N=!0,$()))),I},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(I){var F=x;return function(){var V=x;x=F;try{return I.apply(this,arguments)}finally{x=V}}}}(Jp)),Jp}var zS;function YD(){return zS||(zS=1,Qp.exports=GD()),Qp.exports}var eg={exports:{}},Tn={};/**
26
+ * @license React
27
+ * react-dom.production.js
28
+ *
29
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var LS;function ZD(){if(LS)return Tn;LS=1;var e=Bx();function t(d){var h="https://react.dev/errors/"+d;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)h+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+d+"; visit "+h+" 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},s=Symbol.for("react.portal");function o(d,h,g){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:p==null?null:""+p,children:d,containerInfo:h,implementation:g}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(d,h){if(d==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return Tn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Tn.createPortal=function(d,h){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return o(d,h,null,g)},Tn.flushSync=function(d){var h=l.T,g=r.p;try{if(l.T=null,r.p=2,d)return d()}finally{l.T=h,r.p=g,r.d.f()}},Tn.preconnect=function(d,h){typeof d=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,r.d.C(d,h))},Tn.prefetchDNS=function(d){typeof d=="string"&&r.d.D(d)},Tn.preinit=function(d,h){if(typeof d=="string"&&h&&typeof h.as=="string"){var g=h.as,p=u(g,h.crossOrigin),x=typeof h.integrity=="string"?h.integrity:void 0,v=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;g==="style"?r.d.S(d,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:p,integrity:x,fetchPriority:v}):g==="script"&&r.d.X(d,{crossOrigin:p,integrity:x,fetchPriority:v,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Tn.preinitModule=function(d,h){if(typeof d=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var g=u(h.as,h.crossOrigin);r.d.M(d,{crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&r.d.M(d)},Tn.preload=function(d,h){if(typeof d=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var g=h.as,p=u(g,h.crossOrigin);r.d.L(d,g,{crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},Tn.preloadModule=function(d,h){if(typeof d=="string")if(h){var g=u(h.as,h.crossOrigin);r.d.m(d,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else r.d.m(d)},Tn.requestFormReset=function(d){r.d.r(d)},Tn.unstable_batchedUpdates=function(d,h){return d(h)},Tn.useFormState=function(d,h,g){return l.H.useFormState(d,h,g)},Tn.useFormStatus=function(){return l.H.useHostTransitionStatus()},Tn.version="19.1.0",Tn}var IS;function OE(){if(IS)return eg.exports;IS=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(),eg.exports=ZD(),eg.exports}/**
34
+ * @license React
35
+ * react-dom-client.production.js
36
+ *
37
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
38
+ *
39
+ * This source code is licensed under the MIT license found in the
40
+ * LICENSE file in the root directory of this source tree.
41
+ */var BS;function XD(){if(BS)return uc;BS=1;var e=YD(),t=Bx(),n=OE();function r(i){var a="https://react.dev/errors/"+i;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var c=2;c<arguments.length;c++)a+="&args[]="+encodeURIComponent(arguments[c])}return"Minified React error #"+i+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function o(i){var a=i,c=i;if(i.alternate)for(;a.return;)a=a.return;else{i=a;do a=i,(a.flags&4098)!==0&&(c=a.return),i=a.return;while(i)}return a.tag===3?c:null}function l(i){if(i.tag===13){var a=i.memoizedState;if(a===null&&(i=i.alternate,i!==null&&(a=i.memoizedState)),a!==null)return a.dehydrated}return null}function u(i){if(o(i)!==i)throw Error(r(188))}function d(i){var a=i.alternate;if(!a){if(a=o(i),a===null)throw Error(r(188));return a!==i?null:i}for(var c=i,f=a;;){var y=c.return;if(y===null)break;var b=y.alternate;if(b===null){if(f=y.return,f!==null){c=f;continue}break}if(y.child===b.child){for(b=y.child;b;){if(b===c)return u(y),i;if(b===f)return u(y),a;b=b.sibling}throw Error(r(188))}if(c.return!==f.return)c=y,f=b;else{for(var _=!1,L=y.child;L;){if(L===c){_=!0,c=y,f=b;break}if(L===f){_=!0,f=y,c=b;break}L=L.sibling}if(!_){for(L=b.child;L;){if(L===c){_=!0,c=b,f=y;break}if(L===f){_=!0,f=b,c=y;break}L=L.sibling}if(!_)throw Error(r(189))}}if(c.alternate!==f)throw Error(r(190))}if(c.tag!==3)throw Error(r(188));return c.stateNode.current===c?i:a}function h(i){var a=i.tag;if(a===5||a===26||a===27||a===6)return i;for(i=i.child;i!==null;){if(a=h(i),a!==null)return a;i=i.sibling}return null}var g=Object.assign,p=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),T=Symbol.for("react.provider"),R=Symbol.for("react.consumer"),O=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),N=Symbol.for("react.suspense_list"),z=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),B=Symbol.for("react.activity"),D=Symbol.for("react.memo_cache_sentinel"),H=Symbol.iterator;function $(i){return i===null||typeof i!="object"?null:(i=H&&i[H]||i["@@iterator"],typeof i=="function"?i:null)}var X=Symbol.for("react.client.reference");function Y(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===X?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case S:return"Fragment";case E:return"Profiler";case C:return"StrictMode";case M:return"Suspense";case N:return"SuspenseList";case B:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case v:return"Portal";case O:return(i.displayName||"Context")+".Provider";case R:return(i._context.displayName||"Context")+".Consumer";case A:var a=i.render;return i=i.displayName,i||(i=a.displayName||a.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case z:return a=i.displayName||null,a!==null?a:Y(i.type)||"Memo";case P:a=i._payload,i=i._init;try{return Y(i(a))}catch{}}return null}var te=Array.isArray,I=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V={pending:!1,data:null,method:null,action:null},Z=[],k=-1;function G(i){return{current:i}}function le(i){0>k||(i.current=Z[k],Z[k]=null,k--)}function j(i,a){k++,Z[k]=i.current,i.current=a}var Q=G(null),ee=G(null),W=G(null),K=G(null);function oe(i,a){switch(j(W,a),j(ee,i),j(Q,null),a.nodeType){case 9:case 11:i=(i=a.documentElement)&&(i=i.namespaceURI)?aS(i):0;break;default:if(i=a.tagName,a=a.namespaceURI)a=aS(a),i=sS(a,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}le(Q),j(Q,i)}function ce(){le(Q),le(ee),le(W)}function me(i){i.memoizedState!==null&&j(K,i);var a=Q.current,c=sS(a,i.type);a!==c&&(j(ee,i),j(Q,c))}function be(i){ee.current===i&&(le(Q),le(ee)),K.current===i&&(le(K),ic._currentValue=V)}var Te=Object.prototype.hasOwnProperty,Ve=e.unstable_scheduleCallback,lt=e.unstable_cancelCallback,Mt=e.unstable_shouldYield,It=e.unstable_requestPaint,st=e.unstable_now,yt=e.unstable_getCurrentPriorityLevel,Ct=e.unstable_ImmediatePriority,lr=e.unstable_UserBlockingPriority,Jt=e.unstable_NormalPriority,kt=e.unstable_LowPriority,Yn=e.unstable_IdlePriority,fl=e.log,hl=e.unstable_setDisableYieldValue,ue=null,ge=null;function Oe(i){if(typeof fl=="function"&&hl(i),ge&&typeof ge.setStrictMode=="function")try{ge.setStrictMode(ue,i)}catch{}}var De=Math.clz32?Math.clz32:wn,it=Math.log,bn=Math.LN2;function wn(i){return i>>>=0,i===0?32:31-(it(i)/bn|0)|0}var Sn=256,cr=4194304;function Cn(i){var a=i&42;if(a!==0)return a;switch(i&-i){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:case 262144:case 524288:case 1048576:case 2097152:return i&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function Bt(i,a,c){var f=i.pendingLanes;if(f===0)return 0;var y=0,b=i.suspendedLanes,_=i.pingedLanes;i=i.warmLanes;var L=f&134217727;return L!==0?(f=L&~b,f!==0?y=Cn(f):(_&=L,_!==0?y=Cn(_):c||(c=L&~i,c!==0&&(y=Cn(c))))):(L=f&~b,L!==0?y=Cn(L):_!==0?y=Cn(_):c||(c=f&~i,c!==0&&(y=Cn(c)))),y===0?0:a!==0&&a!==y&&(a&b)===0&&(b=y&-y,c=a&-a,b>=c||b===32&&(c&4194048)!==0)?a:y}function zn(i,a){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&a)===0}function Nn(i,a){switch(i){case 1:case 2:case 4:case 8:case 64:return a+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 a+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 Ar(){var i=Sn;return Sn<<=1,(Sn&4194048)===0&&(Sn=256),i}function wu(){var i=cr;return cr<<=1,(cr&62914560)===0&&(cr=4194304),i}function ml(i){for(var a=[],c=0;31>c;c++)a.push(i);return a}function Ui(i,a){i.pendingLanes|=a,a!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function Su(i,a,c,f,y,b){var _=i.pendingLanes;i.pendingLanes=c,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=c,i.entangledLanes&=c,i.errorRecoveryDisabledLanes&=c,i.shellSuspendCounter=0;var L=i.entanglements,U=i.expirationTimes,ie=i.hiddenUpdates;for(c=_&~c;0<c;){var de=31-De(c),he=1<<de;L[de]=0,U[de]=-1;var ae=ie[de];if(ae!==null)for(ie[de]=null,de=0;de<ae.length;de++){var se=ae[de];se!==null&&(se.lane&=-536870913)}c&=~he}f!==0&&Fe(i,f,0),b!==0&&y===0&&i.tag!==0&&(i.suspendedLanes|=b&~(_&~a))}function Fe(i,a,c){i.pendingLanes|=a,i.suspendedLanes&=~a;var f=31-De(a);i.entangledLanes|=a,i.entanglements[f]=i.entanglements[f]|1073741824|c&4194090}function Vt(i,a){var c=i.entangledLanes|=a;for(i=i.entanglements;c;){var f=31-De(c),y=1<<f;y&a|i[f]&a&&(i[f]|=a),c&=~y}}function Yt(i){switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=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:i=128;break;case 268435456:i=134217728;break;default:i=0}return i}function fn(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function La(){var i=F.p;return i!==0?i:(i=window.event,i===void 0?32:TS(i.type))}function en(i,a){var c=F.p;try{return F.p=i,a()}finally{F.p=c}}var Ut=Math.random().toString(36).slice(2),Ht="__reactFiber$"+Ut,Tt="__reactProps$"+Ut,sn="__reactContainer$"+Ut,As="__reactEvents$"+Ut,di="__reactListeners$"+Ut,G0="__reactHandles$"+Ut,Y0="__reactResources$"+Ut,pl="__reactMarker$"+Ut;function Hh(i){delete i[Ht],delete i[Tt],delete i[As],delete i[di],delete i[G0]}function Rs(i){var a=i[Ht];if(a)return a;for(var c=i.parentNode;c;){if(a=c[sn]||c[Ht]){if(c=a.alternate,a.child!==null||c!==null&&c.child!==null)for(i=uS(i);i!==null;){if(c=i[Ht])return c;i=uS(i)}return a}i=c,c=i.parentNode}return null}function Ms(i){if(i=i[Ht]||i[sn]){var a=i.tag;if(a===5||a===6||a===13||a===26||a===27||a===3)return i}return null}function gl(i){var a=i.tag;if(a===5||a===26||a===27||a===6)return i.stateNode;throw Error(r(33))}function Os(i){var a=i[Y0];return a||(a=i[Y0]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function on(i){i[pl]=!0}var Z0=new Set,X0={};function Ia(i,a){Ds(i,a),Ds(i+"Capture",a)}function Ds(i,a){for(X0[i]=a,i=0;i<a.length;i++)Z0.add(a[i])}var MM=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]*$"),K0={},W0={};function OM(i){return Te.call(W0,i)?!0:Te.call(K0,i)?!1:MM.test(i)?W0[i]=!0:(K0[i]=!0,!1)}function Cu(i,a,c){if(OM(a))if(c===null)i.removeAttribute(a);else{switch(typeof c){case"undefined":case"function":case"symbol":i.removeAttribute(a);return;case"boolean":var f=a.toLowerCase().slice(0,5);if(f!=="data-"&&f!=="aria-"){i.removeAttribute(a);return}}i.setAttribute(a,""+c)}}function ku(i,a,c){if(c===null)i.removeAttribute(a);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(a);return}i.setAttribute(a,""+c)}}function fi(i,a,c,f){if(f===null)i.removeAttribute(c);else{switch(typeof f){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(c);return}i.setAttributeNS(a,c,""+f)}}var Fh,Q0;function Ps(i){if(Fh===void 0)try{throw Error()}catch(c){var a=c.stack.trim().match(/\n( *(at )?)/);Fh=a&&a[1]||"",Q0=-1<c.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<c.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+Fh+i+Q0}var $h=!1;function qh(i,a){if(!i||$h)return"";$h=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var f={DetermineComponentFrameRoot:function(){try{if(a){var he=function(){throw Error()};if(Object.defineProperty(he.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(he,[])}catch(se){var ae=se}Reflect.construct(i,[],he)}else{try{he.call()}catch(se){ae=se}i.call(he.prototype)}}else{try{throw Error()}catch(se){ae=se}(he=i())&&typeof he.catch=="function"&&he.catch(function(){})}}catch(se){if(se&&ae&&typeof se.stack=="string")return[se.stack,ae.stack]}return[null,null]}};f.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var y=Object.getOwnPropertyDescriptor(f.DetermineComponentFrameRoot,"name");y&&y.configurable&&Object.defineProperty(f.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var b=f.DetermineComponentFrameRoot(),_=b[0],L=b[1];if(_&&L){var U=_.split(`
44
+ `),ie=L.split(`
45
+ `);for(y=f=0;f<U.length&&!U[f].includes("DetermineComponentFrameRoot");)f++;for(;y<ie.length&&!ie[y].includes("DetermineComponentFrameRoot");)y++;if(f===U.length||y===ie.length)for(f=U.length-1,y=ie.length-1;1<=f&&0<=y&&U[f]!==ie[y];)y--;for(;1<=f&&0<=y;f--,y--)if(U[f]!==ie[y]){if(f!==1||y!==1)do if(f--,y--,0>y||U[f]!==ie[y]){var de=`
46
+ `+U[f].replace(" at new "," at ");return i.displayName&&de.includes("<anonymous>")&&(de=de.replace("<anonymous>",i.displayName)),de}while(1<=f&&0<=y);break}}}finally{$h=!1,Error.prepareStackTrace=c}return(c=i?i.displayName||i.name:"")?Ps(c):""}function DM(i){switch(i.tag){case 26:case 27:case 5:return Ps(i.type);case 16:return Ps("Lazy");case 13:return Ps("Suspense");case 19:return Ps("SuspenseList");case 0:case 15:return qh(i.type,!1);case 11:return qh(i.type.render,!1);case 1:return qh(i.type,!0);case 31:return Ps("Activity");default:return""}}function J0(i){try{var a="";do a+=DM(i),i=i.return;while(i);return a}catch(c){return`
47
+ Error generating stack: `+c.message+`
48
+ `+c.stack}}function ur(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function eb(i){var a=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function PM(i){var a=eb(i)?"checked":"value",c=Object.getOwnPropertyDescriptor(i.constructor.prototype,a),f=""+i[a];if(!i.hasOwnProperty(a)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var y=c.get,b=c.set;return Object.defineProperty(i,a,{configurable:!0,get:function(){return y.call(this)},set:function(_){f=""+_,b.call(this,_)}}),Object.defineProperty(i,a,{enumerable:c.enumerable}),{getValue:function(){return f},setValue:function(_){f=""+_},stopTracking:function(){i._valueTracker=null,delete i[a]}}}}function Tu(i){i._valueTracker||(i._valueTracker=PM(i))}function tb(i){if(!i)return!1;var a=i._valueTracker;if(!a)return!0;var c=a.getValue(),f="";return i&&(f=eb(i)?i.checked?"true":"false":i.value),i=f,i!==c?(a.setValue(i),!0):!1}function Eu(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var zM=/[\n"\\]/g;function dr(i){return i.replace(zM,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function Gh(i,a,c,f,y,b,_,L){i.name="",_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?i.type=_:i.removeAttribute("type"),a!=null?_==="number"?(a===0&&i.value===""||i.value!=a)&&(i.value=""+ur(a)):i.value!==""+ur(a)&&(i.value=""+ur(a)):_!=="submit"&&_!=="reset"||i.removeAttribute("value"),a!=null?Yh(i,_,ur(a)):c!=null?Yh(i,_,ur(c)):f!=null&&i.removeAttribute("value"),y==null&&b!=null&&(i.defaultChecked=!!b),y!=null&&(i.checked=y&&typeof y!="function"&&typeof y!="symbol"),L!=null&&typeof L!="function"&&typeof L!="symbol"&&typeof L!="boolean"?i.name=""+ur(L):i.removeAttribute("name")}function nb(i,a,c,f,y,b,_,L){if(b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(i.type=b),a!=null||c!=null){if(!(b!=="submit"&&b!=="reset"||a!=null))return;c=c!=null?""+ur(c):"",a=a!=null?""+ur(a):c,L||a===i.value||(i.value=a),i.defaultValue=a}f=f??y,f=typeof f!="function"&&typeof f!="symbol"&&!!f,i.checked=L?i.checked:!!f,i.defaultChecked=!!f,_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(i.name=_)}function Yh(i,a,c){a==="number"&&Eu(i.ownerDocument)===i||i.defaultValue===""+c||(i.defaultValue=""+c)}function zs(i,a,c,f){if(i=i.options,a){a={};for(var y=0;y<c.length;y++)a["$"+c[y]]=!0;for(c=0;c<i.length;c++)y=a.hasOwnProperty("$"+i[c].value),i[c].selected!==y&&(i[c].selected=y),y&&f&&(i[c].defaultSelected=!0)}else{for(c=""+ur(c),a=null,y=0;y<i.length;y++){if(i[y].value===c){i[y].selected=!0,f&&(i[y].defaultSelected=!0);return}a!==null||i[y].disabled||(a=i[y])}a!==null&&(a.selected=!0)}}function rb(i,a,c){if(a!=null&&(a=""+ur(a),a!==i.value&&(i.value=a),c==null)){i.defaultValue!==a&&(i.defaultValue=a);return}i.defaultValue=c!=null?""+ur(c):""}function ib(i,a,c,f){if(a==null){if(f!=null){if(c!=null)throw Error(r(92));if(te(f)){if(1<f.length)throw Error(r(93));f=f[0]}c=f}c==null&&(c=""),a=c}c=ur(a),i.defaultValue=c,f=i.textContent,f===c&&f!==""&&f!==null&&(i.value=f)}function Ls(i,a){if(a){var c=i.firstChild;if(c&&c===i.lastChild&&c.nodeType===3){c.nodeValue=a;return}}i.textContent=a}var LM=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 ab(i,a,c){var f=a.indexOf("--")===0;c==null||typeof c=="boolean"||c===""?f?i.setProperty(a,""):a==="float"?i.cssFloat="":i[a]="":f?i.setProperty(a,c):typeof c!="number"||c===0||LM.has(a)?a==="float"?i.cssFloat=c:i[a]=(""+c).trim():i[a]=c+"px"}function sb(i,a,c){if(a!=null&&typeof a!="object")throw Error(r(62));if(i=i.style,c!=null){for(var f in c)!c.hasOwnProperty(f)||a!=null&&a.hasOwnProperty(f)||(f.indexOf("--")===0?i.setProperty(f,""):f==="float"?i.cssFloat="":i[f]="");for(var y in a)f=a[y],a.hasOwnProperty(y)&&c[y]!==f&&ab(i,y,f)}else for(var b in a)a.hasOwnProperty(b)&&ab(i,b,a[b])}function Zh(i){if(i.indexOf("-")===-1)return!1;switch(i){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 IM=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"]]),BM=/^[\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 _u(i){return BM.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}var Xh=null;function Kh(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Is=null,Bs=null;function ob(i){var a=Ms(i);if(a&&(i=a.stateNode)){var c=i[Tt]||null;e:switch(i=a.stateNode,a.type){case"input":if(Gh(i,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name),a=c.name,c.type==="radio"&&a!=null){for(c=i;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll('input[name="'+dr(""+a)+'"][type="radio"]'),a=0;a<c.length;a++){var f=c[a];if(f!==i&&f.form===i.form){var y=f[Tt]||null;if(!y)throw Error(r(90));Gh(f,y.value,y.defaultValue,y.defaultValue,y.checked,y.defaultChecked,y.type,y.name)}}for(a=0;a<c.length;a++)f=c[a],f.form===i.form&&tb(f)}break e;case"textarea":rb(i,c.value,c.defaultValue);break e;case"select":a=c.value,a!=null&&zs(i,!!c.multiple,a,!1)}}}var Wh=!1;function lb(i,a,c){if(Wh)return i(a,c);Wh=!0;try{var f=i(a);return f}finally{if(Wh=!1,(Is!==null||Bs!==null)&&(fd(),Is&&(a=Is,i=Bs,Bs=Is=null,ob(a),i)))for(a=0;a<i.length;a++)ob(i[a])}}function yl(i,a){var c=i.stateNode;if(c===null)return null;var f=c[Tt]||null;if(f===null)return null;c=f[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(f=!f.disabled)||(i=i.type,f=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!f;break e;default:i=!1}if(i)return null;if(c&&typeof c!="function")throw Error(r(231,a,typeof c));return c}var hi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Qh=!1;if(hi)try{var xl={};Object.defineProperty(xl,"passive",{get:function(){Qh=!0}}),window.addEventListener("test",xl,xl),window.removeEventListener("test",xl,xl)}catch{Qh=!1}var Hi=null,Jh=null,ju=null;function cb(){if(ju)return ju;var i,a=Jh,c=a.length,f,y="value"in Hi?Hi.value:Hi.textContent,b=y.length;for(i=0;i<c&&a[i]===y[i];i++);var _=c-i;for(f=1;f<=_&&a[c-f]===y[b-f];f++);return ju=y.slice(i,1<f?1-f:void 0)}function Nu(i){var a=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&a===13&&(i=13)):i=a,i===10&&(i=13),32<=i||i===13?i:0}function Au(){return!0}function ub(){return!1}function Ln(i){function a(c,f,y,b,_){this._reactName=c,this._targetInst=y,this.type=f,this.nativeEvent=b,this.target=_,this.currentTarget=null;for(var L in i)i.hasOwnProperty(L)&&(c=i[L],this[L]=c?c(b):b[L]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?Au:ub,this.isPropagationStopped=ub,this}return g(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=Au)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=Au)},persist:function(){},isPersistent:Au}),a}var Ba={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ru=Ln(Ba),vl=g({},Ba,{view:0,detail:0}),VM=Ln(vl),em,tm,bl,Mu=g({},vl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:rm,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==bl&&(bl&&i.type==="mousemove"?(em=i.screenX-bl.screenX,tm=i.screenY-bl.screenY):tm=em=0,bl=i),em)},movementY:function(i){return"movementY"in i?i.movementY:tm}}),db=Ln(Mu),UM=g({},Mu,{dataTransfer:0}),HM=Ln(UM),FM=g({},vl,{relatedTarget:0}),nm=Ln(FM),$M=g({},Ba,{animationName:0,elapsedTime:0,pseudoElement:0}),qM=Ln($M),GM=g({},Ba,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),YM=Ln(GM),ZM=g({},Ba,{data:0}),fb=Ln(ZM),XM={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},KM={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"},WM={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function QM(i){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(i):(i=WM[i])?!!a[i]:!1}function rm(){return QM}var JM=g({},vl,{key:function(i){if(i.key){var a=XM[i.key]||i.key;if(a!=="Unidentified")return a}return i.type==="keypress"?(i=Nu(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?KM[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:rm,charCode:function(i){return i.type==="keypress"?Nu(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Nu(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),eO=Ln(JM),tO=g({},Mu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),hb=Ln(tO),nO=g({},vl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:rm}),rO=Ln(nO),iO=g({},Ba,{propertyName:0,elapsedTime:0,pseudoElement:0}),aO=Ln(iO),sO=g({},Mu,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),oO=Ln(sO),lO=g({},Ba,{newState:0,oldState:0}),cO=Ln(lO),uO=[9,13,27,32],im=hi&&"CompositionEvent"in window,wl=null;hi&&"documentMode"in document&&(wl=document.documentMode);var dO=hi&&"TextEvent"in window&&!wl,mb=hi&&(!im||wl&&8<wl&&11>=wl),pb=" ",gb=!1;function yb(i,a){switch(i){case"keyup":return uO.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function xb(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Vs=!1;function fO(i,a){switch(i){case"compositionend":return xb(a);case"keypress":return a.which!==32?null:(gb=!0,pb);case"textInput":return i=a.data,i===pb&&gb?null:i;default:return null}}function hO(i,a){if(Vs)return i==="compositionend"||!im&&yb(i,a)?(i=cb(),ju=Jh=Hi=null,Vs=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return mb&&a.locale!=="ko"?null:a.data;default:return null}}var mO={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 vb(i){var a=i&&i.nodeName&&i.nodeName.toLowerCase();return a==="input"?!!mO[i.type]:a==="textarea"}function bb(i,a,c,f){Is?Bs?Bs.push(f):Bs=[f]:Is=f,a=xd(a,"onChange"),0<a.length&&(c=new Ru("onChange","change",null,c,f),i.push({event:c,listeners:a}))}var Sl=null,Cl=null;function pO(i){eS(i,0)}function Ou(i){var a=gl(i);if(tb(a))return i}function wb(i,a){if(i==="change")return a}var Sb=!1;if(hi){var am;if(hi){var sm="oninput"in document;if(!sm){var Cb=document.createElement("div");Cb.setAttribute("oninput","return;"),sm=typeof Cb.oninput=="function"}am=sm}else am=!1;Sb=am&&(!document.documentMode||9<document.documentMode)}function kb(){Sl&&(Sl.detachEvent("onpropertychange",Tb),Cl=Sl=null)}function Tb(i){if(i.propertyName==="value"&&Ou(Cl)){var a=[];bb(a,Cl,i,Kh(i)),lb(pO,a)}}function gO(i,a,c){i==="focusin"?(kb(),Sl=a,Cl=c,Sl.attachEvent("onpropertychange",Tb)):i==="focusout"&&kb()}function yO(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Ou(Cl)}function xO(i,a){if(i==="click")return Ou(a)}function vO(i,a){if(i==="input"||i==="change")return Ou(a)}function bO(i,a){return i===a&&(i!==0||1/i===1/a)||i!==i&&a!==a}var Zn=typeof Object.is=="function"?Object.is:bO;function kl(i,a){if(Zn(i,a))return!0;if(typeof i!="object"||i===null||typeof a!="object"||a===null)return!1;var c=Object.keys(i),f=Object.keys(a);if(c.length!==f.length)return!1;for(f=0;f<c.length;f++){var y=c[f];if(!Te.call(a,y)||!Zn(i[y],a[y]))return!1}return!0}function Eb(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function _b(i,a){var c=Eb(i);i=0;for(var f;c;){if(c.nodeType===3){if(f=i+c.textContent.length,i<=a&&f>=a)return{node:c,offset:a-i};i=f}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=Eb(c)}}function jb(i,a){return i&&a?i===a?!0:i&&i.nodeType===3?!1:a&&a.nodeType===3?jb(i,a.parentNode):"contains"in i?i.contains(a):i.compareDocumentPosition?!!(i.compareDocumentPosition(a)&16):!1:!1}function Nb(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var a=Eu(i.document);a instanceof i.HTMLIFrameElement;){try{var c=typeof a.contentWindow.location.href=="string"}catch{c=!1}if(c)i=a.contentWindow;else break;a=Eu(i.document)}return a}function om(i){var a=i&&i.nodeName&&i.nodeName.toLowerCase();return a&&(a==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||a==="textarea"||i.contentEditable==="true")}var wO=hi&&"documentMode"in document&&11>=document.documentMode,Us=null,lm=null,Tl=null,cm=!1;function Ab(i,a,c){var f=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;cm||Us==null||Us!==Eu(f)||(f=Us,"selectionStart"in f&&om(f)?f={start:f.selectionStart,end:f.selectionEnd}:(f=(f.ownerDocument&&f.ownerDocument.defaultView||window).getSelection(),f={anchorNode:f.anchorNode,anchorOffset:f.anchorOffset,focusNode:f.focusNode,focusOffset:f.focusOffset}),Tl&&kl(Tl,f)||(Tl=f,f=xd(lm,"onSelect"),0<f.length&&(a=new Ru("onSelect","select",null,a,c),i.push({event:a,listeners:f}),a.target=Us)))}function Va(i,a){var c={};return c[i.toLowerCase()]=a.toLowerCase(),c["Webkit"+i]="webkit"+a,c["Moz"+i]="moz"+a,c}var Hs={animationend:Va("Animation","AnimationEnd"),animationiteration:Va("Animation","AnimationIteration"),animationstart:Va("Animation","AnimationStart"),transitionrun:Va("Transition","TransitionRun"),transitionstart:Va("Transition","TransitionStart"),transitioncancel:Va("Transition","TransitionCancel"),transitionend:Va("Transition","TransitionEnd")},um={},Rb={};hi&&(Rb=document.createElement("div").style,"AnimationEvent"in window||(delete Hs.animationend.animation,delete Hs.animationiteration.animation,delete Hs.animationstart.animation),"TransitionEvent"in window||delete Hs.transitionend.transition);function Ua(i){if(um[i])return um[i];if(!Hs[i])return i;var a=Hs[i],c;for(c in a)if(a.hasOwnProperty(c)&&c in Rb)return um[i]=a[c];return i}var Mb=Ua("animationend"),Ob=Ua("animationiteration"),Db=Ua("animationstart"),SO=Ua("transitionrun"),CO=Ua("transitionstart"),kO=Ua("transitioncancel"),Pb=Ua("transitionend"),zb=new Map,dm="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(" ");dm.push("scrollEnd");function Rr(i,a){zb.set(i,a),Ia(a,[i])}var Lb=new WeakMap;function fr(i,a){if(typeof i=="object"&&i!==null){var c=Lb.get(i);return c!==void 0?c:(a={value:i,source:a,stack:J0(a)},Lb.set(i,a),a)}return{value:i,source:a,stack:J0(a)}}var hr=[],Fs=0,fm=0;function Du(){for(var i=Fs,a=fm=Fs=0;a<i;){var c=hr[a];hr[a++]=null;var f=hr[a];hr[a++]=null;var y=hr[a];hr[a++]=null;var b=hr[a];if(hr[a++]=null,f!==null&&y!==null){var _=f.pending;_===null?y.next=y:(y.next=_.next,_.next=y),f.pending=y}b!==0&&Ib(c,y,b)}}function Pu(i,a,c,f){hr[Fs++]=i,hr[Fs++]=a,hr[Fs++]=c,hr[Fs++]=f,fm|=f,i.lanes|=f,i=i.alternate,i!==null&&(i.lanes|=f)}function hm(i,a,c,f){return Pu(i,a,c,f),zu(i)}function $s(i,a){return Pu(i,null,null,a),zu(i)}function Ib(i,a,c){i.lanes|=c;var f=i.alternate;f!==null&&(f.lanes|=c);for(var y=!1,b=i.return;b!==null;)b.childLanes|=c,f=b.alternate,f!==null&&(f.childLanes|=c),b.tag===22&&(i=b.stateNode,i===null||i._visibility&1||(y=!0)),i=b,b=b.return;return i.tag===3?(b=i.stateNode,y&&a!==null&&(y=31-De(c),i=b.hiddenUpdates,f=i[y],f===null?i[y]=[a]:f.push(a),a.lane=c|536870912),b):null}function zu(i){if(50<Kl)throw Kl=0,vp=null,Error(r(185));for(var a=i.return;a!==null;)i=a,a=i.return;return i.tag===3?i.stateNode:null}var qs={};function TO(i,a,c,f){this.tag=i,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=f,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xn(i,a,c,f){return new TO(i,a,c,f)}function mm(i){return i=i.prototype,!(!i||!i.isReactComponent)}function mi(i,a){var c=i.alternate;return c===null?(c=Xn(i.tag,a,i.key,i.mode),c.elementType=i.elementType,c.type=i.type,c.stateNode=i.stateNode,c.alternate=i,i.alternate=c):(c.pendingProps=a,c.type=i.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=i.flags&65011712,c.childLanes=i.childLanes,c.lanes=i.lanes,c.child=i.child,c.memoizedProps=i.memoizedProps,c.memoizedState=i.memoizedState,c.updateQueue=i.updateQueue,a=i.dependencies,c.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},c.sibling=i.sibling,c.index=i.index,c.ref=i.ref,c.refCleanup=i.refCleanup,c}function Bb(i,a){i.flags&=65011714;var c=i.alternate;return c===null?(i.childLanes=0,i.lanes=a,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=c.childLanes,i.lanes=c.lanes,i.child=c.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=c.memoizedProps,i.memoizedState=c.memoizedState,i.updateQueue=c.updateQueue,i.type=c.type,a=c.dependencies,i.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),i}function Lu(i,a,c,f,y,b){var _=0;if(f=i,typeof i=="function")mm(i)&&(_=1);else if(typeof i=="string")_=_D(i,c,Q.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case B:return i=Xn(31,c,a,y),i.elementType=B,i.lanes=b,i;case S:return Ha(c.children,y,b,a);case C:_=8,y|=24;break;case E:return i=Xn(12,c,a,y|2),i.elementType=E,i.lanes=b,i;case M:return i=Xn(13,c,a,y),i.elementType=M,i.lanes=b,i;case N:return i=Xn(19,c,a,y),i.elementType=N,i.lanes=b,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case T:case O:_=10;break e;case R:_=9;break e;case A:_=11;break e;case z:_=14;break e;case P:_=16,f=null;break e}_=29,c=Error(r(130,i===null?"null":typeof i,"")),f=null}return a=Xn(_,c,a,y),a.elementType=i,a.type=f,a.lanes=b,a}function Ha(i,a,c,f){return i=Xn(7,i,f,a),i.lanes=c,i}function pm(i,a,c){return i=Xn(6,i,null,a),i.lanes=c,i}function gm(i,a,c){return a=Xn(4,i.children!==null?i.children:[],i.key,a),a.lanes=c,a.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},a}var Gs=[],Ys=0,Iu=null,Bu=0,mr=[],pr=0,Fa=null,pi=1,gi="";function $a(i,a){Gs[Ys++]=Bu,Gs[Ys++]=Iu,Iu=i,Bu=a}function Vb(i,a,c){mr[pr++]=pi,mr[pr++]=gi,mr[pr++]=Fa,Fa=i;var f=pi;i=gi;var y=32-De(f)-1;f&=~(1<<y),c+=1;var b=32-De(a)+y;if(30<b){var _=y-y%5;b=(f&(1<<_)-1).toString(32),f>>=_,y-=_,pi=1<<32-De(a)+y|c<<y|f,gi=b+i}else pi=1<<b|c<<y|f,gi=i}function ym(i){i.return!==null&&($a(i,1),Vb(i,1,0))}function xm(i){for(;i===Iu;)Iu=Gs[--Ys],Gs[Ys]=null,Bu=Gs[--Ys],Gs[Ys]=null;for(;i===Fa;)Fa=mr[--pr],mr[pr]=null,gi=mr[--pr],mr[pr]=null,pi=mr[--pr],mr[pr]=null}var An=null,Ot=null,ht=!1,qa=null,$r=!1,vm=Error(r(519));function Ga(i){var a=Error(r(418,""));throw jl(fr(a,i)),vm}function Ub(i){var a=i.stateNode,c=i.type,f=i.memoizedProps;switch(a[Ht]=i,a[Tt]=f,c){case"dialog":nt("cancel",a),nt("close",a);break;case"iframe":case"object":case"embed":nt("load",a);break;case"video":case"audio":for(c=0;c<Ql.length;c++)nt(Ql[c],a);break;case"source":nt("error",a);break;case"img":case"image":case"link":nt("error",a),nt("load",a);break;case"details":nt("toggle",a);break;case"input":nt("invalid",a),nb(a,f.value,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name,!0),Tu(a);break;case"select":nt("invalid",a);break;case"textarea":nt("invalid",a),ib(a,f.value,f.defaultValue,f.children),Tu(a)}c=f.children,typeof c!="string"&&typeof c!="number"&&typeof c!="bigint"||a.textContent===""+c||f.suppressHydrationWarning===!0||iS(a.textContent,c)?(f.popover!=null&&(nt("beforetoggle",a),nt("toggle",a)),f.onScroll!=null&&nt("scroll",a),f.onScrollEnd!=null&&nt("scrollend",a),f.onClick!=null&&(a.onclick=vd),a=!0):a=!1,a||Ga(i)}function Hb(i){for(An=i.return;An;)switch(An.tag){case 5:case 13:$r=!1;return;case 27:case 3:$r=!0;return;default:An=An.return}}function El(i){if(i!==An)return!1;if(!ht)return Hb(i),ht=!0,!1;var a=i.tag,c;if((c=a!==3&&a!==27)&&((c=a===5)&&(c=i.type,c=!(c!=="form"&&c!=="button")||Pp(i.type,i.memoizedProps)),c=!c),c&&Ot&&Ga(i),Hb(i),a===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));e:{for(i=i.nextSibling,a=0;i;){if(i.nodeType===8)if(c=i.data,c==="/$"){if(a===0){Ot=Or(i.nextSibling);break e}a--}else c!=="$"&&c!=="$!"&&c!=="$?"||a++;i=i.nextSibling}Ot=null}}else a===27?(a=Ot,ia(i.type)?(i=Bp,Bp=null,Ot=i):Ot=a):Ot=An?Or(i.stateNode.nextSibling):null;return!0}function _l(){Ot=An=null,ht=!1}function Fb(){var i=qa;return i!==null&&(Vn===null?Vn=i:Vn.push.apply(Vn,i),qa=null),i}function jl(i){qa===null?qa=[i]:qa.push(i)}var bm=G(null),Ya=null,yi=null;function Fi(i,a,c){j(bm,a._currentValue),a._currentValue=c}function xi(i){i._currentValue=bm.current,le(bm)}function wm(i,a,c){for(;i!==null;){var f=i.alternate;if((i.childLanes&a)!==a?(i.childLanes|=a,f!==null&&(f.childLanes|=a)):f!==null&&(f.childLanes&a)!==a&&(f.childLanes|=a),i===c)break;i=i.return}}function Sm(i,a,c,f){var y=i.child;for(y!==null&&(y.return=i);y!==null;){var b=y.dependencies;if(b!==null){var _=y.child;b=b.firstContext;e:for(;b!==null;){var L=b;b=y;for(var U=0;U<a.length;U++)if(L.context===a[U]){b.lanes|=c,L=b.alternate,L!==null&&(L.lanes|=c),wm(b.return,c,i),f||(_=null);break e}b=L.next}}else if(y.tag===18){if(_=y.return,_===null)throw Error(r(341));_.lanes|=c,b=_.alternate,b!==null&&(b.lanes|=c),wm(_,c,i),_=null}else _=y.child;if(_!==null)_.return=y;else for(_=y;_!==null;){if(_===i){_=null;break}if(y=_.sibling,y!==null){y.return=_.return,_=y;break}_=_.return}y=_}}function Nl(i,a,c,f){i=null;for(var y=a,b=!1;y!==null;){if(!b){if((y.flags&524288)!==0)b=!0;else if((y.flags&262144)!==0)break}if(y.tag===10){var _=y.alternate;if(_===null)throw Error(r(387));if(_=_.memoizedProps,_!==null){var L=y.type;Zn(y.pendingProps.value,_.value)||(i!==null?i.push(L):i=[L])}}else if(y===K.current){if(_=y.alternate,_===null)throw Error(r(387));_.memoizedState.memoizedState!==y.memoizedState.memoizedState&&(i!==null?i.push(ic):i=[ic])}y=y.return}i!==null&&Sm(a,i,c,f),a.flags|=262144}function Vu(i){for(i=i.firstContext;i!==null;){if(!Zn(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function Za(i){Ya=i,yi=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function kn(i){return $b(Ya,i)}function Uu(i,a){return Ya===null&&Za(i),$b(i,a)}function $b(i,a){var c=a._currentValue;if(a={context:a,memoizedValue:c,next:null},yi===null){if(i===null)throw Error(r(308));yi=a,i.dependencies={lanes:0,firstContext:a},i.flags|=524288}else yi=yi.next=a;return c}var EO=typeof AbortController<"u"?AbortController:function(){var i=[],a=this.signal={aborted:!1,addEventListener:function(c,f){i.push(f)}};this.abort=function(){a.aborted=!0,i.forEach(function(c){return c()})}},_O=e.unstable_scheduleCallback,jO=e.unstable_NormalPriority,tn={$$typeof:O,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Cm(){return{controller:new EO,data:new Map,refCount:0}}function Al(i){i.refCount--,i.refCount===0&&_O(jO,function(){i.controller.abort()})}var Rl=null,km=0,Zs=0,Xs=null;function NO(i,a){if(Rl===null){var c=Rl=[];km=0,Zs=Ep(),Xs={status:"pending",value:void 0,then:function(f){c.push(f)}}}return km++,a.then(qb,qb),a}function qb(){if(--km===0&&Rl!==null){Xs!==null&&(Xs.status="fulfilled");var i=Rl;Rl=null,Zs=0,Xs=null;for(var a=0;a<i.length;a++)(0,i[a])()}}function AO(i,a){var c=[],f={status:"pending",value:null,reason:null,then:function(y){c.push(y)}};return i.then(function(){f.status="fulfilled",f.value=a;for(var y=0;y<c.length;y++)(0,c[y])(a)},function(y){for(f.status="rejected",f.reason=y,y=0;y<c.length;y++)(0,c[y])(void 0)}),f}var Gb=I.S;I.S=function(i,a){typeof a=="object"&&a!==null&&typeof a.then=="function"&&NO(i,a),Gb!==null&&Gb(i,a)};var Xa=G(null);function Tm(){var i=Xa.current;return i!==null?i:Et.pooledCache}function Hu(i,a){a===null?j(Xa,Xa.current):j(Xa,a.pool)}function Yb(){var i=Tm();return i===null?null:{parent:tn._currentValue,pool:i}}var Ml=Error(r(460)),Zb=Error(r(474)),Fu=Error(r(542)),Em={then:function(){}};function Xb(i){return i=i.status,i==="fulfilled"||i==="rejected"}function $u(){}function Kb(i,a,c){switch(c=i[c],c===void 0?i.push(a):c!==a&&(a.then($u,$u),a=c),a.status){case"fulfilled":return a.value;case"rejected":throw i=a.reason,Qb(i),i;default:if(typeof a.status=="string")a.then($u,$u);else{if(i=Et,i!==null&&100<i.shellSuspendCounter)throw Error(r(482));i=a,i.status="pending",i.then(function(f){if(a.status==="pending"){var y=a;y.status="fulfilled",y.value=f}},function(f){if(a.status==="pending"){var y=a;y.status="rejected",y.reason=f}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw i=a.reason,Qb(i),i}throw Ol=a,Ml}}var Ol=null;function Wb(){if(Ol===null)throw Error(r(459));var i=Ol;return Ol=null,i}function Qb(i){if(i===Ml||i===Fu)throw Error(r(483))}var $i=!1;function _m(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function jm(i,a){i=i.updateQueue,a.updateQueue===i&&(a.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function qi(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Gi(i,a,c){var f=i.updateQueue;if(f===null)return null;if(f=f.shared,(mt&2)!==0){var y=f.pending;return y===null?a.next=a:(a.next=y.next,y.next=a),f.pending=a,a=zu(i),Ib(i,null,c),a}return Pu(i,f,a,c),zu(i)}function Dl(i,a,c){if(a=a.updateQueue,a!==null&&(a=a.shared,(c&4194048)!==0)){var f=a.lanes;f&=i.pendingLanes,c|=f,a.lanes=c,Vt(i,c)}}function Nm(i,a){var c=i.updateQueue,f=i.alternate;if(f!==null&&(f=f.updateQueue,c===f)){var y=null,b=null;if(c=c.firstBaseUpdate,c!==null){do{var _={lane:c.lane,tag:c.tag,payload:c.payload,callback:null,next:null};b===null?y=b=_:b=b.next=_,c=c.next}while(c!==null);b===null?y=b=a:b=b.next=a}else y=b=a;c={baseState:f.baseState,firstBaseUpdate:y,lastBaseUpdate:b,shared:f.shared,callbacks:f.callbacks},i.updateQueue=c;return}i=c.lastBaseUpdate,i===null?c.firstBaseUpdate=a:i.next=a,c.lastBaseUpdate=a}var Am=!1;function Pl(){if(Am){var i=Xs;if(i!==null)throw i}}function zl(i,a,c,f){Am=!1;var y=i.updateQueue;$i=!1;var b=y.firstBaseUpdate,_=y.lastBaseUpdate,L=y.shared.pending;if(L!==null){y.shared.pending=null;var U=L,ie=U.next;U.next=null,_===null?b=ie:_.next=ie,_=U;var de=i.alternate;de!==null&&(de=de.updateQueue,L=de.lastBaseUpdate,L!==_&&(L===null?de.firstBaseUpdate=ie:L.next=ie,de.lastBaseUpdate=U))}if(b!==null){var he=y.baseState;_=0,de=ie=U=null,L=b;do{var ae=L.lane&-536870913,se=ae!==L.lane;if(se?(ct&ae)===ae:(f&ae)===ae){ae!==0&&ae===Zs&&(Am=!0),de!==null&&(de=de.next={lane:0,tag:L.tag,payload:L.payload,callback:null,next:null});e:{var Ie=i,ze=L;ae=a;var bt=c;switch(ze.tag){case 1:if(Ie=ze.payload,typeof Ie=="function"){he=Ie.call(bt,he,ae);break e}he=Ie;break e;case 3:Ie.flags=Ie.flags&-65537|128;case 0:if(Ie=ze.payload,ae=typeof Ie=="function"?Ie.call(bt,he,ae):Ie,ae==null)break e;he=g({},he,ae);break e;case 2:$i=!0}}ae=L.callback,ae!==null&&(i.flags|=64,se&&(i.flags|=8192),se=y.callbacks,se===null?y.callbacks=[ae]:se.push(ae))}else se={lane:ae,tag:L.tag,payload:L.payload,callback:L.callback,next:null},de===null?(ie=de=se,U=he):de=de.next=se,_|=ae;if(L=L.next,L===null){if(L=y.shared.pending,L===null)break;se=L,L=se.next,se.next=null,y.lastBaseUpdate=se,y.shared.pending=null}}while(!0);de===null&&(U=he),y.baseState=U,y.firstBaseUpdate=ie,y.lastBaseUpdate=de,b===null&&(y.shared.lanes=0),ea|=_,i.lanes=_,i.memoizedState=he}}function Jb(i,a){if(typeof i!="function")throw Error(r(191,i));i.call(a)}function ew(i,a){var c=i.callbacks;if(c!==null)for(i.callbacks=null,i=0;i<c.length;i++)Jb(c[i],a)}var Ks=G(null),qu=G(0);function tw(i,a){i=Ti,j(qu,i),j(Ks,a),Ti=i|a.baseLanes}function Rm(){j(qu,Ti),j(Ks,Ks.current)}function Mm(){Ti=qu.current,le(Ks),le(qu)}var Yi=0,We=null,xt=null,Zt=null,Gu=!1,Ws=!1,Ka=!1,Yu=0,Ll=0,Qs=null,RO=0;function Ft(){throw Error(r(321))}function Om(i,a){if(a===null)return!1;for(var c=0;c<a.length&&c<i.length;c++)if(!Zn(i[c],a[c]))return!1;return!0}function Dm(i,a,c,f,y,b){return Yi=b,We=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,I.H=i===null||i.memoizedState===null?Iw:Bw,Ka=!1,b=c(f,y),Ka=!1,Ws&&(b=rw(a,c,f,y)),nw(i),b}function nw(i){I.H=Ju;var a=xt!==null&&xt.next!==null;if(Yi=0,Zt=xt=We=null,Gu=!1,Ll=0,Qs=null,a)throw Error(r(300));i===null||ln||(i=i.dependencies,i!==null&&Vu(i)&&(ln=!0))}function rw(i,a,c,f){We=i;var y=0;do{if(Ws&&(Qs=null),Ll=0,Ws=!1,25<=y)throw Error(r(301));if(y+=1,Zt=xt=null,i.updateQueue!=null){var b=i.updateQueue;b.lastEffect=null,b.events=null,b.stores=null,b.memoCache!=null&&(b.memoCache.index=0)}I.H=IO,b=a(c,f)}while(Ws);return b}function MO(){var i=I.H,a=i.useState()[0];return a=typeof a.then=="function"?Il(a):a,i=i.useState()[0],(xt!==null?xt.memoizedState:null)!==i&&(We.flags|=1024),a}function Pm(){var i=Yu!==0;return Yu=0,i}function zm(i,a,c){a.updateQueue=i.updateQueue,a.flags&=-2053,i.lanes&=~c}function Lm(i){if(Gu){for(i=i.memoizedState;i!==null;){var a=i.queue;a!==null&&(a.pending=null),i=i.next}Gu=!1}Yi=0,Zt=xt=We=null,Ws=!1,Ll=Yu=0,Qs=null}function In(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Zt===null?We.memoizedState=Zt=i:Zt=Zt.next=i,Zt}function Xt(){if(xt===null){var i=We.alternate;i=i!==null?i.memoizedState:null}else i=xt.next;var a=Zt===null?We.memoizedState:Zt.next;if(a!==null)Zt=a,xt=i;else{if(i===null)throw We.alternate===null?Error(r(467)):Error(r(310));xt=i,i={memoizedState:xt.memoizedState,baseState:xt.baseState,baseQueue:xt.baseQueue,queue:xt.queue,next:null},Zt===null?We.memoizedState=Zt=i:Zt=Zt.next=i}return Zt}function Im(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Il(i){var a=Ll;return Ll+=1,Qs===null&&(Qs=[]),i=Kb(Qs,i,a),a=We,(Zt===null?a.memoizedState:Zt.next)===null&&(a=a.alternate,I.H=a===null||a.memoizedState===null?Iw:Bw),i}function Zu(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return Il(i);if(i.$$typeof===O)return kn(i)}throw Error(r(438,String(i)))}function Bm(i){var a=null,c=We.updateQueue;if(c!==null&&(a=c.memoCache),a==null){var f=We.alternate;f!==null&&(f=f.updateQueue,f!==null&&(f=f.memoCache,f!=null&&(a={data:f.data.map(function(y){return y.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),c===null&&(c=Im(),We.updateQueue=c),c.memoCache=a,c=a.data[a.index],c===void 0)for(c=a.data[a.index]=Array(i),f=0;f<i;f++)c[f]=D;return a.index++,c}function vi(i,a){return typeof a=="function"?a(i):a}function Xu(i){var a=Xt();return Vm(a,xt,i)}function Vm(i,a,c){var f=i.queue;if(f===null)throw Error(r(311));f.lastRenderedReducer=c;var y=i.baseQueue,b=f.pending;if(b!==null){if(y!==null){var _=y.next;y.next=b.next,b.next=_}a.baseQueue=y=b,f.pending=null}if(b=i.baseState,y===null)i.memoizedState=b;else{a=y.next;var L=_=null,U=null,ie=a,de=!1;do{var he=ie.lane&-536870913;if(he!==ie.lane?(ct&he)===he:(Yi&he)===he){var ae=ie.revertLane;if(ae===0)U!==null&&(U=U.next={lane:0,revertLane:0,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null}),he===Zs&&(de=!0);else if((Yi&ae)===ae){ie=ie.next,ae===Zs&&(de=!0);continue}else he={lane:0,revertLane:ie.revertLane,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null},U===null?(L=U=he,_=b):U=U.next=he,We.lanes|=ae,ea|=ae;he=ie.action,Ka&&c(b,he),b=ie.hasEagerState?ie.eagerState:c(b,he)}else ae={lane:he,revertLane:ie.revertLane,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null},U===null?(L=U=ae,_=b):U=U.next=ae,We.lanes|=he,ea|=he;ie=ie.next}while(ie!==null&&ie!==a);if(U===null?_=b:U.next=L,!Zn(b,i.memoizedState)&&(ln=!0,de&&(c=Xs,c!==null)))throw c;i.memoizedState=b,i.baseState=_,i.baseQueue=U,f.lastRenderedState=b}return y===null&&(f.lanes=0),[i.memoizedState,f.dispatch]}function Um(i){var a=Xt(),c=a.queue;if(c===null)throw Error(r(311));c.lastRenderedReducer=i;var f=c.dispatch,y=c.pending,b=a.memoizedState;if(y!==null){c.pending=null;var _=y=y.next;do b=i(b,_.action),_=_.next;while(_!==y);Zn(b,a.memoizedState)||(ln=!0),a.memoizedState=b,a.baseQueue===null&&(a.baseState=b),c.lastRenderedState=b}return[b,f]}function iw(i,a,c){var f=We,y=Xt(),b=ht;if(b){if(c===void 0)throw Error(r(407));c=c()}else c=a();var _=!Zn((xt||y).memoizedState,c);_&&(y.memoizedState=c,ln=!0),y=y.queue;var L=ow.bind(null,f,y,i);if(Bl(2048,8,L,[i]),y.getSnapshot!==a||_||Zt!==null&&Zt.memoizedState.tag&1){if(f.flags|=2048,Js(9,Ku(),sw.bind(null,f,y,c,a),null),Et===null)throw Error(r(349));b||(Yi&124)!==0||aw(f,a,c)}return c}function aw(i,a,c){i.flags|=16384,i={getSnapshot:a,value:c},a=We.updateQueue,a===null?(a=Im(),We.updateQueue=a,a.stores=[i]):(c=a.stores,c===null?a.stores=[i]:c.push(i))}function sw(i,a,c,f){a.value=c,a.getSnapshot=f,lw(a)&&cw(i)}function ow(i,a,c){return c(function(){lw(a)&&cw(i)})}function lw(i){var a=i.getSnapshot;i=i.value;try{var c=a();return!Zn(i,c)}catch{return!0}}function cw(i){var a=$s(i,2);a!==null&&er(a,i,2)}function Hm(i){var a=In();if(typeof i=="function"){var c=i;if(i=c(),Ka){Oe(!0);try{c()}finally{Oe(!1)}}}return a.memoizedState=a.baseState=i,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:vi,lastRenderedState:i},a}function uw(i,a,c,f){return i.baseState=c,Vm(i,xt,typeof f=="function"?f:vi)}function OO(i,a,c,f,y){if(Qu(i))throw Error(r(485));if(i=a.action,i!==null){var b={payload:y,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(_){b.listeners.push(_)}};I.T!==null?c(!0):b.isTransition=!1,f(b),c=a.pending,c===null?(b.next=a.pending=b,dw(a,b)):(b.next=c.next,a.pending=c.next=b)}}function dw(i,a){var c=a.action,f=a.payload,y=i.state;if(a.isTransition){var b=I.T,_={};I.T=_;try{var L=c(y,f),U=I.S;U!==null&&U(_,L),fw(i,a,L)}catch(ie){Fm(i,a,ie)}finally{I.T=b}}else try{b=c(y,f),fw(i,a,b)}catch(ie){Fm(i,a,ie)}}function fw(i,a,c){c!==null&&typeof c=="object"&&typeof c.then=="function"?c.then(function(f){hw(i,a,f)},function(f){return Fm(i,a,f)}):hw(i,a,c)}function hw(i,a,c){a.status="fulfilled",a.value=c,mw(a),i.state=c,a=i.pending,a!==null&&(c=a.next,c===a?i.pending=null:(c=c.next,a.next=c,dw(i,c)))}function Fm(i,a,c){var f=i.pending;if(i.pending=null,f!==null){f=f.next;do a.status="rejected",a.reason=c,mw(a),a=a.next;while(a!==f)}i.action=null}function mw(i){i=i.listeners;for(var a=0;a<i.length;a++)(0,i[a])()}function pw(i,a){return a}function gw(i,a){if(ht){var c=Et.formState;if(c!==null){e:{var f=We;if(ht){if(Ot){t:{for(var y=Ot,b=$r;y.nodeType!==8;){if(!b){y=null;break t}if(y=Or(y.nextSibling),y===null){y=null;break t}}b=y.data,y=b==="F!"||b==="F"?y:null}if(y){Ot=Or(y.nextSibling),f=y.data==="F!";break e}}Ga(f)}f=!1}f&&(a=c[0])}}return c=In(),c.memoizedState=c.baseState=a,f={pending:null,lanes:0,dispatch:null,lastRenderedReducer:pw,lastRenderedState:a},c.queue=f,c=Pw.bind(null,We,f),f.dispatch=c,f=Hm(!1),b=Zm.bind(null,We,!1,f.queue),f=In(),y={state:a,dispatch:null,action:i,pending:null},f.queue=y,c=OO.bind(null,We,y,b,c),y.dispatch=c,f.memoizedState=i,[a,c,!1]}function yw(i){var a=Xt();return xw(a,xt,i)}function xw(i,a,c){if(a=Vm(i,a,pw)[0],i=Xu(vi)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var f=Il(a)}catch(_){throw _===Ml?Fu:_}else f=a;a=Xt();var y=a.queue,b=y.dispatch;return c!==a.memoizedState&&(We.flags|=2048,Js(9,Ku(),DO.bind(null,y,c),null)),[f,b,i]}function DO(i,a){i.action=a}function vw(i){var a=Xt(),c=xt;if(c!==null)return xw(a,c,i);Xt(),a=a.memoizedState,c=Xt();var f=c.queue.dispatch;return c.memoizedState=i,[a,f,!1]}function Js(i,a,c,f){return i={tag:i,create:c,deps:f,inst:a,next:null},a=We.updateQueue,a===null&&(a=Im(),We.updateQueue=a),c=a.lastEffect,c===null?a.lastEffect=i.next=i:(f=c.next,c.next=i,i.next=f,a.lastEffect=i),i}function Ku(){return{destroy:void 0,resource:void 0}}function bw(){return Xt().memoizedState}function Wu(i,a,c,f){var y=In();f=f===void 0?null:f,We.flags|=i,y.memoizedState=Js(1|a,Ku(),c,f)}function Bl(i,a,c,f){var y=Xt();f=f===void 0?null:f;var b=y.memoizedState.inst;xt!==null&&f!==null&&Om(f,xt.memoizedState.deps)?y.memoizedState=Js(a,b,c,f):(We.flags|=i,y.memoizedState=Js(1|a,b,c,f))}function ww(i,a){Wu(8390656,8,i,a)}function Sw(i,a){Bl(2048,8,i,a)}function Cw(i,a){return Bl(4,2,i,a)}function kw(i,a){return Bl(4,4,i,a)}function Tw(i,a){if(typeof a=="function"){i=i();var c=a(i);return function(){typeof c=="function"?c():a(null)}}if(a!=null)return i=i(),a.current=i,function(){a.current=null}}function Ew(i,a,c){c=c!=null?c.concat([i]):null,Bl(4,4,Tw.bind(null,a,i),c)}function $m(){}function _w(i,a){var c=Xt();a=a===void 0?null:a;var f=c.memoizedState;return a!==null&&Om(a,f[1])?f[0]:(c.memoizedState=[i,a],i)}function jw(i,a){var c=Xt();a=a===void 0?null:a;var f=c.memoizedState;if(a!==null&&Om(a,f[1]))return f[0];if(f=i(),Ka){Oe(!0);try{i()}finally{Oe(!1)}}return c.memoizedState=[f,a],f}function qm(i,a,c){return c===void 0||(Yi&1073741824)!==0?i.memoizedState=a:(i.memoizedState=c,i=R1(),We.lanes|=i,ea|=i,c)}function Nw(i,a,c,f){return Zn(c,a)?c:Ks.current!==null?(i=qm(i,c,f),Zn(i,a)||(ln=!0),i):(Yi&42)===0?(ln=!0,i.memoizedState=c):(i=R1(),We.lanes|=i,ea|=i,a)}function Aw(i,a,c,f,y){var b=F.p;F.p=b!==0&&8>b?b:8;var _=I.T,L={};I.T=L,Zm(i,!1,a,c);try{var U=y(),ie=I.S;if(ie!==null&&ie(L,U),U!==null&&typeof U=="object"&&typeof U.then=="function"){var de=AO(U,f);Vl(i,a,de,Jn(i))}else Vl(i,a,f,Jn(i))}catch(he){Vl(i,a,{then:function(){},status:"rejected",reason:he},Jn())}finally{F.p=b,I.T=_}}function PO(){}function Gm(i,a,c,f){if(i.tag!==5)throw Error(r(476));var y=Rw(i).queue;Aw(i,y,a,V,c===null?PO:function(){return Mw(i),c(f)})}function Rw(i){var a=i.memoizedState;if(a!==null)return a;a={memoizedState:V,baseState:V,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:vi,lastRenderedState:V},next:null};var c={};return a.next={memoizedState:c,baseState:c,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:vi,lastRenderedState:c},next:null},i.memoizedState=a,i=i.alternate,i!==null&&(i.memoizedState=a),a}function Mw(i){var a=Rw(i).next.queue;Vl(i,a,{},Jn())}function Ym(){return kn(ic)}function Ow(){return Xt().memoizedState}function Dw(){return Xt().memoizedState}function zO(i){for(var a=i.return;a!==null;){switch(a.tag){case 24:case 3:var c=Jn();i=qi(c);var f=Gi(a,i,c);f!==null&&(er(f,a,c),Dl(f,a,c)),a={cache:Cm()},i.payload=a;return}a=a.return}}function LO(i,a,c){var f=Jn();c={lane:f,revertLane:0,action:c,hasEagerState:!1,eagerState:null,next:null},Qu(i)?zw(a,c):(c=hm(i,a,c,f),c!==null&&(er(c,i,f),Lw(c,a,f)))}function Pw(i,a,c){var f=Jn();Vl(i,a,c,f)}function Vl(i,a,c,f){var y={lane:f,revertLane:0,action:c,hasEagerState:!1,eagerState:null,next:null};if(Qu(i))zw(a,y);else{var b=i.alternate;if(i.lanes===0&&(b===null||b.lanes===0)&&(b=a.lastRenderedReducer,b!==null))try{var _=a.lastRenderedState,L=b(_,c);if(y.hasEagerState=!0,y.eagerState=L,Zn(L,_))return Pu(i,a,y,0),Et===null&&Du(),!1}catch{}finally{}if(c=hm(i,a,y,f),c!==null)return er(c,i,f),Lw(c,a,f),!0}return!1}function Zm(i,a,c,f){if(f={lane:2,revertLane:Ep(),action:f,hasEagerState:!1,eagerState:null,next:null},Qu(i)){if(a)throw Error(r(479))}else a=hm(i,c,f,2),a!==null&&er(a,i,2)}function Qu(i){var a=i.alternate;return i===We||a!==null&&a===We}function zw(i,a){Ws=Gu=!0;var c=i.pending;c===null?a.next=a:(a.next=c.next,c.next=a),i.pending=a}function Lw(i,a,c){if((c&4194048)!==0){var f=a.lanes;f&=i.pendingLanes,c|=f,a.lanes=c,Vt(i,c)}}var Ju={readContext:kn,use:Zu,useCallback:Ft,useContext:Ft,useEffect:Ft,useImperativeHandle:Ft,useLayoutEffect:Ft,useInsertionEffect:Ft,useMemo:Ft,useReducer:Ft,useRef:Ft,useState:Ft,useDebugValue:Ft,useDeferredValue:Ft,useTransition:Ft,useSyncExternalStore:Ft,useId:Ft,useHostTransitionStatus:Ft,useFormState:Ft,useActionState:Ft,useOptimistic:Ft,useMemoCache:Ft,useCacheRefresh:Ft},Iw={readContext:kn,use:Zu,useCallback:function(i,a){return In().memoizedState=[i,a===void 0?null:a],i},useContext:kn,useEffect:ww,useImperativeHandle:function(i,a,c){c=c!=null?c.concat([i]):null,Wu(4194308,4,Tw.bind(null,a,i),c)},useLayoutEffect:function(i,a){return Wu(4194308,4,i,a)},useInsertionEffect:function(i,a){Wu(4,2,i,a)},useMemo:function(i,a){var c=In();a=a===void 0?null:a;var f=i();if(Ka){Oe(!0);try{i()}finally{Oe(!1)}}return c.memoizedState=[f,a],f},useReducer:function(i,a,c){var f=In();if(c!==void 0){var y=c(a);if(Ka){Oe(!0);try{c(a)}finally{Oe(!1)}}}else y=a;return f.memoizedState=f.baseState=y,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:y},f.queue=i,i=i.dispatch=LO.bind(null,We,i),[f.memoizedState,i]},useRef:function(i){var a=In();return i={current:i},a.memoizedState=i},useState:function(i){i=Hm(i);var a=i.queue,c=Pw.bind(null,We,a);return a.dispatch=c,[i.memoizedState,c]},useDebugValue:$m,useDeferredValue:function(i,a){var c=In();return qm(c,i,a)},useTransition:function(){var i=Hm(!1);return i=Aw.bind(null,We,i.queue,!0,!1),In().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,a,c){var f=We,y=In();if(ht){if(c===void 0)throw Error(r(407));c=c()}else{if(c=a(),Et===null)throw Error(r(349));(ct&124)!==0||aw(f,a,c)}y.memoizedState=c;var b={value:c,getSnapshot:a};return y.queue=b,ww(ow.bind(null,f,b,i),[i]),f.flags|=2048,Js(9,Ku(),sw.bind(null,f,b,c,a),null),c},useId:function(){var i=In(),a=Et.identifierPrefix;if(ht){var c=gi,f=pi;c=(f&~(1<<32-De(f)-1)).toString(32)+c,a="«"+a+"R"+c,c=Yu++,0<c&&(a+="H"+c.toString(32)),a+="»"}else c=RO++,a="«"+a+"r"+c.toString(32)+"»";return i.memoizedState=a},useHostTransitionStatus:Ym,useFormState:gw,useActionState:gw,useOptimistic:function(i){var a=In();a.memoizedState=a.baseState=i;var c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=c,a=Zm.bind(null,We,!0,c),c.dispatch=a,[i,a]},useMemoCache:Bm,useCacheRefresh:function(){return In().memoizedState=zO.bind(null,We)}},Bw={readContext:kn,use:Zu,useCallback:_w,useContext:kn,useEffect:Sw,useImperativeHandle:Ew,useInsertionEffect:Cw,useLayoutEffect:kw,useMemo:jw,useReducer:Xu,useRef:bw,useState:function(){return Xu(vi)},useDebugValue:$m,useDeferredValue:function(i,a){var c=Xt();return Nw(c,xt.memoizedState,i,a)},useTransition:function(){var i=Xu(vi)[0],a=Xt().memoizedState;return[typeof i=="boolean"?i:Il(i),a]},useSyncExternalStore:iw,useId:Ow,useHostTransitionStatus:Ym,useFormState:yw,useActionState:yw,useOptimistic:function(i,a){var c=Xt();return uw(c,xt,i,a)},useMemoCache:Bm,useCacheRefresh:Dw},IO={readContext:kn,use:Zu,useCallback:_w,useContext:kn,useEffect:Sw,useImperativeHandle:Ew,useInsertionEffect:Cw,useLayoutEffect:kw,useMemo:jw,useReducer:Um,useRef:bw,useState:function(){return Um(vi)},useDebugValue:$m,useDeferredValue:function(i,a){var c=Xt();return xt===null?qm(c,i,a):Nw(c,xt.memoizedState,i,a)},useTransition:function(){var i=Um(vi)[0],a=Xt().memoizedState;return[typeof i=="boolean"?i:Il(i),a]},useSyncExternalStore:iw,useId:Ow,useHostTransitionStatus:Ym,useFormState:vw,useActionState:vw,useOptimistic:function(i,a){var c=Xt();return xt!==null?uw(c,xt,i,a):(c.baseState=i,[i,c.queue.dispatch])},useMemoCache:Bm,useCacheRefresh:Dw},eo=null,Ul=0;function ed(i){var a=Ul;return Ul+=1,eo===null&&(eo=[]),Kb(eo,i,a)}function Hl(i,a){a=a.props.ref,i.ref=a!==void 0?a:null}function td(i,a){throw a.$$typeof===p?Error(r(525)):(i=Object.prototype.toString.call(a),Error(r(31,i==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":i)))}function Vw(i){var a=i._init;return a(i._payload)}function Uw(i){function a(J,q){if(i){var ne=J.deletions;ne===null?(J.deletions=[q],J.flags|=16):ne.push(q)}}function c(J,q){if(!i)return null;for(;q!==null;)a(J,q),q=q.sibling;return null}function f(J){for(var q=new Map;J!==null;)J.key!==null?q.set(J.key,J):q.set(J.index,J),J=J.sibling;return q}function y(J,q){return J=mi(J,q),J.index=0,J.sibling=null,J}function b(J,q,ne){return J.index=ne,i?(ne=J.alternate,ne!==null?(ne=ne.index,ne<q?(J.flags|=67108866,q):ne):(J.flags|=67108866,q)):(J.flags|=1048576,q)}function _(J){return i&&J.alternate===null&&(J.flags|=67108866),J}function L(J,q,ne,fe){return q===null||q.tag!==6?(q=pm(ne,J.mode,fe),q.return=J,q):(q=y(q,ne),q.return=J,q)}function U(J,q,ne,fe){var Ee=ne.type;return Ee===S?de(J,q,ne.props.children,fe,ne.key):q!==null&&(q.elementType===Ee||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===P&&Vw(Ee)===q.type)?(q=y(q,ne.props),Hl(q,ne),q.return=J,q):(q=Lu(ne.type,ne.key,ne.props,null,J.mode,fe),Hl(q,ne),q.return=J,q)}function ie(J,q,ne,fe){return q===null||q.tag!==4||q.stateNode.containerInfo!==ne.containerInfo||q.stateNode.implementation!==ne.implementation?(q=gm(ne,J.mode,fe),q.return=J,q):(q=y(q,ne.children||[]),q.return=J,q)}function de(J,q,ne,fe,Ee){return q===null||q.tag!==7?(q=Ha(ne,J.mode,fe,Ee),q.return=J,q):(q=y(q,ne),q.return=J,q)}function he(J,q,ne){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return q=pm(""+q,J.mode,ne),q.return=J,q;if(typeof q=="object"&&q!==null){switch(q.$$typeof){case x:return ne=Lu(q.type,q.key,q.props,null,J.mode,ne),Hl(ne,q),ne.return=J,ne;case v:return q=gm(q,J.mode,ne),q.return=J,q;case P:var fe=q._init;return q=fe(q._payload),he(J,q,ne)}if(te(q)||$(q))return q=Ha(q,J.mode,ne,null),q.return=J,q;if(typeof q.then=="function")return he(J,ed(q),ne);if(q.$$typeof===O)return he(J,Uu(J,q),ne);td(J,q)}return null}function ae(J,q,ne,fe){var Ee=q!==null?q.key:null;if(typeof ne=="string"&&ne!==""||typeof ne=="number"||typeof ne=="bigint")return Ee!==null?null:L(J,q,""+ne,fe);if(typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case x:return ne.key===Ee?U(J,q,ne,fe):null;case v:return ne.key===Ee?ie(J,q,ne,fe):null;case P:return Ee=ne._init,ne=Ee(ne._payload),ae(J,q,ne,fe)}if(te(ne)||$(ne))return Ee!==null?null:de(J,q,ne,fe,null);if(typeof ne.then=="function")return ae(J,q,ed(ne),fe);if(ne.$$typeof===O)return ae(J,q,Uu(J,ne),fe);td(J,ne)}return null}function se(J,q,ne,fe,Ee){if(typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint")return J=J.get(ne)||null,L(q,J,""+fe,Ee);if(typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case x:return J=J.get(fe.key===null?ne:fe.key)||null,U(q,J,fe,Ee);case v:return J=J.get(fe.key===null?ne:fe.key)||null,ie(q,J,fe,Ee);case P:var et=fe._init;return fe=et(fe._payload),se(J,q,ne,fe,Ee)}if(te(fe)||$(fe))return J=J.get(ne)||null,de(q,J,fe,Ee,null);if(typeof fe.then=="function")return se(J,q,ne,ed(fe),Ee);if(fe.$$typeof===O)return se(J,q,ne,Uu(q,fe),Ee);td(q,fe)}return null}function Ie(J,q,ne,fe){for(var Ee=null,et=null,Re=q,Le=q=0,un=null;Re!==null&&Le<ne.length;Le++){Re.index>Le?(un=Re,Re=null):un=Re.sibling;var ft=ae(J,Re,ne[Le],fe);if(ft===null){Re===null&&(Re=un);break}i&&Re&&ft.alternate===null&&a(J,Re),q=b(ft,q,Le),et===null?Ee=ft:et.sibling=ft,et=ft,Re=un}if(Le===ne.length)return c(J,Re),ht&&$a(J,Le),Ee;if(Re===null){for(;Le<ne.length;Le++)Re=he(J,ne[Le],fe),Re!==null&&(q=b(Re,q,Le),et===null?Ee=Re:et.sibling=Re,et=Re);return ht&&$a(J,Le),Ee}for(Re=f(Re);Le<ne.length;Le++)un=se(Re,J,Le,ne[Le],fe),un!==null&&(i&&un.alternate!==null&&Re.delete(un.key===null?Le:un.key),q=b(un,q,Le),et===null?Ee=un:et.sibling=un,et=un);return i&&Re.forEach(function(ca){return a(J,ca)}),ht&&$a(J,Le),Ee}function ze(J,q,ne,fe){if(ne==null)throw Error(r(151));for(var Ee=null,et=null,Re=q,Le=q=0,un=null,ft=ne.next();Re!==null&&!ft.done;Le++,ft=ne.next()){Re.index>Le?(un=Re,Re=null):un=Re.sibling;var ca=ae(J,Re,ft.value,fe);if(ca===null){Re===null&&(Re=un);break}i&&Re&&ca.alternate===null&&a(J,Re),q=b(ca,q,Le),et===null?Ee=ca:et.sibling=ca,et=ca,Re=un}if(ft.done)return c(J,Re),ht&&$a(J,Le),Ee;if(Re===null){for(;!ft.done;Le++,ft=ne.next())ft=he(J,ft.value,fe),ft!==null&&(q=b(ft,q,Le),et===null?Ee=ft:et.sibling=ft,et=ft);return ht&&$a(J,Le),Ee}for(Re=f(Re);!ft.done;Le++,ft=ne.next())ft=se(Re,J,Le,ft.value,fe),ft!==null&&(i&&ft.alternate!==null&&Re.delete(ft.key===null?Le:ft.key),q=b(ft,q,Le),et===null?Ee=ft:et.sibling=ft,et=ft);return i&&Re.forEach(function(BD){return a(J,BD)}),ht&&$a(J,Le),Ee}function bt(J,q,ne,fe){if(typeof ne=="object"&&ne!==null&&ne.type===S&&ne.key===null&&(ne=ne.props.children),typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case x:e:{for(var Ee=ne.key;q!==null;){if(q.key===Ee){if(Ee=ne.type,Ee===S){if(q.tag===7){c(J,q.sibling),fe=y(q,ne.props.children),fe.return=J,J=fe;break e}}else if(q.elementType===Ee||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===P&&Vw(Ee)===q.type){c(J,q.sibling),fe=y(q,ne.props),Hl(fe,ne),fe.return=J,J=fe;break e}c(J,q);break}else a(J,q);q=q.sibling}ne.type===S?(fe=Ha(ne.props.children,J.mode,fe,ne.key),fe.return=J,J=fe):(fe=Lu(ne.type,ne.key,ne.props,null,J.mode,fe),Hl(fe,ne),fe.return=J,J=fe)}return _(J);case v:e:{for(Ee=ne.key;q!==null;){if(q.key===Ee)if(q.tag===4&&q.stateNode.containerInfo===ne.containerInfo&&q.stateNode.implementation===ne.implementation){c(J,q.sibling),fe=y(q,ne.children||[]),fe.return=J,J=fe;break e}else{c(J,q);break}else a(J,q);q=q.sibling}fe=gm(ne,J.mode,fe),fe.return=J,J=fe}return _(J);case P:return Ee=ne._init,ne=Ee(ne._payload),bt(J,q,ne,fe)}if(te(ne))return Ie(J,q,ne,fe);if($(ne)){if(Ee=$(ne),typeof Ee!="function")throw Error(r(150));return ne=Ee.call(ne),ze(J,q,ne,fe)}if(typeof ne.then=="function")return bt(J,q,ed(ne),fe);if(ne.$$typeof===O)return bt(J,q,Uu(J,ne),fe);td(J,ne)}return typeof ne=="string"&&ne!==""||typeof ne=="number"||typeof ne=="bigint"?(ne=""+ne,q!==null&&q.tag===6?(c(J,q.sibling),fe=y(q,ne),fe.return=J,J=fe):(c(J,q),fe=pm(ne,J.mode,fe),fe.return=J,J=fe),_(J)):c(J,q)}return function(J,q,ne,fe){try{Ul=0;var Ee=bt(J,q,ne,fe);return eo=null,Ee}catch(Re){if(Re===Ml||Re===Fu)throw Re;var et=Xn(29,Re,null,J.mode);return et.lanes=fe,et.return=J,et}finally{}}}var to=Uw(!0),Hw=Uw(!1),gr=G(null),qr=null;function Zi(i){var a=i.alternate;j(nn,nn.current&1),j(gr,i),qr===null&&(a===null||Ks.current!==null||a.memoizedState!==null)&&(qr=i)}function Fw(i){if(i.tag===22){if(j(nn,nn.current),j(gr,i),qr===null){var a=i.alternate;a!==null&&a.memoizedState!==null&&(qr=i)}}else Xi()}function Xi(){j(nn,nn.current),j(gr,gr.current)}function bi(i){le(gr),qr===i&&(qr=null),le(nn)}var nn=G(0);function nd(i){for(var a=i;a!==null;){if(a.tag===13){var c=a.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||c.data==="$?"||Ip(c)))return a}else if(a.tag===19&&a.memoizedProps.revealOrder!==void 0){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===i)break;for(;a.sibling===null;){if(a.return===null||a.return===i)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}function Xm(i,a,c,f){a=i.memoizedState,c=c(f,a),c=c==null?a:g({},a,c),i.memoizedState=c,i.lanes===0&&(i.updateQueue.baseState=c)}var Km={enqueueSetState:function(i,a,c){i=i._reactInternals;var f=Jn(),y=qi(f);y.payload=a,c!=null&&(y.callback=c),a=Gi(i,y,f),a!==null&&(er(a,i,f),Dl(a,i,f))},enqueueReplaceState:function(i,a,c){i=i._reactInternals;var f=Jn(),y=qi(f);y.tag=1,y.payload=a,c!=null&&(y.callback=c),a=Gi(i,y,f),a!==null&&(er(a,i,f),Dl(a,i,f))},enqueueForceUpdate:function(i,a){i=i._reactInternals;var c=Jn(),f=qi(c);f.tag=2,a!=null&&(f.callback=a),a=Gi(i,f,c),a!==null&&(er(a,i,c),Dl(a,i,c))}};function $w(i,a,c,f,y,b,_){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(f,b,_):a.prototype&&a.prototype.isPureReactComponent?!kl(c,f)||!kl(y,b):!0}function qw(i,a,c,f){i=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(c,f),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(c,f),a.state!==i&&Km.enqueueReplaceState(a,a.state,null)}function Wa(i,a){var c=a;if("ref"in a){c={};for(var f in a)f!=="ref"&&(c[f]=a[f])}if(i=i.defaultProps){c===a&&(c=g({},c));for(var y in i)c[y]===void 0&&(c[y]=i[y])}return c}var rd=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof i=="object"&&i!==null&&typeof i.message=="string"?String(i.message):String(i),error:i});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)};function Gw(i){rd(i)}function Yw(i){console.error(i)}function Zw(i){rd(i)}function id(i,a){try{var c=i.onUncaughtError;c(a.value,{componentStack:a.stack})}catch(f){setTimeout(function(){throw f})}}function Xw(i,a,c){try{var f=i.onCaughtError;f(c.value,{componentStack:c.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(y){setTimeout(function(){throw y})}}function Wm(i,a,c){return c=qi(c),c.tag=3,c.payload={element:null},c.callback=function(){id(i,a)},c}function Kw(i){return i=qi(i),i.tag=3,i}function Ww(i,a,c,f){var y=c.type.getDerivedStateFromError;if(typeof y=="function"){var b=f.value;i.payload=function(){return y(b)},i.callback=function(){Xw(a,c,f)}}var _=c.stateNode;_!==null&&typeof _.componentDidCatch=="function"&&(i.callback=function(){Xw(a,c,f),typeof y!="function"&&(ta===null?ta=new Set([this]):ta.add(this));var L=f.stack;this.componentDidCatch(f.value,{componentStack:L!==null?L:""})})}function BO(i,a,c,f,y){if(c.flags|=32768,f!==null&&typeof f=="object"&&typeof f.then=="function"){if(a=c.alternate,a!==null&&Nl(a,c,y,!0),c=gr.current,c!==null){switch(c.tag){case 13:return qr===null?wp():c.alternate===null&&Dt===0&&(Dt=3),c.flags&=-257,c.flags|=65536,c.lanes=y,f===Em?c.flags|=16384:(a=c.updateQueue,a===null?c.updateQueue=new Set([f]):a.add(f),Cp(i,f,y)),!1;case 22:return c.flags|=65536,f===Em?c.flags|=16384:(a=c.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([f])},c.updateQueue=a):(c=a.retryQueue,c===null?a.retryQueue=new Set([f]):c.add(f)),Cp(i,f,y)),!1}throw Error(r(435,c.tag))}return Cp(i,f,y),wp(),!1}if(ht)return a=gr.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=y,f!==vm&&(i=Error(r(422),{cause:f}),jl(fr(i,c)))):(f!==vm&&(a=Error(r(423),{cause:f}),jl(fr(a,c))),i=i.current.alternate,i.flags|=65536,y&=-y,i.lanes|=y,f=fr(f,c),y=Wm(i.stateNode,f,y),Nm(i,y),Dt!==4&&(Dt=2)),!1;var b=Error(r(520),{cause:f});if(b=fr(b,c),Xl===null?Xl=[b]:Xl.push(b),Dt!==4&&(Dt=2),a===null)return!0;f=fr(f,c),c=a;do{switch(c.tag){case 3:return c.flags|=65536,i=y&-y,c.lanes|=i,i=Wm(c.stateNode,f,i),Nm(c,i),!1;case 1:if(a=c.type,b=c.stateNode,(c.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(ta===null||!ta.has(b))))return c.flags|=65536,y&=-y,c.lanes|=y,y=Kw(y),Ww(y,i,c,f),Nm(c,y),!1}c=c.return}while(c!==null);return!1}var Qw=Error(r(461)),ln=!1;function hn(i,a,c,f){a.child=i===null?Hw(a,null,c,f):to(a,i.child,c,f)}function Jw(i,a,c,f,y){c=c.render;var b=a.ref;if("ref"in f){var _={};for(var L in f)L!=="ref"&&(_[L]=f[L])}else _=f;return Za(a),f=Dm(i,a,c,_,b,y),L=Pm(),i!==null&&!ln?(zm(i,a,y),wi(i,a,y)):(ht&&L&&ym(a),a.flags|=1,hn(i,a,f,y),a.child)}function e1(i,a,c,f,y){if(i===null){var b=c.type;return typeof b=="function"&&!mm(b)&&b.defaultProps===void 0&&c.compare===null?(a.tag=15,a.type=b,t1(i,a,b,f,y)):(i=Lu(c.type,null,f,a,a.mode,y),i.ref=a.ref,i.return=a,a.child=i)}if(b=i.child,!ap(i,y)){var _=b.memoizedProps;if(c=c.compare,c=c!==null?c:kl,c(_,f)&&i.ref===a.ref)return wi(i,a,y)}return a.flags|=1,i=mi(b,f),i.ref=a.ref,i.return=a,a.child=i}function t1(i,a,c,f,y){if(i!==null){var b=i.memoizedProps;if(kl(b,f)&&i.ref===a.ref)if(ln=!1,a.pendingProps=f=b,ap(i,y))(i.flags&131072)!==0&&(ln=!0);else return a.lanes=i.lanes,wi(i,a,y)}return Qm(i,a,c,f,y)}function n1(i,a,c){var f=a.pendingProps,y=f.children,b=i!==null?i.memoizedState:null;if(f.mode==="hidden"){if((a.flags&128)!==0){if(f=b!==null?b.baseLanes|c:c,i!==null){for(y=a.child=i.child,b=0;y!==null;)b=b|y.lanes|y.childLanes,y=y.sibling;a.childLanes=b&~f}else a.childLanes=0,a.child=null;return r1(i,a,f,c)}if((c&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},i!==null&&Hu(a,b!==null?b.cachePool:null),b!==null?tw(a,b):Rm(),Fw(a);else return a.lanes=a.childLanes=536870912,r1(i,a,b!==null?b.baseLanes|c:c,c)}else b!==null?(Hu(a,b.cachePool),tw(a,b),Xi(),a.memoizedState=null):(i!==null&&Hu(a,null),Rm(),Xi());return hn(i,a,y,c),a.child}function r1(i,a,c,f){var y=Tm();return y=y===null?null:{parent:tn._currentValue,pool:y},a.memoizedState={baseLanes:c,cachePool:y},i!==null&&Hu(a,null),Rm(),Fw(a),i!==null&&Nl(i,a,f,!0),null}function ad(i,a){var c=a.ref;if(c===null)i!==null&&i.ref!==null&&(a.flags|=4194816);else{if(typeof c!="function"&&typeof c!="object")throw Error(r(284));(i===null||i.ref!==c)&&(a.flags|=4194816)}}function Qm(i,a,c,f,y){return Za(a),c=Dm(i,a,c,f,void 0,y),f=Pm(),i!==null&&!ln?(zm(i,a,y),wi(i,a,y)):(ht&&f&&ym(a),a.flags|=1,hn(i,a,c,y),a.child)}function i1(i,a,c,f,y,b){return Za(a),a.updateQueue=null,c=rw(a,f,c,y),nw(i),f=Pm(),i!==null&&!ln?(zm(i,a,b),wi(i,a,b)):(ht&&f&&ym(a),a.flags|=1,hn(i,a,c,b),a.child)}function a1(i,a,c,f,y){if(Za(a),a.stateNode===null){var b=qs,_=c.contextType;typeof _=="object"&&_!==null&&(b=kn(_)),b=new c(f,b),a.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,b.updater=Km,a.stateNode=b,b._reactInternals=a,b=a.stateNode,b.props=f,b.state=a.memoizedState,b.refs={},_m(a),_=c.contextType,b.context=typeof _=="object"&&_!==null?kn(_):qs,b.state=a.memoizedState,_=c.getDerivedStateFromProps,typeof _=="function"&&(Xm(a,c,_,f),b.state=a.memoizedState),typeof c.getDerivedStateFromProps=="function"||typeof b.getSnapshotBeforeUpdate=="function"||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(_=b.state,typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount(),_!==b.state&&Km.enqueueReplaceState(b,b.state,null),zl(a,f,b,y),Pl(),b.state=a.memoizedState),typeof b.componentDidMount=="function"&&(a.flags|=4194308),f=!0}else if(i===null){b=a.stateNode;var L=a.memoizedProps,U=Wa(c,L);b.props=U;var ie=b.context,de=c.contextType;_=qs,typeof de=="object"&&de!==null&&(_=kn(de));var he=c.getDerivedStateFromProps;de=typeof he=="function"||typeof b.getSnapshotBeforeUpdate=="function",L=a.pendingProps!==L,de||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(L||ie!==_)&&qw(a,b,f,_),$i=!1;var ae=a.memoizedState;b.state=ae,zl(a,f,b,y),Pl(),ie=a.memoizedState,L||ae!==ie||$i?(typeof he=="function"&&(Xm(a,c,he,f),ie=a.memoizedState),(U=$i||$w(a,c,U,f,ae,ie,_))?(de||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount()),typeof b.componentDidMount=="function"&&(a.flags|=4194308)):(typeof b.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=f,a.memoizedState=ie),b.props=f,b.state=ie,b.context=_,f=U):(typeof b.componentDidMount=="function"&&(a.flags|=4194308),f=!1)}else{b=a.stateNode,jm(i,a),_=a.memoizedProps,de=Wa(c,_),b.props=de,he=a.pendingProps,ae=b.context,ie=c.contextType,U=qs,typeof ie=="object"&&ie!==null&&(U=kn(ie)),L=c.getDerivedStateFromProps,(ie=typeof L=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(_!==he||ae!==U)&&qw(a,b,f,U),$i=!1,ae=a.memoizedState,b.state=ae,zl(a,f,b,y),Pl();var se=a.memoizedState;_!==he||ae!==se||$i||i!==null&&i.dependencies!==null&&Vu(i.dependencies)?(typeof L=="function"&&(Xm(a,c,L,f),se=a.memoizedState),(de=$i||$w(a,c,de,f,ae,se,U)||i!==null&&i.dependencies!==null&&Vu(i.dependencies))?(ie||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(f,se,U),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(f,se,U)),typeof b.componentDidUpdate=="function"&&(a.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof b.componentDidUpdate!="function"||_===i.memoizedProps&&ae===i.memoizedState||(a.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||_===i.memoizedProps&&ae===i.memoizedState||(a.flags|=1024),a.memoizedProps=f,a.memoizedState=se),b.props=f,b.state=se,b.context=U,f=de):(typeof b.componentDidUpdate!="function"||_===i.memoizedProps&&ae===i.memoizedState||(a.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||_===i.memoizedProps&&ae===i.memoizedState||(a.flags|=1024),f=!1)}return b=f,ad(i,a),f=(a.flags&128)!==0,b||f?(b=a.stateNode,c=f&&typeof c.getDerivedStateFromError!="function"?null:b.render(),a.flags|=1,i!==null&&f?(a.child=to(a,i.child,null,y),a.child=to(a,null,c,y)):hn(i,a,c,y),a.memoizedState=b.state,i=a.child):i=wi(i,a,y),i}function s1(i,a,c,f){return _l(),a.flags|=256,hn(i,a,c,f),a.child}var Jm={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ep(i){return{baseLanes:i,cachePool:Yb()}}function tp(i,a,c){return i=i!==null?i.childLanes&~c:0,a&&(i|=yr),i}function o1(i,a,c){var f=a.pendingProps,y=!1,b=(a.flags&128)!==0,_;if((_=b)||(_=i!==null&&i.memoizedState===null?!1:(nn.current&2)!==0),_&&(y=!0,a.flags&=-129),_=(a.flags&32)!==0,a.flags&=-33,i===null){if(ht){if(y?Zi(a):Xi(),ht){var L=Ot,U;if(U=L){e:{for(U=L,L=$r;U.nodeType!==8;){if(!L){L=null;break e}if(U=Or(U.nextSibling),U===null){L=null;break e}}L=U}L!==null?(a.memoizedState={dehydrated:L,treeContext:Fa!==null?{id:pi,overflow:gi}:null,retryLane:536870912,hydrationErrors:null},U=Xn(18,null,null,0),U.stateNode=L,U.return=a,a.child=U,An=a,Ot=null,U=!0):U=!1}U||Ga(a)}if(L=a.memoizedState,L!==null&&(L=L.dehydrated,L!==null))return Ip(L)?a.lanes=32:a.lanes=536870912,null;bi(a)}return L=f.children,f=f.fallback,y?(Xi(),y=a.mode,L=sd({mode:"hidden",children:L},y),f=Ha(f,y,c,null),L.return=a,f.return=a,L.sibling=f,a.child=L,y=a.child,y.memoizedState=ep(c),y.childLanes=tp(i,_,c),a.memoizedState=Jm,f):(Zi(a),np(a,L))}if(U=i.memoizedState,U!==null&&(L=U.dehydrated,L!==null)){if(b)a.flags&256?(Zi(a),a.flags&=-257,a=rp(i,a,c)):a.memoizedState!==null?(Xi(),a.child=i.child,a.flags|=128,a=null):(Xi(),y=f.fallback,L=a.mode,f=sd({mode:"visible",children:f.children},L),y=Ha(y,L,c,null),y.flags|=2,f.return=a,y.return=a,f.sibling=y,a.child=f,to(a,i.child,null,c),f=a.child,f.memoizedState=ep(c),f.childLanes=tp(i,_,c),a.memoizedState=Jm,a=y);else if(Zi(a),Ip(L)){if(_=L.nextSibling&&L.nextSibling.dataset,_)var ie=_.dgst;_=ie,f=Error(r(419)),f.stack="",f.digest=_,jl({value:f,source:null,stack:null}),a=rp(i,a,c)}else if(ln||Nl(i,a,c,!1),_=(c&i.childLanes)!==0,ln||_){if(_=Et,_!==null&&(f=c&-c,f=(f&42)!==0?1:Yt(f),f=(f&(_.suspendedLanes|c))!==0?0:f,f!==0&&f!==U.retryLane))throw U.retryLane=f,$s(i,f),er(_,i,f),Qw;L.data==="$?"||wp(),a=rp(i,a,c)}else L.data==="$?"?(a.flags|=192,a.child=i.child,a=null):(i=U.treeContext,Ot=Or(L.nextSibling),An=a,ht=!0,qa=null,$r=!1,i!==null&&(mr[pr++]=pi,mr[pr++]=gi,mr[pr++]=Fa,pi=i.id,gi=i.overflow,Fa=a),a=np(a,f.children),a.flags|=4096);return a}return y?(Xi(),y=f.fallback,L=a.mode,U=i.child,ie=U.sibling,f=mi(U,{mode:"hidden",children:f.children}),f.subtreeFlags=U.subtreeFlags&65011712,ie!==null?y=mi(ie,y):(y=Ha(y,L,c,null),y.flags|=2),y.return=a,f.return=a,f.sibling=y,a.child=f,f=y,y=a.child,L=i.child.memoizedState,L===null?L=ep(c):(U=L.cachePool,U!==null?(ie=tn._currentValue,U=U.parent!==ie?{parent:ie,pool:ie}:U):U=Yb(),L={baseLanes:L.baseLanes|c,cachePool:U}),y.memoizedState=L,y.childLanes=tp(i,_,c),a.memoizedState=Jm,f):(Zi(a),c=i.child,i=c.sibling,c=mi(c,{mode:"visible",children:f.children}),c.return=a,c.sibling=null,i!==null&&(_=a.deletions,_===null?(a.deletions=[i],a.flags|=16):_.push(i)),a.child=c,a.memoizedState=null,c)}function np(i,a){return a=sd({mode:"visible",children:a},i.mode),a.return=i,i.child=a}function sd(i,a){return i=Xn(22,i,null,a),i.lanes=0,i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},i}function rp(i,a,c){return to(a,i.child,null,c),i=np(a,a.pendingProps.children),i.flags|=2,a.memoizedState=null,i}function l1(i,a,c){i.lanes|=a;var f=i.alternate;f!==null&&(f.lanes|=a),wm(i.return,a,c)}function ip(i,a,c,f,y){var b=i.memoizedState;b===null?i.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:f,tail:c,tailMode:y}:(b.isBackwards=a,b.rendering=null,b.renderingStartTime=0,b.last=f,b.tail=c,b.tailMode=y)}function c1(i,a,c){var f=a.pendingProps,y=f.revealOrder,b=f.tail;if(hn(i,a,f.children,c),f=nn.current,(f&2)!==0)f=f&1|2,a.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=a.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&l1(i,c,a);else if(i.tag===19)l1(i,c,a);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===a)break e;for(;i.sibling===null;){if(i.return===null||i.return===a)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}f&=1}switch(j(nn,f),y){case"forwards":for(c=a.child,y=null;c!==null;)i=c.alternate,i!==null&&nd(i)===null&&(y=c),c=c.sibling;c=y,c===null?(y=a.child,a.child=null):(y=c.sibling,c.sibling=null),ip(a,!1,y,c,b);break;case"backwards":for(c=null,y=a.child,a.child=null;y!==null;){if(i=y.alternate,i!==null&&nd(i)===null){a.child=y;break}i=y.sibling,y.sibling=c,c=y,y=i}ip(a,!0,c,null,b);break;case"together":ip(a,!1,null,null,void 0);break;default:a.memoizedState=null}return a.child}function wi(i,a,c){if(i!==null&&(a.dependencies=i.dependencies),ea|=a.lanes,(c&a.childLanes)===0)if(i!==null){if(Nl(i,a,c,!1),(c&a.childLanes)===0)return null}else return null;if(i!==null&&a.child!==i.child)throw Error(r(153));if(a.child!==null){for(i=a.child,c=mi(i,i.pendingProps),a.child=c,c.return=a;i.sibling!==null;)i=i.sibling,c=c.sibling=mi(i,i.pendingProps),c.return=a;c.sibling=null}return a.child}function ap(i,a){return(i.lanes&a)!==0?!0:(i=i.dependencies,!!(i!==null&&Vu(i)))}function VO(i,a,c){switch(a.tag){case 3:oe(a,a.stateNode.containerInfo),Fi(a,tn,i.memoizedState.cache),_l();break;case 27:case 5:me(a);break;case 4:oe(a,a.stateNode.containerInfo);break;case 10:Fi(a,a.type,a.memoizedProps.value);break;case 13:var f=a.memoizedState;if(f!==null)return f.dehydrated!==null?(Zi(a),a.flags|=128,null):(c&a.child.childLanes)!==0?o1(i,a,c):(Zi(a),i=wi(i,a,c),i!==null?i.sibling:null);Zi(a);break;case 19:var y=(i.flags&128)!==0;if(f=(c&a.childLanes)!==0,f||(Nl(i,a,c,!1),f=(c&a.childLanes)!==0),y){if(f)return c1(i,a,c);a.flags|=128}if(y=a.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),j(nn,nn.current),f)break;return null;case 22:case 23:return a.lanes=0,n1(i,a,c);case 24:Fi(a,tn,i.memoizedState.cache)}return wi(i,a,c)}function u1(i,a,c){if(i!==null)if(i.memoizedProps!==a.pendingProps)ln=!0;else{if(!ap(i,c)&&(a.flags&128)===0)return ln=!1,VO(i,a,c);ln=(i.flags&131072)!==0}else ln=!1,ht&&(a.flags&1048576)!==0&&Vb(a,Bu,a.index);switch(a.lanes=0,a.tag){case 16:e:{i=a.pendingProps;var f=a.elementType,y=f._init;if(f=y(f._payload),a.type=f,typeof f=="function")mm(f)?(i=Wa(f,i),a.tag=1,a=a1(null,a,f,i,c)):(a.tag=0,a=Qm(null,a,f,i,c));else{if(f!=null){if(y=f.$$typeof,y===A){a.tag=11,a=Jw(null,a,f,i,c);break e}else if(y===z){a.tag=14,a=e1(null,a,f,i,c);break e}}throw a=Y(f)||f,Error(r(306,a,""))}}return a;case 0:return Qm(i,a,a.type,a.pendingProps,c);case 1:return f=a.type,y=Wa(f,a.pendingProps),a1(i,a,f,y,c);case 3:e:{if(oe(a,a.stateNode.containerInfo),i===null)throw Error(r(387));f=a.pendingProps;var b=a.memoizedState;y=b.element,jm(i,a),zl(a,f,null,c);var _=a.memoizedState;if(f=_.cache,Fi(a,tn,f),f!==b.cache&&Sm(a,[tn],c,!0),Pl(),f=_.element,b.isDehydrated)if(b={element:f,isDehydrated:!1,cache:_.cache},a.updateQueue.baseState=b,a.memoizedState=b,a.flags&256){a=s1(i,a,f,c);break e}else if(f!==y){y=fr(Error(r(424)),a),jl(y),a=s1(i,a,f,c);break e}else{switch(i=a.stateNode.containerInfo,i.nodeType){case 9:i=i.body;break;default:i=i.nodeName==="HTML"?i.ownerDocument.body:i}for(Ot=Or(i.firstChild),An=a,ht=!0,qa=null,$r=!0,c=Hw(a,null,f,c),a.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling}else{if(_l(),f===y){a=wi(i,a,c);break e}hn(i,a,f,c)}a=a.child}return a;case 26:return ad(i,a),i===null?(c=mS(a.type,null,a.pendingProps,null))?a.memoizedState=c:ht||(c=a.type,i=a.pendingProps,f=bd(W.current).createElement(c),f[Ht]=a,f[Tt]=i,pn(f,c,i),on(f),a.stateNode=f):a.memoizedState=mS(a.type,i.memoizedProps,a.pendingProps,i.memoizedState),null;case 27:return me(a),i===null&&ht&&(f=a.stateNode=dS(a.type,a.pendingProps,W.current),An=a,$r=!0,y=Ot,ia(a.type)?(Bp=y,Ot=Or(f.firstChild)):Ot=y),hn(i,a,a.pendingProps.children,c),ad(i,a),i===null&&(a.flags|=4194304),a.child;case 5:return i===null&&ht&&((y=f=Ot)&&(f=mD(f,a.type,a.pendingProps,$r),f!==null?(a.stateNode=f,An=a,Ot=Or(f.firstChild),$r=!1,y=!0):y=!1),y||Ga(a)),me(a),y=a.type,b=a.pendingProps,_=i!==null?i.memoizedProps:null,f=b.children,Pp(y,b)?f=null:_!==null&&Pp(y,_)&&(a.flags|=32),a.memoizedState!==null&&(y=Dm(i,a,MO,null,null,c),ic._currentValue=y),ad(i,a),hn(i,a,f,c),a.child;case 6:return i===null&&ht&&((i=c=Ot)&&(c=pD(c,a.pendingProps,$r),c!==null?(a.stateNode=c,An=a,Ot=null,i=!0):i=!1),i||Ga(a)),null;case 13:return o1(i,a,c);case 4:return oe(a,a.stateNode.containerInfo),f=a.pendingProps,i===null?a.child=to(a,null,f,c):hn(i,a,f,c),a.child;case 11:return Jw(i,a,a.type,a.pendingProps,c);case 7:return hn(i,a,a.pendingProps,c),a.child;case 8:return hn(i,a,a.pendingProps.children,c),a.child;case 12:return hn(i,a,a.pendingProps.children,c),a.child;case 10:return f=a.pendingProps,Fi(a,a.type,f.value),hn(i,a,f.children,c),a.child;case 9:return y=a.type._context,f=a.pendingProps.children,Za(a),y=kn(y),f=f(y),a.flags|=1,hn(i,a,f,c),a.child;case 14:return e1(i,a,a.type,a.pendingProps,c);case 15:return t1(i,a,a.type,a.pendingProps,c);case 19:return c1(i,a,c);case 31:return f=a.pendingProps,c=a.mode,f={mode:f.mode,children:f.children},i===null?(c=sd(f,c),c.ref=a.ref,a.child=c,c.return=a,a=c):(c=mi(i.child,f),c.ref=a.ref,a.child=c,c.return=a,a=c),a;case 22:return n1(i,a,c);case 24:return Za(a),f=kn(tn),i===null?(y=Tm(),y===null&&(y=Et,b=Cm(),y.pooledCache=b,b.refCount++,b!==null&&(y.pooledCacheLanes|=c),y=b),a.memoizedState={parent:f,cache:y},_m(a),Fi(a,tn,y)):((i.lanes&c)!==0&&(jm(i,a),zl(a,null,null,c),Pl()),y=i.memoizedState,b=a.memoizedState,y.parent!==f?(y={parent:f,cache:f},a.memoizedState=y,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=y),Fi(a,tn,f)):(f=b.cache,Fi(a,tn,f),f!==y.cache&&Sm(a,[tn],c,!0))),hn(i,a,a.pendingProps.children,c),a.child;case 29:throw a.pendingProps}throw Error(r(156,a.tag))}function Si(i){i.flags|=4}function d1(i,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!vS(a)){if(a=gr.current,a!==null&&((ct&4194048)===ct?qr!==null:(ct&62914560)!==ct&&(ct&536870912)===0||a!==qr))throw Ol=Em,Zb;i.flags|=8192}}function od(i,a){a!==null&&(i.flags|=4),i.flags&16384&&(a=i.tag!==22?wu():536870912,i.lanes|=a,ao|=a)}function Fl(i,a){if(!ht)switch(i.tailMode){case"hidden":a=i.tail;for(var c=null;a!==null;)a.alternate!==null&&(c=a),a=a.sibling;c===null?i.tail=null:c.sibling=null;break;case"collapsed":c=i.tail;for(var f=null;c!==null;)c.alternate!==null&&(f=c),c=c.sibling;f===null?a||i.tail===null?i.tail=null:i.tail.sibling=null:f.sibling=null}}function At(i){var a=i.alternate!==null&&i.alternate.child===i.child,c=0,f=0;if(a)for(var y=i.child;y!==null;)c|=y.lanes|y.childLanes,f|=y.subtreeFlags&65011712,f|=y.flags&65011712,y.return=i,y=y.sibling;else for(y=i.child;y!==null;)c|=y.lanes|y.childLanes,f|=y.subtreeFlags,f|=y.flags,y.return=i,y=y.sibling;return i.subtreeFlags|=f,i.childLanes=c,a}function UO(i,a,c){var f=a.pendingProps;switch(xm(a),a.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return At(a),null;case 1:return At(a),null;case 3:return c=a.stateNode,f=null,i!==null&&(f=i.memoizedState.cache),a.memoizedState.cache!==f&&(a.flags|=2048),xi(tn),ce(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(i===null||i.child===null)&&(El(a)?Si(a):i===null||i.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Fb())),At(a),null;case 26:return c=a.memoizedState,i===null?(Si(a),c!==null?(At(a),d1(a,c)):(At(a),a.flags&=-16777217)):c?c!==i.memoizedState?(Si(a),At(a),d1(a,c)):(At(a),a.flags&=-16777217):(i.memoizedProps!==f&&Si(a),At(a),a.flags&=-16777217),null;case 27:be(a),c=W.current;var y=a.type;if(i!==null&&a.stateNode!=null)i.memoizedProps!==f&&Si(a);else{if(!f){if(a.stateNode===null)throw Error(r(166));return At(a),null}i=Q.current,El(a)?Ub(a):(i=dS(y,f,c),a.stateNode=i,Si(a))}return At(a),null;case 5:if(be(a),c=a.type,i!==null&&a.stateNode!=null)i.memoizedProps!==f&&Si(a);else{if(!f){if(a.stateNode===null)throw Error(r(166));return At(a),null}if(i=Q.current,El(a))Ub(a);else{switch(y=bd(W.current),i){case 1:i=y.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:i=y.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":i=y.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":i=y.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;case"script":i=y.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof f.is=="string"?y.createElement("select",{is:f.is}):y.createElement("select"),f.multiple?i.multiple=!0:f.size&&(i.size=f.size);break;default:i=typeof f.is=="string"?y.createElement(c,{is:f.is}):y.createElement(c)}}i[Ht]=a,i[Tt]=f;e:for(y=a.child;y!==null;){if(y.tag===5||y.tag===6)i.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===a)break e;for(;y.sibling===null;){if(y.return===null||y.return===a)break e;y=y.return}y.sibling.return=y.return,y=y.sibling}a.stateNode=i;e:switch(pn(i,c,f),c){case"button":case"input":case"select":case"textarea":i=!!f.autoFocus;break e;case"img":i=!0;break e;default:i=!1}i&&Si(a)}}return At(a),a.flags&=-16777217,null;case 6:if(i&&a.stateNode!=null)i.memoizedProps!==f&&Si(a);else{if(typeof f!="string"&&a.stateNode===null)throw Error(r(166));if(i=W.current,El(a)){if(i=a.stateNode,c=a.memoizedProps,f=null,y=An,y!==null)switch(y.tag){case 27:case 5:f=y.memoizedProps}i[Ht]=a,i=!!(i.nodeValue===c||f!==null&&f.suppressHydrationWarning===!0||iS(i.nodeValue,c)),i||Ga(a)}else i=bd(i).createTextNode(f),i[Ht]=a,a.stateNode=i}return At(a),null;case 13:if(f=a.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(y=El(a),f!==null&&f.dehydrated!==null){if(i===null){if(!y)throw Error(r(318));if(y=a.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(r(317));y[Ht]=a}else _l(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;At(a),y=!1}else y=Fb(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=y),y=!0;if(!y)return a.flags&256?(bi(a),a):(bi(a),null)}if(bi(a),(a.flags&128)!==0)return a.lanes=c,a;if(c=f!==null,i=i!==null&&i.memoizedState!==null,c){f=a.child,y=null,f.alternate!==null&&f.alternate.memoizedState!==null&&f.alternate.memoizedState.cachePool!==null&&(y=f.alternate.memoizedState.cachePool.pool);var b=null;f.memoizedState!==null&&f.memoizedState.cachePool!==null&&(b=f.memoizedState.cachePool.pool),b!==y&&(f.flags|=2048)}return c!==i&&c&&(a.child.flags|=8192),od(a,a.updateQueue),At(a),null;case 4:return ce(),i===null&&Ap(a.stateNode.containerInfo),At(a),null;case 10:return xi(a.type),At(a),null;case 19:if(le(nn),y=a.memoizedState,y===null)return At(a),null;if(f=(a.flags&128)!==0,b=y.rendering,b===null)if(f)Fl(y,!1);else{if(Dt!==0||i!==null&&(i.flags&128)!==0)for(i=a.child;i!==null;){if(b=nd(i),b!==null){for(a.flags|=128,Fl(y,!1),i=b.updateQueue,a.updateQueue=i,od(a,i),a.subtreeFlags=0,i=c,c=a.child;c!==null;)Bb(c,i),c=c.sibling;return j(nn,nn.current&1|2),a.child}i=i.sibling}y.tail!==null&&st()>ud&&(a.flags|=128,f=!0,Fl(y,!1),a.lanes=4194304)}else{if(!f)if(i=nd(b),i!==null){if(a.flags|=128,f=!0,i=i.updateQueue,a.updateQueue=i,od(a,i),Fl(y,!0),y.tail===null&&y.tailMode==="hidden"&&!b.alternate&&!ht)return At(a),null}else 2*st()-y.renderingStartTime>ud&&c!==536870912&&(a.flags|=128,f=!0,Fl(y,!1),a.lanes=4194304);y.isBackwards?(b.sibling=a.child,a.child=b):(i=y.last,i!==null?i.sibling=b:a.child=b,y.last=b)}return y.tail!==null?(a=y.tail,y.rendering=a,y.tail=a.sibling,y.renderingStartTime=st(),a.sibling=null,i=nn.current,j(nn,f?i&1|2:i&1),a):(At(a),null);case 22:case 23:return bi(a),Mm(),f=a.memoizedState!==null,i!==null?i.memoizedState!==null!==f&&(a.flags|=8192):f&&(a.flags|=8192),f?(c&536870912)!==0&&(a.flags&128)===0&&(At(a),a.subtreeFlags&6&&(a.flags|=8192)):At(a),c=a.updateQueue,c!==null&&od(a,c.retryQueue),c=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),f=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(f=a.memoizedState.cachePool.pool),f!==c&&(a.flags|=2048),i!==null&&le(Xa),null;case 24:return c=null,i!==null&&(c=i.memoizedState.cache),a.memoizedState.cache!==c&&(a.flags|=2048),xi(tn),At(a),null;case 25:return null;case 30:return null}throw Error(r(156,a.tag))}function HO(i,a){switch(xm(a),a.tag){case 1:return i=a.flags,i&65536?(a.flags=i&-65537|128,a):null;case 3:return xi(tn),ce(),i=a.flags,(i&65536)!==0&&(i&128)===0?(a.flags=i&-65537|128,a):null;case 26:case 27:case 5:return be(a),null;case 13:if(bi(a),i=a.memoizedState,i!==null&&i.dehydrated!==null){if(a.alternate===null)throw Error(r(340));_l()}return i=a.flags,i&65536?(a.flags=i&-65537|128,a):null;case 19:return le(nn),null;case 4:return ce(),null;case 10:return xi(a.type),null;case 22:case 23:return bi(a),Mm(),i!==null&&le(Xa),i=a.flags,i&65536?(a.flags=i&-65537|128,a):null;case 24:return xi(tn),null;case 25:return null;default:return null}}function f1(i,a){switch(xm(a),a.tag){case 3:xi(tn),ce();break;case 26:case 27:case 5:be(a);break;case 4:ce();break;case 13:bi(a);break;case 19:le(nn);break;case 10:xi(a.type);break;case 22:case 23:bi(a),Mm(),i!==null&&le(Xa);break;case 24:xi(tn)}}function $l(i,a){try{var c=a.updateQueue,f=c!==null?c.lastEffect:null;if(f!==null){var y=f.next;c=y;do{if((c.tag&i)===i){f=void 0;var b=c.create,_=c.inst;f=b(),_.destroy=f}c=c.next}while(c!==y)}}catch(L){wt(a,a.return,L)}}function Ki(i,a,c){try{var f=a.updateQueue,y=f!==null?f.lastEffect:null;if(y!==null){var b=y.next;f=b;do{if((f.tag&i)===i){var _=f.inst,L=_.destroy;if(L!==void 0){_.destroy=void 0,y=a;var U=c,ie=L;try{ie()}catch(de){wt(y,U,de)}}}f=f.next}while(f!==b)}}catch(de){wt(a,a.return,de)}}function h1(i){var a=i.updateQueue;if(a!==null){var c=i.stateNode;try{ew(a,c)}catch(f){wt(i,i.return,f)}}}function m1(i,a,c){c.props=Wa(i.type,i.memoizedProps),c.state=i.memoizedState;try{c.componentWillUnmount()}catch(f){wt(i,a,f)}}function ql(i,a){try{var c=i.ref;if(c!==null){switch(i.tag){case 26:case 27:case 5:var f=i.stateNode;break;case 30:f=i.stateNode;break;default:f=i.stateNode}typeof c=="function"?i.refCleanup=c(f):c.current=f}}catch(y){wt(i,a,y)}}function Gr(i,a){var c=i.ref,f=i.refCleanup;if(c!==null)if(typeof f=="function")try{f()}catch(y){wt(i,a,y)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof c=="function")try{c(null)}catch(y){wt(i,a,y)}else c.current=null}function p1(i){var a=i.type,c=i.memoizedProps,f=i.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":c.autoFocus&&f.focus();break e;case"img":c.src?f.src=c.src:c.srcSet&&(f.srcset=c.srcSet)}}catch(y){wt(i,i.return,y)}}function sp(i,a,c){try{var f=i.stateNode;cD(f,i.type,c,a),f[Tt]=a}catch(y){wt(i,i.return,y)}}function g1(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&ia(i.type)||i.tag===4}function op(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||g1(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&ia(i.type)||i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function lp(i,a,c){var f=i.tag;if(f===5||f===6)i=i.stateNode,a?(c.nodeType===9?c.body:c.nodeName==="HTML"?c.ownerDocument.body:c).insertBefore(i,a):(a=c.nodeType===9?c.body:c.nodeName==="HTML"?c.ownerDocument.body:c,a.appendChild(i),c=c._reactRootContainer,c!=null||a.onclick!==null||(a.onclick=vd));else if(f!==4&&(f===27&&ia(i.type)&&(c=i.stateNode,a=null),i=i.child,i!==null))for(lp(i,a,c),i=i.sibling;i!==null;)lp(i,a,c),i=i.sibling}function ld(i,a,c){var f=i.tag;if(f===5||f===6)i=i.stateNode,a?c.insertBefore(i,a):c.appendChild(i);else if(f!==4&&(f===27&&ia(i.type)&&(c=i.stateNode),i=i.child,i!==null))for(ld(i,a,c),i=i.sibling;i!==null;)ld(i,a,c),i=i.sibling}function y1(i){var a=i.stateNode,c=i.memoizedProps;try{for(var f=i.type,y=a.attributes;y.length;)a.removeAttributeNode(y[0]);pn(a,f,c),a[Ht]=i,a[Tt]=c}catch(b){wt(i,i.return,b)}}var Ci=!1,$t=!1,cp=!1,x1=typeof WeakSet=="function"?WeakSet:Set,cn=null;function FO(i,a){if(i=i.containerInfo,Op=Ed,i=Nb(i),om(i)){if("selectionStart"in i)var c={start:i.selectionStart,end:i.selectionEnd};else e:{c=(c=i.ownerDocument)&&c.defaultView||window;var f=c.getSelection&&c.getSelection();if(f&&f.rangeCount!==0){c=f.anchorNode;var y=f.anchorOffset,b=f.focusNode;f=f.focusOffset;try{c.nodeType,b.nodeType}catch{c=null;break e}var _=0,L=-1,U=-1,ie=0,de=0,he=i,ae=null;t:for(;;){for(var se;he!==c||y!==0&&he.nodeType!==3||(L=_+y),he!==b||f!==0&&he.nodeType!==3||(U=_+f),he.nodeType===3&&(_+=he.nodeValue.length),(se=he.firstChild)!==null;)ae=he,he=se;for(;;){if(he===i)break t;if(ae===c&&++ie===y&&(L=_),ae===b&&++de===f&&(U=_),(se=he.nextSibling)!==null)break;he=ae,ae=he.parentNode}he=se}c=L===-1||U===-1?null:{start:L,end:U}}else c=null}c=c||{start:0,end:0}}else c=null;for(Dp={focusedElem:i,selectionRange:c},Ed=!1,cn=a;cn!==null;)if(a=cn,i=a.child,(a.subtreeFlags&1024)!==0&&i!==null)i.return=a,cn=i;else for(;cn!==null;){switch(a=cn,b=a.alternate,i=a.flags,a.tag){case 0:break;case 11:case 15:break;case 1:if((i&1024)!==0&&b!==null){i=void 0,c=a,y=b.memoizedProps,b=b.memoizedState,f=c.stateNode;try{var Ie=Wa(c.type,y,c.elementType===c.type);i=f.getSnapshotBeforeUpdate(Ie,b),f.__reactInternalSnapshotBeforeUpdate=i}catch(ze){wt(c,c.return,ze)}}break;case 3:if((i&1024)!==0){if(i=a.stateNode.containerInfo,c=i.nodeType,c===9)Lp(i);else if(c===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":Lp(i);break;default:i.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((i&1024)!==0)throw Error(r(163))}if(i=a.sibling,i!==null){i.return=a.return,cn=i;break}cn=a.return}}function v1(i,a,c){var f=c.flags;switch(c.tag){case 0:case 11:case 15:Wi(i,c),f&4&&$l(5,c);break;case 1:if(Wi(i,c),f&4)if(i=c.stateNode,a===null)try{i.componentDidMount()}catch(_){wt(c,c.return,_)}else{var y=Wa(c.type,a.memoizedProps);a=a.memoizedState;try{i.componentDidUpdate(y,a,i.__reactInternalSnapshotBeforeUpdate)}catch(_){wt(c,c.return,_)}}f&64&&h1(c),f&512&&ql(c,c.return);break;case 3:if(Wi(i,c),f&64&&(i=c.updateQueue,i!==null)){if(a=null,c.child!==null)switch(c.child.tag){case 27:case 5:a=c.child.stateNode;break;case 1:a=c.child.stateNode}try{ew(i,a)}catch(_){wt(c,c.return,_)}}break;case 27:a===null&&f&4&&y1(c);case 26:case 5:Wi(i,c),a===null&&f&4&&p1(c),f&512&&ql(c,c.return);break;case 12:Wi(i,c);break;case 13:Wi(i,c),f&4&&S1(i,c),f&64&&(i=c.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(c=QO.bind(null,c),gD(i,c))));break;case 22:if(f=c.memoizedState!==null||Ci,!f){a=a!==null&&a.memoizedState!==null||$t,y=Ci;var b=$t;Ci=f,($t=a)&&!b?Qi(i,c,(c.subtreeFlags&8772)!==0):Wi(i,c),Ci=y,$t=b}break;case 30:break;default:Wi(i,c)}}function b1(i){var a=i.alternate;a!==null&&(i.alternate=null,b1(a)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(a=i.stateNode,a!==null&&Hh(a)),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}var jt=null,Bn=!1;function ki(i,a,c){for(c=c.child;c!==null;)w1(i,a,c),c=c.sibling}function w1(i,a,c){if(ge&&typeof ge.onCommitFiberUnmount=="function")try{ge.onCommitFiberUnmount(ue,c)}catch{}switch(c.tag){case 26:$t||Gr(c,a),ki(i,a,c),c.memoizedState?c.memoizedState.count--:c.stateNode&&(c=c.stateNode,c.parentNode.removeChild(c));break;case 27:$t||Gr(c,a);var f=jt,y=Bn;ia(c.type)&&(jt=c.stateNode,Bn=!1),ki(i,a,c),ec(c.stateNode),jt=f,Bn=y;break;case 5:$t||Gr(c,a);case 6:if(f=jt,y=Bn,jt=null,ki(i,a,c),jt=f,Bn=y,jt!==null)if(Bn)try{(jt.nodeType===9?jt.body:jt.nodeName==="HTML"?jt.ownerDocument.body:jt).removeChild(c.stateNode)}catch(b){wt(c,a,b)}else try{jt.removeChild(c.stateNode)}catch(b){wt(c,a,b)}break;case 18:jt!==null&&(Bn?(i=jt,cS(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,c.stateNode),lc(i)):cS(jt,c.stateNode));break;case 4:f=jt,y=Bn,jt=c.stateNode.containerInfo,Bn=!0,ki(i,a,c),jt=f,Bn=y;break;case 0:case 11:case 14:case 15:$t||Ki(2,c,a),$t||Ki(4,c,a),ki(i,a,c);break;case 1:$t||(Gr(c,a),f=c.stateNode,typeof f.componentWillUnmount=="function"&&m1(c,a,f)),ki(i,a,c);break;case 21:ki(i,a,c);break;case 22:$t=(f=$t)||c.memoizedState!==null,ki(i,a,c),$t=f;break;default:ki(i,a,c)}}function S1(i,a){if(a.memoizedState===null&&(i=a.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{lc(i)}catch(c){wt(a,a.return,c)}}function $O(i){switch(i.tag){case 13:case 19:var a=i.stateNode;return a===null&&(a=i.stateNode=new x1),a;case 22:return i=i.stateNode,a=i._retryCache,a===null&&(a=i._retryCache=new x1),a;default:throw Error(r(435,i.tag))}}function up(i,a){var c=$O(i);a.forEach(function(f){var y=JO.bind(null,i,f);c.has(f)||(c.add(f),f.then(y,y))})}function Kn(i,a){var c=a.deletions;if(c!==null)for(var f=0;f<c.length;f++){var y=c[f],b=i,_=a,L=_;e:for(;L!==null;){switch(L.tag){case 27:if(ia(L.type)){jt=L.stateNode,Bn=!1;break e}break;case 5:jt=L.stateNode,Bn=!1;break e;case 3:case 4:jt=L.stateNode.containerInfo,Bn=!0;break e}L=L.return}if(jt===null)throw Error(r(160));w1(b,_,y),jt=null,Bn=!1,b=y.alternate,b!==null&&(b.return=null),y.return=null}if(a.subtreeFlags&13878)for(a=a.child;a!==null;)C1(a,i),a=a.sibling}var Mr=null;function C1(i,a){var c=i.alternate,f=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:Kn(a,i),Wn(i),f&4&&(Ki(3,i,i.return),$l(3,i),Ki(5,i,i.return));break;case 1:Kn(a,i),Wn(i),f&512&&($t||c===null||Gr(c,c.return)),f&64&&Ci&&(i=i.updateQueue,i!==null&&(f=i.callbacks,f!==null&&(c=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=c===null?f:c.concat(f))));break;case 26:var y=Mr;if(Kn(a,i),Wn(i),f&512&&($t||c===null||Gr(c,c.return)),f&4){var b=c!==null?c.memoizedState:null;if(f=i.memoizedState,c===null)if(f===null)if(i.stateNode===null){e:{f=i.type,c=i.memoizedProps,y=y.ownerDocument||y;t:switch(f){case"title":b=y.getElementsByTagName("title")[0],(!b||b[pl]||b[Ht]||b.namespaceURI==="http://www.w3.org/2000/svg"||b.hasAttribute("itemprop"))&&(b=y.createElement(f),y.head.insertBefore(b,y.querySelector("head > title"))),pn(b,f,c),b[Ht]=i,on(b),f=b;break e;case"link":var _=yS("link","href",y).get(f+(c.href||""));if(_){for(var L=0;L<_.length;L++)if(b=_[L],b.getAttribute("href")===(c.href==null||c.href===""?null:c.href)&&b.getAttribute("rel")===(c.rel==null?null:c.rel)&&b.getAttribute("title")===(c.title==null?null:c.title)&&b.getAttribute("crossorigin")===(c.crossOrigin==null?null:c.crossOrigin)){_.splice(L,1);break t}}b=y.createElement(f),pn(b,f,c),y.head.appendChild(b);break;case"meta":if(_=yS("meta","content",y).get(f+(c.content||""))){for(L=0;L<_.length;L++)if(b=_[L],b.getAttribute("content")===(c.content==null?null:""+c.content)&&b.getAttribute("name")===(c.name==null?null:c.name)&&b.getAttribute("property")===(c.property==null?null:c.property)&&b.getAttribute("http-equiv")===(c.httpEquiv==null?null:c.httpEquiv)&&b.getAttribute("charset")===(c.charSet==null?null:c.charSet)){_.splice(L,1);break t}}b=y.createElement(f),pn(b,f,c),y.head.appendChild(b);break;default:throw Error(r(468,f))}b[Ht]=i,on(b),f=b}i.stateNode=f}else xS(y,i.type,i.stateNode);else i.stateNode=gS(y,f,i.memoizedProps);else b!==f?(b===null?c.stateNode!==null&&(c=c.stateNode,c.parentNode.removeChild(c)):b.count--,f===null?xS(y,i.type,i.stateNode):gS(y,f,i.memoizedProps)):f===null&&i.stateNode!==null&&sp(i,i.memoizedProps,c.memoizedProps)}break;case 27:Kn(a,i),Wn(i),f&512&&($t||c===null||Gr(c,c.return)),c!==null&&f&4&&sp(i,i.memoizedProps,c.memoizedProps);break;case 5:if(Kn(a,i),Wn(i),f&512&&($t||c===null||Gr(c,c.return)),i.flags&32){y=i.stateNode;try{Ls(y,"")}catch(se){wt(i,i.return,se)}}f&4&&i.stateNode!=null&&(y=i.memoizedProps,sp(i,y,c!==null?c.memoizedProps:y)),f&1024&&(cp=!0);break;case 6:if(Kn(a,i),Wn(i),f&4){if(i.stateNode===null)throw Error(r(162));f=i.memoizedProps,c=i.stateNode;try{c.nodeValue=f}catch(se){wt(i,i.return,se)}}break;case 3:if(Cd=null,y=Mr,Mr=wd(a.containerInfo),Kn(a,i),Mr=y,Wn(i),f&4&&c!==null&&c.memoizedState.isDehydrated)try{lc(a.containerInfo)}catch(se){wt(i,i.return,se)}cp&&(cp=!1,k1(i));break;case 4:f=Mr,Mr=wd(i.stateNode.containerInfo),Kn(a,i),Wn(i),Mr=f;break;case 12:Kn(a,i),Wn(i);break;case 13:Kn(a,i),Wn(i),i.child.flags&8192&&i.memoizedState!==null!=(c!==null&&c.memoizedState!==null)&&(gp=st()),f&4&&(f=i.updateQueue,f!==null&&(i.updateQueue=null,up(i,f)));break;case 22:y=i.memoizedState!==null;var U=c!==null&&c.memoizedState!==null,ie=Ci,de=$t;if(Ci=ie||y,$t=de||U,Kn(a,i),$t=de,Ci=ie,Wn(i),f&8192)e:for(a=i.stateNode,a._visibility=y?a._visibility&-2:a._visibility|1,y&&(c===null||U||Ci||$t||Qa(i)),c=null,a=i;;){if(a.tag===5||a.tag===26){if(c===null){U=c=a;try{if(b=U.stateNode,y)_=b.style,typeof _.setProperty=="function"?_.setProperty("display","none","important"):_.display="none";else{L=U.stateNode;var he=U.memoizedProps.style,ae=he!=null&&he.hasOwnProperty("display")?he.display:null;L.style.display=ae==null||typeof ae=="boolean"?"":(""+ae).trim()}}catch(se){wt(U,U.return,se)}}}else if(a.tag===6){if(c===null){U=a;try{U.stateNode.nodeValue=y?"":U.memoizedProps}catch(se){wt(U,U.return,se)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===i)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===i)break e;for(;a.sibling===null;){if(a.return===null||a.return===i)break e;c===a&&(c=null),a=a.return}c===a&&(c=null),a.sibling.return=a.return,a=a.sibling}f&4&&(f=i.updateQueue,f!==null&&(c=f.retryQueue,c!==null&&(f.retryQueue=null,up(i,c))));break;case 19:Kn(a,i),Wn(i),f&4&&(f=i.updateQueue,f!==null&&(i.updateQueue=null,up(i,f)));break;case 30:break;case 21:break;default:Kn(a,i),Wn(i)}}function Wn(i){var a=i.flags;if(a&2){try{for(var c,f=i.return;f!==null;){if(g1(f)){c=f;break}f=f.return}if(c==null)throw Error(r(160));switch(c.tag){case 27:var y=c.stateNode,b=op(i);ld(i,b,y);break;case 5:var _=c.stateNode;c.flags&32&&(Ls(_,""),c.flags&=-33);var L=op(i);ld(i,L,_);break;case 3:case 4:var U=c.stateNode.containerInfo,ie=op(i);lp(i,ie,U);break;default:throw Error(r(161))}}catch(de){wt(i,i.return,de)}i.flags&=-3}a&4096&&(i.flags&=-4097)}function k1(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var a=i;k1(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),i=i.sibling}}function Wi(i,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)v1(i,a.alternate,a),a=a.sibling}function Qa(i){for(i=i.child;i!==null;){var a=i;switch(a.tag){case 0:case 11:case 14:case 15:Ki(4,a,a.return),Qa(a);break;case 1:Gr(a,a.return);var c=a.stateNode;typeof c.componentWillUnmount=="function"&&m1(a,a.return,c),Qa(a);break;case 27:ec(a.stateNode);case 26:case 5:Gr(a,a.return),Qa(a);break;case 22:a.memoizedState===null&&Qa(a);break;case 30:Qa(a);break;default:Qa(a)}i=i.sibling}}function Qi(i,a,c){for(c=c&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var f=a.alternate,y=i,b=a,_=b.flags;switch(b.tag){case 0:case 11:case 15:Qi(y,b,c),$l(4,b);break;case 1:if(Qi(y,b,c),f=b,y=f.stateNode,typeof y.componentDidMount=="function")try{y.componentDidMount()}catch(ie){wt(f,f.return,ie)}if(f=b,y=f.updateQueue,y!==null){var L=f.stateNode;try{var U=y.shared.hiddenCallbacks;if(U!==null)for(y.shared.hiddenCallbacks=null,y=0;y<U.length;y++)Jb(U[y],L)}catch(ie){wt(f,f.return,ie)}}c&&_&64&&h1(b),ql(b,b.return);break;case 27:y1(b);case 26:case 5:Qi(y,b,c),c&&f===null&&_&4&&p1(b),ql(b,b.return);break;case 12:Qi(y,b,c);break;case 13:Qi(y,b,c),c&&_&4&&S1(y,b);break;case 22:b.memoizedState===null&&Qi(y,b,c),ql(b,b.return);break;case 30:break;default:Qi(y,b,c)}a=a.sibling}}function dp(i,a){var c=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),i=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(i=a.memoizedState.cachePool.pool),i!==c&&(i!=null&&i.refCount++,c!=null&&Al(c))}function fp(i,a){i=null,a.alternate!==null&&(i=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==i&&(a.refCount++,i!=null&&Al(i))}function Yr(i,a,c,f){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)T1(i,a,c,f),a=a.sibling}function T1(i,a,c,f){var y=a.flags;switch(a.tag){case 0:case 11:case 15:Yr(i,a,c,f),y&2048&&$l(9,a);break;case 1:Yr(i,a,c,f);break;case 3:Yr(i,a,c,f),y&2048&&(i=null,a.alternate!==null&&(i=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==i&&(a.refCount++,i!=null&&Al(i)));break;case 12:if(y&2048){Yr(i,a,c,f),i=a.stateNode;try{var b=a.memoizedProps,_=b.id,L=b.onPostCommit;typeof L=="function"&&L(_,a.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(U){wt(a,a.return,U)}}else Yr(i,a,c,f);break;case 13:Yr(i,a,c,f);break;case 23:break;case 22:b=a.stateNode,_=a.alternate,a.memoizedState!==null?b._visibility&2?Yr(i,a,c,f):Gl(i,a):b._visibility&2?Yr(i,a,c,f):(b._visibility|=2,no(i,a,c,f,(a.subtreeFlags&10256)!==0)),y&2048&&dp(_,a);break;case 24:Yr(i,a,c,f),y&2048&&fp(a.alternate,a);break;default:Yr(i,a,c,f)}}function no(i,a,c,f,y){for(y=y&&(a.subtreeFlags&10256)!==0,a=a.child;a!==null;){var b=i,_=a,L=c,U=f,ie=_.flags;switch(_.tag){case 0:case 11:case 15:no(b,_,L,U,y),$l(8,_);break;case 23:break;case 22:var de=_.stateNode;_.memoizedState!==null?de._visibility&2?no(b,_,L,U,y):Gl(b,_):(de._visibility|=2,no(b,_,L,U,y)),y&&ie&2048&&dp(_.alternate,_);break;case 24:no(b,_,L,U,y),y&&ie&2048&&fp(_.alternate,_);break;default:no(b,_,L,U,y)}a=a.sibling}}function Gl(i,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var c=i,f=a,y=f.flags;switch(f.tag){case 22:Gl(c,f),y&2048&&dp(f.alternate,f);break;case 24:Gl(c,f),y&2048&&fp(f.alternate,f);break;default:Gl(c,f)}a=a.sibling}}var Yl=8192;function ro(i){if(i.subtreeFlags&Yl)for(i=i.child;i!==null;)E1(i),i=i.sibling}function E1(i){switch(i.tag){case 26:ro(i),i.flags&Yl&&i.memoizedState!==null&&ND(Mr,i.memoizedState,i.memoizedProps);break;case 5:ro(i);break;case 3:case 4:var a=Mr;Mr=wd(i.stateNode.containerInfo),ro(i),Mr=a;break;case 22:i.memoizedState===null&&(a=i.alternate,a!==null&&a.memoizedState!==null?(a=Yl,Yl=16777216,ro(i),Yl=a):ro(i));break;default:ro(i)}}function _1(i){var a=i.alternate;if(a!==null&&(i=a.child,i!==null)){a.child=null;do a=i.sibling,i.sibling=null,i=a;while(i!==null)}}function Zl(i){var a=i.deletions;if((i.flags&16)!==0){if(a!==null)for(var c=0;c<a.length;c++){var f=a[c];cn=f,N1(f,i)}_1(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)j1(i),i=i.sibling}function j1(i){switch(i.tag){case 0:case 11:case 15:Zl(i),i.flags&2048&&Ki(9,i,i.return);break;case 3:Zl(i);break;case 12:Zl(i);break;case 22:var a=i.stateNode;i.memoizedState!==null&&a._visibility&2&&(i.return===null||i.return.tag!==13)?(a._visibility&=-3,cd(i)):Zl(i);break;default:Zl(i)}}function cd(i){var a=i.deletions;if((i.flags&16)!==0){if(a!==null)for(var c=0;c<a.length;c++){var f=a[c];cn=f,N1(f,i)}_1(i)}for(i=i.child;i!==null;){switch(a=i,a.tag){case 0:case 11:case 15:Ki(8,a,a.return),cd(a);break;case 22:c=a.stateNode,c._visibility&2&&(c._visibility&=-3,cd(a));break;default:cd(a)}i=i.sibling}}function N1(i,a){for(;cn!==null;){var c=cn;switch(c.tag){case 0:case 11:case 15:Ki(8,c,a);break;case 23:case 22:if(c.memoizedState!==null&&c.memoizedState.cachePool!==null){var f=c.memoizedState.cachePool.pool;f!=null&&f.refCount++}break;case 24:Al(c.memoizedState.cache)}if(f=c.child,f!==null)f.return=c,cn=f;else e:for(c=i;cn!==null;){f=cn;var y=f.sibling,b=f.return;if(b1(f),f===c){cn=null;break e}if(y!==null){y.return=b,cn=y;break e}cn=b}}}var qO={getCacheForType:function(i){var a=kn(tn),c=a.data.get(i);return c===void 0&&(c=i(),a.data.set(i,c)),c}},GO=typeof WeakMap=="function"?WeakMap:Map,mt=0,Et=null,tt=null,ct=0,pt=0,Qn=null,Ji=!1,io=!1,hp=!1,Ti=0,Dt=0,ea=0,Ja=0,mp=0,yr=0,ao=0,Xl=null,Vn=null,pp=!1,gp=0,ud=1/0,dd=null,ta=null,mn=0,na=null,so=null,oo=0,yp=0,xp=null,A1=null,Kl=0,vp=null;function Jn(){if((mt&2)!==0&&ct!==0)return ct&-ct;if(I.T!==null){var i=Zs;return i!==0?i:Ep()}return La()}function R1(){yr===0&&(yr=(ct&536870912)===0||ht?Ar():536870912);var i=gr.current;return i!==null&&(i.flags|=32),yr}function er(i,a,c){(i===Et&&(pt===2||pt===9)||i.cancelPendingCommit!==null)&&(lo(i,0),ra(i,ct,yr,!1)),Ui(i,c),((mt&2)===0||i!==Et)&&(i===Et&&((mt&2)===0&&(Ja|=c),Dt===4&&ra(i,ct,yr,!1)),Zr(i))}function M1(i,a,c){if((mt&6)!==0)throw Error(r(327));var f=!c&&(a&124)===0&&(a&i.expiredLanes)===0||zn(i,a),y=f?XO(i,a):Sp(i,a,!0),b=f;do{if(y===0){io&&!f&&ra(i,a,0,!1);break}else{if(c=i.current.alternate,b&&!YO(c)){y=Sp(i,a,!1),b=!1;continue}if(y===2){if(b=a,i.errorRecoveryDisabledLanes&b)var _=0;else _=i.pendingLanes&-536870913,_=_!==0?_:_&536870912?536870912:0;if(_!==0){a=_;e:{var L=i;y=Xl;var U=L.current.memoizedState.isDehydrated;if(U&&(lo(L,_).flags|=256),_=Sp(L,_,!1),_!==2){if(hp&&!U){L.errorRecoveryDisabledLanes|=b,Ja|=b,y=4;break e}b=Vn,Vn=y,b!==null&&(Vn===null?Vn=b:Vn.push.apply(Vn,b))}y=_}if(b=!1,y!==2)continue}}if(y===1){lo(i,0),ra(i,a,0,!0);break}e:{switch(f=i,b=y,b){case 0:case 1:throw Error(r(345));case 4:if((a&4194048)!==a)break;case 6:ra(f,a,yr,!Ji);break e;case 2:Vn=null;break;case 3:case 5:break;default:throw Error(r(329))}if((a&62914560)===a&&(y=gp+300-st(),10<y)){if(ra(f,a,yr,!Ji),Bt(f,0,!0)!==0)break e;f.timeoutHandle=oS(O1.bind(null,f,c,Vn,dd,pp,a,yr,Ja,ao,Ji,b,2,-0,0),y);break e}O1(f,c,Vn,dd,pp,a,yr,Ja,ao,Ji,b,0,-0,0)}}break}while(!0);Zr(i)}function O1(i,a,c,f,y,b,_,L,U,ie,de,he,ae,se){if(i.timeoutHandle=-1,he=a.subtreeFlags,(he&8192||(he&16785408)===16785408)&&(rc={stylesheets:null,count:0,unsuspend:jD},E1(a),he=AD(),he!==null)){i.cancelPendingCommit=he(V1.bind(null,i,a,b,c,f,y,_,L,U,de,1,ae,se)),ra(i,b,_,!ie);return}V1(i,a,b,c,f,y,_,L,U)}function YO(i){for(var a=i;;){var c=a.tag;if((c===0||c===11||c===15)&&a.flags&16384&&(c=a.updateQueue,c!==null&&(c=c.stores,c!==null)))for(var f=0;f<c.length;f++){var y=c[f],b=y.getSnapshot;y=y.value;try{if(!Zn(b(),y))return!1}catch{return!1}}if(c=a.child,a.subtreeFlags&16384&&c!==null)c.return=a,a=c;else{if(a===i)break;for(;a.sibling===null;){if(a.return===null||a.return===i)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function ra(i,a,c,f){a&=~mp,a&=~Ja,i.suspendedLanes|=a,i.pingedLanes&=~a,f&&(i.warmLanes|=a),f=i.expirationTimes;for(var y=a;0<y;){var b=31-De(y),_=1<<b;f[b]=-1,y&=~_}c!==0&&Fe(i,c,a)}function fd(){return(mt&6)===0?(Wl(0),!1):!0}function bp(){if(tt!==null){if(pt===0)var i=tt.return;else i=tt,yi=Ya=null,Lm(i),eo=null,Ul=0,i=tt;for(;i!==null;)f1(i.alternate,i),i=i.return;tt=null}}function lo(i,a){var c=i.timeoutHandle;c!==-1&&(i.timeoutHandle=-1,dD(c)),c=i.cancelPendingCommit,c!==null&&(i.cancelPendingCommit=null,c()),bp(),Et=i,tt=c=mi(i.current,null),ct=a,pt=0,Qn=null,Ji=!1,io=zn(i,a),hp=!1,ao=yr=mp=Ja=ea=Dt=0,Vn=Xl=null,pp=!1,(a&8)!==0&&(a|=a&32);var f=i.entangledLanes;if(f!==0)for(i=i.entanglements,f&=a;0<f;){var y=31-De(f),b=1<<y;a|=i[y],f&=~b}return Ti=a,Du(),c}function D1(i,a){We=null,I.H=Ju,a===Ml||a===Fu?(a=Wb(),pt=3):a===Zb?(a=Wb(),pt=4):pt=a===Qw?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,Qn=a,tt===null&&(Dt=1,id(i,fr(a,i.current)))}function P1(){var i=I.H;return I.H=Ju,i===null?Ju:i}function z1(){var i=I.A;return I.A=qO,i}function wp(){Dt=4,Ji||(ct&4194048)!==ct&&gr.current!==null||(io=!0),(ea&134217727)===0&&(Ja&134217727)===0||Et===null||ra(Et,ct,yr,!1)}function Sp(i,a,c){var f=mt;mt|=2;var y=P1(),b=z1();(Et!==i||ct!==a)&&(dd=null,lo(i,a)),a=!1;var _=Dt;e:do try{if(pt!==0&&tt!==null){var L=tt,U=Qn;switch(pt){case 8:bp(),_=6;break e;case 3:case 2:case 9:case 6:gr.current===null&&(a=!0);var ie=pt;if(pt=0,Qn=null,co(i,L,U,ie),c&&io){_=0;break e}break;default:ie=pt,pt=0,Qn=null,co(i,L,U,ie)}}ZO(),_=Dt;break}catch(de){D1(i,de)}while(!0);return a&&i.shellSuspendCounter++,yi=Ya=null,mt=f,I.H=y,I.A=b,tt===null&&(Et=null,ct=0,Du()),_}function ZO(){for(;tt!==null;)L1(tt)}function XO(i,a){var c=mt;mt|=2;var f=P1(),y=z1();Et!==i||ct!==a?(dd=null,ud=st()+500,lo(i,a)):io=zn(i,a);e:do try{if(pt!==0&&tt!==null){a=tt;var b=Qn;t:switch(pt){case 1:pt=0,Qn=null,co(i,a,b,1);break;case 2:case 9:if(Xb(b)){pt=0,Qn=null,I1(a);break}a=function(){pt!==2&&pt!==9||Et!==i||(pt=7),Zr(i)},b.then(a,a);break e;case 3:pt=7;break e;case 4:pt=5;break e;case 7:Xb(b)?(pt=0,Qn=null,I1(a)):(pt=0,Qn=null,co(i,a,b,7));break;case 5:var _=null;switch(tt.tag){case 26:_=tt.memoizedState;case 5:case 27:var L=tt;if(!_||vS(_)){pt=0,Qn=null;var U=L.sibling;if(U!==null)tt=U;else{var ie=L.return;ie!==null?(tt=ie,hd(ie)):tt=null}break t}}pt=0,Qn=null,co(i,a,b,5);break;case 6:pt=0,Qn=null,co(i,a,b,6);break;case 8:bp(),Dt=6;break e;default:throw Error(r(462))}}KO();break}catch(de){D1(i,de)}while(!0);return yi=Ya=null,I.H=f,I.A=y,mt=c,tt!==null?0:(Et=null,ct=0,Du(),Dt)}function KO(){for(;tt!==null&&!Mt();)L1(tt)}function L1(i){var a=u1(i.alternate,i,Ti);i.memoizedProps=i.pendingProps,a===null?hd(i):tt=a}function I1(i){var a=i,c=a.alternate;switch(a.tag){case 15:case 0:a=i1(c,a,a.pendingProps,a.type,void 0,ct);break;case 11:a=i1(c,a,a.pendingProps,a.type.render,a.ref,ct);break;case 5:Lm(a);default:f1(c,a),a=tt=Bb(a,Ti),a=u1(c,a,Ti)}i.memoizedProps=i.pendingProps,a===null?hd(i):tt=a}function co(i,a,c,f){yi=Ya=null,Lm(a),eo=null,Ul=0;var y=a.return;try{if(BO(i,y,a,c,ct)){Dt=1,id(i,fr(c,i.current)),tt=null;return}}catch(b){if(y!==null)throw tt=y,b;Dt=1,id(i,fr(c,i.current)),tt=null;return}a.flags&32768?(ht||f===1?i=!0:io||(ct&536870912)!==0?i=!1:(Ji=i=!0,(f===2||f===9||f===3||f===6)&&(f=gr.current,f!==null&&f.tag===13&&(f.flags|=16384))),B1(a,i)):hd(a)}function hd(i){var a=i;do{if((a.flags&32768)!==0){B1(a,Ji);return}i=a.return;var c=UO(a.alternate,a,Ti);if(c!==null){tt=c;return}if(a=a.sibling,a!==null){tt=a;return}tt=a=i}while(a!==null);Dt===0&&(Dt=5)}function B1(i,a){do{var c=HO(i.alternate,i);if(c!==null){c.flags&=32767,tt=c;return}if(c=i.return,c!==null&&(c.flags|=32768,c.subtreeFlags=0,c.deletions=null),!a&&(i=i.sibling,i!==null)){tt=i;return}tt=i=c}while(i!==null);Dt=6,tt=null}function V1(i,a,c,f,y,b,_,L,U){i.cancelPendingCommit=null;do md();while(mn!==0);if((mt&6)!==0)throw Error(r(327));if(a!==null){if(a===i.current)throw Error(r(177));if(b=a.lanes|a.childLanes,b|=fm,Su(i,c,b,_,L,U),i===Et&&(tt=Et=null,ct=0),so=a,na=i,oo=c,yp=b,xp=y,A1=f,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,eD(Jt,function(){return q1(),null})):(i.callbackNode=null,i.callbackPriority=0),f=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||f){f=I.T,I.T=null,y=F.p,F.p=2,_=mt,mt|=4;try{FO(i,a,c)}finally{mt=_,F.p=y,I.T=f}}mn=1,U1(),H1(),F1()}}function U1(){if(mn===1){mn=0;var i=na,a=so,c=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||c){c=I.T,I.T=null;var f=F.p;F.p=2;var y=mt;mt|=4;try{C1(a,i);var b=Dp,_=Nb(i.containerInfo),L=b.focusedElem,U=b.selectionRange;if(_!==L&&L&&L.ownerDocument&&jb(L.ownerDocument.documentElement,L)){if(U!==null&&om(L)){var ie=U.start,de=U.end;if(de===void 0&&(de=ie),"selectionStart"in L)L.selectionStart=ie,L.selectionEnd=Math.min(de,L.value.length);else{var he=L.ownerDocument||document,ae=he&&he.defaultView||window;if(ae.getSelection){var se=ae.getSelection(),Ie=L.textContent.length,ze=Math.min(U.start,Ie),bt=U.end===void 0?ze:Math.min(U.end,Ie);!se.extend&&ze>bt&&(_=bt,bt=ze,ze=_);var J=_b(L,ze),q=_b(L,bt);if(J&&q&&(se.rangeCount!==1||se.anchorNode!==J.node||se.anchorOffset!==J.offset||se.focusNode!==q.node||se.focusOffset!==q.offset)){var ne=he.createRange();ne.setStart(J.node,J.offset),se.removeAllRanges(),ze>bt?(se.addRange(ne),se.extend(q.node,q.offset)):(ne.setEnd(q.node,q.offset),se.addRange(ne))}}}}for(he=[],se=L;se=se.parentNode;)se.nodeType===1&&he.push({element:se,left:se.scrollLeft,top:se.scrollTop});for(typeof L.focus=="function"&&L.focus(),L=0;L<he.length;L++){var fe=he[L];fe.element.scrollLeft=fe.left,fe.element.scrollTop=fe.top}}Ed=!!Op,Dp=Op=null}finally{mt=y,F.p=f,I.T=c}}i.current=a,mn=2}}function H1(){if(mn===2){mn=0;var i=na,a=so,c=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||c){c=I.T,I.T=null;var f=F.p;F.p=2;var y=mt;mt|=4;try{v1(i,a.alternate,a)}finally{mt=y,F.p=f,I.T=c}}mn=3}}function F1(){if(mn===4||mn===3){mn=0,It();var i=na,a=so,c=oo,f=A1;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?mn=5:(mn=0,so=na=null,$1(i,i.pendingLanes));var y=i.pendingLanes;if(y===0&&(ta=null),fn(c),a=a.stateNode,ge&&typeof ge.onCommitFiberRoot=="function")try{ge.onCommitFiberRoot(ue,a,void 0,(a.current.flags&128)===128)}catch{}if(f!==null){a=I.T,y=F.p,F.p=2,I.T=null;try{for(var b=i.onRecoverableError,_=0;_<f.length;_++){var L=f[_];b(L.value,{componentStack:L.stack})}}finally{I.T=a,F.p=y}}(oo&3)!==0&&md(),Zr(i),y=i.pendingLanes,(c&4194090)!==0&&(y&42)!==0?i===vp?Kl++:(Kl=0,vp=i):Kl=0,Wl(0)}}function $1(i,a){(i.pooledCacheLanes&=a)===0&&(a=i.pooledCache,a!=null&&(i.pooledCache=null,Al(a)))}function md(i){return U1(),H1(),F1(),q1()}function q1(){if(mn!==5)return!1;var i=na,a=yp;yp=0;var c=fn(oo),f=I.T,y=F.p;try{F.p=32>c?32:c,I.T=null,c=xp,xp=null;var b=na,_=oo;if(mn=0,so=na=null,oo=0,(mt&6)!==0)throw Error(r(331));var L=mt;if(mt|=4,j1(b.current),T1(b,b.current,_,c),mt=L,Wl(0,!1),ge&&typeof ge.onPostCommitFiberRoot=="function")try{ge.onPostCommitFiberRoot(ue,b)}catch{}return!0}finally{F.p=y,I.T=f,$1(i,a)}}function G1(i,a,c){a=fr(c,a),a=Wm(i.stateNode,a,2),i=Gi(i,a,2),i!==null&&(Ui(i,2),Zr(i))}function wt(i,a,c){if(i.tag===3)G1(i,i,c);else for(;a!==null;){if(a.tag===3){G1(a,i,c);break}else if(a.tag===1){var f=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(ta===null||!ta.has(f))){i=fr(c,i),c=Kw(2),f=Gi(a,c,2),f!==null&&(Ww(c,f,a,i),Ui(f,2),Zr(f));break}}a=a.return}}function Cp(i,a,c){var f=i.pingCache;if(f===null){f=i.pingCache=new GO;var y=new Set;f.set(a,y)}else y=f.get(a),y===void 0&&(y=new Set,f.set(a,y));y.has(c)||(hp=!0,y.add(c),i=WO.bind(null,i,a,c),a.then(i,i))}function WO(i,a,c){var f=i.pingCache;f!==null&&f.delete(a),i.pingedLanes|=i.suspendedLanes&c,i.warmLanes&=~c,Et===i&&(ct&c)===c&&(Dt===4||Dt===3&&(ct&62914560)===ct&&300>st()-gp?(mt&2)===0&&lo(i,0):mp|=c,ao===ct&&(ao=0)),Zr(i)}function Y1(i,a){a===0&&(a=wu()),i=$s(i,a),i!==null&&(Ui(i,a),Zr(i))}function QO(i){var a=i.memoizedState,c=0;a!==null&&(c=a.retryLane),Y1(i,c)}function JO(i,a){var c=0;switch(i.tag){case 13:var f=i.stateNode,y=i.memoizedState;y!==null&&(c=y.retryLane);break;case 19:f=i.stateNode;break;case 22:f=i.stateNode._retryCache;break;default:throw Error(r(314))}f!==null&&f.delete(a),Y1(i,c)}function eD(i,a){return Ve(i,a)}var pd=null,uo=null,kp=!1,gd=!1,Tp=!1,es=0;function Zr(i){i!==uo&&i.next===null&&(uo===null?pd=uo=i:uo=uo.next=i),gd=!0,kp||(kp=!0,nD())}function Wl(i,a){if(!Tp&&gd){Tp=!0;do for(var c=!1,f=pd;f!==null;){if(i!==0){var y=f.pendingLanes;if(y===0)var b=0;else{var _=f.suspendedLanes,L=f.pingedLanes;b=(1<<31-De(42|i)+1)-1,b&=y&~(_&~L),b=b&201326741?b&201326741|1:b?b|2:0}b!==0&&(c=!0,W1(f,b))}else b=ct,b=Bt(f,f===Et?b:0,f.cancelPendingCommit!==null||f.timeoutHandle!==-1),(b&3)===0||zn(f,b)||(c=!0,W1(f,b));f=f.next}while(c);Tp=!1}}function tD(){Z1()}function Z1(){gd=kp=!1;var i=0;es!==0&&(uD()&&(i=es),es=0);for(var a=st(),c=null,f=pd;f!==null;){var y=f.next,b=X1(f,a);b===0?(f.next=null,c===null?pd=y:c.next=y,y===null&&(uo=c)):(c=f,(i!==0||(b&3)!==0)&&(gd=!0)),f=y}Wl(i)}function X1(i,a){for(var c=i.suspendedLanes,f=i.pingedLanes,y=i.expirationTimes,b=i.pendingLanes&-62914561;0<b;){var _=31-De(b),L=1<<_,U=y[_];U===-1?((L&c)===0||(L&f)!==0)&&(y[_]=Nn(L,a)):U<=a&&(i.expiredLanes|=L),b&=~L}if(a=Et,c=ct,c=Bt(i,i===a?c:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),f=i.callbackNode,c===0||i===a&&(pt===2||pt===9)||i.cancelPendingCommit!==null)return f!==null&&f!==null&&lt(f),i.callbackNode=null,i.callbackPriority=0;if((c&3)===0||zn(i,c)){if(a=c&-c,a===i.callbackPriority)return a;switch(f!==null&&lt(f),fn(c)){case 2:case 8:c=lr;break;case 32:c=Jt;break;case 268435456:c=Yn;break;default:c=Jt}return f=K1.bind(null,i),c=Ve(c,f),i.callbackPriority=a,i.callbackNode=c,a}return f!==null&&f!==null&&lt(f),i.callbackPriority=2,i.callbackNode=null,2}function K1(i,a){if(mn!==0&&mn!==5)return i.callbackNode=null,i.callbackPriority=0,null;var c=i.callbackNode;if(md()&&i.callbackNode!==c)return null;var f=ct;return f=Bt(i,i===Et?f:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),f===0?null:(M1(i,f,a),X1(i,st()),i.callbackNode!=null&&i.callbackNode===c?K1.bind(null,i):null)}function W1(i,a){if(md())return null;M1(i,a,!0)}function nD(){fD(function(){(mt&6)!==0?Ve(Ct,tD):Z1()})}function Ep(){return es===0&&(es=Ar()),es}function Q1(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:_u(""+i)}function J1(i,a){var c=a.ownerDocument.createElement("input");return c.name=a.name,c.value=a.value,i.id&&c.setAttribute("form",i.id),a.parentNode.insertBefore(c,a),i=new FormData(i),c.parentNode.removeChild(c),i}function rD(i,a,c,f,y){if(a==="submit"&&c&&c.stateNode===y){var b=Q1((y[Tt]||null).action),_=f.submitter;_&&(a=(a=_[Tt]||null)?Q1(a.formAction):_.getAttribute("formAction"),a!==null&&(b=a,_=null));var L=new Ru("action","action",null,f,y);i.push({event:L,listeners:[{instance:null,listener:function(){if(f.defaultPrevented){if(es!==0){var U=_?J1(y,_):new FormData(y);Gm(c,{pending:!0,data:U,method:y.method,action:b},null,U)}}else typeof b=="function"&&(L.preventDefault(),U=_?J1(y,_):new FormData(y),Gm(c,{pending:!0,data:U,method:y.method,action:b},b,U))},currentTarget:y}]})}}for(var _p=0;_p<dm.length;_p++){var jp=dm[_p],iD=jp.toLowerCase(),aD=jp[0].toUpperCase()+jp.slice(1);Rr(iD,"on"+aD)}Rr(Mb,"onAnimationEnd"),Rr(Ob,"onAnimationIteration"),Rr(Db,"onAnimationStart"),Rr("dblclick","onDoubleClick"),Rr("focusin","onFocus"),Rr("focusout","onBlur"),Rr(SO,"onTransitionRun"),Rr(CO,"onTransitionStart"),Rr(kO,"onTransitionCancel"),Rr(Pb,"onTransitionEnd"),Ds("onMouseEnter",["mouseout","mouseover"]),Ds("onMouseLeave",["mouseout","mouseover"]),Ds("onPointerEnter",["pointerout","pointerover"]),Ds("onPointerLeave",["pointerout","pointerover"]),Ia("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ia("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ia("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ia("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ia("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ia("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ql="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(" "),sD=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ql));function eS(i,a){a=(a&4)!==0;for(var c=0;c<i.length;c++){var f=i[c],y=f.event;f=f.listeners;e:{var b=void 0;if(a)for(var _=f.length-1;0<=_;_--){var L=f[_],U=L.instance,ie=L.currentTarget;if(L=L.listener,U!==b&&y.isPropagationStopped())break e;b=L,y.currentTarget=ie;try{b(y)}catch(de){rd(de)}y.currentTarget=null,b=U}else for(_=0;_<f.length;_++){if(L=f[_],U=L.instance,ie=L.currentTarget,L=L.listener,U!==b&&y.isPropagationStopped())break e;b=L,y.currentTarget=ie;try{b(y)}catch(de){rd(de)}y.currentTarget=null,b=U}}}}function nt(i,a){var c=a[As];c===void 0&&(c=a[As]=new Set);var f=i+"__bubble";c.has(f)||(tS(a,i,2,!1),c.add(f))}function Np(i,a,c){var f=0;a&&(f|=4),tS(c,i,f,a)}var yd="_reactListening"+Math.random().toString(36).slice(2);function Ap(i){if(!i[yd]){i[yd]=!0,Z0.forEach(function(c){c!=="selectionchange"&&(sD.has(c)||Np(c,!1,i),Np(c,!0,i))});var a=i.nodeType===9?i:i.ownerDocument;a===null||a[yd]||(a[yd]=!0,Np("selectionchange",!1,a))}}function tS(i,a,c,f){switch(TS(a)){case 2:var y=OD;break;case 8:y=DD;break;default:y=$p}c=y.bind(null,a,c,i),y=void 0,!Qh||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(y=!0),f?y!==void 0?i.addEventListener(a,c,{capture:!0,passive:y}):i.addEventListener(a,c,!0):y!==void 0?i.addEventListener(a,c,{passive:y}):i.addEventListener(a,c,!1)}function Rp(i,a,c,f,y){var b=f;if((a&1)===0&&(a&2)===0&&f!==null)e:for(;;){if(f===null)return;var _=f.tag;if(_===3||_===4){var L=f.stateNode.containerInfo;if(L===y)break;if(_===4)for(_=f.return;_!==null;){var U=_.tag;if((U===3||U===4)&&_.stateNode.containerInfo===y)return;_=_.return}for(;L!==null;){if(_=Rs(L),_===null)return;if(U=_.tag,U===5||U===6||U===26||U===27){f=b=_;continue e}L=L.parentNode}}f=f.return}lb(function(){var ie=b,de=Kh(c),he=[];e:{var ae=zb.get(i);if(ae!==void 0){var se=Ru,Ie=i;switch(i){case"keypress":if(Nu(c)===0)break e;case"keydown":case"keyup":se=eO;break;case"focusin":Ie="focus",se=nm;break;case"focusout":Ie="blur",se=nm;break;case"beforeblur":case"afterblur":se=nm;break;case"click":if(c.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":se=db;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":se=HM;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":se=rO;break;case Mb:case Ob:case Db:se=qM;break;case Pb:se=aO;break;case"scroll":case"scrollend":se=VM;break;case"wheel":se=oO;break;case"copy":case"cut":case"paste":se=YM;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":se=hb;break;case"toggle":case"beforetoggle":se=cO}var ze=(a&4)!==0,bt=!ze&&(i==="scroll"||i==="scrollend"),J=ze?ae!==null?ae+"Capture":null:ae;ze=[];for(var q=ie,ne;q!==null;){var fe=q;if(ne=fe.stateNode,fe=fe.tag,fe!==5&&fe!==26&&fe!==27||ne===null||J===null||(fe=yl(q,J),fe!=null&&ze.push(Jl(q,fe,ne))),bt)break;q=q.return}0<ze.length&&(ae=new se(ae,Ie,null,c,de),he.push({event:ae,listeners:ze}))}}if((a&7)===0){e:{if(ae=i==="mouseover"||i==="pointerover",se=i==="mouseout"||i==="pointerout",ae&&c!==Xh&&(Ie=c.relatedTarget||c.fromElement)&&(Rs(Ie)||Ie[sn]))break e;if((se||ae)&&(ae=de.window===de?de:(ae=de.ownerDocument)?ae.defaultView||ae.parentWindow:window,se?(Ie=c.relatedTarget||c.toElement,se=ie,Ie=Ie?Rs(Ie):null,Ie!==null&&(bt=o(Ie),ze=Ie.tag,Ie!==bt||ze!==5&&ze!==27&&ze!==6)&&(Ie=null)):(se=null,Ie=ie),se!==Ie)){if(ze=db,fe="onMouseLeave",J="onMouseEnter",q="mouse",(i==="pointerout"||i==="pointerover")&&(ze=hb,fe="onPointerLeave",J="onPointerEnter",q="pointer"),bt=se==null?ae:gl(se),ne=Ie==null?ae:gl(Ie),ae=new ze(fe,q+"leave",se,c,de),ae.target=bt,ae.relatedTarget=ne,fe=null,Rs(de)===ie&&(ze=new ze(J,q+"enter",Ie,c,de),ze.target=ne,ze.relatedTarget=bt,fe=ze),bt=fe,se&&Ie)t:{for(ze=se,J=Ie,q=0,ne=ze;ne;ne=fo(ne))q++;for(ne=0,fe=J;fe;fe=fo(fe))ne++;for(;0<q-ne;)ze=fo(ze),q--;for(;0<ne-q;)J=fo(J),ne--;for(;q--;){if(ze===J||J!==null&&ze===J.alternate)break t;ze=fo(ze),J=fo(J)}ze=null}else ze=null;se!==null&&nS(he,ae,se,ze,!1),Ie!==null&&bt!==null&&nS(he,bt,Ie,ze,!0)}}e:{if(ae=ie?gl(ie):window,se=ae.nodeName&&ae.nodeName.toLowerCase(),se==="select"||se==="input"&&ae.type==="file")var Ee=wb;else if(vb(ae))if(Sb)Ee=vO;else{Ee=yO;var et=gO}else se=ae.nodeName,!se||se.toLowerCase()!=="input"||ae.type!=="checkbox"&&ae.type!=="radio"?ie&&Zh(ie.elementType)&&(Ee=wb):Ee=xO;if(Ee&&(Ee=Ee(i,ie))){bb(he,Ee,c,de);break e}et&&et(i,ae,ie),i==="focusout"&&ie&&ae.type==="number"&&ie.memoizedProps.value!=null&&Yh(ae,"number",ae.value)}switch(et=ie?gl(ie):window,i){case"focusin":(vb(et)||et.contentEditable==="true")&&(Us=et,lm=ie,Tl=null);break;case"focusout":Tl=lm=Us=null;break;case"mousedown":cm=!0;break;case"contextmenu":case"mouseup":case"dragend":cm=!1,Ab(he,c,de);break;case"selectionchange":if(wO)break;case"keydown":case"keyup":Ab(he,c,de)}var Re;if(im)e:{switch(i){case"compositionstart":var Le="onCompositionStart";break e;case"compositionend":Le="onCompositionEnd";break e;case"compositionupdate":Le="onCompositionUpdate";break e}Le=void 0}else Vs?yb(i,c)&&(Le="onCompositionEnd"):i==="keydown"&&c.keyCode===229&&(Le="onCompositionStart");Le&&(mb&&c.locale!=="ko"&&(Vs||Le!=="onCompositionStart"?Le==="onCompositionEnd"&&Vs&&(Re=cb()):(Hi=de,Jh="value"in Hi?Hi.value:Hi.textContent,Vs=!0)),et=xd(ie,Le),0<et.length&&(Le=new fb(Le,i,null,c,de),he.push({event:Le,listeners:et}),Re?Le.data=Re:(Re=xb(c),Re!==null&&(Le.data=Re)))),(Re=dO?fO(i,c):hO(i,c))&&(Le=xd(ie,"onBeforeInput"),0<Le.length&&(et=new fb("onBeforeInput","beforeinput",null,c,de),he.push({event:et,listeners:Le}),et.data=Re)),rD(he,i,ie,c,de)}eS(he,a)})}function Jl(i,a,c){return{instance:i,listener:a,currentTarget:c}}function xd(i,a){for(var c=a+"Capture",f=[];i!==null;){var y=i,b=y.stateNode;if(y=y.tag,y!==5&&y!==26&&y!==27||b===null||(y=yl(i,c),y!=null&&f.unshift(Jl(i,y,b)),y=yl(i,a),y!=null&&f.push(Jl(i,y,b))),i.tag===3)return f;i=i.return}return[]}function fo(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function nS(i,a,c,f,y){for(var b=a._reactName,_=[];c!==null&&c!==f;){var L=c,U=L.alternate,ie=L.stateNode;if(L=L.tag,U!==null&&U===f)break;L!==5&&L!==26&&L!==27||ie===null||(U=ie,y?(ie=yl(c,b),ie!=null&&_.unshift(Jl(c,ie,U))):y||(ie=yl(c,b),ie!=null&&_.push(Jl(c,ie,U)))),c=c.return}_.length!==0&&i.push({event:a,listeners:_})}var oD=/\r\n?/g,lD=/\u0000|\uFFFD/g;function rS(i){return(typeof i=="string"?i:""+i).replace(oD,`
49
+ `).replace(lD,"")}function iS(i,a){return a=rS(a),rS(i)===a}function vd(){}function vt(i,a,c,f,y,b){switch(c){case"children":typeof f=="string"?a==="body"||a==="textarea"&&f===""||Ls(i,f):(typeof f=="number"||typeof f=="bigint")&&a!=="body"&&Ls(i,""+f);break;case"className":ku(i,"class",f);break;case"tabIndex":ku(i,"tabindex",f);break;case"dir":case"role":case"viewBox":case"width":case"height":ku(i,c,f);break;case"style":sb(i,f,b);break;case"data":if(a!=="object"){ku(i,"data",f);break}case"src":case"href":if(f===""&&(a!=="a"||c!=="href")){i.removeAttribute(c);break}if(f==null||typeof f=="function"||typeof f=="symbol"||typeof f=="boolean"){i.removeAttribute(c);break}f=_u(""+f),i.setAttribute(c,f);break;case"action":case"formAction":if(typeof f=="function"){i.setAttribute(c,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof b=="function"&&(c==="formAction"?(a!=="input"&&vt(i,a,"name",y.name,y,null),vt(i,a,"formEncType",y.formEncType,y,null),vt(i,a,"formMethod",y.formMethod,y,null),vt(i,a,"formTarget",y.formTarget,y,null)):(vt(i,a,"encType",y.encType,y,null),vt(i,a,"method",y.method,y,null),vt(i,a,"target",y.target,y,null)));if(f==null||typeof f=="symbol"||typeof f=="boolean"){i.removeAttribute(c);break}f=_u(""+f),i.setAttribute(c,f);break;case"onClick":f!=null&&(i.onclick=vd);break;case"onScroll":f!=null&&nt("scroll",i);break;case"onScrollEnd":f!=null&&nt("scrollend",i);break;case"dangerouslySetInnerHTML":if(f!=null){if(typeof f!="object"||!("__html"in f))throw Error(r(61));if(c=f.__html,c!=null){if(y.children!=null)throw Error(r(60));i.innerHTML=c}}break;case"multiple":i.multiple=f&&typeof f!="function"&&typeof f!="symbol";break;case"muted":i.muted=f&&typeof f!="function"&&typeof f!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(f==null||typeof f=="function"||typeof f=="boolean"||typeof f=="symbol"){i.removeAttribute("xlink:href");break}c=_u(""+f),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",c);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":f!=null&&typeof f!="function"&&typeof f!="symbol"?i.setAttribute(c,""+f):i.removeAttribute(c);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":f&&typeof f!="function"&&typeof f!="symbol"?i.setAttribute(c,""):i.removeAttribute(c);break;case"capture":case"download":f===!0?i.setAttribute(c,""):f!==!1&&f!=null&&typeof f!="function"&&typeof f!="symbol"?i.setAttribute(c,f):i.removeAttribute(c);break;case"cols":case"rows":case"size":case"span":f!=null&&typeof f!="function"&&typeof f!="symbol"&&!isNaN(f)&&1<=f?i.setAttribute(c,f):i.removeAttribute(c);break;case"rowSpan":case"start":f==null||typeof f=="function"||typeof f=="symbol"||isNaN(f)?i.removeAttribute(c):i.setAttribute(c,f);break;case"popover":nt("beforetoggle",i),nt("toggle",i),Cu(i,"popover",f);break;case"xlinkActuate":fi(i,"http://www.w3.org/1999/xlink","xlink:actuate",f);break;case"xlinkArcrole":fi(i,"http://www.w3.org/1999/xlink","xlink:arcrole",f);break;case"xlinkRole":fi(i,"http://www.w3.org/1999/xlink","xlink:role",f);break;case"xlinkShow":fi(i,"http://www.w3.org/1999/xlink","xlink:show",f);break;case"xlinkTitle":fi(i,"http://www.w3.org/1999/xlink","xlink:title",f);break;case"xlinkType":fi(i,"http://www.w3.org/1999/xlink","xlink:type",f);break;case"xmlBase":fi(i,"http://www.w3.org/XML/1998/namespace","xml:base",f);break;case"xmlLang":fi(i,"http://www.w3.org/XML/1998/namespace","xml:lang",f);break;case"xmlSpace":fi(i,"http://www.w3.org/XML/1998/namespace","xml:space",f);break;case"is":Cu(i,"is",f);break;case"innerText":case"textContent":break;default:(!(2<c.length)||c[0]!=="o"&&c[0]!=="O"||c[1]!=="n"&&c[1]!=="N")&&(c=IM.get(c)||c,Cu(i,c,f))}}function Mp(i,a,c,f,y,b){switch(c){case"style":sb(i,f,b);break;case"dangerouslySetInnerHTML":if(f!=null){if(typeof f!="object"||!("__html"in f))throw Error(r(61));if(c=f.__html,c!=null){if(y.children!=null)throw Error(r(60));i.innerHTML=c}}break;case"children":typeof f=="string"?Ls(i,f):(typeof f=="number"||typeof f=="bigint")&&Ls(i,""+f);break;case"onScroll":f!=null&&nt("scroll",i);break;case"onScrollEnd":f!=null&&nt("scrollend",i);break;case"onClick":f!=null&&(i.onclick=vd);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!X0.hasOwnProperty(c))e:{if(c[0]==="o"&&c[1]==="n"&&(y=c.endsWith("Capture"),a=c.slice(2,y?c.length-7:void 0),b=i[Tt]||null,b=b!=null?b[c]:null,typeof b=="function"&&i.removeEventListener(a,b,y),typeof f=="function")){typeof b!="function"&&b!==null&&(c in i?i[c]=null:i.hasAttribute(c)&&i.removeAttribute(c)),i.addEventListener(a,f,y);break e}c in i?i[c]=f:f===!0?i.setAttribute(c,""):Cu(i,c,f)}}}function pn(i,a,c){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":nt("error",i),nt("load",i);var f=!1,y=!1,b;for(b in c)if(c.hasOwnProperty(b)){var _=c[b];if(_!=null)switch(b){case"src":f=!0;break;case"srcSet":y=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,a));default:vt(i,a,b,_,c,null)}}y&&vt(i,a,"srcSet",c.srcSet,c,null),f&&vt(i,a,"src",c.src,c,null);return;case"input":nt("invalid",i);var L=b=_=y=null,U=null,ie=null;for(f in c)if(c.hasOwnProperty(f)){var de=c[f];if(de!=null)switch(f){case"name":y=de;break;case"type":_=de;break;case"checked":U=de;break;case"defaultChecked":ie=de;break;case"value":b=de;break;case"defaultValue":L=de;break;case"children":case"dangerouslySetInnerHTML":if(de!=null)throw Error(r(137,a));break;default:vt(i,a,f,de,c,null)}}nb(i,b,L,U,ie,_,y,!1),Tu(i);return;case"select":nt("invalid",i),f=_=b=null;for(y in c)if(c.hasOwnProperty(y)&&(L=c[y],L!=null))switch(y){case"value":b=L;break;case"defaultValue":_=L;break;case"multiple":f=L;default:vt(i,a,y,L,c,null)}a=b,c=_,i.multiple=!!f,a!=null?zs(i,!!f,a,!1):c!=null&&zs(i,!!f,c,!0);return;case"textarea":nt("invalid",i),b=y=f=null;for(_ in c)if(c.hasOwnProperty(_)&&(L=c[_],L!=null))switch(_){case"value":f=L;break;case"defaultValue":y=L;break;case"children":b=L;break;case"dangerouslySetInnerHTML":if(L!=null)throw Error(r(91));break;default:vt(i,a,_,L,c,null)}ib(i,f,y,b),Tu(i);return;case"option":for(U in c)if(c.hasOwnProperty(U)&&(f=c[U],f!=null))switch(U){case"selected":i.selected=f&&typeof f!="function"&&typeof f!="symbol";break;default:vt(i,a,U,f,c,null)}return;case"dialog":nt("beforetoggle",i),nt("toggle",i),nt("cancel",i),nt("close",i);break;case"iframe":case"object":nt("load",i);break;case"video":case"audio":for(f=0;f<Ql.length;f++)nt(Ql[f],i);break;case"image":nt("error",i),nt("load",i);break;case"details":nt("toggle",i);break;case"embed":case"source":case"link":nt("error",i),nt("load",i);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ie in c)if(c.hasOwnProperty(ie)&&(f=c[ie],f!=null))switch(ie){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,a));default:vt(i,a,ie,f,c,null)}return;default:if(Zh(a)){for(de in c)c.hasOwnProperty(de)&&(f=c[de],f!==void 0&&Mp(i,a,de,f,c,void 0));return}}for(L in c)c.hasOwnProperty(L)&&(f=c[L],f!=null&&vt(i,a,L,f,c,null))}function cD(i,a,c,f){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var y=null,b=null,_=null,L=null,U=null,ie=null,de=null;for(se in c){var he=c[se];if(c.hasOwnProperty(se)&&he!=null)switch(se){case"checked":break;case"value":break;case"defaultValue":U=he;default:f.hasOwnProperty(se)||vt(i,a,se,null,f,he)}}for(var ae in f){var se=f[ae];if(he=c[ae],f.hasOwnProperty(ae)&&(se!=null||he!=null))switch(ae){case"type":b=se;break;case"name":y=se;break;case"checked":ie=se;break;case"defaultChecked":de=se;break;case"value":_=se;break;case"defaultValue":L=se;break;case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(r(137,a));break;default:se!==he&&vt(i,a,ae,se,f,he)}}Gh(i,_,L,U,ie,de,b,y);return;case"select":se=_=L=ae=null;for(b in c)if(U=c[b],c.hasOwnProperty(b)&&U!=null)switch(b){case"value":break;case"multiple":se=U;default:f.hasOwnProperty(b)||vt(i,a,b,null,f,U)}for(y in f)if(b=f[y],U=c[y],f.hasOwnProperty(y)&&(b!=null||U!=null))switch(y){case"value":ae=b;break;case"defaultValue":L=b;break;case"multiple":_=b;default:b!==U&&vt(i,a,y,b,f,U)}a=L,c=_,f=se,ae!=null?zs(i,!!c,ae,!1):!!f!=!!c&&(a!=null?zs(i,!!c,a,!0):zs(i,!!c,c?[]:"",!1));return;case"textarea":se=ae=null;for(L in c)if(y=c[L],c.hasOwnProperty(L)&&y!=null&&!f.hasOwnProperty(L))switch(L){case"value":break;case"children":break;default:vt(i,a,L,null,f,y)}for(_ in f)if(y=f[_],b=c[_],f.hasOwnProperty(_)&&(y!=null||b!=null))switch(_){case"value":ae=y;break;case"defaultValue":se=y;break;case"children":break;case"dangerouslySetInnerHTML":if(y!=null)throw Error(r(91));break;default:y!==b&&vt(i,a,_,y,f,b)}rb(i,ae,se);return;case"option":for(var Ie in c)if(ae=c[Ie],c.hasOwnProperty(Ie)&&ae!=null&&!f.hasOwnProperty(Ie))switch(Ie){case"selected":i.selected=!1;break;default:vt(i,a,Ie,null,f,ae)}for(U in f)if(ae=f[U],se=c[U],f.hasOwnProperty(U)&&ae!==se&&(ae!=null||se!=null))switch(U){case"selected":i.selected=ae&&typeof ae!="function"&&typeof ae!="symbol";break;default:vt(i,a,U,ae,f,se)}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 ze in c)ae=c[ze],c.hasOwnProperty(ze)&&ae!=null&&!f.hasOwnProperty(ze)&&vt(i,a,ze,null,f,ae);for(ie in f)if(ae=f[ie],se=c[ie],f.hasOwnProperty(ie)&&ae!==se&&(ae!=null||se!=null))switch(ie){case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(r(137,a));break;default:vt(i,a,ie,ae,f,se)}return;default:if(Zh(a)){for(var bt in c)ae=c[bt],c.hasOwnProperty(bt)&&ae!==void 0&&!f.hasOwnProperty(bt)&&Mp(i,a,bt,void 0,f,ae);for(de in f)ae=f[de],se=c[de],!f.hasOwnProperty(de)||ae===se||ae===void 0&&se===void 0||Mp(i,a,de,ae,f,se);return}}for(var J in c)ae=c[J],c.hasOwnProperty(J)&&ae!=null&&!f.hasOwnProperty(J)&&vt(i,a,J,null,f,ae);for(he in f)ae=f[he],se=c[he],!f.hasOwnProperty(he)||ae===se||ae==null&&se==null||vt(i,a,he,ae,f,se)}var Op=null,Dp=null;function bd(i){return i.nodeType===9?i:i.ownerDocument}function aS(i){switch(i){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function sS(i,a){if(i===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&a==="foreignObject"?0:i}function Pp(i,a){return i==="textarea"||i==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var zp=null;function uD(){var i=window.event;return i&&i.type==="popstate"?i===zp?!1:(zp=i,!0):(zp=null,!1)}var oS=typeof setTimeout=="function"?setTimeout:void 0,dD=typeof clearTimeout=="function"?clearTimeout:void 0,lS=typeof Promise=="function"?Promise:void 0,fD=typeof queueMicrotask=="function"?queueMicrotask:typeof lS<"u"?function(i){return lS.resolve(null).then(i).catch(hD)}:oS;function hD(i){setTimeout(function(){throw i})}function ia(i){return i==="head"}function cS(i,a){var c=a,f=0,y=0;do{var b=c.nextSibling;if(i.removeChild(c),b&&b.nodeType===8)if(c=b.data,c==="/$"){if(0<f&&8>f){c=f;var _=i.ownerDocument;if(c&1&&ec(_.documentElement),c&2&&ec(_.body),c&4)for(c=_.head,ec(c),_=c.firstChild;_;){var L=_.nextSibling,U=_.nodeName;_[pl]||U==="SCRIPT"||U==="STYLE"||U==="LINK"&&_.rel.toLowerCase()==="stylesheet"||c.removeChild(_),_=L}}if(y===0){i.removeChild(b),lc(a);return}y--}else c==="$"||c==="$?"||c==="$!"?y++:f=c.charCodeAt(0)-48;else f=0;c=b}while(c);lc(a)}function Lp(i){var a=i.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var c=a;switch(a=a.nextSibling,c.nodeName){case"HTML":case"HEAD":case"BODY":Lp(c),Hh(c);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(c.rel.toLowerCase()==="stylesheet")continue}i.removeChild(c)}}function mD(i,a,c,f){for(;i.nodeType===1;){var y=c;if(i.nodeName.toLowerCase()!==a.toLowerCase()){if(!f&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(f){if(!i[pl])switch(a){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(b=i.getAttribute("rel"),b==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(b!==y.rel||i.getAttribute("href")!==(y.href==null||y.href===""?null:y.href)||i.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin)||i.getAttribute("title")!==(y.title==null?null:y.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(b=i.getAttribute("src"),(b!==(y.src==null?null:y.src)||i.getAttribute("type")!==(y.type==null?null:y.type)||i.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin))&&b&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(a==="input"&&i.type==="hidden"){var b=y.name==null?null:""+y.name;if(y.type==="hidden"&&i.getAttribute("name")===b)return i}else return i;if(i=Or(i.nextSibling),i===null)break}return null}function pD(i,a,c){if(a==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!c||(i=Or(i.nextSibling),i===null))return null;return i}function Ip(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState==="complete"}function gD(i,a){var c=i.ownerDocument;if(i.data!=="$?"||c.readyState==="complete")a();else{var f=function(){a(),c.removeEventListener("DOMContentLoaded",f)};c.addEventListener("DOMContentLoaded",f),i._reactRetry=f}}function Or(i){for(;i!=null;i=i.nextSibling){var a=i.nodeType;if(a===1||a===3)break;if(a===8){if(a=i.data,a==="$"||a==="$!"||a==="$?"||a==="F!"||a==="F")break;if(a==="/$")return null}}return i}var Bp=null;function uS(i){i=i.previousSibling;for(var a=0;i;){if(i.nodeType===8){var c=i.data;if(c==="$"||c==="$!"||c==="$?"){if(a===0)return i;a--}else c==="/$"&&a++}i=i.previousSibling}return null}function dS(i,a,c){switch(a=bd(c),i){case"html":if(i=a.documentElement,!i)throw Error(r(452));return i;case"head":if(i=a.head,!i)throw Error(r(453));return i;case"body":if(i=a.body,!i)throw Error(r(454));return i;default:throw Error(r(451))}}function ec(i){for(var a=i.attributes;a.length;)i.removeAttributeNode(a[0]);Hh(i)}var xr=new Map,fS=new Set;function wd(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var Ei=F.d;F.d={f:yD,r:xD,D:vD,C:bD,L:wD,m:SD,X:kD,S:CD,M:TD};function yD(){var i=Ei.f(),a=fd();return i||a}function xD(i){var a=Ms(i);a!==null&&a.tag===5&&a.type==="form"?Mw(a):Ei.r(i)}var ho=typeof document>"u"?null:document;function hS(i,a,c){var f=ho;if(f&&typeof a=="string"&&a){var y=dr(a);y='link[rel="'+i+'"][href="'+y+'"]',typeof c=="string"&&(y+='[crossorigin="'+c+'"]'),fS.has(y)||(fS.add(y),i={rel:i,crossOrigin:c,href:a},f.querySelector(y)===null&&(a=f.createElement("link"),pn(a,"link",i),on(a),f.head.appendChild(a)))}}function vD(i){Ei.D(i),hS("dns-prefetch",i,null)}function bD(i,a){Ei.C(i,a),hS("preconnect",i,a)}function wD(i,a,c){Ei.L(i,a,c);var f=ho;if(f&&i&&a){var y='link[rel="preload"][as="'+dr(a)+'"]';a==="image"&&c&&c.imageSrcSet?(y+='[imagesrcset="'+dr(c.imageSrcSet)+'"]',typeof c.imageSizes=="string"&&(y+='[imagesizes="'+dr(c.imageSizes)+'"]')):y+='[href="'+dr(i)+'"]';var b=y;switch(a){case"style":b=mo(i);break;case"script":b=po(i)}xr.has(b)||(i=g({rel:"preload",href:a==="image"&&c&&c.imageSrcSet?void 0:i,as:a},c),xr.set(b,i),f.querySelector(y)!==null||a==="style"&&f.querySelector(tc(b))||a==="script"&&f.querySelector(nc(b))||(a=f.createElement("link"),pn(a,"link",i),on(a),f.head.appendChild(a)))}}function SD(i,a){Ei.m(i,a);var c=ho;if(c&&i){var f=a&&typeof a.as=="string"?a.as:"script",y='link[rel="modulepreload"][as="'+dr(f)+'"][href="'+dr(i)+'"]',b=y;switch(f){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":b=po(i)}if(!xr.has(b)&&(i=g({rel:"modulepreload",href:i},a),xr.set(b,i),c.querySelector(y)===null)){switch(f){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(c.querySelector(nc(b)))return}f=c.createElement("link"),pn(f,"link",i),on(f),c.head.appendChild(f)}}}function CD(i,a,c){Ei.S(i,a,c);var f=ho;if(f&&i){var y=Os(f).hoistableStyles,b=mo(i);a=a||"default";var _=y.get(b);if(!_){var L={loading:0,preload:null};if(_=f.querySelector(tc(b)))L.loading=5;else{i=g({rel:"stylesheet",href:i,"data-precedence":a},c),(c=xr.get(b))&&Vp(i,c);var U=_=f.createElement("link");on(U),pn(U,"link",i),U._p=new Promise(function(ie,de){U.onload=ie,U.onerror=de}),U.addEventListener("load",function(){L.loading|=1}),U.addEventListener("error",function(){L.loading|=2}),L.loading|=4,Sd(_,a,f)}_={type:"stylesheet",instance:_,count:1,state:L},y.set(b,_)}}}function kD(i,a){Ei.X(i,a);var c=ho;if(c&&i){var f=Os(c).hoistableScripts,y=po(i),b=f.get(y);b||(b=c.querySelector(nc(y)),b||(i=g({src:i,async:!0},a),(a=xr.get(y))&&Up(i,a),b=c.createElement("script"),on(b),pn(b,"link",i),c.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},f.set(y,b))}}function TD(i,a){Ei.M(i,a);var c=ho;if(c&&i){var f=Os(c).hoistableScripts,y=po(i),b=f.get(y);b||(b=c.querySelector(nc(y)),b||(i=g({src:i,async:!0,type:"module"},a),(a=xr.get(y))&&Up(i,a),b=c.createElement("script"),on(b),pn(b,"link",i),c.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},f.set(y,b))}}function mS(i,a,c,f){var y=(y=W.current)?wd(y):null;if(!y)throw Error(r(446));switch(i){case"meta":case"title":return null;case"style":return typeof c.precedence=="string"&&typeof c.href=="string"?(a=mo(c.href),c=Os(y).hoistableStyles,f=c.get(a),f||(f={type:"style",instance:null,count:0,state:null},c.set(a,f)),f):{type:"void",instance:null,count:0,state:null};case"link":if(c.rel==="stylesheet"&&typeof c.href=="string"&&typeof c.precedence=="string"){i=mo(c.href);var b=Os(y).hoistableStyles,_=b.get(i);if(_||(y=y.ownerDocument||y,_={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},b.set(i,_),(b=y.querySelector(tc(i)))&&!b._p&&(_.instance=b,_.state.loading=5),xr.has(i)||(c={rel:"preload",as:"style",href:c.href,crossOrigin:c.crossOrigin,integrity:c.integrity,media:c.media,hrefLang:c.hrefLang,referrerPolicy:c.referrerPolicy},xr.set(i,c),b||ED(y,i,c,_.state))),a&&f===null)throw Error(r(528,""));return _}if(a&&f!==null)throw Error(r(529,""));return null;case"script":return a=c.async,c=c.src,typeof c=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=po(c),c=Os(y).hoistableScripts,f=c.get(a),f||(f={type:"script",instance:null,count:0,state:null},c.set(a,f)),f):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function mo(i){return'href="'+dr(i)+'"'}function tc(i){return'link[rel="stylesheet"]['+i+"]"}function pS(i){return g({},i,{"data-precedence":i.precedence,precedence:null})}function ED(i,a,c,f){i.querySelector('link[rel="preload"][as="style"]['+a+"]")?f.loading=1:(a=i.createElement("link"),f.preload=a,a.addEventListener("load",function(){return f.loading|=1}),a.addEventListener("error",function(){return f.loading|=2}),pn(a,"link",c),on(a),i.head.appendChild(a))}function po(i){return'[src="'+dr(i)+'"]'}function nc(i){return"script[async]"+i}function gS(i,a,c){if(a.count++,a.instance===null)switch(a.type){case"style":var f=i.querySelector('style[data-href~="'+dr(c.href)+'"]');if(f)return a.instance=f,on(f),f;var y=g({},c,{"data-href":c.href,"data-precedence":c.precedence,href:null,precedence:null});return f=(i.ownerDocument||i).createElement("style"),on(f),pn(f,"style",y),Sd(f,c.precedence,i),a.instance=f;case"stylesheet":y=mo(c.href);var b=i.querySelector(tc(y));if(b)return a.state.loading|=4,a.instance=b,on(b),b;f=pS(c),(y=xr.get(y))&&Vp(f,y),b=(i.ownerDocument||i).createElement("link"),on(b);var _=b;return _._p=new Promise(function(L,U){_.onload=L,_.onerror=U}),pn(b,"link",f),a.state.loading|=4,Sd(b,c.precedence,i),a.instance=b;case"script":return b=po(c.src),(y=i.querySelector(nc(b)))?(a.instance=y,on(y),y):(f=c,(y=xr.get(b))&&(f=g({},c),Up(f,y)),i=i.ownerDocument||i,y=i.createElement("script"),on(y),pn(y,"link",f),i.head.appendChild(y),a.instance=y);case"void":return null;default:throw Error(r(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(f=a.instance,a.state.loading|=4,Sd(f,c.precedence,i));return a.instance}function Sd(i,a,c){for(var f=c.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),y=f.length?f[f.length-1]:null,b=y,_=0;_<f.length;_++){var L=f[_];if(L.dataset.precedence===a)b=L;else if(b!==y)break}b?b.parentNode.insertBefore(i,b.nextSibling):(a=c.nodeType===9?c.head:c,a.insertBefore(i,a.firstChild))}function Vp(i,a){i.crossOrigin==null&&(i.crossOrigin=a.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=a.referrerPolicy),i.title==null&&(i.title=a.title)}function Up(i,a){i.crossOrigin==null&&(i.crossOrigin=a.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=a.referrerPolicy),i.integrity==null&&(i.integrity=a.integrity)}var Cd=null;function yS(i,a,c){if(Cd===null){var f=new Map,y=Cd=new Map;y.set(c,f)}else y=Cd,f=y.get(c),f||(f=new Map,y.set(c,f));if(f.has(i))return f;for(f.set(i,null),c=c.getElementsByTagName(i),y=0;y<c.length;y++){var b=c[y];if(!(b[pl]||b[Ht]||i==="link"&&b.getAttribute("rel")==="stylesheet")&&b.namespaceURI!=="http://www.w3.org/2000/svg"){var _=b.getAttribute(a)||"";_=i+_;var L=f.get(_);L?L.push(b):f.set(_,[b])}}return f}function xS(i,a,c){i=i.ownerDocument||i,i.head.insertBefore(c,a==="title"?i.querySelector("head > title"):null)}function _D(i,a,c){if(c===1||a.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;switch(a.rel){case"stylesheet":return i=a.disabled,typeof a.precedence=="string"&&i==null;default:return!0}case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function vS(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}var rc=null;function jD(){}function ND(i,a,c){if(rc===null)throw Error(r(475));var f=rc;if(a.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var y=mo(c.href),b=i.querySelector(tc(y));if(b){i=b._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(f.count++,f=kd.bind(f),i.then(f,f)),a.state.loading|=4,a.instance=b,on(b);return}b=i.ownerDocument||i,c=pS(c),(y=xr.get(y))&&Vp(c,y),b=b.createElement("link"),on(b);var _=b;_._p=new Promise(function(L,U){_.onload=L,_.onerror=U}),pn(b,"link",c),a.instance=b}f.stylesheets===null&&(f.stylesheets=new Map),f.stylesheets.set(a,i),(i=a.state.preload)&&(a.state.loading&3)===0&&(f.count++,a=kd.bind(f),i.addEventListener("load",a),i.addEventListener("error",a))}}function AD(){if(rc===null)throw Error(r(475));var i=rc;return i.stylesheets&&i.count===0&&Hp(i,i.stylesheets),0<i.count?function(a){var c=setTimeout(function(){if(i.stylesheets&&Hp(i,i.stylesheets),i.unsuspend){var f=i.unsuspend;i.unsuspend=null,f()}},6e4);return i.unsuspend=a,function(){i.unsuspend=null,clearTimeout(c)}}:null}function kd(){if(this.count--,this.count===0){if(this.stylesheets)Hp(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var Td=null;function Hp(i,a){i.stylesheets=null,i.unsuspend!==null&&(i.count++,Td=new Map,a.forEach(RD,i),Td=null,kd.call(i))}function RD(i,a){if(!(a.state.loading&4)){var c=Td.get(i);if(c)var f=c.get(null);else{c=new Map,Td.set(i,c);for(var y=i.querySelectorAll("link[data-precedence],style[data-precedence]"),b=0;b<y.length;b++){var _=y[b];(_.nodeName==="LINK"||_.getAttribute("media")!=="not all")&&(c.set(_.dataset.precedence,_),f=_)}f&&c.set(null,f)}y=a.instance,_=y.getAttribute("data-precedence"),b=c.get(_)||f,b===f&&c.set(null,y),c.set(_,y),this.count++,f=kd.bind(this),y.addEventListener("load",f),y.addEventListener("error",f),b?b.parentNode.insertBefore(y,b.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(y,i.firstChild)),a.state.loading|=4}}var ic={$$typeof:O,Provider:null,Consumer:null,_currentValue:V,_currentValue2:V,_threadCount:0};function MD(i,a,c,f,y,b,_,L){this.tag=1,this.containerInfo=i,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=ml(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ml(0),this.hiddenUpdates=ml(null),this.identifierPrefix=f,this.onUncaughtError=y,this.onCaughtError=b,this.onRecoverableError=_,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=L,this.incompleteTransitions=new Map}function bS(i,a,c,f,y,b,_,L,U,ie,de,he){return i=new MD(i,a,c,_,L,U,ie,he),a=1,b===!0&&(a|=24),b=Xn(3,null,null,a),i.current=b,b.stateNode=i,a=Cm(),a.refCount++,i.pooledCache=a,a.refCount++,b.memoizedState={element:f,isDehydrated:c,cache:a},_m(b),i}function wS(i){return i?(i=qs,i):qs}function SS(i,a,c,f,y,b){y=wS(y),f.context===null?f.context=y:f.pendingContext=y,f=qi(a),f.payload={element:c},b=b===void 0?null:b,b!==null&&(f.callback=b),c=Gi(i,f,a),c!==null&&(er(c,i,a),Dl(c,i,a))}function CS(i,a){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var c=i.retryLane;i.retryLane=c!==0&&c<a?c:a}}function Fp(i,a){CS(i,a),(i=i.alternate)&&CS(i,a)}function kS(i){if(i.tag===13){var a=$s(i,67108864);a!==null&&er(a,i,67108864),Fp(i,67108864)}}var Ed=!0;function OD(i,a,c,f){var y=I.T;I.T=null;var b=F.p;try{F.p=2,$p(i,a,c,f)}finally{F.p=b,I.T=y}}function DD(i,a,c,f){var y=I.T;I.T=null;var b=F.p;try{F.p=8,$p(i,a,c,f)}finally{F.p=b,I.T=y}}function $p(i,a,c,f){if(Ed){var y=qp(f);if(y===null)Rp(i,a,f,_d,c),ES(i,f);else if(zD(y,i,a,c,f))f.stopPropagation();else if(ES(i,f),a&4&&-1<PD.indexOf(i)){for(;y!==null;){var b=Ms(y);if(b!==null)switch(b.tag){case 3:if(b=b.stateNode,b.current.memoizedState.isDehydrated){var _=Cn(b.pendingLanes);if(_!==0){var L=b;for(L.pendingLanes|=2,L.entangledLanes|=2;_;){var U=1<<31-De(_);L.entanglements[1]|=U,_&=~U}Zr(b),(mt&6)===0&&(ud=st()+500,Wl(0))}}break;case 13:L=$s(b,2),L!==null&&er(L,b,2),fd(),Fp(b,2)}if(b=qp(f),b===null&&Rp(i,a,f,_d,c),b===y)break;y=b}y!==null&&f.stopPropagation()}else Rp(i,a,f,null,c)}}function qp(i){return i=Kh(i),Gp(i)}var _d=null;function Gp(i){if(_d=null,i=Rs(i),i!==null){var a=o(i);if(a===null)i=null;else{var c=a.tag;if(c===13){if(i=l(a),i!==null)return i;i=null}else if(c===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;i=null}else a!==i&&(i=null)}}return _d=i,null}function TS(i){switch(i){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(yt()){case Ct:return 2;case lr:return 8;case Jt:case kt:return 32;case Yn:return 268435456;default:return 32}default:return 32}}var Yp=!1,aa=null,sa=null,oa=null,ac=new Map,sc=new Map,la=[],PD="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 ES(i,a){switch(i){case"focusin":case"focusout":aa=null;break;case"dragenter":case"dragleave":sa=null;break;case"mouseover":case"mouseout":oa=null;break;case"pointerover":case"pointerout":ac.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":sc.delete(a.pointerId)}}function oc(i,a,c,f,y,b){return i===null||i.nativeEvent!==b?(i={blockedOn:a,domEventName:c,eventSystemFlags:f,nativeEvent:b,targetContainers:[y]},a!==null&&(a=Ms(a),a!==null&&kS(a)),i):(i.eventSystemFlags|=f,a=i.targetContainers,y!==null&&a.indexOf(y)===-1&&a.push(y),i)}function zD(i,a,c,f,y){switch(a){case"focusin":return aa=oc(aa,i,a,c,f,y),!0;case"dragenter":return sa=oc(sa,i,a,c,f,y),!0;case"mouseover":return oa=oc(oa,i,a,c,f,y),!0;case"pointerover":var b=y.pointerId;return ac.set(b,oc(ac.get(b)||null,i,a,c,f,y)),!0;case"gotpointercapture":return b=y.pointerId,sc.set(b,oc(sc.get(b)||null,i,a,c,f,y)),!0}return!1}function _S(i){var a=Rs(i.target);if(a!==null){var c=o(a);if(c!==null){if(a=c.tag,a===13){if(a=l(c),a!==null){i.blockedOn=a,en(i.priority,function(){if(c.tag===13){var f=Jn();f=Yt(f);var y=$s(c,f);y!==null&&er(y,c,f),Fp(c,f)}});return}}else if(a===3&&c.stateNode.current.memoizedState.isDehydrated){i.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}i.blockedOn=null}function jd(i){if(i.blockedOn!==null)return!1;for(var a=i.targetContainers;0<a.length;){var c=qp(i.nativeEvent);if(c===null){c=i.nativeEvent;var f=new c.constructor(c.type,c);Xh=f,c.target.dispatchEvent(f),Xh=null}else return a=Ms(c),a!==null&&kS(a),i.blockedOn=c,!1;a.shift()}return!0}function jS(i,a,c){jd(i)&&c.delete(a)}function LD(){Yp=!1,aa!==null&&jd(aa)&&(aa=null),sa!==null&&jd(sa)&&(sa=null),oa!==null&&jd(oa)&&(oa=null),ac.forEach(jS),sc.forEach(jS)}function Nd(i,a){i.blockedOn===a&&(i.blockedOn=null,Yp||(Yp=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,LD)))}var Ad=null;function NS(i){Ad!==i&&(Ad=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Ad===i&&(Ad=null);for(var a=0;a<i.length;a+=3){var c=i[a],f=i[a+1],y=i[a+2];if(typeof f!="function"){if(Gp(f||c)===null)continue;break}var b=Ms(c);b!==null&&(i.splice(a,3),a-=3,Gm(b,{pending:!0,data:y,method:c.method,action:f},f,y))}}))}function lc(i){function a(U){return Nd(U,i)}aa!==null&&Nd(aa,i),sa!==null&&Nd(sa,i),oa!==null&&Nd(oa,i),ac.forEach(a),sc.forEach(a);for(var c=0;c<la.length;c++){var f=la[c];f.blockedOn===i&&(f.blockedOn=null)}for(;0<la.length&&(c=la[0],c.blockedOn===null);)_S(c),c.blockedOn===null&&la.shift();if(c=(i.ownerDocument||i).$$reactFormReplay,c!=null)for(f=0;f<c.length;f+=3){var y=c[f],b=c[f+1],_=y[Tt]||null;if(typeof b=="function")_||NS(c);else if(_){var L=null;if(b&&b.hasAttribute("formAction")){if(y=b,_=b[Tt]||null)L=_.formAction;else if(Gp(y)!==null)continue}else L=_.action;typeof L=="function"?c[f+1]=L:(c.splice(f,3),f-=3),NS(c)}}}function Zp(i){this._internalRoot=i}Rd.prototype.render=Zp.prototype.render=function(i){var a=this._internalRoot;if(a===null)throw Error(r(409));var c=a.current,f=Jn();SS(c,f,i,a,null,null)},Rd.prototype.unmount=Zp.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var a=i.containerInfo;SS(i.current,2,null,i,null,null),fd(),a[sn]=null}};function Rd(i){this._internalRoot=i}Rd.prototype.unstable_scheduleHydration=function(i){if(i){var a=La();i={blockedOn:null,target:i,priority:a};for(var c=0;c<la.length&&a!==0&&a<la[c].priority;c++);la.splice(c,0,i),c===0&&_S(i)}};var AS=t.version;if(AS!=="19.1.0")throw Error(r(527,AS,"19.1.0"));F.findDOMNode=function(i){var a=i._reactInternals;if(a===void 0)throw typeof i.render=="function"?Error(r(188)):(i=Object.keys(i).join(","),Error(r(268,i)));return i=d(a),i=i!==null?h(i):null,i=i===null?null:i.stateNode,i};var ID={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:I,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Md=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Md.isDisabled&&Md.supportsFiber)try{ue=Md.inject(ID),ge=Md}catch{}}return uc.createRoot=function(i,a){if(!s(i))throw Error(r(299));var c=!1,f="",y=Gw,b=Yw,_=Zw,L=null;return a!=null&&(a.unstable_strictMode===!0&&(c=!0),a.identifierPrefix!==void 0&&(f=a.identifierPrefix),a.onUncaughtError!==void 0&&(y=a.onUncaughtError),a.onCaughtError!==void 0&&(b=a.onCaughtError),a.onRecoverableError!==void 0&&(_=a.onRecoverableError),a.unstable_transitionCallbacks!==void 0&&(L=a.unstable_transitionCallbacks)),a=bS(i,1,!1,null,null,c,f,y,b,_,L,null),i[sn]=a.current,Ap(i),new Zp(a)},uc.hydrateRoot=function(i,a,c){if(!s(i))throw Error(r(299));var f=!1,y="",b=Gw,_=Yw,L=Zw,U=null,ie=null;return c!=null&&(c.unstable_strictMode===!0&&(f=!0),c.identifierPrefix!==void 0&&(y=c.identifierPrefix),c.onUncaughtError!==void 0&&(b=c.onUncaughtError),c.onCaughtError!==void 0&&(_=c.onCaughtError),c.onRecoverableError!==void 0&&(L=c.onRecoverableError),c.unstable_transitionCallbacks!==void 0&&(U=c.unstable_transitionCallbacks),c.formState!==void 0&&(ie=c.formState)),a=bS(i,1,!0,a,c??null,f,y,b,_,L,U,ie),a.context=wS(null),c=a.current,f=Jn(),f=Yt(f),y=qi(f),y.callback=null,Gi(c,y,f),c=f,a.current.lanes=c,Ui(a,c),Zr(a),i[sn]=a.current,Ap(i),new Rd(a)},uc.version="19.1.0",uc}var VS;function KD(){if(VS)return Wp.exports;VS=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(),Wp.exports=XD(),Wp.exports}var WD=KD();function DE(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=DE(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ux(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=DE(e))&&(r&&(r+=" "),r+=t);return r}const Hx="-",QD=e=>{const t=e4(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{const u=l.split(Hx);return u[0]===""&&u.length!==1&&u.shift(),PE(u,t)||JD(l)},getConflictingClassGroupIds:(l,u)=>{const d=n[l]||[];return u&&r[l]?[...d,...r[l]]:d}}},PE=(e,t)=>{var l;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?PE(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;const o=e.join(Hx);return(l=t.validators.find(({validator:u})=>u(o)))==null?void 0:l.classGroupId},US=/^\[(.+)\]$/,JD=e=>{if(US.test(e)){const t=US.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},e4=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const s in n)sy(n[s],r,s,t);return r},sy=(e,t,n,r)=>{e.forEach(s=>{if(typeof s=="string"){const o=s===""?t:HS(t,s);o.classGroupId=n;return}if(typeof s=="function"){if(t4(s)){sy(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([o,l])=>{sy(l,HS(t,o),n,r)})})},HS=(e,t)=>{let n=e;return t.split(Hx).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},t4=e=>e.isThemeGetter,n4=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const s=(o,l)=>{n.set(o,l),t++,t>e&&(t=0,r=n,n=new Map)};return{get(o){let l=n.get(o);if(l!==void 0)return l;if((l=r.get(o))!==void 0)return s(o,l),l},set(o,l){n.has(o)?n.set(o,l):s(o,l)}}},oy="!",ly=":",r4=ly.length,i4=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=s=>{const o=[];let l=0,u=0,d=0,h;for(let S=0;S<s.length;S++){let C=s[S];if(l===0&&u===0){if(C===ly){o.push(s.slice(d,S)),d=S+r4;continue}if(C==="/"){h=S;continue}}C==="["?l++:C==="]"?l--:C==="("?u++:C===")"&&u--}const g=o.length===0?s:s.substring(d),p=a4(g),x=p!==g,v=h&&h>d?h-d:void 0;return{modifiers:o,hasImportantModifier:x,baseClassName:p,maybePostfixModifierPosition:v}};if(t){const s=t+ly,o=r;r=l=>l.startsWith(s)?o(l.substring(s.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:l,maybePostfixModifierPosition:void 0}}if(n){const s=r;r=o=>n({className:o,parseClassName:s})}return r},a4=e=>e.endsWith(oy)?e.substring(0,e.length-1):e.startsWith(oy)?e.substring(1):e,s4=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const s=[];let o=[];return r.forEach(l=>{l[0]==="["||t[l]?(s.push(...o.sort(),l),o=[]):o.push(l)}),s.push(...o.sort()),s}},o4=e=>({cache:n4(e.cacheSize),parseClassName:i4(e),sortModifiers:s4(e),...QD(e)}),l4=/\s+/,c4=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s,sortModifiers:o}=t,l=[],u=e.trim().split(l4);let d="";for(let h=u.length-1;h>=0;h-=1){const g=u[h],{isExternal:p,modifiers:x,hasImportantModifier:v,baseClassName:S,maybePostfixModifierPosition:C}=n(g);if(p){d=g+(d.length>0?" "+d:d);continue}let E=!!C,T=r(E?S.substring(0,C):S);if(!T){if(!E){d=g+(d.length>0?" "+d:d);continue}if(T=r(S),!T){d=g+(d.length>0?" "+d:d);continue}E=!1}const R=o(x).join(":"),O=v?R+oy:R,A=O+T;if(l.includes(A))continue;l.push(A);const M=s(T,E);for(let N=0;N<M.length;++N){const z=M[N];l.push(O+z)}d=g+(d.length>0?" "+d:d)}return d};function u4(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=zE(t))&&(r&&(r+=" "),r+=n);return r}const zE=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=zE(e[r]))&&(n&&(n+=" "),n+=t);return n};function d4(e,...t){let n,r,s,o=l;function l(d){const h=t.reduce((g,p)=>p(g),e());return n=o4(h),r=n.cache.get,s=n.cache.set,o=u,u(d)}function u(d){const h=r(d);if(h)return h;const g=c4(d,n);return s(d,g),g}return function(){return o(u4.apply(null,arguments))}}const rn=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},LE=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,IE=/^\((?:(\w[\w-]*):)?(.+)\)$/i,f4=/^\d+\/\d+$/,h4=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,m4=/\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$/,p4=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,g4=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,y4=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,go=e=>f4.test(e),Qe=e=>!!e&&!Number.isNaN(Number(e)),da=e=>!!e&&Number.isInteger(Number(e)),tg=e=>e.endsWith("%")&&Qe(e.slice(0,-1)),_i=e=>h4.test(e),x4=()=>!0,v4=e=>m4.test(e)&&!p4.test(e),BE=()=>!1,b4=e=>g4.test(e),w4=e=>y4.test(e),S4=e=>!_e(e)&&!je(e),C4=e=>Jo(e,HE,BE),_e=e=>LE.test(e),ts=e=>Jo(e,FE,v4),ng=e=>Jo(e,j4,Qe),FS=e=>Jo(e,VE,BE),k4=e=>Jo(e,UE,w4),Od=e=>Jo(e,$E,b4),je=e=>IE.test(e),dc=e=>el(e,FE),T4=e=>el(e,N4),$S=e=>el(e,VE),E4=e=>el(e,HE),_4=e=>el(e,UE),Dd=e=>el(e,$E,!0),Jo=(e,t,n)=>{const r=LE.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},el=(e,t,n=!1)=>{const r=IE.exec(e);return r?r[1]?t(r[1]):n:!1},VE=e=>e==="position"||e==="percentage",UE=e=>e==="image"||e==="url",HE=e=>e==="length"||e==="size"||e==="bg-size",FE=e=>e==="length",j4=e=>e==="number",N4=e=>e==="family-name",$E=e=>e==="shadow",A4=()=>{const e=rn("color"),t=rn("font"),n=rn("text"),r=rn("font-weight"),s=rn("tracking"),o=rn("leading"),l=rn("breakpoint"),u=rn("container"),d=rn("spacing"),h=rn("radius"),g=rn("shadow"),p=rn("inset-shadow"),x=rn("text-shadow"),v=rn("drop-shadow"),S=rn("blur"),C=rn("perspective"),E=rn("aspect"),T=rn("ease"),R=rn("animate"),O=()=>["auto","avoid","all","avoid-page","page","left","right","column"],A=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],M=()=>[...A(),je,_e],N=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto","contain","none"],P=()=>[je,_e,d],B=()=>[go,"full","auto",...P()],D=()=>[da,"none","subgrid",je,_e],H=()=>["auto",{span:["full",da,je,_e]},da,je,_e],$=()=>[da,"auto",je,_e],X=()=>["auto","min","max","fr",je,_e],Y=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],te=()=>["start","end","center","stretch","center-safe","end-safe"],I=()=>["auto",...P()],F=()=>[go,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],V=()=>[e,je,_e],Z=()=>[...A(),$S,FS,{position:[je,_e]}],k=()=>["no-repeat",{repeat:["","x","y","space","round"]}],G=()=>["auto","cover","contain",E4,C4,{size:[je,_e]}],le=()=>[tg,dc,ts],j=()=>["","none","full",h,je,_e],Q=()=>["",Qe,dc,ts],ee=()=>["solid","dashed","dotted","double"],W=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],K=()=>[Qe,tg,$S,FS],oe=()=>["","none",S,je,_e],ce=()=>["none",Qe,je,_e],me=()=>["none",Qe,je,_e],be=()=>[Qe,je,_e],Te=()=>[go,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[_i],breakpoint:[_i],color:[x4],container:[_i],"drop-shadow":[_i],ease:["in","out","in-out"],font:[S4],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[_i],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[_i],shadow:[_i],spacing:["px",Qe],text:[_i],"text-shadow":[_i],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",go,_e,je,E]}],container:["container"],columns:[{columns:[Qe,_e,je,u]}],"break-after":[{"break-after":O()}],"break-before":[{"break-before":O()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:M()}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:B()}],"inset-x":[{"inset-x":B()}],"inset-y":[{"inset-y":B()}],start:[{start:B()}],end:[{end:B()}],top:[{top:B()}],right:[{right:B()}],bottom:[{bottom:B()}],left:[{left:B()}],visibility:["visible","invisible","collapse"],z:[{z:[da,"auto",je,_e]}],basis:[{basis:[go,"full","auto",u,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Qe,go,"auto","initial","none",_e]}],grow:[{grow:["",Qe,je,_e]}],shrink:[{shrink:["",Qe,je,_e]}],order:[{order:[da,"first","last","none",je,_e]}],"grid-cols":[{"grid-cols":D()}],"col-start-end":[{col:H()}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":D()}],"row-start-end":[{row:H()}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":X()}],"auto-rows":[{"auto-rows":X()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...Y(),"normal"]}],"justify-items":[{"justify-items":[...te(),"normal"]}],"justify-self":[{"justify-self":["auto",...te()]}],"align-content":[{content:["normal",...Y()]}],"align-items":[{items:[...te(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...te(),{baseline:["","last"]}]}],"place-content":[{"place-content":Y()}],"place-items":[{"place-items":[...te(),"baseline"]}],"place-self":[{"place-self":["auto",...te()]}],p:[{p:P()}],px:[{px:P()}],py:[{py:P()}],ps:[{ps:P()}],pe:[{pe:P()}],pt:[{pt:P()}],pr:[{pr:P()}],pb:[{pb:P()}],pl:[{pl:P()}],m:[{m:I()}],mx:[{mx:I()}],my:[{my:I()}],ms:[{ms:I()}],me:[{me:I()}],mt:[{mt:I()}],mr:[{mr:I()}],mb:[{mb:I()}],ml:[{ml:I()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:F()}],w:[{w:[u,"screen",...F()]}],"min-w":[{"min-w":[u,"screen","none",...F()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[l]},...F()]}],h:[{h:["screen","lh",...F()]}],"min-h":[{"min-h":["screen","lh","none",...F()]}],"max-h":[{"max-h":["screen","lh",...F()]}],"font-size":[{text:["base",n,dc,ts]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,je,ng]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",tg,_e]}],"font-family":[{font:[T4,_e,t]}],"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:[s,je,_e]}],"line-clamp":[{"line-clamp":[Qe,"none",je,ng]}],leading:[{leading:[o,...P()]}],"list-image":[{"list-image":["none",je,_e]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",je,_e]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:V()}],"text-color":[{text:V()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ee(),"wavy"]}],"text-decoration-thickness":[{decoration:[Qe,"from-font","auto",je,ts]}],"text-decoration-color":[{decoration:V()}],"underline-offset":[{"underline-offset":[Qe,"auto",je,_e]}],"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",je,_e]}],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",je,_e]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Z()}],"bg-repeat":[{bg:k()}],"bg-size":[{bg:G()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},da,je,_e],radial:["",je,_e],conic:[da,je,_e]},_4,k4]}],"bg-color":[{bg:V()}],"gradient-from-pos":[{from:le()}],"gradient-via-pos":[{via:le()}],"gradient-to-pos":[{to:le()}],"gradient-from":[{from:V()}],"gradient-via":[{via:V()}],"gradient-to":[{to:V()}],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:Q()}],"border-w-x":[{"border-x":Q()}],"border-w-y":[{"border-y":Q()}],"border-w-s":[{"border-s":Q()}],"border-w-e":[{"border-e":Q()}],"border-w-t":[{"border-t":Q()}],"border-w-r":[{"border-r":Q()}],"border-w-b":[{"border-b":Q()}],"border-w-l":[{"border-l":Q()}],"divide-x":[{"divide-x":Q()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Q()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ee(),"hidden","none"]}],"divide-style":[{divide:[...ee(),"hidden","none"]}],"border-color":[{border:V()}],"border-color-x":[{"border-x":V()}],"border-color-y":[{"border-y":V()}],"border-color-s":[{"border-s":V()}],"border-color-e":[{"border-e":V()}],"border-color-t":[{"border-t":V()}],"border-color-r":[{"border-r":V()}],"border-color-b":[{"border-b":V()}],"border-color-l":[{"border-l":V()}],"divide-color":[{divide:V()}],"outline-style":[{outline:[...ee(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Qe,je,_e]}],"outline-w":[{outline:["",Qe,dc,ts]}],"outline-color":[{outline:V()}],shadow:[{shadow:["","none",g,Dd,Od]}],"shadow-color":[{shadow:V()}],"inset-shadow":[{"inset-shadow":["none",p,Dd,Od]}],"inset-shadow-color":[{"inset-shadow":V()}],"ring-w":[{ring:Q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:V()}],"ring-offset-w":[{"ring-offset":[Qe,ts]}],"ring-offset-color":[{"ring-offset":V()}],"inset-ring-w":[{"inset-ring":Q()}],"inset-ring-color":[{"inset-ring":V()}],"text-shadow":[{"text-shadow":["none",x,Dd,Od]}],"text-shadow-color":[{"text-shadow":V()}],opacity:[{opacity:[Qe,je,_e]}],"mix-blend":[{"mix-blend":[...W(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":W()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Qe]}],"mask-image-linear-from-pos":[{"mask-linear-from":K()}],"mask-image-linear-to-pos":[{"mask-linear-to":K()}],"mask-image-linear-from-color":[{"mask-linear-from":V()}],"mask-image-linear-to-color":[{"mask-linear-to":V()}],"mask-image-t-from-pos":[{"mask-t-from":K()}],"mask-image-t-to-pos":[{"mask-t-to":K()}],"mask-image-t-from-color":[{"mask-t-from":V()}],"mask-image-t-to-color":[{"mask-t-to":V()}],"mask-image-r-from-pos":[{"mask-r-from":K()}],"mask-image-r-to-pos":[{"mask-r-to":K()}],"mask-image-r-from-color":[{"mask-r-from":V()}],"mask-image-r-to-color":[{"mask-r-to":V()}],"mask-image-b-from-pos":[{"mask-b-from":K()}],"mask-image-b-to-pos":[{"mask-b-to":K()}],"mask-image-b-from-color":[{"mask-b-from":V()}],"mask-image-b-to-color":[{"mask-b-to":V()}],"mask-image-l-from-pos":[{"mask-l-from":K()}],"mask-image-l-to-pos":[{"mask-l-to":K()}],"mask-image-l-from-color":[{"mask-l-from":V()}],"mask-image-l-to-color":[{"mask-l-to":V()}],"mask-image-x-from-pos":[{"mask-x-from":K()}],"mask-image-x-to-pos":[{"mask-x-to":K()}],"mask-image-x-from-color":[{"mask-x-from":V()}],"mask-image-x-to-color":[{"mask-x-to":V()}],"mask-image-y-from-pos":[{"mask-y-from":K()}],"mask-image-y-to-pos":[{"mask-y-to":K()}],"mask-image-y-from-color":[{"mask-y-from":V()}],"mask-image-y-to-color":[{"mask-y-to":V()}],"mask-image-radial":[{"mask-radial":[je,_e]}],"mask-image-radial-from-pos":[{"mask-radial-from":K()}],"mask-image-radial-to-pos":[{"mask-radial-to":K()}],"mask-image-radial-from-color":[{"mask-radial-from":V()}],"mask-image-radial-to-color":[{"mask-radial-to":V()}],"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":A()}],"mask-image-conic-pos":[{"mask-conic":[Qe]}],"mask-image-conic-from-pos":[{"mask-conic-from":K()}],"mask-image-conic-to-pos":[{"mask-conic-to":K()}],"mask-image-conic-from-color":[{"mask-conic-from":V()}],"mask-image-conic-to-color":[{"mask-conic-to":V()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Z()}],"mask-repeat":[{mask:k()}],"mask-size":[{mask:G()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",je,_e]}],filter:[{filter:["","none",je,_e]}],blur:[{blur:oe()}],brightness:[{brightness:[Qe,je,_e]}],contrast:[{contrast:[Qe,je,_e]}],"drop-shadow":[{"drop-shadow":["","none",v,Dd,Od]}],"drop-shadow-color":[{"drop-shadow":V()}],grayscale:[{grayscale:["",Qe,je,_e]}],"hue-rotate":[{"hue-rotate":[Qe,je,_e]}],invert:[{invert:["",Qe,je,_e]}],saturate:[{saturate:[Qe,je,_e]}],sepia:[{sepia:["",Qe,je,_e]}],"backdrop-filter":[{"backdrop-filter":["","none",je,_e]}],"backdrop-blur":[{"backdrop-blur":oe()}],"backdrop-brightness":[{"backdrop-brightness":[Qe,je,_e]}],"backdrop-contrast":[{"backdrop-contrast":[Qe,je,_e]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Qe,je,_e]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Qe,je,_e]}],"backdrop-invert":[{"backdrop-invert":["",Qe,je,_e]}],"backdrop-opacity":[{"backdrop-opacity":[Qe,je,_e]}],"backdrop-saturate":[{"backdrop-saturate":[Qe,je,_e]}],"backdrop-sepia":[{"backdrop-sepia":["",Qe,je,_e]}],"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",je,_e]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Qe,"initial",je,_e]}],ease:[{ease:["linear","initial",T,je,_e]}],delay:[{delay:[Qe,je,_e]}],animate:[{animate:["none",R,je,_e]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[C,je,_e]}],"perspective-origin":[{"perspective-origin":M()}],rotate:[{rotate:ce()}],"rotate-x":[{"rotate-x":ce()}],"rotate-y":[{"rotate-y":ce()}],"rotate-z":[{"rotate-z":ce()}],scale:[{scale:me()}],"scale-x":[{"scale-x":me()}],"scale-y":[{"scale-y":me()}],"scale-z":[{"scale-z":me()}],"scale-3d":["scale-3d"],skew:[{skew:be()}],"skew-x":[{"skew-x":be()}],"skew-y":[{"skew-y":be()}],transform:[{transform:[je,_e,"","none","gpu","cpu"]}],"transform-origin":[{origin:M()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Te()}],"translate-x":[{"translate-x":Te()}],"translate-y":[{"translate-y":Te()}],"translate-z":[{"translate-z":Te()}],"translate-none":["translate-none"],accent:[{accent:V()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:V()}],"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",je,_e]}],"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-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-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",je,_e]}],fill:[{fill:["none",...V()]}],"stroke-w":[{stroke:[Qe,dc,ts,ng]}],stroke:[{stroke:["none",...V()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","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-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-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-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-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"]}},qE=d4(A4);function Me(...e){return qE(Ux(e))}function R4(e){if(e<=0)return"Expired";const t=Math.floor(e/(1e3*60*60*24)),n=Math.floor(e%(1e3*60*60*24)/(1e3*60*60)),r=Math.floor(e%(1e3*60*60)/(1e3*60)),s=Math.floor(e%(1e3*60)/1e3),o=[];return t>0&&o.push(`${t}d`),n>0&&o.push(`${n}h`),r>0&&o.push(`${r}m`),(s>0||o.length===0)&&o.push(`${s}s`),o.join(" ")+" remaining"}function wa({className:e,...t}){return m.jsx("div",{"data-slot":"card",className:Me("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...t})}function qS({className:e,...t}){return m.jsx("div",{"data-slot":"card-header",className:Me("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function GS({className:e,...t}){return m.jsx("div",{"data-slot":"card-title",className:Me("leading-none font-semibold",e),...t})}function Pc({className:e,...t}){return m.jsx("div",{"data-slot":"card-content",className:Me("px-6",e),...t})}var tu=OE();const GE=Xf(tu);function YS(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Kf(...e){return t=>{let n=!1;const r=e.map(s=>{const o=YS(s,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let s=0;s<r.length;s++){const o=r[s];typeof o=="function"?o():YS(e[s],null)}}}}function ot(...e){return w.useCallback(Kf(...e),e)}function ps(e){const t=M4(e),n=w.forwardRef((r,s)=>{const{children:o,...l}=r,u=w.Children.toArray(o),d=u.find(D4);if(d){const h=d.props.children,g=u.map(p=>p===d?w.Children.count(h)>1?w.Children.only(null):w.isValidElement(h)?h.props.children:null:p);return m.jsx(t,{...l,ref:s,children:w.isValidElement(h)?w.cloneElement(h,void 0,g):null})}return m.jsx(t,{...l,ref:s,children:o})});return n.displayName=`${e}.Slot`,n}var Fx=ps("Slot");function M4(e){const t=w.forwardRef((n,r)=>{const{children:s,...o}=n;if(w.isValidElement(s)){const l=z4(s),u=P4(o,s.props);return s.type!==w.Fragment&&(u.ref=r?Kf(r,l):l),w.cloneElement(s,u)}return w.Children.count(s)>1?w.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var YE=Symbol("radix.slottable");function O4(e){const t=({children:n})=>m.jsx(m.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=YE,t}function D4(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===YE}function P4(e,t){const n={...t};for(const r in t){const s=e[r],o=t[r];/^on[A-Z]/.test(r)?s&&o?n[r]=(...u)=>{const d=o(...u);return s(...u),d}:s&&(n[r]=s):r==="style"?n[r]={...s,...o}:r==="className"&&(n[r]=[s,o].filter(Boolean).join(" "))}return{...e,...n}}function z4(e){var r,s;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=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var L4=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],qe=L4.reduce((e,t)=>{const n=ps(`Primitive.${t}`),r=w.forwardRef((s,o)=>{const{asChild:l,...u}=s,d=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(d,{...u,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function ZE(e,t){e&&tu.flushSync(()=>e.dispatchEvent(t))}var XE=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"}),I4="VisuallyHidden",KE=w.forwardRef((e,t)=>m.jsx(qe.span,{...e,ref:t,style:{...XE,...e.style}}));KE.displayName=I4;var B4=KE;function V4(e,t){const n=w.createContext(t),r=o=>{const{children:l,...u}=o,d=w.useMemo(()=>u,Object.values(u));return m.jsx(n.Provider,{value:d,children:l})};r.displayName=e+"Provider";function s(o){const l=w.useContext(n);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,s]}function Bi(e,t=[]){let n=[];function r(o,l){const u=w.createContext(l),d=n.length;n=[...n,l];const h=p=>{var T;const{scope:x,children:v,...S}=p,C=((T=x==null?void 0:x[e])==null?void 0:T[d])||u,E=w.useMemo(()=>S,Object.values(S));return m.jsx(C.Provider,{value:E,children:v})};h.displayName=o+"Provider";function g(p,x){var C;const v=((C=x==null?void 0:x[e])==null?void 0:C[d])||u,S=w.useContext(v);if(S)return S;if(l!==void 0)return l;throw new Error(`\`${p}\` must be used within \`${o}\``)}return[h,g]}const s=()=>{const o=n.map(l=>w.createContext(l));return function(u){const d=(u==null?void 0:u[e])||o;return w.useMemo(()=>({[`__scope${e}`]:{...u,[e]:d}}),[u,d])}};return s.scopeName=e,[r,U4(s,...t)]}function U4(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(o){const l=r.reduce((u,{useScope:d,scopeName:h})=>{const p=d(o)[`__scope${h}`];return{...u,...p}},{});return w.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}function $x(e){const t=e+"CollectionProvider",[n,r]=Bi(t),[s,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=C=>{const{scope:E,children:T}=C,R=ye.useRef(null),O=ye.useRef(new Map).current;return m.jsx(s,{scope:E,itemMap:O,collectionRef:R,children:T})};l.displayName=t;const u=e+"CollectionSlot",d=ps(u),h=ye.forwardRef((C,E)=>{const{scope:T,children:R}=C,O=o(u,T),A=ot(E,O.collectionRef);return m.jsx(d,{ref:A,children:R})});h.displayName=u;const g=e+"CollectionItemSlot",p="data-radix-collection-item",x=ps(g),v=ye.forwardRef((C,E)=>{const{scope:T,children:R,...O}=C,A=ye.useRef(null),M=ot(E,A),N=o(g,T);return ye.useEffect(()=>(N.itemMap.set(A,{ref:A,...O}),()=>void N.itemMap.delete(A))),m.jsx(x,{[p]:"",ref:M,children:R})});v.displayName=g;function S(C){const E=o(e+"CollectionConsumer",C);return ye.useCallback(()=>{const R=E.collectionRef.current;if(!R)return[];const O=Array.from(R.querySelectorAll(`[${p}]`));return Array.from(E.itemMap.values()).sort((N,z)=>O.indexOf(N.ref.current)-O.indexOf(z.ref.current))},[E.collectionRef,E.itemMap])}return[{Provider:l,Slot:h,ItemSlot:v},S,r]}function Ce(e,t,{checkForDefaultPrevented:n=!0}={}){return function(s){if(e==null||e(s),n===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}var xn=globalThis!=null&&globalThis.document?w.useLayoutEffect:()=>{},H4=Vx[" useInsertionEffect ".trim().toString()]||xn;function Bo({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[s,o,l]=F4({defaultProp:t,onChange:n}),u=e!==void 0,d=u?e:s;{const g=w.useRef(e!==void 0);w.useEffect(()=>{const p=g.current;p!==u&&console.warn(`${r} is changing from ${p?"controlled":"uncontrolled"} to ${u?"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.`),g.current=u},[u,r])}const h=w.useCallback(g=>{var p;if(u){const x=$4(g)?g(e):g;x!==e&&((p=l.current)==null||p.call(l,x))}else o(g)},[u,e,o,l]);return[d,h]}function F4({defaultProp:e,onChange:t}){const[n,r]=w.useState(e),s=w.useRef(n),o=w.useRef(t);return H4(()=>{o.current=t},[t]),w.useEffect(()=>{var l;s.current!==n&&((l=o.current)==null||l.call(o,n),s.current=n)},[n,s]),[n,r,o]}function $4(e){return typeof e=="function"}function q4(e,t){return w.useReducer((n,r)=>t[n][r]??n,e)}var $n=e=>{const{present:t,children:n}=e,r=G4(t),s=typeof n=="function"?n({present:r.isPresent}):w.Children.only(n),o=ot(r.ref,Y4(s));return typeof n=="function"||r.isPresent?w.cloneElement(s,{ref:o}):null};$n.displayName="Presence";function G4(e){const[t,n]=w.useState(),r=w.useRef(null),s=w.useRef(e),o=w.useRef("none"),l=e?"mounted":"unmounted",[u,d]=q4(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const h=Pd(r.current);o.current=u==="mounted"?h:"none"},[u]),xn(()=>{const h=r.current,g=s.current;if(g!==e){const x=o.current,v=Pd(h);e?d("MOUNT"):v==="none"||(h==null?void 0:h.display)==="none"?d("UNMOUNT"):d(g&&x!==v?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,d]),xn(()=>{if(t){let h;const g=t.ownerDocument.defaultView??window,p=v=>{const C=Pd(r.current).includes(v.animationName);if(v.target===t&&C&&(d("ANIMATION_END"),!s.current)){const E=t.style.animationFillMode;t.style.animationFillMode="forwards",h=g.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=E)})}},x=v=>{v.target===t&&(o.current=Pd(r.current))};return t.addEventListener("animationstart",x),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{g.clearTimeout(h),t.removeEventListener("animationstart",x),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:w.useCallback(h=>{r.current=h?getComputedStyle(h):null,n(h)},[])}}function Pd(e){return(e==null?void 0:e.animationName)||"none"}function Y4(e){var r,s;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=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Z4=Vx[" useId ".trim().toString()]||(()=>{}),X4=0;function Jr(e){const[t,n]=w.useState(Z4());return xn(()=>{n(r=>r??String(X4++))},[e]),t?`radix-${t}`:""}var K4=w.createContext(void 0);function Wf(e){const t=w.useContext(K4);return e||t||"ltr"}function yn(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),w.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function W4(e,t=globalThis==null?void 0:globalThis.document){const n=yn(e);w.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Q4="DismissableLayer",cy="dismissableLayer.update",J4="dismissableLayer.pointerDownOutside",e3="dismissableLayer.focusOutside",ZS,WE=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),nu=w.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:l,onDismiss:u,...d}=e,h=w.useContext(WE),[g,p]=w.useState(null),x=(g==null?void 0:g.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=w.useState({}),S=ot(t,z=>p(z)),C=Array.from(h.layers),[E]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),T=C.indexOf(E),R=g?C.indexOf(g):-1,O=h.layersWithOutsidePointerEventsDisabled.size>0,A=R>=T,M=r3(z=>{const P=z.target,B=[...h.branches].some(D=>D.contains(P));!A||B||(s==null||s(z),l==null||l(z),z.defaultPrevented||u==null||u())},x),N=i3(z=>{const P=z.target;[...h.branches].some(D=>D.contains(P))||(o==null||o(z),l==null||l(z),z.defaultPrevented||u==null||u())},x);return W4(z=>{R===h.layers.size-1&&(r==null||r(z),!z.defaultPrevented&&u&&(z.preventDefault(),u()))},x),w.useEffect(()=>{if(g)return n&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(ZS=x.body.style.pointerEvents,x.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(g)),h.layers.add(g),XS(),()=>{n&&h.layersWithOutsidePointerEventsDisabled.size===1&&(x.body.style.pointerEvents=ZS)}},[g,x,n,h]),w.useEffect(()=>()=>{g&&(h.layers.delete(g),h.layersWithOutsidePointerEventsDisabled.delete(g),XS())},[g,h]),w.useEffect(()=>{const z=()=>v({});return document.addEventListener(cy,z),()=>document.removeEventListener(cy,z)},[]),m.jsx(qe.div,{...d,ref:S,style:{pointerEvents:O?A?"auto":"none":void 0,...e.style},onFocusCapture:Ce(e.onFocusCapture,N.onFocusCapture),onBlurCapture:Ce(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:Ce(e.onPointerDownCapture,M.onPointerDownCapture)})});nu.displayName=Q4;var t3="DismissableLayerBranch",n3=w.forwardRef((e,t)=>{const n=w.useContext(WE),r=w.useRef(null),s=ot(t,r);return w.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),m.jsx(qe.div,{...e,ref:s})});n3.displayName=t3;function r3(e,t=globalThis==null?void 0:globalThis.document){const n=yn(e),r=w.useRef(!1),s=w.useRef(()=>{});return w.useEffect(()=>{const o=u=>{if(u.target&&!r.current){let d=function(){QE(J4,n,h,{discrete:!0})};const h={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=d,t.addEventListener("click",s.current,{once:!0})):d()}else t.removeEventListener("click",s.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",o),t.removeEventListener("click",s.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function i3(e,t=globalThis==null?void 0:globalThis.document){const n=yn(e),r=w.useRef(!1);return w.useEffect(()=>{const s=o=>{o.target&&!r.current&&QE(e3,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function XS(){const e=new CustomEvent(cy);document.dispatchEvent(e)}function QE(e,t,n,{discrete:r}){const s=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?ZE(s,o):s.dispatchEvent(o)}var rg="focusScope.autoFocusOnMount",ig="focusScope.autoFocusOnUnmount",KS={bubbles:!1,cancelable:!0},a3="FocusScope",Qf=w.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:o,...l}=e,[u,d]=w.useState(null),h=yn(s),g=yn(o),p=w.useRef(null),x=ot(t,C=>d(C)),v=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(r){let C=function(O){if(v.paused||!u)return;const A=O.target;u.contains(A)?p.current=A:ma(p.current,{select:!0})},E=function(O){if(v.paused||!u)return;const A=O.relatedTarget;A!==null&&(u.contains(A)||ma(p.current,{select:!0}))},T=function(O){if(document.activeElement===document.body)for(const M of O)M.removedNodes.length>0&&ma(u)};document.addEventListener("focusin",C),document.addEventListener("focusout",E);const R=new MutationObserver(T);return u&&R.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",C),document.removeEventListener("focusout",E),R.disconnect()}}},[r,u,v.paused]),w.useEffect(()=>{if(u){QS.add(v);const C=document.activeElement;if(!u.contains(C)){const T=new CustomEvent(rg,KS);u.addEventListener(rg,h),u.dispatchEvent(T),T.defaultPrevented||(s3(d3(JE(u)),{select:!0}),document.activeElement===C&&ma(u))}return()=>{u.removeEventListener(rg,h),setTimeout(()=>{const T=new CustomEvent(ig,KS);u.addEventListener(ig,g),u.dispatchEvent(T),T.defaultPrevented||ma(C??document.body,{select:!0}),u.removeEventListener(ig,g),QS.remove(v)},0)}}},[u,h,g,v]);const S=w.useCallback(C=>{if(!n&&!r||v.paused)return;const E=C.key==="Tab"&&!C.altKey&&!C.ctrlKey&&!C.metaKey,T=document.activeElement;if(E&&T){const R=C.currentTarget,[O,A]=o3(R);O&&A?!C.shiftKey&&T===A?(C.preventDefault(),n&&ma(O,{select:!0})):C.shiftKey&&T===O&&(C.preventDefault(),n&&ma(A,{select:!0})):T===R&&C.preventDefault()}},[n,r,v.paused]);return m.jsx(qe.div,{tabIndex:-1,...l,ref:x,onKeyDown:S})});Qf.displayName=a3;function s3(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ma(r,{select:t}),document.activeElement!==n)return}function o3(e){const t=JE(e),n=WS(t,e),r=WS(t.reverse(),e);return[n,r]}function JE(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function WS(e,t){for(const n of e)if(!l3(n,{upTo:t}))return n}function l3(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 c3(e){return e instanceof HTMLInputElement&&"select"in e}function ma(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&c3(e)&&t&&e.select()}}var QS=u3();function u3(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=JS(e,t),e.unshift(t)},remove(t){var n;e=JS(e,t),(n=e[0])==null||n.resume()}}}function JS(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function d3(e){return e.filter(t=>t.tagName!=="A")}var f3="Portal",ru=w.forwardRef((e,t)=>{var u;const{container:n,...r}=e,[s,o]=w.useState(!1);xn(()=>o(!0),[]);const l=n||s&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return l?GE.createPortal(m.jsx(qe.div,{...r,ref:t}),l):null});ru.displayName=f3;var ag=0;function qx(){w.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??eC()),document.body.insertAdjacentElement("beforeend",e[1]??eC()),ag++,()=>{ag===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ag--}},[])}function eC(){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 Wr=function(){return Wr=Object.assign||function(t){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Wr.apply(this,arguments)};function e_(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 s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n}function h3(e,t,n){if(n||arguments.length===2)for(var r=0,s=t.length,o;r<s;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var Jd="right-scroll-bar-position",ef="width-before-scroll-bar",m3="with-scroll-bars-hidden",p3="--removed-body-scroll-bar-size";function sg(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function g3(e,t){var n=w.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var s=n.value;s!==r&&(n.value=r,n.callback(r,s))}}}})[0];return n.callback=t,n.facade}var y3=typeof window<"u"?w.useLayoutEffect:w.useEffect,tC=new WeakMap;function x3(e,t){var n=g3(null,function(r){return e.forEach(function(s){return sg(s,r)})});return y3(function(){var r=tC.get(n);if(r){var s=new Set(r),o=new Set(e),l=n.current;s.forEach(function(u){o.has(u)||sg(u,null)}),o.forEach(function(u){s.has(u)||sg(u,l)})}tC.set(n,e)},[e]),n}function v3(e){return e}function b3(e,t){t===void 0&&(t=v3);var n=[],r=!1,s={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(o){var l=t(o,r);return n.push(l),function(){n=n.filter(function(u){return u!==l})}},assignSyncMedium:function(o){for(r=!0;n.length;){var l=n;n=[],l.forEach(o)}n={push:function(u){return o(u)},filter:function(){return n}}},assignMedium:function(o){r=!0;var l=[];if(n.length){var u=n;n=[],u.forEach(o),l=n}var d=function(){var g=l;l=[],g.forEach(o)},h=function(){return Promise.resolve().then(d)};h(),n={push:function(g){l.push(g),h()},filter:function(g){return l=l.filter(g),n}}}};return s}function w3(e){e===void 0&&(e={});var t=b3(null);return t.options=Wr({async:!0,ssr:!1},e),t}var t_=function(e){var t=e.sideCar,n=e_(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 w.createElement(r,Wr({},n))};t_.isSideCarExport=!0;function S3(e,t){return e.useMedium(t),t_}var n_=w3(),og=function(){},Jf=w.forwardRef(function(e,t){var n=w.useRef(null),r=w.useState({onScrollCapture:og,onWheelCapture:og,onTouchMoveCapture:og}),s=r[0],o=r[1],l=e.forwardProps,u=e.children,d=e.className,h=e.removeScrollBar,g=e.enabled,p=e.shards,x=e.sideCar,v=e.noRelative,S=e.noIsolation,C=e.inert,E=e.allowPinchZoom,T=e.as,R=T===void 0?"div":T,O=e.gapMode,A=e_(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),M=x,N=x3([n,t]),z=Wr(Wr({},A),s);return w.createElement(w.Fragment,null,g&&w.createElement(M,{sideCar:n_,removeScrollBar:h,shards:p,noRelative:v,noIsolation:S,inert:C,setCallbacks:o,allowPinchZoom:!!E,lockRef:n,gapMode:O}),l?w.cloneElement(w.Children.only(u),Wr(Wr({},z),{ref:N})):w.createElement(R,Wr({},z,{className:d,ref:N}),u))});Jf.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Jf.classNames={fullWidth:ef,zeroRight:Jd};var C3=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function k3(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=C3();return t&&e.setAttribute("nonce",t),e}function T3(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function E3(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var _3=function(){var e=0,t=null;return{add:function(n){e==0&&(t=k3())&&(T3(t,n),E3(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},j3=function(){var e=_3();return function(t,n){w.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},r_=function(){var e=j3(),t=function(n){var r=n.styles,s=n.dynamic;return e(r,s),null};return t},N3={left:0,top:0,right:0,gap:0},lg=function(e){return parseInt(e||"",10)||0},A3=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[lg(n),lg(r),lg(s)]},R3=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return N3;var t=A3(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])}},M3=r_(),Oo="data-scroll-locked",O3=function(e,t,n,r){var s=e.left,o=e.top,l=e.right,u=e.gap;return n===void 0&&(n="margin"),`
50
+ .`.concat(m3,` {
51
+ overflow: hidden `).concat(r,`;
52
+ padding-right: `).concat(u,"px ").concat(r,`;
53
+ }
54
+ body[`).concat(Oo,`] {
55
+ overflow: hidden `).concat(r,`;
56
+ overscroll-behavior: contain;
57
+ `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
58
+ padding-left: `.concat(s,`px;
59
+ padding-top: `).concat(o,`px;
60
+ padding-right: `).concat(l,`px;
61
+ margin-left:0;
62
+ margin-top:0;
63
+ margin-right: `).concat(u,"px ").concat(r,`;
64
+ `),n==="padding"&&"padding-right: ".concat(u,"px ").concat(r,";")].filter(Boolean).join(""),`
65
+ }
66
+
67
+ .`).concat(Jd,` {
68
+ right: `).concat(u,"px ").concat(r,`;
69
+ }
70
+
71
+ .`).concat(ef,` {
72
+ margin-right: `).concat(u,"px ").concat(r,`;
73
+ }
74
+
75
+ .`).concat(Jd," .").concat(Jd,` {
76
+ right: 0 `).concat(r,`;
77
+ }
78
+
79
+ .`).concat(ef," .").concat(ef,` {
80
+ margin-right: 0 `).concat(r,`;
81
+ }
82
+
83
+ body[`).concat(Oo,`] {
84
+ `).concat(p3,": ").concat(u,`px;
85
+ }
86
+ `)},nC=function(){var e=parseInt(document.body.getAttribute(Oo)||"0",10);return isFinite(e)?e:0},D3=function(){w.useEffect(function(){return document.body.setAttribute(Oo,(nC()+1).toString()),function(){var e=nC()-1;e<=0?document.body.removeAttribute(Oo):document.body.setAttribute(Oo,e.toString())}},[])},P3=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,s=r===void 0?"margin":r;D3();var o=w.useMemo(function(){return R3(s)},[s]);return w.createElement(M3,{styles:O3(o,!t,s,n?"":"!important")})},uy=!1;if(typeof window<"u")try{var zd=Object.defineProperty({},"passive",{get:function(){return uy=!0,!0}});window.addEventListener("test",zd,zd),window.removeEventListener("test",zd,zd)}catch{uy=!1}var yo=uy?{passive:!1}:!1,z3=function(e){return e.tagName==="TEXTAREA"},i_=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!z3(e)&&n[t]==="visible")},L3=function(e){return i_(e,"overflowY")},I3=function(e){return i_(e,"overflowX")},rC=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=a_(e,r);if(s){var o=s_(e,r),l=o[1],u=o[2];if(l>u)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},B3=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},V3=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},a_=function(e,t){return e==="v"?L3(t):I3(t)},s_=function(e,t){return e==="v"?B3(t):V3(t)},U3=function(e,t){return e==="h"&&t==="rtl"?-1:1},H3=function(e,t,n,r,s){var o=U3(e,window.getComputedStyle(t).direction),l=o*r,u=n.target,d=t.contains(u),h=!1,g=l>0,p=0,x=0;do{if(!u)break;var v=s_(e,u),S=v[0],C=v[1],E=v[2],T=C-E-o*S;(S||T)&&a_(e,u)&&(p+=T,x+=S);var R=u.parentNode;u=R&&R.nodeType===Node.DOCUMENT_FRAGMENT_NODE?R.host:R}while(!d&&u!==document.body||d&&(t.contains(u)||t===u));return(g&&Math.abs(p)<1||!g&&Math.abs(x)<1)&&(h=!0),h},Ld=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},iC=function(e){return[e.deltaX,e.deltaY]},aC=function(e){return e&&"current"in e?e.current:e},F3=function(e,t){return e[0]===t[0]&&e[1]===t[1]},$3=function(e){return`
87
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
88
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
89
+ `)},q3=0,xo=[];function G3(e){var t=w.useRef([]),n=w.useRef([0,0]),r=w.useRef(),s=w.useState(q3++)[0],o=w.useState(r_)[0],l=w.useRef(e);w.useEffect(function(){l.current=e},[e]),w.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var C=h3([e.lockRef.current],(e.shards||[]).map(aC),!0).filter(Boolean);return C.forEach(function(E){return E.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),C.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var u=w.useCallback(function(C,E){if("touches"in C&&C.touches.length===2||C.type==="wheel"&&C.ctrlKey)return!l.current.allowPinchZoom;var T=Ld(C),R=n.current,O="deltaX"in C?C.deltaX:R[0]-T[0],A="deltaY"in C?C.deltaY:R[1]-T[1],M,N=C.target,z=Math.abs(O)>Math.abs(A)?"h":"v";if("touches"in C&&z==="h"&&N.type==="range")return!1;var P=rC(z,N);if(!P)return!0;if(P?M=z:(M=z==="v"?"h":"v",P=rC(z,N)),!P)return!1;if(!r.current&&"changedTouches"in C&&(O||A)&&(r.current=M),!M)return!0;var B=r.current||M;return H3(B,E,C,B==="h"?O:A)},[]),d=w.useCallback(function(C){var E=C;if(!(!xo.length||xo[xo.length-1]!==o)){var T="deltaY"in E?iC(E):Ld(E),R=t.current.filter(function(M){return M.name===E.type&&(M.target===E.target||E.target===M.shadowParent)&&F3(M.delta,T)})[0];if(R&&R.should){E.cancelable&&E.preventDefault();return}if(!R){var O=(l.current.shards||[]).map(aC).filter(Boolean).filter(function(M){return M.contains(E.target)}),A=O.length>0?u(E,O[0]):!l.current.noIsolation;A&&E.cancelable&&E.preventDefault()}}},[]),h=w.useCallback(function(C,E,T,R){var O={name:C,delta:E,target:T,should:R,shadowParent:Y3(T)};t.current.push(O),setTimeout(function(){t.current=t.current.filter(function(A){return A!==O})},1)},[]),g=w.useCallback(function(C){n.current=Ld(C),r.current=void 0},[]),p=w.useCallback(function(C){h(C.type,iC(C),C.target,u(C,e.lockRef.current))},[]),x=w.useCallback(function(C){h(C.type,Ld(C),C.target,u(C,e.lockRef.current))},[]);w.useEffect(function(){return xo.push(o),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:x}),document.addEventListener("wheel",d,yo),document.addEventListener("touchmove",d,yo),document.addEventListener("touchstart",g,yo),function(){xo=xo.filter(function(C){return C!==o}),document.removeEventListener("wheel",d,yo),document.removeEventListener("touchmove",d,yo),document.removeEventListener("touchstart",g,yo)}},[]);var v=e.removeScrollBar,S=e.inert;return w.createElement(w.Fragment,null,S?w.createElement(o,{styles:$3(s)}):null,v?w.createElement(P3,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Y3(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Z3=S3(n_,G3);var eh=w.forwardRef(function(e,t){return w.createElement(Jf,Wr({},e,{ref:t,sideCar:Z3}))});eh.classNames=Jf.classNames;var X3=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},vo=new WeakMap,Id=new WeakMap,Bd={},cg=0,o_=function(e){return e&&(e.host||o_(e.parentNode))},K3=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=o_(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})},W3=function(e,t,n,r){var s=K3(t,Array.isArray(e)?e:[e]);Bd[n]||(Bd[n]=new WeakMap);var o=Bd[n],l=[],u=new Set,d=new Set(s),h=function(p){!p||u.has(p)||(u.add(p),h(p.parentNode))};s.forEach(h);var g=function(p){!p||d.has(p)||Array.prototype.forEach.call(p.children,function(x){if(u.has(x))g(x);else try{var v=x.getAttribute(r),S=v!==null&&v!=="false",C=(vo.get(x)||0)+1,E=(o.get(x)||0)+1;vo.set(x,C),o.set(x,E),l.push(x),C===1&&S&&Id.set(x,!0),E===1&&x.setAttribute(n,"true"),S||x.setAttribute(r,"true")}catch(T){console.error("aria-hidden: cannot operate on ",x,T)}})};return g(t),u.clear(),cg++,function(){l.forEach(function(p){var x=vo.get(p)-1,v=o.get(p)-1;vo.set(p,x),o.set(p,v),x||(Id.has(p)||p.removeAttribute(r),Id.delete(p)),v||p.removeAttribute(n)}),cg--,cg||(vo=new WeakMap,vo=new WeakMap,Id=new WeakMap,Bd={})}},Gx=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),s=X3(e);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live], script"))),W3(r,s,n,"aria-hidden")):function(){return null}},th="Dialog",[l_,EJ]=Bi(th),[Q3,Hr]=l_(th),c_=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:s,onOpenChange:o,modal:l=!0}=e,u=w.useRef(null),d=w.useRef(null),[h,g]=Bo({prop:r,defaultProp:s??!1,onChange:o,caller:th});return m.jsx(Q3,{scope:t,triggerRef:u,contentRef:d,contentId:Jr(),titleId:Jr(),descriptionId:Jr(),open:h,onOpenChange:g,onOpenToggle:w.useCallback(()=>g(p=>!p),[g]),modal:l,children:n})};c_.displayName=th;var u_="DialogTrigger",d_=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Hr(u_,n),o=ot(t,s.triggerRef);return m.jsx(qe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":Xx(s.open),...r,ref:o,onClick:Ce(e.onClick,s.onOpenToggle)})});d_.displayName=u_;var Yx="DialogPortal",[J3,f_]=l_(Yx,{forceMount:void 0}),h_=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:s}=e,o=Hr(Yx,t);return m.jsx(J3,{scope:t,forceMount:n,children:w.Children.map(r,l=>m.jsx($n,{present:n||o.open,children:m.jsx(ru,{asChild:!0,container:s,children:l})}))})};h_.displayName=Yx;var df="DialogOverlay",m_=w.forwardRef((e,t)=>{const n=f_(df,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,o=Hr(df,e.__scopeDialog);return o.modal?m.jsx($n,{present:r||o.open,children:m.jsx(t5,{...s,ref:t})}):null});m_.displayName=df;var e5=ps("DialogOverlay.RemoveScroll"),t5=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Hr(df,n);return m.jsx(eh,{as:e5,allowPinchZoom:!0,shards:[s.contentRef],children:m.jsx(qe.div,{"data-state":Xx(s.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),gs="DialogContent",p_=w.forwardRef((e,t)=>{const n=f_(gs,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,o=Hr(gs,e.__scopeDialog);return m.jsx($n,{present:r||o.open,children:o.modal?m.jsx(n5,{...s,ref:t}):m.jsx(r5,{...s,ref:t})})});p_.displayName=gs;var n5=w.forwardRef((e,t)=>{const n=Hr(gs,e.__scopeDialog),r=w.useRef(null),s=ot(t,n.contentRef,r);return w.useEffect(()=>{const o=r.current;if(o)return Gx(o)},[]),m.jsx(g_,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ce(e.onCloseAutoFocus,o=>{var l;o.preventDefault(),(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:Ce(e.onPointerDownOutside,o=>{const l=o.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0;(l.button===2||u)&&o.preventDefault()}),onFocusOutside:Ce(e.onFocusOutside,o=>o.preventDefault())})}),r5=w.forwardRef((e,t)=>{const n=Hr(gs,e.__scopeDialog),r=w.useRef(!1),s=w.useRef(!1);return m.jsx(g_,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var l,u;(l=e.onCloseAutoFocus)==null||l.call(e,o),o.defaultPrevented||(r.current||(u=n.triggerRef.current)==null||u.focus(),o.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:o=>{var d,h;(d=e.onInteractOutside)==null||d.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const l=o.target;((h=n.triggerRef.current)==null?void 0:h.contains(l))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&s.current&&o.preventDefault()}})}),g_=w.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:o,...l}=e,u=Hr(gs,n),d=w.useRef(null),h=ot(t,d);return qx(),m.jsxs(m.Fragment,{children:[m.jsx(Qf,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:o,children:m.jsx(nu,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":Xx(u.open),...l,ref:h,onDismiss:()=>u.onOpenChange(!1)})}),m.jsxs(m.Fragment,{children:[m.jsx(i5,{titleId:u.titleId}),m.jsx(s5,{contentRef:d,descriptionId:u.descriptionId})]})]})}),Zx="DialogTitle",y_=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Hr(Zx,n);return m.jsx(qe.h2,{id:s.titleId,...r,ref:t})});y_.displayName=Zx;var x_="DialogDescription",v_=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Hr(x_,n);return m.jsx(qe.p,{id:s.descriptionId,...r,ref:t})});v_.displayName=x_;var b_="DialogClose",w_=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Hr(b_,n);return m.jsx(qe.button,{type:"button",...r,ref:t,onClick:Ce(e.onClick,()=>s.onOpenChange(!1))})});w_.displayName=b_;function Xx(e){return e?"open":"closed"}var S_="DialogTitleWarning",[_J,C_]=V4(S_,{contentName:gs,titleName:Zx,docsSlug:"dialog"}),i5=({titleId:e})=>{const t=C_(S_),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
90
+
91
+ If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
92
+
93
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return w.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},a5="DialogDescriptionWarning",s5=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${C_(a5).contentName}}.`;return w.useEffect(()=>{var o;const s=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},k_=c_,o5=d_,T_=h_,E_=m_,__=p_,j_=y_,N_=v_,A_=w_;function l5(e){const t=w.useRef({value:e,previous:e});return w.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function c5(e){const[t,n]=w.useState(void 0);return xn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const o=s[0];let l,u;if("borderBoxSize"in o){const d=o.borderBoxSize,h=Array.isArray(d)?d[0]:d;l=h.inlineSize,u=h.blockSize}else l=e.offsetWidth,u=e.offsetHeight;n({width:l,height:u})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const u5=["top","right","bottom","left"],Sa=Math.min,ir=Math.max,ff=Math.round,Vd=Math.floor,ei=e=>({x:e,y:e}),d5={left:"right",right:"left",bottom:"top",top:"bottom"},f5={start:"end",end:"start"};function dy(e,t,n){return ir(e,Sa(t,n))}function Oi(e,t){return typeof e=="function"?e(t):e}function Di(e){return e.split("-")[0]}function tl(e){return e.split("-")[1]}function Kx(e){return e==="x"?"y":"x"}function Wx(e){return e==="y"?"height":"width"}const h5=new Set(["top","bottom"]);function Qr(e){return h5.has(Di(e))?"y":"x"}function Qx(e){return Kx(Qr(e))}function m5(e,t,n){n===void 0&&(n=!1);const r=tl(e),s=Qx(e),o=Wx(s);let l=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=hf(l)),[l,hf(l)]}function p5(e){const t=hf(e);return[fy(e),t,fy(t)]}function fy(e){return e.replace(/start|end/g,t=>f5[t])}const sC=["left","right"],oC=["right","left"],g5=["top","bottom"],y5=["bottom","top"];function x5(e,t,n){switch(e){case"top":case"bottom":return n?t?oC:sC:t?sC:oC;case"left":case"right":return t?g5:y5;default:return[]}}function v5(e,t,n,r){const s=tl(e);let o=x5(Di(e),n==="start",r);return s&&(o=o.map(l=>l+"-"+s),t&&(o=o.concat(o.map(fy)))),o}function hf(e){return e.replace(/left|right|bottom|top/g,t=>d5[t])}function b5(e){return{top:0,right:0,bottom:0,left:0,...e}}function R_(e){return typeof e!="number"?b5(e):{top:e,right:e,bottom:e,left:e}}function mf(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function lC(e,t,n){let{reference:r,floating:s}=e;const o=Qr(t),l=Qx(t),u=Wx(l),d=Di(t),h=o==="y",g=r.x+r.width/2-s.width/2,p=r.y+r.height/2-s.height/2,x=r[u]/2-s[u]/2;let v;switch(d){case"top":v={x:g,y:r.y-s.height};break;case"bottom":v={x:g,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:p};break;case"left":v={x:r.x-s.width,y:p};break;default:v={x:r.x,y:r.y}}switch(tl(t)){case"start":v[l]-=x*(n&&h?-1:1);break;case"end":v[l]+=x*(n&&h?-1:1);break}return v}const w5=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:o=[],platform:l}=n,u=o.filter(Boolean),d=await(l.isRTL==null?void 0:l.isRTL(t));let h=await l.getElementRects({reference:e,floating:t,strategy:s}),{x:g,y:p}=lC(h,r,d),x=r,v={},S=0;for(let C=0;C<u.length;C++){const{name:E,fn:T}=u[C],{x:R,y:O,data:A,reset:M}=await T({x:g,y:p,initialPlacement:r,placement:x,strategy:s,middlewareData:v,rects:h,platform:l,elements:{reference:e,floating:t}});g=R??g,p=O??p,v={...v,[E]:{...v[E],...A}},M&&S<=50&&(S++,typeof M=="object"&&(M.placement&&(x=M.placement),M.rects&&(h=M.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:s}):M.rects),{x:g,y:p}=lC(h,x,d)),C=-1)}return{x:g,y:p,placement:x,strategy:s,middlewareData:v}};async function zc(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:o,rects:l,elements:u,strategy:d}=e,{boundary:h="clippingAncestors",rootBoundary:g="viewport",elementContext:p="floating",altBoundary:x=!1,padding:v=0}=Oi(t,e),S=R_(v),E=u[x?p==="floating"?"reference":"floating":p],T=mf(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(E)))==null||n?E:E.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(u.floating)),boundary:h,rootBoundary:g,strategy:d})),R=p==="floating"?{x:r,y:s,width:l.floating.width,height:l.floating.height}:l.reference,O=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u.floating)),A=await(o.isElement==null?void 0:o.isElement(O))?await(o.getScale==null?void 0:o.getScale(O))||{x:1,y:1}:{x:1,y:1},M=mf(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:R,offsetParent:O,strategy:d}):R);return{top:(T.top-M.top+S.top)/A.y,bottom:(M.bottom-T.bottom+S.bottom)/A.y,left:(T.left-M.left+S.left)/A.x,right:(M.right-T.right+S.right)/A.x}}const S5=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:o,platform:l,elements:u,middlewareData:d}=t,{element:h,padding:g=0}=Oi(e,t)||{};if(h==null)return{};const p=R_(g),x={x:n,y:r},v=Qx(s),S=Wx(v),C=await l.getDimensions(h),E=v==="y",T=E?"top":"left",R=E?"bottom":"right",O=E?"clientHeight":"clientWidth",A=o.reference[S]+o.reference[v]-x[v]-o.floating[S],M=x[v]-o.reference[v],N=await(l.getOffsetParent==null?void 0:l.getOffsetParent(h));let z=N?N[O]:0;(!z||!await(l.isElement==null?void 0:l.isElement(N)))&&(z=u.floating[O]||o.floating[S]);const P=A/2-M/2,B=z/2-C[S]/2-1,D=Sa(p[T],B),H=Sa(p[R],B),$=D,X=z-C[S]-H,Y=z/2-C[S]/2+P,te=dy($,Y,X),I=!d.arrow&&tl(s)!=null&&Y!==te&&o.reference[S]/2-(Y<$?D:H)-C[S]/2<0,F=I?Y<$?Y-$:Y-X:0;return{[v]:x[v]+F,data:{[v]:te,centerOffset:Y-te-F,...I&&{alignmentOffset:F}},reset:I}}}),C5=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:s,middlewareData:o,rects:l,initialPlacement:u,platform:d,elements:h}=t,{mainAxis:g=!0,crossAxis:p=!0,fallbackPlacements:x,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:C=!0,...E}=Oi(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const T=Di(s),R=Qr(u),O=Di(u)===u,A=await(d.isRTL==null?void 0:d.isRTL(h.floating)),M=x||(O||!C?[hf(u)]:p5(u)),N=S!=="none";!x&&N&&M.push(...v5(u,C,S,A));const z=[u,...M],P=await zc(t,E),B=[];let D=((r=o.flip)==null?void 0:r.overflows)||[];if(g&&B.push(P[T]),p){const Y=m5(s,l,A);B.push(P[Y[0]],P[Y[1]])}if(D=[...D,{placement:s,overflows:B}],!B.every(Y=>Y<=0)){var H,$;const Y=(((H=o.flip)==null?void 0:H.index)||0)+1,te=z[Y];if(te&&(!(p==="alignment"?R!==Qr(te):!1)||D.every(V=>Qr(V.placement)===R?V.overflows[0]>0:!0)))return{data:{index:Y,overflows:D},reset:{placement:te}};let I=($=D.filter(F=>F.overflows[0]<=0).sort((F,V)=>F.overflows[1]-V.overflows[1])[0])==null?void 0:$.placement;if(!I)switch(v){case"bestFit":{var X;const F=(X=D.filter(V=>{if(N){const Z=Qr(V.placement);return Z===R||Z==="y"}return!0}).map(V=>[V.placement,V.overflows.filter(Z=>Z>0).reduce((Z,k)=>Z+k,0)]).sort((V,Z)=>V[1]-Z[1])[0])==null?void 0:X[0];F&&(I=F);break}case"initialPlacement":I=u;break}if(s!==I)return{reset:{placement:I}}}return{}}}};function cC(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function uC(e){return u5.some(t=>e[t]>=0)}const k5=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...s}=Oi(e,t);switch(r){case"referenceHidden":{const o=await zc(t,{...s,elementContext:"reference"}),l=cC(o,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:uC(l)}}}case"escaped":{const o=await zc(t,{...s,altBoundary:!0}),l=cC(o,n.floating);return{data:{escapedOffsets:l,escaped:uC(l)}}}default:return{}}}}},M_=new Set(["left","top"]);async function T5(e,t){const{placement:n,platform:r,elements:s}=e,o=await(r.isRTL==null?void 0:r.isRTL(s.floating)),l=Di(n),u=tl(n),d=Qr(n)==="y",h=M_.has(l)?-1:1,g=o&&d?-1:1,p=Oi(t,e);let{mainAxis:x,crossAxis:v,alignmentAxis:S}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return u&&typeof S=="number"&&(v=u==="end"?S*-1:S),d?{x:v*g,y:x*h}:{x:x*h,y:v*g}}const E5=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:o,placement:l,middlewareData:u}=t,d=await T5(t,e);return l===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:s+d.x,y:o+d.y,data:{...d,placement:l}}}}},_5=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s}=t,{mainAxis:o=!0,crossAxis:l=!1,limiter:u={fn:E=>{let{x:T,y:R}=E;return{x:T,y:R}}},...d}=Oi(e,t),h={x:n,y:r},g=await zc(t,d),p=Qr(Di(s)),x=Kx(p);let v=h[x],S=h[p];if(o){const E=x==="y"?"top":"left",T=x==="y"?"bottom":"right",R=v+g[E],O=v-g[T];v=dy(R,v,O)}if(l){const E=p==="y"?"top":"left",T=p==="y"?"bottom":"right",R=S+g[E],O=S-g[T];S=dy(R,S,O)}const C=u.fn({...t,[x]:v,[p]:S});return{...C,data:{x:C.x-n,y:C.y-r,enabled:{[x]:o,[p]:l}}}}}},j5=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:o,middlewareData:l}=t,{offset:u=0,mainAxis:d=!0,crossAxis:h=!0}=Oi(e,t),g={x:n,y:r},p=Qr(s),x=Kx(p);let v=g[x],S=g[p];const C=Oi(u,t),E=typeof C=="number"?{mainAxis:C,crossAxis:0}:{mainAxis:0,crossAxis:0,...C};if(d){const O=x==="y"?"height":"width",A=o.reference[x]-o.floating[O]+E.mainAxis,M=o.reference[x]+o.reference[O]-E.mainAxis;v<A?v=A:v>M&&(v=M)}if(h){var T,R;const O=x==="y"?"width":"height",A=M_.has(Di(s)),M=o.reference[p]-o.floating[O]+(A&&((T=l.offset)==null?void 0:T[p])||0)+(A?0:E.crossAxis),N=o.reference[p]+o.reference[O]+(A?0:((R=l.offset)==null?void 0:R[p])||0)-(A?E.crossAxis:0);S<M?S=M:S>N&&(S=N)}return{[x]:v,[p]:S}}}},N5=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:s,rects:o,platform:l,elements:u}=t,{apply:d=()=>{},...h}=Oi(e,t),g=await zc(t,h),p=Di(s),x=tl(s),v=Qr(s)==="y",{width:S,height:C}=o.floating;let E,T;p==="top"||p==="bottom"?(E=p,T=x===(await(l.isRTL==null?void 0:l.isRTL(u.floating))?"start":"end")?"left":"right"):(T=p,E=x==="end"?"top":"bottom");const R=C-g.top-g.bottom,O=S-g.left-g.right,A=Sa(C-g[E],R),M=Sa(S-g[T],O),N=!t.middlewareData.shift;let z=A,P=M;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(P=O),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(z=R),N&&!x){const D=ir(g.left,0),H=ir(g.right,0),$=ir(g.top,0),X=ir(g.bottom,0);v?P=S-2*(D!==0||H!==0?D+H:ir(g.left,g.right)):z=C-2*($!==0||X!==0?$+X:ir(g.top,g.bottom))}await d({...t,availableWidth:P,availableHeight:z});const B=await l.getDimensions(u.floating);return S!==B.width||C!==B.height?{reset:{rects:!0}}:{}}}};function nh(){return typeof window<"u"}function nl(e){return O_(e)?(e.nodeName||"").toLowerCase():"#document"}function sr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function oi(e){var t;return(t=(O_(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function O_(e){return nh()?e instanceof Node||e instanceof sr(e).Node:!1}function Vr(e){return nh()?e instanceof Element||e instanceof sr(e).Element:!1}function ai(e){return nh()?e instanceof HTMLElement||e instanceof sr(e).HTMLElement:!1}function dC(e){return!nh()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof sr(e).ShadowRoot}const A5=new Set(["inline","contents"]);function iu(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=Ur(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!A5.has(s)}const R5=new Set(["table","td","th"]);function M5(e){return R5.has(nl(e))}const O5=[":popover-open",":modal"];function rh(e){return O5.some(t=>{try{return e.matches(t)}catch{return!1}})}const D5=["transform","translate","scale","rotate","perspective"],P5=["transform","translate","scale","rotate","perspective","filter"],z5=["paint","layout","strict","content"];function Jx(e){const t=ev(),n=Vr(e)?Ur(e):e;return D5.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||P5.some(r=>(n.willChange||"").includes(r))||z5.some(r=>(n.contain||"").includes(r))}function L5(e){let t=Ca(e);for(;ai(t)&&!Vo(t);){if(Jx(t))return t;if(rh(t))return null;t=Ca(t)}return null}function ev(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const I5=new Set(["html","body","#document"]);function Vo(e){return I5.has(nl(e))}function Ur(e){return sr(e).getComputedStyle(e)}function ih(e){return Vr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ca(e){if(nl(e)==="html")return e;const t=e.assignedSlot||e.parentNode||dC(e)&&e.host||oi(e);return dC(t)?t.host:t}function D_(e){const t=Ca(e);return Vo(t)?e.ownerDocument?e.ownerDocument.body:e.body:ai(t)&&iu(t)?t:D_(t)}function Lc(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=D_(e),o=s===((r=e.ownerDocument)==null?void 0:r.body),l=sr(s);if(o){const u=hy(l);return t.concat(l,l.visualViewport||[],iu(s)?s:[],u&&n?Lc(u):[])}return t.concat(s,Lc(s,[],n))}function hy(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function P_(e){const t=Ur(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=ai(e),o=s?e.offsetWidth:n,l=s?e.offsetHeight:r,u=ff(n)!==o||ff(r)!==l;return u&&(n=o,r=l),{width:n,height:r,$:u}}function tv(e){return Vr(e)?e:e.contextElement}function Do(e){const t=tv(e);if(!ai(t))return ei(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:o}=P_(t);let l=(o?ff(n.width):n.width)/r,u=(o?ff(n.height):n.height)/s;return(!l||!Number.isFinite(l))&&(l=1),(!u||!Number.isFinite(u))&&(u=1),{x:l,y:u}}const B5=ei(0);function z_(e){const t=sr(e);return!ev()||!t.visualViewport?B5:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function V5(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==sr(e)?!1:t}function ys(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),o=tv(e);let l=ei(1);t&&(r?Vr(r)&&(l=Do(r)):l=Do(e));const u=V5(o,n,r)?z_(o):ei(0);let d=(s.left+u.x)/l.x,h=(s.top+u.y)/l.y,g=s.width/l.x,p=s.height/l.y;if(o){const x=sr(o),v=r&&Vr(r)?sr(r):r;let S=x,C=hy(S);for(;C&&r&&v!==S;){const E=Do(C),T=C.getBoundingClientRect(),R=Ur(C),O=T.left+(C.clientLeft+parseFloat(R.paddingLeft))*E.x,A=T.top+(C.clientTop+parseFloat(R.paddingTop))*E.y;d*=E.x,h*=E.y,g*=E.x,p*=E.y,d+=O,h+=A,S=sr(C),C=hy(S)}}return mf({width:g,height:p,x:d,y:h})}function nv(e,t){const n=ih(e).scrollLeft;return t?t.left+n:ys(oi(e)).left+n}function L_(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=r.left+t.scrollLeft-(n?0:nv(e,r)),o=r.top+t.scrollTop;return{x:s,y:o}}function U5(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const o=s==="fixed",l=oi(r),u=t?rh(t.floating):!1;if(r===l||u&&o)return n;let d={scrollLeft:0,scrollTop:0},h=ei(1);const g=ei(0),p=ai(r);if((p||!p&&!o)&&((nl(r)!=="body"||iu(l))&&(d=ih(r)),ai(r))){const v=ys(r);h=Do(r),g.x=v.x+r.clientLeft,g.y=v.y+r.clientTop}const x=l&&!p&&!o?L_(l,d,!0):ei(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-d.scrollLeft*h.x+g.x+x.x,y:n.y*h.y-d.scrollTop*h.y+g.y+x.y}}function H5(e){return Array.from(e.getClientRects())}function F5(e){const t=oi(e),n=ih(e),r=e.ownerDocument.body,s=ir(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=ir(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+nv(e);const u=-n.scrollTop;return Ur(r).direction==="rtl"&&(l+=ir(t.clientWidth,r.clientWidth)-s),{width:s,height:o,x:l,y:u}}function $5(e,t){const n=sr(e),r=oi(e),s=n.visualViewport;let o=r.clientWidth,l=r.clientHeight,u=0,d=0;if(s){o=s.width,l=s.height;const h=ev();(!h||h&&t==="fixed")&&(u=s.offsetLeft,d=s.offsetTop)}return{width:o,height:l,x:u,y:d}}const q5=new Set(["absolute","fixed"]);function G5(e,t){const n=ys(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,o=ai(e)?Do(e):ei(1),l=e.clientWidth*o.x,u=e.clientHeight*o.y,d=s*o.x,h=r*o.y;return{width:l,height:u,x:d,y:h}}function fC(e,t,n){let r;if(t==="viewport")r=$5(e,n);else if(t==="document")r=F5(oi(e));else if(Vr(t))r=G5(t,n);else{const s=z_(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return mf(r)}function I_(e,t){const n=Ca(e);return n===t||!Vr(n)||Vo(n)?!1:Ur(n).position==="fixed"||I_(n,t)}function Y5(e,t){const n=t.get(e);if(n)return n;let r=Lc(e,[],!1).filter(u=>Vr(u)&&nl(u)!=="body"),s=null;const o=Ur(e).position==="fixed";let l=o?Ca(e):e;for(;Vr(l)&&!Vo(l);){const u=Ur(l),d=Jx(l);!d&&u.position==="fixed"&&(s=null),(o?!d&&!s:!d&&u.position==="static"&&!!s&&q5.has(s.position)||iu(l)&&!d&&I_(e,l))?r=r.filter(g=>g!==l):s=u,l=Ca(l)}return t.set(e,r),r}function Z5(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const l=[...n==="clippingAncestors"?rh(t)?[]:Y5(t,this._c):[].concat(n),r],u=l[0],d=l.reduce((h,g)=>{const p=fC(t,g,s);return h.top=ir(p.top,h.top),h.right=Sa(p.right,h.right),h.bottom=Sa(p.bottom,h.bottom),h.left=ir(p.left,h.left),h},fC(t,u,s));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function X5(e){const{width:t,height:n}=P_(e);return{width:t,height:n}}function K5(e,t,n){const r=ai(t),s=oi(t),o=n==="fixed",l=ys(e,!0,o,t);let u={scrollLeft:0,scrollTop:0};const d=ei(0);function h(){d.x=nv(s)}if(r||!r&&!o)if((nl(t)!=="body"||iu(s))&&(u=ih(t)),r){const v=ys(t,!0,o,t);d.x=v.x+t.clientLeft,d.y=v.y+t.clientTop}else s&&h();o&&!r&&s&&h();const g=s&&!r&&!o?L_(s,u):ei(0),p=l.left+u.scrollLeft-d.x-g.x,x=l.top+u.scrollTop-d.y-g.y;return{x:p,y:x,width:l.width,height:l.height}}function ug(e){return Ur(e).position==="static"}function hC(e,t){if(!ai(e)||Ur(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return oi(e)===n&&(n=n.ownerDocument.body),n}function B_(e,t){const n=sr(e);if(rh(e))return n;if(!ai(e)){let s=Ca(e);for(;s&&!Vo(s);){if(Vr(s)&&!ug(s))return s;s=Ca(s)}return n}let r=hC(e,t);for(;r&&M5(r)&&ug(r);)r=hC(r,t);return r&&Vo(r)&&ug(r)&&!Jx(r)?n:r||L5(e)||n}const W5=async function(e){const t=this.getOffsetParent||B_,n=this.getDimensions,r=await n(e.floating);return{reference:K5(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Q5(e){return Ur(e).direction==="rtl"}const J5={convertOffsetParentRelativeRectToViewportRelativeRect:U5,getDocumentElement:oi,getClippingRect:Z5,getOffsetParent:B_,getElementRects:W5,getClientRects:H5,getDimensions:X5,getScale:Do,isElement:Vr,isRTL:Q5};function V_(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function eP(e,t){let n=null,r;const s=oi(e);function o(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function l(u,d){u===void 0&&(u=!1),d===void 0&&(d=1),o();const h=e.getBoundingClientRect(),{left:g,top:p,width:x,height:v}=h;if(u||t(),!x||!v)return;const S=Vd(p),C=Vd(s.clientWidth-(g+x)),E=Vd(s.clientHeight-(p+v)),T=Vd(g),O={rootMargin:-S+"px "+-C+"px "+-E+"px "+-T+"px",threshold:ir(0,Sa(1,d))||1};let A=!0;function M(N){const z=N[0].intersectionRatio;if(z!==d){if(!A)return l();z?l(!1,z):r=setTimeout(()=>{l(!1,1e-7)},1e3)}z===1&&!V_(h,e.getBoundingClientRect())&&l(),A=!1}try{n=new IntersectionObserver(M,{...O,root:s.ownerDocument})}catch{n=new IntersectionObserver(M,O)}n.observe(e)}return l(!0),o}function tP(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,h=tv(e),g=s||o?[...h?Lc(h):[],...Lc(t)]:[];g.forEach(T=>{s&&T.addEventListener("scroll",n,{passive:!0}),o&&T.addEventListener("resize",n)});const p=h&&u?eP(h,n):null;let x=-1,v=null;l&&(v=new ResizeObserver(T=>{let[R]=T;R&&R.target===h&&v&&(v.unobserve(t),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var O;(O=v)==null||O.observe(t)})),n()}),h&&!d&&v.observe(h),v.observe(t));let S,C=d?ys(e):null;d&&E();function E(){const T=ys(e);C&&!V_(C,T)&&n(),C=T,S=requestAnimationFrame(E)}return n(),()=>{var T;g.forEach(R=>{s&&R.removeEventListener("scroll",n),o&&R.removeEventListener("resize",n)}),p==null||p(),(T=v)==null||T.disconnect(),v=null,d&&cancelAnimationFrame(S)}}const nP=E5,rP=_5,iP=C5,aP=N5,sP=k5,mC=S5,oP=j5,lP=(e,t,n)=>{const r=new Map,s={platform:J5,...n},o={...s.platform,_c:r};return w5(e,t,{...s,platform:o})};var cP=typeof document<"u",uP=function(){},tf=cP?w.useLayoutEffect:uP;function pf(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,s;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(!pf(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const o=s[r];if(!(o==="_owner"&&e.$$typeof)&&!pf(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function U_(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function pC(e,t){const n=U_(e);return Math.round(t*n)/n}function dg(e){const t=w.useRef(e);return tf(()=>{t.current=e}),t}function dP(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:o,floating:l}={},transform:u=!0,whileElementsMounted:d,open:h}=e,[g,p]=w.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[x,v]=w.useState(r);pf(x,r)||v(r);const[S,C]=w.useState(null),[E,T]=w.useState(null),R=w.useCallback(V=>{V!==N.current&&(N.current=V,C(V))},[]),O=w.useCallback(V=>{V!==z.current&&(z.current=V,T(V))},[]),A=o||S,M=l||E,N=w.useRef(null),z=w.useRef(null),P=w.useRef(g),B=d!=null,D=dg(d),H=dg(s),$=dg(h),X=w.useCallback(()=>{if(!N.current||!z.current)return;const V={placement:t,strategy:n,middleware:x};H.current&&(V.platform=H.current),lP(N.current,z.current,V).then(Z=>{const k={...Z,isPositioned:$.current!==!1};Y.current&&!pf(P.current,k)&&(P.current=k,tu.flushSync(()=>{p(k)}))})},[x,t,n,H,$]);tf(()=>{h===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,p(V=>({...V,isPositioned:!1})))},[h]);const Y=w.useRef(!1);tf(()=>(Y.current=!0,()=>{Y.current=!1}),[]),tf(()=>{if(A&&(N.current=A),M&&(z.current=M),A&&M){if(D.current)return D.current(A,M,X);X()}},[A,M,X,D,B]);const te=w.useMemo(()=>({reference:N,floating:z,setReference:R,setFloating:O}),[R,O]),I=w.useMemo(()=>({reference:A,floating:M}),[A,M]),F=w.useMemo(()=>{const V={position:n,left:0,top:0};if(!I.floating)return V;const Z=pC(I.floating,g.x),k=pC(I.floating,g.y);return u?{...V,transform:"translate("+Z+"px, "+k+"px)",...U_(I.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:Z,top:k}},[n,u,I.floating,g.x,g.y]);return w.useMemo(()=>({...g,update:X,refs:te,elements:I,floatingStyles:F}),[g,X,te,I,F])}const fP=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:s}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?mC({element:r.current,padding:s}).fn(n):{}:r?mC({element:r,padding:s}).fn(n):{}}}},hP=(e,t)=>({...nP(e),options:[e,t]}),mP=(e,t)=>({...rP(e),options:[e,t]}),pP=(e,t)=>({...oP(e),options:[e,t]}),gP=(e,t)=>({...iP(e),options:[e,t]}),yP=(e,t)=>({...aP(e),options:[e,t]}),xP=(e,t)=>({...sP(e),options:[e,t]}),vP=(e,t)=>({...fP(e),options:[e,t]});var bP="Arrow",H_=w.forwardRef((e,t)=>{const{children:n,width:r=10,height:s=5,...o}=e;return m.jsx(qe.svg,{...o,ref:t,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:m.jsx("polygon",{points:"0,0 30,0 15,10"})})});H_.displayName=bP;var wP=H_,rv="Popper",[F_,rl]=Bi(rv),[SP,$_]=F_(rv),q_=e=>{const{__scopePopper:t,children:n}=e,[r,s]=w.useState(null);return m.jsx(SP,{scope:t,anchor:r,onAnchorChange:s,children:n})};q_.displayName=rv;var G_="PopperAnchor",Y_=w.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...s}=e,o=$_(G_,n),l=w.useRef(null),u=ot(t,l);return w.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||l.current)}),r?null:m.jsx(qe.div,{...s,ref:u})});Y_.displayName=G_;var iv="PopperContent",[CP,kP]=F_(iv),Z_=w.forwardRef((e,t)=>{var K,oe,ce,me,be,Te;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:o="center",alignOffset:l=0,arrowPadding:u=0,avoidCollisions:d=!0,collisionBoundary:h=[],collisionPadding:g=0,sticky:p="partial",hideWhenDetached:x=!1,updatePositionStrategy:v="optimized",onPlaced:S,...C}=e,E=$_(iv,n),[T,R]=w.useState(null),O=ot(t,Ve=>R(Ve)),[A,M]=w.useState(null),N=c5(A),z=(N==null?void 0:N.width)??0,P=(N==null?void 0:N.height)??0,B=r+(o!=="center"?"-"+o:""),D=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},H=Array.isArray(h)?h:[h],$=H.length>0,X={padding:D,boundary:H.filter(EP),altBoundary:$},{refs:Y,floatingStyles:te,placement:I,isPositioned:F,middlewareData:V}=dP({strategy:"fixed",placement:B,whileElementsMounted:(...Ve)=>tP(...Ve,{animationFrame:v==="always"}),elements:{reference:E.anchor},middleware:[hP({mainAxis:s+P,alignmentAxis:l}),d&&mP({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?pP():void 0,...X}),d&&gP({...X}),yP({...X,apply:({elements:Ve,rects:lt,availableWidth:Mt,availableHeight:It})=>{const{width:st,height:yt}=lt.reference,Ct=Ve.floating.style;Ct.setProperty("--radix-popper-available-width",`${Mt}px`),Ct.setProperty("--radix-popper-available-height",`${It}px`),Ct.setProperty("--radix-popper-anchor-width",`${st}px`),Ct.setProperty("--radix-popper-anchor-height",`${yt}px`)}}),A&&vP({element:A,padding:u}),_P({arrowWidth:z,arrowHeight:P}),x&&xP({strategy:"referenceHidden",...X})]}),[Z,k]=W_(I),G=yn(S);xn(()=>{F&&(G==null||G())},[F,G]);const le=(K=V.arrow)==null?void 0:K.x,j=(oe=V.arrow)==null?void 0:oe.y,Q=((ce=V.arrow)==null?void 0:ce.centerOffset)!==0,[ee,W]=w.useState();return xn(()=>{T&&W(window.getComputedStyle(T).zIndex)},[T]),m.jsx("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...te,transform:F?te.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ee,"--radix-popper-transform-origin":[(me=V.transformOrigin)==null?void 0:me.x,(be=V.transformOrigin)==null?void 0:be.y].join(" "),...((Te=V.hide)==null?void 0:Te.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:m.jsx(CP,{scope:n,placedSide:Z,onArrowChange:M,arrowX:le,arrowY:j,shouldHideArrow:Q,children:m.jsx(qe.div,{"data-side":Z,"data-align":k,...C,ref:O,style:{...C.style,animation:F?void 0:"none"}})})})});Z_.displayName=iv;var X_="PopperArrow",TP={top:"bottom",right:"left",bottom:"top",left:"right"},K_=w.forwardRef(function(t,n){const{__scopePopper:r,...s}=t,o=kP(X_,r),l=TP[o.placedSide];return m.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:m.jsx(wP,{...s,ref:n,style:{...s.style,display:"block"}})})});K_.displayName=X_;function EP(e){return e!==null}var _P=e=>({name:"transformOrigin",options:e,fn(t){var E,T,R;const{placement:n,rects:r,middlewareData:s}=t,l=((E=s.arrow)==null?void 0:E.centerOffset)!==0,u=l?0:e.arrowWidth,d=l?0:e.arrowHeight,[h,g]=W_(n),p={start:"0%",center:"50%",end:"100%"}[g],x=(((T=s.arrow)==null?void 0:T.x)??0)+u/2,v=(((R=s.arrow)==null?void 0:R.y)??0)+d/2;let S="",C="";return h==="bottom"?(S=l?p:`${x}px`,C=`${-d}px`):h==="top"?(S=l?p:`${x}px`,C=`${r.floating.height+d}px`):h==="right"?(S=`${-d}px`,C=l?p:`${v}px`):h==="left"&&(S=`${r.floating.width+d}px`,C=l?p:`${v}px`),{data:{x:S,y:C}}}});function W_(e){const[t,n="center"]=e.split("-");return[t,n]}var av=q_,sv=Y_,ov=Z_,lv=K_,fg="rovingFocusGroup.onEntryFocus",jP={bubbles:!1,cancelable:!0},au="RovingFocusGroup",[my,Q_,NP]=$x(au),[AP,J_]=Bi(au,[NP]),[RP,MP]=AP(au),e2=w.forwardRef((e,t)=>m.jsx(my.Provider,{scope:e.__scopeRovingFocusGroup,children:m.jsx(my.Slot,{scope:e.__scopeRovingFocusGroup,children:m.jsx(OP,{...e,ref:t})})}));e2.displayName=au;var OP=w.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:s=!1,dir:o,currentTabStopId:l,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:d,onEntryFocus:h,preventScrollOnEntryFocus:g=!1,...p}=e,x=w.useRef(null),v=ot(t,x),S=Wf(o),[C,E]=Bo({prop:l,defaultProp:u??null,onChange:d,caller:au}),[T,R]=w.useState(!1),O=yn(h),A=Q_(n),M=w.useRef(!1),[N,z]=w.useState(0);return w.useEffect(()=>{const P=x.current;if(P)return P.addEventListener(fg,O),()=>P.removeEventListener(fg,O)},[O]),m.jsx(RP,{scope:n,orientation:r,dir:S,loop:s,currentTabStopId:C,onItemFocus:w.useCallback(P=>E(P),[E]),onItemShiftTab:w.useCallback(()=>R(!0),[]),onFocusableItemAdd:w.useCallback(()=>z(P=>P+1),[]),onFocusableItemRemove:w.useCallback(()=>z(P=>P-1),[]),children:m.jsx(qe.div,{tabIndex:T||N===0?-1:0,"data-orientation":r,...p,ref:v,style:{outline:"none",...e.style},onMouseDown:Ce(e.onMouseDown,()=>{M.current=!0}),onFocus:Ce(e.onFocus,P=>{const B=!M.current;if(P.target===P.currentTarget&&B&&!T){const D=new CustomEvent(fg,jP);if(P.currentTarget.dispatchEvent(D),!D.defaultPrevented){const H=A().filter(I=>I.focusable),$=H.find(I=>I.active),X=H.find(I=>I.id===C),te=[$,X,...H].filter(Boolean).map(I=>I.ref.current);r2(te,g)}}M.current=!1}),onBlur:Ce(e.onBlur,()=>R(!1))})})}),t2="RovingFocusGroupItem",n2=w.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:s=!1,tabStopId:o,children:l,...u}=e,d=Jr(),h=o||d,g=MP(t2,n),p=g.currentTabStopId===h,x=Q_(n),{onFocusableItemAdd:v,onFocusableItemRemove:S,currentTabStopId:C}=g;return w.useEffect(()=>{if(r)return v(),()=>S()},[r,v,S]),m.jsx(my.ItemSlot,{scope:n,id:h,focusable:r,active:s,children:m.jsx(qe.span,{tabIndex:p?0:-1,"data-orientation":g.orientation,...u,ref:t,onMouseDown:Ce(e.onMouseDown,E=>{r?g.onItemFocus(h):E.preventDefault()}),onFocus:Ce(e.onFocus,()=>g.onItemFocus(h)),onKeyDown:Ce(e.onKeyDown,E=>{if(E.key==="Tab"&&E.shiftKey){g.onItemShiftTab();return}if(E.target!==E.currentTarget)return;const T=zP(E,g.orientation,g.dir);if(T!==void 0){if(E.metaKey||E.ctrlKey||E.altKey||E.shiftKey)return;E.preventDefault();let O=x().filter(A=>A.focusable).map(A=>A.ref.current);if(T==="last")O.reverse();else if(T==="prev"||T==="next"){T==="prev"&&O.reverse();const A=O.indexOf(E.currentTarget);O=g.loop?LP(O,A+1):O.slice(A+1)}setTimeout(()=>r2(O))}}),children:typeof l=="function"?l({isCurrentTabStop:p,hasTabStop:C!=null}):l})})});n2.displayName=t2;var DP={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function PP(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function zP(e,t,n){const r=PP(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return DP[r]}function r2(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function LP(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var IP=e2,BP=n2,py=["Enter"," "],VP=["ArrowDown","PageUp","Home"],i2=["ArrowUp","PageDown","End"],UP=[...VP,...i2],HP={ltr:[...py,"ArrowRight"],rtl:[...py,"ArrowLeft"]},FP={ltr:["ArrowLeft"],rtl:["ArrowRight"]},su="Menu",[Ic,$P,qP]=$x(su),[_s,a2]=Bi(su,[qP,rl,J_]),ah=rl(),s2=J_(),[GP,js]=_s(su),[YP,ou]=_s(su),o2=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:s,onOpenChange:o,modal:l=!0}=e,u=ah(t),[d,h]=w.useState(null),g=w.useRef(!1),p=yn(o),x=Wf(s);return w.useEffect(()=>{const v=()=>{g.current=!0,document.addEventListener("pointerdown",S,{capture:!0,once:!0}),document.addEventListener("pointermove",S,{capture:!0,once:!0})},S=()=>g.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",S,{capture:!0}),document.removeEventListener("pointermove",S,{capture:!0})}},[]),m.jsx(av,{...u,children:m.jsx(GP,{scope:t,open:n,onOpenChange:p,content:d,onContentChange:h,children:m.jsx(YP,{scope:t,onClose:w.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:g,dir:x,modal:l,children:r})})})};o2.displayName=su;var ZP="MenuAnchor",cv=w.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,s=ah(n);return m.jsx(sv,{...s,...r,ref:t})});cv.displayName=ZP;var uv="MenuPortal",[XP,l2]=_s(uv,{forceMount:void 0}),c2=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:s}=e,o=js(uv,t);return m.jsx(XP,{scope:t,forceMount:n,children:m.jsx($n,{present:n||o.open,children:m.jsx(ru,{asChild:!0,container:s,children:r})})})};c2.displayName=uv;var kr="MenuContent",[KP,dv]=_s(kr),u2=w.forwardRef((e,t)=>{const n=l2(kr,e.__scopeMenu),{forceMount:r=n.forceMount,...s}=e,o=js(kr,e.__scopeMenu),l=ou(kr,e.__scopeMenu);return m.jsx(Ic.Provider,{scope:e.__scopeMenu,children:m.jsx($n,{present:r||o.open,children:m.jsx(Ic.Slot,{scope:e.__scopeMenu,children:l.modal?m.jsx(WP,{...s,ref:t}):m.jsx(QP,{...s,ref:t})})})})}),WP=w.forwardRef((e,t)=>{const n=js(kr,e.__scopeMenu),r=w.useRef(null),s=ot(t,r);return w.useEffect(()=>{const o=r.current;if(o)return Gx(o)},[]),m.jsx(fv,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Ce(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),QP=w.forwardRef((e,t)=>{const n=js(kr,e.__scopeMenu);return m.jsx(fv,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),JP=ps("MenuContent.ScrollLock"),fv=w.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:s,onOpenAutoFocus:o,onCloseAutoFocus:l,disableOutsidePointerEvents:u,onEntryFocus:d,onEscapeKeyDown:h,onPointerDownOutside:g,onFocusOutside:p,onInteractOutside:x,onDismiss:v,disableOutsideScroll:S,...C}=e,E=js(kr,n),T=ou(kr,n),R=ah(n),O=s2(n),A=$P(n),[M,N]=w.useState(null),z=w.useRef(null),P=ot(t,z,E.onContentChange),B=w.useRef(0),D=w.useRef(""),H=w.useRef(0),$=w.useRef(null),X=w.useRef("right"),Y=w.useRef(0),te=S?eh:w.Fragment,I=S?{as:JP,allowPinchZoom:!0}:void 0,F=Z=>{var K,oe;const k=D.current+Z,G=A().filter(ce=>!ce.disabled),le=document.activeElement,j=(K=G.find(ce=>ce.ref.current===le))==null?void 0:K.textValue,Q=G.map(ce=>ce.textValue),ee=dz(Q,k,j),W=(oe=G.find(ce=>ce.textValue===ee))==null?void 0:oe.ref.current;(function ce(me){D.current=me,window.clearTimeout(B.current),me!==""&&(B.current=window.setTimeout(()=>ce(""),1e3))})(k),W&&setTimeout(()=>W.focus())};w.useEffect(()=>()=>window.clearTimeout(B.current),[]),qx();const V=w.useCallback(Z=>{var G,le;return X.current===((G=$.current)==null?void 0:G.side)&&hz(Z,(le=$.current)==null?void 0:le.area)},[]);return m.jsx(KP,{scope:n,searchRef:D,onItemEnter:w.useCallback(Z=>{V(Z)&&Z.preventDefault()},[V]),onItemLeave:w.useCallback(Z=>{var k;V(Z)||((k=z.current)==null||k.focus(),N(null))},[V]),onTriggerLeave:w.useCallback(Z=>{V(Z)&&Z.preventDefault()},[V]),pointerGraceTimerRef:H,onPointerGraceIntentChange:w.useCallback(Z=>{$.current=Z},[]),children:m.jsx(te,{...I,children:m.jsx(Qf,{asChild:!0,trapped:s,onMountAutoFocus:Ce(o,Z=>{var k;Z.preventDefault(),(k=z.current)==null||k.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:m.jsx(nu,{asChild:!0,disableOutsidePointerEvents:u,onEscapeKeyDown:h,onPointerDownOutside:g,onFocusOutside:p,onInteractOutside:x,onDismiss:v,children:m.jsx(IP,{asChild:!0,...O,dir:T.dir,orientation:"vertical",loop:r,currentTabStopId:M,onCurrentTabStopIdChange:N,onEntryFocus:Ce(d,Z=>{T.isUsingKeyboardRef.current||Z.preventDefault()}),preventScrollOnEntryFocus:!0,children:m.jsx(ov,{role:"menu","aria-orientation":"vertical","data-state":E2(E.open),"data-radix-menu-content":"",dir:T.dir,...R,...C,ref:P,style:{outline:"none",...C.style},onKeyDown:Ce(C.onKeyDown,Z=>{const G=Z.target.closest("[data-radix-menu-content]")===Z.currentTarget,le=Z.ctrlKey||Z.altKey||Z.metaKey,j=Z.key.length===1;G&&(Z.key==="Tab"&&Z.preventDefault(),!le&&j&&F(Z.key));const Q=z.current;if(Z.target!==Q||!UP.includes(Z.key))return;Z.preventDefault();const W=A().filter(K=>!K.disabled).map(K=>K.ref.current);i2.includes(Z.key)&&W.reverse(),cz(W)}),onBlur:Ce(e.onBlur,Z=>{Z.currentTarget.contains(Z.target)||(window.clearTimeout(B.current),D.current="")}),onPointerMove:Ce(e.onPointerMove,Bc(Z=>{const k=Z.target,G=Y.current!==Z.clientX;if(Z.currentTarget.contains(k)&&G){const le=Z.clientX>Y.current?"right":"left";X.current=le,Y.current=Z.clientX}}))})})})})})})});u2.displayName=kr;var ez="MenuGroup",hv=w.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(qe.div,{role:"group",...r,ref:t})});hv.displayName=ez;var tz="MenuLabel",d2=w.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(qe.div,{...r,ref:t})});d2.displayName=tz;var gf="MenuItem",gC="menu.itemSelect",sh=w.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...s}=e,o=w.useRef(null),l=ou(gf,e.__scopeMenu),u=dv(gf,e.__scopeMenu),d=ot(t,o),h=w.useRef(!1),g=()=>{const p=o.current;if(!n&&p){const x=new CustomEvent(gC,{bubbles:!0,cancelable:!0});p.addEventListener(gC,v=>r==null?void 0:r(v),{once:!0}),ZE(p,x),x.defaultPrevented?h.current=!1:l.onClose()}};return m.jsx(f2,{...s,ref:d,disabled:n,onClick:Ce(e.onClick,g),onPointerDown:p=>{var x;(x=e.onPointerDown)==null||x.call(e,p),h.current=!0},onPointerUp:Ce(e.onPointerUp,p=>{var x;h.current||(x=p.currentTarget)==null||x.click()}),onKeyDown:Ce(e.onKeyDown,p=>{const x=u.searchRef.current!=="";n||x&&p.key===" "||py.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});sh.displayName=gf;var f2=w.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:s,...o}=e,l=dv(gf,n),u=s2(n),d=w.useRef(null),h=ot(t,d),[g,p]=w.useState(!1),[x,v]=w.useState("");return w.useEffect(()=>{const S=d.current;S&&v((S.textContent??"").trim())},[o.children]),m.jsx(Ic.ItemSlot,{scope:n,disabled:r,textValue:s??x,children:m.jsx(BP,{asChild:!0,...u,focusable:!r,children:m.jsx(qe.div,{role:"menuitem","data-highlighted":g?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...o,ref:h,onPointerMove:Ce(e.onPointerMove,Bc(S=>{r?l.onItemLeave(S):(l.onItemEnter(S),S.defaultPrevented||S.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Ce(e.onPointerLeave,Bc(S=>l.onItemLeave(S))),onFocus:Ce(e.onFocus,()=>p(!0)),onBlur:Ce(e.onBlur,()=>p(!1))})})})}),nz="MenuCheckboxItem",h2=w.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...s}=e;return m.jsx(x2,{scope:e.__scopeMenu,checked:n,children:m.jsx(sh,{role:"menuitemcheckbox","aria-checked":yf(n)?"mixed":n,...s,ref:t,"data-state":pv(n),onSelect:Ce(s.onSelect,()=>r==null?void 0:r(yf(n)?!0:!n),{checkForDefaultPrevented:!1})})})});h2.displayName=nz;var m2="MenuRadioGroup",[rz,iz]=_s(m2,{value:void 0,onValueChange:()=>{}}),p2=w.forwardRef((e,t)=>{const{value:n,onValueChange:r,...s}=e,o=yn(r);return m.jsx(rz,{scope:e.__scopeMenu,value:n,onValueChange:o,children:m.jsx(hv,{...s,ref:t})})});p2.displayName=m2;var g2="MenuRadioItem",y2=w.forwardRef((e,t)=>{const{value:n,...r}=e,s=iz(g2,e.__scopeMenu),o=n===s.value;return m.jsx(x2,{scope:e.__scopeMenu,checked:o,children:m.jsx(sh,{role:"menuitemradio","aria-checked":o,...r,ref:t,"data-state":pv(o),onSelect:Ce(r.onSelect,()=>{var l;return(l=s.onValueChange)==null?void 0:l.call(s,n)},{checkForDefaultPrevented:!1})})})});y2.displayName=g2;var mv="MenuItemIndicator",[x2,az]=_s(mv,{checked:!1}),v2=w.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...s}=e,o=az(mv,n);return m.jsx($n,{present:r||yf(o.checked)||o.checked===!0,children:m.jsx(qe.span,{...s,ref:t,"data-state":pv(o.checked)})})});v2.displayName=mv;var sz="MenuSeparator",b2=w.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(qe.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});b2.displayName=sz;var oz="MenuArrow",w2=w.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,s=ah(n);return m.jsx(lv,{...s,...r,ref:t})});w2.displayName=oz;var lz="MenuSub",[jJ,S2]=_s(lz),bc="MenuSubTrigger",C2=w.forwardRef((e,t)=>{const n=js(bc,e.__scopeMenu),r=ou(bc,e.__scopeMenu),s=S2(bc,e.__scopeMenu),o=dv(bc,e.__scopeMenu),l=w.useRef(null),{pointerGraceTimerRef:u,onPointerGraceIntentChange:d}=o,h={__scopeMenu:e.__scopeMenu},g=w.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return w.useEffect(()=>g,[g]),w.useEffect(()=>{const p=u.current;return()=>{window.clearTimeout(p),d(null)}},[u,d]),m.jsx(cv,{asChild:!0,...h,children:m.jsx(f2,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":s.contentId,"data-state":E2(n.open),...e,ref:Kf(t,s.onTriggerChange),onClick:p=>{var x;(x=e.onClick)==null||x.call(e,p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Ce(e.onPointerMove,Bc(p=>{o.onItemEnter(p),!p.defaultPrevented&&!e.disabled&&!n.open&&!l.current&&(o.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{n.onOpenChange(!0),g()},100))})),onPointerLeave:Ce(e.onPointerLeave,Bc(p=>{var v,S;g();const x=(v=n.content)==null?void 0:v.getBoundingClientRect();if(x){const C=(S=n.content)==null?void 0:S.dataset.side,E=C==="right",T=E?-5:5,R=x[E?"left":"right"],O=x[E?"right":"left"];o.onPointerGraceIntentChange({area:[{x:p.clientX+T,y:p.clientY},{x:R,y:x.top},{x:O,y:x.top},{x:O,y:x.bottom},{x:R,y:x.bottom}],side:C}),window.clearTimeout(u.current),u.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(p),p.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:Ce(e.onKeyDown,p=>{var v;const x=o.searchRef.current!=="";e.disabled||x&&p.key===" "||HP[r.dir].includes(p.key)&&(n.onOpenChange(!0),(v=n.content)==null||v.focus(),p.preventDefault())})})})});C2.displayName=bc;var k2="MenuSubContent",T2=w.forwardRef((e,t)=>{const n=l2(kr,e.__scopeMenu),{forceMount:r=n.forceMount,...s}=e,o=js(kr,e.__scopeMenu),l=ou(kr,e.__scopeMenu),u=S2(k2,e.__scopeMenu),d=w.useRef(null),h=ot(t,d);return m.jsx(Ic.Provider,{scope:e.__scopeMenu,children:m.jsx($n,{present:r||o.open,children:m.jsx(Ic.Slot,{scope:e.__scopeMenu,children:m.jsx(fv,{id:u.contentId,"aria-labelledby":u.triggerId,...s,ref:h,align:"start",side:l.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:g=>{var p;l.isUsingKeyboardRef.current&&((p=d.current)==null||p.focus()),g.preventDefault()},onCloseAutoFocus:g=>g.preventDefault(),onFocusOutside:Ce(e.onFocusOutside,g=>{g.target!==u.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:Ce(e.onEscapeKeyDown,g=>{l.onClose(),g.preventDefault()}),onKeyDown:Ce(e.onKeyDown,g=>{var v;const p=g.currentTarget.contains(g.target),x=FP[l.dir].includes(g.key);p&&x&&(o.onOpenChange(!1),(v=u.trigger)==null||v.focus(),g.preventDefault())})})})})})});T2.displayName=k2;function E2(e){return e?"open":"closed"}function yf(e){return e==="indeterminate"}function pv(e){return yf(e)?"indeterminate":e?"checked":"unchecked"}function cz(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function uz(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function dz(e,t,n){const s=t.length>1&&Array.from(t).every(h=>h===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let l=uz(e,Math.max(o,0));s.length===1&&(l=l.filter(h=>h!==n));const d=l.find(h=>h.toLowerCase().startsWith(s.toLowerCase()));return d!==n?d:void 0}function fz(e,t){const{x:n,y:r}=e;let s=!1;for(let o=0,l=t.length-1;o<t.length;l=o++){const u=t[o],d=t[l],h=u.x,g=u.y,p=d.x,x=d.y;g>r!=x>r&&n<(p-h)*(r-g)/(x-g)+h&&(s=!s)}return s}function hz(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return fz(n,t)}function Bc(e){return t=>t.pointerType==="mouse"?e(t):void 0}var mz=o2,pz=cv,gz=c2,yz=u2,xz=hv,vz=d2,bz=sh,wz=h2,Sz=p2,Cz=y2,kz=v2,Tz=b2,Ez=w2,_z=C2,jz=T2,oh="DropdownMenu",[Nz,NJ]=Bi(oh,[a2]),Dn=a2(),[Az,_2]=Nz(oh),j2=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:s,defaultOpen:o,onOpenChange:l,modal:u=!0}=e,d=Dn(t),h=w.useRef(null),[g,p]=Bo({prop:s,defaultProp:o??!1,onChange:l,caller:oh});return m.jsx(Az,{scope:t,triggerId:Jr(),triggerRef:h,contentId:Jr(),open:g,onOpenChange:p,onOpenToggle:w.useCallback(()=>p(x=>!x),[p]),modal:u,children:m.jsx(mz,{...d,open:g,onOpenChange:p,dir:r,modal:u,children:n})})};j2.displayName=oh;var N2="DropdownMenuTrigger",A2=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...s}=e,o=_2(N2,n),l=Dn(n);return m.jsx(pz,{asChild:!0,...l,children:m.jsx(qe.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...s,ref:Kf(t,o.triggerRef),onPointerDown:Ce(e.onPointerDown,u=>{!r&&u.button===0&&u.ctrlKey===!1&&(o.onOpenToggle(),o.open||u.preventDefault())}),onKeyDown:Ce(e.onKeyDown,u=>{r||(["Enter"," "].includes(u.key)&&o.onOpenToggle(),u.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(u.key)&&u.preventDefault())})})})});A2.displayName=N2;var Rz="DropdownMenuPortal",R2=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Dn(t);return m.jsx(gz,{...r,...n})};R2.displayName=Rz;var M2="DropdownMenuContent",O2=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=_2(M2,n),o=Dn(n),l=w.useRef(!1);return m.jsx(yz,{id:s.contentId,"aria-labelledby":s.triggerId,...o,...r,ref:t,onCloseAutoFocus:Ce(e.onCloseAutoFocus,u=>{var d;l.current||(d=s.triggerRef.current)==null||d.focus(),l.current=!1,u.preventDefault()}),onInteractOutside:Ce(e.onInteractOutside,u=>{const d=u.detail.originalEvent,h=d.button===0&&d.ctrlKey===!0,g=d.button===2||h;(!s.modal||g)&&(l.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)"}})});O2.displayName=M2;var Mz="DropdownMenuGroup",Oz=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Dn(n);return m.jsx(xz,{...s,...r,ref:t})});Oz.displayName=Mz;var Dz="DropdownMenuLabel",Pz=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Dn(n);return m.jsx(vz,{...s,...r,ref:t})});Pz.displayName=Dz;var zz="DropdownMenuItem",D2=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Dn(n);return m.jsx(bz,{...s,...r,ref:t})});D2.displayName=zz;var Lz="DropdownMenuCheckboxItem",Iz=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Dn(n);return m.jsx(wz,{...s,...r,ref:t})});Iz.displayName=Lz;var Bz="DropdownMenuRadioGroup",Vz=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Dn(n);return m.jsx(Sz,{...s,...r,ref:t})});Vz.displayName=Bz;var Uz="DropdownMenuRadioItem",Hz=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Dn(n);return m.jsx(Cz,{...s,...r,ref:t})});Hz.displayName=Uz;var Fz="DropdownMenuItemIndicator",$z=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Dn(n);return m.jsx(kz,{...s,...r,ref:t})});$z.displayName=Fz;var qz="DropdownMenuSeparator",Gz=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Dn(n);return m.jsx(Tz,{...s,...r,ref:t})});Gz.displayName=qz;var Yz="DropdownMenuArrow",Zz=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Dn(n);return m.jsx(Ez,{...s,...r,ref:t})});Zz.displayName=Yz;var Xz="DropdownMenuSubTrigger",Kz=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Dn(n);return m.jsx(_z,{...s,...r,ref:t})});Kz.displayName=Xz;var Wz="DropdownMenuSubContent",Qz=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Dn(n);return m.jsx(jz,{...s,...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)"}})});Qz.displayName=Wz;var Jz=j2,eL=A2,tL=R2,nL=O2,rL=D2,iL="Label",P2=w.forwardRef((e,t)=>m.jsx(qe.label,{...e,ref:t,onMouseDown:n=>{var s;n.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));P2.displayName=iL;var aL=P2;function gy(e,[t,n]){return Math.min(n,Math.max(t,e))}function sL(e,t){return w.useReducer((n,r)=>t[n][r]??n,e)}var gv="ScrollArea",[z2,AJ]=Bi(gv),[oL,Er]=z2(gv),L2=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:s,scrollHideDelay:o=600,...l}=e,[u,d]=w.useState(null),[h,g]=w.useState(null),[p,x]=w.useState(null),[v,S]=w.useState(null),[C,E]=w.useState(null),[T,R]=w.useState(0),[O,A]=w.useState(0),[M,N]=w.useState(!1),[z,P]=w.useState(!1),B=ot(t,H=>d(H)),D=Wf(s);return m.jsx(oL,{scope:n,type:r,dir:D,scrollHideDelay:o,scrollArea:u,viewport:h,onViewportChange:g,content:p,onContentChange:x,scrollbarX:v,onScrollbarXChange:S,scrollbarXEnabled:M,onScrollbarXEnabledChange:N,scrollbarY:C,onScrollbarYChange:E,scrollbarYEnabled:z,onScrollbarYEnabledChange:P,onCornerWidthChange:R,onCornerHeightChange:A,children:m.jsx(qe.div,{dir:D,...l,ref:B,style:{position:"relative","--radix-scroll-area-corner-width":T+"px","--radix-scroll-area-corner-height":O+"px",...e.style}})})});L2.displayName=gv;var I2="ScrollAreaViewport",B2=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:s,...o}=e,l=Er(I2,n),u=w.useRef(null),d=ot(t,u,l.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:s}),m.jsx(qe.div,{"data-radix-scroll-area-viewport":"",...o,ref:d,style:{overflowX:l.scrollbarXEnabled?"scroll":"hidden",overflowY:l.scrollbarYEnabled?"scroll":"hidden",...e.style},children:m.jsx("div",{ref:l.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});B2.displayName=I2;var li="ScrollAreaScrollbar",V2=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=Er(li,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:l}=s,u=e.orientation==="horizontal";return w.useEffect(()=>(u?o(!0):l(!0),()=>{u?o(!1):l(!1)}),[u,o,l]),s.type==="hover"?m.jsx(lL,{...r,ref:t,forceMount:n}):s.type==="scroll"?m.jsx(cL,{...r,ref:t,forceMount:n}):s.type==="auto"?m.jsx(U2,{...r,ref:t,forceMount:n}):s.type==="always"?m.jsx(yv,{...r,ref:t}):null});V2.displayName=li;var lL=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=Er(li,e.__scopeScrollArea),[o,l]=w.useState(!1);return w.useEffect(()=>{const u=s.scrollArea;let d=0;if(u){const h=()=>{window.clearTimeout(d),l(!0)},g=()=>{d=window.setTimeout(()=>l(!1),s.scrollHideDelay)};return u.addEventListener("pointerenter",h),u.addEventListener("pointerleave",g),()=>{window.clearTimeout(d),u.removeEventListener("pointerenter",h),u.removeEventListener("pointerleave",g)}}},[s.scrollArea,s.scrollHideDelay]),m.jsx($n,{present:n||o,children:m.jsx(U2,{"data-state":o?"visible":"hidden",...r,ref:t})})}),cL=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=Er(li,e.__scopeScrollArea),o=e.orientation==="horizontal",l=ch(()=>d("SCROLL_END"),100),[u,d]=sL("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 w.useEffect(()=>{if(u==="idle"){const h=window.setTimeout(()=>d("HIDE"),s.scrollHideDelay);return()=>window.clearTimeout(h)}},[u,s.scrollHideDelay,d]),w.useEffect(()=>{const h=s.viewport,g=o?"scrollLeft":"scrollTop";if(h){let p=h[g];const x=()=>{const v=h[g];p!==v&&(d("SCROLL"),l()),p=v};return h.addEventListener("scroll",x),()=>h.removeEventListener("scroll",x)}},[s.viewport,o,d,l]),m.jsx($n,{present:n||u!=="hidden",children:m.jsx(yv,{"data-state":u==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:Ce(e.onPointerEnter,()=>d("POINTER_ENTER")),onPointerLeave:Ce(e.onPointerLeave,()=>d("POINTER_LEAVE"))})})}),U2=w.forwardRef((e,t)=>{const n=Er(li,e.__scopeScrollArea),{forceMount:r,...s}=e,[o,l]=w.useState(!1),u=e.orientation==="horizontal",d=ch(()=>{if(n.viewport){const h=n.viewport.offsetWidth<n.viewport.scrollWidth,g=n.viewport.offsetHeight<n.viewport.scrollHeight;l(u?h:g)}},10);return Uo(n.viewport,d),Uo(n.content,d),m.jsx($n,{present:r||o,children:m.jsx(yv,{"data-state":o?"visible":"hidden",...s,ref:t})})}),yv=w.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,s=Er(li,e.__scopeScrollArea),o=w.useRef(null),l=w.useRef(0),[u,d]=w.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),h=G2(u.viewport,u.content),g={...r,sizes:u,onSizesChange:d,hasThumb:h>0&&h<1,onThumbChange:x=>o.current=x,onThumbPointerUp:()=>l.current=0,onThumbPointerDown:x=>l.current=x};function p(x,v){return pL(x,l.current,u,v)}return n==="horizontal"?m.jsx(uL,{...g,ref:t,onThumbPositionChange:()=>{if(s.viewport&&o.current){const x=s.viewport.scrollLeft,v=yC(x,u,s.dir);o.current.style.transform=`translate3d(${v}px, 0, 0)`}},onWheelScroll:x=>{s.viewport&&(s.viewport.scrollLeft=x)},onDragScroll:x=>{s.viewport&&(s.viewport.scrollLeft=p(x,s.dir))}}):n==="vertical"?m.jsx(dL,{...g,ref:t,onThumbPositionChange:()=>{if(s.viewport&&o.current){const x=s.viewport.scrollTop,v=yC(x,u);o.current.style.transform=`translate3d(0, ${v}px, 0)`}},onWheelScroll:x=>{s.viewport&&(s.viewport.scrollTop=x)},onDragScroll:x=>{s.viewport&&(s.viewport.scrollTop=p(x))}}):null}),uL=w.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...s}=e,o=Er(li,e.__scopeScrollArea),[l,u]=w.useState(),d=w.useRef(null),h=ot(t,d,o.onScrollbarXChange);return w.useEffect(()=>{d.current&&u(getComputedStyle(d.current))},[d]),m.jsx(F2,{"data-orientation":"horizontal",...s,ref:h,sizes:n,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":lh(n)+"px",...e.style},onThumbPointerDown:g=>e.onThumbPointerDown(g.x),onDragScroll:g=>e.onDragScroll(g.x),onWheelScroll:(g,p)=>{if(o.viewport){const x=o.viewport.scrollLeft+g.deltaX;e.onWheelScroll(x),Z2(x,p)&&g.preventDefault()}},onResize:()=>{d.current&&o.viewport&&l&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:d.current.clientWidth,paddingStart:vf(l.paddingLeft),paddingEnd:vf(l.paddingRight)}})}})}),dL=w.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...s}=e,o=Er(li,e.__scopeScrollArea),[l,u]=w.useState(),d=w.useRef(null),h=ot(t,d,o.onScrollbarYChange);return w.useEffect(()=>{d.current&&u(getComputedStyle(d.current))},[d]),m.jsx(F2,{"data-orientation":"vertical",...s,ref:h,sizes:n,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":lh(n)+"px",...e.style},onThumbPointerDown:g=>e.onThumbPointerDown(g.y),onDragScroll:g=>e.onDragScroll(g.y),onWheelScroll:(g,p)=>{if(o.viewport){const x=o.viewport.scrollTop+g.deltaY;e.onWheelScroll(x),Z2(x,p)&&g.preventDefault()}},onResize:()=>{d.current&&o.viewport&&l&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:d.current.clientHeight,paddingStart:vf(l.paddingTop),paddingEnd:vf(l.paddingBottom)}})}})}),[fL,H2]=z2(li),F2=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:s,onThumbChange:o,onThumbPointerUp:l,onThumbPointerDown:u,onThumbPositionChange:d,onDragScroll:h,onWheelScroll:g,onResize:p,...x}=e,v=Er(li,n),[S,C]=w.useState(null),E=ot(t,B=>C(B)),T=w.useRef(null),R=w.useRef(""),O=v.viewport,A=r.content-r.viewport,M=yn(g),N=yn(d),z=ch(p,10);function P(B){if(T.current){const D=B.clientX-T.current.left,H=B.clientY-T.current.top;h({x:D,y:H})}}return w.useEffect(()=>{const B=D=>{const H=D.target;(S==null?void 0:S.contains(H))&&M(D,A)};return document.addEventListener("wheel",B,{passive:!1}),()=>document.removeEventListener("wheel",B,{passive:!1})},[O,S,A,M]),w.useEffect(N,[r,N]),Uo(S,z),Uo(v.content,z),m.jsx(fL,{scope:n,scrollbar:S,hasThumb:s,onThumbChange:yn(o),onThumbPointerUp:yn(l),onThumbPositionChange:N,onThumbPointerDown:yn(u),children:m.jsx(qe.div,{...x,ref:E,style:{position:"absolute",...x.style},onPointerDown:Ce(e.onPointerDown,B=>{B.button===0&&(B.target.setPointerCapture(B.pointerId),T.current=S.getBoundingClientRect(),R.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",v.viewport&&(v.viewport.style.scrollBehavior="auto"),P(B))}),onPointerMove:Ce(e.onPointerMove,P),onPointerUp:Ce(e.onPointerUp,B=>{const D=B.target;D.hasPointerCapture(B.pointerId)&&D.releasePointerCapture(B.pointerId),document.body.style.webkitUserSelect=R.current,v.viewport&&(v.viewport.style.scrollBehavior=""),T.current=null})})})}),xf="ScrollAreaThumb",$2=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=H2(xf,e.__scopeScrollArea);return m.jsx($n,{present:n||s.hasThumb,children:m.jsx(hL,{ref:t,...r})})}),hL=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...s}=e,o=Er(xf,n),l=H2(xf,n),{onThumbPositionChange:u}=l,d=ot(t,p=>l.onThumbChange(p)),h=w.useRef(void 0),g=ch(()=>{h.current&&(h.current(),h.current=void 0)},100);return w.useEffect(()=>{const p=o.viewport;if(p){const x=()=>{if(g(),!h.current){const v=gL(p,u);h.current=v,u()}};return u(),p.addEventListener("scroll",x),()=>p.removeEventListener("scroll",x)}},[o.viewport,g,u]),m.jsx(qe.div,{"data-state":l.hasThumb?"visible":"hidden",...s,ref:d,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:Ce(e.onPointerDownCapture,p=>{const v=p.target.getBoundingClientRect(),S=p.clientX-v.left,C=p.clientY-v.top;l.onThumbPointerDown({x:S,y:C})}),onPointerUp:Ce(e.onPointerUp,l.onThumbPointerUp)})});$2.displayName=xf;var xv="ScrollAreaCorner",q2=w.forwardRef((e,t)=>{const n=Er(xv,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?m.jsx(mL,{...e,ref:t}):null});q2.displayName=xv;var mL=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,s=Er(xv,n),[o,l]=w.useState(0),[u,d]=w.useState(0),h=!!(o&&u);return Uo(s.scrollbarX,()=>{var p;const g=((p=s.scrollbarX)==null?void 0:p.offsetHeight)||0;s.onCornerHeightChange(g),d(g)}),Uo(s.scrollbarY,()=>{var p;const g=((p=s.scrollbarY)==null?void 0:p.offsetWidth)||0;s.onCornerWidthChange(g),l(g)}),h?m.jsx(qe.div,{...r,ref:t,style:{width:o,height:u,position:"absolute",right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function vf(e){return e?parseInt(e,10):0}function G2(e,t){const n=e/t;return isNaN(n)?0:n}function lh(e){const t=G2(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function pL(e,t,n,r="ltr"){const s=lh(n),o=s/2,l=t||o,u=s-l,d=n.scrollbar.paddingStart+l,h=n.scrollbar.size-n.scrollbar.paddingEnd-u,g=n.content-n.viewport,p=r==="ltr"?[0,g]:[g*-1,0];return Y2([d,h],p)(e)}function yC(e,t,n="ltr"){const r=lh(t),s=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-s,l=t.content-t.viewport,u=o-r,d=n==="ltr"?[0,l]:[l*-1,0],h=gy(e,d);return Y2([0,l],[0,u])(h)}function Y2(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 Z2(e,t){return e>0&&e<t}var gL=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function s(){const o={left:e.scrollLeft,top:e.scrollTop},l=n.left!==o.left,u=n.top!==o.top;(l||u)&&t(),n=o,r=window.requestAnimationFrame(s)}(),()=>window.cancelAnimationFrame(r)};function ch(e,t){const n=yn(e),r=w.useRef(0);return w.useEffect(()=>()=>window.clearTimeout(r.current),[]),w.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function Uo(e,t){const n=yn(t);xn(()=>{let r=0;if(e){const s=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return s.observe(e),()=>{window.cancelAnimationFrame(r),s.unobserve(e)}}},[e,n])}var yL=L2,xL=B2,vL=q2,bL=[" ","Enter","ArrowUp","ArrowDown"],wL=[" ","Enter"],xs="Select",[uh,dh,SL]=$x(xs),[il,RJ]=Bi(xs,[SL,rl]),fh=rl(),[CL,Ra]=il(xs),[kL,TL]=il(xs),X2=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:s,onOpenChange:o,value:l,defaultValue:u,onValueChange:d,dir:h,name:g,autoComplete:p,disabled:x,required:v,form:S}=e,C=fh(t),[E,T]=w.useState(null),[R,O]=w.useState(null),[A,M]=w.useState(!1),N=Wf(h),[z,P]=Bo({prop:r,defaultProp:s??!1,onChange:o,caller:xs}),[B,D]=Bo({prop:l,defaultProp:u,onChange:d,caller:xs}),H=w.useRef(null),$=E?S||!!E.closest("form"):!0,[X,Y]=w.useState(new Set),te=Array.from(X).map(I=>I.props.value).join(";");return m.jsx(av,{...C,children:m.jsxs(CL,{required:v,scope:t,trigger:E,onTriggerChange:T,valueNode:R,onValueNodeChange:O,valueNodeHasChildren:A,onValueNodeHasChildrenChange:M,contentId:Jr(),value:B,onValueChange:D,open:z,onOpenChange:P,dir:N,triggerPointerDownPosRef:H,disabled:x,children:[m.jsx(uh.Provider,{scope:t,children:m.jsx(kL,{scope:e.__scopeSelect,onNativeOptionAdd:w.useCallback(I=>{Y(F=>new Set(F).add(I))},[]),onNativeOptionRemove:w.useCallback(I=>{Y(F=>{const V=new Set(F);return V.delete(I),V})},[]),children:n})}),$?m.jsxs(yj,{"aria-hidden":!0,required:v,tabIndex:-1,name:g,autoComplete:p,value:B,onChange:I=>D(I.target.value),disabled:x,form:S,children:[B===void 0?m.jsx("option",{value:""}):null,Array.from(X)]},te):null]})})};X2.displayName=xs;var K2="SelectTrigger",W2=w.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...s}=e,o=fh(n),l=Ra(K2,n),u=l.disabled||r,d=ot(t,l.onTriggerChange),h=dh(n),g=w.useRef("touch"),[p,x,v]=vj(C=>{const E=h().filter(O=>!O.disabled),T=E.find(O=>O.value===l.value),R=bj(E,C,T);R!==void 0&&l.onValueChange(R.value)}),S=C=>{u||(l.onOpenChange(!0),v()),C&&(l.triggerPointerDownPosRef.current={x:Math.round(C.pageX),y:Math.round(C.pageY)})};return m.jsx(sv,{asChild:!0,...o,children:m.jsx(qe.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:u,"data-disabled":u?"":void 0,"data-placeholder":xj(l.value)?"":void 0,...s,ref:d,onClick:Ce(s.onClick,C=>{C.currentTarget.focus(),g.current!=="mouse"&&S(C)}),onPointerDown:Ce(s.onPointerDown,C=>{g.current=C.pointerType;const E=C.target;E.hasPointerCapture(C.pointerId)&&E.releasePointerCapture(C.pointerId),C.button===0&&C.ctrlKey===!1&&C.pointerType==="mouse"&&(S(C),C.preventDefault())}),onKeyDown:Ce(s.onKeyDown,C=>{const E=p.current!=="";!(C.ctrlKey||C.altKey||C.metaKey)&&C.key.length===1&&x(C.key),!(E&&C.key===" ")&&bL.includes(C.key)&&(S(),C.preventDefault())})})})});W2.displayName=K2;var Q2="SelectValue",J2=w.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,children:o,placeholder:l="",...u}=e,d=Ra(Q2,n),{onValueNodeHasChildrenChange:h}=d,g=o!==void 0,p=ot(t,d.onValueNodeChange);return xn(()=>{h(g)},[h,g]),m.jsx(qe.span,{...u,ref:p,style:{pointerEvents:"none"},children:xj(d.value)?m.jsx(m.Fragment,{children:l}):o})});J2.displayName=Q2;var EL="SelectIcon",ej=w.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...s}=e;return m.jsx(qe.span,{"aria-hidden":!0,...s,ref:t,children:r||"▼"})});ej.displayName=EL;var _L="SelectPortal",tj=e=>m.jsx(ru,{asChild:!0,...e});tj.displayName=_L;var vs="SelectContent",nj=w.forwardRef((e,t)=>{const n=Ra(vs,e.__scopeSelect),[r,s]=w.useState();if(xn(()=>{s(new DocumentFragment)},[]),!n.open){const o=r;return o?tu.createPortal(m.jsx(rj,{scope:e.__scopeSelect,children:m.jsx(uh.Slot,{scope:e.__scopeSelect,children:m.jsx("div",{children:e.children})})}),o):null}return m.jsx(ij,{...e,ref:t})});nj.displayName=vs;var Dr=10,[rj,Ma]=il(vs),jL="SelectContentImpl",NL=ps("SelectContent.RemoveScroll"),ij=w.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:o,onPointerDownOutside:l,side:u,sideOffset:d,align:h,alignOffset:g,arrowPadding:p,collisionBoundary:x,collisionPadding:v,sticky:S,hideWhenDetached:C,avoidCollisions:E,...T}=e,R=Ra(vs,n),[O,A]=w.useState(null),[M,N]=w.useState(null),z=ot(t,K=>A(K)),[P,B]=w.useState(null),[D,H]=w.useState(null),$=dh(n),[X,Y]=w.useState(!1),te=w.useRef(!1);w.useEffect(()=>{if(O)return Gx(O)},[O]),qx();const I=w.useCallback(K=>{const[oe,...ce]=$().map(Te=>Te.ref.current),[me]=ce.slice(-1),be=document.activeElement;for(const Te of K)if(Te===be||(Te==null||Te.scrollIntoView({block:"nearest"}),Te===oe&&M&&(M.scrollTop=0),Te===me&&M&&(M.scrollTop=M.scrollHeight),Te==null||Te.focus(),document.activeElement!==be))return},[$,M]),F=w.useCallback(()=>I([P,O]),[I,P,O]);w.useEffect(()=>{X&&F()},[X,F]);const{onOpenChange:V,triggerPointerDownPosRef:Z}=R;w.useEffect(()=>{if(O){let K={x:0,y:0};const oe=me=>{var be,Te;K={x:Math.abs(Math.round(me.pageX)-(((be=Z.current)==null?void 0:be.x)??0)),y:Math.abs(Math.round(me.pageY)-(((Te=Z.current)==null?void 0:Te.y)??0))}},ce=me=>{K.x<=10&&K.y<=10?me.preventDefault():O.contains(me.target)||V(!1),document.removeEventListener("pointermove",oe),Z.current=null};return Z.current!==null&&(document.addEventListener("pointermove",oe),document.addEventListener("pointerup",ce,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",oe),document.removeEventListener("pointerup",ce,{capture:!0})}}},[O,V,Z]),w.useEffect(()=>{const K=()=>V(!1);return window.addEventListener("blur",K),window.addEventListener("resize",K),()=>{window.removeEventListener("blur",K),window.removeEventListener("resize",K)}},[V]);const[k,G]=vj(K=>{const oe=$().filter(be=>!be.disabled),ce=oe.find(be=>be.ref.current===document.activeElement),me=bj(oe,K,ce);me&&setTimeout(()=>me.ref.current.focus())}),le=w.useCallback((K,oe,ce)=>{const me=!te.current&&!ce;(R.value!==void 0&&R.value===oe||me)&&(B(K),me&&(te.current=!0))},[R.value]),j=w.useCallback(()=>O==null?void 0:O.focus(),[O]),Q=w.useCallback((K,oe,ce)=>{const me=!te.current&&!ce;(R.value!==void 0&&R.value===oe||me)&&H(K)},[R.value]),ee=r==="popper"?yy:aj,W=ee===yy?{side:u,sideOffset:d,align:h,alignOffset:g,arrowPadding:p,collisionBoundary:x,collisionPadding:v,sticky:S,hideWhenDetached:C,avoidCollisions:E}:{};return m.jsx(rj,{scope:n,content:O,viewport:M,onViewportChange:N,itemRefCallback:le,selectedItem:P,onItemLeave:j,itemTextRefCallback:Q,focusSelectedItem:F,selectedItemText:D,position:r,isPositioned:X,searchRef:k,children:m.jsx(eh,{as:NL,allowPinchZoom:!0,children:m.jsx(Qf,{asChild:!0,trapped:R.open,onMountAutoFocus:K=>{K.preventDefault()},onUnmountAutoFocus:Ce(s,K=>{var oe;(oe=R.trigger)==null||oe.focus({preventScroll:!0}),K.preventDefault()}),children:m.jsx(nu,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:K=>K.preventDefault(),onDismiss:()=>R.onOpenChange(!1),children:m.jsx(ee,{role:"listbox",id:R.contentId,"data-state":R.open?"open":"closed",dir:R.dir,onContextMenu:K=>K.preventDefault(),...T,...W,onPlaced:()=>Y(!0),ref:z,style:{display:"flex",flexDirection:"column",outline:"none",...T.style},onKeyDown:Ce(T.onKeyDown,K=>{const oe=K.ctrlKey||K.altKey||K.metaKey;if(K.key==="Tab"&&K.preventDefault(),!oe&&K.key.length===1&&G(K.key),["ArrowUp","ArrowDown","Home","End"].includes(K.key)){let me=$().filter(be=>!be.disabled).map(be=>be.ref.current);if(["ArrowUp","End"].includes(K.key)&&(me=me.slice().reverse()),["ArrowUp","ArrowDown"].includes(K.key)){const be=K.target,Te=me.indexOf(be);me=me.slice(Te+1)}setTimeout(()=>I(me)),K.preventDefault()}})})})})})})});ij.displayName=jL;var AL="SelectItemAlignedPosition",aj=w.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...s}=e,o=Ra(vs,n),l=Ma(vs,n),[u,d]=w.useState(null),[h,g]=w.useState(null),p=ot(t,z=>g(z)),x=dh(n),v=w.useRef(!1),S=w.useRef(!0),{viewport:C,selectedItem:E,selectedItemText:T,focusSelectedItem:R}=l,O=w.useCallback(()=>{if(o.trigger&&o.valueNode&&u&&h&&C&&E&&T){const z=o.trigger.getBoundingClientRect(),P=h.getBoundingClientRect(),B=o.valueNode.getBoundingClientRect(),D=T.getBoundingClientRect();if(o.dir!=="rtl"){const be=D.left-P.left,Te=B.left-be,Ve=z.left-Te,lt=z.width+Ve,Mt=Math.max(lt,P.width),It=window.innerWidth-Dr,st=gy(Te,[Dr,Math.max(Dr,It-Mt)]);u.style.minWidth=lt+"px",u.style.left=st+"px"}else{const be=P.right-D.right,Te=window.innerWidth-B.right-be,Ve=window.innerWidth-z.right-Te,lt=z.width+Ve,Mt=Math.max(lt,P.width),It=window.innerWidth-Dr,st=gy(Te,[Dr,Math.max(Dr,It-Mt)]);u.style.minWidth=lt+"px",u.style.right=st+"px"}const H=x(),$=window.innerHeight-Dr*2,X=C.scrollHeight,Y=window.getComputedStyle(h),te=parseInt(Y.borderTopWidth,10),I=parseInt(Y.paddingTop,10),F=parseInt(Y.borderBottomWidth,10),V=parseInt(Y.paddingBottom,10),Z=te+I+X+V+F,k=Math.min(E.offsetHeight*5,Z),G=window.getComputedStyle(C),le=parseInt(G.paddingTop,10),j=parseInt(G.paddingBottom,10),Q=z.top+z.height/2-Dr,ee=$-Q,W=E.offsetHeight/2,K=E.offsetTop+W,oe=te+I+K,ce=Z-oe;if(oe<=Q){const be=H.length>0&&E===H[H.length-1].ref.current;u.style.bottom="0px";const Te=h.clientHeight-C.offsetTop-C.offsetHeight,Ve=Math.max(ee,W+(be?j:0)+Te+F),lt=oe+Ve;u.style.height=lt+"px"}else{const be=H.length>0&&E===H[0].ref.current;u.style.top="0px";const Ve=Math.max(Q,te+C.offsetTop+(be?le:0)+W)+ce;u.style.height=Ve+"px",C.scrollTop=oe-Q+C.offsetTop}u.style.margin=`${Dr}px 0`,u.style.minHeight=k+"px",u.style.maxHeight=$+"px",r==null||r(),requestAnimationFrame(()=>v.current=!0)}},[x,o.trigger,o.valueNode,u,h,C,E,T,o.dir,r]);xn(()=>O(),[O]);const[A,M]=w.useState();xn(()=>{h&&M(window.getComputedStyle(h).zIndex)},[h]);const N=w.useCallback(z=>{z&&S.current===!0&&(O(),R==null||R(),S.current=!1)},[O,R]);return m.jsx(ML,{scope:n,contentWrapper:u,shouldExpandOnScrollRef:v,onScrollButtonChange:N,children:m.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:A},children:m.jsx(qe.div,{...s,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});aj.displayName=AL;var RL="SelectPopperPosition",yy=w.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:s=Dr,...o}=e,l=fh(n);return m.jsx(ov,{...l,...o,ref:t,align:r,collisionPadding:s,style:{boxSizing:"border-box",...o.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)"}})});yy.displayName=RL;var[ML,vv]=il(vs,{}),xy="SelectViewport",sj=w.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...s}=e,o=Ma(xy,n),l=vv(xy,n),u=ot(t,o.onViewportChange),d=w.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(uh.Slot,{scope:n,children:m.jsx(qe.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:Ce(s.onScroll,h=>{const g=h.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:x}=l;if(x!=null&&x.current&&p){const v=Math.abs(d.current-g.scrollTop);if(v>0){const S=window.innerHeight-Dr*2,C=parseFloat(p.style.minHeight),E=parseFloat(p.style.height),T=Math.max(C,E);if(T<S){const R=T+v,O=Math.min(S,R),A=R-O;p.style.height=O+"px",p.style.bottom==="0px"&&(g.scrollTop=A>0?A:0,p.style.justifyContent="flex-end")}}}d.current=g.scrollTop})})})]})});sj.displayName=xy;var oj="SelectGroup",[OL,DL]=il(oj),PL=w.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=Jr();return m.jsx(OL,{scope:n,id:s,children:m.jsx(qe.div,{role:"group","aria-labelledby":s,...r,ref:t})})});PL.displayName=oj;var lj="SelectLabel",zL=w.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=DL(lj,n);return m.jsx(qe.div,{id:s.id,...r,ref:t})});zL.displayName=lj;var bf="SelectItem",[LL,cj]=il(bf),uj=w.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:s=!1,textValue:o,...l}=e,u=Ra(bf,n),d=Ma(bf,n),h=u.value===r,[g,p]=w.useState(o??""),[x,v]=w.useState(!1),S=ot(t,R=>{var O;return(O=d.itemRefCallback)==null?void 0:O.call(d,R,r,s)}),C=Jr(),E=w.useRef("touch"),T=()=>{s||(u.onValueChange(r),u.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(LL,{scope:n,value:r,disabled:s,textId:C,isSelected:h,onItemTextChange:w.useCallback(R=>{p(O=>O||((R==null?void 0:R.textContent)??"").trim())},[]),children:m.jsx(uh.ItemSlot,{scope:n,value:r,disabled:s,textValue:g,children:m.jsx(qe.div,{role:"option","aria-labelledby":C,"data-highlighted":x?"":void 0,"aria-selected":h&&x,"data-state":h?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...l,ref:S,onFocus:Ce(l.onFocus,()=>v(!0)),onBlur:Ce(l.onBlur,()=>v(!1)),onClick:Ce(l.onClick,()=>{E.current!=="mouse"&&T()}),onPointerUp:Ce(l.onPointerUp,()=>{E.current==="mouse"&&T()}),onPointerDown:Ce(l.onPointerDown,R=>{E.current=R.pointerType}),onPointerMove:Ce(l.onPointerMove,R=>{var O;E.current=R.pointerType,s?(O=d.onItemLeave)==null||O.call(d):E.current==="mouse"&&R.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ce(l.onPointerLeave,R=>{var O;R.currentTarget===document.activeElement&&((O=d.onItemLeave)==null||O.call(d))}),onKeyDown:Ce(l.onKeyDown,R=>{var A;((A=d.searchRef)==null?void 0:A.current)!==""&&R.key===" "||(wL.includes(R.key)&&T(),R.key===" "&&R.preventDefault())})})})})});uj.displayName=bf;var wc="SelectItemText",dj=w.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,...o}=e,l=Ra(wc,n),u=Ma(wc,n),d=cj(wc,n),h=TL(wc,n),[g,p]=w.useState(null),x=ot(t,T=>p(T),d.onItemTextChange,T=>{var R;return(R=u.itemTextRefCallback)==null?void 0:R.call(u,T,d.value,d.disabled)}),v=g==null?void 0:g.textContent,S=w.useMemo(()=>m.jsx("option",{value:d.value,disabled:d.disabled,children:v},d.value),[d.disabled,d.value,v]),{onNativeOptionAdd:C,onNativeOptionRemove:E}=h;return xn(()=>(C(S),()=>E(S)),[C,E,S]),m.jsxs(m.Fragment,{children:[m.jsx(qe.span,{id:d.textId,...o,ref:x}),d.isSelected&&l.valueNode&&!l.valueNodeHasChildren?tu.createPortal(o.children,l.valueNode):null]})});dj.displayName=wc;var fj="SelectItemIndicator",hj=w.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return cj(fj,n).isSelected?m.jsx(qe.span,{"aria-hidden":!0,...r,ref:t}):null});hj.displayName=fj;var vy="SelectScrollUpButton",mj=w.forwardRef((e,t)=>{const n=Ma(vy,e.__scopeSelect),r=vv(vy,e.__scopeSelect),[s,o]=w.useState(!1),l=ot(t,r.onScrollButtonChange);return xn(()=>{if(n.viewport&&n.isPositioned){let u=function(){const h=d.scrollTop>0;o(h)};const d=n.viewport;return u(),d.addEventListener("scroll",u),()=>d.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),s?m.jsx(gj,{...e,ref:l,onAutoScroll:()=>{const{viewport:u,selectedItem:d}=n;u&&d&&(u.scrollTop=u.scrollTop-d.offsetHeight)}}):null});mj.displayName=vy;var by="SelectScrollDownButton",pj=w.forwardRef((e,t)=>{const n=Ma(by,e.__scopeSelect),r=vv(by,e.__scopeSelect),[s,o]=w.useState(!1),l=ot(t,r.onScrollButtonChange);return xn(()=>{if(n.viewport&&n.isPositioned){let u=function(){const h=d.scrollHeight-d.clientHeight,g=Math.ceil(d.scrollTop)<h;o(g)};const d=n.viewport;return u(),d.addEventListener("scroll",u),()=>d.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),s?m.jsx(gj,{...e,ref:l,onAutoScroll:()=>{const{viewport:u,selectedItem:d}=n;u&&d&&(u.scrollTop=u.scrollTop+d.offsetHeight)}}):null});pj.displayName=by;var gj=w.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...s}=e,o=Ma("SelectScrollButton",n),l=w.useRef(null),u=dh(n),d=w.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return w.useEffect(()=>()=>d(),[d]),xn(()=>{var g;const h=u().find(p=>p.ref.current===document.activeElement);(g=h==null?void 0:h.ref.current)==null||g.scrollIntoView({block:"nearest"})},[u]),m.jsx(qe.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:Ce(s.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(r,50))}),onPointerMove:Ce(s.onPointerMove,()=>{var h;(h=o.onItemLeave)==null||h.call(o),l.current===null&&(l.current=window.setInterval(r,50))}),onPointerLeave:Ce(s.onPointerLeave,()=>{d()})})}),IL="SelectSeparator",BL=w.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return m.jsx(qe.div,{"aria-hidden":!0,...r,ref:t})});BL.displayName=IL;var wy="SelectArrow",VL=w.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=fh(n),o=Ra(wy,n),l=Ma(wy,n);return o.open&&l.position==="popper"?m.jsx(lv,{...s,...r,ref:t}):null});VL.displayName=wy;var UL="SelectBubbleInput",yj=w.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const s=w.useRef(null),o=ot(r,s),l=l5(t);return w.useEffect(()=>{const u=s.current;if(!u)return;const d=window.HTMLSelectElement.prototype,g=Object.getOwnPropertyDescriptor(d,"value").set;if(l!==t&&g){const p=new Event("change",{bubbles:!0});g.call(u,t),u.dispatchEvent(p)}},[l,t]),m.jsx(qe.select,{...n,style:{...XE,...n.style},ref:o,defaultValue:t})});yj.displayName=UL;function xj(e){return e===""||e===void 0}function vj(e){const t=yn(e),n=w.useRef(""),r=w.useRef(0),s=w.useCallback(l=>{const u=n.current+l;t(u),function d(h){n.current=h,window.clearTimeout(r.current),h!==""&&(r.current=window.setTimeout(()=>d(""),1e3))}(u)},[t]),o=w.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return w.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,s,o]}function bj(e,t,n){const s=t.length>1&&Array.from(t).every(h=>h===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let l=HL(e,Math.max(o,0));s.length===1&&(l=l.filter(h=>h!==n));const d=l.find(h=>h.textValue.toLowerCase().startsWith(s.toLowerCase()));return d!==n?d:void 0}function HL(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var FL=X2,$L=W2,qL=J2,GL=ej,YL=tj,ZL=nj,XL=sj,KL=uj,WL=dj,QL=hj,JL=mj,eI=pj,tI="Separator",xC="horizontal",nI=["horizontal","vertical"],wj=w.forwardRef((e,t)=>{const{decorative:n,orientation:r=xC,...s}=e,o=rI(r)?r:xC,u=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return m.jsx(qe.div,{"data-orientation":o,...u,...s,ref:t})});wj.displayName=tI;function rI(e){return nI.includes(e)}var iI=wj,[hh,MJ]=Bi("Tooltip",[rl]),mh=rl(),Sj="TooltipProvider",aI=700,Sy="tooltip.open",[sI,bv]=hh(Sj),Cj=e=>{const{__scopeTooltip:t,delayDuration:n=aI,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:o}=e,l=w.useRef(!0),u=w.useRef(!1),d=w.useRef(0);return w.useEffect(()=>{const h=d.current;return()=>window.clearTimeout(h)},[]),m.jsx(sI,{scope:t,isOpenDelayedRef:l,delayDuration:n,onOpen:w.useCallback(()=>{window.clearTimeout(d.current),l.current=!1},[]),onClose:w.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>l.current=!0,r)},[r]),isPointerInTransitRef:u,onPointerInTransitChange:w.useCallback(h=>{u.current=h},[]),disableHoverableContent:s,children:o})};Cj.displayName=Sj;var Vc="Tooltip",[oI,lu]=hh(Vc),kj=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:s,onOpenChange:o,disableHoverableContent:l,delayDuration:u}=e,d=bv(Vc,e.__scopeTooltip),h=mh(t),[g,p]=w.useState(null),x=Jr(),v=w.useRef(0),S=l??d.disableHoverableContent,C=u??d.delayDuration,E=w.useRef(!1),[T,R]=Bo({prop:r,defaultProp:s??!1,onChange:z=>{z?(d.onOpen(),document.dispatchEvent(new CustomEvent(Sy))):d.onClose(),o==null||o(z)},caller:Vc}),O=w.useMemo(()=>T?E.current?"delayed-open":"instant-open":"closed",[T]),A=w.useCallback(()=>{window.clearTimeout(v.current),v.current=0,E.current=!1,R(!0)},[R]),M=w.useCallback(()=>{window.clearTimeout(v.current),v.current=0,R(!1)},[R]),N=w.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{E.current=!0,R(!0),v.current=0},C)},[C,R]);return w.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]),m.jsx(av,{...h,children:m.jsx(oI,{scope:t,contentId:x,open:T,stateAttribute:O,trigger:g,onTriggerChange:p,onTriggerEnter:w.useCallback(()=>{d.isOpenDelayedRef.current?N():A()},[d.isOpenDelayedRef,N,A]),onTriggerLeave:w.useCallback(()=>{S?M():(window.clearTimeout(v.current),v.current=0)},[M,S]),onOpen:A,onClose:M,disableHoverableContent:S,children:n})})};kj.displayName=Vc;var Cy="TooltipTrigger",Tj=w.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=lu(Cy,n),o=bv(Cy,n),l=mh(n),u=w.useRef(null),d=ot(t,u,s.onTriggerChange),h=w.useRef(!1),g=w.useRef(!1),p=w.useCallback(()=>h.current=!1,[]);return w.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),m.jsx(sv,{asChild:!0,...l,children:m.jsx(qe.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:d,onPointerMove:Ce(e.onPointerMove,x=>{x.pointerType!=="touch"&&!g.current&&!o.isPointerInTransitRef.current&&(s.onTriggerEnter(),g.current=!0)}),onPointerLeave:Ce(e.onPointerLeave,()=>{s.onTriggerLeave(),g.current=!1}),onPointerDown:Ce(e.onPointerDown,()=>{s.open&&s.onClose(),h.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:Ce(e.onFocus,()=>{h.current||s.onOpen()}),onBlur:Ce(e.onBlur,s.onClose),onClick:Ce(e.onClick,s.onClose)})})});Tj.displayName=Cy;var wv="TooltipPortal",[lI,cI]=hh(wv,{forceMount:void 0}),Ej=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:s}=e,o=lu(wv,t);return m.jsx(lI,{scope:t,forceMount:n,children:m.jsx($n,{present:n||o.open,children:m.jsx(ru,{asChild:!0,container:s,children:r})})})};Ej.displayName=wv;var Ho="TooltipContent",_j=w.forwardRef((e,t)=>{const n=cI(Ho,e.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...o}=e,l=lu(Ho,e.__scopeTooltip);return m.jsx($n,{present:r||l.open,children:l.disableHoverableContent?m.jsx(jj,{side:s,...o,ref:t}):m.jsx(uI,{side:s,...o,ref:t})})}),uI=w.forwardRef((e,t)=>{const n=lu(Ho,e.__scopeTooltip),r=bv(Ho,e.__scopeTooltip),s=w.useRef(null),o=ot(t,s),[l,u]=w.useState(null),{trigger:d,onClose:h}=n,g=s.current,{onPointerInTransitChange:p}=r,x=w.useCallback(()=>{u(null),p(!1)},[p]),v=w.useCallback((S,C)=>{const E=S.currentTarget,T={x:S.clientX,y:S.clientY},R=mI(T,E.getBoundingClientRect()),O=pI(T,R),A=gI(C.getBoundingClientRect()),M=xI([...O,...A]);u(M),p(!0)},[p]);return w.useEffect(()=>()=>x(),[x]),w.useEffect(()=>{if(d&&g){const S=E=>v(E,g),C=E=>v(E,d);return d.addEventListener("pointerleave",S),g.addEventListener("pointerleave",C),()=>{d.removeEventListener("pointerleave",S),g.removeEventListener("pointerleave",C)}}},[d,g,v,x]),w.useEffect(()=>{if(l){const S=C=>{const E=C.target,T={x:C.clientX,y:C.clientY},R=(d==null?void 0:d.contains(E))||(g==null?void 0:g.contains(E)),O=!yI(T,l);R?x():O&&(x(),h())};return document.addEventListener("pointermove",S),()=>document.removeEventListener("pointermove",S)}},[d,g,l,h,x]),m.jsx(jj,{...e,ref:o})}),[dI,fI]=hh(Vc,{isInside:!1}),hI=O4("TooltipContent"),jj=w.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:l,...u}=e,d=lu(Ho,n),h=mh(n),{onClose:g}=d;return w.useEffect(()=>(document.addEventListener(Sy,g),()=>document.removeEventListener(Sy,g)),[g]),w.useEffect(()=>{if(d.trigger){const p=x=>{const v=x.target;v!=null&&v.contains(d.trigger)&&g()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[d.trigger,g]),m.jsx(nu,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:p=>p.preventDefault(),onDismiss:g,children:m.jsxs(ov,{"data-state":d.stateAttribute,...h,...u,ref:t,style:{...u.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(hI,{children:r}),m.jsx(dI,{scope:n,isInside:!0,children:m.jsx(B4,{id:d.contentId,role:"tooltip",children:s||r})})]})})});_j.displayName=Ho;var Nj="TooltipArrow",Aj=w.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=mh(n);return fI(Nj,n).isInside?null:m.jsx(lv,{...s,...r,ref:t})});Aj.displayName=Nj;function mI(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,s,o)){case o:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function pI(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 gI(e){const{top:t,right:n,bottom:r,left:s}=e;return[{x:s,y:t},{x:n,y:t},{x:n,y:r},{x:s,y:r}]}function yI(e,t){const{x:n,y:r}=e;let s=!1;for(let o=0,l=t.length-1;o<t.length;l=o++){const u=t[o],d=t[l],h=u.x,g=u.y,p=d.x,x=d.y;g>r!=x>r&&n<(p-h)*(r-g)/(x-g)+h&&(s=!s)}return s}function xI(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),vI(t)}function vI(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const s=e[r];for(;t.length>=2;){const o=t[t.length-1],l=t[t.length-2];if((o.x-l.x)*(s.y-l.y)>=(o.y-l.y)*(s.x-l.x))t.pop();else break}t.push(s)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const s=e[r];for(;n.length>=2;){const o=n[n.length-1],l=n[n.length-2];if((o.x-l.x)*(s.y-l.y)>=(o.y-l.y)*(s.x-l.x))n.pop();else break}n.push(s)}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 bI=Cj,wI=kj,SI=Tj,CI=Ej,kI=_j,TI=Aj;const vC=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,bC=Ux,Sv=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return bC(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:o}=t,l=Object.keys(s).map(h=>{const g=n==null?void 0:n[h],p=o==null?void 0:o[h];if(g===null)return null;const x=vC(g)||vC(p);return s[h][x]}),u=n&&Object.entries(n).reduce((h,g)=>{let[p,x]=g;return x===void 0||(h[p]=x),h},{}),d=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((h,g)=>{let{class:p,className:x,...v}=g;return Object.entries(v).every(S=>{let[C,E]=S;return Array.isArray(E)?E.includes({...o,...u}[C]):{...o,...u}[C]===E})?[...h,p,x]:h},[]);return bC(e,l,d,n==null?void 0:n.class,n==null?void 0:n.className)},EI=Sv("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all cursor-pointer disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs 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",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function Je({className:e,variant:t,size:n,asChild:r=!1,...s}){const o=r?Fx:"button";return m.jsx(o,{"data-slot":"button",className:Me(EI({variant:t,size:n,className:e})),...s})}/**
94
+ * @license lucide-react v0.525.0 - ISC
95
+ *
96
+ * This source code is licensed under the ISC license.
97
+ * See the LICENSE file in the root directory of this source tree.
98
+ */const _I=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),jI=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),wC=e=>{const t=jI(e);return t.charAt(0).toUpperCase()+t.slice(1)},Rj=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),NI=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
99
+ * @license lucide-react v0.525.0 - ISC
100
+ *
101
+ * This source code is licensed under the ISC license.
102
+ * See the LICENSE file in the root directory of this source tree.
103
+ */var AI={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"};/**
104
+ * @license lucide-react v0.525.0 - ISC
105
+ *
106
+ * This source code is licensed under the ISC license.
107
+ * See the LICENSE file in the root directory of this source tree.
108
+ */const RI=w.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:o,iconNode:l,...u},d)=>w.createElement("svg",{ref:d,...AI,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Rj("lucide",s),...!o&&!NI(u)&&{"aria-hidden":"true"},...u},[...l.map(([h,g])=>w.createElement(h,g)),...Array.isArray(o)?o:[o]]));/**
109
+ * @license lucide-react v0.525.0 - ISC
110
+ *
111
+ * This source code is licensed under the ISC license.
112
+ * See the LICENSE file in the root directory of this source tree.
113
+ */const Ke=(e,t)=>{const n=w.forwardRef(({className:r,...s},o)=>w.createElement(RI,{ref:o,iconNode:t,className:Rj(`lucide-${_I(wC(e))}`,`lucide-${e}`,r),...s}));return n.displayName=wC(e),n};/**
114
+ * @license lucide-react v0.525.0 - ISC
115
+ *
116
+ * This source code is licensed under the ISC license.
117
+ * See the LICENSE file in the root directory of this source tree.
118
+ */const MI=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],OI=Ke("arrow-down",MI);/**
119
+ * @license lucide-react v0.525.0 - ISC
120
+ *
121
+ * This source code is licensed under the ISC license.
122
+ * See the LICENSE file in the root directory of this source tree.
123
+ */const DI=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],Mj=Ke("arrow-up",DI);/**
124
+ * @license lucide-react v0.525.0 - ISC
125
+ *
126
+ * This source code is licensed under the ISC license.
127
+ * See the LICENSE file in the root directory of this source tree.
128
+ */const PI=[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]],zI=Ke("brain",PI);/**
129
+ * @license lucide-react v0.525.0 - ISC
130
+ *
131
+ * This source code is licensed under the ISC license.
132
+ * See the LICENSE file in the root directory of this source tree.
133
+ */const LI=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],wr=Ke("check",LI);/**
134
+ * @license lucide-react v0.525.0 - ISC
135
+ *
136
+ * This source code is licensed under the ISC license.
137
+ * See the LICENSE file in the root directory of this source tree.
138
+ */const II=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],al=Ke("chevron-down",II);/**
139
+ * @license lucide-react v0.525.0 - ISC
140
+ *
141
+ * This source code is licensed under the ISC license.
142
+ * See the LICENSE file in the root directory of this source tree.
143
+ */const BI=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],sl=Ke("chevron-right",BI);/**
144
+ * @license lucide-react v0.525.0 - ISC
145
+ *
146
+ * This source code is licensed under the ISC license.
147
+ * See the LICENSE file in the root directory of this source tree.
148
+ */const VI=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Oj=Ke("chevron-up",VI);/**
149
+ * @license lucide-react v0.525.0 - ISC
150
+ *
151
+ * This source code is licensed under the ISC license.
152
+ * See the LICENSE file in the root directory of this source tree.
153
+ */const UI=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],hg=Ke("circle-check-big",UI);/**
154
+ * @license lucide-react v0.525.0 - ISC
155
+ *
156
+ * This source code is licensed under the ISC license.
157
+ * See the LICENSE file in the root directory of this source tree.
158
+ */const HI=[["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"}]],mg=Ke("circle-x",HI);/**
159
+ * @license lucide-react v0.525.0 - ISC
160
+ *
161
+ * This source code is licensed under the ISC license.
162
+ * See the LICENSE file in the root directory of this source tree.
163
+ */const FI=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],pg=Ke("clock",FI);/**
164
+ * @license lucide-react v0.525.0 - ISC
165
+ *
166
+ * This source code is licensed under the ISC license.
167
+ * See the LICENSE file in the root directory of this source tree.
168
+ */const $I=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],ya=Ke("copy",$I);/**
169
+ * @license lucide-react v0.525.0 - ISC
170
+ *
171
+ * This source code is licensed under the ISC license.
172
+ * See the LICENSE file in the root directory of this source tree.
173
+ */const qI=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],GI=Ke("database",qI);/**
174
+ * @license lucide-react v0.525.0 - ISC
175
+ *
176
+ * This source code is licensed under the ISC license.
177
+ * See the LICENSE file in the root directory of this source tree.
178
+ */const YI=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],ZI=Ke("ellipsis-vertical",YI);/**
179
+ * @license lucide-react v0.525.0 - ISC
180
+ *
181
+ * This source code is licensed under the ISC license.
182
+ * See the LICENSE file in the root directory of this source tree.
183
+ */const XI=[["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"}]],SC=Ke("eye-off",XI);/**
184
+ * @license lucide-react v0.525.0 - ISC
185
+ *
186
+ * This source code is licensed under the ISC license.
187
+ * See the LICENSE file in the root directory of this source tree.
188
+ */const KI=[["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"}]],wf=Ke("eye",KI);/**
189
+ * @license lucide-react v0.525.0 - ISC
190
+ *
191
+ * This source code is licensed under the ISC license.
192
+ * See the LICENSE file in the root directory of this source tree.
193
+ */const WI=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]],QI=Ke("file",WI);/**
194
+ * @license lucide-react v0.525.0 - ISC
195
+ *
196
+ * This source code is licensed under the ISC license.
197
+ * See the LICENSE file in the root directory of this source tree.
198
+ */const JI=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],ky=Ke("folder-open",JI);/**
199
+ * @license lucide-react v0.525.0 - ISC
200
+ *
201
+ * This source code is licensed under the ISC license.
202
+ * See the LICENSE file in the root directory of this source tree.
203
+ */const e6=[["circle",{cx:"6",cy:"15",r:"4",key:"vux9w4"}],["circle",{cx:"18",cy:"15",r:"4",key:"18o8ve"}],["path",{d:"M14 15a2 2 0 0 0-2-2 2 2 0 0 0-2 2",key:"1ag4bs"}],["path",{d:"M2.5 13 5 7c.7-1.3 1.4-2 3-2",key:"1hm1gs"}],["path",{d:"M21.5 13 19 7c-.7-1.3-1.5-2-3-2",key:"1r31ai"}]],t6=Ke("glasses",e6);/**
204
+ * @license lucide-react v0.525.0 - ISC
205
+ *
206
+ * This source code is licensed under the ISC license.
207
+ * See the LICENSE file in the root directory of this source tree.
208
+ */const n6=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],r6=Ke("grip-vertical",n6);/**
209
+ * @license lucide-react v0.525.0 - ISC
210
+ *
211
+ * This source code is licensed under the ISC license.
212
+ * See the LICENSE file in the root directory of this source tree.
213
+ */const i6=[["path",{d:"m15 12-8.373 8.373a1 1 0 1 1-3-3L12 9",key:"eefl8a"}],["path",{d:"m18 15 4-4",key:"16gjal"}],["path",{d:"m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172V7l-2.26-2.26a6 6 0 0 0-4.202-1.756L9 2.96l.92.82A6.18 6.18 0 0 1 12 8.4V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5",key:"b7pghm"}]],a6=Ke("hammer",i6);/**
214
+ * @license lucide-react v0.525.0 - ISC
215
+ *
216
+ * This source code is licensed under the ISC license.
217
+ * See the LICENSE file in the root directory of this source tree.
218
+ */const s6=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],o6=Ke("key",s6);/**
219
+ * @license lucide-react v0.525.0 - ISC
220
+ *
221
+ * This source code is licensed under the ISC license.
222
+ * See the LICENSE file in the root directory of this source tree.
223
+ */const l6=[["path",{d:"M9 17H7A5 5 0 0 1 7 7",key:"10o201"}],["path",{d:"M15 7h2a5 5 0 0 1 4 8",key:"1d3206"}],["line",{x1:"8",x2:"12",y1:"12",y2:"12",key:"rvw6j4"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]],c6=Ke("link-2-off",l6);/**
224
+ * @license lucide-react v0.525.0 - ISC
225
+ *
226
+ * This source code is licensed under the ISC license.
227
+ * See the LICENSE file in the root directory of this source tree.
228
+ */const u6=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],gg=Ke("loader-circle",u6);/**
229
+ * @license lucide-react v0.525.0 - ISC
230
+ *
231
+ * This source code is licensed under the ISC license.
232
+ * See the LICENSE file in the root directory of this source tree.
233
+ */const d6=[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]],Dj=Ke("message-circle",d6);/**
234
+ * @license lucide-react v0.525.0 - ISC
235
+ *
236
+ * This source code is licensed under the ISC license.
237
+ * See the LICENSE file in the root directory of this source tree.
238
+ */const f6=[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]],Ty=Ke("message-square",f6);/**
239
+ * @license lucide-react v0.525.0 - ISC
240
+ *
241
+ * This source code is licensed under the ISC license.
242
+ * See the LICENSE file in the root directory of this source tree.
243
+ */const h6=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],m6=Ke("moon",h6);/**
244
+ * @license lucide-react v0.525.0 - ISC
245
+ *
246
+ * This source code is licensed under the ISC license.
247
+ * See the LICENSE file in the root directory of this source tree.
248
+ */const p6=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],g6=Ke("panel-left",p6);/**
249
+ * @license lucide-react v0.525.0 - ISC
250
+ *
251
+ * This source code is licensed under the ISC license.
252
+ * See the LICENSE file in the root directory of this source tree.
253
+ */const y6=[["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"}]],x6=Ke("paperclip",y6);/**
254
+ * @license lucide-react v0.525.0 - ISC
255
+ *
256
+ * This source code is licensed under the ISC license.
257
+ * See the LICENSE file in the root directory of this source tree.
258
+ */const v6=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],Sf=Ke("play",v6);/**
259
+ * @license lucide-react v0.525.0 - ISC
260
+ *
261
+ * This source code is licensed under the ISC license.
262
+ * See the LICENSE file in the root directory of this source tree.
263
+ */const b6=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],CC=Ke("plus",b6);/**
264
+ * @license lucide-react v0.525.0 - ISC
265
+ *
266
+ * This source code is licensed under the ISC license.
267
+ * See the LICENSE file in the root directory of this source tree.
268
+ */const w6=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Lr=Ke("refresh-cw",w6);/**
269
+ * @license lucide-react v0.525.0 - ISC
270
+ *
271
+ * This source code is licensed under the ISC license.
272
+ * See the LICENSE file in the root directory of this source tree.
273
+ */const S6=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],C6=Ke("rotate-ccw",S6);/**
274
+ * @license lucide-react v0.525.0 - ISC
275
+ *
276
+ * This source code is licensed under the ISC license.
277
+ * See the LICENSE file in the root directory of this source tree.
278
+ */const k6=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],T6=Ke("search",k6);/**
279
+ * @license lucide-react v0.525.0 - ISC
280
+ *
281
+ * This source code is licensed under the ISC license.
282
+ * See the LICENSE file in the root directory of this source tree.
283
+ */const E6=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Pj=Ke("settings",E6);/**
284
+ * @license lucide-react v0.525.0 - ISC
285
+ *
286
+ * This source code is licensed under the ISC license.
287
+ * See the LICENSE file in the root directory of this source tree.
288
+ */const _6=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],j6=Ke("square-pen",_6);/**
289
+ * @license lucide-react v0.525.0 - ISC
290
+ *
291
+ * This source code is licensed under the ISC license.
292
+ * See the LICENSE file in the root directory of this source tree.
293
+ */const N6=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],A6=Ke("square",N6);/**
294
+ * @license lucide-react v0.525.0 - ISC
295
+ *
296
+ * This source code is licensed under the ISC license.
297
+ * See the LICENSE file in the root directory of this source tree.
298
+ */const R6=[["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"}]],M6=Ke("sun",R6);/**
299
+ * @license lucide-react v0.525.0 - ISC
300
+ *
301
+ * This source code is licensed under the ISC license.
302
+ * See the LICENSE file in the root directory of this source tree.
303
+ */const O6=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]],D6=Ke("wifi",O6);/**
304
+ * @license lucide-react v0.525.0 - ISC
305
+ *
306
+ * This source code is licensed under the ISC license.
307
+ * See the LICENSE file in the root directory of this source tree.
308
+ */const P6=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]],kC=Ke("wrench",P6);/**
309
+ * @license lucide-react v0.525.0 - ISC
310
+ *
311
+ * This source code is licensed under the ISC license.
312
+ * See the LICENSE file in the root directory of this source tree.
313
+ */const z6=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Fo=Ke("x",z6);function L6(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 I6=e=>{switch(e){case"success":return U6;case"info":return F6;case"warning":return H6;case"error":return $6;default:return null}},B6=Array(12).fill(0),V6=({visible:e,className:t})=>ye.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},ye.createElement("div",{className:"sonner-spinner"},B6.map((n,r)=>ye.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),U6=ye.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ye.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"})),H6=ye.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ye.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"})),F6=ye.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ye.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"})),$6=ye.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ye.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"})),q6=ye.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"},ye.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ye.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),G6=()=>{const[e,t]=ye.useState(document.hidden);return ye.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let Ey=1;class Y6{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,...s}=t,o=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:Ey++,l=this.toasts.find(d=>d.id===o),u=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),l?this.toasts=this.toasts.map(d=>d.id===o?(this.publish({...d,...t,id:o,title:r}),{...d,...t,id:o,dismissible:u,title:r}):d):this.addToast({title:r,...s,dismissible:u,id:o}),o},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 s=Promise.resolve(t instanceof Function?t():t);let o=r!==void 0,l;const u=s.then(async h=>{if(l=["resolve",h],ye.isValidElement(h))o=!1,this.create({id:r,type:"default",message:h});else if(X6(h)&&!h.ok){o=!1;const p=typeof n.error=="function"?await n.error(`HTTP error! status: ${h.status}`):n.error,x=typeof n.description=="function"?await n.description(`HTTP error! status: ${h.status}`):n.description,S=typeof p=="object"&&!ye.isValidElement(p)?p:{message:p};this.create({id:r,type:"error",description:x,...S})}else if(h instanceof Error){o=!1;const p=typeof n.error=="function"?await n.error(h):n.error,x=typeof n.description=="function"?await n.description(h):n.description,S=typeof p=="object"&&!ye.isValidElement(p)?p:{message:p};this.create({id:r,type:"error",description:x,...S})}else if(n.success!==void 0){o=!1;const p=typeof n.success=="function"?await n.success(h):n.success,x=typeof n.description=="function"?await n.description(h):n.description,S=typeof p=="object"&&!ye.isValidElement(p)?p:{message:p};this.create({id:r,type:"success",description:x,...S})}}).catch(async h=>{if(l=["reject",h],n.error!==void 0){o=!1;const g=typeof n.error=="function"?await n.error(h):n.error,p=typeof n.description=="function"?await n.description(h):n.description,v=typeof g=="object"&&!ye.isValidElement(g)?g:{message:g};this.create({id:r,type:"error",description:p,...v})}}).finally(()=>{o&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),d=()=>new Promise((h,g)=>u.then(()=>l[0]==="reject"?g(l[1]):h(l[1])).catch(g));return typeof r!="string"&&typeof r!="number"?{unwrap:d}:Object.assign(r,{unwrap:d})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||Ey++;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 Hn=new Y6,Z6=(e,t)=>{const n=(t==null?void 0:t.id)||Ey++;return Hn.addToast({title:e,...t,id:n}),n},X6=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",K6=Z6,W6=()=>Hn.toasts,Q6=()=>Hn.getActiveToasts(),qt=Object.assign(K6,{success:Hn.success,info:Hn.info,warning:Hn.warning,error:Hn.error,custom:Hn.custom,message:Hn.message,promise:Hn.promise,dismiss:Hn.dismiss,loading:Hn.loading},{getHistory:W6,getToasts:Q6});L6("[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 Ud(e){return e.label!==void 0}const J6=3,e7="24px",t7="16px",TC=4e3,n7=356,r7=14,i7=45,a7=200;function Xr(...e){return e.filter(Boolean).join(" ")}function s7(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const o7=e=>{var t,n,r,s,o,l,u,d,h;const{invert:g,toast:p,unstyled:x,interacting:v,setHeights:S,visibleToasts:C,heights:E,index:T,toasts:R,expanded:O,removeToast:A,defaultRichColors:M,closeButton:N,style:z,cancelButtonStyle:P,actionButtonStyle:B,className:D="",descriptionClassName:H="",duration:$,position:X,gap:Y,expandByDefault:te,classNames:I,icons:F,closeButtonAriaLabel:V="Close toast"}=e,[Z,k]=ye.useState(null),[G,le]=ye.useState(null),[j,Q]=ye.useState(!1),[ee,W]=ye.useState(!1),[K,oe]=ye.useState(!1),[ce,me]=ye.useState(!1),[be,Te]=ye.useState(!1),[Ve,lt]=ye.useState(0),[Mt,It]=ye.useState(0),st=ye.useRef(p.duration||$||TC),yt=ye.useRef(null),Ct=ye.useRef(null),lr=T===0,Jt=T+1<=C,kt=p.type,Yn=p.dismissible!==!1,fl=p.className||"",hl=p.descriptionClassName||"",ue=ye.useMemo(()=>E.findIndex(Fe=>Fe.toastId===p.id)||0,[E,p.id]),ge=ye.useMemo(()=>{var Fe;return(Fe=p.closeButton)!=null?Fe:N},[p.closeButton,N]),Oe=ye.useMemo(()=>p.duration||$||TC,[p.duration,$]),De=ye.useRef(0),it=ye.useRef(0),bn=ye.useRef(0),wn=ye.useRef(null),[Sn,cr]=X.split("-"),Cn=ye.useMemo(()=>E.reduce((Fe,Vt,Yt)=>Yt>=ue?Fe:Fe+Vt.height,0),[E,ue]),Bt=G6(),zn=p.invert||g,Nn=kt==="loading";it.current=ye.useMemo(()=>ue*Y+Cn,[ue,Cn]),ye.useEffect(()=>{st.current=Oe},[Oe]),ye.useEffect(()=>{Q(!0)},[]),ye.useEffect(()=>{const Fe=Ct.current;if(Fe){const Vt=Fe.getBoundingClientRect().height;return It(Vt),S(Yt=>[{toastId:p.id,height:Vt,position:p.position},...Yt]),()=>S(Yt=>Yt.filter(fn=>fn.toastId!==p.id))}},[S,p.id]),ye.useLayoutEffect(()=>{if(!j)return;const Fe=Ct.current,Vt=Fe.style.height;Fe.style.height="auto";const Yt=Fe.getBoundingClientRect().height;Fe.style.height=Vt,It(Yt),S(fn=>fn.find(en=>en.toastId===p.id)?fn.map(en=>en.toastId===p.id?{...en,height:Yt}:en):[{toastId:p.id,height:Yt,position:p.position},...fn])},[j,p.title,p.description,S,p.id,p.jsx,p.action,p.cancel]);const Ar=ye.useCallback(()=>{W(!0),lt(it.current),S(Fe=>Fe.filter(Vt=>Vt.toastId!==p.id)),setTimeout(()=>{A(p)},a7)},[p,A,S,it]);ye.useEffect(()=>{if(p.promise&&kt==="loading"||p.duration===1/0||p.type==="loading")return;let Fe;return O||v||Bt?(()=>{if(bn.current<De.current){const fn=new Date().getTime()-De.current;st.current=st.current-fn}bn.current=new Date().getTime()})():(()=>{st.current!==1/0&&(De.current=new Date().getTime(),Fe=setTimeout(()=>{p.onAutoClose==null||p.onAutoClose.call(p,p),Ar()},st.current))})(),()=>clearTimeout(Fe)},[O,v,p,kt,Bt,Ar]),ye.useEffect(()=>{p.delete&&(Ar(),p.onDismiss==null||p.onDismiss.call(p,p))},[Ar,p.delete]);function wu(){var Fe;if(F!=null&&F.loading){var Vt;return ye.createElement("div",{className:Xr(I==null?void 0:I.loader,p==null||(Vt=p.classNames)==null?void 0:Vt.loader,"sonner-loader"),"data-visible":kt==="loading"},F.loading)}return ye.createElement(V6,{className:Xr(I==null?void 0:I.loader,p==null||(Fe=p.classNames)==null?void 0:Fe.loader),visible:kt==="loading"})}const ml=p.icon||(F==null?void 0:F[kt])||I6(kt);var Ui,Su;return ye.createElement("li",{tabIndex:0,ref:Ct,className:Xr(D,fl,I==null?void 0:I.toast,p==null||(t=p.classNames)==null?void 0:t.toast,I==null?void 0:I.default,I==null?void 0:I[kt],p==null||(n=p.classNames)==null?void 0:n[kt]),"data-sonner-toast":"","data-rich-colors":(Ui=p.richColors)!=null?Ui:M,"data-styled":!(p.jsx||p.unstyled||x),"data-mounted":j,"data-promise":!!p.promise,"data-swiped":be,"data-removed":ee,"data-visible":Jt,"data-y-position":Sn,"data-x-position":cr,"data-index":T,"data-front":lr,"data-swiping":K,"data-dismissible":Yn,"data-type":kt,"data-invert":zn,"data-swipe-out":ce,"data-swipe-direction":G,"data-expanded":!!(O||te&&j),style:{"--index":T,"--toasts-before":T,"--z-index":R.length-T,"--offset":`${ee?Ve:it.current}px`,"--initial-height":te?"auto":`${Mt}px`,...z,...p.style},onDragEnd:()=>{oe(!1),k(null),wn.current=null},onPointerDown:Fe=>{Fe.button!==2&&(Nn||!Yn||(yt.current=new Date,lt(it.current),Fe.target.setPointerCapture(Fe.pointerId),Fe.target.tagName!=="BUTTON"&&(oe(!0),wn.current={x:Fe.clientX,y:Fe.clientY})))},onPointerUp:()=>{var Fe,Vt,Yt;if(ce||!Yn)return;wn.current=null;const fn=Number(((Fe=Ct.current)==null?void 0:Fe.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),La=Number(((Vt=Ct.current)==null?void 0:Vt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),en=new Date().getTime()-((Yt=yt.current)==null?void 0:Yt.getTime()),Ut=Z==="x"?fn:La,Ht=Math.abs(Ut)/en;if(Math.abs(Ut)>=i7||Ht>.11){lt(it.current),p.onDismiss==null||p.onDismiss.call(p,p),le(Z==="x"?fn>0?"right":"left":La>0?"down":"up"),Ar(),me(!0);return}else{var Tt,sn;(Tt=Ct.current)==null||Tt.style.setProperty("--swipe-amount-x","0px"),(sn=Ct.current)==null||sn.style.setProperty("--swipe-amount-y","0px")}Te(!1),oe(!1),k(null)},onPointerMove:Fe=>{var Vt,Yt,fn;if(!wn.current||!Yn||((Vt=window.getSelection())==null?void 0:Vt.toString().length)>0)return;const en=Fe.clientY-wn.current.y,Ut=Fe.clientX-wn.current.x;var Ht;const Tt=(Ht=e.swipeDirections)!=null?Ht:s7(X);!Z&&(Math.abs(Ut)>1||Math.abs(en)>1)&&k(Math.abs(Ut)>Math.abs(en)?"x":"y");let sn={x:0,y:0};const As=di=>1/(1.5+Math.abs(di)/20);if(Z==="y"){if(Tt.includes("top")||Tt.includes("bottom"))if(Tt.includes("top")&&en<0||Tt.includes("bottom")&&en>0)sn.y=en;else{const di=en*As(en);sn.y=Math.abs(di)<Math.abs(en)?di:en}}else if(Z==="x"&&(Tt.includes("left")||Tt.includes("right")))if(Tt.includes("left")&&Ut<0||Tt.includes("right")&&Ut>0)sn.x=Ut;else{const di=Ut*As(Ut);sn.x=Math.abs(di)<Math.abs(Ut)?di:Ut}(Math.abs(sn.x)>0||Math.abs(sn.y)>0)&&Te(!0),(Yt=Ct.current)==null||Yt.style.setProperty("--swipe-amount-x",`${sn.x}px`),(fn=Ct.current)==null||fn.style.setProperty("--swipe-amount-y",`${sn.y}px`)}},ge&&!p.jsx&&kt!=="loading"?ye.createElement("button",{"aria-label":V,"data-disabled":Nn,"data-close-button":!0,onClick:Nn||!Yn?()=>{}:()=>{Ar(),p.onDismiss==null||p.onDismiss.call(p,p)},className:Xr(I==null?void 0:I.closeButton,p==null||(r=p.classNames)==null?void 0:r.closeButton)},(Su=F==null?void 0:F.close)!=null?Su:q6):null,(kt||p.icon||p.promise)&&p.icon!==null&&((F==null?void 0:F[kt])!==null||p.icon)?ye.createElement("div",{"data-icon":"",className:Xr(I==null?void 0:I.icon,p==null||(s=p.classNames)==null?void 0:s.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||wu():null,p.type!=="loading"?ml:null):null,ye.createElement("div",{"data-content":"",className:Xr(I==null?void 0:I.content,p==null||(o=p.classNames)==null?void 0:o.content)},ye.createElement("div",{"data-title":"",className:Xr(I==null?void 0:I.title,p==null||(l=p.classNames)==null?void 0:l.title)},p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title),p.description?ye.createElement("div",{"data-description":"",className:Xr(H,hl,I==null?void 0:I.description,p==null||(u=p.classNames)==null?void 0:u.description)},typeof p.description=="function"?p.description():p.description):null),ye.isValidElement(p.cancel)?p.cancel:p.cancel&&Ud(p.cancel)?ye.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||P,onClick:Fe=>{Ud(p.cancel)&&Yn&&(p.cancel.onClick==null||p.cancel.onClick.call(p.cancel,Fe),Ar())},className:Xr(I==null?void 0:I.cancelButton,p==null||(d=p.classNames)==null?void 0:d.cancelButton)},p.cancel.label):null,ye.isValidElement(p.action)?p.action:p.action&&Ud(p.action)?ye.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||B,onClick:Fe=>{Ud(p.action)&&(p.action.onClick==null||p.action.onClick.call(p.action,Fe),!Fe.defaultPrevented&&Ar())},className:Xr(I==null?void 0:I.actionButton,p==null||(h=p.classNames)==null?void 0:h.actionButton)},p.action.label):null)};function EC(){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 l7(e,t){const n={};return[e,t].forEach((r,s)=>{const o=s===1,l=o?"--mobile-offset":"--offset",u=o?t7:e7;function d(h){["top","right","bottom","left"].forEach(g=>{n[`${l}-${g}`]=typeof h=="number"?`${h}px`:h})}typeof r=="number"||typeof r=="string"?d(r):typeof r=="object"?["top","right","bottom","left"].forEach(h=>{r[h]===void 0?n[`${l}-${h}`]=u:n[`${l}-${h}`]=typeof r[h]=="number"?`${r[h]}px`:r[h]}):d(u)}),n}const c7=ye.forwardRef(function(t,n){const{invert:r,position:s="bottom-right",hotkey:o=["altKey","KeyT"],expand:l,closeButton:u,className:d,offset:h,mobileOffset:g,theme:p="light",richColors:x,duration:v,style:S,visibleToasts:C=J6,toastOptions:E,dir:T=EC(),gap:R=r7,icons:O,containerAriaLabel:A="Notifications"}=t,[M,N]=ye.useState([]),z=ye.useMemo(()=>Array.from(new Set([s].concat(M.filter(G=>G.position).map(G=>G.position)))),[M,s]),[P,B]=ye.useState([]),[D,H]=ye.useState(!1),[$,X]=ye.useState(!1),[Y,te]=ye.useState(p!=="system"?p:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),I=ye.useRef(null),F=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),V=ye.useRef(null),Z=ye.useRef(!1),k=ye.useCallback(G=>{N(le=>{var j;return(j=le.find(Q=>Q.id===G.id))!=null&&j.delete||Hn.dismiss(G.id),le.filter(({id:Q})=>Q!==G.id)})},[]);return ye.useEffect(()=>Hn.subscribe(G=>{if(G.dismiss){requestAnimationFrame(()=>{N(le=>le.map(j=>j.id===G.id?{...j,delete:!0}:j))});return}setTimeout(()=>{GE.flushSync(()=>{N(le=>{const j=le.findIndex(Q=>Q.id===G.id);return j!==-1?[...le.slice(0,j),{...le[j],...G},...le.slice(j+1)]:[G,...le]})})})}),[M]),ye.useEffect(()=>{if(p!=="system"){te(p);return}if(p==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?te("dark"):te("light")),typeof window>"u")return;const G=window.matchMedia("(prefers-color-scheme: dark)");try{G.addEventListener("change",({matches:le})=>{te(le?"dark":"light")})}catch{G.addListener(({matches:j})=>{try{te(j?"dark":"light")}catch(Q){console.error(Q)}})}},[p]),ye.useEffect(()=>{M.length<=1&&H(!1)},[M]),ye.useEffect(()=>{const G=le=>{var j;if(o.every(W=>le[W]||le.code===W)){var ee;H(!0),(ee=I.current)==null||ee.focus()}le.code==="Escape"&&(document.activeElement===I.current||(j=I.current)!=null&&j.contains(document.activeElement))&&H(!1)};return document.addEventListener("keydown",G),()=>document.removeEventListener("keydown",G)},[o]),ye.useEffect(()=>{if(I.current)return()=>{V.current&&(V.current.focus({preventScroll:!0}),V.current=null,Z.current=!1)}},[I.current]),ye.createElement("section",{ref:n,"aria-label":`${A} ${F}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},z.map((G,le)=>{var j;const[Q,ee]=G.split("-");return M.length?ye.createElement("ol",{key:G,dir:T==="auto"?EC():T,tabIndex:-1,ref:I,className:d,"data-sonner-toaster":!0,"data-sonner-theme":Y,"data-y-position":Q,"data-x-position":ee,style:{"--front-toast-height":`${((j=P[0])==null?void 0:j.height)||0}px`,"--width":`${n7}px`,"--gap":`${R}px`,...S,...l7(h,g)},onBlur:W=>{Z.current&&!W.currentTarget.contains(W.relatedTarget)&&(Z.current=!1,V.current&&(V.current.focus({preventScroll:!0}),V.current=null))},onFocus:W=>{W.target instanceof HTMLElement&&W.target.dataset.dismissible==="false"||Z.current||(Z.current=!0,V.current=W.relatedTarget)},onMouseEnter:()=>H(!0),onMouseMove:()=>H(!0),onMouseLeave:()=>{$||H(!1)},onDragEnd:()=>H(!1),onPointerDown:W=>{W.target instanceof HTMLElement&&W.target.dataset.dismissible==="false"||X(!0)},onPointerUp:()=>X(!1)},M.filter(W=>!W.position&&le===0||W.position===G).map((W,K)=>{var oe,ce;return ye.createElement(o7,{key:W.id,icons:O,index:K,toast:W,defaultRichColors:x,duration:(oe=E==null?void 0:E.duration)!=null?oe:v,className:E==null?void 0:E.className,descriptionClassName:E==null?void 0:E.descriptionClassName,invert:r,visibleToasts:C,closeButton:(ce=E==null?void 0:E.closeButton)!=null?ce:u,interacting:$,position:G,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:k,toasts:M.filter(me=>me.position==W.position),heights:P.filter(me=>me.position==W.position),setHeights:B,expandByDefault:l,gap:R,expanded:D,swipeDirections:t.swipeDirections})})):null}))});function u7({className:e,orientation:t="horizontal",decorative:n=!0,...r}){return m.jsx(iI,{"data-slot":"separator",decorative:n,orientation:t,className:Me("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...r})}function ph({delayDuration:e=0,...t}){return m.jsx(bI,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function cs({...e}){return m.jsx(ph,{children:m.jsx(wI,{"data-slot":"tooltip",...e})})}function us({...e}){return m.jsx(SI,{"data-slot":"tooltip-trigger",...e})}function ds({className:e,sideOffset:t=0,children:n,...r}){return m.jsx(CI,{children:m.jsxs(kI,{"data-slot":"tooltip-content",sideOffset:t,className:Me("bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e),...r,children:[n,m.jsx(TI,{className:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}function zj({...e}){return m.jsx(Jz,{"data-slot":"dropdown-menu",...e})}function Lj({...e}){return m.jsx(eL,{"data-slot":"dropdown-menu-trigger",...e})}function Ij({className:e,sideOffset:t=4,...n}){return m.jsx(tL,{children:m.jsx(nL,{"data-slot":"dropdown-menu-content",sideOffset:t,className:Me("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]: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 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 p-1 shadow-md",e),...n})})}function nf({className:e,inset:t,variant:n="default",...r}){return m.jsx(rL,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:Me("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r})}function d7({server:e,onDisconnect:t,onReconnect:n,onEdit:r}){var P,B;const[s,o]=w.useState(!1),[l,u]=w.useState(!1),[d,h]=w.useState(!1),[g,p]=w.useState(null),x=e.config.url!==void 0,v=e.oauthTokens,S=(P=e.config.requestInit)==null?void 0:P.headers,C=((B=S==null?void 0:S.Authorization)==null?void 0:B.startsWith("Bearer "))&&S.Authorization.slice(7),E=v||C||!x,R=(()=>{var D;return(D=e.oauthTokens)!=null&&D.expires_in?{percentage:100,timeLeft:36e5,hours:1,minutes:0,seconds:0,isExpired:!1,isExpiringSoon:!1}:null})(),O=async(D,H)=>{try{await navigator.clipboard.writeText(D),p(H),setTimeout(()=>p(null),2e3)}catch($){console.error("Failed to copy text:",$)}},A=async()=>{u(!0);try{n(e.name)}catch(D){const H=D instanceof Error?D.message:"Unknown error";qt.error(`Failed to reconnect to ${e.name}: ${H}`)}finally{u(!1)}},M=()=>{switch(e.connectionStatus){case"connected":return"Connected";case"connecting":return"Connecting...";case"oauth-flow":return"Authorizing...";case"failed":return`Failed (${e.retryCount} retries)`;case"disconnected":return"Disconnected"}},N=()=>{switch(e.connectionStatus){case"connected":return m.jsx(wr,{className:"h-3 w-3 text-green-500"});case"connecting":return m.jsx(gg,{className:"h-3 w-3 text-blue-500 animate-spin"});case"oauth-flow":return m.jsx(gg,{className:"h-3 w-3 text-purple-500 animate-spin"});case"failed":return m.jsx(Fo,{className:"h-3 w-3 text-red-500"});case"disconnected":return m.jsx(D6,{className:"h-3 w-3 text-gray-500"})}},z=()=>{var $;if(x)return(($=e.config.url)==null?void 0:$.toString())||"";const D=e.config.command,H=e.config.args||[];return[D,...H].join(" ")};return m.jsx(ph,{children:m.jsx(wa,{className:"border border-border/50 bg-card/50 backdrop-blur-sm hover:border-border transition-colors",children:m.jsxs("div",{className:"p-4 space-y-3 py-0",children:[m.jsxs("div",{className:"flex items-start justify-between",children:[m.jsxs("div",{className:"flex items-start gap-3 flex-1",children:[m.jsx("div",{className:"h-2 w-2 rounded-full flex-shrink-0 mt-1.5",style:{backgroundColor:e.connectionStatus==="connected"?"#10b981":e.connectionStatus==="connecting"?"#3b82f6":e.connectionStatus==="oauth-flow"?"#a855f7":e.connectionStatus==="failed"?"#ef4444":"#9ca3af"}}),m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsx("h3",{className:"font-medium text-sm text-foreground",children:e.name}),m.jsxs("div",{className:"flex justify-between mt-1",children:[m.jsx("p",{className:"text-xs text-muted-foreground",children:x?"HTTP/SSE":"STDIO"}),m.jsxs("div",{className:"flex items-center gap-1 -mr-3",children:[N(),m.jsx("p",{className:"text-xs text-muted-foreground",children:M()})]})]})]})]}),m.jsx("div",{className:"flex items-center gap-2",children:m.jsxs(zj,{children:[m.jsx(Lj,{asChild:!0,children:m.jsx(Je,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0 text-muted-foreground/50 hover:text-foreground cursor-pointer",children:m.jsx(ZI,{className:"h-3 w-3"})})}),m.jsxs(Ij,{align:"end",className:"w-40",children:[m.jsxs(nf,{onClick:A,disabled:l||e.connectionStatus==="connecting"||e.connectionStatus==="oauth-flow",className:"text-xs cursor-pointer",children:[l?m.jsx(gg,{className:"h-3 w-3 mr-2 animate-spin"}):m.jsx(Lr,{className:"h-3 w-3 mr-2"}),l?"Reconnecting...":"Reconnect"]}),m.jsxs(nf,{onClick:()=>r(e),className:"text-xs cursor-pointer",children:[m.jsx(j6,{className:"h-3 w-3 mr-2"}),"Edit"]}),m.jsx(u7,{}),m.jsxs(nf,{className:"text-destructive text-xs cursor-pointer",onClick:()=>t(e.name),children:[m.jsx(c6,{className:"h-3 w-3 mr-2"}),"Disconnect"]})]})]})})]}),m.jsxs("div",{className:"font-mono text-xs text-muted-foreground bg-muted/30 p-2 rounded border border-border/30 break-all relative group",children:[m.jsx("div",{className:"pr-8",children:z()}),m.jsx("button",{onClick:()=>O(z(),"command"),className:"absolute top-1 right-1 p-1 text-muted-foreground/50 hover:text-foreground transition-colors cursor-pointer",children:g==="command"?m.jsx(wr,{className:"h-3 w-3 text-green-500"}):m.jsx(ya,{className:"h-3 w-3"})})]}),e.connectionStatus==="failed"&&e.lastError&&m.jsxs("div",{className:"text-xs text-red-600 dark:text-red-400 bg-red-50 dark:bg-red-950/30 p-2 rounded border border-red-200 dark:border-red-800/30",children:[m.jsx("div",{className:"break-all",children:d?e.lastError:e.lastError.length>100?`${e.lastError.substring(0,100)}...`:e.lastError}),e.lastError.length>100&&m.jsx("button",{onClick:()=>h(!d),className:"text-red-500/70 hover:text-red-500 mt-1 underline text-xs cursor-pointer",children:d?"Show less":"Show more"}),e.retryCount>0&&m.jsxs("div",{className:"text-red-500/70 mt-1",children:[e.retryCount," retry attempt",e.retryCount!==1?"s":""]})]}),E&&m.jsx("div",{className:"flex justify-end",children:m.jsx(Je,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0 text-muted-foreground hover:text-foreground cursor-pointer",onClick:()=>o(!s),children:s?m.jsx(Oj,{className:"h-3 w-3"}):m.jsx(al,{className:"h-3 w-3"})})}),s&&E&&m.jsxs("div",{className:"space-y-3 pt-2",children:[C&&!e.oauthTokens&&m.jsx("div",{className:"space-y-2",children:m.jsx("div",{className:"space-y-3 text-xs",children:m.jsxs("div",{children:[m.jsx("span",{className:"text-muted-foreground font-medium",children:"Bearer Access Token (Manual):"}),m.jsxs("div",{className:"font-mono text-foreground break-all bg-muted/30 p-2 rounded mt-1 relative group",children:[m.jsx("div",{className:"pr-8",children:C}),m.jsx("button",{onClick:()=>O(C,"manualBearerToken"),className:"absolute top-1 right-1 p-1 text-muted-foreground/50 hover:text-foreground transition-colors cursor-pointer",children:g==="manualBearerToken"?m.jsx(wr,{className:"h-3 w-3 text-green-500"}):m.jsx(ya,{className:"h-3 w-3"})})]})]})})}),e.oauthTokens&&m.jsxs("div",{className:"space-y-2",children:[m.jsxs("div",{className:"space-y-3 text-xs",children:[m.jsxs("div",{children:[m.jsx("span",{className:"text-muted-foreground font-medium",children:"Client ID:"}),m.jsxs("div",{className:"font-mono text-foreground break-all bg-muted/30 p-2 rounded mt-1 relative group",children:[m.jsx("div",{className:"pr-8",children:e.oauthTokens.client_id}),m.jsx("button",{onClick:()=>{var D;return O(((D=e.oauthTokens)==null?void 0:D.client_id)||"","clientId")},className:"absolute top-1 right-1 p-1 text-muted-foreground/50 hover:text-foreground transition-colors cursor-pointer",children:g==="clientId"?m.jsx(wr,{className:"h-3 w-3 text-green-500"}):m.jsx(ya,{className:"h-3 w-3"})})]})]}),m.jsxs("div",{children:[m.jsx("span",{className:"text-muted-foreground font-medium",children:"Bearer Access Token:"}),m.jsxs("div",{className:"font-mono text-foreground break-all bg-muted/30 p-2 rounded mt-1 relative group",children:[m.jsx("div",{className:"pr-8",children:e.oauthTokens.access_token}),m.jsx("button",{onClick:()=>{var D;return O(((D=e.oauthTokens)==null?void 0:D.access_token)||"","accessToken")},className:"absolute top-1 right-1 p-1 text-muted-foreground/50 hover:text-foreground transition-colors cursor-pointer",children:g==="accessToken"?m.jsx(wr,{className:"h-3 w-3 text-green-500"}):m.jsx(ya,{className:"h-3 w-3"})})]})]}),m.jsxs("div",{children:[m.jsx("span",{className:"text-muted-foreground font-medium",children:"Refresh Token:"}),m.jsxs("div",{className:"font-mono text-foreground break-all bg-muted/30 p-2 rounded mt-1 relative group",children:[m.jsx("div",{className:"pr-8",children:e.oauthTokens.refresh_token||"N/A"}),m.jsx("button",{onClick:()=>{var D;return O(((D=e.oauthTokens)==null?void 0:D.refresh_token)||"N/A","refreshToken")},className:"absolute top-1 right-1 p-1 text-muted-foreground/50 hover:text-foreground transition-colors cursor-pointer",children:g==="refreshToken"?m.jsx(wr,{className:"h-3 w-3 text-green-500"}):m.jsx(ya,{className:"h-3 w-3"})})]})]}),e.oauthTokens.scope&&m.jsxs("div",{children:[m.jsx("span",{className:"text-muted-foreground font-medium",children:"Scopes:"}),m.jsx("div",{className:"font-mono text-foreground break-all bg-muted/30 p-2 rounded mt-1",children:e.oauthTokens.scope})]})]}),R&&m.jsxs("div",{children:[m.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:"Token Expiry:"}),m.jsx("div",{className:`text-xs font-mono mt-1 bg-muted/30 p-2 rounded ${R.isExpired?"text-red-500":R.isExpiringSoon?"text-yellow-500":"text-green-500"}`,children:R4(R.timeLeft)})]})]}),!x&&m.jsxs("div",{className:"space-y-3",children:[e.config.args&&e.config.args.length>0&&m.jsxs("div",{children:[m.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:"Arguments:"}),m.jsx("div",{className:"space-y-1 mt-1",children:e.config.args.map((D,H)=>m.jsx("div",{className:"text-xs font-mono text-foreground bg-muted/30 p-2 rounded break-all",children:D},H))})]}),e.config.env&&Object.keys(e.config.env).length>0&&m.jsxs("div",{children:[m.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:"Environment:"}),m.jsx("div",{className:"space-y-1 mt-1",children:Object.entries(e.config.env).map(([D,H])=>m.jsxs("div",{className:"text-xs font-mono bg-muted/30 p-2 rounded break-all",children:[m.jsx("span",{className:"text-blue-600",children:D}),"=",m.jsx("span",{className:"text-green-600",children:H})]},D))})]})]})]})]})})})}function zt({className:e,type:t,...n}){return m.jsx("input",{type:t,"data-slot":"input",className:Me("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...n})}function gh({...e}){return m.jsx(k_,{"data-slot":"dialog",...e})}function f7({...e}){return m.jsx(o5,{"data-slot":"dialog-trigger",...e})}function h7({...e}){return m.jsx(T_,{"data-slot":"dialog-portal",...e})}function m7({className:e,...t}){return m.jsx(E_,{"data-slot":"dialog-overlay",className:Me("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function yh({className:e,children:t,showCloseButton:n=!0,...r}){return m.jsxs(h7,{"data-slot":"dialog-portal",children:[m.jsx(m7,{}),m.jsxs(__,{"data-slot":"dialog-content",className:Me("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 p-6 shadow-lg duration-200 sm:max-w-lg",e),...r,children:[t,n&&m.jsxs(A_,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[m.jsx(Fo,{}),m.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function xh({className:e,...t}){return m.jsx("div",{"data-slot":"dialog-header",className:Me("flex flex-col gap-2 text-center sm:text-left",e),...t})}function p7({className:e,...t}){return m.jsx("div",{"data-slot":"dialog-footer",className:Me("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function vh({className:e,...t}){return m.jsx(j_,{"data-slot":"dialog-title",className:Me("text-lg leading-none font-semibold",e),...t})}function g7({className:e,...t}){return m.jsx(N_,{"data-slot":"dialog-description",className:Me("text-muted-foreground text-sm",e),...t})}function ka({...e}){return m.jsx(FL,{"data-slot":"select",...e})}function Ta({...e}){return m.jsx(qL,{"data-slot":"select-value",...e})}function Ea({className:e,size:t="default",children:n,...r}){return m.jsxs($L,{"data-slot":"select-trigger","data-size":t,className:Me("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 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 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[n,m.jsx(GL,{asChild:!0,children:m.jsx(al,{className:"size-4 opacity-50"})})]})}function _a({className:e,children:t,position:n="popper",...r}){return m.jsx(YL,{children:m.jsxs(ZL,{"data-slot":"select-content",className:Me("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]: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 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 shadow-md",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,...r,children:[m.jsx(y7,{}),m.jsx(XL,{className:Me("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(x7,{})]})})}function ar({className:e,children:t,...n}){return m.jsxs(KL,{"data-slot":"select-item",className:Me("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground 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 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...n,children:[m.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:m.jsx(QL,{children:m.jsx(wr,{className:"size-4"})})}),m.jsx(WL,{children:t})]})}function y7({className:e,...t}){return m.jsx(JL,{"data-slot":"select-scroll-up-button",className:Me("flex cursor-default items-center justify-center py-1",e),...t,children:m.jsx(Oj,{className:"size-4"})})}function x7({className:e,...t}){return m.jsx(eI,{"data-slot":"select-scroll-down-button",className:Me("flex cursor-default items-center justify-center py-1",e),...t,children:m.jsx(al,{className:"size-4"})})}function Bj({isOpen:e,onClose:t,onConnect:n}){const[r,s]=w.useState({name:"",type:"stdio",command:"",args:[],url:"",headers:{},env:{},useOAuth:!0,oauthScopes:["mcp:*"],clientId:""}),[o,l]=w.useState(""),[u,d]=w.useState(""),[h,g]=w.useState(""),[p,x]=w.useState(""),[v,S]=w.useState("none"),[C,E]=w.useState(!1),[T,R]=w.useState(null),[O,A]=w.useState([]),M=X=>X.trim()?/^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]$|^[a-zA-Z0-9]$/.test(X.trim())?X.trim().length<3?"Client ID must be at least 3 characters long":X.trim().length>100?"Client ID must be less than 100 characters long":null:"Client ID should contain only letters, numbers, dots, hyphens, and underscores":"Client ID is required when using manual configuration",N=X=>{if(X.preventDefault(),v==="oauth"&&C){const Y=M(h);if(Y){qt.error(Y);return}}if(r.name){let Y={...r};if(r.type==="stdio"&&o){const te=o.split(" ").filter(Z=>Z.trim()),I=te[0]||"",F=te.slice(1);Y={...Y,command:I,args:F};const V=O.reduce((Z,{key:k,value:G})=>(k&&G&&(Z[k]=G),Z),{});Y={...Y,env:V}}if(r.type==="http"){if(v==="none")Y={...Y,useOAuth:!1};else if(v==="bearer"&&p)Y={...Y,headers:{...Y.headers,Authorization:`Bearer ${p}`},useOAuth:!1};else if(v==="oauth"&&r.useOAuth&&u){const te=u.split(" ").filter(I=>I.trim());Y={...Y,oauthScopes:te,clientId:C&&h.trim()||void 0}}}n(Y),P(),t()}},z=()=>{P(),t()},P=()=>{s({name:"",type:"stdio",command:"",args:[],url:"",headers:{},env:{},useOAuth:!0,oauthScopes:["mcp:*"],clientId:""}),l(""),d(""),g(""),x(""),S("none"),E(!1),R(null),A([])},B=()=>{A([...O,{key:"",value:""}])},D=X=>{A(O.filter((Y,te)=>te!==X))},H=(X,Y,te)=>{const I=[...O];I[X][Y]=te,A(I)},$=X=>{g(X),T&&R(null)};return m.jsx(gh,{open:e,onOpenChange:z,children:m.jsxs(yh,{className:"max-w-md sm:max-w-lg",children:[m.jsx(xh,{className:"space-y-2",children:m.jsx(vh,{className:"text-xl font-semibold",children:"Add MCP Server"})}),m.jsxs("form",{onSubmit:N,className:"space-y-6",children:[m.jsxs("div",{className:"space-y-2",children:[m.jsx("label",{className:"block text-sm font-medium text-foreground",children:"Server Name"}),m.jsx(zt,{value:r.name,onChange:X=>s(Y=>({...Y,name:X.target.value})),placeholder:"my-mcp-server",required:!0,className:"h-10"})]}),m.jsxs("div",{className:"space-y-2",children:[m.jsx("label",{className:"block text-sm font-medium text-foreground",children:"Connection Type"}),r.type==="stdio"?m.jsxs("div",{className:"flex",children:[m.jsxs(ka,{value:r.type,onValueChange:X=>s(Y=>({...Y,type:X})),children:[m.jsx(Ea,{className:"w-22 rounded-r-none border-r-0 text-xs border-border",children:m.jsx(Ta,{})}),m.jsxs(_a,{children:[m.jsx(ar,{value:"stdio",children:"STDIO"}),m.jsx(ar,{value:"http",children:"HTTP"})]})]}),m.jsx(zt,{value:o,onChange:X=>l(X.target.value),placeholder:"npx -y @modelcontextprotocol/server-everything",required:!0,className:"flex-1 rounded-l-none text-sm border-border"})]}):m.jsxs("div",{className:"flex",children:[m.jsxs(ka,{value:r.type,onValueChange:X=>s(Y=>({...Y,type:X})),children:[m.jsx(Ea,{className:"w-22 rounded-r-none border-r-0 text-xs border-border",children:m.jsx(Ta,{})}),m.jsxs(_a,{children:[m.jsx(ar,{value:"stdio",children:"STDIO"}),m.jsx(ar,{value:"http",children:"HTTP"})]})]}),m.jsx(zt,{value:r.url,onChange:X=>s(Y=>({...Y,url:X.target.value})),placeholder:"http://localhost:8080/mcp",required:!0,className:"flex-1 rounded-l-none text-sm"})]})]}),r.type==="stdio"&&m.jsxs("div",{className:"space-y-4 p-4 border rounded-lg bg-muted/30 border-border/50",children:[m.jsxs("div",{className:"flex items-center justify-between",children:[m.jsx("label",{className:"text-sm font-medium text-foreground",children:"Environment Variables"}),m.jsx(Je,{type:"button",variant:"outline",size:"sm",onClick:B,className:"h-8 px-2 text-xs cursor-pointer",children:"Add Variable"})]}),O.length>0&&m.jsx("div",{className:"space-y-2",children:O.map((X,Y)=>m.jsxs("div",{className:"flex gap-2",children:[m.jsx(zt,{placeholder:"key",value:X.key,onChange:te=>H(Y,"key",te.target.value),className:"h-8 text-sm"}),m.jsx(zt,{placeholder:"value",value:X.value,onChange:te=>H(Y,"value",te.target.value),className:"h-8 text-sm"}),m.jsx(Je,{type:"button",variant:"outline",size:"sm",onClick:()=>D(Y),className:"h-8 px-2 text-xs",children:"×"})]},Y))})]}),r.type==="http"&&m.jsxs("div",{className:"space-y-4 p-4 border rounded-lg bg-muted/30 border-border/50",children:[m.jsxs("div",{className:"space-y-3",children:[m.jsx("label",{className:"block text-sm font-medium text-foreground",children:"Authentication Method"}),m.jsxs("div",{className:"flex gap-4",children:[m.jsxs("div",{className:"flex items-center space-x-2",children:[m.jsx("input",{type:"radio",id:"none",name:"authType",checked:v==="none",onChange:()=>S("none"),className:"w-4 h-4 cursor-pointer"}),m.jsx("label",{htmlFor:"none",className:"text-sm cursor-pointer",children:"None"})]}),m.jsxs("div",{className:"flex items-center space-x-2",children:[m.jsx("input",{type:"radio",id:"oauth",name:"authType",checked:v==="oauth",onChange:()=>S("oauth"),className:"w-4 h-4 cursor-pointer"}),m.jsx("label",{htmlFor:"oauth",className:"text-sm cursor-pointer",children:"OAuth 2.1"})]}),m.jsxs("div",{className:"flex items-center space-x-2",children:[m.jsx("input",{type:"radio",id:"bearer",name:"authType",checked:v==="bearer",onChange:()=>S("bearer"),className:"w-4 h-4 cursor-pointer"}),m.jsx("label",{htmlFor:"bearer",className:"text-sm cursor-pointer",children:"Bearer Token"})]})]})]}),v==="oauth"&&m.jsxs("div",{className:"space-y-4",children:[m.jsxs("div",{className:"space-y-2",children:[m.jsx("label",{className:"block text-sm font-medium text-foreground",children:"OAuth Scopes"}),m.jsx(zt,{value:u,onChange:X=>d(X.target.value),placeholder:"mcp:* mcp:tools mcp:resources",className:"h-10"}),m.jsx("p",{className:"text-xs text-muted-foreground",children:"Space-separated OAuth scopes. Use 'mcp:*' for full access."})]}),m.jsxs("div",{className:"space-y-3",children:[m.jsxs("div",{className:"space-y-2",children:[m.jsx("label",{className:"block text-sm font-medium text-foreground",children:"Client Registration Method"}),m.jsxs("div",{className:"flex items-center space-x-6",children:[m.jsxs("div",{className:"flex items-center space-x-2",children:[m.jsx("input",{type:"radio",id:"dynamic-registration",name:"clientRegistration",checked:!C,onChange:()=>E(!1),className:"w-4 h-4 cursor-pointer"}),m.jsx("label",{htmlFor:"dynamic-registration",className:"text-sm cursor-pointer",children:"Dynamic Registration"})]}),m.jsxs("div",{className:"flex items-center space-x-2",children:[m.jsx("input",{type:"radio",id:"manual-client-id",name:"clientRegistration",checked:C,onChange:()=>E(!0),className:"w-4 h-4 cursor-pointer"}),m.jsx("label",{htmlFor:"manual-client-id",className:"text-sm cursor-pointer",children:"Manual Client ID"})]})]}),m.jsx("p",{className:"text-xs text-muted-foreground",children:"Dynamic registration lets the server automatically assign a client ID. Manual configuration allows you to specify a pre-registered client ID."})]}),C&&m.jsxs("div",{className:"space-y-2",children:[m.jsxs("label",{className:"block text-sm font-medium text-foreground",children:["Client ID ",m.jsx("span",{className:"text-red-500",children:"*"})]}),m.jsx(zt,{value:h,onChange:X=>$(X.target.value),placeholder:"your-registered-client-id",className:`h-10 ${T?"border-red-500 focus:border-red-500":""}`,required:C}),T?m.jsx("p",{className:"text-xs text-red-600",children:T}):m.jsx("p",{className:"text-xs text-muted-foreground",children:"Enter the client ID that was pre-registered with the OAuth provider. This must match exactly what was configured on the server."})]})]})]}),v==="bearer"&&m.jsxs("div",{className:"space-y-2",children:[m.jsx("label",{className:"block text-sm font-medium text-foreground",children:"Bearer Token"}),m.jsx(zt,{type:"password",value:p,onChange:X=>x(X.target.value),placeholder:"Enter your bearer token",className:"h-10"}),m.jsx("p",{className:"text-xs text-muted-foreground",children:"Token will be sent as Authorization: Bearer <token> header"})]})]}),m.jsxs("div",{className:"flex gap-3 pt-6 border-t",children:[m.jsx(Je,{type:"submit",className:"flex-1 cursor-pointer",children:"Connect Server"}),m.jsx(Je,{type:"button",variant:"outline",onClick:z,className:"flex-1 cursor-pointer",children:"Cancel"})]})]})]})})}function v7({isOpen:e,onClose:t,onUpdate:n,server:r}){const[s,o]=w.useState({name:"",type:"stdio",command:"",args:[],url:"",headers:{},env:{},useOAuth:!0,oauthScopes:["mcp:*"]}),[l,u]=w.useState(""),[d,h]=w.useState(""),[g,p]=w.useState(""),[x,v]=w.useState("none"),[S,C]=w.useState([]),E=N=>{var B,D,H,$;const z=N.config;if("url"in z){const X=((B=z.requestInit)==null?void 0:B.headers)||{},Y=N.oauthTokens!=null;return{name:N.name,type:"http",url:((D=z.url)==null?void 0:D.toString())||"",headers:X,useOAuth:Y,oauthScopes:(($=(H=N.oauthTokens)==null?void 0:H.scope)==null?void 0:$.split(" "))||["mcp:*"]}}else return{name:N.name,type:"stdio",command:z.command||"",args:z.args||[],env:z.env||{}}};w.useEffect(()=>{var N;if(r&&e){const z=E(r);if(o(z),z.type==="stdio"){const P=z.command||"",B=z.args||[];u([P,...B].join(" "));const D=Object.entries(z.env||{}).map(([H,$])=>({key:H,value:$}));C(D)}else{const B=(z.headers||{}).Authorization,D=B==null?void 0:B.startsWith("Bearer ");z.useOAuth?(v("oauth"),h(((N=z.oauthScopes)==null?void 0:N.join(" "))||"mcp:*"),o($=>({...$,useOAuth:!0}))):D?(v("bearer"),p(B.slice(7)),o($=>({...$,useOAuth:!1}))):(v("none"),o($=>({...$,useOAuth:!1})))}}},[r,e]);const T=N=>{if(N.preventDefault(),s.name){let z={...s};if(s.type==="stdio"&&l){const P=l.split(" ").filter($=>$.trim()),B=P[0]||"",D=P.slice(1);z={...z,command:B,args:D};const H=S.reduce(($,{key:X,value:Y})=>(X&&Y&&($[X]=Y),$),{});z={...z,env:H}}if(s.type==="http"){if(x==="none")z={...z,useOAuth:!1,headers:{}};else if(x==="bearer"&&g)z={...z,headers:{...z.headers,Authorization:`Bearer ${g}`},useOAuth:!1};else if(x==="oauth"&&d){const P=d.split(" ").filter(B=>B.trim());z={...z,useOAuth:!0,oauthScopes:P,headers:{}}}}n(r.name,z),t()}},R=()=>{t()},O=()=>{C([...S,{key:"",value:""}])},A=N=>{C(S.filter((z,P)=>P!==N))},M=(N,z,P)=>{const B=[...S];B[N][z]=P,C(B)};return m.jsx(gh,{open:e,onOpenChange:R,children:m.jsxs(yh,{className:"max-w-md sm:max-w-lg",children:[m.jsx(xh,{className:"space-y-2",children:m.jsx(vh,{className:"text-xl font-semibold",children:"Edit MCP Server"})}),m.jsxs("form",{onSubmit:T,className:"space-y-6",children:[m.jsxs("div",{className:"space-y-2",children:[m.jsx("label",{className:"block text-sm font-medium text-foreground",children:"Server Name"}),m.jsx(zt,{value:s.name,onChange:N=>o(z=>({...z,name:N.target.value})),placeholder:"my-mcp-server",required:!0,className:"h-10"})]}),m.jsxs("div",{className:"space-y-2",children:[m.jsx("label",{className:"block text-sm font-medium text-foreground",children:"Connection Type"}),s.type==="stdio"?m.jsxs("div",{className:"flex",children:[m.jsxs(ka,{value:s.type,onValueChange:N=>o(z=>({...z,type:N})),children:[m.jsx(Ea,{className:"w-22 rounded-r-none border-r-0 text-xs border-border",children:m.jsx(Ta,{})}),m.jsxs(_a,{children:[m.jsx(ar,{value:"stdio",children:"STDIO"}),m.jsx(ar,{value:"http",children:"HTTP"})]})]}),m.jsx(zt,{value:l,onChange:N=>u(N.target.value),placeholder:"npx -y @modelcontextprotocol/server-everything",required:!0,className:"flex-1 rounded-l-none text-sm border-border"})]}):m.jsxs("div",{className:"flex",children:[m.jsxs(ka,{value:s.type,onValueChange:N=>o(z=>({...z,type:N})),children:[m.jsx(Ea,{className:"w-22 rounded-r-none border-r-0 text-xs border-border",children:m.jsx(Ta,{})}),m.jsxs(_a,{children:[m.jsx(ar,{value:"stdio",children:"STDIO"}),m.jsx(ar,{value:"http",children:"HTTP"})]})]}),m.jsx(zt,{value:s.url,onChange:N=>o(z=>({...z,url:N.target.value})),placeholder:"http://localhost:8080/mcp",required:!0,className:"flex-1 rounded-l-none text-sm"})]})]}),s.type==="stdio"&&m.jsxs("div",{className:"space-y-4 p-4 border rounded-lg bg-muted/30 border-border/50",children:[m.jsxs("div",{className:"flex items-center justify-between",children:[m.jsx("label",{className:"text-sm font-medium text-foreground",children:"Environment Variables"}),m.jsx(Je,{type:"button",variant:"outline",size:"sm",onClick:O,className:"h-8 px-2 text-xs cursor-pointer",children:"Add Variable"})]}),S.length>0&&m.jsx("div",{className:"space-y-2",children:S.map((N,z)=>m.jsxs("div",{className:"flex gap-2",children:[m.jsx(zt,{placeholder:"key",value:N.key,onChange:P=>M(z,"key",P.target.value),className:"h-8 text-sm"}),m.jsx(zt,{placeholder:"value",value:N.value,onChange:P=>M(z,"value",P.target.value),className:"h-8 text-sm"}),m.jsx(Je,{type:"button",variant:"outline",size:"sm",onClick:()=>A(z),className:"h-8 px-2 text-xs",children:"�"})]},z))})]}),s.type==="http"&&m.jsxs("div",{className:"space-y-4 p-4 border rounded-lg bg-muted/30 border-border/50",children:[m.jsxs("div",{className:"space-y-3",children:[m.jsx("label",{className:"block text-sm font-medium text-foreground",children:"Authentication Method"}),m.jsxs("div",{className:"flex gap-4",children:[m.jsxs("div",{className:"flex items-center space-x-2",children:[m.jsx("input",{type:"radio",id:"none",name:"authType",checked:x==="none",onChange:()=>{v("none"),o(N=>({...N,useOAuth:!1}))},className:"w-4 h-4 cursor-pointer"}),m.jsx("label",{htmlFor:"none",className:"text-sm cursor-pointer",children:"None"})]}),m.jsxs("div",{className:"flex items-center space-x-2",children:[m.jsx("input",{type:"radio",id:"oauth",name:"authType",checked:x==="oauth",onChange:()=>{v("oauth"),o(N=>({...N,useOAuth:!0}))},className:"w-4 h-4 cursor-pointer"}),m.jsx("label",{htmlFor:"oauth",className:"text-sm cursor-pointer",children:"OAuth 2.1"})]}),m.jsxs("div",{className:"flex items-center space-x-2",children:[m.jsx("input",{type:"radio",id:"bearer",name:"authType",checked:x==="bearer",onChange:()=>{v("bearer"),o(N=>({...N,useOAuth:!1}))},className:"w-4 h-4 cursor-pointer"}),m.jsx("label",{htmlFor:"bearer",className:"text-sm cursor-pointer",children:"Bearer Token"})]})]})]}),x==="oauth"&&m.jsxs("div",{className:"space-y-2",children:[m.jsx("label",{className:"block text-sm font-medium text-foreground",children:"OAuth Scopes"}),m.jsx(zt,{value:d,onChange:N=>h(N.target.value),placeholder:"mcp:* mcp:tools mcp:resources",className:"h-10"}),m.jsx("p",{className:"text-xs text-muted-foreground",children:"Space-separated OAuth scopes. Use 'mcp:*' for full access."})]}),x==="bearer"&&m.jsxs("div",{className:"space-y-2",children:[m.jsx("label",{className:"block text-sm font-medium text-foreground",children:"Bearer Token"}),m.jsx(zt,{type:"password",value:g,onChange:N=>p(N.target.value),placeholder:"Enter your bearer token",className:"h-10"}),m.jsx("p",{className:"text-xs text-muted-foreground",children:"Token will be sent as Authorization: Bearer <token> header"})]})]}),m.jsxs("div",{className:"flex gap-3 pt-6 border-t",children:[m.jsx(Je,{type:"submit",className:"flex-1 cursor-pointer",children:"Update Server"}),m.jsx(Je,{type:"button",variant:"outline",onClick:R,className:"flex-1 cursor-pointer",children:"Cancel"})]})]})]})})}const bh=ye.forwardRef(({className:e,...t},n)=>m.jsxs("svg",{ref:n,fill:"currentColor",fillRule:"evenodd",height:"1em",style:{flex:"none",lineHeight:1},viewBox:"0 0 24 24",width:"1em",xmlns:"http://www.w3.org/2000/svg",className:e,...t,children:[m.jsx("title",{children:"ModelContextProtocol"}),m.jsx("path",{d:"M15.688 2.343a2.588 2.588 0 00-3.61 0l-9.626 9.44a.863.863 0 01-1.203 0 .823.823 0 010-1.18l9.626-9.44a4.313 4.313 0 016.016 0 4.116 4.116 0 011.204 3.54 4.3 4.3 0 013.609 1.18l.05.05a4.115 4.115 0 010 5.9l-8.706 8.537a.274.274 0 000 .393l1.788 1.754a.823.823 0 010 1.18.863.863 0 01-1.203 0l-1.788-1.753a1.92 1.92 0 010-2.754l8.706-8.538a2.47 2.47 0 000-3.54l-.05-.049a2.588 2.588 0 00-3.607-.003l-7.172 7.034-.002.002-.098.097a.863.863 0 01-1.204 0 .823.823 0 010-1.18l7.273-7.133a2.47 2.47 0 00-.003-3.537z"}),m.jsx("path",{d:"M14.485 4.703a.823.823 0 000-1.18.863.863 0 00-1.204 0l-7.119 6.982a4.115 4.115 0 000 5.9 4.314 4.314 0 006.016 0l7.12-6.982a.823.823 0 000-1.18.863.863 0 00-1.204 0l-7.119 6.982a2.588 2.588 0 01-3.61 0 2.47 2.47 0 010-3.54l7.12-6.982z"})]}));bh.displayName="MCPIcon";function b7({connectedServerConfigs:e,onConnect:t,onDisconnect:n,onReconnect:r,onUpdate:s}){const[o,l]=w.useState(!1),[u,d]=w.useState(!1),[h,g]=w.useState(null),[p,x]=w.useState(""),[v,S]=w.useState("all");w.useEffect(()=>{Object.keys(e).forEach(O=>{r(O)})},[]);const C=Object.entries(e).filter(([O,A])=>{const M=O.toLowerCase().includes(p.toLowerCase()),N=v==="all"||v==="stdio"&&"command"in A.config||v==="http"&&"url"in A.config;return M&&N}),E=Object.keys(e).length,T=O=>{g(O),d(!0)},R=()=>{d(!1),g(null)};return m.jsxs("div",{className:"space-y-6 p-8",children:[m.jsxs("div",{className:"flex items-center justify-between",children:[m.jsx("div",{children:m.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"MCP Servers"})}),m.jsxs(Je,{onClick:()=>l(!0),className:"cursor-pointer",children:[m.jsx(CC,{className:"h-4 w-4 mr-2"}),"Add Server"]})]}),E>0?m.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-6",children:C.map(([O,A])=>m.jsx(d7,{server:A,onDisconnect:n,onReconnect:r,onEdit:T},O))}):m.jsx(wa,{className:"p-12 text-center",children:m.jsxs("div",{className:"mx-auto max-w-sm",children:[m.jsx(bh,{className:"mx-auto h-12 w-12 text-muted-foreground"}),m.jsx("h3",{className:"mt-4 text-lg font-semibold",children:"No servers connected"}),m.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Get started by connecting to your first MCP server"}),m.jsxs(Je,{onClick:()=>l(!0),className:"mt-4 cursor-pointer",children:[m.jsx(CC,{className:"h-4 w-4 mr-2"}),"Add Your First Server"]})]})}),C.length===0&&E>0&&m.jsx(wa,{className:"p-8 text-center",children:m.jsxs("div",{className:"mx-auto max-w-sm",children:[m.jsx(GI,{className:"mx-auto h-8 w-8 text-muted-foreground"}),m.jsx("h3",{className:"mt-4 text-lg font-semibold",children:"No servers found"}),m.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Try adjusting your search or filter criteria"})]})}),m.jsx(Bj,{isOpen:o,onClose:()=>l(!1),onConnect:t}),h&&m.jsx(v7,{isOpen:u,onClose:R,onUpdate:s,server:h})]})}const _C={error:0,warn:1,info:2,debug:3,trace:4},w7={error:"#ef4444",warn:"#f59e0b",info:"#3b82f6",debug:"#8b5cf6",trace:"#6b7280"};class S7{constructor(){ua(this,"config",{level:"info",enableConsole:!0,maxBufferSize:1e3});ua(this,"buffer",[]);ua(this,"listeners",new Set)}setConfig(t){this.config={...this.config,...t},this.notifyListeners()}getConfig(){return{...this.config}}addEntry(t){this.buffer.push(t),this.buffer.length>this.config.maxBufferSize&&(this.buffer=this.buffer.slice(-this.config.maxBufferSize)),this.notifyListeners()}getEntries(){return[...this.buffer]}getFilteredEntries(t,n){let r=this.buffer;if(t&&(r=r.filter(s=>s.level===t)),n){const s=n.toLowerCase();r=r.filter(o=>o.context.toLowerCase().includes(s))}return r}clearBuffer(){this.buffer=[],this.notifyListeners()}subscribe(t){return this.listeners.add(t),()=>this.listeners.delete(t)}notifyListeners(){this.listeners.forEach(t=>t())}shouldLog(t){return _C[t]<=_C[this.config.level]}}const nr=new S7;typeof window<"u"&&nr.setConfig({level:"info",enableConsole:!0});function Vj(e="Unknown"){const t=w.useCallback(r=>(s,o,l)=>{if(!nr.shouldLog(r))return;const d={timestamp:new Date().toISOString(),level:r,context:e,message:s,data:o,error:l};nr.addEntry(d),nr.getConfig().enableConsole&&C7(d)},[e]);return w.useMemo(()=>({error:t("error"),warn:t("warn"),info:t("info"),debug:t("debug"),trace:t("trace"),context:e}),[t,e])}function C7(e){const{timestamp:t,level:n,context:r,message:s,data:o,error:l}=e,u=new Date(t).toLocaleTimeString(),d=w7[n],h=`color: ${d}; font-weight: bold;`,g=`color: ${d};`,p=[`%c[${u}] %c${n.toUpperCase()} %c[${r}] %c${s}`,"color: #6b7280;",h,"color: #6b7280;",g];o!==void 0&&p.push(`
314
+ Data:`,o),l&&p.push(`
315
+ Error:`,l),(n==="error"?console.error:n==="warn"?console.warn:n==="debug"?console.debug:console.log)(...p)}function k7(){const[,e]=w.useState({});return w.useEffect(()=>{const t=nr.subscribe(()=>{e({})});return()=>{t()}},[]),{entries:nr.getEntries(),config:nr.getConfig(),setConfig:nr.setConfig.bind(nr),clearBuffer:nr.clearBuffer.bind(nr),getFilteredEntries:nr.getFilteredEntries.bind(nr)}}function cu({className:e,...t}){return m.jsx("textarea",{"data-slot":"textarea",className:Me("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...t})}const T7=Sv("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function zr({className:e,variant:t,asChild:n=!1,...r}){const s=n?Fx:"span";return m.jsx(s,{"data-slot":"badge",className:Me(T7({variant:t}),e),...r})}function ba({className:e,children:t,...n}){return m.jsxs(yL,{"data-slot":"scroll-area",className:Me("relative",e),...n,children:[m.jsx(xL,{"data-slot":"scroll-area-viewport",className:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",children:t}),m.jsx(E7,{}),m.jsx(vL,{})]})}function E7({className:e,orientation:t="vertical",...n}){return m.jsx(V2,{"data-slot":"scroll-area-scrollbar",orientation:t,className:Me("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($2,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})}const wh=w.createContext(null);wh.displayName="PanelGroupContext";const Lt={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},Cv=10,fs=w.useLayoutEffect,jC=Vx.useId,_7=typeof jC=="function"?jC:()=>null;let j7=0;function kv(e=null){const t=_7(),n=w.useRef(e||t||null);return n.current===null&&(n.current=""+j7++),e??n.current}function Uj({children:e,className:t="",collapsedSize:n,collapsible:r,defaultSize:s,forwardedRef:o,id:l,maxSize:u,minSize:d,onCollapse:h,onExpand:g,onResize:p,order:x,style:v,tagName:S="div",...C}){const E=w.useContext(wh);if(E===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:T,expandPanel:R,getPanelSize:O,getPanelStyle:A,groupId:M,isPanelCollapsed:N,reevaluatePanelConstraints:z,registerPanel:P,resizePanel:B,unregisterPanel:D}=E,H=kv(l),$=w.useRef({callbacks:{onCollapse:h,onExpand:g,onResize:p},constraints:{collapsedSize:n,collapsible:r,defaultSize:s,maxSize:u,minSize:d},id:H,idIsFromProps:l!==void 0,order:x});w.useRef({didLogMissingDefaultSizeWarning:!1}),fs(()=>{const{callbacks:Y,constraints:te}=$.current,I={...te};$.current.id=H,$.current.idIsFromProps=l!==void 0,$.current.order=x,Y.onCollapse=h,Y.onExpand=g,Y.onResize=p,te.collapsedSize=n,te.collapsible=r,te.defaultSize=s,te.maxSize=u,te.minSize=d,(I.collapsedSize!==te.collapsedSize||I.collapsible!==te.collapsible||I.maxSize!==te.maxSize||I.minSize!==te.minSize)&&z($.current,I)}),fs(()=>{const Y=$.current;return P(Y),()=>{D(Y)}},[x,H,P,D]),w.useImperativeHandle(o,()=>({collapse:()=>{T($.current)},expand:Y=>{R($.current,Y)},getId(){return H},getSize(){return O($.current)},isCollapsed(){return N($.current)},isExpanded(){return!N($.current)},resize:Y=>{B($.current,Y)}}),[T,R,O,N,H,B]);const X=A($.current,s);return w.createElement(S,{...C,children:e,className:t,id:H,style:{...X,...v},[Lt.groupId]:M,[Lt.panel]:"",[Lt.panelCollapsible]:r||void 0,[Lt.panelId]:H,[Lt.panelSize]:parseFloat(""+X.flexGrow).toFixed(1)})}const Hj=w.forwardRef((e,t)=>w.createElement(Uj,{...e,forwardedRef:t}));Uj.displayName="Panel";Hj.displayName="forwardRef(Panel)";let _y=null,rf=-1,xa=null;function N7(e,t){if(t){const n=(t&Yj)!==0,r=(t&Zj)!==0,s=(t&Xj)!==0,o=(t&Kj)!==0;if(n)return s?"se-resize":o?"ne-resize":"e-resize";if(r)return s?"sw-resize":o?"nw-resize":"w-resize";if(s)return"s-resize";if(o)return"n-resize"}switch(e){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function A7(){xa!==null&&(document.head.removeChild(xa),_y=null,xa=null,rf=-1)}function yg(e,t){var n,r;const s=N7(e,t);if(_y!==s){if(_y=s,xa===null&&(xa=document.createElement("style"),document.head.appendChild(xa)),rf>=0){var o;(o=xa.sheet)===null||o===void 0||o.removeRule(rf)}rf=(n=(r=xa.sheet)===null||r===void 0?void 0:r.insertRule(`*{cursor: ${s} !important;}`))!==null&&n!==void 0?n:-1}}function Fj(e){return e.type==="keydown"}function $j(e){return e.type.startsWith("pointer")}function qj(e){return e.type.startsWith("mouse")}function Sh(e){if($j(e)){if(e.isPrimary)return{x:e.clientX,y:e.clientY}}else if(qj(e))return{x:e.clientX,y:e.clientY};return{x:1/0,y:1/0}}function R7(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function M7(e,t,n){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function O7(e,t){if(e===t)throw new Error("Cannot compare node with itself");const n={a:RC(e),b:RC(t)};let r;for(;n.a.at(-1)===n.b.at(-1);)e=n.a.pop(),t=n.b.pop(),r=e;Xe(r,"Stacking order can only be calculated for elements with a common ancestor");const s={a:AC(NC(n.a)),b:AC(NC(n.b))};if(s.a===s.b){const o=r.childNodes,l={a:n.a.at(-1),b:n.b.at(-1)};let u=o.length;for(;u--;){const d=o[u];if(d===l.a)return 1;if(d===l.b)return-1}}return Math.sign(s.a-s.b)}const D7=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function P7(e){var t;const n=getComputedStyle((t=Gj(e))!==null&&t!==void 0?t:e).display;return n==="flex"||n==="inline-flex"}function z7(e){const t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||P7(e))||+t.opacity<1||"transform"in t&&t.transform!=="none"||"webkitTransform"in t&&t.webkitTransform!=="none"||"mixBlendMode"in t&&t.mixBlendMode!=="normal"||"filter"in t&&t.filter!=="none"||"webkitFilter"in t&&t.webkitFilter!=="none"||"isolation"in t&&t.isolation==="isolate"||D7.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function NC(e){let t=e.length;for(;t--;){const n=e[t];if(Xe(n,"Missing node"),z7(n))return n}return null}function AC(e){return e&&Number(getComputedStyle(e).zIndex)||0}function RC(e){const t=[];for(;e;)t.push(e),e=Gj(e);return t}function Gj(e){const{parentNode:t}=e;return t&&t instanceof ShadowRoot?t.host:t}const Yj=1,Zj=2,Xj=4,Kj=8,L7=R7()==="coarse";let Ir=[],Po=!1,va=new Map,Ch=new Map;const Uc=new Set;function I7(e,t,n,r,s){var o;const{ownerDocument:l}=t,u={direction:n,element:t,hitAreaMargins:r,setResizeHandlerState:s},d=(o=va.get(l))!==null&&o!==void 0?o:0;return va.set(l,d+1),Uc.add(u),Cf(),function(){var g;Ch.delete(e),Uc.delete(u);const p=(g=va.get(l))!==null&&g!==void 0?g:1;if(va.set(l,p-1),Cf(),p===1&&va.delete(l),Ir.includes(u)){const x=Ir.indexOf(u);x>=0&&Ir.splice(x,1),Ev(),s("up",!0,null)}}}function B7(e){const{target:t}=e,{x:n,y:r}=Sh(e);Po=!0,Tv({target:t,x:n,y:r}),Cf(),Ir.length>0&&(kf("down",e),e.preventDefault(),Wj(t)||e.stopImmediatePropagation())}function xg(e){const{x:t,y:n}=Sh(e);if(Po&&e.buttons===0&&(Po=!1,kf("up",e)),!Po){const{target:r}=e;Tv({target:r,x:t,y:n})}kf("move",e),Ev(),Ir.length>0&&e.preventDefault()}function vg(e){const{target:t}=e,{x:n,y:r}=Sh(e);Ch.clear(),Po=!1,Ir.length>0&&(e.preventDefault(),Wj(t)||e.stopImmediatePropagation()),kf("up",e),Tv({target:t,x:n,y:r}),Ev(),Cf()}function Wj(e){let t=e;for(;t;){if(t.hasAttribute(Lt.resizeHandle))return!0;t=t.parentElement}return!1}function Tv({target:e,x:t,y:n}){Ir.splice(0);let r=null;(e instanceof HTMLElement||e instanceof SVGElement)&&(r=e),Uc.forEach(s=>{const{element:o,hitAreaMargins:l}=s,u=o.getBoundingClientRect(),{bottom:d,left:h,right:g,top:p}=u,x=L7?l.coarse:l.fine;if(t>=h-x&&t<=g+x&&n>=p-x&&n<=d+x){if(r!==null&&document.contains(r)&&o!==r&&!o.contains(r)&&!r.contains(o)&&O7(r,o)>0){let S=r,C=!1;for(;S&&!S.contains(o);){if(M7(S.getBoundingClientRect(),u)){C=!0;break}S=S.parentElement}if(C)return}Ir.push(s)}})}function bg(e,t){Ch.set(e,t)}function Ev(){let e=!1,t=!1;Ir.forEach(r=>{const{direction:s}=r;s==="horizontal"?e=!0:t=!0});let n=0;Ch.forEach(r=>{n|=r}),e&&t?yg("intersection",n):e?yg("horizontal",n):t?yg("vertical",n):A7()}let wg;function Cf(){var e;(e=wg)===null||e===void 0||e.abort(),wg=new AbortController;const t={capture:!0,signal:wg.signal};Uc.size&&(Po?(Ir.length>0&&va.forEach((n,r)=>{const{body:s}=r;n>0&&(s.addEventListener("contextmenu",vg,t),s.addEventListener("pointerleave",xg,t),s.addEventListener("pointermove",xg,t))}),va.forEach((n,r)=>{const{body:s}=r;s.addEventListener("pointerup",vg,t),s.addEventListener("pointercancel",vg,t)})):va.forEach((n,r)=>{const{body:s}=r;n>0&&(s.addEventListener("pointerdown",B7,t),s.addEventListener("pointermove",xg,t))}))}function kf(e,t){Uc.forEach(n=>{const{setResizeHandlerState:r}=n,s=Ir.includes(n);r(e,s,t)})}function V7(){const[e,t]=w.useState(0);return w.useCallback(()=>t(n=>n+1),[])}function Xe(e,t){if(!e)throw console.error(t),Error(t)}function bs(e,t,n=Cv){return e.toFixed(n)===t.toFixed(n)?0:e>t?1:-1}function Ai(e,t,n=Cv){return bs(e,t,n)===0}function rr(e,t,n){return bs(e,t,n)===0}function U7(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){const s=e[r],o=t[r];if(!rr(s,o,n))return!1}return!0}function _o({panelConstraints:e,panelIndex:t,size:n}){const r=e[t];Xe(r!=null,`Panel constraints not found for index ${t}`);let{collapsedSize:s=0,collapsible:o,maxSize:l=100,minSize:u=0}=r;if(bs(n,u)<0)if(o){const d=(s+u)/2;bs(n,d)<0?n=s:n=u}else n=u;return n=Math.min(l,n),n=parseFloat(n.toFixed(Cv)),n}function Sc({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:s,trigger:o}){if(rr(e,0))return t;const l=[...t],[u,d]=r;Xe(u!=null,"Invalid first pivot index"),Xe(d!=null,"Invalid second pivot index");let h=0;if(o==="keyboard"){{const p=e<0?d:u,x=n[p];Xe(x,`Panel constraints not found for index ${p}`);const{collapsedSize:v=0,collapsible:S,minSize:C=0}=x;if(S){const E=t[p];if(Xe(E!=null,`Previous layout not found for panel index ${p}`),rr(E,v)){const T=C-E;bs(T,Math.abs(e))>0&&(e=e<0?0-T:T)}}}{const p=e<0?u:d,x=n[p];Xe(x,`No panel constraints found for index ${p}`);const{collapsedSize:v=0,collapsible:S,minSize:C=0}=x;if(S){const E=t[p];if(Xe(E!=null,`Previous layout not found for panel index ${p}`),rr(E,C)){const T=E-v;bs(T,Math.abs(e))>0&&(e=e<0?0-T:T)}}}}{const p=e<0?1:-1;let x=e<0?d:u,v=0;for(;;){const C=t[x];Xe(C!=null,`Previous layout not found for panel index ${x}`);const T=_o({panelConstraints:n,panelIndex:x,size:100})-C;if(v+=T,x+=p,x<0||x>=n.length)break}const S=Math.min(Math.abs(e),Math.abs(v));e=e<0?0-S:S}{let x=e<0?u:d;for(;x>=0&&x<n.length;){const v=Math.abs(e)-Math.abs(h),S=t[x];Xe(S!=null,`Previous layout not found for panel index ${x}`);const C=S-v,E=_o({panelConstraints:n,panelIndex:x,size:C});if(!rr(S,E)&&(h+=S-E,l[x]=E,h.toPrecision(3).localeCompare(Math.abs(e).toPrecision(3),void 0,{numeric:!0})>=0))break;e<0?x--:x++}}if(U7(s,l))return s;{const p=e<0?d:u,x=t[p];Xe(x!=null,`Previous layout not found for panel index ${p}`);const v=x+h,S=_o({panelConstraints:n,panelIndex:p,size:v});if(l[p]=S,!rr(S,v)){let C=v-S,T=e<0?d:u;for(;T>=0&&T<n.length;){const R=l[T];Xe(R!=null,`Previous layout not found for panel index ${T}`);const O=R+C,A=_o({panelConstraints:n,panelIndex:T,size:O});if(rr(R,A)||(C-=A-R,l[T]=A),rr(C,0))break;e>0?T--:T++}}}const g=l.reduce((p,x)=>x+p,0);return rr(g,100)?l:s}function H7({layout:e,panelsArray:t,pivotIndices:n}){let r=0,s=100,o=0,l=0;const u=n[0];Xe(u!=null,"No pivot index found"),t.forEach((p,x)=>{const{constraints:v}=p,{maxSize:S=100,minSize:C=0}=v;x===u?(r=C,s=S):(o+=C,l+=S)});const d=Math.min(s,100-o),h=Math.max(r,100-l),g=e[u];return{valueMax:d,valueMin:h,valueNow:g}}function Hc(e,t=document){return Array.from(t.querySelectorAll(`[${Lt.resizeHandleId}][data-panel-group-id="${e}"]`))}function Qj(e,t,n=document){const s=Hc(e,n).findIndex(o=>o.getAttribute(Lt.resizeHandleId)===t);return s??null}function Jj(e,t,n){const r=Qj(e,t,n);return r!=null?[r,r+1]:[-1,-1]}function F7(e){return e instanceof HTMLElement?!0:typeof e=="object"&&e!==null&&"tagName"in e&&"getAttribute"in e}function eN(e,t=document){if(F7(t)&&t.dataset.panelGroupId==e)return t;const n=t.querySelector(`[data-panel-group][data-panel-group-id="${e}"]`);return n||null}function kh(e,t=document){const n=t.querySelector(`[${Lt.resizeHandleId}="${e}"]`);return n||null}function $7(e,t,n,r=document){var s,o,l,u;const d=kh(t,r),h=Hc(e,r),g=d?h.indexOf(d):-1,p=(s=(o=n[g])===null||o===void 0?void 0:o.id)!==null&&s!==void 0?s:null,x=(l=(u=n[g+1])===null||u===void 0?void 0:u.id)!==null&&l!==void 0?l:null;return[p,x]}function q7({committedValuesRef:e,eagerValuesRef:t,groupId:n,layout:r,panelDataArray:s,panelGroupElement:o,setLayout:l}){w.useRef({didWarnAboutMissingResizeHandle:!1}),fs(()=>{if(!o)return;const u=Hc(n,o);for(let d=0;d<s.length-1;d++){const{valueMax:h,valueMin:g,valueNow:p}=H7({layout:r,panelsArray:s,pivotIndices:[d,d+1]}),x=u[d];if(x!=null){const v=s[d];Xe(v,`No panel data found for index "${d}"`),x.setAttribute("aria-controls",v.id),x.setAttribute("aria-valuemax",""+Math.round(h)),x.setAttribute("aria-valuemin",""+Math.round(g)),x.setAttribute("aria-valuenow",p!=null?""+Math.round(p):"")}}return()=>{u.forEach((d,h)=>{d.removeAttribute("aria-controls"),d.removeAttribute("aria-valuemax"),d.removeAttribute("aria-valuemin"),d.removeAttribute("aria-valuenow")})}},[n,r,s,o]),w.useEffect(()=>{if(!o)return;const u=t.current;Xe(u,"Eager values not found");const{panelDataArray:d}=u,h=eN(n,o);Xe(h!=null,`No group found for id "${n}"`);const g=Hc(n,o);Xe(g,`No resize handles found for group id "${n}"`);const p=g.map(x=>{const v=x.getAttribute(Lt.resizeHandleId);Xe(v,"Resize handle element has no handle id attribute");const[S,C]=$7(n,v,d,o);if(S==null||C==null)return()=>{};const E=T=>{if(!T.defaultPrevented)switch(T.key){case"Enter":{T.preventDefault();const R=d.findIndex(O=>O.id===S);if(R>=0){const O=d[R];Xe(O,`No panel data found for index ${R}`);const A=r[R],{collapsedSize:M=0,collapsible:N,minSize:z=0}=O.constraints;if(A!=null&&N){const P=Sc({delta:rr(A,M)?z-M:M-A,initialLayout:r,panelConstraints:d.map(B=>B.constraints),pivotIndices:Jj(n,v,o),prevLayout:r,trigger:"keyboard"});r!==P&&l(P)}}break}}};return x.addEventListener("keydown",E),()=>{x.removeEventListener("keydown",E)}});return()=>{p.forEach(x=>x())}},[o,e,t,n,r,s,l])}function MC(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function tN(e,t){const n=e==="horizontal",{x:r,y:s}=Sh(t);return n?r:s}function G7(e,t,n,r,s){const o=n==="horizontal",l=kh(t,s);Xe(l,`No resize handle element found for id "${t}"`);const u=l.getAttribute(Lt.groupId);Xe(u,"Resize handle element has no group id attribute");let{initialCursorPosition:d}=r;const h=tN(n,e),g=eN(u,s);Xe(g,`No group element found for id "${u}"`);const p=g.getBoundingClientRect(),x=o?p.width:p.height;return(h-d)/x*100}function Y7(e,t,n,r,s,o){if(Fj(e)){const l=n==="horizontal";let u=0;e.shiftKey?u=100:s!=null?u=s:u=10;let d=0;switch(e.key){case"ArrowDown":d=l?0:u;break;case"ArrowLeft":d=l?-u:0;break;case"ArrowRight":d=l?u:0;break;case"ArrowUp":d=l?0:-u;break;case"End":d=100;break;case"Home":d=-100;break}return d}else return r==null?0:G7(e,t,n,r,o)}function Z7({panelDataArray:e}){const t=Array(e.length),n=e.map(o=>o.constraints);let r=0,s=100;for(let o=0;o<e.length;o++){const l=n[o];Xe(l,`Panel constraints not found for index ${o}`);const{defaultSize:u}=l;u!=null&&(r++,t[o]=u,s-=u)}for(let o=0;o<e.length;o++){const l=n[o];Xe(l,`Panel constraints not found for index ${o}`);const{defaultSize:u}=l;if(u!=null)continue;const d=e.length-r,h=s/d;r++,t[o]=h,s-=h}return t}function bo(e,t,n){t.forEach((r,s)=>{const o=e[s];Xe(o,`Panel data not found for index ${s}`);const{callbacks:l,constraints:u,id:d}=o,{collapsedSize:h=0,collapsible:g}=u,p=n[d];if(p==null||r!==p){n[d]=r;const{onCollapse:x,onExpand:v,onResize:S}=l;S&&S(r,p),g&&(x||v)&&(v&&(p==null||Ai(p,h))&&!Ai(r,h)&&v(),x&&(p==null||!Ai(p,h))&&Ai(r,h)&&x())}})}function Hd(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function X7({defaultSize:e,dragState:t,layout:n,panelData:r,panelIndex:s,precision:o=3}){const l=n[s];let u;return l==null?u=e!=null?e.toPrecision(o):"1":r.length===1?u="1":u=l.toPrecision(o),{flexBasis:0,flexGrow:u,flexShrink:1,overflow:"hidden",pointerEvents:t!==null?"none":void 0}}function K7(e,t=10){let n=null;return(...s)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...s)},t)}}function OC(e){try{if(typeof localStorage<"u")e.getItem=t=>localStorage.getItem(t),e.setItem=(t,n)=>{localStorage.setItem(t,n)};else throw new Error("localStorage not supported in this environment")}catch(t){console.error(t),e.getItem=()=>null,e.setItem=()=>{}}}function nN(e){return`react-resizable-panels:${e}`}function rN(e){return e.map(t=>{const{constraints:n,id:r,idIsFromProps:s,order:o}=t;return s?r:o?`${o}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((t,n)=>t.localeCompare(n)).join(",")}function iN(e,t){try{const n=nN(e),r=t.getItem(n);if(r){const s=JSON.parse(r);if(typeof s=="object"&&s!=null)return s}}catch{}return null}function W7(e,t,n){var r,s;const o=(r=iN(e,n))!==null&&r!==void 0?r:{},l=rN(t);return(s=o[l])!==null&&s!==void 0?s:null}function Q7(e,t,n,r,s){var o;const l=nN(e),u=rN(t),d=(o=iN(e,s))!==null&&o!==void 0?o:{};d[u]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{s.setItem(l,JSON.stringify(d))}catch(h){console.error(h)}}function DC({layout:e,panelConstraints:t}){const n=[...e],r=n.reduce((o,l)=>o+l,0);if(n.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${n.map(o=>`${o}%`).join(", ")}`);if(!rr(r,100)&&n.length>0)for(let o=0;o<t.length;o++){const l=n[o];Xe(l!=null,`No layout data found for index ${o}`);const u=100/r*l;n[o]=u}let s=0;for(let o=0;o<t.length;o++){const l=n[o];Xe(l!=null,`No layout data found for index ${o}`);const u=_o({panelConstraints:t,panelIndex:o,size:l});l!=u&&(s+=l-u,n[o]=u)}if(!rr(s,0))for(let o=0;o<t.length;o++){const l=n[o];Xe(l!=null,`No layout data found for index ${o}`);const u=l+s,d=_o({panelConstraints:t,panelIndex:o,size:u});if(l!==d&&(s-=d-l,n[o]=d,rr(s,0)))break}return n}const J7=100,Cc={getItem:e=>(OC(Cc),Cc.getItem(e)),setItem:(e,t)=>{OC(Cc),Cc.setItem(e,t)}},PC={};function aN({autoSaveId:e=null,children:t,className:n="",direction:r,forwardedRef:s,id:o=null,onLayout:l=null,keyboardResizeBy:u=null,storage:d=Cc,style:h,tagName:g="div",...p}){const x=kv(o),v=w.useRef(null),[S,C]=w.useState(null),[E,T]=w.useState([]),R=V7(),O=w.useRef({}),A=w.useRef(new Map),M=w.useRef(0),N=w.useRef({autoSaveId:e,direction:r,dragState:S,id:x,keyboardResizeBy:u,onLayout:l,storage:d}),z=w.useRef({layout:E,panelDataArray:[],panelDataArrayChanged:!1});w.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),w.useImperativeHandle(s,()=>({getId:()=>N.current.id,getLayout:()=>{const{layout:j}=z.current;return j},setLayout:j=>{const{onLayout:Q}=N.current,{layout:ee,panelDataArray:W}=z.current,K=DC({layout:j,panelConstraints:W.map(oe=>oe.constraints)});MC(ee,K)||(T(K),z.current.layout=K,Q&&Q(K),bo(W,K,O.current))}}),[]),fs(()=>{N.current.autoSaveId=e,N.current.direction=r,N.current.dragState=S,N.current.id=x,N.current.onLayout=l,N.current.storage=d}),q7({committedValuesRef:N,eagerValuesRef:z,groupId:x,layout:E,panelDataArray:z.current.panelDataArray,setLayout:T,panelGroupElement:v.current}),w.useEffect(()=>{const{panelDataArray:j}=z.current;if(e){if(E.length===0||E.length!==j.length)return;let Q=PC[e];Q==null&&(Q=K7(Q7,J7),PC[e]=Q);const ee=[...j],W=new Map(A.current);Q(e,ee,W,E,d)}},[e,E,d]),w.useEffect(()=>{});const P=w.useCallback(j=>{const{onLayout:Q}=N.current,{layout:ee,panelDataArray:W}=z.current;if(j.constraints.collapsible){const K=W.map(be=>be.constraints),{collapsedSize:oe=0,panelSize:ce,pivotIndices:me}=ns(W,j,ee);if(Xe(ce!=null,`Panel size not found for panel "${j.id}"`),!Ai(ce,oe)){A.current.set(j.id,ce);const Te=ko(W,j)===W.length-1?ce-oe:oe-ce,Ve=Sc({delta:Te,initialLayout:ee,panelConstraints:K,pivotIndices:me,prevLayout:ee,trigger:"imperative-api"});Hd(ee,Ve)||(T(Ve),z.current.layout=Ve,Q&&Q(Ve),bo(W,Ve,O.current))}}},[]),B=w.useCallback((j,Q)=>{const{onLayout:ee}=N.current,{layout:W,panelDataArray:K}=z.current;if(j.constraints.collapsible){const oe=K.map(lt=>lt.constraints),{collapsedSize:ce=0,panelSize:me=0,minSize:be=0,pivotIndices:Te}=ns(K,j,W),Ve=Q??be;if(Ai(me,ce)){const lt=A.current.get(j.id),Mt=lt!=null&&lt>=Ve?lt:Ve,st=ko(K,j)===K.length-1?me-Mt:Mt-me,yt=Sc({delta:st,initialLayout:W,panelConstraints:oe,pivotIndices:Te,prevLayout:W,trigger:"imperative-api"});Hd(W,yt)||(T(yt),z.current.layout=yt,ee&&ee(yt),bo(K,yt,O.current))}}},[]),D=w.useCallback(j=>{const{layout:Q,panelDataArray:ee}=z.current,{panelSize:W}=ns(ee,j,Q);return Xe(W!=null,`Panel size not found for panel "${j.id}"`),W},[]),H=w.useCallback((j,Q)=>{const{panelDataArray:ee}=z.current,W=ko(ee,j);return X7({defaultSize:Q,dragState:S,layout:E,panelData:ee,panelIndex:W})},[S,E]),$=w.useCallback(j=>{const{layout:Q,panelDataArray:ee}=z.current,{collapsedSize:W=0,collapsible:K,panelSize:oe}=ns(ee,j,Q);return Xe(oe!=null,`Panel size not found for panel "${j.id}"`),K===!0&&Ai(oe,W)},[]),X=w.useCallback(j=>{const{layout:Q,panelDataArray:ee}=z.current,{collapsedSize:W=0,collapsible:K,panelSize:oe}=ns(ee,j,Q);return Xe(oe!=null,`Panel size not found for panel "${j.id}"`),!K||bs(oe,W)>0},[]),Y=w.useCallback(j=>{const{panelDataArray:Q}=z.current;Q.push(j),Q.sort((ee,W)=>{const K=ee.order,oe=W.order;return K==null&&oe==null?0:K==null?-1:oe==null?1:K-oe}),z.current.panelDataArrayChanged=!0,R()},[R]);fs(()=>{if(z.current.panelDataArrayChanged){z.current.panelDataArrayChanged=!1;const{autoSaveId:j,onLayout:Q,storage:ee}=N.current,{layout:W,panelDataArray:K}=z.current;let oe=null;if(j){const me=W7(j,K,ee);me&&(A.current=new Map(Object.entries(me.expandToSizes)),oe=me.layout)}oe==null&&(oe=Z7({panelDataArray:K}));const ce=DC({layout:oe,panelConstraints:K.map(me=>me.constraints)});MC(W,ce)||(T(ce),z.current.layout=ce,Q&&Q(ce),bo(K,ce,O.current))}}),fs(()=>{const j=z.current;return()=>{j.layout=[]}},[]);const te=w.useCallback(j=>{let Q=!1;const ee=v.current;return ee&&window.getComputedStyle(ee,null).getPropertyValue("direction")==="rtl"&&(Q=!0),function(K){K.preventDefault();const oe=v.current;if(!oe)return()=>null;const{direction:ce,dragState:me,id:be,keyboardResizeBy:Te,onLayout:Ve}=N.current,{layout:lt,panelDataArray:Mt}=z.current,{initialLayout:It}=me??{},st=Jj(be,j,oe);let yt=Y7(K,j,ce,me,Te,oe);const Ct=ce==="horizontal";Ct&&Q&&(yt=-yt);const lr=Mt.map(Yn=>Yn.constraints),Jt=Sc({delta:yt,initialLayout:It??lt,panelConstraints:lr,pivotIndices:st,prevLayout:lt,trigger:Fj(K)?"keyboard":"mouse-or-touch"}),kt=!Hd(lt,Jt);($j(K)||qj(K))&&M.current!=yt&&(M.current=yt,!kt&&yt!==0?Ct?bg(j,yt<0?Yj:Zj):bg(j,yt<0?Xj:Kj):bg(j,0)),kt&&(T(Jt),z.current.layout=Jt,Ve&&Ve(Jt),bo(Mt,Jt,O.current))}},[]),I=w.useCallback((j,Q)=>{const{onLayout:ee}=N.current,{layout:W,panelDataArray:K}=z.current,oe=K.map(lt=>lt.constraints),{panelSize:ce,pivotIndices:me}=ns(K,j,W);Xe(ce!=null,`Panel size not found for panel "${j.id}"`);const Te=ko(K,j)===K.length-1?ce-Q:Q-ce,Ve=Sc({delta:Te,initialLayout:W,panelConstraints:oe,pivotIndices:me,prevLayout:W,trigger:"imperative-api"});Hd(W,Ve)||(T(Ve),z.current.layout=Ve,ee&&ee(Ve),bo(K,Ve,O.current))},[]),F=w.useCallback((j,Q)=>{const{layout:ee,panelDataArray:W}=z.current,{collapsedSize:K=0,collapsible:oe}=Q,{collapsedSize:ce=0,collapsible:me,maxSize:be=100,minSize:Te=0}=j.constraints,{panelSize:Ve}=ns(W,j,ee);Ve!=null&&(oe&&me&&Ai(Ve,K)?Ai(K,ce)||I(j,ce):Ve<Te?I(j,Te):Ve>be&&I(j,be))},[I]),V=w.useCallback((j,Q)=>{const{direction:ee}=N.current,{layout:W}=z.current;if(!v.current)return;const K=kh(j,v.current);Xe(K,`Drag handle element not found for id "${j}"`);const oe=tN(ee,Q);C({dragHandleId:j,dragHandleRect:K.getBoundingClientRect(),initialCursorPosition:oe,initialLayout:W})},[]),Z=w.useCallback(()=>{C(null)},[]),k=w.useCallback(j=>{const{panelDataArray:Q}=z.current,ee=ko(Q,j);ee>=0&&(Q.splice(ee,1),delete O.current[j.id],z.current.panelDataArrayChanged=!0,R())},[R]),G=w.useMemo(()=>({collapsePanel:P,direction:r,dragState:S,expandPanel:B,getPanelSize:D,getPanelStyle:H,groupId:x,isPanelCollapsed:$,isPanelExpanded:X,reevaluatePanelConstraints:F,registerPanel:Y,registerResizeHandle:te,resizePanel:I,startDragging:V,stopDragging:Z,unregisterPanel:k,panelGroupElement:v.current}),[P,S,r,B,D,H,x,$,X,F,Y,te,I,V,Z,k]),le={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return w.createElement(wh.Provider,{value:G},w.createElement(g,{...p,children:t,className:n,id:o,ref:v,style:{...le,...h},[Lt.group]:"",[Lt.groupDirection]:r,[Lt.groupId]:x}))}const sN=w.forwardRef((e,t)=>w.createElement(aN,{...e,forwardedRef:t}));aN.displayName="PanelGroup";sN.displayName="forwardRef(PanelGroup)";function ko(e,t){return e.findIndex(n=>n===t||n.id===t.id)}function ns(e,t,n){const r=ko(e,t),o=r===e.length-1?[r-1,r]:[r,r+1],l=n[r];return{...t.constraints,panelSize:l,pivotIndices:o}}function e9({disabled:e,handleId:t,resizeHandler:n,panelGroupElement:r}){w.useEffect(()=>{if(e||n==null||r==null)return;const s=kh(t,r);if(s==null)return;const o=l=>{if(!l.defaultPrevented)switch(l.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{l.preventDefault(),n(l);break}case"F6":{l.preventDefault();const u=s.getAttribute(Lt.groupId);Xe(u,`No group element found for id "${u}"`);const d=Hc(u,r),h=Qj(u,t,r);Xe(h!==null,`No resize element found for id "${t}"`);const g=l.shiftKey?h>0?h-1:d.length-1:h+1<d.length?h+1:0;d[g].focus();break}}};return s.addEventListener("keydown",o),()=>{s.removeEventListener("keydown",o)}},[r,e,t,n])}function oN({children:e=null,className:t="",disabled:n=!1,hitAreaMargins:r,id:s,onBlur:o,onClick:l,onDragging:u,onFocus:d,onPointerDown:h,onPointerUp:g,style:p={},tabIndex:x=0,tagName:v="div",...S}){var C,E;const T=w.useRef(null),R=w.useRef({onClick:l,onDragging:u,onPointerDown:h,onPointerUp:g});w.useEffect(()=>{R.current.onClick=l,R.current.onDragging=u,R.current.onPointerDown=h,R.current.onPointerUp=g});const O=w.useContext(wh);if(O===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:A,groupId:M,registerResizeHandle:N,startDragging:z,stopDragging:P,panelGroupElement:B}=O,D=kv(s),[H,$]=w.useState("inactive"),[X,Y]=w.useState(!1),[te,I]=w.useState(null),F=w.useRef({state:H});fs(()=>{F.current.state=H}),w.useEffect(()=>{if(n)I(null);else{const G=N(D);I(()=>G)}},[n,D,N]);const V=(C=r==null?void 0:r.coarse)!==null&&C!==void 0?C:15,Z=(E=r==null?void 0:r.fine)!==null&&E!==void 0?E:5;w.useEffect(()=>{if(n||te==null)return;const G=T.current;Xe(G,"Element ref not attached");let le=!1;return I7(D,G,A,{coarse:V,fine:Z},(Q,ee,W)=>{if(!ee){$("inactive");return}switch(Q){case"down":{$("drag"),le=!1,Xe(W,'Expected event to be defined for "down" action'),z(D,W);const{onDragging:K,onPointerDown:oe}=R.current;K==null||K(!0),oe==null||oe();break}case"move":{const{state:K}=F.current;le=!0,K!=="drag"&&$("hover"),Xe(W,'Expected event to be defined for "move" action'),te(W);break}case"up":{$("hover"),P();const{onClick:K,onDragging:oe,onPointerUp:ce}=R.current;oe==null||oe(!1),ce==null||ce(),le||K==null||K();break}}})},[V,A,n,Z,N,D,te,z,P]),e9({disabled:n,handleId:D,resizeHandler:te,panelGroupElement:B});const k={touchAction:"none",userSelect:"none"};return w.createElement(v,{...S,children:e,className:t,id:s,onBlur:()=>{Y(!1),o==null||o()},onFocus:()=>{Y(!0),d==null||d()},ref:T,role:"separator",style:{...k,...p},tabIndex:x,[Lt.groupDirection]:A,[Lt.groupId]:M,[Lt.resizeHandle]:"",[Lt.resizeHandleActive]:H==="drag"?"pointer":X?"keyboard":void 0,[Lt.resizeHandleEnabled]:!n,[Lt.resizeHandleId]:D,[Lt.resizeHandleState]:H})}oN.displayName="PanelResizeHandle";function $o({className:e,...t}){return m.jsx(sN,{"data-slot":"resizable-panel-group",className:Me("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",e),...t})}function Cr({...e}){return m.jsx(Hj,{"data-slot":"resizable-panel",...e})}function qo({withHandle:e,className:t,...n}){return m.jsx(oN,{"data-slot":"resizable-handle",className:Me("bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90",t),...n,children:e&&m.jsx("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:m.jsx(r6,{className:"size-2.5"})})})}function t9(e,t,n,r){function s(o){return o instanceof n?o:new n(function(l){l(o)})}return new(n||(n=Promise))(function(o,l){function u(g){try{h(r.next(g))}catch(p){l(p)}}function d(g){try{h(r.throw(g))}catch(p){l(p)}}function h(g){g.done?o(g.value):s(g.value).then(u,d)}h((r=r.apply(e,[])).next())})}var n9=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null;break}return e.removeAllRanges(),function(){e.type==="Caret"&&e.removeAllRanges(),e.rangeCount||n.forEach(function(s){e.addRange(s)}),t&&t.focus()}},r9=n9,zC={"text/plain":"Text","text/html":"Url",default:"Text"},i9="Copy to clipboard: #{key}, Enter";function a9(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}function s9(e,t){var n,r,s,o,l,u,d=!1;t||(t={}),n=t.debug||!1;try{s=r9(),o=document.createRange(),l=document.getSelection(),u=document.createElement("span"),u.textContent=e,u.ariaHidden="true",u.style.all="unset",u.style.position="fixed",u.style.top=0,u.style.clip="rect(0, 0, 0, 0)",u.style.whiteSpace="pre",u.style.webkitUserSelect="text",u.style.MozUserSelect="text",u.style.msUserSelect="text",u.style.userSelect="text",u.addEventListener("copy",function(g){if(g.stopPropagation(),t.format)if(g.preventDefault(),typeof g.clipboardData>"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var p=zC[t.format]||zC.default;window.clipboardData.setData(p,e)}else g.clipboardData.clearData(),g.clipboardData.setData(t.format,e);t.onCopy&&(g.preventDefault(),t.onCopy(g.clipboardData))}),document.body.appendChild(u),o.selectNodeContents(u),l.addRange(o);var h=document.execCommand("copy");if(!h)throw new Error("copy command was unsuccessful");d=!0}catch(g){n&&console.error("unable to copy using execCommand: ",g),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),d=!0}catch(p){n&&console.error("unable to copy using clipboardData: ",p),n&&console.error("falling back to prompt"),r=a9("message"in t?t.message:i9),window.prompt(r,e)}}finally{l&&(typeof l.removeRange=="function"?l.removeRange(o):l.removeAllRanges()),u&&document.body.removeChild(u),s()}return d}var o9=s9;function Oa(e){return Object.prototype.toString.call(e)==="[object Object]"}function Ec(e){return Array.isArray(e)?e.length:Oa(e)?Object.keys(e).length:0}function l9(e,t){if(typeof e=="string")return e;try{return JSON.stringify(e,(n,r)=>{switch(typeof r){case"bigint":return String(r)+"n";case"number":case"boolean":case"object":case"string":return r;default:return String(r)}},t)}catch(n){return`${n.name}: ${n.message}`||"JSON.stringify failed"}}function c9(e){return t9(this,void 0,void 0,function*(){try{yield navigator.clipboard.writeText(e)}catch{o9(e)}})}function LC(e,t,n,r,s,o){if(o&&o.collapsed!==void 0)return!!o.collapsed;if(typeof r=="boolean")return r;if(typeof r=="number"&&t>r)return!0;const l=Ec(e);if(typeof r=="function"){const u=_v(r,[{node:e,depth:t,indexOrName:n,size:l}]);if(typeof u=="boolean")return u}return!!(Array.isArray(e)&&l>s||Oa(e)&&l>s)}function IC(e,t,n,r,s,o){if(o&&o.collapsed!==void 0)return!!o.collapsed;if(typeof r=="boolean")return r;if(typeof r=="number"&&t>r)return!0;const l=Math.ceil(e.length/100);if(typeof r=="function"){const u=_v(r,[{node:e,depth:t,indexOrName:n,size:l}]);if(typeof u=="boolean")return u}return!!(Array.isArray(e)&&l>s||Oa(e)&&l>s)}function zo(e,t,n){return typeof e=="boolean"?e:!!(typeof e=="number"&&t>e||e==="collapsed"&&n||e==="expanded"&&!n)}function _v(e,t){try{return e(...t)}catch(n){reportError(n)}}function lN(e){if(e===!0||Oa(e)&&e.add===!0)return!0}function BC(e){if(e===!0||Oa(e)&&e.edit===!0)return!0}function jv(e){if(e===!0||Oa(e)&&e.delete===!0)return!0}function u9(e){return typeof e=="function"}function cN(e){return!e||e.add===void 0||!!e.add}function VC(e){return!e||e.edit===void 0||!!e.edit}function Nv(e){return!e||e.delete===void 0||!!e.delete}function Th(e){return!e||e.enableClipboard===void 0||!!e.enableClipboard}function d9(e){return!e||e.matchesURL===void 0||!!e.matchesURL}function f9(e,t){return e==="string"?t.trim().replace(/^\"([\s\S]+?)\"$/,"$1"):t}var UC;function jy(){return jy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jy.apply(this,arguments)}var Av=function(t){return w.createElement("svg",jy({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},t),UC||(UC=w.createElement("path",{fill:"currentColor",d:"M12.473 5.806a.666.666 0 0 0-.946 0L8.473 8.86a.667.667 0 0 1-.946 0L4.473 5.806a.667.667 0 1 0-.946.94l3.06 3.06a2 2 0 0 0 2.826 0l3.06-3.06a.667.667 0 0 0 0-.94Z"})))},HC;function Ny(){return Ny=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ny.apply(this,arguments)}var h9=function(t){return w.createElement("svg",Ny({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},t),HC||(HC=w.createElement("path",{fill:"currentColor",d:"M17.542 2.5h-4.75a3.963 3.963 0 0 0-3.959 3.958v4.75a3.963 3.963 0 0 0 3.959 3.959h4.75a3.963 3.963 0 0 0 3.958-3.959v-4.75A3.963 3.963 0 0 0 17.542 2.5Zm2.375 8.708a2.378 2.378 0 0 1-2.375 2.375h-4.75a2.378 2.378 0 0 1-2.375-2.375v-4.75a2.378 2.378 0 0 1 2.375-2.375h4.75a2.378 2.378 0 0 1 2.375 2.375v4.75Zm-4.75 6.334a3.963 3.963 0 0 1-3.959 3.958h-4.75A3.963 3.963 0 0 1 2.5 17.542v-4.75a3.963 3.963 0 0 1 3.958-3.959.791.791 0 1 1 0 1.584 2.378 2.378 0 0 0-2.375 2.375v4.75a2.378 2.378 0 0 0 2.375 2.375h4.75a2.378 2.378 0 0 0 2.375-2.375.792.792 0 1 1 1.584 0Z"})))},FC,$C;function Ay(){return Ay=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ay.apply(this,arguments)}var m9=function(t){return w.createElement("svg",Ay({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},t),FC||(FC=w.createElement("path",{fill:"currentColor",d:"M17.25 3H6.75A3.755 3.755 0 0 0 3 6.75v10.5A3.754 3.754 0 0 0 6.75 21h10.5A3.754 3.754 0 0 0 21 17.25V6.75A3.755 3.755 0 0 0 17.25 3Zm2.25 14.25a2.25 2.25 0 0 1-2.25 2.25H6.75a2.25 2.25 0 0 1-2.25-2.25V6.75A2.25 2.25 0 0 1 6.75 4.5h10.5a2.25 2.25 0 0 1 2.25 2.25v10.5Z"})),$C||($C=w.createElement("path",{fill:"#14C786",d:"M10.312 14.45 7.83 11.906a.625.625 0 0 0-.896 0 .659.659 0 0 0 0 .918l2.481 2.546a1.264 1.264 0 0 0 .896.381 1.237 1.237 0 0 0 .895-.38l5.858-6.011a.658.658 0 0 0 0-.919.625.625 0 0 0-.896 0l-5.857 6.01Z"})))};function Eh({node:e,nodeMeta:t}){const{customizeCopy:n,CopyComponent:r,CopiedComponent:s}=w.useContext(Da),[o,l]=w.useState(!1),u=d=>{d.stopPropagation();const h=n(e,t);typeof h=="string"&&h&&c9(h),l(!0),setTimeout(()=>l(!1),3e3)};return o?typeof s=="function"?m.jsx(s,{className:"json-view--copy",style:{display:"inline-block"}}):m.jsx(m9,{className:"json-view--copy",style:{display:"inline-block"}}):typeof r=="function"?m.jsx(r,{onClick:u,className:"json-view--copy"}):m.jsx(h9,{onClick:u,className:"json-view--copy"})}function Ry({indexOrName:e,value:t,depth:n,deleteHandle:r,editHandle:s,parent:o,parentPath:l}){const{displayArrayIndex:u}=w.useContext(Da),d=Array.isArray(o);return m.jsxs("div",Object.assign({className:"json-view--pair"},{children:[!d||d&&u?m.jsxs(m.Fragment,{children:[m.jsx("span",Object.assign({className:typeof e=="number"?"json-view--index":"json-view--property"},{children:e})),":"," "]}):m.jsx(m.Fragment,{}),m.jsx(dN,{node:t,depth:n+1,deleteHandle:(h,g)=>r(h,g),editHandle:(h,g,p,x)=>s(h,g,p,x),parent:o,indexOrName:e,parentPath:l})]}))}var qC,GC;function My(){return My=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},My.apply(this,arguments)}var Rv=function(t){return w.createElement("svg",My({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},t),qC||(qC=w.createElement("path",{fill:"currentColor",d:"M18.75 6h-2.325a3.757 3.757 0 0 0-3.675-3h-1.5a3.757 3.757 0 0 0-3.675 3H5.25a.75.75 0 0 0 0 1.5H6v9.75A3.754 3.754 0 0 0 9.75 21h4.5A3.754 3.754 0 0 0 18 17.25V7.5h.75a.75.75 0 1 0 0-1.5Zm-7.5-1.5h1.5A2.255 2.255 0 0 1 14.872 6H9.128a2.255 2.255 0 0 1 2.122-1.5Zm5.25 12.75a2.25 2.25 0 0 1-2.25 2.25h-4.5a2.25 2.25 0 0 1-2.25-2.25V7.5h9v9.75Z"})),GC||(GC=w.createElement("path",{fill:"#DA0000",d:"M10.5 16.5a.75.75 0 0 0 .75-.75v-4.5a.75.75 0 1 0-1.5 0v4.5a.75.75 0 0 0 .75.75ZM13.5 16.5a.75.75 0 0 0 .75-.75v-4.5a.75.75 0 1 0-1.5 0v4.5a.75.75 0 0 0 .75.75Z"})))},YC,ZC;function Oy(){return Oy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Oy.apply(this,arguments)}var uN=function(t){return w.createElement("svg",Oy({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},t),YC||(YC=w.createElement("path",{fill:"currentColor",d:"M21 6.75v10.5A3.754 3.754 0 0 1 17.25 21H6.75A3.754 3.754 0 0 1 3 17.25V6.75A3.754 3.754 0 0 1 6.75 3h10.5A3.754 3.754 0 0 1 21 6.75Zm-1.5 0c0-1.24-1.01-2.25-2.25-2.25H6.75C5.51 4.5 4.5 5.51 4.5 6.75v10.5c0 1.24 1.01 2.25 2.25 2.25h10.5c1.24 0 2.25-1.01 2.25-2.25V6.75Z"})),ZC||(ZC=w.createElement("path",{fill:"#14C786",d:"M15 12.75a.75.75 0 1 0 0-1.5h-2.25V9a.75.75 0 1 0-1.5 0v2.25H9a.75.75 0 1 0 0 1.5h2.25V15a.75.75 0 1 0 1.5 0v-2.25H15Z"})))},XC,KC;function Dy(){return Dy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Dy.apply(this,arguments)}var Mv=function(t){return w.createElement("svg",Dy({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},t),XC||(XC=w.createElement("path",{fill:"currentColor",d:"M12 3a9 9 0 1 0 9 9 9.01 9.01 0 0 0-9-9Zm0 16.5a7.5 7.5 0 1 1 7.5-7.5 7.509 7.509 0 0 1-7.5 7.5Z"})),KC||(KC=w.createElement("path",{fill:"#14C786",d:"m10.85 13.96-1.986-2.036a.5.5 0 0 0-.716 0 .527.527 0 0 0 0 .735l1.985 2.036a1.01 1.01 0 0 0 .717.305.99.99 0 0 0 .716-.305l4.686-4.808a.526.526 0 0 0 0-.735.5.5 0 0 0-.716 0l-4.687 4.809Z"})))},WC,QC;function Py(){return Py=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Py.apply(this,arguments)}var Ov=function(t){return w.createElement("svg",Py({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},t),WC||(WC=w.createElement("path",{fill:"#DA0000",d:"M15 9a.75.75 0 0 0-1.06 0L12 10.94 10.06 9A.75.75 0 0 0 9 10.06L10.94 12 9 13.94A.75.75 0 0 0 10.06 15L12 13.06 13.94 15A.75.75 0 0 0 15 13.94L13.06 12 15 10.06A.75.75 0 0 0 15 9Z"})),QC||(QC=w.createElement("path",{fill:"currentColor",d:"M12 3a9 9 0 1 0 9 9 9.01 9.01 0 0 0-9-9Zm0 16.5a7.5 7.5 0 1 1 7.5-7.5 7.509 7.509 0 0 1-7.5 7.5Z"})))};function p9({originNode:e,node:t,depth:n,index:r,deleteHandle:s,customOptions:o,startIndex:l,parent:u,parentPath:d}){const{enableClipboard:h,src:g,onEdit:p,onChange:x,forceUpdate:v,displaySize:S,CustomOperation:C}=w.useContext(Da),E=[...d,String(r)],[T,R]=w.useState(!0),O=w.useCallback((N,z,P)=>{e[N]=z,p&&p({newValue:z,oldValue:P,depth:n,src:g,indexOrName:N,parentType:"array",parentPath:d}),x&&x({type:"edit",depth:n,src:g,indexOrName:N,parentType:"array",parentPath:d}),v()},[t,p,x,v]),A=N=>{e.splice(N,1),s&&s(N,d),v()},M=m.jsxs(m.Fragment,{children:[!T&&m.jsxs("span",Object.assign({onClick:()=>R(!0),className:"jv-size-chevron"},{children:[zo(S,n,T)&&m.jsxs("span",Object.assign({className:"jv-size"},{children:[Ec(t)," Items"]})),m.jsx(Av,{className:"jv-chevron"})]})),!T&&h&&Th(o)&&m.jsx(Eh,{node:t,nodeMeta:{depth:n,indexOrName:r,parent:u,parentPath:d,currentPath:E}}),typeof C=="function"?m.jsx(C,{node:t}):null]});return m.jsxs("div",{children:[m.jsx("span",{children:"["}),M,T?m.jsxs("button",Object.assign({onClick:()=>R(!1),className:"jv-button"},{children:[l," ... ",l+t.length-1]})):m.jsx("div",Object.assign({className:"jv-indent"},{children:t.map((N,z)=>m.jsx(Ry,{indexOrName:z+l,value:N,depth:n,parent:t,deleteHandle:A,editHandle:O,parentPath:d},String(r)+String(z)))})),m.jsx("span",{children:"]"})]})}function g9({node:e,depth:t,deleteHandle:n,indexOrName:r,customOptions:s,parent:o,parentPath:l}){const u=typeof r<"u"?[...l,String(r)]:l,d=[];for(let te=0;te<e.length;te+=100)d.push(e.slice(te,te+100));const{collapsed:h,enableClipboard:g,collapseObjectsAfterLength:p,editable:x,onDelete:v,src:S,onAdd:C,CustomOperation:E,onChange:T,forceUpdate:R,displaySize:O}=w.useContext(Da),[A,M]=w.useState(IC(e,t,r,h,p,s));w.useEffect(()=>{M(IC(e,t,r,h,p,s))},[h,p]);const[N,z]=w.useState(!1),P=()=>{z(!1),n&&n(r,l),v&&v({value:e,depth:t,src:S,indexOrName:r,parentType:"array",parentPath:l}),T&&T({type:"delete",depth:t,src:S,indexOrName:r,parentType:"array",parentPath:l})},[B,D]=w.useState(!1),H=()=>{const te=e;te.push(null),C&&C({indexOrName:te.length-1,depth:t,src:S,parentType:"array",parentPath:l}),T&&T({type:"add",indexOrName:te.length-1,depth:t,src:S,parentType:"array",parentPath:l}),R()},$=N||B,X=()=>{z(!1),D(!1)},Y=m.jsxs(m.Fragment,{children:[!A&&!$&&m.jsxs("span",Object.assign({onClick:()=>M(!0),className:"jv-size-chevron"},{children:[zo(O,t,A)&&m.jsxs("span",Object.assign({className:"jv-size"},{children:[e.length," Items"]})),m.jsx(Av,{className:"jv-chevron"})]})),$&&m.jsx(Mv,{className:"json-view--edit",style:{display:"inline-block"},onClick:B?H:P}),$&&m.jsx(Ov,{className:"json-view--edit",style:{display:"inline-block"},onClick:X}),!A&&!$&&g&&Th(s)&&m.jsx(Eh,{node:e,nodeMeta:{depth:t,indexOrName:r,parent:o,parentPath:l,currentPath:u}}),!A&&!$&&lN(x)&&cN(s)&&m.jsx(uN,{className:"json-view--edit",onClick:()=>{H()}}),!A&&!$&&jv(x)&&Nv(s)&&n&&m.jsx(Rv,{className:"json-view--edit",onClick:()=>z(!0)}),typeof E=="function"?m.jsx(E,{node:e}):null]});return m.jsxs(m.Fragment,{children:[m.jsx("span",{children:"["}),Y,A?m.jsx("button",Object.assign({onClick:()=>M(!1),className:"jv-button"},{children:"..."})):m.jsx("div",Object.assign({className:"jv-indent"},{children:d.map((te,I)=>m.jsx(p9,{originNode:e,node:te,depth:t,index:I,startIndex:I*100,deleteHandle:n,customOptions:s,parentPath:l},String(r)+String(I)))})),m.jsx("span",{children:"]"}),A&&zo(O,t,A)&&m.jsxs("span",Object.assign({onClick:()=>M(!1),className:"jv-size"},{children:[e.length," Items"]}))]})}function y9({node:e,depth:t,indexOrName:n,deleteHandle:r,customOptions:s,parent:o,parentPath:l}){const{collapsed:u,onCollapse:d,enableClipboard:h,ignoreLargeArray:g,collapseObjectsAfterLength:p,editable:x,onDelete:v,src:S,onAdd:C,onEdit:E,onChange:T,forceUpdate:R,displaySize:O,CustomOperation:A}=w.useContext(Da),M=typeof n<"u"?[...l,String(n)]:l;if(!g&&Array.isArray(e)&&e.length>100)return m.jsx(g9,{node:e,depth:t,indexOrName:n,deleteHandle:r,customOptions:s,parentPath:M});const N=Oa(e),[z,P]=w.useState(LC(e,t,n,u,p,s)),B=j=>{d==null||d({isCollapsing:!j,node:e,depth:t,indexOrName:n}),P(j)};w.useEffect(()=>{B(LC(e,t,n,u,p,s))},[u,p]);const D=w.useCallback((j,Q,ee)=>{Array.isArray(e)?e[+j]=Q:e&&(e[j]=Q),E&&E({newValue:Q,oldValue:ee,depth:t,src:S,indexOrName:j,parentType:N?"object":"array",parentPath:M}),T&&T({type:"edit",depth:t,src:S,indexOrName:j,parentType:N?"object":"array",parentPath:M}),R()},[e,E,T,R]),H=j=>{Array.isArray(e)?e.splice(+j,1):e&&delete e[j],R()},[$,X]=w.useState(!1),Y=()=>{X(!1),r&&r(n,M),v&&v({value:e,depth:t,src:S,indexOrName:n,parentType:N?"object":"array",parentPath:M}),T&&T({type:"delete",depth:t,src:S,indexOrName:n,parentType:N?"object":"array",parentPath:M})},[te,I]=w.useState(!1),F=w.useRef(null),V=()=>{var j;if(N){const Q=(j=F.current)===null||j===void 0?void 0:j.value;Q&&(e[Q]=null,F.current&&(F.current.value=""),I(!1),C&&C({indexOrName:Q,depth:t,src:S,parentType:"object",parentPath:M}),T&&T({type:"add",indexOrName:Q,depth:t,src:S,parentType:"object",parentPath:M}))}else if(Array.isArray(e)){const Q=e;Q.push(null),C&&C({indexOrName:Q.length-1,depth:t,src:S,parentType:"array",parentPath:M}),T&&T({type:"add",indexOrName:Q.length-1,depth:t,src:S,parentType:"array",parentPath:M})}R()},Z=j=>{j.key==="Enter"?(j.preventDefault(),V()):j.key==="Escape"&&G()},k=$||te,G=()=>{X(!1),I(!1)},le=m.jsxs(m.Fragment,{children:[!z&&!k&&m.jsxs("span",Object.assign({onClick:()=>B(!0),className:"jv-size-chevron"},{children:[zo(O,t,z)&&m.jsxs("span",Object.assign({className:"jv-size"},{children:[Ec(e)," Items"]})),m.jsx(Av,{className:"jv-chevron"})]})),te&&N&&m.jsx("input",{className:"json-view--input",placeholder:"property",ref:F,onKeyDown:Z}),k&&m.jsx(Mv,{className:"json-view--edit",style:{display:"inline-block"},onClick:te?V:Y}),k&&m.jsx(Ov,{className:"json-view--edit",style:{display:"inline-block"},onClick:G}),!z&&!k&&h&&Th(s)&&m.jsx(Eh,{node:e,nodeMeta:{depth:t,indexOrName:n,parent:o,parentPath:l,currentPath:M}}),!z&&!k&&lN(x)&&cN(s)&&m.jsx(uN,{className:"json-view--edit",onClick:()=>{N?(I(!0),setTimeout(()=>{var j;return(j=F.current)===null||j===void 0?void 0:j.focus()})):V()}}),!z&&!k&&jv(x)&&Nv(s)&&r&&m.jsx(Rv,{className:"json-view--edit",onClick:()=>X(!0)}),typeof A=="function"?m.jsx(A,{node:e}):null]});return Array.isArray(e)?m.jsxs(m.Fragment,{children:[m.jsx("span",{children:"["}),le,z?m.jsx("button",Object.assign({onClick:()=>B(!1),className:"jv-button"},{children:"..."})):m.jsx("div",Object.assign({className:"jv-indent"},{children:e.map((j,Q)=>m.jsx(Ry,{indexOrName:Q,value:j,depth:t,parent:e,deleteHandle:H,editHandle:D,parentPath:M},String(n)+String(Q)))})),m.jsx("span",{children:"]"}),z&&zo(O,t,z)&&m.jsxs("span",Object.assign({onClick:()=>B(!1),className:"jv-size"},{children:[Ec(e)," Items"]}))]}):N?m.jsxs(m.Fragment,{children:[m.jsx("span",{children:"{"}),le,z?m.jsx("button",Object.assign({onClick:()=>B(!1),className:"jv-button"},{children:"..."})):m.jsx("div",Object.assign({className:"jv-indent"},{children:Object.entries(e).map(([j,Q])=>m.jsx(Ry,{indexOrName:j,value:Q,depth:t,parent:e,deleteHandle:H,editHandle:D,parentPath:M},String(n)+String(j)))})),m.jsx("span",{children:"}"}),z&&zo(O,t,z)&&m.jsxs("span",Object.assign({onClick:()=>B(!1),className:"jv-size"},{children:[Ec(e)," Items"]}))]}):m.jsx("span",{children:String(e)})}const x9=ye.forwardRef(({str:e,className:t,ctrlClick:n},r)=>{let{collapseStringMode:s,collapseStringsAfterLength:o,customizeCollapseStringUI:l}=w.useContext(Da);const[u,d]=w.useState(!0),h=w.useRef(null);o=o>0?o:0;const g=e.replace(/\s+/g," "),p=typeof l=="function"?l(g,u):typeof l=="string"?l:"...",x=v=>{var S;if((v.ctrlKey||v.metaKey)&&n)n(v);else{const C=window.getSelection();if(C&&C.anchorOffset!==C.focusOffset&&((S=C.anchorNode)===null||S===void 0?void 0:S.parentElement)===h.current)return;d(!u)}};if(e.length<=o)return m.jsxs("span",Object.assign({ref:h,className:t,onClick:n},{children:['"',e,'"']}));if(s==="address")return e.length<=10?m.jsxs("span",Object.assign({ref:h,className:t,onClick:n},{children:['"',e,'"']})):m.jsxs("span",Object.assign({ref:h,onClick:x,className:t+" cursor-pointer"},{children:['"',u?[g.slice(0,6),p,g.slice(-4)]:e,'"']}));if(s==="directly")return m.jsxs("span",Object.assign({ref:h,onClick:x,className:t+" cursor-pointer"},{children:['"',u?[g.slice(0,o),p]:e,'"']}));if(s==="word"){let v=o,S=o+1,C=g,E=1;for(;;){if(/\W/.test(e[v])){C=e.slice(0,v);break}if(/\W/.test(e[S])){C=e.slice(0,S);break}if(E===6){C=e.slice(0,o);break}E++,v--,S++}return m.jsxs("span",Object.assign({ref:h,onClick:x,className:t+" cursor-pointer"},{children:['"',u?[C,p]:e,'"']}))}return m.jsxs("span",Object.assign({ref:h,className:t},{children:['"',e,'"']}))});var JC;function zy(){return zy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zy.apply(this,arguments)}var v9=function(t){return w.createElement("svg",zy({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},t),JC||(JC=w.createElement("path",{fill:"currentColor",d:"M17.25 3H6.75A3.754 3.754 0 0 0 3 6.75v10.5A3.754 3.754 0 0 0 6.75 21h10.5A3.754 3.754 0 0 0 21 17.25V6.75A3.754 3.754 0 0 0 17.25 3Zm2.25 14.25c0 1.24-1.01 2.25-2.25 2.25H6.75c-1.24 0-2.25-1.01-2.25-2.25V6.75c0-1.24 1.01-2.25 2.25-2.25h10.5c1.24 0 2.25 1.01 2.25 2.25v10.5Zm-6.09-9.466-5.031 5.03a2.981 2.981 0 0 0-.879 2.121v1.19c0 .415.336.75.75.75h1.19c.8 0 1.554-.312 2.12-.879l5.03-5.03a2.252 2.252 0 0 0 0-3.182c-.85-.85-2.331-.85-3.18 0Zm-2.91 7.151c-.28.28-.666.44-1.06.44H9v-.44c0-.4.156-.777.44-1.06l3.187-3.188 1.06 1.061-3.187 3.188Zm5.03-5.03-.782.783-1.06-1.061.782-.782a.766.766 0 0 1 1.06 0 .75.75 0 0 1 0 1.06Z"})))},ek,tk;function Ly(){return Ly=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ly.apply(this,arguments)}var b9=function(t){return w.createElement("svg",Ly({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},t),ek||(ek=w.createElement("path",{fill:"currentColor",d:"M6.75 3h5.5v1.5h-5.5C5.51 4.5 4.5 5.51 4.5 6.75v10.5c0 1.24 1.01 2.25 2.25 2.25h10.5c1.24 0 2.25-1.01 2.25-2.25v-5.5H21v5.5A3.754 3.754 0 0 1 17.25 21H6.75A3.754 3.754 0 0 1 3 17.25V6.75A3.754 3.754 0 0 1 6.75 3Z"})),tk||(tk=w.createElement("path",{fill:"currentColor",d:"M20.013 3h-3.946a.987.987 0 0 0 0 1.973h1.564l-6.342 6.342a1.004 1.004 0 0 0 0 1.396 1.004 1.004 0 0 0 1.396 0l6.342-6.342v1.564a.987.987 0 0 0 1.973 0V3.987A.987.987 0 0 0 20.013 3Z"})))};function dN({node:e,depth:t,deleteHandle:n,indexOrName:r,parent:s,editHandle:o,parentPath:l}){const{collapseStringsAfterLength:u,enableClipboard:d,editable:h,src:g,onDelete:p,onChange:x,customizeNode:v,matchesURL:S,urlRegExp:C,EditComponent:E,DoneComponent:T,CancelComponent:R,CustomOperation:O}=w.useContext(Da);let A;if(typeof v=="function"&&(A=_v(v,[{node:e,depth:t,indexOrName:r}])),A){if(w.isValidElement(A))return A;if(u9(A)){const M=A;return m.jsx(M,{node:e,depth:t,indexOrName:r})}}if(Array.isArray(e)||Oa(e))return m.jsx(y9,{parent:s,node:e,depth:t,indexOrName:r,deleteHandle:n,parentPath:l,customOptions:typeof A=="object"?A:void 0});{const M=typeof e,N=typeof r<"u"?[...l,String(r)]:l,[z,P]=w.useState(!1),[B,D]=w.useState(!1),H=w.useRef(null),$=()=>{P(!0),setTimeout(()=>{var j,Q;(j=window.getSelection())===null||j===void 0||j.selectAllChildren(H.current),(Q=H.current)===null||Q===void 0||Q.focus()})},X=w.useCallback(()=>{let j=H.current.innerText;try{const Q=JSON.parse(j);o&&o(r,Q,e,l)}catch{const ee=f9(M,j);o&&o(r,ee,e,l)}P(!1)},[o,r,e,l,M]),Y=()=>{P(!1),D(!1)},te=()=>{D(!1),n&&n(r,l),p&&p({value:e,depth:t,src:g,indexOrName:r,parentType:Array.isArray(s)?"array":"object",parentPath:l}),x&&x({depth:t,src:g,indexOrName:r,parentType:Array.isArray(s)?"array":"object",type:"delete",parentPath:l})},I=w.useCallback(j=>{j.key==="Enter"?(j.preventDefault(),X()):j.key==="Escape"&&Y()},[X]),F=z||B,V=!F&&BC(h)&&VC(A)&&o?j=>{(j.ctrlKey||j.metaKey)&&$()}:void 0,Z=m.jsxs(m.Fragment,{children:[F&&(typeof T=="function"?m.jsx(T,{className:"json-view--edit",style:{display:"inline-block"},onClick:B?te:X}):m.jsx(Mv,{className:"json-view--edit",style:{display:"inline-block"},onClick:B?te:X})),F&&(typeof R=="function"?m.jsx(R,{className:"json-view--edit",style:{display:"inline-block"},onClick:Y}):m.jsx(Ov,{className:"json-view--edit",style:{display:"inline-block"},onClick:Y})),!F&&d&&Th(A)&&m.jsx(Eh,{node:e,nodeMeta:{depth:t,indexOrName:r,parent:s,parentPath:l,currentPath:N}}),!F&&S&&M==="string"&&C.test(e)&&d9(A)&&m.jsx("a",Object.assign({href:e,target:"_blank",className:"json-view--link"},{children:m.jsx(b9,{})})),!F&&BC(h)&&VC(A)&&o&&(typeof E=="function"?m.jsx(E,{className:"json-view--edit",onClick:$}):m.jsx(v9,{className:"json-view--edit",onClick:$})),!F&&jv(h)&&Nv(A)&&n&&m.jsx(Rv,{className:"json-view--edit",onClick:()=>D(!0)}),typeof O=="function"?m.jsx(O,{node:e}):null]});let k="json-view--string";switch(M){case"number":case"bigint":k="json-view--number";break;case"boolean":k="json-view--boolean";break;case"object":k="json-view--null";break}typeof(A==null?void 0:A.className)=="string"&&(k+=" "+A.className),B&&(k+=" json-view--deleting");let G=String(e);M==="bigint"&&(G+="n");const le=w.useMemo(()=>m.jsx("span",{contentEditable:!0,className:k,dangerouslySetInnerHTML:{__html:M==="string"?`"${G}"`:G},ref:H,onKeyDown:I}),[G,M,I]);return M==="string"?m.jsxs(m.Fragment,{children:[z?le:e.length>u?m.jsx(x9,{str:e,ref:H,className:k,ctrlClick:V}):m.jsxs("span",Object.assign({className:k,onClick:V},{children:['"',G,'"']})),Z]}):m.jsxs(m.Fragment,{children:[z?le:m.jsx("span",Object.assign({className:k,onClick:V},{children:G})),Z]})}}const fN=/^(((ht|f)tps?):\/\/)?([^!@#$%^&*?.\s-]([^!@#$%^&*?.\s]{0,63}[^!@#$%^&*?.\s])?\.)+[a-z]{2,6}\/?/,Da=w.createContext({src:void 0,collapseStringsAfterLength:99,collapseStringMode:"directly",customizeCollapseStringUI:void 0,collapseObjectsAfterLength:20,collapsed:!1,onCollapse:void 0,enableClipboard:!0,editable:!1,onEdit:void 0,onDelete:void 0,onAdd:void 0,onChange:void 0,forceUpdate:()=>{},customizeNode:void 0,customizeCopy:()=>{},displaySize:void 0,displayArrayIndex:!0,matchesURL:!1,urlRegExp:fN,ignoreLargeArray:!1,CopyComponent:void 0,CopiedComponent:void 0,EditComponent:void 0,CancelComponent:void 0,DoneComponent:void 0,CustomOperation:void 0});function _h({src:e,collapseStringsAfterLength:t=99,collapseStringMode:n="directly",customizeCollapseStringUI:r,collapseObjectsAfterLength:s=99,collapsed:o,onCollapse:l,enableClipboard:u=!0,editable:d=!1,onEdit:h,onDelete:g,onAdd:p,onChange:x,dark:v=!1,theme:S="default",customizeNode:C,customizeCopy:E=Y=>l9(Y),displaySize:T,displayArrayIndex:R=!0,style:O,className:A,matchesURL:M=!1,urlRegExp:N=fN,ignoreLargeArray:z=!1,CopyComponent:P,CopiedComponent:B,EditComponent:D,CancelComponent:H,DoneComponent:$,CustomOperation:X}){const[Y,te]=w.useState(0),I=w.useCallback(()=>te(Z=>++Z),[]),[F,V]=w.useState(e);return w.useEffect(()=>V(e),[e]),m.jsx(Da.Provider,Object.assign({value:{src:F,collapseStringsAfterLength:t,collapseStringMode:n,customizeCollapseStringUI:r,collapseObjectsAfterLength:s,collapsed:o,onCollapse:l,enableClipboard:u,editable:d,onEdit:h,onDelete:g,onAdd:p,onChange:x,forceUpdate:I,customizeNode:C,customizeCopy:E,displaySize:T,displayArrayIndex:R,matchesURL:M,urlRegExp:N,ignoreLargeArray:z,CopyComponent:P,CopiedComponent:B,EditComponent:D,CancelComponent:H,DoneComponent:$,CustomOperation:X}},{children:m.jsx("code",Object.assign({className:"json-view"+(v?" dark":"")+(S&&S!=="default"?" json-view_"+S:"")+(A?" "+A:""),style:O},{children:m.jsx(dN,{node:F,depth:1,editHandle:(Z,k,G,le)=>{V(k),h&&h({newValue:k,oldValue:G,depth:1,src:F,indexOrName:Z,parentType:null,parentPath:le}),x&&x({type:"edit",depth:1,src:F,indexOrName:Z,parentType:null,parentPath:le})},deleteHandle:(Z,k)=>{V(void 0),g&&g({value:F,depth:1,src:F,indexOrName:Z,parentType:null,parentPath:k}),x&&x({depth:1,src:F,indexOrName:Z,parentType:null,type:"delete",parentPath:k})},parentPath:[]})}))}))}function af({className:e,...t}){return m.jsx(aL,{"data-slot":"label",className:Me("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 Iy({elicitationRequest:e,onResponse:t,loading:n=!1}){const[r,s]=w.useState([]);ye.useEffect(()=>{e!=null&&e.schema?o(e.schema):s([])},[e]);const o=p=>{if(!p||!p.properties){s([]);return}const x=[],v=p.required||[];Object.entries(p.properties).forEach(([S,C])=>{const E=C.enum?"enum":C.type||"string";x.push({name:S,type:E,description:C.description,required:v.includes(S),value:l(E,C.enum),enum:C.enum,minimum:C.minimum,maximum:C.maximum,pattern:C.pattern})}),s(x)},l=(p,x)=>{switch(p){case"enum":return(x==null?void 0:x[0])||"";case"string":return"";case"number":case"integer":return"";case"boolean":return!1;case"array":return[];case"object":return{};default:return""}},u=(p,x)=>{s(v=>v.map(S=>S.name===p?{...S,value:x}:S))},d=()=>{const p={};return r.forEach(x=>{if(x.value!==""&&x.value!==null&&x.value!==void 0){let v=x.value;if(x.type==="number"||x.type==="integer")v=Number(x.value);else if(x.type==="boolean")v=!!x.value;else if(x.type==="array"||x.type==="object")try{v=JSON.parse(x.value)}catch{v=x.value}p[x.name]=v}}),p},h=async p=>{if(p==="accept"){if(r.filter(S=>S.required&&(!S.value||S.value==="")).length>0)return;const v=d();await t(p,v)}else await t(p)},g=p=>{var x;return p.type==="enum"?m.jsxs(ka,{value:p.value,onValueChange:v=>u(p.name,v),children:[m.jsx(Ea,{className:"w-full",children:m.jsx(Ta,{placeholder:"Select an option"})}),m.jsx(_a,{children:(x=p.enum)==null?void 0:x.map(v=>m.jsx(ar,{value:v,children:v},v))})]}):p.type==="boolean"?m.jsxs("div",{className:"flex items-center space-x-3 py-2",children:[m.jsx("input",{type:"checkbox",checked:p.value,onChange:v=>u(p.name,v.target.checked),className:"w-4 h-4 text-primary bg-background border-border rounded focus:ring-ring focus:ring-2"}),m.jsx("span",{className:"text-sm",children:p.value?"Enabled":"Disabled"})]}):p.type==="array"||p.type==="object"?m.jsx(cu,{value:typeof p.value=="string"?p.value:JSON.stringify(p.value,null,2),onChange:v=>u(p.name,v.target.value),placeholder:`Enter ${p.type} as JSON`,className:"font-mono text-sm h-20 resize-none"}):m.jsx(zt,{type:p.type==="number"||p.type==="integer"?"number":"text",value:p.value,onChange:v=>u(p.name,v.target.value),placeholder:`Enter ${p.name}`,className:"text-sm"})};return m.jsx(gh,{open:!!e,onOpenChange:()=>{},children:m.jsxs(yh,{className:"max-w-2xl max-h-[80vh] overflow-y-auto",children:[m.jsxs(xh,{children:[m.jsxs(vh,{className:"flex items-center gap-2 text-sm font-medium",children:[m.jsx(Ty,{className:"h-3 w-3"}),"Elicitation Request"]}),m.jsx(g7,{className:"text-md font-bold",children:e==null?void 0:e.message})]}),m.jsx("div",{className:"space-y-6 py-4",children:r.map(p=>m.jsxs("div",{children:[m.jsxs("div",{className:"flex items-start justify-between mb-2",children:[m.jsxs("div",{className:"space-y-1",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(af,{className:"text-sm font-medium",children:p.name}),p.required&&m.jsx("div",{className:"w-1.5 h-1.5 bg-red-500 rounded-full",title:"Required field"})]}),p.description&&m.jsx("p",{className:"text-xs text-muted-foreground",children:p.description})]}),m.jsx(zr,{variant:"secondary",className:"text-xs",children:p.type})]}),g(p)]},p.name))}),m.jsxs(p7,{className:"flex gap-2",children:[m.jsxs(Je,{variant:"outline",onClick:()=>h("cancel"),disabled:n,children:[m.jsx(Fo,{className:"h-4 w-4 mr-2"}),"Cancel"]}),m.jsx(Je,{variant:"outline",onClick:()=>h("decline"),disabled:n,children:"Decline"}),m.jsxs(Je,{onClick:()=>h("accept"),disabled:n,children:[n?m.jsx(Lr,{className:"h-4 w-4 mr-2 animate-spin"}):m.jsx(wr,{className:"h-4 w-4 mr-2"}),"Accept"]})]})]})})}function By(...e){return qE(Ux(e))}function w9(){return Math.random().toString(36).substr(2,9)}function nk(e){return e.trim()}function rk(e){return new Intl.DateTimeFormat("en-US",{hour:"numeric",minute:"2-digit",hour12:!0}).format(e)}function ik(e,t,n){return{id:w9(),role:e,content:t,timestamp:new Date,attachments:n,metadata:{createdAt:new Date().toISOString()}}}function S9(e,t){return e.length<=t?e:e.substring(0,t)+"..."}function C9({text:e,maxLength:t=300,title:n,className:r=""}){const s=S9(e,t),o=s!==e;return m.jsxs("p",{className:`text-xs text-muted-foreground leading-relaxed font-medium ${r}`,children:[m.jsxs("span",{children:[s.replace(/\.\.\.$/,""),o&&"..."]}),o&&m.jsxs(gh,{children:[m.jsx(f7,{asChild:!0,children:m.jsx("button",{className:"text-xs text-muted-foreground hover:text-muted-foreground/90 ml-1 italic underline underline-offset-2",children:"View All"})}),m.jsx(yh,{className:"sm:max-w-3xl lg:max-w-4xl",children:m.jsxs(xh,{children:[n&&m.jsx(vh,{className:"text-lg mb-4",children:n}),m.jsx("div",{className:"max-h-[70vh] overflow-y-auto",children:m.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed whitespace-pre-wrap",children:e})})]})})]})]})}function k9({serverConfig:e}){var te;const t=Vj("ToolsTab"),[n,r]=w.useState({}),[s,o]=w.useState(""),[l,u]=w.useState([]),[d,h]=w.useState(null),[g,p]=w.useState(!1),[x,v]=w.useState(!1),[S,C]=w.useState(""),[E,T]=w.useState(null),[R,O]=w.useState(null),[A,M]=w.useState(!1);w.useEffect(()=>(e&&z(),()=>{E&&E.close()}),[e,t]),w.useEffect(()=>{s&&n[s]&&P(n[s].inputSchema)},[s,n,t]);const N=()=>e||null,z=async()=>{var V;const I=N();if(!I){t.warn("Cannot fetch tools: no server config available");return}t.info("Starting tool fetch",{serverConfig:I}),E&&(E.close(),T(null)),v(!0),C(""),r({});const F=Date.now();try{const Z=await fetch("/api/mcp/tools",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"list",serverConfig:I})});if(!Z.ok){const j=`HTTP error! status: ${Z.status}`;throw t.error("Tools fetch HTTP error",{status:Z.status}),new Error(j)}const k=(V=Z.body)==null?void 0:V.getReader(),G=new TextDecoder;if(!k){const j="No response body";throw t.error("Tools fetch error: no response body"),new Error(j)}let le=0;for(;;){const{done:j,value:Q}=await k.read();if(j)break;const W=G.decode(Q).split(`
316
+ `);for(const K of W)if(K.startsWith("data: ")){const oe=K.slice(6);if(oe==="[DONE]"){v(!1);return}try{const ce=JSON.parse(oe);if(ce.type==="tools_list"){le=Object.keys(ce.tools||{}).length,r(ce.tools||{});const me=Date.now()-F;t.info("Tools fetch completed successfully",{serverConfig:I,toolCount:le,duration:me,tools:ce.tools})}else if(ce.type==="tool_error"){t.error("Tools fetch error from server",{error:ce.error}),C(ce.error),v(!1);return}}catch(ce){t.warn("Failed to parse SSE data",{data:oe,error:ce})}}}}catch(Z){const k=Z instanceof Error?Z.message:"Unknown error";t.error("Tools fetch network error",{error:k},Z instanceof Error?Z:void 0),C("Network error fetching tools")}finally{v(!1)}},P=I=>{if(!I||!I.properties){u([]);return}const F=[],V=I.required||[];Object.entries(I.properties).forEach(([Z,k])=>{const G=k.enum?"enum":k.type||"string";F.push({name:Z,type:G,description:k.description,required:V.includes(Z),value:B(G,k.enum),enum:k.enum,minimum:k.minimum,maximum:k.maximum,pattern:k.pattern})}),u(F)},B=(I,F)=>{switch(I){case"enum":return(F==null?void 0:F[0])||"";case"string":return"";case"number":case"integer":return"";case"boolean":return!1;case"array":return[];case"object":return{};default:return""}},D=(I,F)=>{u(V=>V.map(Z=>Z.name===I?{...Z,value:F}:Z))},H=()=>{const I={};let F=0;return l.forEach(V=>{if(V.value!==""&&V.value!==null&&V.value!==void 0){let Z=V.value;try{V.type==="number"||V.type==="integer"?(Z=Number(V.value),isNaN(Z)&&(t.warn("Invalid number value for field",{fieldName:V.name,value:V.value}),F++)):V.type==="boolean"?Z=!!V.value:(V.type==="array"||V.type==="object")&&(Z=JSON.parse(V.value)),I[V.name]=Z}catch(k){t.warn("Failed to process field value",{fieldName:V.name,type:V.type,value:V.value,error:k}),F++,I[V.name]=V.value}}}),I},$=async()=>{var V;if(!s){t.warn("Cannot execute tool: no tool selected");return}const I=N();if(!I){t.warn("Cannot execute tool: no server config available");return}p(!0),C(""),h(null);const F=Date.now();try{const Z=H();t.info("Starting tool execution",{toolName:s,parameters:Z});const k=await fetch("/api/mcp/tools",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"execute",serverConfig:I,toolName:s,parameters:Z})});if(!k.ok){const j=`HTTP error! status: ${k.status}`;throw t.error("Tool execution HTTP error",{toolName:s,status:k.status}),new Error(j)}const G=(V=k.body)==null?void 0:V.getReader(),le=new TextDecoder;if(!G){const j="No response body";throw t.error("Tool execution error: no response body",{toolName:s}),new Error(j)}for(;;){const{done:j,value:Q}=await G.read();if(j)break;const W=le.decode(Q).split(`
317
+ `);for(const K of W)if(K.startsWith("data: ")){const oe=K.slice(6);if(oe==="[DONE]"){p(!1);return}try{const ce=JSON.parse(oe);if(ce.type==="tool_result"){const me=ce.result,be=Date.now()-F;t.info("Tool execution completed successfully",{toolName:s,duration:be,result:me}),h(me)}else if(ce.type==="tool_error"){t.error("Tool execution error from server",{toolName:s,error:ce.error}),C(ce.error),p(!1);return}else ce.type==="elicitation_request"?O({requestId:ce.requestId,message:ce.message,schema:ce.schema,timestamp:ce.timestamp}):ce.type==="elicitation_complete"&&O(null)}catch(ce){t.warn("Failed to parse tool execution SSE data",{toolName:s,data:oe,error:ce})}}}}catch(Z){const k=Z instanceof Error?Z.message:"Unknown error";t.error("Tool execution network error",{toolName:s,error:k},Z instanceof Error?Z:void 0),C("Error executing tool")}finally{p(!1)}},X=async(I,F)=>{if(!R){t.warn("Cannot handle elicitation response: no active request");return}M(!0);try{let V=null;I==="accept"?V={action:"accept",content:F||{}}:V={action:I};const Z=await fetch("/api/mcp/tools",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"respond",requestId:R.requestId,response:V})});if(!Z.ok){const k=`HTTP error! status: ${Z.status}`;throw t.error("Elicitation response HTTP error",{requestId:R.requestId,action:I,status:Z.status}),new Error(k)}O(null)}catch(V){const Z=V instanceof Error?V.message:"Unknown error";t.error("Error responding to elicitation request",{requestId:R.requestId,action:I,error:Z},V instanceof Error?V:void 0),C("Error responding to elicitation request")}finally{M(!1)}},Y=Object.keys(n);return e?m.jsxs("div",{className:"h-[calc(100vh-120px)] flex flex-col",children:[m.jsxs($o,{direction:"vertical",className:"flex-1",children:[m.jsx(Cr,{defaultSize:70,minSize:30,children:m.jsxs($o,{direction:"horizontal",className:"h-full",children:[m.jsx(Cr,{defaultSize:30,minSize:20,maxSize:50,children:m.jsxs("div",{className:"h-full flex flex-col border-r border-border bg-background",children:[m.jsxs("div",{className:"flex items-center justify-between px-4 py-4 border-b border-border bg-background",children:[m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx(kC,{className:"h-3 w-3 text-muted-foreground"}),m.jsx("h2",{className:"text-xs font-semibold text-foreground",children:"Tools"}),m.jsx(zr,{variant:"secondary",className:"text-xs font-mono",children:Y.length})]}),m.jsx(Je,{onClick:z,variant:"ghost",size:"sm",disabled:x,children:m.jsx(Lr,{className:`h-3 w-3 ${x?"animate-spin":""} cursor-pointer`})})]}),m.jsx("div",{className:"flex-1 overflow-hidden",children:m.jsx(ba,{className:"h-full",children:m.jsx("div",{className:"p-2",children:x?m.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[m.jsx("div",{className:"w-8 h-8 bg-muted rounded-full flex items-center justify-center mb-3",children:m.jsx(Lr,{className:"h-4 w-4 text-muted-foreground animate-spin cursor-pointer"})}),m.jsx("p",{className:"text-xs text-muted-foreground font-semibold mb-1",children:"Loading tools..."}),m.jsx("p",{className:"text-xs text-muted-foreground/70",children:"Fetching available tools from server"})]}):Y.length===0?m.jsx("div",{className:"text-center py-8",children:m.jsx("p",{className:"text-sm text-muted-foreground",children:"No tools available"})}):m.jsx("div",{className:"space-y-1",children:Y.map(I=>{var F;return m.jsx("div",{className:`cursor-pointer transition-all duration-200 hover:bg-muted/30 dark:hover:bg-muted/50 p-3 rounded-md mx-2 ${s===I?"bg-muted/50 dark:bg-muted/50 shadow-sm border border-border ring-1 ring-ring/20":"hover:shadow-sm"}`,onClick:()=>{o(I)},children:m.jsxs("div",{className:"flex items-start gap-3",children:[m.jsxs("div",{className:"flex-1 min-w-0",children:[m.jsx("div",{className:"flex items-center gap-2 mb-1",children:m.jsx("code",{className:"font-mono text-xs font-medium text-foreground bg-muted px-1.5 py-0.5 rounded border border-border",children:I})}),((F=n[I])==null?void 0:F.description)&&m.jsx("p",{className:"text-xs mt-2 line-clamp-2 leading-relaxed text-muted-foreground",children:n[I].description})]}),m.jsx(sl,{className:"h-3 w-3 text-muted-foreground flex-shrink-0 mt-1"})]})},I)})})})})})]})}),m.jsx(qo,{withHandle:!0}),m.jsx(Cr,{defaultSize:70,minSize:50,children:m.jsx("div",{className:"h-full flex flex-col bg-background",children:s?m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"flex items-center justify-between px-6 py-5 border-b border-border bg-background",children:[m.jsx("div",{className:"space-y-2",children:m.jsx("div",{className:"flex items-center gap-3",children:m.jsx("code",{className:"font-mono font-semibold text-foreground bg-muted px-2 py-1 rounded-md border border-border text-xs",children:s})})}),m.jsx(Je,{onClick:$,disabled:g||!s,className:"bg-primary hover:bg-primary/90 text-primary-foreground shadow-sm transition-all duration-200 cursor-pointer",size:"sm",children:g?m.jsxs(m.Fragment,{children:[m.jsx(Lr,{className:"h-3 w-3 mr-1.5 animate-spin cursor-pointer"}),m.jsx("span",{className:"font-mono text-xs",children:R?"Waiting...":"Running"})]}):m.jsxs(m.Fragment,{children:[m.jsx(Sf,{className:"h-3 w-3 mr-1.5 cursor-pointer"}),m.jsx("span",{className:"font-mono text-xs",children:"Execute"})]})})]}),((te=n[s])==null?void 0:te.description)&&m.jsx("div",{className:"px-6 py-4 bg-muted/50 border-b border-border",children:m.jsx(C9,{text:n[s].description,title:n[s].name,maxLength:400})}),m.jsx("div",{className:"flex-1 overflow-hidden",children:m.jsx(ba,{className:"h-full",children:m.jsx("div",{className:"px-6 py-6",children:l.length===0?m.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[m.jsx("div",{className:"w-10 h-10 bg-muted rounded-full flex items-center justify-center mb-3",children:m.jsx(Sf,{className:"h-4 w-4 text-muted-foreground"})}),m.jsx("p",{className:"text-xs text-muted-foreground font-semibold mb-1",children:"No parameters required"}),m.jsx("p",{className:"text-xs text-muted-foreground/70",children:"This tool can be executed directly"})]}):m.jsx("div",{className:"space-y-8",children:l.map(I=>{var F;return m.jsxs("div",{className:"group",children:[m.jsxs("div",{className:"flex items-start justify-between mb-3",children:[m.jsxs("div",{className:"space-y-1",children:[m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx("code",{className:"font-mono text-xs font-semibold text-foreground bg-muted px-1.5 py-0.5 rounded border border-border",children:I.name}),I.required&&m.jsx("div",{className:"w-1.5 h-1.5 bg-amber-400 dark:bg-amber-500 rounded-full",title:"Required field"})]}),I.description&&m.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed max-w-md font-medium",children:I.description})]}),m.jsx(zr,{variant:"secondary",className:"text-xs font-mono font-medium",children:I.type})]}),m.jsx("div",{className:"space-y-2",children:I.type==="enum"?m.jsxs(ka,{value:I.value,onValueChange:V=>D(I.name,V),children:[m.jsx(Ea,{className:"w-full bg-background border-border hover:border-border/80 focus:border-ring focus:ring-0 font-medium text-xs",children:m.jsx(Ta,{placeholder:"Select an option",className:"font-mono text-xs"})}),m.jsx(_a,{children:(F=I.enum)==null?void 0:F.map(V=>m.jsx(ar,{value:V,className:"font-mono text-xs",children:V},V))})]}):I.type==="boolean"?m.jsxs("div",{className:"flex items-center space-x-3 py-2",children:[m.jsx("input",{type:"checkbox",checked:I.value,onChange:V=>D(I.name,V.target.checked),className:"w-4 h-4 text-primary bg-background border-border rounded focus:ring-ring focus:ring-2"}),m.jsx("span",{className:"text-xs text-foreground font-medium",children:I.value?"Enabled":"Disabled"})]}):I.type==="array"||I.type==="object"?m.jsx(cu,{value:typeof I.value=="string"?I.value:JSON.stringify(I.value,null,2),onChange:V=>D(I.name,V.target.value),placeholder:`Enter ${I.type} as JSON`,className:"font-mono text-xs h-20 bg-background border-border hover:border-border/80 focus:border-ring focus:ring-0 resize-none"}):m.jsx(zt,{type:I.type==="number"||I.type==="integer"?"number":"text",value:I.value,onChange:V=>D(I.name,V.target.value),placeholder:`Enter ${I.name}`,className:"bg-background border-border hover:border-border/80 focus:border-ring focus:ring-0 font-medium text-xs"})})]},I.name)})})})})})]}):m.jsx("div",{className:"h-full flex items-center justify-center",children:m.jsxs("div",{className:"text-center",children:[m.jsx("div",{className:"w-12 h-12 bg-muted rounded-full flex items-center justify-center mx-auto mb-3",children:m.jsx(kC,{className:"h-5 w-5 text-muted-foreground"})}),m.jsx("p",{className:"text-xs font-semibold text-foreground mb-1",children:"Select a tool"}),m.jsx("p",{className:"text-xs text-muted-foreground font-medium",children:"Choose a tool from the left to configure parameters"})]})})})})]})}),m.jsx(qo,{withHandle:!0}),m.jsx(Cr,{defaultSize:30,minSize:15,maxSize:70,children:m.jsxs("div",{className:"h-full flex flex-col border-t border-border bg-background",children:[m.jsx("div",{className:"flex items-center justify-between p-4 border-b border-border",children:m.jsx("h2",{className:"text-xs font-semibold text-foreground",children:"Response"})}),m.jsx("div",{className:"flex-1 overflow-hidden",children:S?m.jsx("div",{className:"p-4",children:m.jsx("div",{className:"p-3 bg-destructive/10 border border-destructive/20 rounded text-destructive text-xs font-medium",children:S})}):d?m.jsx(ba,{className:"h-full",children:m.jsx("div",{className:"p-4",children:m.jsx(_h,{src:d,dark:!0,theme:"atom",enableClipboard:!0,displaySize:!1,collapseStringsAfterLength:100,style:{fontSize:"12px",fontFamily:"ui-monospace, SFMono-Regular, 'SF Mono', monospace",backgroundColor:"hsl(var(--background))",padding:"16px",borderRadius:"8px",border:"1px solid hsl(var(--border))"}})})}):m.jsx("div",{className:"flex items-center justify-center h-full",children:m.jsx("p",{className:"text-xs text-muted-foreground font-medium",children:"Execute a tool to see results here"})})})]})})]}),m.jsx(Iy,{elicitationRequest:R,onResponse:X,loading:A})]}):m.jsx(wa,{children:m.jsx(Pc,{className:"pt-6",children:m.jsx("p",{className:"text-center text-muted-foreground font-medium",children:"Please select a server to view tools"})})})}function T9({serverConfig:e}){var T,R,O,A;const[t,n]=w.useState({}),[r,s]=w.useState(""),[o,l]=w.useState(null),[u,d]=w.useState(!1),[h,g]=w.useState(!1),[p,x]=w.useState("");w.useEffect(()=>{e&&S()},[e]);const v=()=>e||null,S=async()=>{const M=v();if(M){g(!0),x(""),n({});try{const N=await fetch("/api/mcp/resources/list",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({serverConfig:M})}),z=await N.json();N.ok?n(z.resources||{}):x(z.error||"Failed to fetch resources")}catch(N){x(`Network error fetching resources: ${N}`)}finally{g(!1)}}},C=async M=>{const N=v();if(N){d(!0),x("");try{const z=await fetch("/api/mcp/resources/read",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({serverConfig:N,uri:M})}),P=await z.json();z.ok?l(P.content):x(P.error||"Failed to read resource")}catch(z){x(`Network error reading resource: ${z}`)}finally{d(!1)}}},E=Object.values(t).flat();return e?m.jsx("div",{className:"h-[calc(100vh-120px)] flex flex-col",children:m.jsxs($o,{direction:"vertical",className:"flex-1",children:[m.jsx(Cr,{defaultSize:70,minSize:30,children:m.jsxs($o,{direction:"horizontal",className:"h-full",children:[m.jsx(Cr,{defaultSize:30,minSize:20,maxSize:50,children:m.jsxs("div",{className:"h-full flex flex-col border-r border-border bg-background",children:[m.jsxs("div",{className:"flex items-center justify-between px-4 py-4 border-b border-border bg-background",children:[m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx(ky,{className:"h-3 w-3 text-muted-foreground"}),m.jsx("h2",{className:"text-xs font-semibold text-foreground",children:"Resources"}),m.jsx(zr,{variant:"secondary",className:"text-xs font-mono",children:E.length})]}),m.jsx(Je,{onClick:S,variant:"ghost",size:"sm",disabled:h,children:m.jsx(Lr,{className:`h-3 w-3 ${h?"animate-spin":""} cursor-pointer`})})]}),m.jsx("div",{className:"flex-1 overflow-hidden",children:m.jsx(ba,{className:"h-full",children:m.jsx("div",{className:"p-2",children:h?m.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[m.jsx("div",{className:"w-8 h-8 bg-muted rounded-full flex items-center justify-center mb-3",children:m.jsx(Lr,{className:"h-4 w-4 text-muted-foreground animate-spin cursor-pointer"})}),m.jsx("p",{className:"text-xs text-muted-foreground font-semibold mb-1",children:"Loading resources..."}),m.jsx("p",{className:"text-xs text-muted-foreground/70",children:"Fetching available resources from server"})]}):E.length===0?m.jsx("div",{className:"text-center py-8",children:m.jsx("p",{className:"text-sm text-muted-foreground",children:"No resources available"})}):m.jsx("div",{className:"space-y-1",children:E.map(M=>m.jsx("div",{className:`cursor-pointer transition-all duration-200 hover:bg-muted/30 dark:hover:bg-muted/50 p-3 rounded-md mx-2 ${r===M.uri?"bg-muted/50 dark:bg-muted/50 shadow-sm border border-border ring-1 ring-ring/20":"hover:shadow-sm"}`,onClick:()=>s(M.uri),children:m.jsxs("div",{className:"flex items-start gap-3",children:[m.jsxs("div",{className:"flex-1 min-w-0",children:[m.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[m.jsx(QI,{className:"h-3 w-3 text-muted-foreground flex-shrink-0"}),m.jsx("code",{className:"font-mono text-xs font-medium text-foreground bg-muted px-1.5 py-0.5 rounded border border-border",children:M.name})]}),M.description&&m.jsx("p",{className:"text-xs mt-2 line-clamp-2 leading-relaxed text-muted-foreground",children:M.description}),m.jsx("p",{className:"text-xs text-muted-foreground/70 mt-1 font-mono truncate",children:M.uri}),M.mimeType&&m.jsx(zr,{variant:"outline",className:"text-xs mt-2 font-mono",children:M.mimeType})]}),m.jsx(sl,{className:"h-3 w-3 text-muted-foreground flex-shrink-0 mt-1"})]})},M.uri))})})})})]})}),m.jsx(qo,{withHandle:!0}),m.jsx(Cr,{defaultSize:70,minSize:50,children:m.jsx("div",{className:"h-full flex flex-col bg-background",children:r?m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"flex items-center justify-between px-6 py-5 border-b border-border bg-background",children:[m.jsxs("div",{className:"space-y-2",children:[m.jsx("div",{className:"flex items-center gap-3",children:m.jsx("code",{className:"font-mono font-semibold text-foreground bg-muted px-2 py-1 rounded-md border border-border text-xs",children:((T=E.find(M=>M.uri===r))==null?void 0:T.name)||r})}),m.jsx("p",{className:"text-xs text-muted-foreground font-mono truncate max-w-md",children:r})]}),m.jsx(Je,{onClick:()=>C(r),disabled:u,className:"bg-primary hover:bg-primary/90 text-primary-foreground shadow-sm transition-all duration-200 cursor-pointer",size:"sm",children:u?m.jsxs(m.Fragment,{children:[m.jsx(Lr,{className:"h-3 w-3 mr-1.5 animate-spin cursor-pointer"}),m.jsx("span",{className:"font-mono text-xs",children:"Reading"})]}):m.jsxs(m.Fragment,{children:[m.jsx(wf,{className:"h-3 w-3 mr-1.5 cursor-pointer"}),m.jsx("span",{className:"font-mono text-xs",children:"Read"})]})})]}),((R=E.find(M=>M.uri===r))==null?void 0:R.description)&&m.jsx("div",{className:"px-6 py-4 bg-muted/50 border-b border-border",children:m.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed font-medium",children:(O=E.find(M=>M.uri===r))==null?void 0:O.description})}),m.jsx("div",{className:"flex-1 overflow-hidden",children:m.jsx(ba,{className:"h-full",children:m.jsx("div",{className:"px-6 py-6",children:o?m.jsx("div",{className:"space-y-4",children:(A=o==null?void 0:o.contents)==null?void 0:A.map((M,N)=>m.jsxs("div",{className:"group",children:[m.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[m.jsx(zr,{variant:"secondary",className:"text-xs font-mono font-medium",children:M.type}),M.mimeType&&m.jsx(zr,{variant:"outline",className:"text-xs font-mono",children:M.mimeType})]}),m.jsx("div",{className:"border border-border rounded-md overflow-hidden",children:M.type==="text"?m.jsx("pre",{className:"text-xs font-mono whitespace-pre-wrap p-4 bg-background overflow-auto max-h-96",children:M.text}):m.jsx("div",{className:"p-4",children:m.jsx(_h,{src:M,dark:!0,theme:"atom",enableClipboard:!0,displaySize:!1,collapseStringsAfterLength:100,style:{fontSize:"12px",fontFamily:"ui-monospace, SFMono-Regular, 'SF Mono', monospace",backgroundColor:"hsl(var(--background))",padding:"0",borderRadius:"0",border:"none"}})})})]},N))}):m.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[m.jsx("div",{className:"w-10 h-10 bg-muted rounded-full flex items-center justify-center mb-3",children:m.jsx(wf,{className:"h-4 w-4 text-muted-foreground"})}),m.jsx("p",{className:"text-xs text-muted-foreground font-semibold mb-1",children:"Ready to read resource"}),m.jsx("p",{className:"text-xs text-muted-foreground/70",children:"Click the Read button to view resource content"})]})})})})]}):m.jsx("div",{className:"h-full flex items-center justify-center",children:m.jsxs("div",{className:"text-center",children:[m.jsx("div",{className:"w-12 h-12 bg-muted rounded-full flex items-center justify-center mx-auto mb-3",children:m.jsx(ky,{className:"h-5 w-5 text-muted-foreground"})}),m.jsx("p",{className:"text-xs font-semibold text-foreground mb-1",children:"Select a resource"}),m.jsx("p",{className:"text-xs text-muted-foreground font-medium",children:"Choose a resource from the left to preview its content"})]})})})})]})}),m.jsx(qo,{withHandle:!0}),m.jsx(Cr,{defaultSize:30,minSize:15,maxSize:70,children:m.jsxs("div",{className:"h-full flex flex-col border-t border-border bg-background",children:[m.jsx("div",{className:"flex items-center justify-between p-4 border-b border-border",children:m.jsx("h2",{className:"text-xs font-semibold text-foreground",children:"Status"})}),m.jsx("div",{className:"flex-1 overflow-hidden",children:p?m.jsx("div",{className:"p-4",children:m.jsx("div",{className:"p-3 bg-destructive/10 border border-destructive/20 rounded text-destructive text-xs font-medium",children:p})}):m.jsx("div",{className:"flex items-center justify-center h-full",children:m.jsx("p",{className:"text-xs text-muted-foreground font-medium",children:"Resource operations status will appear here"})})})]})})]})}):m.jsx(wa,{children:m.jsx(Pc,{className:"pt-6",children:m.jsx("p",{className:"text-center text-muted-foreground font-medium",children:"Please select a server to view resources"})})})}function E9({serverConfig:e}){const[t,n]=w.useState({}),[r,s]=w.useState(""),[o,l]=w.useState(null),[u,d]=w.useState([]),[h,g]=w.useState(null),[p,x]=w.useState(!1),[v,S]=w.useState(!1),[C,E]=w.useState("");w.useEffect(()=>{e&&R()},[e]),w.useEffect(()=>{o!=null&&o.arguments?O(o.arguments):d([])},[o]);const T=()=>e||null,R=async()=>{const P=T();if(P){S(!0),E("");try{const B=await fetch("/api/mcp/prompts/list",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({serverConfig:P})}),D=await B.json();console.log("bigData",D),B.ok?n(D.prompts||{}):E(D.error||"Failed to fetch prompts")}catch{E("Network error fetching prompts")}finally{S(!1)}}},O=P=>{if(!P||P.length===0){d([]);return}const B=P.map(D=>({name:D.name,type:"string",description:D.description,required:D.required||!1,value:""}));d(B)},A=(P,B)=>{d(D=>D.map(H=>H.name===P?{...H,value:B}:H))},M=()=>{const P={};return u.forEach(B=>{if(B.value!==""&&B.value!==null&&B.value!==void 0){let D=B.value;if(B.type==="number"||B.type==="integer")D=Number(B.value);else if(B.type==="boolean")D=!!B.value;else if(B.type==="array"||B.type==="object")try{D=JSON.parse(B.value)}catch{D=B.value}P[B.name]=D}}),P},N=async()=>{if(!r)return;const P=T();if(P){x(!0),E("");try{const B=M(),D=await fetch("/api/mcp/prompts/get",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({serverConfig:P,name:r,args:B})}),H=await D.json();D.ok?g(H.content):E(H.error||"Failed to get prompt")}catch(B){E(`Error getting prompt: ${B}`)}finally{x(!1)}}},z=Object.values(t).flat().map(P=>P.name);return e?m.jsx("div",{className:"h-[calc(100vh-120px)] flex flex-col",children:m.jsxs($o,{direction:"vertical",className:"flex-1",children:[m.jsx(Cr,{defaultSize:70,minSize:30,children:m.jsxs($o,{direction:"horizontal",className:"h-full",children:[m.jsx(Cr,{defaultSize:30,minSize:20,maxSize:50,children:m.jsxs("div",{className:"h-full flex flex-col border-r border-border bg-background",children:[m.jsxs("div",{className:"flex items-center justify-between px-4 py-4 border-b border-border bg-background",children:[m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx(Ty,{className:"h-3 w-3 text-muted-foreground"}),m.jsx("h2",{className:"text-xs font-semibold text-foreground",children:"Prompts"}),m.jsx(zr,{variant:"secondary",className:"text-xs font-mono",children:z.length})]}),m.jsx(Je,{onClick:R,variant:"ghost",size:"sm",disabled:v,children:m.jsx(Lr,{className:`h-3 w-3 ${v?"animate-spin":""} cursor-pointer`})})]}),m.jsx("div",{className:"flex-1 overflow-hidden",children:m.jsx(ba,{className:"h-full",children:m.jsx("div",{className:"p-2",children:v?m.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[m.jsx("div",{className:"w-8 h-8 bg-muted rounded-full flex items-center justify-center mb-3",children:m.jsx(Lr,{className:"h-4 w-4 text-muted-foreground animate-spin cursor-pointer"})}),m.jsx("p",{className:"text-xs text-muted-foreground font-semibold mb-1",children:"Loading prompts..."}),m.jsx("p",{className:"text-xs text-muted-foreground/70",children:"Fetching available prompts from server"})]}):z.length===0?m.jsx("div",{className:"text-center py-8",children:m.jsx("p",{className:"text-sm text-muted-foreground",children:"No prompts available"})}):m.jsx("div",{className:"space-y-1",children:z.map(P=>{var B,D;return m.jsx("div",{className:`cursor-pointer transition-all duration-200 hover:bg-muted/30 dark:hover:bg-muted/50 p-3 rounded-md mx-2 ${r===P?"bg-muted/50 dark:bg-muted/50 shadow-sm border border-border ring-1 ring-ring/20":"hover:shadow-sm"}`,onClick:()=>{s(P);const H=Object.values(t).flat().find($=>$.name===P);l(H||null)},children:m.jsxs("div",{className:"flex items-start gap-3",children:[m.jsxs("div",{className:"flex-1 min-w-0",children:[m.jsx("div",{className:"flex items-center gap-2 mb-1",children:m.jsx("code",{className:"font-mono text-xs font-medium text-foreground bg-muted px-1.5 py-0.5 rounded border border-border",children:P})}),((B=Object.values(t).flat().find(H=>H.name===P))==null?void 0:B.description)&&m.jsx("p",{className:"text-xs mt-2 line-clamp-2 leading-relaxed text-muted-foreground",children:(D=Object.values(t).flat().find(H=>H.name===P))==null?void 0:D.description})]}),m.jsx(sl,{className:"h-3 w-3 text-muted-foreground flex-shrink-0 mt-1"})]})},P)})})})})})]})}),m.jsx(qo,{withHandle:!0}),m.jsx(Cr,{defaultSize:70,minSize:50,children:m.jsx("div",{className:"h-full flex flex-col bg-background",children:r?m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"flex items-center justify-between px-6 py-5 border-b border-border bg-background",children:[m.jsx("div",{className:"space-y-2",children:m.jsx("div",{className:"flex items-center gap-3",children:m.jsx("code",{className:"font-mono font-semibold text-foreground bg-muted px-2 py-1 rounded-md border border-border text-xs",children:r})})}),m.jsx(Je,{onClick:N,disabled:p||!r,className:"bg-primary hover:bg-primary/90 text-primary-foreground shadow-sm transition-all duration-200 cursor-pointer",size:"sm",children:p?m.jsxs(m.Fragment,{children:[m.jsx(Lr,{className:"h-3 w-3 mr-1.5 animate-spin cursor-pointer"}),m.jsx("span",{className:"font-mono text-xs",children:"Loading"})]}):m.jsxs(m.Fragment,{children:[m.jsx(Sf,{className:"h-3 w-3 mr-1.5 cursor-pointer"}),m.jsx("span",{className:"font-mono text-xs",children:"Get Prompt"})]})})]}),(o==null?void 0:o.description)&&m.jsx("div",{className:"px-6 py-4 bg-muted/50 border-b border-border",children:m.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed font-medium",children:o.description})}),m.jsx("div",{className:"flex-1 overflow-hidden",children:m.jsx(ba,{className:"h-full",children:m.jsx("div",{className:"px-6 py-6",children:u.length===0?m.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[m.jsx("div",{className:"w-10 h-10 bg-muted rounded-full flex items-center justify-center mb-3",children:m.jsx(Sf,{className:"h-4 w-4 text-muted-foreground"})}),m.jsx("p",{className:"text-xs text-muted-foreground font-semibold mb-1",children:"No parameters required"}),m.jsx("p",{className:"text-xs text-muted-foreground/70",children:"This prompt can be retrieved directly"})]}):m.jsx("div",{className:"space-y-8",children:u.map(P=>{var B;return m.jsxs("div",{className:"group",children:[m.jsxs("div",{className:"flex items-start justify-between mb-3",children:[m.jsxs("div",{className:"space-y-1",children:[m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx("code",{className:"font-mono text-xs font-semibold text-foreground bg-muted px-1.5 py-0.5 rounded border border-border",children:P.name}),P.required&&m.jsx("div",{className:"w-1.5 h-1.5 bg-amber-400 dark:bg-amber-500 rounded-full",title:"Required field"})]}),P.description&&m.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed max-w-md font-medium",children:P.description})]}),m.jsx(zr,{variant:"secondary",className:"text-xs font-mono font-medium",children:P.type})]}),m.jsx("div",{className:"space-y-2",children:P.type==="enum"?m.jsxs(ka,{value:P.value,onValueChange:D=>A(P.name,D),children:[m.jsx(Ea,{className:"w-full bg-background border-border hover:border-border/80 focus:border-ring focus:ring-0 font-medium text-xs",children:m.jsx(Ta,{placeholder:"Select an option",className:"font-mono text-xs"})}),m.jsx(_a,{children:(B=P.enum)==null?void 0:B.map(D=>m.jsx(ar,{value:D,className:"font-mono text-xs",children:D},D))})]}):P.type==="boolean"?m.jsxs("div",{className:"flex items-center space-x-3 py-2",children:[m.jsx("input",{type:"checkbox",checked:P.value,onChange:D=>A(P.name,D.target.checked),className:"w-4 h-4 text-primary bg-background border-border rounded focus:ring-ring focus:ring-2"}),m.jsx("span",{className:"text-xs text-foreground font-medium",children:P.value?"Enabled":"Disabled"})]}):P.type==="array"||P.type==="object"?m.jsx(cu,{value:typeof P.value=="string"?P.value:JSON.stringify(P.value,null,2),onChange:D=>A(P.name,D.target.value),placeholder:`Enter ${P.type} as JSON`,className:"font-mono text-xs h-20 bg-background border-border hover:border-border/80 focus:border-ring focus:ring-0 resize-none"}):m.jsx(zt,{type:P.type==="number"||P.type==="integer"?"number":"text",value:P.value,onChange:D=>A(P.name,D.target.value),placeholder:`Enter ${P.name}`,className:"bg-background border-border hover:border-border/80 focus:border-ring focus:ring-0 font-medium text-xs"})})]},P.name)})})})})})]}):m.jsx("div",{className:"h-full flex items-center justify-center",children:m.jsxs("div",{className:"text-center",children:[m.jsx("div",{className:"w-12 h-12 bg-muted rounded-full flex items-center justify-center mx-auto mb-3",children:m.jsx(Ty,{className:"h-5 w-5 text-muted-foreground"})}),m.jsx("p",{className:"text-xs font-semibold text-foreground mb-1",children:"Select a prompt"}),m.jsx("p",{className:"text-xs text-muted-foreground font-medium",children:"Choose a prompt from the left to view details"})]})})})})]})}),m.jsx(qo,{withHandle:!0}),m.jsx(Cr,{defaultSize:30,minSize:15,maxSize:70,children:m.jsxs("div",{className:"h-full flex flex-col border-t border-border bg-background",children:[m.jsx("div",{className:"flex items-center justify-between p-4 border-b border-border",children:m.jsx("h2",{className:"text-xs font-semibold text-foreground",children:"Prompt Content"})}),m.jsx("div",{className:"flex-1 overflow-hidden",children:C?m.jsx("div",{className:"p-4",children:m.jsx("div",{className:"p-3 bg-destructive/10 border border-destructive/20 rounded text-destructive text-xs font-medium",children:C})}):h?m.jsx(ba,{className:"h-full",children:m.jsx("div",{className:"p-4",children:typeof h=="string"?m.jsx("pre",{className:"whitespace-pre-wrap text-xs font-mono bg-muted p-4 rounded-md border border-border",children:h}):m.jsx(_h,{src:h,dark:!0,theme:"atom",enableClipboard:!0,displaySize:!1,collapseStringsAfterLength:100,style:{fontSize:"12px",fontFamily:"ui-monospace, SFMono-Regular, 'SF Mono', monospace",backgroundColor:"hsl(var(--background))",padding:"16px",borderRadius:"8px",border:"1px solid hsl(var(--border))"}})})}):m.jsx("div",{className:"flex items-center justify-center h-full",children:m.jsx("p",{className:"text-xs text-muted-foreground font-medium",children:"Get a prompt to see its content here"})})})]})})]})}):m.jsx(wa,{children:m.jsx(Pc,{className:"pt-6",children:m.jsx("p",{className:"text-center text-muted-foreground font-medium",children:"Please select a server to view prompts"})})})}var Vy=(e=>(e.CLAUDE_OPUS_4_0="claude-opus-4-0",e.CLAUDE_SONNET_4_0="claude-sonnet-4-0",e.CLAUDE_3_7_SONNET_LATEST="claude-3-7-sonnet-latest",e.CLAUDE_3_5_SONNET_LATEST="claude-3-5-sonnet-latest",e.CLAUDE_3_5_HAIKU_LATEST="claude-3-5-haiku-latest",e.O3_MINI="o3-mini",e.O3="o3",e.O4_MINI="o4-mini",e.GPT_4_1="gpt-4.1",e.GPT_4_1_MINI="gpt-4.1-mini",e.GPT_4_1_NANO="gpt-4.1-nano",e.GPT_4O="gpt-4o",e.GPT_4O_MINI="gpt-4o-mini",e.GPT_4_TURBO="gpt-4-turbo",e.GPT_4="gpt-4",e.GPT_3_5_TURBO="gpt-3.5-turbo",e.O1="o1",e))(Vy||{});const Sg=[{id:"claude-opus-4-0",name:"Claude Opus 4",provider:"anthropic"},{id:"claude-sonnet-4-0",name:"Claude Sonnet 4",provider:"anthropic"},{id:"claude-3-7-sonnet-latest",name:"Claude Sonnet 3.7",provider:"anthropic"},{id:"claude-3-5-sonnet-latest",name:"Claude Sonnet 3.5",provider:"anthropic"},{id:"claude-3-5-haiku-latest",name:"Claude Haiku 3.5",provider:"anthropic"},{id:"o3-mini",name:"O3 Mini",provider:"openai"},{id:"o3",name:"O3",provider:"openai"},{id:"o4-mini",name:"O4 Mini",provider:"openai"},{id:"gpt-4.1",name:"GPT-4.1",provider:"openai"},{id:"gpt-4.1-mini",name:"GPT-4.1 Mini",provider:"openai"},{id:"gpt-4.1-nano",name:"GPT-4.1 Nano",provider:"openai"},{id:"gpt-4o",name:"GPT-4o",provider:"openai"},{id:"gpt-4o-mini",name:"GPT-4o Mini",provider:"openai"},{id:"gpt-4-turbo",name:"GPT-4 Turbo",provider:"openai"},{id:"gpt-4",name:"GPT-4",provider:"openai"},{id:"gpt-3.5-turbo",name:"GPT-3.5 Turbo",provider:"openai"},{id:"o1",name:"O1",provider:"openai"}],ak="mcp-inspector-provider-tokens",Cg={anthropic:"",openai:"",ollama:"local",ollamaBaseUrl:"http://localhost:11434"};function hN(){const[e,t]=w.useState(Cg),[n,r]=w.useState(!1);w.useEffect(()=>{if(typeof window<"u"){try{const p=localStorage.getItem(ak);if(p){const x=JSON.parse(p);t(x)}}catch(p){console.warn("Failed to load provider tokens from localStorage:",p)}r(!0)}},[]),w.useEffect(()=>{if(n&&typeof window<"u")try{localStorage.setItem(ak,JSON.stringify(e))}catch(p){console.warn("Failed to save provider tokens to localStorage:",p)}},[e,n]);const s=w.useCallback((p,x)=>{t(v=>({...v,[p]:x}))},[]),o=w.useCallback(p=>{t(x=>({...x,[p]:""}))},[]),l=w.useCallback(()=>{t(Cg)},[]),u=w.useCallback(p=>{var x;return!!((x=e[p])!=null&&x.trim())},[e]),d=w.useCallback(p=>e[p]||"",[e]),h=w.useCallback(()=>e.ollamaBaseUrl||Cg.ollamaBaseUrl,[e.ollamaBaseUrl]),g=w.useCallback(p=>{t(x=>({...x,ollamaBaseUrl:p}))},[]);return{tokens:e,setToken:s,clearToken:o,clearAllTokens:l,hasToken:u,getToken:d,getOllamaBaseUrl:h,setOllamaBaseUrl:g}}class mN{constructor(t="http://localhost:11434"){ua(this,"baseUrl");this.baseUrl=t}setBaseUrl(t){this.baseUrl=t}async isOllamaRunning(){try{return(await fetch(`${this.baseUrl}/api/version`,{method:"GET",signal:AbortSignal.timeout(3e3)})).ok}catch{return!1}}async getAvailableModels(){try{const t=await fetch(`${this.baseUrl}/api/tags`,{method:"GET",signal:AbortSignal.timeout(5e3)});return t.ok?(await t.json()).models.map(r=>r.name):[]}catch(t){return console.warn("Failed to fetch Ollama models:",t),[]}}async checkModelExists(t){return(await this.getAvailableModels()).some(r=>r===t||r.startsWith(`${t}:`))}async getFilteredAvailableModels(t){const n=await this.getAvailableModels();return t.filter(r=>n.some(s=>s===r||s.startsWith(`${r}:`)))}}const _9=new mN,j9=async e=>{const t=e?new mN(e):_9;return await t.isOllamaRunning()?{isRunning:!0,availableModels:await t.getAvailableModels()}:{isRunning:!1,availableModels:[]}};function N9(e={}){const{getToken:t,hasToken:n,tokens:r,getOllamaBaseUrl:s}=hN(),{initialMessages:o=[],serverConfigs:l,systemPrompt:u,onMessageSent:d,onMessageReceived:h,onError:g,onModelChange:p}=e,[x,v]=w.useState({messages:o,isLoading:!1,connectionStatus:"disconnected"}),[S,C]=w.useState(""),[E,T]=w.useState("idle"),[R,O]=w.useState(null),[A,M]=w.useState([]),[N,z]=w.useState(!1),[P,B]=w.useState(null),[D,H]=w.useState(!1),$=w.useRef(null),X=w.useRef(x.messages);console.log("model",R),w.useEffect(()=>{X.current=x.messages},[x.messages]),w.useEffect(()=>{const ee=async()=>{const{isRunning:K,availableModels:oe}=await j9(s());z(K);const ce=oe.map(me=>({id:me,name:me,provider:"ollama"}));M(ce)};ee();const W=setInterval(ee,3e4);return()=>clearInterval(W)},[s]),w.useEffect(()=>{if(!R||!I.some(ee=>ee.id===R.id))if(N&&A.length>0)O(A[0]);else if(n("anthropic")){const ee=Sg.find(W=>W.id===Vy.CLAUDE_3_5_SONNET_LATEST);ee&&O(ee)}else if(n("openai")){const ee=Sg.find(W=>W.id===Vy.GPT_4O);ee&&O(ee)}else O(null)},[r,A,N,n,R]);const Y=w.useMemo(()=>R?R.provider==="ollama"?N&&A.some(ee=>ee.id===R.id||ee.id.startsWith(`${R.id}:`))?"local":"":t(R.provider):"",[R,t,N,A]),te=w.useCallback(ee=>{O(ee),p&&p(ee)},[p]),I=w.useMemo(()=>{const ee=[];for(const W of Sg)(W.provider==="anthropic"&&n("anthropic")||W.provider==="openai"&&n("openai"))&&ee.push(W);return N&&A.length>0&&ee.push(...A),ee},[N,A,n]),F=w.useCallback((ee,W,K,oe,ce)=>{if((ee.type==="text"||!ee.type&&ee.content)&&ee.content){K.current+=ee.content,v(me=>({...me,messages:me.messages.map(be=>be.id===W.id?{...be,content:K.current}:be)}));return}if((ee.type==="tool_call"||!ee.type&&ee.toolCall)&&ee.toolCall){const me=ee.toolCall;oe.current=[...oe.current,me],v(be=>({...be,messages:be.messages.map(Te=>Te.id===W.id?{...Te,toolCalls:[...oe.current]}:Te)}));return}if((ee.type==="tool_result"||!ee.type&&ee.toolResult)&&ee.toolResult){const me=ee.toolResult;ce.current=[...ce.current,me],oe.current=oe.current.map(be=>be.id===me.toolCallId?{...be,status:me.error?"error":"completed"}:be),v(be=>({...be,messages:be.messages.map(Te=>Te.id===W.id?{...Te,toolCalls:[...oe.current],toolResults:[...ce.current]}:Te)}));return}if(ee.type==="elicitation_request"){B({requestId:ee.requestId,message:ee.message,schema:ee.schema,timestamp:ee.timestamp});return}if(ee.type==="elicitation_complete"){B(null);return}if((ee.type==="error"||!ee.type&&ee.error)&&ee.error)throw new Error(ee.error)},[]),V=w.useCallback(async ee=>{var K,oe;if(!l||!R||!Y)throw new Error("Missing required configuration: serverConfig, model, and apiKey are required");const W=ik("assistant","");v(ce=>({...ce,messages:[...ce.messages,W]}));try{const ce=await fetch("/api/mcp/chat",{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream"},body:JSON.stringify({serverConfigs:l,model:R,apiKey:Y,systemPrompt:u,messages:X.current.concat(ee),ollamaBaseUrl:s()}),signal:(K=$.current)==null?void 0:K.signal});if(!ce.ok){const st=await ce.text();let yt;try{yt=JSON.parse(st)}catch{throw new Error(`Chat request failed: ${ce.status}`)}throw new Error(yt.error||"Chat request failed")}const me=(oe=ce.body)==null?void 0:oe.getReader(),be=new TextDecoder,Te={current:""},Ve={current:[]},lt={current:[]};let Mt="",It=!1;if(me)for(;!It;){const{done:st,value:yt}=await me.read();if(st)break;Mt+=be.decode(yt,{stream:!0});const Ct=Mt.split(`
318
+ `);Mt=Ct.pop()||"";for(const lr of Ct)if(lr.startsWith("data: ")){const Jt=lr.slice(6).trim();if(Jt==="[DONE]"){It=!0,v(kt=>({...kt,isLoading:!1}));break}if(Jt)try{const kt=JSON.parse(Jt);F(kt,W,Te,Ve,lt)}catch(kt){console.warn("Failed to parse SSE data:",Jt,kt)}}}if(!Te.current&&!Ve.current.length&&console.warn("No content received from stream"),h){const st={...W,content:Te.current};h(st)}}catch(ce){throw v(me=>({...me,isLoading:!1})),ce}},[l,R,Y,u,h,F,s]),Z=w.useCallback(async(ee,W)=>{if(!ee.trim()||x.isLoading)return;const K=ik("user",ee,W);v(oe=>({...oe,messages:[...oe.messages,K],isLoading:!0,error:void 0})),d&&d(K),$.current=new AbortController;try{await V(K),T("idle")}catch(oe){const ce=oe instanceof Error?oe.message:"An error occurred";v(me=>({...me,isLoading:!1,error:ce})),T("error"),g&&g(ce)}},[x.isLoading,d,V,g]),k=w.useCallback(()=>{$.current&&$.current.abort(),v(ee=>({...ee,isLoading:!1})),T("idle")},[]),G=w.useCallback(async ee=>{const W=X.current,K=W.findIndex(ce=>ce.id===ee);if(K===-1||K===0)return;const oe=W[K-1];if(oe.role==="user"){v(ce=>({...ce,messages:ce.messages.slice(0,K),isLoading:!0})),$.current=new AbortController;try{await V(oe),T("idle")}catch(ce){const me=ce instanceof Error?ce.message:"An error occurred";v(be=>({...be,isLoading:!1,error:me})),T("error"),g&&g(me)}}},[V,g]),le=w.useCallback(ee=>{v(W=>({...W,messages:W.messages.filter(K=>K.id!==ee)}))},[]),j=w.useCallback(()=>{v(ee=>({...ee,messages:[],error:void 0})),C("")},[]),Q=w.useCallback(async(ee,W)=>{if(!P){console.warn("Cannot handle elicitation response: no active request");return}H(!0);try{let K=null;ee==="accept"?K={action:"accept",content:W||{}}:K={action:ee};const oe=await fetch("/api/mcp/chat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"elicitation_response",requestId:P.requestId,response:K})});if(!oe.ok){const ce=`HTTP error! status: ${oe.status}`;throw new Error(ce)}B(null)}catch(K){const oe=K instanceof Error?K.message:"Unknown error";console.error("Error responding to elicitation request:",oe),g&&g("Error responding to elicitation request")}finally{H(!1)}},[P,g]);return w.useEffect(()=>()=>{$.current&&$.current.abort()},[]),{messages:x.messages,isLoading:x.isLoading,error:x.error,connectionStatus:x.connectionStatus,status:E,input:S,setInput:C,model:R,availableModels:I,hasValidApiKey:!!Y,elicitationRequest:P,elicitationLoading:D,sendMessage:Z,stopGeneration:k,regenerateMessage:G,deleteMessage:le,clearChat:j,setModel:te,handleElicitationResponse:Q}}const Dv=w.createContext({});function Pv(e){const t=w.useRef(null);return t.current===null&&(t.current=e()),t.current}const zv=typeof window<"u",pN=zv?w.useLayoutEffect:w.useEffect,jh=w.createContext(null);function Lv(e,t){e.indexOf(t)===-1&&e.push(t)}function Iv(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Pi=(e,t,n)=>n>t?t:n<e?e:n;let Bv=()=>{};const zi={},gN=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function yN(e){return typeof e=="object"&&e!==null}const xN=e=>/^0[^.\s]+$/u.test(e);function Vv(e){let t;return()=>(t===void 0&&(t=e()),t)}const Tr=e=>e,A9=(e,t)=>n=>t(e(n)),uu=(...e)=>e.reduce(A9),Fc=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Uv{constructor(){this.subscriptions=[]}add(t){return Lv(this.subscriptions,t),()=>Iv(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let o=0;o<s;o++){const l=this.subscriptions[o];l&&l(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const ti=e=>e*1e3,ni=e=>e/1e3;function vN(e,t){return t?e*(1e3/t):0}const bN=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,R9=1e-7,M9=12;function O9(e,t,n,r,s){let o,l,u=0;do l=t+(n-t)/2,o=bN(l,r,s)-e,o>0?n=l:t=l;while(Math.abs(o)>R9&&++u<M9);return l}function du(e,t,n,r){if(e===t&&n===r)return Tr;const s=o=>O9(o,0,1,e,n);return o=>o===0||o===1?o:bN(s(o),t,r)}const wN=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,SN=e=>t=>1-e(1-t),CN=du(.33,1.53,.69,.99),Hv=SN(CN),kN=wN(Hv),TN=e=>(e*=2)<1?.5*Hv(e):.5*(2-Math.pow(2,-10*(e-1))),Fv=e=>1-Math.sin(Math.acos(e)),EN=SN(Fv),_N=wN(Fv),D9=du(.42,0,1,1),P9=du(0,0,.58,1),jN=du(.42,0,.58,1),z9=e=>Array.isArray(e)&&typeof e[0]!="number",NN=e=>Array.isArray(e)&&typeof e[0]=="number",L9={linear:Tr,easeIn:D9,easeInOut:jN,easeOut:P9,circIn:Fv,circInOut:_N,circOut:EN,backIn:Hv,backInOut:kN,backOut:CN,anticipate:TN},I9=e=>typeof e=="string",sk=e=>{if(NN(e)){Bv(e.length===4);const[t,n,r,s]=e;return du(t,n,r,s)}else if(I9(e))return L9[e];return e},Fd=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function B9(e,t){let n=new Set,r=new Set,s=!1,o=!1;const l=new WeakSet;let u={delta:0,timestamp:0,isProcessing:!1};function d(g){l.has(g)&&(h.schedule(g),e()),g(u)}const h={schedule:(g,p=!1,x=!1)=>{const S=x&&s?n:r;return p&&l.add(g),S.has(g)||S.add(g),g},cancel:g=>{r.delete(g),l.delete(g)},process:g=>{if(u=g,s){o=!0;return}s=!0,[n,r]=[r,n],n.forEach(d),n.clear(),s=!1,o&&(o=!1,h.process(g))}};return h}const V9=40;function AN(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,l=Fd.reduce((O,A)=>(O[A]=B9(o),O),{}),{setup:u,read:d,resolveKeyframes:h,preUpdate:g,update:p,preRender:x,render:v,postRender:S}=l,C=()=>{const O=zi.useManualTiming?s.timestamp:performance.now();n=!1,zi.useManualTiming||(s.delta=r?1e3/60:Math.max(Math.min(O-s.timestamp,V9),1)),s.timestamp=O,s.isProcessing=!0,u.process(s),d.process(s),h.process(s),g.process(s),p.process(s),x.process(s),v.process(s),S.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(C))},E=()=>{n=!0,r=!0,s.isProcessing||e(C)};return{schedule:Fd.reduce((O,A)=>{const M=l[A];return O[A]=(N,z=!1,P=!1)=>(n||E(),M.schedule(N,z,P)),O},{}),cancel:O=>{for(let A=0;A<Fd.length;A++)l[Fd[A]].cancel(O)},state:s,steps:l}}const{schedule:Nt,cancel:ja,state:gn,steps:kg}=AN(typeof requestAnimationFrame<"u"?requestAnimationFrame:Tr,!0);let sf;function U9(){sf=void 0}const Fn={now:()=>(sf===void 0&&Fn.set(gn.isProcessing||zi.useManualTiming?gn.timestamp:performance.now()),sf),set:e=>{sf=e,queueMicrotask(U9)}},RN=e=>t=>typeof t=="string"&&t.startsWith(e),$v=RN("--"),H9=RN("var(--"),qv=e=>H9(e)?F9.test(e.split("/*")[0].trim()):!1,F9=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,ol={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},$c={...ol,transform:e=>Pi(0,1,e)},$d={...ol,default:1},_c=e=>Math.round(e*1e5)/1e5,Gv=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function $9(e){return e==null}const q9=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Yv=(e,t)=>n=>!!(typeof n=="string"&&q9.test(n)&&n.startsWith(e)||t&&!$9(n)&&Object.prototype.hasOwnProperty.call(n,t)),MN=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,o,l,u]=r.match(Gv);return{[e]:parseFloat(s),[t]:parseFloat(o),[n]:parseFloat(l),alpha:u!==void 0?parseFloat(u):1}},G9=e=>Pi(0,255,e),Tg={...ol,transform:e=>Math.round(G9(e))},os={test:Yv("rgb","red"),parse:MN("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Tg.transform(e)+", "+Tg.transform(t)+", "+Tg.transform(n)+", "+_c($c.transform(r))+")"};function Y9(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const Uy={test:Yv("#"),parse:Y9,transform:os.transform},fu=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),pa=fu("deg"),ri=fu("%"),Be=fu("px"),Z9=fu("vh"),X9=fu("vw"),ok={...ri,parse:e=>ri.parse(e)/100,transform:e=>ri.transform(e*100)},jo={test:Yv("hsl","hue"),parse:MN("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+ri.transform(_c(t))+", "+ri.transform(_c(n))+", "+_c($c.transform(r))+")"},Wt={test:e=>os.test(e)||Uy.test(e)||jo.test(e),parse:e=>os.test(e)?os.parse(e):jo.test(e)?jo.parse(e):Uy.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?os.transform(e):jo.transform(e),getAnimatableNone:e=>{const t=Wt.parse(e);return t.alpha=0,Wt.transform(t)}},K9=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function W9(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Gv))==null?void 0:t.length)||0)+(((n=e.match(K9))==null?void 0:n.length)||0)>0}const ON="number",DN="color",Q9="var",J9="var(",lk="${}",eB=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function qc(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let o=0;const u=t.replace(eB,d=>(Wt.test(d)?(r.color.push(o),s.push(DN),n.push(Wt.parse(d))):d.startsWith(J9)?(r.var.push(o),s.push(Q9),n.push(d)):(r.number.push(o),s.push(ON),n.push(parseFloat(d))),++o,lk)).split(lk);return{values:n,split:u,indexes:r,types:s}}function PN(e){return qc(e).values}function zN(e){const{split:t,types:n}=qc(e),r=t.length;return s=>{let o="";for(let l=0;l<r;l++)if(o+=t[l],s[l]!==void 0){const u=n[l];u===ON?o+=_c(s[l]):u===DN?o+=Wt.transform(s[l]):o+=s[l]}return o}}const tB=e=>typeof e=="number"?0:Wt.test(e)?Wt.getAnimatableNone(e):e;function nB(e){const t=PN(e);return zN(e)(t.map(tB))}const Na={test:W9,parse:PN,createTransformer:zN,getAnimatableNone:nB};function Eg(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function rB({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,o=0,l=0;if(!t)s=o=l=n;else{const u=n<.5?n*(1+t):n+t-n*t,d=2*n-u;s=Eg(d,u,e+1/3),o=Eg(d,u,e),l=Eg(d,u,e-1/3)}return{red:Math.round(s*255),green:Math.round(o*255),blue:Math.round(l*255),alpha:r}}function Tf(e,t){return n=>n>0?t:e}const Rt=(e,t,n)=>e+(t-e)*n,_g=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},iB=[Uy,os,jo],aB=e=>iB.find(t=>t.test(e));function ck(e){const t=aB(e);if(!t)return!1;let n=t.parse(e);return t===jo&&(n=rB(n)),n}const uk=(e,t)=>{const n=ck(e),r=ck(t);if(!n||!r)return Tf(e,t);const s={...n};return o=>(s.red=_g(n.red,r.red,o),s.green=_g(n.green,r.green,o),s.blue=_g(n.blue,r.blue,o),s.alpha=Rt(n.alpha,r.alpha,o),os.transform(s))},Hy=new Set(["none","hidden"]);function sB(e,t){return Hy.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function oB(e,t){return n=>Rt(e,t,n)}function Zv(e){return typeof e=="number"?oB:typeof e=="string"?qv(e)?Tf:Wt.test(e)?uk:uB:Array.isArray(e)?LN:typeof e=="object"?Wt.test(e)?uk:lB:Tf}function LN(e,t){const n=[...e],r=n.length,s=e.map((o,l)=>Zv(o)(o,t[l]));return o=>{for(let l=0;l<r;l++)n[l]=s[l](o);return n}}function lB(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=Zv(e[s])(e[s],t[s]));return s=>{for(const o in r)n[o]=r[o](s);return n}}function cB(e,t){const n=[],r={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const o=t.types[s],l=e.indexes[o][r[o]],u=e.values[l]??0;n[s]=u,r[o]++}return n}const uB=(e,t)=>{const n=Na.createTransformer(t),r=qc(e),s=qc(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?Hy.has(e)&&!s.values.length||Hy.has(t)&&!r.values.length?sB(e,t):uu(LN(cB(r,s),s.values),n):Tf(e,t)};function IN(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Rt(e,t,n):Zv(e)(e,t)}const dB=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>Nt.update(t,n),stop:()=>ja(t),now:()=>gn.isProcessing?gn.timestamp:Fn.now()}},BN=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let o=0;o<s;o++)r+=Math.round(e(o/(s-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Ef=2e4;function Xv(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Ef;)t+=n,r=e.next(t);return t>=Ef?1/0:t}function fB(e,t=100,n){const r=n({...e,keyframes:[0,t]}),s=Math.min(Xv(r),Ef);return{type:"keyframes",ease:o=>r.next(s*o).value/t,duration:ni(s)}}const hB=5;function VN(e,t,n){const r=Math.max(t-hB,0);return vN(n-e(r),t-r)}const Pt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},jg=.001;function mB({duration:e=Pt.duration,bounce:t=Pt.bounce,velocity:n=Pt.velocity,mass:r=Pt.mass}){let s,o,l=1-t;l=Pi(Pt.minDamping,Pt.maxDamping,l),e=Pi(Pt.minDuration,Pt.maxDuration,ni(e)),l<1?(s=h=>{const g=h*l,p=g*e,x=g-n,v=Fy(h,l),S=Math.exp(-p);return jg-x/v*S},o=h=>{const p=h*l*e,x=p*n+n,v=Math.pow(l,2)*Math.pow(h,2)*e,S=Math.exp(-p),C=Fy(Math.pow(h,2),l);return(-s(h)+jg>0?-1:1)*((x-v)*S)/C}):(s=h=>{const g=Math.exp(-h*e),p=(h-n)*e+1;return-jg+g*p},o=h=>{const g=Math.exp(-h*e),p=(n-h)*(e*e);return g*p});const u=5/e,d=gB(s,o,u);if(e=ti(e),isNaN(d))return{stiffness:Pt.stiffness,damping:Pt.damping,duration:e};{const h=Math.pow(d,2)*r;return{stiffness:h,damping:l*2*Math.sqrt(r*h),duration:e}}}const pB=12;function gB(e,t,n){let r=n;for(let s=1;s<pB;s++)r=r-e(r)/t(r);return r}function Fy(e,t){return e*Math.sqrt(1-t*t)}const yB=["duration","bounce"],xB=["stiffness","damping","mass"];function dk(e,t){return t.some(n=>e[n]!==void 0)}function vB(e){let t={velocity:Pt.velocity,stiffness:Pt.stiffness,damping:Pt.damping,mass:Pt.mass,isResolvedFromDuration:!1,...e};if(!dk(e,xB)&&dk(e,yB))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,o=2*Pi(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:Pt.mass,stiffness:s,damping:o}}else{const n=mB(e);t={...t,...n,mass:Pt.mass},t.isResolvedFromDuration=!0}return t}function _f(e=Pt.visualDuration,t=Pt.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const o=n.keyframes[0],l=n.keyframes[n.keyframes.length-1],u={done:!1,value:o},{stiffness:d,damping:h,mass:g,duration:p,velocity:x,isResolvedFromDuration:v}=vB({...n,velocity:-ni(n.velocity||0)}),S=x||0,C=h/(2*Math.sqrt(d*g)),E=l-o,T=ni(Math.sqrt(d/g)),R=Math.abs(E)<5;r||(r=R?Pt.restSpeed.granular:Pt.restSpeed.default),s||(s=R?Pt.restDelta.granular:Pt.restDelta.default);let O;if(C<1){const M=Fy(T,C);O=N=>{const z=Math.exp(-C*T*N);return l-z*((S+C*T*E)/M*Math.sin(M*N)+E*Math.cos(M*N))}}else if(C===1)O=M=>l-Math.exp(-T*M)*(E+(S+T*E)*M);else{const M=T*Math.sqrt(C*C-1);O=N=>{const z=Math.exp(-C*T*N),P=Math.min(M*N,300);return l-z*((S+C*T*E)*Math.sinh(P)+M*E*Math.cosh(P))/M}}const A={calculatedDuration:v&&p||null,next:M=>{const N=O(M);if(v)u.done=M>=p;else{let z=M===0?S:0;C<1&&(z=M===0?ti(S):VN(O,M,N));const P=Math.abs(z)<=r,B=Math.abs(l-N)<=s;u.done=P&&B}return u.value=u.done?l:N,u},toString:()=>{const M=Math.min(Xv(A),Ef),N=BN(z=>A.next(M*z).value,M,30);return M+"ms "+N},toTransition:()=>{}};return A}_f.applyToOptions=e=>{const t=fB(e,100,_f);return e.ease=t.ease,e.duration=ti(t.duration),e.type="keyframes",e};function $y({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:l,min:u,max:d,restDelta:h=.5,restSpeed:g}){const p=e[0],x={done:!1,value:p},v=P=>u!==void 0&&P<u||d!==void 0&&P>d,S=P=>u===void 0?d:d===void 0||Math.abs(u-P)<Math.abs(d-P)?u:d;let C=n*t;const E=p+C,T=l===void 0?E:l(E);T!==E&&(C=T-p);const R=P=>-C*Math.exp(-P/r),O=P=>T+R(P),A=P=>{const B=R(P),D=O(P);x.done=Math.abs(B)<=h,x.value=x.done?T:D};let M,N;const z=P=>{v(x.value)&&(M=P,N=_f({keyframes:[x.value,S(x.value)],velocity:VN(O,P,x.value),damping:s,stiffness:o,restDelta:h,restSpeed:g}))};return z(0),{calculatedDuration:null,next:P=>{let B=!1;return!N&&M===void 0&&(B=!0,A(P),z(P)),M!==void 0&&P>=M?N.next(P-M):(!B&&A(P),x)}}}function bB(e,t,n){const r=[],s=n||zi.mix||IN,o=e.length-1;for(let l=0;l<o;l++){let u=s(e[l],e[l+1]);if(t){const d=Array.isArray(t)?t[l]||Tr:t;u=uu(d,u)}r.push(u)}return r}function wB(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const o=e.length;if(Bv(o===t.length),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const l=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const u=bB(t,r,s),d=u.length,h=g=>{if(l&&g<e[0])return t[0];let p=0;if(d>1)for(;p<e.length-2&&!(g<e[p+1]);p++);const x=Fc(e[p],e[p+1],g);return u[p](x)};return n?g=>h(Pi(e[0],e[o-1],g)):h}function SB(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=Fc(0,t,r);e.push(Rt(n,1,s))}}function CB(e){const t=[0];return SB(t,e.length-1),t}function kB(e,t){return e.map(n=>n*t)}function TB(e,t){return e.map(()=>t||jN).splice(0,e.length-1)}function jc({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=z9(r)?r.map(sk):sk(r),o={done:!1,value:t[0]},l=kB(n&&n.length===t.length?n:CB(t),e),u=wB(l,t,{ease:Array.isArray(s)?s:TB(t,s)});return{calculatedDuration:e,next:d=>(o.value=u(d),o.done=d>=e,o)}}const EB=e=>e!==null;function Kv(e,{repeat:t,repeatType:n="loop"},r,s=1){const o=e.filter(EB),u=s<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!u||r===void 0?o[u]:r}const _B={decay:$y,inertia:$y,tween:jc,keyframes:jc,spring:_f};function UN(e){typeof e.type=="string"&&(e.type=_B[e.type])}class Wv{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const jB=e=>e/100;class Qv extends Wv{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,s;const{motionValue:n}=this.options;n&&n.updatedAt!==Fn.now()&&this.tick(Fn.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(r=this.options).onStop)==null||s.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;UN(t);const{type:n=jc,repeat:r=0,repeatDelay:s=0,repeatType:o,velocity:l=0}=t;let{keyframes:u}=t;const d=n||jc;d!==jc&&typeof u[0]!="number"&&(this.mixKeyframes=uu(jB,IN(u[0],u[1])),u=[0,100]);const h=d({...t,keyframes:u});o==="mirror"&&(this.mirroredGenerator=d({...t,keyframes:[...u].reverse(),velocity:-l})),h.calculatedDuration===null&&(h.calculatedDuration=Xv(h));const{calculatedDuration:g}=h;this.calculatedDuration=g,this.resolvedDuration=g+s,this.totalDuration=this.resolvedDuration*(r+1)-s,this.generator=h}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:s,mixKeyframes:o,mirroredGenerator:l,resolvedDuration:u,calculatedDuration:d}=this;if(this.startTime===null)return r.next(0);const{delay:h=0,keyframes:g,repeat:p,repeatType:x,repeatDelay:v,type:S,onUpdate:C,finalKeyframe:E}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const T=this.currentTime-h*(this.playbackSpeed>=0?1:-1),R=this.playbackSpeed>=0?T<0:T>s;this.currentTime=Math.max(T,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let O=this.currentTime,A=r;if(p){const P=Math.min(this.currentTime,s)/u;let B=Math.floor(P),D=P%1;!D&&P>=1&&(D=1),D===1&&B--,B=Math.min(B,p+1),!!(B%2)&&(x==="reverse"?(D=1-D,v&&(D-=v/u)):x==="mirror"&&(A=l)),O=Pi(0,1,D)*u}const M=R?{done:!1,value:g[0]}:A.next(O);o&&(M.value=o(M.value));let{done:N}=M;!R&&d!==null&&(N=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const z=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&N);return z&&S!==$y&&(M.value=Kv(g,this.options,E,this.speed)),C&&C(M.value),z&&this.finish(),M}then(t,n){return this.finished.then(t,n)}get duration(){return ni(this.calculatedDuration)}get time(){return ni(this.currentTime)}set time(t){var n;t=ti(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Fn.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=ni(this.currentTime))}play(){var s,o;if(this.isStopped)return;const{driver:t=dB,startTime:n}=this.options;this.driver||(this.driver=t(l=>this.tick(l))),(o=(s=this.options).onPlay)==null||o.call(s);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Fn.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function NB(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const ls=e=>e*180/Math.PI,qy=e=>{const t=ls(Math.atan2(e[1],e[0]));return Gy(t)},AB={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:qy,rotateZ:qy,skewX:e=>ls(Math.atan(e[1])),skewY:e=>ls(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Gy=e=>(e=e%360,e<0&&(e+=360),e),fk=qy,hk=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),mk=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),RB={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:hk,scaleY:mk,scale:e=>(hk(e)+mk(e))/2,rotateX:e=>Gy(ls(Math.atan2(e[6],e[5]))),rotateY:e=>Gy(ls(Math.atan2(-e[2],e[0]))),rotateZ:fk,rotate:fk,skewX:e=>ls(Math.atan(e[4])),skewY:e=>ls(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Yy(e){return e.includes("scale")?1:0}function Zy(e,t){if(!e||e==="none")return Yy(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=RB,s=n;else{const u=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=AB,s=u}if(!s)return Yy(t);const o=r[t],l=s[1].split(",").map(OB);return typeof o=="function"?o(l):l[o]}const MB=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Zy(n,t)};function OB(e){return parseFloat(e.trim())}const ll=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],cl=new Set(ll),pk=e=>e===ol||e===Be,DB=new Set(["x","y","z"]),PB=ll.filter(e=>!DB.has(e));function zB(e){const t=[];return PB.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const hs={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Zy(t,"x"),y:(e,{transform:t})=>Zy(t,"y")};hs.translateX=hs.x;hs.translateY=hs.y;const ms=new Set;let Xy=!1,Ky=!1,Wy=!1;function HN(){if(Ky){const e=Array.from(ms).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=zB(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([o,l])=>{var u;(u=r.getValue(o))==null||u.set(l)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Ky=!1,Xy=!1,ms.forEach(e=>e.complete(Wy)),ms.clear()}function FN(){ms.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Ky=!0)})}function LB(){Wy=!0,FN(),HN(),Wy=!1}class Jv{constructor(t,n,r,s,o,l=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=s,this.element=o,this.isAsync=l}scheduleResolve(){this.state="scheduled",this.isAsync?(ms.add(this),Xy||(Xy=!0,Nt.read(FN),Nt.resolveKeyframes(HN))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;if(t[0]===null){const o=s==null?void 0:s.get(),l=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const u=r.readValue(n,l);u!=null&&(t[0]=u)}t[0]===void 0&&(t[0]=l),s&&o===void 0&&s.set(t[0])}NB(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),ms.delete(this)}cancel(){this.state==="scheduled"&&(ms.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const IB=e=>e.startsWith("--");function BB(e,t,n){IB(t)?e.style.setProperty(t,n):e.style[t]=n}const VB=Vv(()=>window.ScrollTimeline!==void 0),UB={};function HB(e,t){const n=Vv(e);return()=>UB[t]??n()}const $N=HB(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),kc=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,gk={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:kc([0,.65,.55,1]),circOut:kc([.55,0,1,.45]),backIn:kc([.31,.01,.66,-.59]),backOut:kc([.33,1.53,.69,.99])};function qN(e,t){if(e)return typeof e=="function"?$N()?BN(e,t):"ease-out":NN(e)?kc(e):Array.isArray(e)?e.map(n=>qN(n,t)||gk.easeOut):gk[e]}function FB(e,t,n,{delay:r=0,duration:s=300,repeat:o=0,repeatType:l="loop",ease:u="easeOut",times:d}={},h=void 0){const g={[t]:n};d&&(g.offset=d);const p=qN(u,s);Array.isArray(p)&&(g.easing=p);const x={delay:r,duration:s,easing:Array.isArray(p)?"linear":p,fill:"both",iterations:o+1,direction:l==="reverse"?"alternate":"normal"};return h&&(x.pseudoElement=h),e.animate(g,x)}function GN(e){return typeof e=="function"&&"applyToOptions"in e}function $B({type:e,...t}){return GN(e)&&$N()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class qB extends Wv{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:s,pseudoElement:o,allowFlatten:l=!1,finalKeyframe:u,onComplete:d}=t;this.isPseudoElement=!!o,this.allowFlatten=l,this.options=t,Bv(typeof t.type!="string");const h=$B(t);this.animation=FB(n,r,s,h,o),h.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const g=Kv(s,this.options,u,this.speed);this.updateMotionValue?this.updateMotionValue(g):BB(n,r,g),this.animation.cancel()}d==null||d(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,n;this.isPseudoElement||(n=(t=this.animation).commitStyles)==null||n.call(t)}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return ni(Number(t))}get time(){return ni(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=ti(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&VB()?(this.animation.timeline=t,Tr):n(this)}}const YN={anticipate:TN,backInOut:kN,circInOut:_N};function GB(e){return e in YN}function YB(e){typeof e.ease=="string"&&GB(e.ease)&&(e.ease=YN[e.ease])}const yk=10;class ZB extends qB{constructor(t){YB(t),UN(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:s,element:o,...l}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const u=new Qv({...l,autoplay:!1}),d=ti(this.finishedTime??this.time);n.setWithVelocity(u.sample(d-yk).value,u.sample(d).value,yk),u.stop()}}const xk=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Na.test(e)||e==="0")&&!e.startsWith("url("));function XB(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function KB(e,t,n,r){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],l=xk(s,t),u=xk(o,t);return!l||!u?!1:XB(e)||(n==="spring"||GN(n))&&r}const WB=new Set(["opacity","clipPath","filter","transform"]),QB=Vv(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function JB(e){var g;const{motionValue:t,name:n,repeatDelay:r,repeatType:s,damping:o,type:l}=e;if(!(((g=t==null?void 0:t.owner)==null?void 0:g.current)instanceof HTMLElement))return!1;const{onUpdate:d,transformTemplate:h}=t.owner.getProps();return QB()&&n&&WB.has(n)&&(n!=="transform"||!h)&&!d&&!r&&s!=="mirror"&&o!==0&&l!=="inertia"}const e8=40;class t8 extends Wv{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:l="loop",keyframes:u,name:d,motionValue:h,element:g,...p}){var S;super(),this.stop=()=>{var C,E;this._animation&&(this._animation.stop(),(C=this.stopTimeline)==null||C.call(this)),(E=this.keyframeResolver)==null||E.cancel()},this.createdAt=Fn.now();const x={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:o,repeatType:l,name:d,motionValue:h,element:g,...p},v=(g==null?void 0:g.KeyframeResolver)||Jv;this.keyframeResolver=new v(u,(C,E,T)=>this.onKeyframesResolved(C,E,x,!T),d,h,g),(S=this.keyframeResolver)==null||S.scheduleResolve()}onKeyframesResolved(t,n,r,s){this.keyframeResolver=void 0;const{name:o,type:l,velocity:u,delay:d,isHandoff:h,onUpdate:g}=r;this.resolvedAt=Fn.now(),KB(t,o,l,u)||((zi.instantAnimations||!d)&&(g==null||g(Kv(t,r,n))),t[0]=t[t.length-1],r.duration=0,r.repeat=0);const x={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>e8?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},v=!h&&JB(x)?new ZB({...x,element:x.motionValue.owner.current}):new Qv(x);v.finished.then(()=>this.notifyFinished()).catch(Tr),this.pendingTimeline&&(this.stopTimeline=v.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=v}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),LB()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}const n8=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function r8(e){const t=n8.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}function ZN(e,t,n=1){const[r,s]=r8(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const l=o.trim();return gN(l)?parseFloat(l):l}return qv(s)?ZN(s,t,n+1):s}function e0(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const XN=new Set(["width","height","top","left","right","bottom",...ll]),i8={test:e=>e==="auto",parse:e=>e},KN=e=>t=>t.test(e),WN=[ol,Be,ri,pa,X9,Z9,i8],vk=e=>WN.find(KN(e));function a8(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||xN(e):!0}const s8=new Set(["brightness","contrast","saturate","opacity"]);function o8(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Gv)||[];if(!r)return e;const s=n.replace(r,"");let o=s8.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+s+")"}const l8=/\b([a-z-]*)\(.*?\)/gu,Qy={...Na,getAnimatableNone:e=>{const t=e.match(l8);return t?t.map(o8).join(" "):e}},bk={...ol,transform:Math.round},c8={rotate:pa,rotateX:pa,rotateY:pa,rotateZ:pa,scale:$d,scaleX:$d,scaleY:$d,scaleZ:$d,skew:pa,skewX:pa,skewY:pa,distance:Be,translateX:Be,translateY:Be,translateZ:Be,x:Be,y:Be,z:Be,perspective:Be,transformPerspective:Be,opacity:$c,originX:ok,originY:ok,originZ:Be},t0={borderWidth:Be,borderTopWidth:Be,borderRightWidth:Be,borderBottomWidth:Be,borderLeftWidth:Be,borderRadius:Be,radius:Be,borderTopLeftRadius:Be,borderTopRightRadius:Be,borderBottomRightRadius:Be,borderBottomLeftRadius:Be,width:Be,maxWidth:Be,height:Be,maxHeight:Be,top:Be,right:Be,bottom:Be,left:Be,padding:Be,paddingTop:Be,paddingRight:Be,paddingBottom:Be,paddingLeft:Be,margin:Be,marginTop:Be,marginRight:Be,marginBottom:Be,marginLeft:Be,backgroundPositionX:Be,backgroundPositionY:Be,...c8,zIndex:bk,fillOpacity:$c,strokeOpacity:$c,numOctaves:bk},u8={...t0,color:Wt,backgroundColor:Wt,outlineColor:Wt,fill:Wt,stroke:Wt,borderColor:Wt,borderTopColor:Wt,borderRightColor:Wt,borderBottomColor:Wt,borderLeftColor:Wt,filter:Qy,WebkitFilter:Qy},QN=e=>u8[e];function JN(e,t){let n=QN(e);return n!==Qy&&(n=Na),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const d8=new Set(["auto","none","0"]);function f8(e,t,n){let r=0,s;for(;r<e.length&&!s;){const o=e[r];typeof o=="string"&&!d8.has(o)&&qc(o).values.length&&(s=e[r]),r++}if(s&&n)for(const o of t)e[o]=JN(n,s)}class h8 extends Jv{constructor(t,n,r,s,o){super(t,n,r,s,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let d=0;d<t.length;d++){let h=t[d];if(typeof h=="string"&&(h=h.trim(),qv(h))){const g=ZN(h,n.current);g!==void 0&&(t[d]=g),d===t.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!XN.has(r)||t.length!==2)return;const[s,o]=t,l=vk(s),u=vk(o);if(l!==u)if(pk(l)&&pk(u))for(let d=0;d<t.length;d++){const h=t[d];typeof h=="string"&&(t[d]=parseFloat(h))}else hs[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let s=0;s<t.length;s++)(t[s]===null||a8(t[s]))&&r.push(s);r.length&&f8(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=hs[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(r,s).jump(s,!1)}measureEndState(){var u;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const o=r.length-1,l=r[o];r[o]=hs[n](t.measureViewportBox(),window.getComputedStyle(t.current)),l!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=l),(u=this.removedTransforms)!=null&&u.length&&this.removedTransforms.forEach(([d,h])=>{t.getValue(d).set(h)}),this.resolveNoneKeyframes()}}function m8(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const s=(n==null?void 0:n[e])??r.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}const eA=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function tA(e){return yN(e)&&"offsetHeight"in e}const wk=30,p8=e=>!isNaN(parseFloat(e));class g8{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,s=!0)=>{var l,u;const o=Fn.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((l=this.events.change)==null||l.notify(this.current),this.dependents))for(const d of this.dependents)d.dirty();s&&((u=this.events.renderRequest)==null||u.notify(this.current))},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Fn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=p8(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Uv);const r=this.events[t].add(n);return t==="change"?()=>{r(),Nt.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Fn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>wk)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,wk);return vN(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Go(e,t){return new g8(e,t)}const{schedule:n0}=AN(queueMicrotask,!1),Pr={x:!1,y:!1};function nA(){return Pr.x||Pr.y}function y8(e){return e==="x"||e==="y"?Pr[e]?null:(Pr[e]=!0,()=>{Pr[e]=!1}):Pr.x||Pr.y?null:(Pr.x=Pr.y=!0,()=>{Pr.x=Pr.y=!1})}function rA(e,t){const n=m8(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function Sk(e){return!(e.pointerType==="touch"||nA())}function x8(e,t,n={}){const[r,s,o]=rA(e,n),l=u=>{if(!Sk(u))return;const{target:d}=u,h=t(d,u);if(typeof h!="function"||!d)return;const g=p=>{Sk(p)&&(h(p),d.removeEventListener("pointerleave",g))};d.addEventListener("pointerleave",g,s)};return r.forEach(u=>{u.addEventListener("pointerenter",l,s)}),o}const iA=(e,t)=>t?e===t?!0:iA(e,t.parentElement):!1,r0=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,v8=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function b8(e){return v8.has(e.tagName)||e.tabIndex!==-1}const of=new WeakSet;function Ck(e){return t=>{t.key==="Enter"&&e(t)}}function Ng(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const w8=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Ck(()=>{if(of.has(n))return;Ng(n,"down");const s=Ck(()=>{Ng(n,"up")}),o=()=>Ng(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function kk(e){return r0(e)&&!nA()}function S8(e,t,n={}){const[r,s,o]=rA(e,n),l=u=>{const d=u.currentTarget;if(!kk(u))return;of.add(d);const h=t(d,u),g=(v,S)=>{window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",x),of.has(d)&&of.delete(d),kk(v)&&typeof h=="function"&&h(v,{success:S})},p=v=>{g(v,d===window||d===document||n.useGlobalTarget||iA(d,v.target))},x=v=>{g(v,!1)};window.addEventListener("pointerup",p,s),window.addEventListener("pointercancel",x,s)};return r.forEach(u=>{(n.useGlobalTarget?window:u).addEventListener("pointerdown",l,s),tA(u)&&(u.addEventListener("focus",h=>w8(h,s)),!b8(u)&&!u.hasAttribute("tabindex")&&(u.tabIndex=0))}),o}function aA(e){return yN(e)&&"ownerSVGElement"in e}function C8(e){return aA(e)&&e.tagName==="svg"}const En=e=>!!(e&&e.getVelocity),k8=[...WN,Wt,Na],T8=e=>k8.find(KN(e)),i0=w.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class E8 extends w.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,s=tA(r)&&r.offsetWidth||0,o=this.props.sizeRef.current;o.height=n.offsetHeight||0,o.width=n.offsetWidth||0,o.top=n.offsetTop,o.left=n.offsetLeft,o.right=s-o.width-o.left}return null}componentDidUpdate(){}render(){return this.props.children}}function _8({children:e,isPresent:t,anchorX:n,root:r}){const s=w.useId(),o=w.useRef(null),l=w.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:u}=w.useContext(i0);return w.useInsertionEffect(()=>{const{width:d,height:h,top:g,left:p,right:x}=l.current;if(t||!o.current||!d||!h)return;const v=n==="left"?`left: ${p}`:`right: ${x}`;o.current.dataset.motionPopId=s;const S=document.createElement("style");u&&(S.nonce=u);const C=r??document.head;return C.appendChild(S),S.sheet&&S.sheet.insertRule(`
319
+ [data-motion-pop-id="${s}"] {
320
+ position: absolute !important;
321
+ width: ${d}px !important;
322
+ height: ${h}px !important;
323
+ ${v}px !important;
324
+ top: ${g}px !important;
325
+ }
326
+ `),()=>{C.removeChild(S),C.contains(S)&&C.removeChild(S)}},[t]),m.jsx(E8,{isPresent:t,childRef:o,sizeRef:l,children:w.cloneElement(e,{ref:o})})}const j8=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:o,mode:l,anchorX:u,root:d})=>{const h=Pv(N8),g=w.useId();let p=!0,x=w.useMemo(()=>(p=!1,{id:g,initial:t,isPresent:n,custom:s,onExitComplete:v=>{h.set(v,!0);for(const S of h.values())if(!S)return;r&&r()},register:v=>(h.set(v,!1),()=>h.delete(v))}),[n,h,r]);return o&&p&&(x={...x}),w.useMemo(()=>{h.forEach((v,S)=>h.set(S,!1))},[n]),w.useEffect(()=>{!n&&!h.size&&r&&r()},[n]),l==="popLayout"&&(e=m.jsx(_8,{isPresent:n,anchorX:u,root:d,children:e})),m.jsx(jh.Provider,{value:x,children:e})};function N8(){return new Map}function sA(e=!0){const t=w.useContext(jh);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,o=w.useId();w.useEffect(()=>{if(e)return s(o)},[e]);const l=w.useCallback(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,l]:[!0]}const qd=e=>e.key||"";function Tk(e){const t=[];return w.Children.forEach(e,n=>{w.isValidElement(n)&&t.push(n)}),t}const jf=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:o="sync",propagate:l=!1,anchorX:u="left",root:d})=>{const[h,g]=sA(l),p=w.useMemo(()=>Tk(e),[e]),x=l&&!h?[]:p.map(qd),v=w.useRef(!0),S=w.useRef(p),C=Pv(()=>new Map),[E,T]=w.useState(p),[R,O]=w.useState(p);pN(()=>{v.current=!1,S.current=p;for(let N=0;N<R.length;N++){const z=qd(R[N]);x.includes(z)?C.delete(z):C.get(z)!==!0&&C.set(z,!1)}},[R,x.length,x.join("-")]);const A=[];if(p!==E){let N=[...p];for(let z=0;z<R.length;z++){const P=R[z],B=qd(P);x.includes(B)||(N.splice(z,0,P),A.push(P))}return o==="wait"&&A.length&&(N=A),O(Tk(N)),T(p),null}const{forceRender:M}=w.useContext(Dv);return m.jsx(m.Fragment,{children:R.map(N=>{const z=qd(N),P=l&&!h?!1:p===R||x.includes(z),B=()=>{if(C.has(z))C.set(z,!0);else return;let D=!0;C.forEach(H=>{H||(D=!1)}),D&&(M==null||M(),O(S.current),l&&(g==null||g()),r&&r())};return m.jsx(j8,{isPresent:P,initial:!v.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:o,root:d,onExitComplete:P?void 0:B,anchorX:u,children:N},z)})})},oA=w.createContext({strict:!1}),Ek={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Yo={};for(const e in Ek)Yo[e]={isEnabled:t=>Ek[e].some(n=>!!t[n])};function A8(e){for(const t in e)Yo[t]={...Yo[t],...e[t]}}const R8=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Nf(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||R8.has(e)}let lA=e=>!Nf(e);function M8(e){typeof e=="function"&&(lA=t=>t.startsWith("on")?!Nf(t):e(t))}try{M8(require("@emotion/is-prop-valid").default)}catch{}function O8(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||(lA(s)||n===!0&&Nf(s)||!t&&!Nf(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}const Nh=w.createContext({});function Ah(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Gc(e){return typeof e=="string"||Array.isArray(e)}const a0=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],s0=["initial",...a0];function Rh(e){return Ah(e.animate)||s0.some(t=>Gc(e[t]))}function cA(e){return!!(Rh(e)||e.variants)}function D8(e,t){if(Rh(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Gc(n)?n:void 0,animate:Gc(r)?r:void 0}}return e.inherit!==!1?t:{}}function P8(e){const{initial:t,animate:n}=D8(e,w.useContext(Nh));return w.useMemo(()=>({initial:t,animate:n}),[_k(t),_k(n)])}function _k(e){return Array.isArray(e)?e.join(" "):e}const Yc={};function z8(e){for(const t in e)Yc[t]=e[t],$v(t)&&(Yc[t].isCSSVariable=!0)}function uA(e,{layout:t,layoutId:n}){return cl.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Yc[e]||e==="opacity")}const L8={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},I8=ll.length;function B8(e,t,n){let r="",s=!0;for(let o=0;o<I8;o++){const l=ll[o],u=e[l];if(u===void 0)continue;let d=!0;if(typeof u=="number"?d=u===(l.startsWith("scale")?1:0):d=parseFloat(u)===0,!d||n){const h=eA(u,t0[l]);if(!d){s=!1;const g=L8[l]||l;r+=`${g}(${h}) `}n&&(t[l]=h)}}return r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function o0(e,t,n){const{style:r,vars:s,transformOrigin:o}=e;let l=!1,u=!1;for(const d in t){const h=t[d];if(cl.has(d)){l=!0;continue}else if($v(d)){s[d]=h;continue}else{const g=eA(h,t0[d]);d.startsWith("origin")?(u=!0,o[d]=g):r[d]=g}}if(t.transform||(l||n?r.transform=B8(t,e.transform,n):r.transform&&(r.transform="none")),u){const{originX:d="50%",originY:h="50%",originZ:g=0}=o;r.transformOrigin=`${d} ${h} ${g}`}}const l0=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function dA(e,t,n){for(const r in t)!En(t[r])&&!uA(r,n)&&(e[r]=t[r])}function V8({transformTemplate:e},t){return w.useMemo(()=>{const n=l0();return o0(n,t,e),Object.assign({},n.vars,n.style)},[t])}function U8(e,t){const n=e.style||{},r={};return dA(r,n,e),Object.assign(r,V8(e,t)),r}function H8(e,t){const n={},r=U8(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const F8={offset:"stroke-dashoffset",array:"stroke-dasharray"},$8={offset:"strokeDashoffset",array:"strokeDasharray"};function q8(e,t,n=1,r=0,s=!0){e.pathLength=1;const o=s?F8:$8;e[o.offset]=Be.transform(-r);const l=Be.transform(t),u=Be.transform(n);e[o.array]=`${l} ${u}`}function fA(e,{attrX:t,attrY:n,attrScale:r,pathLength:s,pathSpacing:o=1,pathOffset:l=0,...u},d,h,g){if(o0(e,u,h),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:x}=e;p.transform&&(x.transform=p.transform,delete p.transform),(x.transform||p.transformOrigin)&&(x.transformOrigin=p.transformOrigin??"50% 50%",delete p.transformOrigin),x.transform&&(x.transformBox=(g==null?void 0:g.transformBox)??"fill-box",delete p.transformBox),t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),r!==void 0&&(p.scale=r),s!==void 0&&q8(p,s,o,l,!1)}const hA=()=>({...l0(),attrs:{}}),mA=e=>typeof e=="string"&&e.toLowerCase()==="svg";function G8(e,t,n,r){const s=w.useMemo(()=>{const o=hA();return fA(o,t,mA(r),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};dA(o,e.style,e),s.style={...o,...s.style}}return s}const Y8=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function c0(e){return typeof e!="string"||e.includes("-")?!1:!!(Y8.indexOf(e)>-1||/[A-Z]/u.test(e))}function Z8(e,t,n,{latestValues:r},s,o=!1){const u=(c0(e)?G8:H8)(t,r,s,e),d=O8(t,typeof e=="string",o),h=e!==w.Fragment?{...d,...u,ref:n}:{},{children:g}=t,p=w.useMemo(()=>En(g)?g.get():g,[g]);return w.createElement(e,{...h,children:p})}function jk(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function u0(e,t,n,r){if(typeof t=="function"){const[s,o]=jk(r);t=t(n!==void 0?n:e.custom,s,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,o]=jk(r);t=t(n!==void 0?n:e.custom,s,o)}return t}function lf(e){return En(e)?e.get():e}function X8({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,s){return{latestValues:K8(n,r,s,e),renderState:t()}}function K8(e,t,n,r){const s={},o=r(e,{});for(const x in o)s[x]=lf(o[x]);let{initial:l,animate:u}=e;const d=Rh(e),h=cA(e);t&&h&&!d&&e.inherit!==!1&&(l===void 0&&(l=t.initial),u===void 0&&(u=t.animate));let g=n?n.initial===!1:!1;g=g||l===!1;const p=g?u:l;if(p&&typeof p!="boolean"&&!Ah(p)){const x=Array.isArray(p)?p:[p];for(let v=0;v<x.length;v++){const S=u0(e,x[v]);if(S){const{transitionEnd:C,transition:E,...T}=S;for(const R in T){let O=T[R];if(Array.isArray(O)){const A=g?O.length-1:0;O=O[A]}O!==null&&(s[R]=O)}for(const R in C)s[R]=C[R]}}}return s}const pA=e=>(t,n)=>{const r=w.useContext(Nh),s=w.useContext(jh),o=()=>X8(e,t,r,s);return n?o():Pv(o)};function d0(e,t,n){var o;const{style:r}=e,s={};for(const l in r)(En(r[l])||t.style&&En(t.style[l])||uA(l,e)||((o=n==null?void 0:n.getValue(l))==null?void 0:o.liveStyle)!==void 0)&&(s[l]=r[l]);return s}const W8=pA({scrapeMotionValuesFromProps:d0,createRenderState:l0});function gA(e,t,n){const r=d0(e,t,n);for(const s in e)if(En(e[s])||En(t[s])){const o=ll.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[o]=e[s]}return r}const Q8=pA({scrapeMotionValuesFromProps:gA,createRenderState:hA}),J8=Symbol.for("motionComponentSymbol");function No(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function eV(e,t,n){return w.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):No(n)&&(n.current=r))},[t])}const f0=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),tV="framerAppearId",yA="data-"+f0(tV),xA=w.createContext({});function nV(e,t,n,r,s){var C,E;const{visualElement:o}=w.useContext(Nh),l=w.useContext(oA),u=w.useContext(jh),d=w.useContext(i0).reducedMotion,h=w.useRef(null);r=r||l.renderer,!h.current&&r&&(h.current=r(e,{visualState:t,parent:o,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:d}));const g=h.current,p=w.useContext(xA);g&&!g.projection&&s&&(g.type==="html"||g.type==="svg")&&rV(h.current,n,s,p);const x=w.useRef(!1);w.useInsertionEffect(()=>{g&&x.current&&g.update(n,u)});const v=n[yA],S=w.useRef(!!v&&!((C=window.MotionHandoffIsComplete)!=null&&C.call(window,v))&&((E=window.MotionHasOptimisedAnimation)==null?void 0:E.call(window,v)));return pN(()=>{g&&(x.current=!0,window.MotionIsMounted=!0,g.updateFeatures(),g.scheduleRenderMicrotask(),S.current&&g.animationState&&g.animationState.animateChanges())}),w.useEffect(()=>{g&&(!S.current&&g.animationState&&g.animationState.animateChanges(),S.current&&(queueMicrotask(()=>{var T;(T=window.MotionHandoffMarkAsComplete)==null||T.call(window,v)}),S.current=!1))}),g}function rV(e,t,n,r){const{layoutId:s,layout:o,drag:l,dragConstraints:u,layoutScroll:d,layoutRoot:h,layoutCrossfade:g}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:vA(e.parent)),e.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:!!l||u&&No(u),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,crossfade:g,layoutScroll:d,layoutRoot:h})}function vA(e){if(e)return e.options.allowProjection!==!1?e.projection:vA(e.parent)}function Ag(e,{forwardMotionProps:t=!1}={},n,r){n&&A8(n);const s=c0(e)?Q8:W8;function o(u,d){let h;const g={...w.useContext(i0),...u,layoutId:iV(u)},{isStatic:p}=g,x=P8(u),v=s(u,p);if(!p&&zv){aV();const S=sV(g);h=S.MeasureLayout,x.visualElement=nV(e,v,g,r,S.ProjectionNode)}return m.jsxs(Nh.Provider,{value:x,children:[h&&x.visualElement?m.jsx(h,{visualElement:x.visualElement,...g}):null,Z8(e,u,eV(v,x.visualElement,d),v,p,t)]})}o.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=w.forwardRef(o);return l[J8]=e,l}function iV({layoutId:e}){const t=w.useContext(Dv).id;return t&&e!==void 0?t+"-"+e:e}function aV(e,t){w.useContext(oA).strict}function sV(e){const{drag:t,layout:n}=Yo;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function oV(e,t){if(typeof Proxy>"u")return Ag;const n=new Map,r=(o,l)=>Ag(o,l,e,t),s=(o,l)=>r(o,l);return new Proxy(s,{get:(o,l)=>l==="create"?r:(n.has(l)||n.set(l,Ag(l,void 0,e,t)),n.get(l))})}function bA({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function lV({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function cV(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Rg(e){return e===void 0||e===1}function Jy({scale:e,scaleX:t,scaleY:n}){return!Rg(e)||!Rg(t)||!Rg(n)}function as(e){return Jy(e)||wA(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function wA(e){return Nk(e.x)||Nk(e.y)}function Nk(e){return e&&e!=="0%"}function Af(e,t,n){const r=e-n,s=t*r;return n+s}function Ak(e,t,n,r,s){return s!==void 0&&(e=Af(e,s,r)),Af(e,n,r)+t}function ex(e,t=0,n=1,r,s){e.min=Ak(e.min,t,n,r,s),e.max=Ak(e.max,t,n,r,s)}function SA(e,{x:t,y:n}){ex(e.x,t.translate,t.scale,t.originPoint),ex(e.y,n.translate,n.scale,n.originPoint)}const Rk=.999999999999,Mk=1.0000000000001;function uV(e,t,n,r=!1){const s=n.length;if(!s)return;t.x=t.y=1;let o,l;for(let u=0;u<s;u++){o=n[u],l=o.projectionDelta;const{visualElement:d}=o.options;d&&d.props.style&&d.props.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Ro(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),l&&(t.x*=l.x.scale,t.y*=l.y.scale,SA(e,l)),r&&as(o.latestValues)&&Ro(e,o.latestValues))}t.x<Mk&&t.x>Rk&&(t.x=1),t.y<Mk&&t.y>Rk&&(t.y=1)}function Ao(e,t){e.min=e.min+t,e.max=e.max+t}function Ok(e,t,n,r,s=.5){const o=Rt(e.min,e.max,s);ex(e,t,n,o,r)}function Ro(e,t){Ok(e.x,t.x,t.scaleX,t.scale,t.originX),Ok(e.y,t.y,t.scaleY,t.scale,t.originY)}function CA(e,t){return bA(cV(e.getBoundingClientRect(),t))}function dV(e,t,n){const r=CA(e,n),{scroll:s}=t;return s&&(Ao(r.x,s.offset.x),Ao(r.y,s.offset.y)),r}const Dk=()=>({translate:0,scale:1,origin:0,originPoint:0}),Mo=()=>({x:Dk(),y:Dk()}),Pk=()=>({min:0,max:0}),Gt=()=>({x:Pk(),y:Pk()}),tx={current:null},kA={current:!1};function fV(){if(kA.current=!0,!!zv)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>tx.current=e.matches;e.addEventListener("change",t),t()}else tx.current=!1}const hV=new WeakMap;function mV(e,t,n){for(const r in t){const s=t[r],o=n[r];if(En(s))e.addValue(r,s);else if(En(o))e.addValue(r,Go(s,{owner:e}));else if(o!==s)if(e.hasValue(r)){const l=e.getValue(r);l.liveStyle===!0?l.jump(s):l.hasAnimated||l.set(s)}else{const l=e.getStaticValue(r);e.addValue(r,Go(l!==void 0?l:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const zk=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class pV{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,blockInitialAnimation:o,visualState:l},u={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Jv,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const x=Fn.now();this.renderScheduledAt<x&&(this.renderScheduledAt=x,Nt.render(this.render,!1,!0))};const{latestValues:d,renderState:h}=l;this.latestValues=d,this.baseTarget={...d},this.initialValues=n.initial?{...d}:{},this.renderState=h,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=u,this.blockInitialAnimation=!!o,this.isControllingVariants=Rh(n),this.isVariantNode=cA(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:g,...p}=this.scrapeMotionValuesFromProps(n,{},this);for(const x in p){const v=p[x];d[x]!==void 0&&En(v)&&v.set(d[x],!1)}}mount(t){this.current=t,hV.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),kA.current||fV(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:tx.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),ja(this.notifyUpdate),ja(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=cl.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",u=>{this.latestValues[t]=u,this.props.onUpdate&&Nt.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);let l;window.MotionCheckAppearSync&&(l=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),o(),l&&l(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Yo){const n=Yo[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Gt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<zk.length;r++){const s=zk[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const o="on"+s,l=t[o];l&&(this.propEventSubscriptions[s]=this.on(s,l))}this.prevMotionValues=mV(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Go(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(gN(r)||xN(r))?r=parseFloat(r):!T8(r)&&Na.test(n)&&(r=JN(t,n)),this.setBaseTarget(t,En(r)?r.get():r)),En(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var o;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const l=u0(this.props,n,(o=this.presenceContext)==null?void 0:o.custom);l&&(r=l[t])}if(n&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!En(s)?s:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Uv),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){n0.render(this.render)}}class TA extends pV{constructor(){super(...arguments),this.KeyframeResolver=h8}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;En(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function EA(e,{style:t,vars:n},r,s){const o=e.style;let l;for(l in t)o[l]=t[l];s==null||s.applyProjectionStyles(o,r);for(l in n)o.setProperty(l,n[l])}function gV(e){return window.getComputedStyle(e)}class yV extends TA{constructor(){super(...arguments),this.type="html",this.renderInstance=EA}readValueFromInstance(t,n){var r;if(cl.has(n))return(r=this.projection)!=null&&r.isProjecting?Yy(n):MB(t,n);{const s=gV(t),o=($v(n)?s.getPropertyValue(n):s[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return CA(t,n)}build(t,n,r){o0(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return d0(t,n,r)}}const _A=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function xV(e,t,n,r){EA(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(_A.has(s)?s:f0(s),t.attrs[s])}class vV extends TA{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Gt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(cl.has(n)){const r=QN(n);return r&&r.default||0}return n=_A.has(n)?n:f0(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return gA(t,n,r)}build(t,n,r){fA(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,s){xV(t,n,r,s)}mount(t){this.isSVGTag=mA(t.tagName),super.mount(t)}}const bV=(e,t)=>c0(e)?new vV(t):new yV(t,{allowProjection:e!==w.Fragment});function Zc(e,t,n){const r=e.getProps();return u0(r,t,n!==void 0?n:r.custom,e)}const nx=e=>Array.isArray(e);function wV(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Go(n))}function SV(e){return nx(e)?e[e.length-1]||0:e}function CV(e,t){const n=Zc(e,t);let{transitionEnd:r={},transition:s={},...o}=n||{};o={...o,...r};for(const l in o){const u=SV(o[l]);wV(e,l,u)}}function kV(e){return!!(En(e)&&e.add)}function rx(e,t){const n=e.getValue("willChange");if(kV(n))return n.add(t);if(!n&&zi.WillChange){const r=new zi.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function jA(e){return e.props[yA]}const TV=e=>e!==null;function EV(e,{repeat:t,repeatType:n="loop"},r){const s=e.filter(TV),o=t&&n!=="loop"&&t%2===1?0:s.length-1;return s[o]}const _V={type:"spring",stiffness:500,damping:25,restSpeed:10},jV=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),NV={type:"keyframes",duration:.8},AV={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},RV=(e,{keyframes:t})=>t.length>2?NV:cl.has(e)?e.startsWith("scale")?jV(t[1]):_V:AV;function MV({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:s,repeat:o,repeatType:l,repeatDelay:u,from:d,elapsed:h,...g}){return!!Object.keys(g).length}const h0=(e,t,n,r={},s,o)=>l=>{const u=e0(r,e)||{},d=u.delay||r.delay||0;let{elapsed:h=0}=r;h=h-ti(d);const g={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...u,delay:-h,onUpdate:x=>{t.set(x),u.onUpdate&&u.onUpdate(x)},onComplete:()=>{l(),u.onComplete&&u.onComplete()},name:e,motionValue:t,element:o?void 0:s};MV(u)||Object.assign(g,RV(e,g)),g.duration&&(g.duration=ti(g.duration)),g.repeatDelay&&(g.repeatDelay=ti(g.repeatDelay)),g.from!==void 0&&(g.keyframes[0]=g.from);let p=!1;if((g.type===!1||g.duration===0&&!g.repeatDelay)&&(g.duration=0,g.delay===0&&(p=!0)),(zi.instantAnimations||zi.skipAnimations)&&(p=!0,g.duration=0,g.delay=0),g.allowFlatten=!u.type&&!u.ease,p&&!o&&t.get()!==void 0){const x=EV(g.keyframes,u);if(x!==void 0){Nt.update(()=>{g.onUpdate(x),g.onComplete()});return}}return u.isSync?new Qv(g):new t8(g)};function OV({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function NA(e,t,{delay:n=0,transitionOverride:r,type:s}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:l,...u}=t;r&&(o=r);const d=[],h=s&&e.animationState&&e.animationState.getState()[s];for(const g in u){const p=e.getValue(g,e.latestValues[g]??null),x=u[g];if(x===void 0||h&&OV(h,g))continue;const v={delay:n,...e0(o||{},g)},S=p.get();if(S!==void 0&&!p.isAnimating&&!Array.isArray(x)&&x===S&&!v.velocity)continue;let C=!1;if(window.MotionHandoffAnimation){const T=jA(e);if(T){const R=window.MotionHandoffAnimation(T,g,Nt);R!==null&&(v.startTime=R,C=!0)}}rx(e,g),p.start(h0(g,p,x,e.shouldReduceMotion&&XN.has(g)?{type:!1}:v,e,C));const E=p.animation;E&&d.push(E)}return l&&Promise.all(d).then(()=>{Nt.update(()=>{l&&CV(e,l)})}),d}function ix(e,t,n={}){var d;const r=Zc(e,t,n.type==="exit"?(d=e.presenceContext)==null?void 0:d.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const o=r?()=>Promise.all(NA(e,r,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(h=0)=>{const{delayChildren:g=0,staggerChildren:p,staggerDirection:x}=s;return DV(e,t,h,g,p,x,n)}:()=>Promise.resolve(),{when:u}=s;if(u){const[h,g]=u==="beforeChildren"?[o,l]:[l,o];return h().then(()=>g())}else return Promise.all([o(),l(n.delay)])}function DV(e,t,n=0,r=0,s=0,o=1,l){const u=[],d=e.variantChildren.size,h=(d-1)*s,g=typeof r=="function",p=g?x=>r(x,d):o===1?(x=0)=>x*s:(x=0)=>h-x*s;return Array.from(e.variantChildren).sort(PV).forEach((x,v)=>{x.notify("AnimationStart",t),u.push(ix(x,t,{...l,delay:n+(g?0:r)+p(v)}).then(()=>x.notify("AnimationComplete",t)))}),Promise.all(u)}function PV(e,t){return e.sortNodePosition(t)}function zV(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(o=>ix(e,o,n));r=Promise.all(s)}else if(typeof t=="string")r=ix(e,t,n);else{const s=typeof t=="function"?Zc(e,t,n.custom):t;r=Promise.all(NA(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function AA(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const LV=s0.length;function RA(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?RA(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<LV;n++){const r=s0[n],s=e.props[r];(Gc(s)||s===!1)&&(t[r]=s)}return t}const IV=[...a0].reverse(),BV=a0.length;function VV(e){return t=>Promise.all(t.map(({animation:n,options:r})=>zV(e,n,r)))}function UV(e){let t=VV(e),n=Lk(),r=!0;const s=d=>(h,g)=>{var x;const p=Zc(e,g,d==="exit"?(x=e.presenceContext)==null?void 0:x.custom:void 0);if(p){const{transition:v,transitionEnd:S,...C}=p;h={...h,...C,...S}}return h};function o(d){t=d(e)}function l(d){const{props:h}=e,g=RA(e.parent)||{},p=[],x=new Set;let v={},S=1/0;for(let E=0;E<BV;E++){const T=IV[E],R=n[T],O=h[T]!==void 0?h[T]:g[T],A=Gc(O),M=T===d?R.isActive:null;M===!1&&(S=E);let N=O===g[T]&&O!==h[T]&&A;if(N&&r&&e.manuallyAnimateOnMount&&(N=!1),R.protectedKeys={...v},!R.isActive&&M===null||!O&&!R.prevProp||Ah(O)||typeof O=="boolean")continue;const z=HV(R.prevProp,O);let P=z||T===d&&R.isActive&&!N&&A||E>S&&A,B=!1;const D=Array.isArray(O)?O:[O];let H=D.reduce(s(T),{});M===!1&&(H={});const{prevResolvedValues:$={}}=R,X={...$,...H},Y=F=>{P=!0,x.has(F)&&(B=!0,x.delete(F)),R.needsAnimating[F]=!0;const V=e.getValue(F);V&&(V.liveStyle=!1)};for(const F in X){const V=H[F],Z=$[F];if(v.hasOwnProperty(F))continue;let k=!1;nx(V)&&nx(Z)?k=!AA(V,Z):k=V!==Z,k?V!=null?Y(F):x.add(F):V!==void 0&&x.has(F)?Y(F):R.protectedKeys[F]=!0}R.prevProp=O,R.prevResolvedValues=H,R.isActive&&(v={...v,...H}),r&&e.blockInitialAnimation&&(P=!1),P&&(!(N&&z)||B)&&p.push(...D.map(F=>({animation:F,options:{type:T}})))}if(x.size){const E={};if(typeof h.initial!="boolean"){const T=Zc(e,Array.isArray(h.initial)?h.initial[0]:h.initial);T&&T.transition&&(E.transition=T.transition)}x.forEach(T=>{const R=e.getBaseTarget(T),O=e.getValue(T);O&&(O.liveStyle=!0),E[T]=R??null}),p.push({animation:E})}let C=!!p.length;return r&&(h.initial===!1||h.initial===h.animate)&&!e.manuallyAnimateOnMount&&(C=!1),r=!1,C?t(p):Promise.resolve()}function u(d,h){var p;if(n[d].isActive===h)return Promise.resolve();(p=e.variantChildren)==null||p.forEach(x=>{var v;return(v=x.animationState)==null?void 0:v.setActive(d,h)}),n[d].isActive=h;const g=l(d);for(const x in n)n[x].protectedKeys={};return g}return{animateChanges:l,setActive:u,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Lk(),r=!0}}}function HV(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!AA(t,e):!1}function rs(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Lk(){return{animate:rs(!0),whileInView:rs(),whileHover:rs(),whileTap:rs(),whileDrag:rs(),whileFocus:rs(),exit:rs()}}class Pa{constructor(t){this.isMounted=!1,this.node=t}update(){}}class FV extends Pa{constructor(t){super(t),t.animationState||(t.animationState=UV(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ah(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let $V=0;class qV extends Pa{constructor(){super(...arguments),this.id=$V++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const GV={animation:{Feature:FV},exit:{Feature:qV}};function Xc(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function hu(e){return{point:{x:e.pageX,y:e.pageY}}}const YV=e=>t=>r0(t)&&e(t,hu(t));function Nc(e,t,n,r){return Xc(e,t,YV(n),r)}const MA=1e-4,ZV=1-MA,XV=1+MA,OA=.01,KV=0-OA,WV=0+OA;function Mn(e){return e.max-e.min}function QV(e,t,n){return Math.abs(e-t)<=n}function Ik(e,t,n,r=.5){e.origin=r,e.originPoint=Rt(t.min,t.max,e.origin),e.scale=Mn(n)/Mn(t),e.translate=Rt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=ZV&&e.scale<=XV||isNaN(e.scale))&&(e.scale=1),(e.translate>=KV&&e.translate<=WV||isNaN(e.translate))&&(e.translate=0)}function Ac(e,t,n,r){Ik(e.x,t.x,n.x,r?r.originX:void 0),Ik(e.y,t.y,n.y,r?r.originY:void 0)}function Bk(e,t,n){e.min=n.min+t.min,e.max=e.min+Mn(t)}function JV(e,t,n){Bk(e.x,t.x,n.x),Bk(e.y,t.y,n.y)}function Vk(e,t,n){e.min=t.min-n.min,e.max=e.min+Mn(t)}function Rc(e,t,n){Vk(e.x,t.x,n.x),Vk(e.y,t.y,n.y)}function br(e){return[e("x"),e("y")]}const DA=({current:e})=>e?e.ownerDocument.defaultView:null,Uk=(e,t)=>Math.abs(e-t);function eU(e,t){const n=Uk(e.x,t.x),r=Uk(e.y,t.y);return Math.sqrt(n**2+r**2)}class PA{constructor(t,n,{transformPagePoint:r,contextWindow:s=window,dragSnapToOrigin:o=!1,distanceThreshold:l=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=Og(this.lastMoveEventInfo,this.history),v=this.startEvent!==null,S=eU(x.offset,{x:0,y:0})>=this.distanceThreshold;if(!v&&!S)return;const{point:C}=x,{timestamp:E}=gn;this.history.push({...C,timestamp:E});const{onStart:T,onMove:R}=this.handlers;v||(T&&T(this.lastMoveEvent,x),this.startEvent=this.lastMoveEvent),R&&R(this.lastMoveEvent,x)},this.handlePointerMove=(x,v)=>{this.lastMoveEvent=x,this.lastMoveEventInfo=Mg(v,this.transformPagePoint),Nt.update(this.updatePoint,!0)},this.handlePointerUp=(x,v)=>{this.end();const{onEnd:S,onSessionEnd:C,resumeAnimation:E}=this.handlers;if(this.dragSnapToOrigin&&E&&E(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const T=Og(x.type==="pointercancel"?this.lastMoveEventInfo:Mg(v,this.transformPagePoint),this.history);this.startEvent&&S&&S(x,T),C&&C(x,T)},!r0(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=l,this.contextWindow=s||window;const u=hu(t),d=Mg(u,this.transformPagePoint),{point:h}=d,{timestamp:g}=gn;this.history=[{...h,timestamp:g}];const{onSessionStart:p}=n;p&&p(t,Og(d,this.history)),this.removeListeners=uu(Nc(this.contextWindow,"pointermove",this.handlePointerMove),Nc(this.contextWindow,"pointerup",this.handlePointerUp),Nc(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),ja(this.updatePoint)}}function Mg(e,t){return t?{point:t(e.point)}:e}function Hk(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Og({point:e},t){return{point:e,delta:Hk(e,zA(t)),offset:Hk(e,tU(t)),velocity:nU(t,.1)}}function tU(e){return e[0]}function zA(e){return e[e.length-1]}function nU(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=zA(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>ti(t)));)n--;if(!r)return{x:0,y:0};const o=ni(s.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const l={x:(s.x-r.x)/o,y:(s.y-r.y)/o};return l.x===1/0&&(l.x=0),l.y===1/0&&(l.y=0),l}function rU(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Rt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Rt(n,e,r.max):Math.min(e,n)),e}function Fk(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function iU(e,{top:t,left:n,bottom:r,right:s}){return{x:Fk(e.x,n,s),y:Fk(e.y,t,r)}}function $k(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function aU(e,t){return{x:$k(e.x,t.x),y:$k(e.y,t.y)}}function sU(e,t){let n=.5;const r=Mn(e),s=Mn(t);return s>r?n=Fc(t.min,t.max-r,e.min):r>s&&(n=Fc(e.min,e.max-s,t.min)),Pi(0,1,n)}function oU(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const ax=.35;function lU(e=ax){return e===!1?e=0:e===!0&&(e=ax),{x:qk(e,"left","right"),y:qk(e,"top","bottom")}}function qk(e,t,n){return{min:Gk(e,t),max:Gk(e,n)}}function Gk(e,t){return typeof e=="number"?e:e[t]||0}const cU=new WeakMap;class uU{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Gt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const o=p=>{const{dragSnapToOrigin:x}=this.getProps();x?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(hu(p).point)},l=(p,x)=>{const{drag:v,dragPropagation:S,onDragStart:C}=this.getProps();if(v&&!S&&(this.openDragLock&&this.openDragLock(),this.openDragLock=y8(v),!this.openDragLock))return;this.latestPointerEvent=p,this.latestPanInfo=x,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),br(T=>{let R=this.getAxisMotionValue(T).get()||0;if(ri.test(R)){const{projection:O}=this.visualElement;if(O&&O.layout){const A=O.layout.layoutBox[T];A&&(R=Mn(A)*(parseFloat(R)/100))}}this.originPoint[T]=R}),C&&Nt.postRender(()=>C(p,x)),rx(this.visualElement,"transform");const{animationState:E}=this.visualElement;E&&E.setActive("whileDrag",!0)},u=(p,x)=>{this.latestPointerEvent=p,this.latestPanInfo=x;const{dragPropagation:v,dragDirectionLock:S,onDirectionLock:C,onDrag:E}=this.getProps();if(!v&&!this.openDragLock)return;const{offset:T}=x;if(S&&this.currentDirection===null){this.currentDirection=dU(T),this.currentDirection!==null&&C&&C(this.currentDirection);return}this.updateAxis("x",x.point,T),this.updateAxis("y",x.point,T),this.visualElement.render(),E&&E(p,x)},d=(p,x)=>{this.latestPointerEvent=p,this.latestPanInfo=x,this.stop(p,x),this.latestPointerEvent=null,this.latestPanInfo=null},h=()=>br(p=>{var x;return this.getAnimationState(p)==="paused"&&((x=this.getAxisMotionValue(p).animation)==null?void 0:x.play())}),{dragSnapToOrigin:g}=this.getProps();this.panSession=new PA(t,{onSessionStart:o,onStart:l,onMove:u,onSessionEnd:d,resumeAnimation:h},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:g,distanceThreshold:r,contextWindow:DA(this.visualElement)})}stop(t,n){const r=t||this.latestPointerEvent,s=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!s||!r)return;const{velocity:l}=s;this.startAnimation(l);const{onDragEnd:u}=this.getProps();u&&Nt.postRender(()=>u(r,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:s}=this.getProps();if(!r||!Gd(t,s,this.currentDirection))return;const o=this.getAxisMotionValue(t);let l=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(l=rU(l,this.constraints[t],this.elastic[t])),o.set(l)}resolveConstraints(){var o;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(o=this.visualElement.projection)==null?void 0:o.layout,s=this.constraints;t&&No(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=iU(r.layoutBox,t):this.constraints=!1,this.elastic=lU(n),s!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&br(l=>{this.constraints!==!1&&this.getAxisMotionValue(l)&&(this.constraints[l]=oU(r.layoutBox[l],this.constraints[l]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!No(t))return!1;const r=t.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const o=dV(r,s.root,this.visualElement.getTransformPagePoint());let l=aU(s.layout.layoutBox,o);if(n){const u=n(lV(l));this.hasMutatedConstraints=!!u,u&&(l=bA(u))}return l}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:o,dragSnapToOrigin:l,onDragTransitionEnd:u}=this.getProps(),d=this.constraints||{},h=br(g=>{if(!Gd(g,n,this.currentDirection))return;let p=d&&d[g]||{};l&&(p={min:0,max:0});const x=s?200:1e6,v=s?40:1e7,S={type:"inertia",velocity:r?t[g]:0,bounceStiffness:x,bounceDamping:v,timeConstant:750,restDelta:1,restSpeed:10,...o,...p};return this.startAxisValueAnimation(g,S)});return Promise.all(h).then(u)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return rx(this.visualElement,t),r.start(h0(t,r,0,n,this.visualElement,!1))}stopAnimation(){br(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){br(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),s=r[n];return s||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){br(n=>{const{drag:r}=this.getProps();if(!Gd(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,o=this.getAxisMotionValue(n);if(s&&s.layout){const{min:l,max:u}=s.layout.layoutBox[n];o.set(t[n]-Rt(l,u,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!No(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};br(l=>{const u=this.getAxisMotionValue(l);if(u&&this.constraints!==!1){const d=u.get();s[l]=sU({min:d,max:d},this.constraints[l])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),br(l=>{if(!Gd(l,t,null))return;const u=this.getAxisMotionValue(l),{min:d,max:h}=this.constraints[l];u.set(Rt(d,h,s[l]))})}addListeners(){if(!this.visualElement.current)return;cU.set(this.visualElement,this);const t=this.visualElement.current,n=Nc(t,"pointerdown",d=>{const{drag:h,dragListener:g=!0}=this.getProps();h&&g&&this.start(d)}),r=()=>{const{dragConstraints:d}=this.getProps();No(d)&&d.current&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,o=s.addEventListener("measure",r);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),Nt.read(r);const l=Xc(window,"resize",()=>this.scalePositionWithinConstraints()),u=s.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h})=>{this.isDragging&&h&&(br(g=>{const p=this.getAxisMotionValue(g);p&&(this.originPoint[g]+=d[g].translate,p.set(p.get()+d[g].translate))}),this.visualElement.render())});return()=>{l(),n(),o(),u&&u()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:o=!1,dragElastic:l=ax,dragMomentum:u=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:o,dragElastic:l,dragMomentum:u}}}function Gd(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function dU(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class fU extends Pa{constructor(t){super(t),this.removeGroupControls=Tr,this.removeListeners=Tr,this.controls=new uU(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Tr}unmount(){this.removeGroupControls(),this.removeListeners()}}const Yk=e=>(t,n)=>{e&&Nt.postRender(()=>e(t,n))};class hU extends Pa{constructor(){super(...arguments),this.removePointerDownListener=Tr}onPointerDown(t){this.session=new PA(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:DA(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:Yk(t),onStart:Yk(n),onMove:r,onEnd:(o,l)=>{delete this.session,s&&Nt.postRender(()=>s(o,l))}}}mount(){this.removePointerDownListener=Nc(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const cf={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Zk(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const fc={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Be.test(e))e=parseFloat(e);else return e;const n=Zk(e,t.target.x),r=Zk(e,t.target.y);return`${n}% ${r}%`}},mU={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=Na.parse(e);if(s.length>5)return r;const o=Na.createTransformer(e),l=typeof s[0]!="number"?1:0,u=n.x.scale*t.x,d=n.y.scale*t.y;s[0+l]/=u,s[1+l]/=d;const h=Rt(u,d,.5);return typeof s[2+l]=="number"&&(s[2+l]/=h),typeof s[3+l]=="number"&&(s[3+l]/=h),o(s)}};let Xk=!1;class pU extends w.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:o}=t;z8(gU),o&&(n.group&&n.group.add(o),r&&r.register&&s&&r.register(o),Xk&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),cf.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:s,isPresent:o}=this.props,{projection:l}=r;return l&&(l.isPresent=o,Xk=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==o?l.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?l.promote():l.relegate()||Nt.postRender(()=>{const u=l.getStack();(!u||!u.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),n0.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function LA(e){const[t,n]=sA(),r=w.useContext(Dv);return m.jsx(pU,{...e,layoutGroup:r,switchLayoutGroup:w.useContext(xA),isPresent:t,safeToRemove:n})}const gU={borderRadius:{...fc,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:fc,borderTopRightRadius:fc,borderBottomLeftRadius:fc,borderBottomRightRadius:fc,boxShadow:mU};function yU(e,t,n){const r=En(e)?e:Go(e);return r.start(h0("",r,t,n)),r.animation}const xU=(e,t)=>e.depth-t.depth;class vU{constructor(){this.children=[],this.isDirty=!1}add(t){Lv(this.children,t),this.isDirty=!0}remove(t){Iv(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(xU),this.isDirty=!1,this.children.forEach(t)}}function bU(e,t){const n=Fn.now(),r=({timestamp:s})=>{const o=s-n;o>=t&&(ja(r),e(o-t))};return Nt.setup(r,!0),()=>ja(r)}const IA=["TopLeft","TopRight","BottomLeft","BottomRight"],wU=IA.length,Kk=e=>typeof e=="string"?parseFloat(e):e,Wk=e=>typeof e=="number"||Be.test(e);function SU(e,t,n,r,s,o){s?(e.opacity=Rt(0,n.opacity??1,CU(r)),e.opacityExit=Rt(t.opacity??1,0,kU(r))):o&&(e.opacity=Rt(t.opacity??1,n.opacity??1,r));for(let l=0;l<wU;l++){const u=`border${IA[l]}Radius`;let d=Qk(t,u),h=Qk(n,u);if(d===void 0&&h===void 0)continue;d||(d=0),h||(h=0),d===0||h===0||Wk(d)===Wk(h)?(e[u]=Math.max(Rt(Kk(d),Kk(h),r),0),(ri.test(h)||ri.test(d))&&(e[u]+="%")):e[u]=h}(t.rotate||n.rotate)&&(e.rotate=Rt(t.rotate||0,n.rotate||0,r))}function Qk(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const CU=BA(0,.5,EN),kU=BA(.5,.95,Tr);function BA(e,t,n){return r=>r<e?0:r>t?1:n(Fc(e,t,r))}function Jk(e,t){e.min=t.min,e.max=t.max}function vr(e,t){Jk(e.x,t.x),Jk(e.y,t.y)}function eT(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function tT(e,t,n,r,s){return e-=t,e=Af(e,1/n,r),s!==void 0&&(e=Af(e,1/s,r)),e}function TU(e,t=0,n=1,r=.5,s,o=e,l=e){if(ri.test(t)&&(t=parseFloat(t),t=Rt(l.min,l.max,t/100)-l.min),typeof t!="number")return;let u=Rt(o.min,o.max,r);e===o&&(u-=t),e.min=tT(e.min,t,n,u,s),e.max=tT(e.max,t,n,u,s)}function nT(e,t,[n,r,s],o,l){TU(e,t[n],t[r],t[s],t.scale,o,l)}const EU=["x","scaleX","originX"],_U=["y","scaleY","originY"];function rT(e,t,n,r){nT(e.x,t,EU,n?n.x:void 0,r?r.x:void 0),nT(e.y,t,_U,n?n.y:void 0,r?r.y:void 0)}function iT(e){return e.translate===0&&e.scale===1}function VA(e){return iT(e.x)&&iT(e.y)}function aT(e,t){return e.min===t.min&&e.max===t.max}function jU(e,t){return aT(e.x,t.x)&&aT(e.y,t.y)}function sT(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function UA(e,t){return sT(e.x,t.x)&&sT(e.y,t.y)}function oT(e){return Mn(e.x)/Mn(e.y)}function lT(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class NU{constructor(){this.members=[]}add(t){Lv(this.members,t),t.scheduleRender()}remove(t){if(Iv(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(s=>t===s);if(n===0)return!1;let r;for(let s=n;s>=0;s--){const o=this.members[s];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:s}=t.options;s===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function AU(e,t,n){let r="";const s=e.x.translate/t.x,o=e.y.translate/t.y,l=(n==null?void 0:n.z)||0;if((s||o||l)&&(r=`translate3d(${s}px, ${o}px, ${l}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:h,rotate:g,rotateX:p,rotateY:x,skewX:v,skewY:S}=n;h&&(r=`perspective(${h}px) ${r}`),g&&(r+=`rotate(${g}deg) `),p&&(r+=`rotateX(${p}deg) `),x&&(r+=`rotateY(${x}deg) `),v&&(r+=`skewX(${v}deg) `),S&&(r+=`skewY(${S}deg) `)}const u=e.x.scale*t.x,d=e.y.scale*t.y;return(u!==1||d!==1)&&(r+=`scale(${u}, ${d})`),r||"none"}const Dg=["","X","Y","Z"],RU=1e3;let MU=0;function Pg(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function HA(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=jA(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Nt,!(s||o))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&HA(r)}function FA({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(l={},u=t==null?void 0:t()){this.id=MU++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(PU),this.nodes.forEach(BU),this.nodes.forEach(VU),this.nodes.forEach(zU)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=l,this.root=u?u.root||u:this,this.path=u?[...u.path,u]:[],this.parent=u,this.depth=u?u.depth+1:0;for(let d=0;d<this.path.length;d++)this.path[d].shouldResetTransform=!0;this.root===this&&(this.nodes=new vU)}addEventListener(l,u){return this.eventHandlers.has(l)||this.eventHandlers.set(l,new Uv),this.eventHandlers.get(l).add(u)}notifyListeners(l,...u){const d=this.eventHandlers.get(l);d&&d.notify(...u)}hasListeners(l){return this.eventHandlers.has(l)}mount(l){if(this.instance)return;this.isSVG=aA(l)&&!C8(l),this.instance=l;const{layoutId:u,layout:d,visualElement:h}=this.options;if(h&&!h.current&&h.mount(l),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(d||u)&&(this.isLayoutDirty=!0),e){let g,p=0;const x=()=>this.root.updateBlockedByResize=!1;Nt.read(()=>{p=window.innerWidth}),e(l,()=>{const v=window.innerWidth;v!==p&&(p=v,this.root.updateBlockedByResize=!0,g&&g(),g=bU(x,250),cf.hasAnimatedSinceResize&&(cf.hasAnimatedSinceResize=!1,this.nodes.forEach(dT)))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&h&&(u||d)&&this.addEventListener("didUpdate",({delta:g,hasLayoutChanged:p,hasRelativeLayoutChanged:x,layout:v})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const S=this.options.transition||h.getDefaultTransition()||qU,{onLayoutAnimationStart:C,onLayoutAnimationComplete:E}=h.getProps(),T=!this.targetLayout||!UA(this.targetLayout,v),R=!p&&x;if(this.options.layoutRoot||this.resumeFrom||R||p&&(T||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const O={...e0(S,"layout"),onPlay:C,onComplete:E};(h.shouldReduceMotion||this.options.layoutRoot)&&(O.delay=0,O.type=!1),this.startAnimation(O),this.setAnimationOrigin(g,R)}else p||dT(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=v})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const l=this.getStack();l&&l.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),ja(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(UU),this.animationId++)}getTransformTemplate(){const{visualElement:l}=this.options;return l&&l.getProps().transformTemplate}willUpdate(l=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&HA(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let g=0;g<this.path.length;g++){const p=this.path[g];p.shouldResetTransform=!0,p.updateScroll("snapshot"),p.options.layoutRoot&&p.willUpdate(!1)}const{layoutId:u,layout:d}=this.options;if(u===void 0&&!d)return;const h=this.getTransformTemplate();this.prevTransformTemplateValue=h?h(this.latestValues,""):void 0,this.updateSnapshot(),l&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(cT);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(uT);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(IU),this.nodes.forEach(OU),this.nodes.forEach(DU)):this.nodes.forEach(uT),this.clearAllSnapshots();const u=Fn.now();gn.delta=Pi(0,1e3/60,u-gn.timestamp),gn.timestamp=u,gn.isProcessing=!0,kg.update.process(gn),kg.preRender.process(gn),kg.render.process(gn),gn.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,n0.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(LU),this.sharedNodes.forEach(HU)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Nt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Nt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Mn(this.snapshot.measuredBox.x)&&!Mn(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let d=0;d<this.path.length;d++)this.path[d].updateScroll();const l=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Gt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:u}=this.options;u&&u.notify("LayoutMeasure",this.layout.layoutBox,l?l.layoutBox:void 0)}updateScroll(l="measure"){let u=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===l&&(u=!1),u&&this.instance){const d=r(this.instance);this.scroll={animationId:this.root.animationId,phase:l,isRoot:d,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:d}}}resetTransform(){if(!s)return;const l=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,u=this.projectionDelta&&!VA(this.projectionDelta),d=this.getTransformTemplate(),h=d?d(this.latestValues,""):void 0,g=h!==this.prevTransformTemplateValue;l&&this.instance&&(u||as(this.latestValues)||g)&&(s(this.instance,h),this.shouldResetTransform=!1,this.scheduleRender())}measure(l=!0){const u=this.measurePageBox();let d=this.removeElementScroll(u);return l&&(d=this.removeTransform(d)),GU(d),{animationId:this.root.animationId,measuredBox:u,layoutBox:d,latestValues:{},source:this.id}}measurePageBox(){var h;const{visualElement:l}=this.options;if(!l)return Gt();const u=l.measureViewportBox();if(!(((h=this.scroll)==null?void 0:h.wasRoot)||this.path.some(YU))){const{scroll:g}=this.root;g&&(Ao(u.x,g.offset.x),Ao(u.y,g.offset.y))}return u}removeElementScroll(l){var d;const u=Gt();if(vr(u,l),(d=this.scroll)!=null&&d.wasRoot)return u;for(let h=0;h<this.path.length;h++){const g=this.path[h],{scroll:p,options:x}=g;g!==this.root&&p&&x.layoutScroll&&(p.wasRoot&&vr(u,l),Ao(u.x,p.offset.x),Ao(u.y,p.offset.y))}return u}applyTransform(l,u=!1){const d=Gt();vr(d,l);for(let h=0;h<this.path.length;h++){const g=this.path[h];!u&&g.options.layoutScroll&&g.scroll&&g!==g.root&&Ro(d,{x:-g.scroll.offset.x,y:-g.scroll.offset.y}),as(g.latestValues)&&Ro(d,g.latestValues)}return as(this.latestValues)&&Ro(d,this.latestValues),d}removeTransform(l){const u=Gt();vr(u,l);for(let d=0;d<this.path.length;d++){const h=this.path[d];if(!h.instance||!as(h.latestValues))continue;Jy(h.latestValues)&&h.updateSnapshot();const g=Gt(),p=h.measurePageBox();vr(g,p),rT(u,h.latestValues,h.snapshot?h.snapshot.layoutBox:void 0,g)}return as(this.latestValues)&&rT(u,this.latestValues),u}setTargetDelta(l){this.targetDelta=l,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(l){this.options={...this.options,...l,crossfade:l.crossfade!==void 0?l.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==gn.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(l=!1){var x;const u=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=u.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=u.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=u.isSharedProjectionDirty);const d=!!this.resumingFrom||this!==u;if(!(l||d&&this.isSharedProjectionDirty||this.isProjectionDirty||(x=this.parent)!=null&&x.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:g,layoutId:p}=this.options;if(!(!this.layout||!(g||p))){if(this.resolvedRelativeTargetAt=gn.timestamp,!this.targetDelta&&!this.relativeTarget){const v=this.getClosestProjectingParent();v&&v.layout&&this.animationProgress!==1?(this.relativeParent=v,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Gt(),this.relativeTargetOrigin=Gt(),Rc(this.relativeTargetOrigin,this.layout.layoutBox,v.layout.layoutBox),vr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Gt(),this.targetWithTransforms=Gt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),JV(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):vr(this.target,this.layout.layoutBox),SA(this.target,this.targetDelta)):vr(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const v=this.getClosestProjectingParent();v&&!!v.resumingFrom==!!this.resumingFrom&&!v.options.layoutScroll&&v.target&&this.animationProgress!==1?(this.relativeParent=v,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Gt(),this.relativeTargetOrigin=Gt(),Rc(this.relativeTargetOrigin,this.target,v.target),vr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Jy(this.parent.latestValues)||wA(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var S;const l=this.getLead(),u=!!this.resumingFrom||this!==l;let d=!0;if((this.isProjectionDirty||(S=this.parent)!=null&&S.isProjectionDirty)&&(d=!1),u&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(d=!1),this.resolvedRelativeTargetAt===gn.timestamp&&(d=!1),d)return;const{layout:h,layoutId:g}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(h||g))return;vr(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,x=this.treeScale.y;uV(this.layoutCorrected,this.treeScale,this.path,u),l.layout&&!l.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(l.target=l.layout.layoutBox,l.targetWithTransforms=Gt());const{target:v}=l;if(!v){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(eT(this.prevProjectionDelta.x,this.projectionDelta.x),eT(this.prevProjectionDelta.y,this.projectionDelta.y)),Ac(this.projectionDelta,this.layoutCorrected,v,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==x||!lT(this.projectionDelta.x,this.prevProjectionDelta.x)||!lT(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",v))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(l=!0){var u;if((u=this.options.visualElement)==null||u.scheduleRender(),l){const d=this.getStack();d&&d.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Mo(),this.projectionDelta=Mo(),this.projectionDeltaWithTransform=Mo()}setAnimationOrigin(l,u=!1){const d=this.snapshot,h=d?d.latestValues:{},g={...this.latestValues},p=Mo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!u;const x=Gt(),v=d?d.source:void 0,S=this.layout?this.layout.source:void 0,C=v!==S,E=this.getStack(),T=!E||E.members.length<=1,R=!!(C&&!T&&this.options.crossfade===!0&&!this.path.some($U));this.animationProgress=0;let O;this.mixTargetDelta=A=>{const M=A/1e3;fT(p.x,l.x,M),fT(p.y,l.y,M),this.setTargetDelta(p),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Rc(x,this.layout.layoutBox,this.relativeParent.layout.layoutBox),FU(this.relativeTarget,this.relativeTargetOrigin,x,M),O&&jU(this.relativeTarget,O)&&(this.isProjectionDirty=!1),O||(O=Gt()),vr(O,this.relativeTarget)),C&&(this.animationValues=g,SU(g,h,this.latestValues,M,R,T)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=M},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(l){var u,d,h;this.notifyListeners("animationStart"),(u=this.currentAnimation)==null||u.stop(),(h=(d=this.resumingFrom)==null?void 0:d.currentAnimation)==null||h.stop(),this.pendingAnimation&&(ja(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Nt.update(()=>{cf.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Go(0)),this.currentAnimation=yU(this.motionValue,[0,1e3],{...l,velocity:0,isSync:!0,onUpdate:g=>{this.mixTargetDelta(g),l.onUpdate&&l.onUpdate(g)},onStop:()=>{},onComplete:()=>{l.onComplete&&l.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const l=this.getStack();l&&l.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(RU),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const l=this.getLead();let{targetWithTransforms:u,target:d,layout:h,latestValues:g}=l;if(!(!u||!d||!h)){if(this!==l&&this.layout&&h&&$A(this.options.animationType,this.layout.layoutBox,h.layoutBox)){d=this.target||Gt();const p=Mn(this.layout.layoutBox.x);d.x.min=l.target.x.min,d.x.max=d.x.min+p;const x=Mn(this.layout.layoutBox.y);d.y.min=l.target.y.min,d.y.max=d.y.min+x}vr(u,d),Ro(u,g),Ac(this.projectionDeltaWithTransform,this.layoutCorrected,u,g)}}registerSharedNode(l,u){this.sharedNodes.has(l)||this.sharedNodes.set(l,new NU),this.sharedNodes.get(l).add(u);const h=u.options.initialPromotionConfig;u.promote({transition:h?h.transition:void 0,preserveFollowOpacity:h&&h.shouldPreserveFollowOpacity?h.shouldPreserveFollowOpacity(u):void 0})}isLead(){const l=this.getStack();return l?l.lead===this:!0}getLead(){var u;const{layoutId:l}=this.options;return l?((u=this.getStack())==null?void 0:u.lead)||this:this}getPrevLead(){var u;const{layoutId:l}=this.options;return l?(u=this.getStack())==null?void 0:u.prevLead:void 0}getStack(){const{layoutId:l}=this.options;if(l)return this.root.sharedNodes.get(l)}promote({needsReset:l,transition:u,preserveFollowOpacity:d}={}){const h=this.getStack();h&&h.promote(this,d),l&&(this.projectionDelta=void 0,this.needsReset=!0),u&&this.setOptions({transition:u})}relegate(){const l=this.getStack();return l?l.relegate(this):!1}resetSkewAndRotation(){const{visualElement:l}=this.options;if(!l)return;let u=!1;const{latestValues:d}=l;if((d.z||d.rotate||d.rotateX||d.rotateY||d.rotateZ||d.skewX||d.skewY)&&(u=!0),!u)return;const h={};d.z&&Pg("z",l,h,this.animationValues);for(let g=0;g<Dg.length;g++)Pg(`rotate${Dg[g]}`,l,h,this.animationValues),Pg(`skew${Dg[g]}`,l,h,this.animationValues);l.render();for(const g in h)l.setStaticValue(g,h[g]),this.animationValues&&(this.animationValues[g]=h[g]);l.scheduleRender()}applyProjectionStyles(l,u){if(!this.instance||this.isSVG)return;if(!this.isVisible){l.visibility="hidden";return}const d=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,l.visibility="",l.opacity="",l.pointerEvents=lf(u==null?void 0:u.pointerEvents)||"",l.transform=d?d(this.latestValues,""):"none";return}const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){this.options.layoutId&&(l.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,l.pointerEvents=lf(u==null?void 0:u.pointerEvents)||""),this.hasProjected&&!as(this.latestValues)&&(l.transform=d?d({},""):"none",this.hasProjected=!1);return}l.visibility="";const g=h.animationValues||h.latestValues;this.applyTransformsToTarget();let p=AU(this.projectionDeltaWithTransform,this.treeScale,g);d&&(p=d(g,p)),l.transform=p;const{x,y:v}=this.projectionDelta;l.transformOrigin=`${x.origin*100}% ${v.origin*100}% 0`,h.animationValues?l.opacity=h===this?g.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:g.opacityExit:l.opacity=h===this?g.opacity!==void 0?g.opacity:"":g.opacityExit!==void 0?g.opacityExit:0;for(const S in Yc){if(g[S]===void 0)continue;const{correct:C,applyTo:E,isCSSVariable:T}=Yc[S],R=p==="none"?g[S]:C(g[S],h);if(E){const O=E.length;for(let A=0;A<O;A++)l[E[A]]=R}else T?this.options.visualElement.renderState.vars[S]=R:l[S]=R}this.options.layoutId&&(l.pointerEvents=h===this?lf(u==null?void 0:u.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(l=>{var u;return(u=l.currentAnimation)==null?void 0:u.stop()}),this.root.nodes.forEach(cT),this.root.sharedNodes.clear()}}}function OU(e){e.updateLayout()}function DU(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:s}=e.layout,{animationType:o}=e.options,l=t.source!==e.layout.source;o==="size"?br(p=>{const x=l?t.measuredBox[p]:t.layoutBox[p],v=Mn(x);x.min=r[p].min,x.max=x.min+v}):$A(o,t.layoutBox,r)&&br(p=>{const x=l?t.measuredBox[p]:t.layoutBox[p],v=Mn(r[p]);x.max=x.min+v,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[p].max=e.relativeTarget[p].min+v)});const u=Mo();Ac(u,r,t.layoutBox);const d=Mo();l?Ac(d,e.applyTransform(s,!0),t.measuredBox):Ac(d,r,t.layoutBox);const h=!VA(u);let g=!1;if(!e.resumeFrom){const p=e.getClosestProjectingParent();if(p&&!p.resumeFrom){const{snapshot:x,layout:v}=p;if(x&&v){const S=Gt();Rc(S,t.layoutBox,x.layoutBox);const C=Gt();Rc(C,r,v.layoutBox),UA(S,C)||(g=!0),p.options.layoutRoot&&(e.relativeTarget=C,e.relativeTargetOrigin=S,e.relativeParent=p)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:d,layoutDelta:u,hasLayoutChanged:h,hasRelativeLayoutChanged:g})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function PU(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function zU(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function LU(e){e.clearSnapshot()}function cT(e){e.clearMeasurements()}function uT(e){e.isLayoutDirty=!1}function IU(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function dT(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function BU(e){e.resolveTargetDelta()}function VU(e){e.calcProjection()}function UU(e){e.resetSkewAndRotation()}function HU(e){e.removeLeadSnapshot()}function fT(e,t,n){e.translate=Rt(t.translate,0,n),e.scale=Rt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function hT(e,t,n,r){e.min=Rt(t.min,n.min,r),e.max=Rt(t.max,n.max,r)}function FU(e,t,n,r){hT(e.x,t.x,n.x,r),hT(e.y,t.y,n.y,r)}function $U(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const qU={duration:.45,ease:[.4,0,.1,1]},mT=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),pT=mT("applewebkit/")&&!mT("chrome/")?Math.round:Tr;function gT(e){e.min=pT(e.min),e.max=pT(e.max)}function GU(e){gT(e.x),gT(e.y)}function $A(e,t,n){return e==="position"||e==="preserve-aspect"&&!QV(oT(t),oT(n),.2)}function YU(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const ZU=FA({attachResizeListener:(e,t)=>Xc(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),zg={current:void 0},qA=FA({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!zg.current){const e=new ZU({});e.mount(window),e.setOptions({layoutScroll:!0}),zg.current=e}return zg.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),XU={pan:{Feature:hU},drag:{Feature:fU,ProjectionNode:qA,MeasureLayout:LA}};function yT(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,o=r[s];o&&Nt.postRender(()=>o(t,hu(t)))}class KU extends Pa{mount(){const{current:t}=this.node;t&&(this.unmount=x8(t,(n,r)=>(yT(this.node,r,"Start"),s=>yT(this.node,s,"End"))))}unmount(){}}class WU extends Pa{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=uu(Xc(this.node.current,"focus",()=>this.onFocus()),Xc(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function xT(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),o=r[s];o&&Nt.postRender(()=>o(t,hu(t)))}class QU extends Pa{mount(){const{current:t}=this.node;t&&(this.unmount=S8(t,(n,r)=>(xT(this.node,r,"Start"),(s,{success:o})=>xT(this.node,s,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const sx=new WeakMap,Lg=new WeakMap,JU=e=>{const t=sx.get(e.target);t&&t(e)},eH=e=>{e.forEach(JU)};function tH({root:e,...t}){const n=e||document;Lg.has(n)||Lg.set(n,{});const r=Lg.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(eH,{root:e,...t})),r[s]}function nH(e,t,n){const r=tH(t);return sx.set(e,n),r.observe(e),()=>{sx.delete(e),r.unobserve(e)}}const rH={some:0,all:1};class iH extends Pa{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:o}=t,l={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:rH[s]},u=d=>{const{isIntersecting:h}=d;if(this.isInView===h||(this.isInView=h,o&&!h&&this.hasEnteredView))return;h&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",h);const{onViewportEnter:g,onViewportLeave:p}=this.node.getProps(),x=h?g:p;x&&x(d)};return nH(this.node.current,l,u)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(aH(t,n))&&this.startObserver()}unmount(){}}function aH({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const sH={inView:{Feature:iH},tap:{Feature:QU},focus:{Feature:WU},hover:{Feature:KU}},oH={layout:{ProjectionNode:qA,MeasureLayout:LA}},lH={...GV,...sH,...XU,...oH},Ni=oV(lH,bV);function cH(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const uH=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,dH=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,fH={};function vT(e,t){return(fH.jsx?dH:uH).test(e)}const hH=/[ \t\n\f\r]/g;function mH(e){return typeof e=="object"?e.type==="text"?bT(e.value):!1:bT(e)}function bT(e){return e.replace(hH,"")===""}class mu{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}mu.prototype.normal={};mu.prototype.property={};mu.prototype.space=void 0;function GA(e,t){const n={},r={};for(const s of e)Object.assign(n,s.property),Object.assign(r,s.normal);return new mu(n,r,t)}function ox(e){return e.toLowerCase()}class qn{constructor(t,n){this.attribute=n,this.property=t}}qn.prototype.attribute="";qn.prototype.booleanish=!1;qn.prototype.boolean=!1;qn.prototype.commaOrSpaceSeparated=!1;qn.prototype.commaSeparated=!1;qn.prototype.defined=!1;qn.prototype.mustUseProperty=!1;qn.prototype.number=!1;qn.prototype.overloadedBoolean=!1;qn.prototype.property="";qn.prototype.spaceSeparated=!1;qn.prototype.space=void 0;let pH=0;const Ye=Ns(),Kt=Ns(),lx=Ns(),xe=Ns(),_t=Ns(),Lo=Ns(),tr=Ns();function Ns(){return 2**++pH}const cx=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ye,booleanish:Kt,commaOrSpaceSeparated:tr,commaSeparated:Lo,number:xe,overloadedBoolean:lx,spaceSeparated:_t},Symbol.toStringTag,{value:"Module"})),Ig=Object.keys(cx);class m0 extends qn{constructor(t,n,r,s){let o=-1;if(super(t,n),wT(this,"space",s),typeof r=="number")for(;++o<Ig.length;){const l=Ig[o];wT(this,Ig[o],(r&cx[l])===cx[l])}}}m0.prototype.defined=!0;function wT(e,t,n){n&&(e[t]=n)}function ul(e){const t={},n={};for(const[r,s]of Object.entries(e.properties)){const o=new m0(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[ox(r)]=r,n[ox(o.attribute)]=r}return new mu(t,n,e.space)}const YA=ul({properties:{ariaActiveDescendant:null,ariaAtomic:Kt,ariaAutoComplete:null,ariaBusy:Kt,ariaChecked:Kt,ariaColCount:xe,ariaColIndex:xe,ariaColSpan:xe,ariaControls:_t,ariaCurrent:null,ariaDescribedBy:_t,ariaDetails:null,ariaDisabled:Kt,ariaDropEffect:_t,ariaErrorMessage:null,ariaExpanded:Kt,ariaFlowTo:_t,ariaGrabbed:Kt,ariaHasPopup:null,ariaHidden:Kt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:_t,ariaLevel:xe,ariaLive:null,ariaModal:Kt,ariaMultiLine:Kt,ariaMultiSelectable:Kt,ariaOrientation:null,ariaOwns:_t,ariaPlaceholder:null,ariaPosInSet:xe,ariaPressed:Kt,ariaReadOnly:Kt,ariaRelevant:null,ariaRequired:Kt,ariaRoleDescription:_t,ariaRowCount:xe,ariaRowIndex:xe,ariaRowSpan:xe,ariaSelected:Kt,ariaSetSize:xe,ariaSort:null,ariaValueMax:xe,ariaValueMin:xe,ariaValueNow:xe,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function ZA(e,t){return t in e?e[t]:t}function XA(e,t){return ZA(e,t.toLowerCase())}const gH=ul({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Lo,acceptCharset:_t,accessKey:_t,action:null,allow:null,allowFullScreen:Ye,allowPaymentRequest:Ye,allowUserMedia:Ye,alt:null,as:null,async:Ye,autoCapitalize:null,autoComplete:_t,autoFocus:Ye,autoPlay:Ye,blocking:_t,capture:null,charSet:null,checked:Ye,cite:null,className:_t,cols:xe,colSpan:null,content:null,contentEditable:Kt,controls:Ye,controlsList:_t,coords:xe|Lo,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ye,defer:Ye,dir:null,dirName:null,disabled:Ye,download:lx,draggable:Kt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ye,formTarget:null,headers:_t,height:xe,hidden:lx,high:xe,href:null,hrefLang:null,htmlFor:_t,httpEquiv:_t,id:null,imageSizes:null,imageSrcSet:null,inert:Ye,inputMode:null,integrity:null,is:null,isMap:Ye,itemId:null,itemProp:_t,itemRef:_t,itemScope:Ye,itemType:_t,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ye,low:xe,manifest:null,max:null,maxLength:xe,media:null,method:null,min:null,minLength:xe,multiple:Ye,muted:Ye,name:null,nonce:null,noModule:Ye,noValidate:Ye,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:Ye,optimum:xe,pattern:null,ping:_t,placeholder:null,playsInline:Ye,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ye,referrerPolicy:null,rel:_t,required:Ye,reversed:Ye,rows:xe,rowSpan:xe,sandbox:_t,scope:null,scoped:Ye,seamless:Ye,selected:Ye,shadowRootClonable:Ye,shadowRootDelegatesFocus:Ye,shadowRootMode:null,shape:null,size:xe,sizes:null,slot:null,span:xe,spellCheck:Kt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:xe,step:null,style:null,tabIndex:xe,target:null,title:null,translate:null,type:null,typeMustMatch:Ye,useMap:null,value:Kt,width:xe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:_t,axis:null,background:null,bgColor:null,border:xe,borderColor:null,bottomMargin:xe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ye,declare:Ye,event:null,face:null,frame:null,frameBorder:null,hSpace:xe,leftMargin:xe,link:null,longDesc:null,lowSrc:null,marginHeight:xe,marginWidth:xe,noResize:Ye,noHref:Ye,noShade:Ye,noWrap:Ye,object:null,profile:null,prompt:null,rev:null,rightMargin:xe,rules:null,scheme:null,scrolling:Kt,standby:null,summary:null,text:null,topMargin:xe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:xe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ye,disableRemotePlayback:Ye,prefix:null,property:null,results:xe,security:null,unselectable:null},space:"html",transform:XA}),yH=ul({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:tr,accentHeight:xe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:xe,amplitude:xe,arabicForm:null,ascent:xe,attributeName:null,attributeType:null,azimuth:xe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:xe,by:null,calcMode:null,capHeight:xe,className:_t,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:xe,diffuseConstant:xe,direction:null,display:null,dur:null,divisor:xe,dominantBaseline:null,download:Ye,dx:null,dy:null,edgeMode:null,editable:null,elevation:xe,enableBackground:null,end:null,event:null,exponent:xe,externalResourcesRequired:null,fill:null,fillOpacity:xe,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:Lo,g2:Lo,glyphName:Lo,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:xe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:xe,horizOriginX:xe,horizOriginY:xe,id:null,ideographic:xe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:xe,k:xe,k1:xe,k2:xe,k3:xe,k4:xe,kernelMatrix:tr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:xe,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:xe,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:xe,overlineThickness:xe,paintOrder:null,panose1:null,path:null,pathLength:xe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:_t,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:xe,pointsAtY:xe,pointsAtZ:xe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:tr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:tr,rev:tr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:tr,requiredFeatures:tr,requiredFonts:tr,requiredFormats:tr,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:xe,specularExponent:xe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:xe,strikethroughThickness:xe,string:null,stroke:null,strokeDashArray:tr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:xe,strokeOpacity:xe,strokeWidth:null,style:null,surfaceScale:xe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:tr,tabIndex:xe,tableValues:null,target:null,targetX:xe,targetY:xe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:tr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:xe,underlineThickness:xe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:xe,values:null,vAlphabetic:xe,vMathematical:xe,vectorEffect:null,vHanging:xe,vIdeographic:xe,version:null,vertAdvY:xe,vertOriginX:xe,vertOriginY:xe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:xe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:ZA}),KA=ul({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()}}),WA=ul({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:XA}),QA=ul({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),xH={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"},vH=/[A-Z]/g,ST=/-[a-z]/g,bH=/^data[-\w.:]+$/i;function wH(e,t){const n=ox(t);let r=t,s=qn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&bH.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(ST,CH);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!ST.test(o)){let l=o.replace(vH,SH);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}s=m0}return new s(r,t)}function SH(e){return"-"+e.toLowerCase()}function CH(e){return e.charAt(1).toUpperCase()}const kH=GA([YA,gH,KA,WA,QA],"html"),p0=GA([YA,yH,KA,WA,QA],"svg");function TH(e){return e.join(" ").trim()}var wo={},Bg,CT;function EH(){if(CT)return Bg;CT=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,u=/^\s+|\s+$/g,d=`
327
+ `,h="/",g="*",p="",x="comment",v="declaration";Bg=function(C,E){if(typeof C!="string")throw new TypeError("First argument must be a string");if(!C)return[];E=E||{};var T=1,R=1;function O(X){var Y=X.match(t);Y&&(T+=Y.length);var te=X.lastIndexOf(d);R=~te?X.length-te:R+X.length}function A(){var X={line:T,column:R};return function(Y){return Y.position=new M(X),P(),Y}}function M(X){this.start=X,this.end={line:T,column:R},this.source=E.source}M.prototype.content=C;function N(X){var Y=new Error(E.source+":"+T+":"+R+": "+X);if(Y.reason=X,Y.filename=E.source,Y.line=T,Y.column=R,Y.source=C,!E.silent)throw Y}function z(X){var Y=X.exec(C);if(Y){var te=Y[0];return O(te),C=C.slice(te.length),Y}}function P(){z(n)}function B(X){var Y;for(X=X||[];Y=D();)Y!==!1&&X.push(Y);return X}function D(){var X=A();if(!(h!=C.charAt(0)||g!=C.charAt(1))){for(var Y=2;p!=C.charAt(Y)&&(g!=C.charAt(Y)||h!=C.charAt(Y+1));)++Y;if(Y+=2,p===C.charAt(Y-1))return N("End of comment missing");var te=C.slice(2,Y-2);return R+=2,O(te),C=C.slice(Y),R+=2,X({type:x,comment:te})}}function H(){var X=A(),Y=z(r);if(Y){if(D(),!z(s))return N("property missing ':'");var te=z(o),I=X({type:v,property:S(Y[0].replace(e,p)),value:te?S(te[0].replace(e,p)):p});return z(l),I}}function $(){var X=[];B(X);for(var Y;Y=H();)Y!==!1&&(X.push(Y),B(X));return X}return P(),$()};function S(C){return C?C.replace(u,p):p}return Bg}var kT;function _H(){if(kT)return wo;kT=1;var e=wo&&wo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(wo,"__esModule",{value:!0}),wo.default=n;var t=e(EH());function n(r,s){var o=null;if(!r||typeof r!="string")return o;var l=(0,t.default)(r),u=typeof s=="function";return l.forEach(function(d){if(d.type==="declaration"){var h=d.property,g=d.value;u?s(h,g,d):g&&(o=o||{},o[h]=g)}}),o}return wo}var hc={},TT;function jH(){if(TT)return hc;TT=1,Object.defineProperty(hc,"__esModule",{value:!0}),hc.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,o=function(h){return!h||n.test(h)||e.test(h)},l=function(h,g){return g.toUpperCase()},u=function(h,g){return"".concat(g,"-")},d=function(h,g){return g===void 0&&(g={}),o(h)?h:(h=h.toLowerCase(),g.reactCompat?h=h.replace(s,u):h=h.replace(r,u),h.replace(t,l))};return hc.camelCase=d,hc}var mc,ET;function NH(){if(ET)return mc;ET=1;var e=mc&&mc.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(_H()),n=jH();function r(s,o){var l={};return!s||typeof s!="string"||(0,t.default)(s,function(u,d){u&&d&&(l[(0,n.camelCase)(u,o)]=d)}),l}return r.default=r,mc=r,mc}var AH=NH();const RH=Xf(AH),JA=eR("end"),g0=eR("start");function eR(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 MH(e){const t=g0(e),n=JA(e);if(t&&n)return{start:t,end:n}}function Mc(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?_T(e.position):"start"in e||"end"in e?_T(e):"line"in e||"column"in e?ux(e):""}function ux(e){return jT(e&&e.line)+":"+jT(e&&e.column)}function _T(e){return ux(e&&e.start)+"-"+ux(e&&e.end)}function jT(e){return e&&typeof e=="number"?e:1}class jn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let s="",o={},l=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?s=t:!o.cause&&t&&(l=!0,s=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?o.ruleId=r:(o.source=r.slice(0,d),o.ruleId=r.slice(d+1))}if(!o.place&&o.ancestors&&o.ancestors){const d=o.ancestors[o.ancestors.length-1];d&&(o.place=d.position)}const u=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file,this.message=s,this.line=u?u.line:void 0,this.name=Mc(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=l&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}jn.prototype.file="";jn.prototype.name="";jn.prototype.reason="";jn.prototype.message="";jn.prototype.stack="";jn.prototype.column=void 0;jn.prototype.line=void 0;jn.prototype.ancestors=void 0;jn.prototype.cause=void 0;jn.prototype.fatal=void 0;jn.prototype.place=void 0;jn.prototype.ruleId=void 0;jn.prototype.source=void 0;const y0={}.hasOwnProperty,OH=new Map,DH=/[A-Z]/g,PH=new Set(["table","tbody","thead","tfoot","tr"]),zH=new Set(["td","th"]),tR="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function LH(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=qH(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=$H(n,t.jsx,t.jsxs)}const s={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"?p0:kH,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=nR(s,e,void 0);return o&&typeof o!="string"?o:s.create(e,s.Fragment,{children:o||void 0},void 0)}function nR(e,t,n){if(t.type==="element")return IH(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return BH(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return UH(e,t,n);if(t.type==="mdxjsEsm")return VH(e,t);if(t.type==="root")return HH(e,t,n);if(t.type==="text")return FH(e,t)}function IH(e,t,n){const r=e.schema;let s=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=p0,e.schema=s),e.ancestors.push(t);const o=iR(e,t.tagName,!1),l=GH(e,t);let u=v0(e,t);return PH.has(t.tagName)&&(u=u.filter(function(d){return typeof d=="string"?!mH(d):!0})),rR(e,l,o,t),x0(l,u),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function BH(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)}Kc(e,t.position)}function VH(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Kc(e,t.position)}function UH(e,t,n){const r=e.schema;let s=r;t.name==="svg"&&r.space==="html"&&(s=p0,e.schema=s),e.ancestors.push(t);const o=t.name===null?e.Fragment:iR(e,t.name,!0),l=YH(e,t),u=v0(e,t);return rR(e,l,o,t),x0(l,u),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function HH(e,t,n){const r={};return x0(r,v0(e,t)),e.create(t,e.Fragment,r,n)}function FH(e,t){return t.value}function rR(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function x0(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function $H(e,t,n){return r;function r(s,o,l,u){const h=Array.isArray(l.children)?n:t;return u?h(o,l,u):h(o,l)}}function qH(e,t){return n;function n(r,s,o,l){const u=Array.isArray(o.children),d=g0(r);return t(s,o,l,u,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function GH(e,t){const n={};let r,s;for(s in t.properties)if(s!=="children"&&y0.call(t.properties,s)){const o=ZH(e,s,t.properties[s]);if(o){const[l,u]=o;e.tableCellAlignToStyle&&l==="align"&&typeof u=="string"&&zH.has(t.tagName)?r=u:n[l]=u}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function YH(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const l=o.expression;l.type;const u=l.properties[0];u.type,Object.assign(n,e.evaluater.evaluateExpression(u.argument))}else Kc(e,t.position);else{const s=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const u=r.value.data.estree.body[0];u.type,o=e.evaluater.evaluateExpression(u.expression)}else Kc(e,t.position);else o=r.value===null?!0:r.value;n[s]=o}return n}function v0(e,t){const n=[];let r=-1;const s=e.passKeys?new Map:OH;for(;++r<t.children.length;){const o=t.children[r];let l;if(e.passKeys){const d=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(d){const h=s.get(d)||0;l=d+"-"+h,s.set(d,h+1)}}const u=nR(e,o,l);u!==void 0&&n.push(u)}return n}function ZH(e,t,n){const r=wH(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?cH(n):TH(n)),r.property==="style"){let s=typeof n=="object"?n:XH(e,String(n));return e.stylePropertyNameCase==="css"&&(s=KH(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&r.space?xH[r.property]||r.property:r.attribute,n]}}function XH(e,t){try{return RH(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,s=new jn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=tR+"#cannot-parse-style-attribute",s}}function iR(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let o=-1,l;for(;++o<s.length;){const u=vT(s[o])?{type:"Identifier",name:s[o]}:{type:"Literal",value:s[o]};l=l?{type:"MemberExpression",object:l,property:u,computed:!!(o&&u.type==="Literal"),optional:!1}:u}r=l}else r=vT(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const s=r.value;return y0.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(r);Kc(e)}function Kc(e,t){const n=new jn("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=tR+"#cannot-handle-mdx-estrees-without-createevaluater",n}function KH(e){const t={};let n;for(n in e)y0.call(e,n)&&(t[WH(n)]=e[n]);return t}function WH(e){let t=e.replace(DH,QH);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function QH(e){return"-"+e.toLowerCase()}const Vg={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"]},JH={};function b0(e,t){const n=JH,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return aR(e,r,s)}function aR(e,t,n){if(eF(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 NT(e.children,t,n)}return Array.isArray(e)?NT(e,t,n):""}function NT(e,t,n){const r=[];let s=-1;for(;++s<e.length;)r[s]=aR(e[s],t,n);return r.join("")}function eF(e){return!!(e&&typeof e=="object")}const AT=document.createElement("i");function w0(e){const t="&"+e+";";AT.innerHTML=t;const n=AT.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function or(e,t,n,r){const s=e.length;let o=0,l;if(t<0?t=-t>s?0:s+t:t=t>s?s:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);o<r.length;)l=r.slice(o,o+1e4),l.unshift(t,0),e.splice(...l),o+=1e4,t+=1e4}function Sr(e,t){return e.length>0?(or(e,e.length,0,t),e):t}const RT={}.hasOwnProperty;function sR(e){const t={};let n=-1;for(;++n<e.length;)tF(t,e[n]);return t}function tF(e,t){let n;for(n in t){const s=(RT.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let l;if(o)for(l in o){RT.call(s,l)||(s[l]=[]);const u=o[l];nF(s[l],Array.isArray(u)?u:u?[u]:[])}}}function nF(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);or(e,0,0,r)}function oR(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 Br(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Rn=za(/[A-Za-z]/),_n=za(/[\dA-Za-z]/),rF=za(/[#-'*+\--9=?A-Z^-~]/);function Rf(e){return e!==null&&(e<32||e===127)}const dx=za(/\d/),iF=za(/[\dA-Fa-f]/),aF=za(/[!-/:-@[-`{-~]/);function Pe(e){return e!==null&&e<-2}function St(e){return e!==null&&(e<0||e===32)}function rt(e){return e===-2||e===-1||e===32}const Mh=za(new RegExp("\\p{P}|\\p{S}","u")),ws=za(/\s/);function za(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function dl(e){const t=[];let n=-1,r=0,s=0;for(;++n<e.length;){const o=e.charCodeAt(n);let l="";if(o===37&&_n(e.charCodeAt(n+1))&&_n(e.charCodeAt(n+2)))s=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(l=String.fromCharCode(o));else if(o>55295&&o<57344){const u=e.charCodeAt(n+1);o<56320&&u>56319&&u<57344?(l=String.fromCharCode(o,u),s=1):l="�"}else l=String.fromCharCode(o);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+s+1,l=""),s&&(n+=s,s=0)}return t.join("")+e.slice(r)}function ut(e,t,n,r){const s=r?r-1:Number.POSITIVE_INFINITY;let o=0;return l;function l(d){return rt(d)?(e.enter(n),u(d)):t(d)}function u(d){return rt(d)&&o++<s?(e.consume(d),u):(e.exit(n),t(d))}}const sF={tokenize:oF};function oF(e){const t=e.attempt(this.parser.constructs.contentInitial,r,s);let n;return t;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),ut(e,t,"linePrefix")}function s(u){return e.enter("paragraph"),o(u)}function o(u){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,l(u)}function l(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return Pe(u)?(e.consume(u),e.exit("chunkText"),o):(e.consume(u),l)}}const lF={tokenize:cF},MT={tokenize:uF};function cF(e){const t=this,n=[];let r=0,s,o,l;return u;function u(O){if(r<n.length){const A=n[r];return t.containerState=A[1],e.attempt(A[0].continuation,d,h)(O)}return h(O)}function d(O){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&R();const A=t.events.length;let M=A,N;for(;M--;)if(t.events[M][0]==="exit"&&t.events[M][1].type==="chunkFlow"){N=t.events[M][1].end;break}T(r);let z=A;for(;z<t.events.length;)t.events[z][1].end={...N},z++;return or(t.events,M+1,0,t.events.slice(A)),t.events.length=z,h(O)}return u(O)}function h(O){if(r===n.length){if(!s)return x(O);if(s.currentConstruct&&s.currentConstruct.concrete)return S(O);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(MT,g,p)(O)}function g(O){return s&&R(),T(r),x(O)}function p(O){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,S(O)}function x(O){return t.containerState={},e.attempt(MT,v,S)(O)}function v(O){return r++,n.push([t.currentConstruct,t.containerState]),x(O)}function S(O){if(O===null){s&&R(),T(0),e.consume(O);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:o}),C(O)}function C(O){if(O===null){E(e.exit("chunkFlow"),!0),T(0),e.consume(O);return}return Pe(O)?(e.consume(O),E(e.exit("chunkFlow")),r=0,t.interrupt=void 0,u):(e.consume(O),C)}function E(O,A){const M=t.sliceStream(O);if(A&&M.push(null),O.previous=o,o&&(o.next=O),o=O,s.defineSkip(O.start),s.write(M),t.parser.lazy[O.start.line]){let N=s.events.length;for(;N--;)if(s.events[N][1].start.offset<l&&(!s.events[N][1].end||s.events[N][1].end.offset>l))return;const z=t.events.length;let P=z,B,D;for(;P--;)if(t.events[P][0]==="exit"&&t.events[P][1].type==="chunkFlow"){if(B){D=t.events[P][1].end;break}B=!0}for(T(r),N=z;N<t.events.length;)t.events[N][1].end={...D},N++;or(t.events,P+1,0,t.events.slice(z)),t.events.length=N}}function T(O){let A=n.length;for(;A-- >O;){const M=n[A];t.containerState=M[1],M[0].exit.call(t,e)}n.length=O}function R(){s.write([null]),o=void 0,s=void 0,t.containerState._closeFlow=void 0}}function uF(e,t,n){return ut(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Zo(e){if(e===null||St(e)||ws(e))return 1;if(Mh(e))return 2}function Oh(e,t,n){const r=[];let s=-1;for(;++s<e.length;){const o=e[s].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const fx={name:"attention",resolveAll:dF,tokenize:fF};function dF(e,t){let n=-1,r,s,o,l,u,d,h,g;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;d=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 p={...e[r][1].end},x={...e[n][1].start};OT(p,-d),OT(x,d),l={type:d>1?"strongSequence":"emphasisSequence",start:p,end:{...e[r][1].end}},u={type:d>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:x},o={type:d>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},s={type:d>1?"strong":"emphasis",start:{...l.start},end:{...u.end}},e[r][1].end={...l.start},e[n][1].start={...u.end},h=[],e[r][1].end.offset-e[r][1].start.offset&&(h=Sr(h,[["enter",e[r][1],t],["exit",e[r][1],t]])),h=Sr(h,[["enter",s,t],["enter",l,t],["exit",l,t],["enter",o,t]]),h=Sr(h,Oh(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),h=Sr(h,[["exit",o,t],["enter",u,t],["exit",u,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(g=2,h=Sr(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):g=0,or(e,r-1,n-r+3,h),n=r+h.length-g-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function fF(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,s=Zo(r);let o;return l;function l(d){return o=d,e.enter("attentionSequence"),u(d)}function u(d){if(d===o)return e.consume(d),u;const h=e.exit("attentionSequence"),g=Zo(d),p=!g||g===2&&s||n.includes(d),x=!s||s===2&&g||n.includes(r);return h._open=!!(o===42?p:p&&(s||!x)),h._close=!!(o===42?x:x&&(g||!p)),t(d)}}function OT(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const hF={name:"autolink",tokenize:mF};function mF(e,t,n){let r=0;return s;function s(v){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(v){return Rn(v)?(e.consume(v),l):v===64?n(v):h(v)}function l(v){return v===43||v===45||v===46||_n(v)?(r=1,u(v)):h(v)}function u(v){return v===58?(e.consume(v),r=0,d):(v===43||v===45||v===46||_n(v))&&r++<32?(e.consume(v),u):(r=0,h(v))}function d(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||Rf(v)?n(v):(e.consume(v),d)}function h(v){return v===64?(e.consume(v),g):rF(v)?(e.consume(v),h):n(v)}function g(v){return _n(v)?p(v):n(v)}function p(v){return v===46?(e.consume(v),r=0,g):v===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):x(v)}function x(v){if((v===45||_n(v))&&r++<63){const S=v===45?x:p;return e.consume(v),S}return n(v)}}const pu={partial:!0,tokenize:pF};function pF(e,t,n){return r;function r(o){return rt(o)?ut(e,s,"linePrefix")(o):s(o)}function s(o){return o===null||Pe(o)?t(o):n(o)}}const lR={continuation:{tokenize:yF},exit:xF,name:"blockQuote",tokenize:gF};function gF(e,t,n){const r=this;return s;function s(l){if(l===62){const u=r.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),o}return n(l)}function o(l){return rt(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function yF(e,t,n){const r=this;return s;function s(l){return rt(l)?ut(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):o(l)}function o(l){return e.attempt(lR,t,n)(l)}}function xF(e){e.exit("blockQuote")}const cR={name:"characterEscape",tokenize:vF};function vF(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),s}function s(o){return aF(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const uR={name:"characterReference",tokenize:bF};function bF(e,t,n){const r=this;let s=0,o,l;return u;function u(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),d}function d(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),o=31,l=_n,g(p))}function h(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,l=iF,g):(e.enter("characterReferenceValue"),o=7,l=dx,g(p))}function g(p){if(p===59&&s){const x=e.exit("characterReferenceValue");return l===_n&&!w0(r.sliceSerialize(x))?n(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(p)&&s++<o?(e.consume(p),g):n(p)}}const DT={partial:!0,tokenize:SF},PT={concrete:!0,name:"codeFenced",tokenize:wF};function wF(e,t,n){const r=this,s={partial:!0,tokenize:M};let o=0,l=0,u;return d;function d(N){return h(N)}function h(N){const z=r.events[r.events.length-1];return o=z&&z[1].type==="linePrefix"?z[2].sliceSerialize(z[1],!0).length:0,u=N,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),g(N)}function g(N){return N===u?(l++,e.consume(N),g):l<3?n(N):(e.exit("codeFencedFenceSequence"),rt(N)?ut(e,p,"whitespace")(N):p(N))}function p(N){return N===null||Pe(N)?(e.exit("codeFencedFence"),r.interrupt?t(N):e.check(DT,C,A)(N)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),x(N))}function x(N){return N===null||Pe(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(N)):rt(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ut(e,v,"whitespace")(N)):N===96&&N===u?n(N):(e.consume(N),x)}function v(N){return N===null||Pe(N)?p(N):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),S(N))}function S(N){return N===null||Pe(N)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(N)):N===96&&N===u?n(N):(e.consume(N),S)}function C(N){return e.attempt(s,A,E)(N)}function E(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),T}function T(N){return o>0&&rt(N)?ut(e,R,"linePrefix",o+1)(N):R(N)}function R(N){return N===null||Pe(N)?e.check(DT,C,A)(N):(e.enter("codeFlowValue"),O(N))}function O(N){return N===null||Pe(N)?(e.exit("codeFlowValue"),R(N)):(e.consume(N),O)}function A(N){return e.exit("codeFenced"),t(N)}function M(N,z,P){let B=0;return D;function D(te){return N.enter("lineEnding"),N.consume(te),N.exit("lineEnding"),H}function H(te){return N.enter("codeFencedFence"),rt(te)?ut(N,$,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(te):$(te)}function $(te){return te===u?(N.enter("codeFencedFenceSequence"),X(te)):P(te)}function X(te){return te===u?(B++,N.consume(te),X):B>=l?(N.exit("codeFencedFenceSequence"),rt(te)?ut(N,Y,"whitespace")(te):Y(te)):P(te)}function Y(te){return te===null||Pe(te)?(N.exit("codeFencedFence"),z(te)):P(te)}}}function SF(e,t,n){const r=this;return s;function s(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const Ug={name:"codeIndented",tokenize:kF},CF={partial:!0,tokenize:TF};function kF(e,t,n){const r=this;return s;function s(h){return e.enter("codeIndented"),ut(e,o,"linePrefix",5)(h)}function o(h){const g=r.events[r.events.length-1];return g&&g[1].type==="linePrefix"&&g[2].sliceSerialize(g[1],!0).length>=4?l(h):n(h)}function l(h){return h===null?d(h):Pe(h)?e.attempt(CF,l,d)(h):(e.enter("codeFlowValue"),u(h))}function u(h){return h===null||Pe(h)?(e.exit("codeFlowValue"),l(h)):(e.consume(h),u)}function d(h){return e.exit("codeIndented"),t(h)}}function TF(e,t,n){const r=this;return s;function s(l){return r.parser.lazy[r.now().line]?n(l):Pe(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),s):ut(e,o,"linePrefix",5)(l)}function o(l){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(l):Pe(l)?s(l):n(l)}}const EF={name:"codeText",previous:jF,resolve:_F,tokenize:NF};function _F(e){let t=e.length-4,n=3,r,s;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;)s===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(s=r):(r===t||e[r][1].type==="lineEnding")&&(e[s][1].type="codeTextData",r!==s+2&&(e[s][1].end=e[r-1][1].end,e.splice(s+2,r-s-2),t-=r-s-2,r=s+2),s=void 0);return e}function jF(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function NF(e,t,n){let r=0,s,o;return l;function l(p){return e.enter("codeText"),e.enter("codeTextSequence"),u(p)}function u(p){return p===96?(e.consume(p),r++,u):(e.exit("codeTextSequence"),d(p))}function d(p){return p===null?n(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),d):p===96?(o=e.enter("codeTextSequence"),s=0,g(p)):Pe(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),d):(e.enter("codeTextData"),h(p))}function h(p){return p===null||p===32||p===96||Pe(p)?(e.exit("codeTextData"),d(p)):(e.consume(p),h)}function g(p){return p===96?(e.consume(p),s++,g):s===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(p)):(o.type="codeTextData",h(p))}}class AF{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 s=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return r&&pc(this.left,r),o.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),pc(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),pc(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);pc(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);pc(this.left,n.reverse())}}}function pc(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 dR(e){const t={};let n=-1,r,s,o,l,u,d,h;const g=new AF(e);for(;++n<g.length;){for(;n in t;)n=t[n];if(r=g.get(n),n&&r[1].type==="chunkFlow"&&g.get(n-1)[1].type==="listItemPrefix"&&(d=r[1]._tokenizer.events,o=0,o<d.length&&d[o][1].type==="lineEndingBlank"&&(o+=2),o<d.length&&d[o][1].type==="content"))for(;++o<d.length&&d[o][1].type!=="content";)d[o][1].type==="chunkText"&&(d[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,RF(g,n)),n=t[n],h=!0);else if(r[1]._container){for(o=n,s=void 0;o--;)if(l=g.get(o),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(s&&(g.get(s)[1].type="lineEndingBlank"),l[1].type="lineEnding",s=o);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;s&&(r[1].end={...g.get(s)[1].start},u=g.slice(s,n),u.unshift(r),g.splice(s,n-s+1,u))}}return or(e,0,Number.POSITIVE_INFINITY,g.slice(0)),!h}function RF(e,t){const n=e.get(t)[1],r=e.get(t)[2];let s=t-1;const o=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const u=l.events,d=[],h={};let g,p,x=-1,v=n,S=0,C=0;const E=[C];for(;v;){for(;e.get(++s)[1]!==v;);o.push(s),v._tokenizer||(g=r.sliceStream(v),v.next||g.push(null),p&&l.defineSkip(v.start),v._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(g),v._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),p=v,v=v.next}for(v=n;++x<u.length;)u[x][0]==="exit"&&u[x-1][0]==="enter"&&u[x][1].type===u[x-1][1].type&&u[x][1].start.line!==u[x][1].end.line&&(C=x+1,E.push(C),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(l.events=[],v?(v._tokenizer=void 0,v.previous=void 0):E.pop(),x=E.length;x--;){const T=u.slice(E[x],E[x+1]),R=o.pop();d.push([R,R+T.length-1]),e.splice(R,2,T)}for(d.reverse(),x=-1;++x<d.length;)h[S+d[x][0]]=S+d[x][1],S+=d[x][1]-d[x][0]-1;return h}const MF={resolve:DF,tokenize:PF},OF={partial:!0,tokenize:zF};function DF(e){return dR(e),e}function PF(e,t){let n;return r;function r(u){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(u)}function s(u){return u===null?o(u):Pe(u)?e.check(OF,l,o)(u):(e.consume(u),s)}function o(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function l(u){return e.consume(u),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function zF(e,t,n){const r=this;return s;function s(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),ut(e,o,"linePrefix")}function o(l){if(l===null||Pe(l))return n(l);const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function fR(e,t,n,r,s,o,l,u,d){const h=d||Number.POSITIVE_INFINITY;let g=0;return p;function p(T){return T===60?(e.enter(r),e.enter(s),e.enter(o),e.consume(T),e.exit(o),x):T===null||T===32||T===41||Rf(T)?n(T):(e.enter(r),e.enter(l),e.enter(u),e.enter("chunkString",{contentType:"string"}),C(T))}function x(T){return T===62?(e.enter(o),e.consume(T),e.exit(o),e.exit(s),e.exit(r),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),v(T))}function v(T){return T===62?(e.exit("chunkString"),e.exit(u),x(T)):T===null||T===60||Pe(T)?n(T):(e.consume(T),T===92?S:v)}function S(T){return T===60||T===62||T===92?(e.consume(T),v):v(T)}function C(T){return!g&&(T===null||T===41||St(T))?(e.exit("chunkString"),e.exit(u),e.exit(l),e.exit(r),t(T)):g<h&&T===40?(e.consume(T),g++,C):T===41?(e.consume(T),g--,C):T===null||T===32||T===40||Rf(T)?n(T):(e.consume(T),T===92?E:C)}function E(T){return T===40||T===41||T===92?(e.consume(T),C):C(T)}}function hR(e,t,n,r,s,o){const l=this;let u=0,d;return h;function h(v){return e.enter(r),e.enter(s),e.consume(v),e.exit(s),e.enter(o),g}function g(v){return u>999||v===null||v===91||v===93&&!d||v===94&&!u&&"_hiddenFootnoteSupport"in l.parser.constructs?n(v):v===93?(e.exit(o),e.enter(s),e.consume(v),e.exit(s),e.exit(r),t):Pe(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),g):(e.enter("chunkString",{contentType:"string"}),p(v))}function p(v){return v===null||v===91||v===93||Pe(v)||u++>999?(e.exit("chunkString"),g(v)):(e.consume(v),d||(d=!rt(v)),v===92?x:p)}function x(v){return v===91||v===92||v===93?(e.consume(v),u++,p):p(v)}}function mR(e,t,n,r,s,o){let l;return u;function u(x){return x===34||x===39||x===40?(e.enter(r),e.enter(s),e.consume(x),e.exit(s),l=x===40?41:x,d):n(x)}function d(x){return x===l?(e.enter(s),e.consume(x),e.exit(s),e.exit(r),t):(e.enter(o),h(x))}function h(x){return x===l?(e.exit(o),d(l)):x===null?n(x):Pe(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),ut(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),g(x))}function g(x){return x===l||x===null||Pe(x)?(e.exit("chunkString"),h(x)):(e.consume(x),x===92?p:g)}function p(x){return x===l||x===92?(e.consume(x),g):g(x)}}function Oc(e,t){let n;return r;function r(s){return Pe(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,r):rt(s)?ut(e,r,n?"linePrefix":"lineSuffix")(s):t(s)}}const LF={name:"definition",tokenize:BF},IF={partial:!0,tokenize:VF};function BF(e,t,n){const r=this;let s;return o;function o(v){return e.enter("definition"),l(v)}function l(v){return hR.call(r,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function u(v){return s=Br(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),d):n(v)}function d(v){return St(v)?Oc(e,h)(v):h(v)}function h(v){return fR(e,g,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function g(v){return e.attempt(IF,p,p)(v)}function p(v){return rt(v)?ut(e,x,"whitespace")(v):x(v)}function x(v){return v===null||Pe(v)?(e.exit("definition"),r.parser.defined.push(s),t(v)):n(v)}}function VF(e,t,n){return r;function r(u){return St(u)?Oc(e,s)(u):n(u)}function s(u){return mR(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function o(u){return rt(u)?ut(e,l,"whitespace")(u):l(u)}function l(u){return u===null||Pe(u)?t(u):n(u)}}const UF={name:"hardBreakEscape",tokenize:HF};function HF(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),s}function s(o){return Pe(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const FF={name:"headingAtx",resolve:$F,tokenize:qF};function $F(e,t){let n=e.length-2,r=3,s,o;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&&(s={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},or(e,r,n-r+1,[["enter",s,t],["enter",o,t],["exit",o,t],["exit",s,t]])),e}function qF(e,t,n){let r=0;return s;function s(g){return e.enter("atxHeading"),o(g)}function o(g){return e.enter("atxHeadingSequence"),l(g)}function l(g){return g===35&&r++<6?(e.consume(g),l):g===null||St(g)?(e.exit("atxHeadingSequence"),u(g)):n(g)}function u(g){return g===35?(e.enter("atxHeadingSequence"),d(g)):g===null||Pe(g)?(e.exit("atxHeading"),t(g)):rt(g)?ut(e,u,"whitespace")(g):(e.enter("atxHeadingText"),h(g))}function d(g){return g===35?(e.consume(g),d):(e.exit("atxHeadingSequence"),u(g))}function h(g){return g===null||g===35||St(g)?(e.exit("atxHeadingText"),u(g)):(e.consume(g),h)}}const GF=["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"],zT=["pre","script","style","textarea"],YF={concrete:!0,name:"htmlFlow",resolveTo:KF,tokenize:WF},ZF={partial:!0,tokenize:JF},XF={partial:!0,tokenize:QF};function KF(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 WF(e,t,n){const r=this;let s,o,l,u,d;return h;function h(j){return g(j)}function g(j){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(j),p}function p(j){return j===33?(e.consume(j),x):j===47?(e.consume(j),o=!0,C):j===63?(e.consume(j),s=3,r.interrupt?t:k):Rn(j)?(e.consume(j),l=String.fromCharCode(j),E):n(j)}function x(j){return j===45?(e.consume(j),s=2,v):j===91?(e.consume(j),s=5,u=0,S):Rn(j)?(e.consume(j),s=4,r.interrupt?t:k):n(j)}function v(j){return j===45?(e.consume(j),r.interrupt?t:k):n(j)}function S(j){const Q="CDATA[";return j===Q.charCodeAt(u++)?(e.consume(j),u===Q.length?r.interrupt?t:$:S):n(j)}function C(j){return Rn(j)?(e.consume(j),l=String.fromCharCode(j),E):n(j)}function E(j){if(j===null||j===47||j===62||St(j)){const Q=j===47,ee=l.toLowerCase();return!Q&&!o&&zT.includes(ee)?(s=1,r.interrupt?t(j):$(j)):GF.includes(l.toLowerCase())?(s=6,Q?(e.consume(j),T):r.interrupt?t(j):$(j)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(j):o?R(j):O(j))}return j===45||_n(j)?(e.consume(j),l+=String.fromCharCode(j),E):n(j)}function T(j){return j===62?(e.consume(j),r.interrupt?t:$):n(j)}function R(j){return rt(j)?(e.consume(j),R):D(j)}function O(j){return j===47?(e.consume(j),D):j===58||j===95||Rn(j)?(e.consume(j),A):rt(j)?(e.consume(j),O):D(j)}function A(j){return j===45||j===46||j===58||j===95||_n(j)?(e.consume(j),A):M(j)}function M(j){return j===61?(e.consume(j),N):rt(j)?(e.consume(j),M):O(j)}function N(j){return j===null||j===60||j===61||j===62||j===96?n(j):j===34||j===39?(e.consume(j),d=j,z):rt(j)?(e.consume(j),N):P(j)}function z(j){return j===d?(e.consume(j),d=null,B):j===null||Pe(j)?n(j):(e.consume(j),z)}function P(j){return j===null||j===34||j===39||j===47||j===60||j===61||j===62||j===96||St(j)?M(j):(e.consume(j),P)}function B(j){return j===47||j===62||rt(j)?O(j):n(j)}function D(j){return j===62?(e.consume(j),H):n(j)}function H(j){return j===null||Pe(j)?$(j):rt(j)?(e.consume(j),H):n(j)}function $(j){return j===45&&s===2?(e.consume(j),I):j===60&&s===1?(e.consume(j),F):j===62&&s===4?(e.consume(j),G):j===63&&s===3?(e.consume(j),k):j===93&&s===5?(e.consume(j),Z):Pe(j)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(ZF,le,X)(j)):j===null||Pe(j)?(e.exit("htmlFlowData"),X(j)):(e.consume(j),$)}function X(j){return e.check(XF,Y,le)(j)}function Y(j){return e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),te}function te(j){return j===null||Pe(j)?X(j):(e.enter("htmlFlowData"),$(j))}function I(j){return j===45?(e.consume(j),k):$(j)}function F(j){return j===47?(e.consume(j),l="",V):$(j)}function V(j){if(j===62){const Q=l.toLowerCase();return zT.includes(Q)?(e.consume(j),G):$(j)}return Rn(j)&&l.length<8?(e.consume(j),l+=String.fromCharCode(j),V):$(j)}function Z(j){return j===93?(e.consume(j),k):$(j)}function k(j){return j===62?(e.consume(j),G):j===45&&s===2?(e.consume(j),k):$(j)}function G(j){return j===null||Pe(j)?(e.exit("htmlFlowData"),le(j)):(e.consume(j),G)}function le(j){return e.exit("htmlFlow"),t(j)}}function QF(e,t,n){const r=this;return s;function s(l){return Pe(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):n(l)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function JF(e,t,n){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(pu,t,n)}}const e$={name:"htmlText",tokenize:t$};function t$(e,t,n){const r=this;let s,o,l;return u;function u(k){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(k),d}function d(k){return k===33?(e.consume(k),h):k===47?(e.consume(k),M):k===63?(e.consume(k),O):Rn(k)?(e.consume(k),P):n(k)}function h(k){return k===45?(e.consume(k),g):k===91?(e.consume(k),o=0,S):Rn(k)?(e.consume(k),R):n(k)}function g(k){return k===45?(e.consume(k),v):n(k)}function p(k){return k===null?n(k):k===45?(e.consume(k),x):Pe(k)?(l=p,F(k)):(e.consume(k),p)}function x(k){return k===45?(e.consume(k),v):p(k)}function v(k){return k===62?I(k):k===45?x(k):p(k)}function S(k){const G="CDATA[";return k===G.charCodeAt(o++)?(e.consume(k),o===G.length?C:S):n(k)}function C(k){return k===null?n(k):k===93?(e.consume(k),E):Pe(k)?(l=C,F(k)):(e.consume(k),C)}function E(k){return k===93?(e.consume(k),T):C(k)}function T(k){return k===62?I(k):k===93?(e.consume(k),T):C(k)}function R(k){return k===null||k===62?I(k):Pe(k)?(l=R,F(k)):(e.consume(k),R)}function O(k){return k===null?n(k):k===63?(e.consume(k),A):Pe(k)?(l=O,F(k)):(e.consume(k),O)}function A(k){return k===62?I(k):O(k)}function M(k){return Rn(k)?(e.consume(k),N):n(k)}function N(k){return k===45||_n(k)?(e.consume(k),N):z(k)}function z(k){return Pe(k)?(l=z,F(k)):rt(k)?(e.consume(k),z):I(k)}function P(k){return k===45||_n(k)?(e.consume(k),P):k===47||k===62||St(k)?B(k):n(k)}function B(k){return k===47?(e.consume(k),I):k===58||k===95||Rn(k)?(e.consume(k),D):Pe(k)?(l=B,F(k)):rt(k)?(e.consume(k),B):I(k)}function D(k){return k===45||k===46||k===58||k===95||_n(k)?(e.consume(k),D):H(k)}function H(k){return k===61?(e.consume(k),$):Pe(k)?(l=H,F(k)):rt(k)?(e.consume(k),H):B(k)}function $(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),s=k,X):Pe(k)?(l=$,F(k)):rt(k)?(e.consume(k),$):(e.consume(k),Y)}function X(k){return k===s?(e.consume(k),s=void 0,te):k===null?n(k):Pe(k)?(l=X,F(k)):(e.consume(k),X)}function Y(k){return k===null||k===34||k===39||k===60||k===61||k===96?n(k):k===47||k===62||St(k)?B(k):(e.consume(k),Y)}function te(k){return k===47||k===62||St(k)?B(k):n(k)}function I(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),t):n(k)}function F(k){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),V}function V(k){return rt(k)?ut(e,Z,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):Z(k)}function Z(k){return e.enter("htmlTextData"),l(k)}}const S0={name:"labelEnd",resolveAll:a$,resolveTo:s$,tokenize:o$},n$={tokenize:l$},r$={tokenize:c$},i$={tokenize:u$};function a$(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 s=r.type==="labelImage"?4:2;r.type="data",t+=s}}return e.length!==n.length&&or(e,0,e.length,n),e}function s$(e,t){let n=e.length,r=0,s,o,l,u;for(;n--;)if(s=e[n][1],o){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(o=n,s.type!=="labelLink")){r=2;break}}else s.type==="labelEnd"&&(l=n);const d={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[o][1].start},end:{...e[l][1].end}},g={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[l-2][1].start}};return u=[["enter",d,t],["enter",h,t]],u=Sr(u,e.slice(o+1,o+r+3)),u=Sr(u,[["enter",g,t]]),u=Sr(u,Oh(t.parser.constructs.insideSpan.null,e.slice(o+r+4,l-3),t)),u=Sr(u,[["exit",g,t],e[l-2],e[l-1],["exit",h,t]]),u=Sr(u,e.slice(l+1)),u=Sr(u,[["exit",d,t]]),or(e,o,e.length,u),e}function o$(e,t,n){const r=this;let s=r.events.length,o,l;for(;s--;)if((r.events[s][1].type==="labelImage"||r.events[s][1].type==="labelLink")&&!r.events[s][1]._balanced){o=r.events[s][1];break}return u;function u(x){return o?o._inactive?p(x):(l=r.parser.defined.includes(Br(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(x),e.exit("labelMarker"),e.exit("labelEnd"),d):n(x)}function d(x){return x===40?e.attempt(n$,g,l?g:p)(x):x===91?e.attempt(r$,g,l?h:p)(x):l?g(x):p(x)}function h(x){return e.attempt(i$,g,p)(x)}function g(x){return t(x)}function p(x){return o._balanced=!0,n(x)}}function l$(e,t,n){return r;function r(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),s}function s(p){return St(p)?Oc(e,o)(p):o(p)}function o(p){return p===41?g(p):fR(e,l,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function l(p){return St(p)?Oc(e,d)(p):g(p)}function u(p){return n(p)}function d(p){return p===34||p===39||p===40?mR(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):g(p)}function h(p){return St(p)?Oc(e,g)(p):g(p)}function g(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),t):n(p)}}function c$(e,t,n){const r=this;return s;function s(u){return hR.call(r,e,o,l,"reference","referenceMarker","referenceString")(u)}function o(u){return r.parser.defined.includes(Br(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function l(u){return n(u)}}function u$(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),s}function s(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const d$={name:"labelStartImage",resolveAll:S0.resolveAll,tokenize:f$};function f$(e,t,n){const r=this;return s;function s(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),o}function o(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),l):n(u)}function l(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const h$={name:"labelStartLink",resolveAll:S0.resolveAll,tokenize:m$};function m$(e,t,n){const r=this;return s;function s(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),o}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const Hg={name:"lineEnding",tokenize:p$};function p$(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),ut(e,t,"linePrefix")}}const uf={name:"thematicBreak",tokenize:g$};function g$(e,t,n){let r=0,s;return o;function o(h){return e.enter("thematicBreak"),l(h)}function l(h){return s=h,u(h)}function u(h){return h===s?(e.enter("thematicBreakSequence"),d(h)):r>=3&&(h===null||Pe(h))?(e.exit("thematicBreak"),t(h)):n(h)}function d(h){return h===s?(e.consume(h),r++,d):(e.exit("thematicBreakSequence"),rt(h)?ut(e,u,"whitespace")(h):u(h))}}const Un={continuation:{tokenize:b$},exit:S$,name:"list",tokenize:v$},y$={partial:!0,tokenize:C$},x$={partial:!0,tokenize:w$};function v$(e,t,n){const r=this,s=r.events[r.events.length-1];let o=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,l=0;return u;function u(v){const S=r.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(S==="listUnordered"?!r.containerState.marker||v===r.containerState.marker:dx(v)){if(r.containerState.type||(r.containerState.type=S,e.enter(S,{_container:!0})),S==="listUnordered")return e.enter("listItemPrefix"),v===42||v===45?e.check(uf,n,h)(v):h(v);if(!r.interrupt||v===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(v)}return n(v)}function d(v){return dx(v)&&++l<10?(e.consume(v),d):(!r.interrupt||l<2)&&(r.containerState.marker?v===r.containerState.marker:v===41||v===46)?(e.exit("listItemValue"),h(v)):n(v)}function h(v){return e.enter("listItemMarker"),e.consume(v),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||v,e.check(pu,r.interrupt?n:g,e.attempt(y$,x,p))}function g(v){return r.containerState.initialBlankLine=!0,o++,x(v)}function p(v){return rt(v)?(e.enter("listItemPrefixWhitespace"),e.consume(v),e.exit("listItemPrefixWhitespace"),x):n(v)}function x(v){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(v)}}function b$(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(pu,s,o);function s(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ut(e,t,"listItemIndent",r.containerState.size+1)(u)}function o(u){return r.containerState.furtherBlankLines||!rt(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(x$,t,l)(u))}function l(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,ut(e,e.attempt(Un,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function w$(e,t,n){const r=this;return ut(e,s,"listItemIndent",r.containerState.size+1);function s(o){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(o):n(o)}}function S$(e){e.exit(this.containerState.type)}function C$(e,t,n){const r=this;return ut(e,s,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(o){const l=r.events[r.events.length-1];return!rt(o)&&l&&l[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const LT={name:"setextUnderline",resolveTo:k$,tokenize:T$};function k$(e,t){let n=e.length,r,s,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(s=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",o?(e.splice(s,0,["enter",l,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function T$(e,t,n){const r=this;let s;return o;function o(h){let g=r.events.length,p;for(;g--;)if(r.events[g][1].type!=="lineEnding"&&r.events[g][1].type!=="linePrefix"&&r.events[g][1].type!=="content"){p=r.events[g][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||p)?(e.enter("setextHeadingLine"),s=h,l(h)):n(h)}function l(h){return e.enter("setextHeadingLineSequence"),u(h)}function u(h){return h===s?(e.consume(h),u):(e.exit("setextHeadingLineSequence"),rt(h)?ut(e,d,"lineSuffix")(h):d(h))}function d(h){return h===null||Pe(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const E$={tokenize:_$};function _$(e){const t=this,n=e.attempt(pu,r,e.attempt(this.parser.constructs.flowInitial,s,ut(e,e.attempt(this.parser.constructs.flow,s,e.attempt(MF,s)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function s(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const j$={resolveAll:gR()},N$=pR("string"),A$=pR("text");function pR(e){return{resolveAll:gR(e==="text"?R$:void 0),tokenize:t};function t(n){const r=this,s=this.parser.constructs[e],o=n.attempt(s,l,u);return l;function l(g){return h(g)?o(g):u(g)}function u(g){if(g===null){n.consume(g);return}return n.enter("data"),n.consume(g),d}function d(g){return h(g)?(n.exit("data"),o(g)):(n.consume(g),d)}function h(g){if(g===null)return!0;const p=s[g];let x=-1;if(p)for(;++x<p.length;){const v=p[x];if(!v.previous||v.previous.call(r,r.previous))return!0}return!1}}}function gR(e){return t;function t(n,r){let s=-1,o;for(;++s<=n.length;)o===void 0?n[s]&&n[s][1].type==="data"&&(o=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==o+2&&(n[o][1].end=n[s-1][1].end,n.splice(o+2,s-o-2),s=o+2),o=void 0);return e?e(n,r):n}}function R$(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],s=t.sliceStream(r);let o=s.length,l=-1,u=0,d;for(;o--;){const h=s[o];if(typeof h=="string"){for(l=h.length;h.charCodeAt(l-1)===32;)u++,l--;if(l)break;l=-1}else if(h===-2)d=!0,u++;else if(h!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(u=0),u){const h={type:n===e.length||d||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?l:r.start._bufferIndex+l,_index:r.start._index+o,line:r.end.line,column:r.end.column-u,offset:r.end.offset-u},end:{...r.end}};r.end={...h.start},r.start.offset===r.end.offset?Object.assign(r,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const M$={42:Un,43:Un,45:Un,48:Un,49:Un,50:Un,51:Un,52:Un,53:Un,54:Un,55:Un,56:Un,57:Un,62:lR},O$={91:LF},D$={[-2]:Ug,[-1]:Ug,32:Ug},P$={35:FF,42:uf,45:[LT,uf],60:YF,61:LT,95:uf,96:PT,126:PT},z$={38:uR,92:cR},L$={[-5]:Hg,[-4]:Hg,[-3]:Hg,33:d$,38:uR,42:fx,60:[hF,e$],91:h$,92:[UF,cR],93:S0,95:fx,96:EF},I$={null:[fx,j$]},B$={null:[42,95]},V$={null:[]},U$=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:B$,contentInitial:O$,disable:V$,document:M$,flow:P$,flowInitial:D$,insideSpan:I$,string:z$,text:L$},Symbol.toStringTag,{value:"Module"}));function H$(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 s={},o=[];let l=[],u=[];const d={attempt:z(M),check:z(N),consume:R,enter:O,exit:A,interrupt:z(N,{interrupt:!0})},h={code:null,containerState:{},defineSkip:C,events:[],now:S,parser:e,previous:null,sliceSerialize:x,sliceStream:v,write:p};let g=t.tokenize.call(h,d);return t.resolveAll&&o.push(t),h;function p(H){return l=Sr(l,H),E(),l[l.length-1]!==null?[]:(P(t,0),h.events=Oh(o,h.events,h),h.events)}function x(H,$){return $$(v(H),$)}function v(H){return F$(l,H)}function S(){const{_bufferIndex:H,_index:$,line:X,column:Y,offset:te}=r;return{_bufferIndex:H,_index:$,line:X,column:Y,offset:te}}function C(H){s[H.line]=H.column,D()}function E(){let H;for(;r._index<l.length;){const $=l[r._index];if(typeof $=="string")for(H=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===H&&r._bufferIndex<$.length;)T($.charCodeAt(r._bufferIndex));else T($)}}function T(H){g=g(H)}function R(H){Pe(H)?(r.line++,r.column=1,r.offset+=H===-3?2:1,D()):H!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),h.previous=H}function O(H,$){const X=$||{};return X.type=H,X.start=S(),h.events.push(["enter",X,h]),u.push(X),X}function A(H){const $=u.pop();return $.end=S(),h.events.push(["exit",$,h]),$}function M(H,$){P(H,$.from)}function N(H,$){$.restore()}function z(H,$){return X;function X(Y,te,I){let F,V,Z,k;return Array.isArray(Y)?le(Y):"tokenize"in Y?le([Y]):G(Y);function G(W){return K;function K(oe){const ce=oe!==null&&W[oe],me=oe!==null&&W.null,be=[...Array.isArray(ce)?ce:ce?[ce]:[],...Array.isArray(me)?me:me?[me]:[]];return le(be)(oe)}}function le(W){return F=W,V=0,W.length===0?I:j(W[V])}function j(W){return K;function K(oe){return k=B(),Z=W,W.partial||(h.currentConstruct=W),W.name&&h.parser.constructs.disable.null.includes(W.name)?ee():W.tokenize.call($?Object.assign(Object.create(h),$):h,d,Q,ee)(oe)}}function Q(W){return H(Z,k),te}function ee(W){return k.restore(),++V<F.length?j(F[V]):I}}}function P(H,$){H.resolveAll&&!o.includes(H)&&o.push(H),H.resolve&&or(h.events,$,h.events.length-$,H.resolve(h.events.slice($),h)),H.resolveTo&&(h.events=H.resolveTo(h.events,h))}function B(){const H=S(),$=h.previous,X=h.currentConstruct,Y=h.events.length,te=Array.from(u);return{from:Y,restore:I};function I(){r=H,h.previous=$,h.currentConstruct=X,h.events.length=Y,u=te,D()}}function D(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function F$(e,t){const n=t.start._index,r=t.start._bufferIndex,s=t.end._index,o=t.end._bufferIndex;let l;if(n===s)l=[e[n].slice(r,o)];else{if(l=e.slice(n,s),r>-1){const u=l[0];typeof u=="string"?l[0]=u.slice(r):l.shift()}o>0&&l.push(e[s].slice(0,o))}return l}function $$(e,t){let n=-1;const r=[];let s;for(;++n<e.length;){const o=e[n];let l;if(typeof o=="string")l=o;else switch(o){case-5:{l="\r";break}case-4:{l=`
328
+ `;break}case-3:{l=`\r
329
+ `;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&s)continue;l=" ";break}default:l=String.fromCharCode(o)}s=o===-2,r.push(l)}return r.join("")}function q$(e){const r={constructs:sR([U$,...(e||{}).extensions||[]]),content:s(sF),defined:[],document:s(lF),flow:s(E$),lazy:{},string:s(N$),text:s(A$)};return r;function s(o){return l;function l(u){return H$(r,o,u)}}}function G$(e){for(;!dR(e););return e}const IT=/[\0\t\n\r]/g;function Y$(){let e=1,t="",n=!0,r;return s;function s(o,l,u){const d=[];let h,g,p,x,v;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(l||void 0).decode(o)),p=0,t="",n&&(o.charCodeAt(0)===65279&&p++,n=void 0);p<o.length;){if(IT.lastIndex=p,h=IT.exec(o),x=h&&h.index!==void 0?h.index:o.length,v=o.charCodeAt(x),!h){t=o.slice(p);break}if(v===10&&p===x&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),p<x&&(d.push(o.slice(p,x)),e+=x-p),v){case 0:{d.push(65533),e++;break}case 9:{for(g=Math.ceil(e/4)*4,d.push(-2);e++<g;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}p=x+1}return u&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const Z$=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function X$(e){return e.replace(Z$,K$)}function K$(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),o=s===120||s===88;return oR(n.slice(o?2:1),o?16:10)}return w0(n)||e}const yR={}.hasOwnProperty;function W$(e,t,n){return typeof t!="string"&&(n=t,t=void 0),Q$(n)(G$(q$(n).document().write(Y$()(e,t,!0))))}function Q$(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Ct),autolinkProtocol:B,autolinkEmail:B,atxHeading:o(Mt),blockQuote:o(me),characterEscape:B,characterReference:B,codeFenced:o(be),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(be,l),codeText:o(Te,l),codeTextData:B,data:B,codeFlowValue:B,definition:o(Ve),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o(lt),hardBreakEscape:o(It),hardBreakTrailing:o(It),htmlFlow:o(st,l),htmlFlowData:B,htmlText:o(st,l),htmlTextData:B,image:o(yt),label:l,link:o(Ct),listItem:o(Jt),listItemValue:x,listOrdered:o(lr,p),listUnordered:o(lr),paragraph:o(kt),reference:j,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o(Mt),strong:o(Yn),thematicBreak:o(hl)},exit:{atxHeading:d(),atxHeadingSequence:M,autolink:d(),autolinkEmail:ce,autolinkProtocol:oe,blockQuote:d(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:ee,characterReferenceMarkerNumeric:ee,characterReferenceValue:W,characterReference:K,codeFenced:d(E),codeFencedFence:C,codeFencedFenceInfo:v,codeFencedFenceMeta:S,codeFlowValue:D,codeIndented:d(T),codeText:d(te),codeTextData:D,data:D,definition:d(),definitionDestinationString:A,definitionLabelString:R,definitionTitleString:O,emphasis:d(),hardBreakEscape:d($),hardBreakTrailing:d($),htmlFlow:d(X),htmlFlowData:D,htmlText:d(Y),htmlTextData:D,image:d(F),label:Z,labelText:V,lineEnding:H,link:d(I),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:Q,resourceDestinationString:k,resourceTitleString:G,resource:le,setextHeading:d(P),setextHeadingLineSequence:z,setextHeadingText:N,strong:d(),thematicBreak:d()}};xR(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(ue){let ge={type:"root",children:[]};const Oe={stack:[ge],tokenStack:[],config:t,enter:u,exit:h,buffer:l,resume:g,data:n},De=[];let it=-1;for(;++it<ue.length;)if(ue[it][1].type==="listOrdered"||ue[it][1].type==="listUnordered")if(ue[it][0]==="enter")De.push(it);else{const bn=De.pop();it=s(ue,bn,it)}for(it=-1;++it<ue.length;){const bn=t[ue[it][0]];yR.call(bn,ue[it][1].type)&&bn[ue[it][1].type].call(Object.assign({sliceSerialize:ue[it][2].sliceSerialize},Oe),ue[it][1])}if(Oe.tokenStack.length>0){const bn=Oe.tokenStack[Oe.tokenStack.length-1];(bn[1]||BT).call(Oe,void 0,bn[0])}for(ge.position={start:fa(ue.length>0?ue[0][1].start:{line:1,column:1,offset:0}),end:fa(ue.length>0?ue[ue.length-2][1].end:{line:1,column:1,offset:0})},it=-1;++it<t.transforms.length;)ge=t.transforms[it](ge)||ge;return ge}function s(ue,ge,Oe){let De=ge-1,it=-1,bn=!1,wn,Sn,cr,Cn;for(;++De<=Oe;){const Bt=ue[De];switch(Bt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Bt[0]==="enter"?it++:it--,Cn=void 0;break}case"lineEndingBlank":{Bt[0]==="enter"&&(wn&&!Cn&&!it&&!cr&&(cr=De),Cn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Cn=void 0}if(!it&&Bt[0]==="enter"&&Bt[1].type==="listItemPrefix"||it===-1&&Bt[0]==="exit"&&(Bt[1].type==="listUnordered"||Bt[1].type==="listOrdered")){if(wn){let zn=De;for(Sn=void 0;zn--;){const Nn=ue[zn];if(Nn[1].type==="lineEnding"||Nn[1].type==="lineEndingBlank"){if(Nn[0]==="exit")continue;Sn&&(ue[Sn][1].type="lineEndingBlank",bn=!0),Nn[1].type="lineEnding",Sn=zn}else if(!(Nn[1].type==="linePrefix"||Nn[1].type==="blockQuotePrefix"||Nn[1].type==="blockQuotePrefixWhitespace"||Nn[1].type==="blockQuoteMarker"||Nn[1].type==="listItemIndent"))break}cr&&(!Sn||cr<Sn)&&(wn._spread=!0),wn.end=Object.assign({},Sn?ue[Sn][1].start:Bt[1].end),ue.splice(Sn||De,0,["exit",wn,Bt[2]]),De++,Oe++}if(Bt[1].type==="listItemPrefix"){const zn={type:"listItem",_spread:!1,start:Object.assign({},Bt[1].start),end:void 0};wn=zn,ue.splice(De,0,["enter",zn,Bt[2]]),De++,Oe++,cr=void 0,Cn=!0}}}return ue[ge][1]._spread=bn,Oe}function o(ue,ge){return Oe;function Oe(De){u.call(this,ue(De),De),ge&&ge.call(this,De)}}function l(){this.stack.push({type:"fragment",children:[]})}function u(ue,ge,Oe){this.stack[this.stack.length-1].children.push(ue),this.stack.push(ue),this.tokenStack.push([ge,Oe||void 0]),ue.position={start:fa(ge.start),end:void 0}}function d(ue){return ge;function ge(Oe){ue&&ue.call(this,Oe),h.call(this,Oe)}}function h(ue,ge){const Oe=this.stack.pop(),De=this.tokenStack.pop();if(De)De[0].type!==ue.type&&(ge?ge.call(this,ue,De[0]):(De[1]||BT).call(this,ue,De[0]));else throw new Error("Cannot close `"+ue.type+"` ("+Mc({start:ue.start,end:ue.end})+"): it’s not open");Oe.position.end=fa(ue.end)}function g(){return b0(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function x(ue){if(this.data.expectingFirstListItemValue){const ge=this.stack[this.stack.length-2];ge.start=Number.parseInt(this.sliceSerialize(ue),10),this.data.expectingFirstListItemValue=void 0}}function v(){const ue=this.resume(),ge=this.stack[this.stack.length-1];ge.lang=ue}function S(){const ue=this.resume(),ge=this.stack[this.stack.length-1];ge.meta=ue}function C(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function E(){const ue=this.resume(),ge=this.stack[this.stack.length-1];ge.value=ue.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function T(){const ue=this.resume(),ge=this.stack[this.stack.length-1];ge.value=ue.replace(/(\r?\n|\r)$/g,"")}function R(ue){const ge=this.resume(),Oe=this.stack[this.stack.length-1];Oe.label=ge,Oe.identifier=Br(this.sliceSerialize(ue)).toLowerCase()}function O(){const ue=this.resume(),ge=this.stack[this.stack.length-1];ge.title=ue}function A(){const ue=this.resume(),ge=this.stack[this.stack.length-1];ge.url=ue}function M(ue){const ge=this.stack[this.stack.length-1];if(!ge.depth){const Oe=this.sliceSerialize(ue).length;ge.depth=Oe}}function N(){this.data.setextHeadingSlurpLineEnding=!0}function z(ue){const ge=this.stack[this.stack.length-1];ge.depth=this.sliceSerialize(ue).codePointAt(0)===61?1:2}function P(){this.data.setextHeadingSlurpLineEnding=void 0}function B(ue){const Oe=this.stack[this.stack.length-1].children;let De=Oe[Oe.length-1];(!De||De.type!=="text")&&(De=fl(),De.position={start:fa(ue.start),end:void 0},Oe.push(De)),this.stack.push(De)}function D(ue){const ge=this.stack.pop();ge.value+=this.sliceSerialize(ue),ge.position.end=fa(ue.end)}function H(ue){const ge=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Oe=ge.children[ge.children.length-1];Oe.position.end=fa(ue.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ge.type)&&(B.call(this,ue),D.call(this,ue))}function $(){this.data.atHardBreak=!0}function X(){const ue=this.resume(),ge=this.stack[this.stack.length-1];ge.value=ue}function Y(){const ue=this.resume(),ge=this.stack[this.stack.length-1];ge.value=ue}function te(){const ue=this.resume(),ge=this.stack[this.stack.length-1];ge.value=ue}function I(){const ue=this.stack[this.stack.length-1];if(this.data.inReference){const ge=this.data.referenceType||"shortcut";ue.type+="Reference",ue.referenceType=ge,delete ue.url,delete ue.title}else delete ue.identifier,delete ue.label;this.data.referenceType=void 0}function F(){const ue=this.stack[this.stack.length-1];if(this.data.inReference){const ge=this.data.referenceType||"shortcut";ue.type+="Reference",ue.referenceType=ge,delete ue.url,delete ue.title}else delete ue.identifier,delete ue.label;this.data.referenceType=void 0}function V(ue){const ge=this.sliceSerialize(ue),Oe=this.stack[this.stack.length-2];Oe.label=X$(ge),Oe.identifier=Br(ge).toLowerCase()}function Z(){const ue=this.stack[this.stack.length-1],ge=this.resume(),Oe=this.stack[this.stack.length-1];if(this.data.inReference=!0,Oe.type==="link"){const De=ue.children;Oe.children=De}else Oe.alt=ge}function k(){const ue=this.resume(),ge=this.stack[this.stack.length-1];ge.url=ue}function G(){const ue=this.resume(),ge=this.stack[this.stack.length-1];ge.title=ue}function le(){this.data.inReference=void 0}function j(){this.data.referenceType="collapsed"}function Q(ue){const ge=this.resume(),Oe=this.stack[this.stack.length-1];Oe.label=ge,Oe.identifier=Br(this.sliceSerialize(ue)).toLowerCase(),this.data.referenceType="full"}function ee(ue){this.data.characterReferenceType=ue.type}function W(ue){const ge=this.sliceSerialize(ue),Oe=this.data.characterReferenceType;let De;Oe?(De=oR(ge,Oe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):De=w0(ge);const it=this.stack[this.stack.length-1];it.value+=De}function K(ue){const ge=this.stack.pop();ge.position.end=fa(ue.end)}function oe(ue){D.call(this,ue);const ge=this.stack[this.stack.length-1];ge.url=this.sliceSerialize(ue)}function ce(ue){D.call(this,ue);const ge=this.stack[this.stack.length-1];ge.url="mailto:"+this.sliceSerialize(ue)}function me(){return{type:"blockquote",children:[]}}function be(){return{type:"code",lang:null,meta:null,value:""}}function Te(){return{type:"inlineCode",value:""}}function Ve(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function lt(){return{type:"emphasis",children:[]}}function Mt(){return{type:"heading",depth:0,children:[]}}function It(){return{type:"break"}}function st(){return{type:"html",value:""}}function yt(){return{type:"image",title:null,url:"",alt:null}}function Ct(){return{type:"link",title:null,url:"",children:[]}}function lr(ue){return{type:"list",ordered:ue.type==="listOrdered",start:null,spread:ue._spread,children:[]}}function Jt(ue){return{type:"listItem",spread:ue._spread,checked:null,children:[]}}function kt(){return{type:"paragraph",children:[]}}function Yn(){return{type:"strong",children:[]}}function fl(){return{type:"text",value:""}}function hl(){return{type:"thematicBreak"}}}function fa(e){return{line:e.line,column:e.column,offset:e.offset}}function xR(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?xR(e,r):J$(e,r)}}function J$(e,t){let n;for(n in t)if(yR.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 BT(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Mc({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Mc({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Mc({start:t.start,end:t.end})+") is still open")}function eq(e){const t=this;t.parser=n;function n(r){return W$(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function tq(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 nq(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
330
+ `}]}function rq(e,t){const n=t.value?t.value+`
331
+ `:"",r={};t.lang&&(r.className=["language-"+t.lang]);let s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function iq(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function aq(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function sq(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),s=dl(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let l,u=e.footnoteCounts.get(r);u===void 0?(u=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=o+1,u+=1,e.footnoteCounts.set(r,u);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+s,id:n+"fnref-"+s+(u>1?"-"+u:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,d);const h={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,h),e.applyData(t,h)}function oq(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 lq(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function vR(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 s=e.all(t),o=s[0];o&&o.type==="text"?o.value="["+o.value:s.unshift({type:"text",value:"["});const l=s[s.length-1];return l&&l.type==="text"?l.value+=r:s.push({type:"text",value:r}),s}function cq(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return vR(e,t);const s={src:dl(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(s.title=r.title);const o={type:"element",tagName:"img",properties:s,children:[]};return e.patch(t,o),e.applyData(t,o)}function uq(e,t){const n={src:dl(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 dq(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 fq(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return vR(e,t);const s={href:dl(r.url||"")};r.title!==null&&r.title!==void 0&&(s.title=r.title);const o={type:"element",tagName:"a",properties:s,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function hq(e,t){const n={href:dl(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 mq(e,t,n){const r=e.all(t),s=n?pq(n):bR(t),o={},l=[];if(typeof t.checked=="boolean"){const g=r[0];let p;g&&g.type==="element"&&g.tagName==="p"?p=g:(p={type:"element",tagName:"p",properties:{},children:[]},r.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let u=-1;for(;++u<r.length;){const g=r[u];(s||u!==0||g.type!=="element"||g.tagName!=="p")&&l.push({type:"text",value:`
332
+ `}),g.type==="element"&&g.tagName==="p"&&!s?l.push(...g.children):l.push(g)}const d=r[r.length-1];d&&(s||d.type!=="element"||d.tagName!=="p")&&l.push({type:"text",value:`
333
+ `});const h={type:"element",tagName:"li",properties:o,children:l};return e.patch(t,h),e.applyData(t,h)}function pq(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=bR(n[r])}return t}function bR(e){const t=e.spread;return t??e.children.length>1}function gq(e,t){const n={},r=e.all(t);let s=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++s<r.length;){const l=r[s];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function yq(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function xq(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function vq(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function bq(e,t){const n=e.all(t),r=n.shift(),s=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),s.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},u=g0(t.children[1]),d=JA(t.children[t.children.length-1]);u&&d&&(l.position={start:u,end:d}),s.push(l)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(t,o),e.applyData(t,o)}function wq(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,u=l?l.length:t.children.length;let d=-1;const h=[];for(;++d<u;){const p=t.children[d],x={},v=l?l[d]:void 0;v&&(x.align=v);let S={type:"element",tagName:o,properties:x,children:[]};p&&(S.children=e.all(p),e.patch(p,S),S=e.applyData(p,S)),h.push(S)}const g={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,g),e.applyData(t,g)}function Sq(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const VT=9,UT=32;function Cq(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),s=0;const o=[];for(;r;)o.push(HT(t.slice(s,r.index),s>0,!0),r[0]),s=r.index+r[0].length,r=n.exec(t);return o.push(HT(t.slice(s),s>0,!1)),o.join("")}function HT(e,t,n){let r=0,s=e.length;if(t){let o=e.codePointAt(r);for(;o===VT||o===UT;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(s-1);for(;o===VT||o===UT;)s--,o=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function kq(e,t){const n={type:"text",value:Cq(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Tq(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Eq={blockquote:tq,break:nq,code:rq,delete:iq,emphasis:aq,footnoteReference:sq,heading:oq,html:lq,imageReference:cq,image:uq,inlineCode:dq,linkReference:fq,link:hq,listItem:mq,list:gq,paragraph:yq,root:xq,strong:vq,table:bq,tableCell:Sq,tableRow:wq,text:kq,thematicBreak:Tq,toml:Yd,yaml:Yd,definition:Yd,footnoteDefinition:Yd};function Yd(){}const wR=-1,Dh=0,Dc=1,Mf=2,C0=3,k0=4,T0=5,E0=6,SR=7,CR=8,FT=typeof self=="object"?self:globalThis,_q=(e,t)=>{const n=(s,o)=>(e.set(o,s),s),r=s=>{if(e.has(s))return e.get(s);const[o,l]=t[s];switch(o){case Dh:case wR:return n(l,s);case Dc:{const u=n([],s);for(const d of l)u.push(r(d));return u}case Mf:{const u=n({},s);for(const[d,h]of l)u[r(d)]=r(h);return u}case C0:return n(new Date(l),s);case k0:{const{source:u,flags:d}=l;return n(new RegExp(u,d),s)}case T0:{const u=n(new Map,s);for(const[d,h]of l)u.set(r(d),r(h));return u}case E0:{const u=n(new Set,s);for(const d of l)u.add(r(d));return u}case SR:{const{name:u,message:d}=l;return n(new FT[u](d),s)}case CR:return n(BigInt(l),s);case"BigInt":return n(Object(BigInt(l)),s);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:u}=new Uint8Array(l);return n(new DataView(u),l)}}return n(new FT[o](l),s)};return r},$T=e=>_q(new Map,e)(0),So="",{toString:jq}={},{keys:Nq}=Object,gc=e=>{const t=typeof e;if(t!=="object"||!e)return[Dh,t];const n=jq.call(e).slice(8,-1);switch(n){case"Array":return[Dc,So];case"Object":return[Mf,So];case"Date":return[C0,So];case"RegExp":return[k0,So];case"Map":return[T0,So];case"Set":return[E0,So];case"DataView":return[Dc,n]}return n.includes("Array")?[Dc,n]:n.includes("Error")?[SR,n]:[Mf,n]},Zd=([e,t])=>e===Dh&&(t==="function"||t==="symbol"),Aq=(e,t,n,r)=>{const s=(l,u)=>{const d=r.push(l)-1;return n.set(u,d),d},o=l=>{if(n.has(l))return n.get(l);let[u,d]=gc(l);switch(u){case Dh:{let g=l;switch(d){case"bigint":u=CR,g=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);g=null;break;case"undefined":return s([wR],l)}return s([u,g],l)}case Dc:{if(d){let x=l;return d==="DataView"?x=new Uint8Array(l.buffer):d==="ArrayBuffer"&&(x=new Uint8Array(l)),s([d,[...x]],l)}const g=[],p=s([u,g],l);for(const x of l)g.push(o(x));return p}case Mf:{if(d)switch(d){case"BigInt":return s([d,l.toString()],l);case"Boolean":case"Number":case"String":return s([d,l.valueOf()],l)}if(t&&"toJSON"in l)return o(l.toJSON());const g=[],p=s([u,g],l);for(const x of Nq(l))(e||!Zd(gc(l[x])))&&g.push([o(x),o(l[x])]);return p}case C0:return s([u,l.toISOString()],l);case k0:{const{source:g,flags:p}=l;return s([u,{source:g,flags:p}],l)}case T0:{const g=[],p=s([u,g],l);for(const[x,v]of l)(e||!(Zd(gc(x))||Zd(gc(v))))&&g.push([o(x),o(v)]);return p}case E0:{const g=[],p=s([u,g],l);for(const x of l)(e||!Zd(gc(x)))&&g.push(o(x));return p}}const{message:h}=l;return s([u,{name:d,message:h}],l)};return o},qT=(e,{json:t,lossy:n}={})=>{const r=[];return Aq(!(t||n),!!t,new Map,r)(e),r},Of=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?$T(qT(e,t)):structuredClone(e):(e,t)=>$T(qT(e,t));function Rq(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 Mq(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Oq(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Rq,r=e.options.footnoteBackLabel||Mq,s=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},u=[];let d=-1;for(;++d<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[d]);if(!h)continue;const g=e.all(h),p=String(h.identifier).toUpperCase(),x=dl(p.toLowerCase());let v=0;const S=[],C=e.footnoteCounts.get(p);for(;C!==void 0&&++v<=C;){S.length>0&&S.push({type:"text",value:" "});let R=typeof n=="string"?n:n(d,v);typeof R=="string"&&(R={type:"text",value:R}),S.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+x+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,v),className:["data-footnote-backref"]},children:Array.isArray(R)?R:[R]})}const E=g[g.length-1];if(E&&E.type==="element"&&E.tagName==="p"){const R=E.children[E.children.length-1];R&&R.type==="text"?R.value+=" ":E.children.push({type:"text",value:" "}),E.children.push(...S)}else g.push(...S);const T={type:"element",tagName:"li",properties:{id:t+"fn-"+x},children:e.wrap(g,!0)};e.patch(h,T),u.push(T)}if(u.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Of(l),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
334
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(u,!0)},{type:"text",value:`
335
+ `}]}}const Ph=function(e){if(e==null)return Lq;if(typeof e=="function")return zh(e);if(typeof e=="object")return Array.isArray(e)?Dq(e):Pq(e);if(typeof e=="string")return zq(e);throw new Error("Expected function, string, or object as test")};function Dq(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Ph(e[n]);return zh(r);function r(...s){let o=-1;for(;++o<t.length;)if(t[o].apply(this,s))return!0;return!1}}function Pq(e){const t=e;return zh(n);function n(r){const s=r;let o;for(o in e)if(s[o]!==t[o])return!1;return!0}}function zq(e){return zh(t);function t(n){return n&&n.type===e}}function zh(e){return t;function t(n,r,s){return!!(Iq(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function Lq(){return!0}function Iq(e){return e!==null&&typeof e=="object"&&"type"in e}const kR=[],Bq=!0,hx=!1,Vq="skip";function TR(e,t,n,r){let s;typeof t=="function"&&typeof n!="function"?(r=n,n=t):s=t;const o=Ph(s),l=r?-1:1;u(e,void 0,[])();function u(d,h,g){const p=d&&typeof d=="object"?d:{};if(typeof p.type=="string"){const v=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(x,"name",{value:"node ("+(d.type+(v?"<"+v+">":""))+")"})}return x;function x(){let v=kR,S,C,E;if((!t||o(d,h,g[g.length-1]||void 0))&&(v=Uq(n(d,g)),v[0]===hx))return v;if("children"in d&&d.children){const T=d;if(T.children&&v[0]!==Vq)for(C=(r?T.children.length:-1)+l,E=g.concat(T);C>-1&&C<T.children.length;){const R=T.children[C];if(S=u(R,C,E)(),S[0]===hx)return S;C=typeof S[1]=="number"?S[1]:C+l}}return v}}}function Uq(e){return Array.isArray(e)?e:typeof e=="number"?[Bq,e]:e==null?kR:[e]}function _0(e,t,n,r){let s,o,l;typeof t=="function"&&typeof n!="function"?(o=void 0,l=t,s=n):(o=t,l=n,s=r),TR(e,o,u,s);function u(d,h){const g=h[h.length-1],p=g?g.children.indexOf(d):void 0;return l(d,p,g)}}const mx={}.hasOwnProperty,Hq={};function Fq(e,t){const n=t||Hq,r=new Map,s=new Map,o=new Map,l={...Eq,...n.handlers},u={all:h,applyData:qq,definitionById:r,footnoteById:s,footnoteCounts:o,footnoteOrder:[],handlers:l,one:d,options:n,patch:$q,wrap:Yq};return _0(e,function(g){if(g.type==="definition"||g.type==="footnoteDefinition"){const p=g.type==="definition"?r:s,x=String(g.identifier).toUpperCase();p.has(x)||p.set(x,g)}}),u;function d(g,p){const x=g.type,v=u.handlers[x];if(mx.call(u.handlers,x)&&v)return v(u,g,p);if(u.options.passThrough&&u.options.passThrough.includes(x)){if("children"in g){const{children:C,...E}=g,T=Of(E);return T.children=u.all(g),T}return Of(g)}return(u.options.unknownHandler||Gq)(u,g,p)}function h(g){const p=[];if("children"in g){const x=g.children;let v=-1;for(;++v<x.length;){const S=u.one(x[v],g);if(S){if(v&&x[v-1].type==="break"&&(!Array.isArray(S)&&S.type==="text"&&(S.value=GT(S.value)),!Array.isArray(S)&&S.type==="element")){const C=S.children[0];C&&C.type==="text"&&(C.value=GT(C.value))}Array.isArray(S)?p.push(...S):p.push(S)}}}return p}}function $q(e,t){e.position&&(t.position=MH(e))}function qq(e,t){let n=t;if(e&&e.data){const r=e.data.hName,s=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const l="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:l}}n.type==="element"&&o&&Object.assign(n.properties,Of(o)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function Gq(e,t){const n=t.data||{},r="value"in t&&!(mx.call(n,"hProperties")||mx.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 Yq(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
336
+ `});++r<e.length;)r&&n.push({type:"text",value:`
337
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
338
+ `}),n}function GT(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function YT(e,t){const n=Fq(e,t),r=n.one(e,void 0),s=Oq(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&o.children.push({type:"text",value:`
339
+ `},s),o}function Zq(e,t){return e&&"run"in e?async function(n,r){const s=YT(n,{file:r,...t});await e.run(s,r)}:function(n,r){return YT(n,{file:r,...e||t})}}function ZT(e){if(e)throw e}var Fg,XT;function Xq(){if(XT)return Fg;XT=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},o=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var g=e.call(h,"constructor"),p=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!g&&!p)return!1;var x;for(x in h);return typeof x>"u"||e.call(h,x)},l=function(h,g){n&&g.name==="__proto__"?n(h,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):h[g.name]=g.newValue},u=function(h,g){if(g==="__proto__")if(e.call(h,g)){if(r)return r(h,g).value}else return;return h[g]};return Fg=function d(){var h,g,p,x,v,S,C=arguments[0],E=1,T=arguments.length,R=!1;for(typeof C=="boolean"&&(R=C,C=arguments[1]||{},E=2),(C==null||typeof C!="object"&&typeof C!="function")&&(C={});E<T;++E)if(h=arguments[E],h!=null)for(g in h)p=u(C,g),x=u(h,g),C!==x&&(R&&x&&(o(x)||(v=s(x)))?(v?(v=!1,S=p&&s(p)?p:[]):S=p&&o(p)?p:{},l(C,{name:g,newValue:d(R,S,x)})):typeof x<"u"&&l(C,{name:g,newValue:x}));return C},Fg}var Kq=Xq();const $g=Xf(Kq);function px(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 Wq(){const e=[],t={run:n,use:r};return t;function n(...s){let o=-1;const l=s.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);u(null,...s);function u(d,...h){const g=e[++o];let p=-1;if(d){l(d);return}for(;++p<s.length;)(h[p]===null||h[p]===void 0)&&(h[p]=s[p]);s=h,g?Qq(g,u)(...h):l(null,...h)}}function r(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function Qq(e,t){let n;return r;function r(...l){const u=e.length>l.length;let d;u&&l.push(s);try{d=e.apply(this,l)}catch(h){const g=h;if(u&&n)throw g;return s(g)}u||(d&&d.then&&typeof d.then=="function"?d.then(o,s):d instanceof Error?s(d):o(d))}function s(l,...u){n||(n=!0,t(l,...u))}function o(l){s(null,l)}}const Kr={basename:Jq,dirname:eG,extname:tG,join:nG,sep:"/"};function Jq(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');gu(e);let n=0,r=-1,s=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(o){n=s+1;break}}else r<0&&(o=!0,r=s+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,u=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(o){n=s+1;break}}else l<0&&(o=!0,l=s+1),u>-1&&(e.codePointAt(s)===t.codePointAt(u--)?u<0&&(r=s):(u=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function eG(e){if(gu(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 tG(e){gu(e);let t=e.length,n=-1,r=0,s=-1,o=0,l;for(;t--;){const u=e.codePointAt(t);if(u===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),u===46?s<0?s=t:o!==1&&(o=1):s>-1&&(o=-1)}return s<0||n<0||o===0||o===1&&s===n-1&&s===r+1?"":e.slice(s,n)}function nG(...e){let t=-1,n;for(;++t<e.length;)gu(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":rG(n)}function rG(e){gu(e);const t=e.codePointAt(0)===47;let n=iG(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function iG(e,t){let n="",r=0,s=-1,o=0,l=-1,u,d;for(;++l<=e.length;){if(l<e.length)u=e.codePointAt(l);else{if(u===47)break;u=47}if(u===47){if(!(s===l-1||o===1))if(s!==l-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",r=0):(n=n.slice(0,d),r=n.length-1-n.lastIndexOf("/")),s=l,o=0;continue}}else if(n.length>0){n="",r=0,s=l,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(s+1,l):n=e.slice(s+1,l),r=l-s-1;s=l,o=0}else u===46&&o>-1?o++:o=-1}return n}function gu(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const aG={cwd:sG};function sG(){return"/"}function gx(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function oG(e){if(typeof e=="string")e=new URL(e);else if(!gx(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 lG(e)}function lG(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 s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(t)}const qg=["history","path","basename","stem","extname","dirname"];class ER{constructor(t){let n;t?gx(t)?n={path:t}:typeof t=="string"||cG(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":aG.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<qg.length;){const o=qg[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let s;for(s in n)qg.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?Kr.basename(this.path):void 0}set basename(t){Yg(t,"basename"),Gg(t,"basename"),this.path=Kr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Kr.dirname(this.path):void 0}set dirname(t){KT(this.basename,"dirname"),this.path=Kr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Kr.extname(this.path):void 0}set extname(t){if(Gg(t,"extname"),KT(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=Kr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){gx(t)&&(t=oG(t)),Yg(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Kr.basename(this.path,this.extname):void 0}set stem(t){Yg(t,"stem"),Gg(t,"stem"),this.path=Kr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const s=this.message(t,n,r);throw s.fatal=!0,s}info(t,n,r){const s=this.message(t,n,r);return s.fatal=void 0,s}message(t,n,r){const s=new jn(t,n,r);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Gg(e,t){if(e&&e.includes(Kr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Kr.sep+"`")}function Yg(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function KT(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function cG(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const uG=function(e){const r=this.constructor.prototype,s=r[e],o=function(){return s.apply(o,arguments)};return Object.setPrototypeOf(o,r),o},dG={}.hasOwnProperty;class j0 extends uG{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=Wq()}copy(){const t=new j0;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data($g(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Kg("data",this.frozen),this.namespace[t]=n,this):dG.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Kg("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 s=n.call(t,...r);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Xd(t),r=this.parser||this.Parser;return Zg("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Zg("process",this.parser||this.Parser),Xg("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(o,l){const u=Xd(t),d=r.parse(u);r.run(d,u,function(g,p,x){if(g||!p||!x)return h(g);const v=p,S=r.stringify(v,x);mG(S)?x.value=S:x.result=S,h(g,x)});function h(g,p){g||!p?l(g):o?o(p):n(void 0,p)}}}processSync(t){let n=!1,r;return this.freeze(),Zg("processSync",this.parser||this.Parser),Xg("processSync",this.compiler||this.Compiler),this.process(t,s),QT("processSync","process",n),r;function s(o,l){n=!0,ZT(o),r=l}}run(t,n,r){WT(t),this.freeze();const s=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(l,u){const d=Xd(n);s.run(t,d,h);function h(g,p,x){const v=p||t;g?u(g):l?l(v):r(void 0,v,x)}}}runSync(t,n){let r=!1,s;return this.run(t,n,o),QT("runSync","run",r),s;function o(l,u){ZT(l),s=u,r=!0}}stringify(t,n){this.freeze();const r=Xd(n),s=this.compiler||this.Compiler;return Xg("stringify",s),WT(t),s(t,r)}use(t,...n){const r=this.attachers,s=this.namespace;if(Kg("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?u(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(h){if(typeof h=="function")d(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[g,...p]=h;d(g,p)}else l(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function l(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");u(h.plugins),h.settings&&(s.settings=$g(!0,s.settings,h.settings))}function u(h){let g=-1;if(h!=null)if(Array.isArray(h))for(;++g<h.length;){const p=h[g];o(p)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function d(h,g){let p=-1,x=-1;for(;++p<r.length;)if(r[p][0]===h){x=p;break}if(x===-1)r.push([h,...g]);else if(g.length>0){let[v,...S]=g;const C=r[x][1];px(C)&&px(v)&&(v=$g(!0,C,v)),r[x]=[h,v,...S]}}}}const fG=new j0().freeze();function Zg(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Xg(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Kg(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 WT(e){if(!px(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function QT(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Xd(e){return hG(e)?e:new ER(e)}function hG(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function mG(e){return typeof e=="string"||pG(e)}function pG(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const gG="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",JT=[],eE={allowDangerousHtml:!0},yG=/^(https?|ircs?|mailto|xmpp)$/i,xG=[{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 vG(e){const t=bG(e),n=wG(e);return SG(t.runSync(t.parse(n),n),e)}function bG(e){const t=e.rehypePlugins||JT,n=e.remarkPlugins||JT,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...eE}:eE;return fG().use(eq).use(n).use(Zq,r).use(t)}function wG(e){const t=e.children||"",n=new ER;return typeof t=="string"&&(n.value=t),n}function SG(e,t){const n=t.allowedElements,r=t.allowElement,s=t.components,o=t.disallowedElements,l=t.skipHtml,u=t.unwrapDisallowed,d=t.urlTransform||CG;for(const g of xG)Object.hasOwn(t,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+gG+g.id,void 0);return _0(e,h),LH(e,{Fragment:m.Fragment,components:s,ignoreInvalidStyle:!0,jsx:m.jsx,jsxs:m.jsxs,passKeys:!0,passNode:!0});function h(g,p,x){if(g.type==="raw"&&x&&typeof p=="number")return l?x.children.splice(p,1):x.children[p]={type:"text",value:g.value},p;if(g.type==="element"){let v;for(v in Vg)if(Object.hasOwn(Vg,v)&&Object.hasOwn(g.properties,v)){const S=g.properties[v],C=Vg[v];(C===null||C.includes(g.tagName))&&(g.properties[v]=d(String(S||""),v,g))}}if(g.type==="element"){let v=n?!n.includes(g.tagName):o?o.includes(g.tagName):!1;if(!v&&r&&typeof p=="number"&&(v=!r(g,p,x)),v&&x&&typeof p=="number")return u&&g.children?x.children.splice(p,1,...g.children):x.children.splice(p,1),p}}}function CG(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),s=e.indexOf("/");return t===-1||s!==-1&&t>s||n!==-1&&t>n||r!==-1&&t>r||yG.test(e.slice(0,t))?e:""}function tE(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,s=n.indexOf(t);for(;s!==-1;)r++,s=n.indexOf(t,s+t.length);return r}function kG(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function TG(e,t,n){const s=Ph((n||{}).ignore||[]),o=EG(t);let l=-1;for(;++l<o.length;)TR(e,"text",u);function u(h,g){let p=-1,x;for(;++p<g.length;){const v=g[p],S=x?x.children:void 0;if(s(v,S?S.indexOf(v):void 0,x))return;x=v}if(x)return d(h,g)}function d(h,g){const p=g[g.length-1],x=o[l][0],v=o[l][1];let S=0;const E=p.children.indexOf(h);let T=!1,R=[];x.lastIndex=0;let O=x.exec(h.value);for(;O;){const A=O.index,M={index:O.index,input:O.input,stack:[...g,h]};let N=v(...O,M);if(typeof N=="string"&&(N=N.length>0?{type:"text",value:N}:void 0),N===!1?x.lastIndex=A+1:(S!==A&&R.push({type:"text",value:h.value.slice(S,A)}),Array.isArray(N)?R.push(...N):N&&R.push(N),S=A+O[0].length,T=!0),!x.global)break;O=x.exec(h.value)}return T?(S<h.value.length&&R.push({type:"text",value:h.value.slice(S)}),p.children.splice(E,1,...R)):R=[h],E+R.length}}function EG(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 s=n[r];t.push([_G(s[0]),jG(s[1])])}return t}function _G(e){return typeof e=="string"?new RegExp(kG(e),"g"):e}function jG(e){return typeof e=="function"?e:function(){return e}}const Wg="phrasing",Qg=["autolink","link","image","label"];function NG(){return{transforms:[zG],enter:{literalAutolink:RG,literalAutolinkEmail:Jg,literalAutolinkHttp:Jg,literalAutolinkWww:Jg},exit:{literalAutolink:PG,literalAutolinkEmail:DG,literalAutolinkHttp:MG,literalAutolinkWww:OG}}}function AG(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Wg,notInConstruct:Qg},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Wg,notInConstruct:Qg},{character:":",before:"[ps]",after:"\\/",inConstruct:Wg,notInConstruct:Qg}]}}function RG(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Jg(e){this.config.enter.autolinkProtocol.call(this,e)}function MG(e){this.config.exit.autolinkProtocol.call(this,e)}function OG(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 DG(e){this.config.exit.autolinkEmail.call(this,e)}function PG(e){this.exit(e)}function zG(e){TG(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,LG],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),IG]],{ignore:["link","linkReference"]})}function LG(e,t,n,r,s){let o="";if(!_R(s)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!BG(n)))return!1;const l=VG(n+r);if(!l[0])return!1;const u={type:"link",title:null,url:o+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[u,{type:"text",value:l[1]}]:u}function IG(e,t,n,r){return!_R(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function BG(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 VG(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 s=tE(e,"(");let o=tE(e,")");for(;r!==-1&&s>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function _R(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||ws(n)||Mh(n))&&(!t||n!==47)}jR.peek=XG;function UG(){this.buffer()}function HG(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function FG(){this.buffer()}function $G(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function qG(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Br(this.sliceSerialize(e)).toLowerCase(),n.label=t}function GG(e){this.exit(e)}function YG(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Br(this.sliceSerialize(e)).toLowerCase(),n.label=t}function ZG(e){this.exit(e)}function XG(){return"["}function jR(e,t,n,r){const s=n.createTracker(r);let o=s.move("[^");const l=n.enter("footnoteReference"),u=n.enter("reference");return o+=s.move(n.safe(n.associationId(e),{after:"]",before:o})),u(),l(),o+=s.move("]"),o}function KG(){return{enter:{gfmFootnoteCallString:UG,gfmFootnoteCall:HG,gfmFootnoteDefinitionLabelString:FG,gfmFootnoteDefinition:$G},exit:{gfmFootnoteCallString:qG,gfmFootnoteCall:GG,gfmFootnoteDefinitionLabelString:YG,gfmFootnoteDefinition:ZG}}}function WG(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:jR},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,s,o,l){const u=o.createTracker(l);let d=u.move("[^");const h=o.enter("footnoteDefinition"),g=o.enter("label");return d+=u.move(o.safe(o.associationId(r),{before:d,after:"]"})),g(),d+=u.move("]:"),r.children&&r.children.length>0&&(u.shift(4),d+=u.move((t?`
340
+ `:" ")+o.indentLines(o.containerFlow(r,u.current()),t?NR:QG))),h(),d}}function QG(e,t,n){return t===0?e:NR(e,t,n)}function NR(e,t,n){return(n?"":" ")+e}const JG=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];AR.peek=iY;function eY(){return{canContainEols:["delete"],enter:{strikethrough:nY},exit:{strikethrough:rY}}}function tY(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:JG}],handlers:{delete:AR}}}function nY(e){this.enter({type:"delete",children:[]},e)}function rY(e){this.exit(e)}function AR(e,t,n,r){const s=n.createTracker(r),o=n.enter("strikethrough");let l=s.move("~~");return l+=n.containerPhrasing(e,{...s.current(),before:l,after:"~"}),l+=s.move("~~"),o(),l}function iY(){return"~"}function aY(e){return e.length}function sY(e,t){const n=t||{},r=(n.align||[]).concat(),s=n.stringLength||aY,o=[],l=[],u=[],d=[];let h=0,g=-1;for(;++g<e.length;){const C=[],E=[];let T=-1;for(e[g].length>h&&(h=e[g].length);++T<e[g].length;){const R=oY(e[g][T]);if(n.alignDelimiters!==!1){const O=s(R);E[T]=O,(d[T]===void 0||O>d[T])&&(d[T]=O)}C.push(R)}l[g]=C,u[g]=E}let p=-1;if(typeof r=="object"&&"length"in r)for(;++p<h;)o[p]=nE(r[p]);else{const C=nE(r);for(;++p<h;)o[p]=C}p=-1;const x=[],v=[];for(;++p<h;){const C=o[p];let E="",T="";C===99?(E=":",T=":"):C===108?E=":":C===114&&(T=":");let R=n.alignDelimiters===!1?1:Math.max(1,d[p]-E.length-T.length);const O=E+"-".repeat(R)+T;n.alignDelimiters!==!1&&(R=E.length+R+T.length,R>d[p]&&(d[p]=R),v[p]=R),x[p]=O}l.splice(1,0,x),u.splice(1,0,v),g=-1;const S=[];for(;++g<l.length;){const C=l[g],E=u[g];p=-1;const T=[];for(;++p<h;){const R=C[p]||"";let O="",A="";if(n.alignDelimiters!==!1){const M=d[p]-(E[p]||0),N=o[p];N===114?O=" ".repeat(M):N===99?M%2?(O=" ".repeat(M/2+.5),A=" ".repeat(M/2-.5)):(O=" ".repeat(M/2),A=O):A=" ".repeat(M)}n.delimiterStart!==!1&&!p&&T.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&R==="")&&(n.delimiterStart!==!1||p)&&T.push(" "),n.alignDelimiters!==!1&&T.push(O),T.push(R),n.alignDelimiters!==!1&&T.push(A),n.padding!==!1&&T.push(" "),(n.delimiterEnd!==!1||p!==h-1)&&T.push("|")}S.push(n.delimiterEnd===!1?T.join("").replace(/ +$/,""):T.join(""))}return S.join(`
341
+ `)}function oY(e){return e==null?"":String(e)}function nE(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 lY(e,t,n,r){const s=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const l=n.indentLines(n.containerFlow(e,o.current()),cY);return s(),l}function cY(e,t,n){return">"+(n?"":" ")+e}function uY(e,t){return rE(e,t.inConstruct,!0)&&!rE(e,t.notInConstruct,!1)}function rE(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 iE(e,t,n,r){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
342
+ `&&uY(n.stack,n.unsafe[s]))return/[ \t]/.test(r.before)?"":" ";return`\\
343
+ `}function dY(e,t){const n=String(e);let r=n.indexOf(t),s=r,o=0,l=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===s?++o>l&&(l=o):o=1,s=r+t.length,r=n.indexOf(t,s);return l}function fY(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 hY(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 mY(e,t,n,r){const s=hY(n),o=e.value||"",l=s==="`"?"GraveAccent":"Tilde";if(fY(e,n)){const p=n.enter("codeIndented"),x=n.indentLines(o,pY);return p(),x}const u=n.createTracker(r),d=s.repeat(Math.max(dY(o,s)+1,3)),h=n.enter("codeFenced");let g=u.move(d);if(e.lang){const p=n.enter(`codeFencedLang${l}`);g+=u.move(n.safe(e.lang,{before:g,after:" ",encode:["`"],...u.current()})),p()}if(e.lang&&e.meta){const p=n.enter(`codeFencedMeta${l}`);g+=u.move(" "),g+=u.move(n.safe(e.meta,{before:g,after:`
344
+ `,encode:["`"],...u.current()})),p()}return g+=u.move(`
345
+ `),o&&(g+=u.move(o+`
346
+ `)),g+=u.move(d),h(),g}function pY(e,t,n){return(n?"":" ")+e}function N0(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 gY(e,t,n,r){const s=N0(n),o=s==='"'?"Quote":"Apostrophe",l=n.enter("definition");let u=n.enter("label");const d=n.createTracker(r);let h=d.move("[");return h+=d.move(n.safe(n.associationId(e),{before:h,after:"]",...d.current()})),h+=d.move("]: "),u(),!e.url||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),h+=d.move("<"),h+=d.move(n.safe(e.url,{before:h,after:">",...d.current()})),h+=d.move(">")):(u=n.enter("destinationRaw"),h+=d.move(n.safe(e.url,{before:h,after:e.title?" ":`
347
+ `,...d.current()}))),u(),e.title&&(u=n.enter(`title${o}`),h+=d.move(" "+s),h+=d.move(n.safe(e.title,{before:h,after:s,...d.current()})),h+=d.move(s),u()),l(),h}function yY(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 Wc(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Df(e,t,n){const r=Zo(e),s=Zo(t);return r===void 0?s===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}RR.peek=xY;function RR(e,t,n,r){const s=yY(n),o=n.enter("emphasis"),l=n.createTracker(r),u=l.move(s);let d=l.move(n.containerPhrasing(e,{after:s,before:u,...l.current()}));const h=d.charCodeAt(0),g=Df(r.before.charCodeAt(r.before.length-1),h,s);g.inside&&(d=Wc(h)+d.slice(1));const p=d.charCodeAt(d.length-1),x=Df(r.after.charCodeAt(0),p,s);x.inside&&(d=d.slice(0,-1)+Wc(p));const v=l.move(s);return o(),n.attentionEncodeSurroundingInfo={after:x.outside,before:g.outside},u+d+v}function xY(e,t,n){return n.options.emphasis||"*"}function vY(e,t){let n=!1;return _0(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,hx}),!!((!e.depth||e.depth<3)&&b0(e)&&(t.options.setext||n))}function bY(e,t,n,r){const s=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(vY(e,n)){const g=n.enter("headingSetext"),p=n.enter("phrasing"),x=n.containerPhrasing(e,{...o.current(),before:`
348
+ `,after:`
349
+ `});return p(),g(),x+`
350
+ `+(s===1?"=":"-").repeat(x.length-(Math.max(x.lastIndexOf("\r"),x.lastIndexOf(`
351
+ `))+1))}const l="#".repeat(s),u=n.enter("headingAtx"),d=n.enter("phrasing");o.move(l+" ");let h=n.containerPhrasing(e,{before:"# ",after:`
352
+ `,...o.current()});return/^[\t ]/.test(h)&&(h=Wc(h.charCodeAt(0))+h.slice(1)),h=h?l+" "+h:l,n.options.closeAtx&&(h+=" "+l),d(),u(),h}MR.peek=wY;function MR(e){return e.value||""}function wY(){return"<"}OR.peek=SY;function OR(e,t,n,r){const s=N0(n),o=s==='"'?"Quote":"Apostrophe",l=n.enter("image");let u=n.enter("label");const d=n.createTracker(r);let h=d.move("![");return h+=d.move(n.safe(e.alt,{before:h,after:"]",...d.current()})),h+=d.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),h+=d.move("<"),h+=d.move(n.safe(e.url,{before:h,after:">",...d.current()})),h+=d.move(">")):(u=n.enter("destinationRaw"),h+=d.move(n.safe(e.url,{before:h,after:e.title?" ":")",...d.current()}))),u(),e.title&&(u=n.enter(`title${o}`),h+=d.move(" "+s),h+=d.move(n.safe(e.title,{before:h,after:s,...d.current()})),h+=d.move(s),u()),h+=d.move(")"),l(),h}function SY(){return"!"}DR.peek=CY;function DR(e,t,n,r){const s=e.referenceType,o=n.enter("imageReference");let l=n.enter("label");const u=n.createTracker(r);let d=u.move("![");const h=n.safe(e.alt,{before:d,after:"]",...u.current()});d+=u.move(h+"]["),l();const g=n.stack;n.stack=[],l=n.enter("reference");const p=n.safe(n.associationId(e),{before:d,after:"]",...u.current()});return l(),n.stack=g,o(),s==="full"||!h||h!==p?d+=u.move(p+"]"):s==="shortcut"?d=d.slice(0,-1):d+=u.move("]"),d}function CY(){return"!"}PR.peek=kY;function PR(e,t,n){let r=e.value||"",s="`",o=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(r);)s+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const l=n.unsafe[o],u=n.compilePattern(l);let d;if(l.atBreak)for(;d=u.exec(r);){let h=d.index;r.charCodeAt(h)===10&&r.charCodeAt(h-1)===13&&h--,r=r.slice(0,h)+" "+r.slice(d.index+1)}}return s+r+s}function kY(){return"`"}function zR(e,t){const n=b0(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))}LR.peek=TY;function LR(e,t,n,r){const s=N0(n),o=s==='"'?"Quote":"Apostrophe",l=n.createTracker(r);let u,d;if(zR(e,n)){const g=n.stack;n.stack=[],u=n.enter("autolink");let p=l.move("<");return p+=l.move(n.containerPhrasing(e,{before:p,after:">",...l.current()})),p+=l.move(">"),u(),n.stack=g,p}u=n.enter("link"),d=n.enter("label");let h=l.move("[");return h+=l.move(n.containerPhrasing(e,{before:h,after:"](",...l.current()})),h+=l.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),h+=l.move("<"),h+=l.move(n.safe(e.url,{before:h,after:">",...l.current()})),h+=l.move(">")):(d=n.enter("destinationRaw"),h+=l.move(n.safe(e.url,{before:h,after:e.title?" ":")",...l.current()}))),d(),e.title&&(d=n.enter(`title${o}`),h+=l.move(" "+s),h+=l.move(n.safe(e.title,{before:h,after:s,...l.current()})),h+=l.move(s),d()),h+=l.move(")"),u(),h}function TY(e,t,n){return zR(e,n)?"<":"["}IR.peek=EY;function IR(e,t,n,r){const s=e.referenceType,o=n.enter("linkReference");let l=n.enter("label");const u=n.createTracker(r);let d=u.move("[");const h=n.containerPhrasing(e,{before:d,after:"]",...u.current()});d+=u.move(h+"]["),l();const g=n.stack;n.stack=[],l=n.enter("reference");const p=n.safe(n.associationId(e),{before:d,after:"]",...u.current()});return l(),n.stack=g,o(),s==="full"||!h||h!==p?d+=u.move(p+"]"):s==="shortcut"?d=d.slice(0,-1):d+=u.move("]"),d}function EY(){return"["}function A0(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 _Y(e){const t=A0(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 jY(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 BR(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 NY(e,t,n,r){const s=n.enter("list"),o=n.bulletCurrent;let l=e.ordered?jY(n):A0(n);const u=e.ordered?l==="."?")":".":_Y(n);let d=t&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!e.ordered){const g=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&g&&(!g.children||!g.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&&(d=!0),BR(n)===l&&g){let p=-1;for(;++p<e.children.length;){const x=e.children[p];if(x&&x.type==="listItem"&&x.children&&x.children[0]&&x.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(l=u),n.bulletCurrent=l;const h=n.containerFlow(e,r);return n.bulletLastUsed=l,n.bulletCurrent=o,s(),h}function AY(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 RY(e,t,n,r){const s=AY(n);let o=n.bulletCurrent||A0(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let l=o.length+1;(s==="tab"||s==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const u=n.createTracker(r);u.move(o+" ".repeat(l-o.length)),u.shift(l);const d=n.enter("listItem"),h=n.indentLines(n.containerFlow(e,u.current()),g);return d(),h;function g(p,x,v){return x?(v?"":" ".repeat(l))+p:(v?o:o+" ".repeat(l-o.length))+p}}function MY(e,t,n,r){const s=n.enter("paragraph"),o=n.enter("phrasing"),l=n.containerPhrasing(e,r);return o(),s(),l}const OY=Ph(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function DY(e,t,n,r){return(e.children.some(function(l){return OY(l)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function PY(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}VR.peek=zY;function VR(e,t,n,r){const s=PY(n),o=n.enter("strong"),l=n.createTracker(r),u=l.move(s+s);let d=l.move(n.containerPhrasing(e,{after:s,before:u,...l.current()}));const h=d.charCodeAt(0),g=Df(r.before.charCodeAt(r.before.length-1),h,s);g.inside&&(d=Wc(h)+d.slice(1));const p=d.charCodeAt(d.length-1),x=Df(r.after.charCodeAt(0),p,s);x.inside&&(d=d.slice(0,-1)+Wc(p));const v=l.move(s+s);return o(),n.attentionEncodeSurroundingInfo={after:x.outside,before:g.outside},u+d+v}function zY(e,t,n){return n.options.strong||"*"}function LY(e,t,n,r){return n.safe(e.value,r)}function IY(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 BY(e,t,n){const r=(BR(n)+(n.options.ruleSpaces?" ":"")).repeat(IY(n));return n.options.ruleSpaces?r.slice(0,-1):r}const UR={blockquote:lY,break:iE,code:mY,definition:gY,emphasis:RR,hardBreak:iE,heading:bY,html:MR,image:OR,imageReference:DR,inlineCode:PR,link:LR,linkReference:IR,list:NY,listItem:RY,paragraph:MY,root:DY,strong:VR,text:LY,thematicBreak:BY};function VY(){return{enter:{table:UY,tableData:aE,tableHeader:aE,tableRow:FY},exit:{codeText:$Y,table:HY,tableData:ey,tableHeader:ey,tableRow:ey}}}function UY(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 HY(e){this.exit(e),this.data.inTable=void 0}function FY(e){this.enter({type:"tableRow",children:[]},e)}function ey(e){this.exit(e)}function aE(e){this.enter({type:"tableCell",children:[]},e)}function $Y(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,qY));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function qY(e,t){return t==="|"?t:e}function GY(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,s=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
353
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:x,table:l,tableCell:d,tableRow:u}};function l(v,S,C,E){return h(g(v,C,E),v.align)}function u(v,S,C,E){const T=p(v,C,E),R=h([T]);return R.slice(0,R.indexOf(`
354
+ `))}function d(v,S,C,E){const T=C.enter("tableCell"),R=C.enter("phrasing"),O=C.containerPhrasing(v,{...E,before:o,after:o});return R(),T(),O}function h(v,S){return sY(v,{align:S,alignDelimiters:r,padding:n,stringLength:s})}function g(v,S,C){const E=v.children;let T=-1;const R=[],O=S.enter("table");for(;++T<E.length;)R[T]=p(E[T],S,C);return O(),R}function p(v,S,C){const E=v.children;let T=-1;const R=[],O=S.enter("tableRow");for(;++T<E.length;)R[T]=d(E[T],v,S,C);return O(),R}function x(v,S,C){let E=UR.inlineCode(v,S,C);return C.stack.includes("tableCell")&&(E=E.replace(/\|/g,"\\$&")),E}}function YY(){return{exit:{taskListCheckValueChecked:sE,taskListCheckValueUnchecked:sE,paragraph:XY}}}function ZY(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:KY}}}function sE(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function XY(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 s=t.children;let o=-1,l;for(;++o<s.length;){const u=s[o];if(u.type==="paragraph"){l=u;break}}l===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 KY(e,t,n,r){const s=e.children[0],o=typeof e.checked=="boolean"&&s&&s.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",u=n.createTracker(r);o&&u.move(l);let d=UR.listItem(e,t,n,{...r,...u.current()});return o&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),d;function h(g){return g+l}}function WY(){return[NG(),KG(),eY(),VY(),YY()]}function QY(e){return{extensions:[AG(),WG(e),tY(),GY(e),ZY()]}}const JY={tokenize:aZ,partial:!0},HR={tokenize:sZ,partial:!0},FR={tokenize:oZ,partial:!0},$R={tokenize:lZ,partial:!0},eZ={tokenize:cZ,partial:!0},qR={name:"wwwAutolink",tokenize:rZ,previous:YR},GR={name:"protocolAutolink",tokenize:iZ,previous:ZR},Vi={name:"emailAutolink",tokenize:nZ,previous:XR},ci={};function tZ(){return{text:ci}}let is=48;for(;is<123;)ci[is]=Vi,is++,is===58?is=65:is===91&&(is=97);ci[43]=Vi;ci[45]=Vi;ci[46]=Vi;ci[95]=Vi;ci[72]=[Vi,GR];ci[104]=[Vi,GR];ci[87]=[Vi,qR];ci[119]=[Vi,qR];function nZ(e,t,n){const r=this;let s,o;return l;function l(p){return!yx(p)||!XR.call(r,r.previous)||R0(r.events)?n(p):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),u(p))}function u(p){return yx(p)?(e.consume(p),u):p===64?(e.consume(p),d):n(p)}function d(p){return p===46?e.check(eZ,g,h)(p):p===45||p===95||_n(p)?(o=!0,e.consume(p),d):g(p)}function h(p){return e.consume(p),s=!0,d}function g(p){return o&&s&&Rn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(p)):n(p)}}function rZ(e,t,n){const r=this;return s;function s(l){return l!==87&&l!==119||!YR.call(r,r.previous)||R0(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(JY,e.attempt(HR,e.attempt(FR,o),n),n)(l))}function o(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function iZ(e,t,n){const r=this;let s="",o=!1;return l;function l(p){return(p===72||p===104)&&ZR.call(r,r.previous)&&!R0(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(p),e.consume(p),u):n(p)}function u(p){if(Rn(p)&&s.length<5)return s+=String.fromCodePoint(p),e.consume(p),u;if(p===58){const x=s.toLowerCase();if(x==="http"||x==="https")return e.consume(p),d}return n(p)}function d(p){return p===47?(e.consume(p),o?h:(o=!0,d)):n(p)}function h(p){return p===null||Rf(p)||St(p)||ws(p)||Mh(p)?n(p):e.attempt(HR,e.attempt(FR,g),n)(p)}function g(p){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(p)}}function aZ(e,t,n){let r=0;return s;function s(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),s):l===46&&r===3?(e.consume(l),o):n(l)}function o(l){return l===null?n(l):t(l)}}function sZ(e,t,n){let r,s,o;return l;function l(h){return h===46||h===95?e.check($R,d,u)(h):h===null||St(h)||ws(h)||h!==45&&Mh(h)?d(h):(o=!0,e.consume(h),l)}function u(h){return h===95?r=!0:(s=r,r=void 0),e.consume(h),l}function d(h){return s||r||!o?n(h):t(h)}}function oZ(e,t){let n=0,r=0;return s;function s(l){return l===40?(n++,e.consume(l),s):l===41&&r<n?o(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check($R,t,o)(l):l===null||St(l)||ws(l)?t(l):(e.consume(l),s)}function o(l){return l===41&&r++,e.consume(l),s}}function lZ(e,t,n){return r;function r(u){return u===33||u===34||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===63||u===95||u===126?(e.consume(u),r):u===38?(e.consume(u),o):u===93?(e.consume(u),s):u===60||u===null||St(u)||ws(u)?t(u):n(u)}function s(u){return u===null||u===40||u===91||St(u)||ws(u)?t(u):r(u)}function o(u){return Rn(u)?l(u):n(u)}function l(u){return u===59?(e.consume(u),r):Rn(u)?(e.consume(u),l):n(u)}}function cZ(e,t,n){return r;function r(o){return e.consume(o),s}function s(o){return _n(o)?n(o):t(o)}}function YR(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||St(e)}function ZR(e){return!Rn(e)}function XR(e){return!(e===47||yx(e))}function yx(e){return e===43||e===45||e===46||e===95||_n(e)}function R0(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 uZ={tokenize:xZ,partial:!0};function dZ(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:pZ,continuation:{tokenize:gZ},exit:yZ}},text:{91:{name:"gfmFootnoteCall",tokenize:mZ},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:fZ,resolveTo:hZ}}}}function fZ(e,t,n){const r=this;let s=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;s--;){const d=r.events[s][1];if(d.type==="labelImage"){l=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return u;function u(d){if(!l||!l._balanced)return n(d);const h=Br(r.sliceSerialize({start:l.end,end:r.now()}));return h.codePointAt(0)!==94||!o.includes(h.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function hZ(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)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},u=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",s,t],["exit",s,t],["enter",o,t],["enter",l,t],["exit",l,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...u),e}function mZ(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,l;return u;function u(p){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),d}function d(p){return p!==94?n(p):(e.enter("gfmFootnoteCallMarker"),e.consume(p),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(p){if(o>999||p===93&&!l||p===null||p===91||St(p))return n(p);if(p===93){e.exit("chunkString");const x=e.exit("gfmFootnoteCallString");return s.includes(Br(r.sliceSerialize(x)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(p)}return St(p)||(l=!0),o++,e.consume(p),p===92?g:h}function g(p){return p===91||p===92||p===93?(e.consume(p),o++,h):h(p)}}function pZ(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,l=0,u;return d;function d(S){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(S){return S===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",g):n(S)}function g(S){if(l>999||S===93&&!u||S===null||S===91||St(S))return n(S);if(S===93){e.exit("chunkString");const C=e.exit("gfmFootnoteDefinitionLabelString");return o=Br(r.sliceSerialize(C)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),x}return St(S)||(u=!0),l++,e.consume(S),S===92?p:g}function p(S){return S===91||S===92||S===93?(e.consume(S),l++,g):g(S)}function x(S){return S===58?(e.enter("definitionMarker"),e.consume(S),e.exit("definitionMarker"),s.includes(o)||s.push(o),ut(e,v,"gfmFootnoteDefinitionWhitespace")):n(S)}function v(S){return t(S)}}function gZ(e,t,n){return e.check(pu,t,e.attempt(uZ,t,n))}function yZ(e){e.exit("gfmFootnoteDefinition")}function xZ(e,t,n){const r=this;return ut(e,s,"gfmFootnoteDefinitionIndent",5);function s(o){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(o):n(o)}}function vZ(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:s};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function s(l,u){let d=-1;for(;++d<l.length;)if(l[d][0]==="enter"&&l[d][1].type==="strikethroughSequenceTemporary"&&l[d][1]._close){let h=d;for(;h--;)if(l[h][0]==="exit"&&l[h][1].type==="strikethroughSequenceTemporary"&&l[h][1]._open&&l[d][1].end.offset-l[d][1].start.offset===l[h][1].end.offset-l[h][1].start.offset){l[d][1].type="strikethroughSequence",l[h][1].type="strikethroughSequence";const g={type:"strikethrough",start:Object.assign({},l[h][1].start),end:Object.assign({},l[d][1].end)},p={type:"strikethroughText",start:Object.assign({},l[h][1].end),end:Object.assign({},l[d][1].start)},x=[["enter",g,u],["enter",l[h][1],u],["exit",l[h][1],u],["enter",p,u]],v=u.parser.constructs.insideSpan.null;v&&or(x,x.length,0,Oh(v,l.slice(h+1,d),u)),or(x,x.length,0,[["exit",p,u],["enter",l[d][1],u],["exit",l[d][1],u],["exit",g,u]]),or(l,h-1,d-h+3,x),d=h+x.length-2;break}}for(d=-1;++d<l.length;)l[d][1].type==="strikethroughSequenceTemporary"&&(l[d][1].type="data");return l}function o(l,u,d){const h=this.previous,g=this.events;let p=0;return x;function x(S){return h===126&&g[g.length-1][1].type!=="characterEscape"?d(S):(l.enter("strikethroughSequenceTemporary"),v(S))}function v(S){const C=Zo(h);if(S===126)return p>1?d(S):(l.consume(S),p++,v);if(p<2&&!n)return d(S);const E=l.exit("strikethroughSequenceTemporary"),T=Zo(S);return E._open=!T||T===2&&!!C,E._close=!C||C===2&&!!T,u(S)}}}class bZ{constructor(){this.map=[]}add(t,n,r){wZ(this,t,n,r)}consume(t){if(this.map.sort(function(o,l){return o[0]-l[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 s=r.pop();for(;s;){for(const o of s)t.push(o);s=r.pop()}this.map.length=0}}function wZ(e,t,n,r){let s=0;if(!(n===0&&r.length===0)){for(;s<e.map.length;){if(e.map[s][0]===t){e.map[s][1]+=n,e.map[s][2].push(...r);return}s+=1}e.map.push([t,n,r])}}function SZ(e,t){let n=!1;const r=[];for(;t<e.length;){const s=e[t];if(n){if(s[0]==="enter")s[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function CZ(){return{flow:{null:{name:"table",tokenize:kZ,resolveAll:TZ}}}}function kZ(e,t,n){const r=this;let s=0,o=0,l;return u;function u(D){let H=r.events.length-1;for(;H>-1;){const Y=r.events[H][1].type;if(Y==="lineEnding"||Y==="linePrefix")H--;else break}const $=H>-1?r.events[H][1].type:null,X=$==="tableHead"||$==="tableRow"?N:d;return X===N&&r.parser.lazy[r.now().line]?n(D):X(D)}function d(D){return e.enter("tableHead"),e.enter("tableRow"),h(D)}function h(D){return D===124||(l=!0,o+=1),g(D)}function g(D){return D===null?n(D):Pe(D)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),v):n(D):rt(D)?ut(e,g,"whitespace")(D):(o+=1,l&&(l=!1,s+=1),D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),l=!0,g):(e.enter("data"),p(D)))}function p(D){return D===null||D===124||St(D)?(e.exit("data"),g(D)):(e.consume(D),D===92?x:p)}function x(D){return D===92||D===124?(e.consume(D),p):p(D)}function v(D){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(D):(e.enter("tableDelimiterRow"),l=!1,rt(D)?ut(e,S,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):S(D))}function S(D){return D===45||D===58?E(D):D===124?(l=!0,e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),C):M(D)}function C(D){return rt(D)?ut(e,E,"whitespace")(D):E(D)}function E(D){return D===58?(o+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),T):D===45?(o+=1,T(D)):D===null||Pe(D)?A(D):M(D)}function T(D){return D===45?(e.enter("tableDelimiterFiller"),R(D)):M(D)}function R(D){return D===45?(e.consume(D),R):D===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),O):(e.exit("tableDelimiterFiller"),O(D))}function O(D){return rt(D)?ut(e,A,"whitespace")(D):A(D)}function A(D){return D===124?S(D):D===null||Pe(D)?!l||s!==o?M(D):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(D)):M(D)}function M(D){return n(D)}function N(D){return e.enter("tableRow"),z(D)}function z(D){return D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),z):D===null||Pe(D)?(e.exit("tableRow"),t(D)):rt(D)?ut(e,z,"whitespace")(D):(e.enter("data"),P(D))}function P(D){return D===null||D===124||St(D)?(e.exit("data"),z(D)):(e.consume(D),D===92?B:P)}function B(D){return D===92||D===124?(e.consume(D),P):P(D)}}function TZ(e,t){let n=-1,r=!0,s=0,o=[0,0,0,0],l=[0,0,0,0],u=!1,d=0,h,g,p;const x=new bZ;for(;++n<e.length;){const v=e[n],S=v[1];v[0]==="enter"?S.type==="tableHead"?(u=!1,d!==0&&(oE(x,t,d,h,g),g=void 0,d=0),h={type:"table",start:Object.assign({},S.start),end:Object.assign({},S.end)},x.add(n,0,[["enter",h,t]])):S.type==="tableRow"||S.type==="tableDelimiterRow"?(r=!0,p=void 0,o=[0,0,0,0],l=[0,n+1,0,0],u&&(u=!1,g={type:"tableBody",start:Object.assign({},S.start),end:Object.assign({},S.end)},x.add(n,0,[["enter",g,t]])),s=S.type==="tableDelimiterRow"?2:g?3:1):s&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(o[1]!==0&&(l[0]=l[1],p=Kd(x,t,o,s,void 0,p),o=[0,0,0,0]),l[2]=n)):S.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(l[0]=l[1],p=Kd(x,t,o,s,void 0,p)),o=l,l=[o[1],n,0,0])):S.type==="tableHead"?(u=!0,d=n):S.type==="tableRow"||S.type==="tableDelimiterRow"?(d=n,o[1]!==0?(l[0]=l[1],p=Kd(x,t,o,s,n,p)):l[1]!==0&&(p=Kd(x,t,l,s,n,p)),s=0):s&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")&&(l[3]=n)}for(d!==0&&oE(x,t,d,h,g),x.consume(t.events),n=-1;++n<t.events.length;){const v=t.events[n];v[0]==="enter"&&v[1].type==="table"&&(v[1]._align=SZ(t.events,n))}return e}function Kd(e,t,n,r,s,o){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",u="tableContent";n[0]!==0&&(o.end=Object.assign({},To(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const d=To(t.events,n[1]);if(o={type:l,start:Object.assign({},d),end:Object.assign({},d)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const h=To(t.events,n[2]),g=To(t.events,n[3]),p={type:u,start:Object.assign({},h),end:Object.assign({},g)};if(e.add(n[2],0,[["enter",p,t]]),r!==2){const x=t.events[n[2]],v=t.events[n[3]];if(x[1].end=Object.assign({},v[1].end),x[1].type="chunkText",x[1].contentType="text",n[3]>n[2]+1){const S=n[2]+1,C=n[3]-n[2]-1;e.add(S,C,[])}}e.add(n[3]+1,0,[["exit",p,t]])}return s!==void 0&&(o.end=Object.assign({},To(t.events,s)),e.add(s,0,[["exit",o,t]]),o=void 0),o}function oE(e,t,n,r,s){const o=[],l=To(t.events,n);s&&(s.end=Object.assign({},l),o.push(["exit",s,t])),r.end=Object.assign({},l),o.push(["exit",r,t]),e.add(n+1,0,o)}function To(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const EZ={name:"tasklistCheck",tokenize:jZ};function _Z(){return{text:{91:EZ}}}function jZ(e,t,n){const r=this;return s;function s(d){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),o)}function o(d){return St(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),l):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),l):n(d)}function l(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),u):n(d)}function u(d){return Pe(d)?t(d):rt(d)?e.check({tokenize:NZ},t,n)(d):n(d)}}function NZ(e,t,n){return ut(e,r,"whitespace");function r(s){return s===null?n(s):t(s)}}function AZ(e){return sR([tZ(),dZ(),vZ(e),CZ(),_Z()])}const RZ={};function MZ(e){const t=this,n=e||RZ,r=t.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(AZ(n)),o.push(WY()),l.push(QY(n))}function OZ({node:e,inline:t,className:n,children:r,...s}){return t?m.jsx("code",{className:`${n} text-sm bg-zinc-100 dark:bg-zinc-800 py-0.5 px-1 rounded-md`,...s,children:r}):m.jsx("div",{className:"not-prose flex flex-col",children:m.jsx("div",{...s,className:"text-sm w-full overflow-x-auto dark:bg-zinc-900 p-4 border border-zinc-200 dark:border-zinc-700 rounded-xl dark:text-zinc-50 text-zinc-900 font-mono whitespace-pre-wrap break-words",children:r})})}const DZ={code:OZ,pre:({children:e})=>m.jsx(m.Fragment,{children:e}),ol:({children:e,...t})=>m.jsx("ol",{className:"list-decimal list-outside ml-4",...t,children:e}),li:({children:e,...t})=>m.jsx("li",{className:"py-1",...t,children:e}),ul:({children:e,...t})=>m.jsx("ul",{className:"list-decimal list-outside ml-4",...t,children:e}),strong:({children:e,...t})=>m.jsx("span",{className:"font-semibold",...t,children:e}),a:({children:e,...t})=>m.jsx("a",{className:"text-blue-500 hover:underline",target:"_blank",rel:"noreferrer",...t,children:e}),h1:({children:e,...t})=>m.jsx("h1",{className:"text-3xl font-semibold mt-6 mb-2",...t,children:e}),h2:({children:e,...t})=>m.jsx("h2",{className:"text-2xl font-semibold mt-6 mb-2",...t,children:e}),h3:({children:e,...t})=>m.jsx("h3",{className:"text-xl font-semibold mt-6 mb-2",...t,children:e}),h4:({children:e,...t})=>m.jsx("h4",{className:"text-lg font-semibold mt-6 mb-2",...t,children:e}),h5:({children:e,...t})=>m.jsx("h5",{className:"text-base font-semibold mt-6 mb-2",...t,children:e}),h6:({children:e,...t})=>m.jsx("h6",{className:"text-sm font-semibold mt-6 mb-2",...t,children:e})},PZ=[MZ],zZ=({children:e})=>m.jsx(vG,{remarkPlugins:PZ,components:DZ,children:e}),LZ=w.memo(zZ,(e,t)=>e.children===t.children);function lE({message:e,onSave:t,onCancel:n}){const[r,s]=w.useState(e.content),o=w.useRef(null);w.useEffect(()=>{o.current&&(o.current.focus(),o.current.select(),l())},[]);const l=()=>{o.current&&(o.current.style.height="auto",o.current.style.height=`${o.current.scrollHeight}px`)},u=()=>{r.trim()!==e.content.trim()?t(r.trim()):n()},d=h=>{h.key==="Enter"&&(h.metaKey||h.ctrlKey)&&(h.preventDefault(),u()),h.key==="Escape"&&(h.preventDefault(),n())};return m.jsxs("div",{className:"w-full space-y-3",children:[m.jsx(cu,{ref:o,value:r,onChange:h=>{s(h.target.value),l()},onKeyDown:d,className:"min-h-[100px] resize-none",placeholder:"Edit your message..."}),m.jsxs("div",{className:"flex justify-end gap-2",children:[m.jsx(Je,{variant:"outline",size:"sm",onClick:n,children:"Cancel"}),m.jsx(Je,{size:"sm",onClick:u,disabled:!r.trim(),children:"Save"})]})]})}function cE({data:e,className:t}){const[n,r]=w.useState(!1),s=JSON.stringify(e,null,2),o=async()=>{try{await navigator.clipboard.writeText(s),r(!0),setTimeout(()=>r(!1),2e3)}catch(u){console.error("Failed to copy:",u)}},l=u=>u.replace(/"([^"]+)":/g,'<span class="text-blue-600/70 dark:text-blue-400/70">"$1"</span>:').replace(/: "([^"]*)"/g,': <span class="text-foreground">"$1"</span>').replace(/: (true|false)/g,': <span class="text-purple-600/70 dark:text-purple-400/70">$1</span>').replace(/: (null)/g,': <span class="text-muted-foreground/60">$1</span>').replace(/: (-?\d+(?:\.\d+)?)/g,': <span class="text-orange-600/70 dark:text-orange-400/70">$1</span>');return m.jsxs("div",{className:Me("relative group",t),children:[m.jsx("button",{onClick:o,className:"absolute top-2 right-2 p-1.5 rounded-md bg-background/80 backdrop-blur-sm border opacity-0 group-hover:opacity-100 transition-opacity hover:bg-muted",title:"Copy JSON",children:n?m.jsx(wr,{className:"h-3 w-3 text-green-600/70 dark:text-green-400/70"}):m.jsx(ya,{className:"h-3 w-3"})}),m.jsx("pre",{className:"text-xs font-mono whitespace-pre-wrap overflow-x-auto p-3 bg-muted/20 rounded-md border",children:m.jsx("code",{dangerouslySetInnerHTML:{__html:l(s)}})})]})}function KR({data:e,depth:t=0}){const[n,r]=w.useState(t<2);if(typeof e!="object"||e===null)return m.jsx("span",{className:Me("text-sm",typeof e=="string"&&"text-foreground",typeof e=="number"&&"text-orange-600/70 dark:text-orange-400/70",typeof e=="boolean"&&"text-purple-600/70 dark:text-purple-400/70",e===null&&"text-muted-foreground/60"),children:typeof e=="string"?`"${e}"`:String(e)});const s=Array.isArray(e),o=s?e.map((d,h)=>[h,d]):Object.entries(e),l=s?"[":"{",u=s?"]":"}";return o.length===0?m.jsxs("span",{className:"text-sm text-muted-foreground",children:[l,u]}):m.jsxs("div",{className:"text-sm",children:[m.jsxs("button",{onClick:()=>r(!n),className:"flex items-center gap-1 hover:bg-muted/50 rounded px-1 transition-colors",children:[n?m.jsx(al,{className:"h-3 w-3"}):m.jsx(sl,{className:"h-3 w-3"}),m.jsxs("span",{className:"text-muted-foreground",children:[l," ",!n&&`${o.length} items`]})]}),n&&m.jsx("div",{className:"ml-4 border-l border-border pl-2 space-y-1",children:o.map(([d,h])=>m.jsxs("div",{className:"flex gap-2",children:[m.jsxs("span",{className:"text-blue-600/70 dark:text-blue-400/70 font-medium min-w-0 flex-shrink-0",children:[s?`[${d}]`:`"${d}"`,":"]}),m.jsx("div",{className:"min-w-0 flex-1",children:m.jsx(KR,{data:h,depth:t+1})})]},d))}),n&&m.jsx("span",{className:"text-muted-foreground ml-4",children:u})]})}function IZ({toolCall:e,toolResult:t,className:n}){const[r,s]=w.useState(!1),[o,l]=w.useState(!1),u=()=>{switch(e.status){case"completed":return m.jsxs("div",{className:"relative",children:[m.jsx(hg,{className:"h-4 w-4 text-green-600/70 dark:text-green-400/70"}),m.jsx("div",{className:"absolute inset-0 animate-ping",children:m.jsx(hg,{className:"h-4 w-4 text-green-600/70 dark:text-green-400/70 opacity-20"})})]});case"error":return m.jsxs("div",{className:"relative",children:[m.jsx(mg,{className:"h-4 w-4 text-red-600/70 dark:text-red-400/70"}),m.jsx("div",{className:"absolute inset-0 animate-pulse",children:m.jsx(mg,{className:"h-4 w-4 text-red-600/70 dark:text-red-400/70 opacity-30"})})]});case"executing":return m.jsxs("div",{className:"relative",children:[m.jsx(pg,{className:"h-4 w-4 text-blue-600/70 dark:text-blue-400/70 animate-spin"}),m.jsx("div",{className:"absolute inset-0 animate-ping",children:m.jsx(pg,{className:"h-4 w-4 text-blue-600/70 dark:text-blue-400/70 opacity-20"})})]});default:return m.jsx(pg,{className:"h-4 w-4 text-muted-foreground/60"})}};return m.jsxs("div",{className:Me("border rounded-lg bg-gradient-to-br from-muted/20 to-muted/40 backdrop-blur-sm shadow-sm hover:shadow-md transition-all duration-200",e.status==="completed"&&"border-green-200/50 dark:border-green-800/50",e.status==="error"&&"border-red-200/50 dark:border-red-800/50",e.status==="executing"&&"border-blue-200/50 dark:border-blue-800/50",n),children:[m.jsxs("button",{onClick:()=>s(!r),className:"w-full flex items-center justify-between p-4 hover:bg-muted/30 transition-all duration-200 rounded-t-lg",children:[m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx("div",{className:"p-2 rounded-md bg-background/50 border",children:m.jsx(bh,{className:"h-4 w-4 text-muted-foreground"})}),m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx("span",{className:"font-semibold text-sm",children:e.name}),u()]})]}),m.jsx("div",{className:"flex items-center gap-2",children:r?m.jsx(al,{className:"h-4 w-4 text-muted-foreground"}):m.jsx(sl,{className:"h-4 w-4 text-muted-foreground"})})]}),r&&m.jsxs("div",{className:"border-t bg-background/30 backdrop-blur-sm",children:[Object.keys(e.parameters).length>0&&m.jsxs("div",{className:"p-4 border-b border-border/50",children:[m.jsxs("div",{className:"flex items-center justify-between mb-3",children:[m.jsxs("h4",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider flex items-center gap-2",children:[m.jsx("div",{className:"w-2 h-2 rounded-full bg-blue-600/70 dark:bg-blue-400/70"}),"Parameters"]}),m.jsx("button",{onClick:()=>l(!o),className:"text-xs text-muted-foreground hover:text-foreground transition-colors px-2 py-1 rounded bg-muted/50 hover:bg-muted",children:o?"Raw JSON":"Tree View"})]}),o?m.jsx(KR,{data:e.parameters}):m.jsx(cE,{data:e.parameters})]}),t&&m.jsxs("div",{className:"p-4",children:[m.jsxs("h4",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider mb-3 flex items-center gap-2",children:[m.jsx("div",{className:Me("w-2 h-2 rounded-full",t.error?"bg-red-600/70 dark:bg-red-400/70":"bg-green-600/70 dark:bg-green-400/70")}),t.error?"Error":"Result"]}),m.jsx("div",{children:t.error?m.jsx("div",{className:"bg-red-50/30 dark:bg-red-950/20 border border-red-200/50 dark:border-red-800/50 rounded-lg p-4",children:m.jsxs("div",{className:"flex items-start gap-3",children:[m.jsx(mg,{className:"h-5 w-5 text-red-600/70 dark:text-red-400/70 flex-shrink-0 mt-0.5"}),m.jsxs("div",{children:[m.jsx("p",{className:"font-medium text-foreground mb-1",children:"Tool execution failed"}),m.jsx("p",{className:"text-muted-foreground text-sm",children:t.error})]})]})}):m.jsxs("div",{className:"bg-green-50/30 dark:bg-green-950/20 border border-green-200/50 dark:border-green-800/50 rounded-lg overflow-hidden",children:[m.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 bg-green-100/30 dark:bg-green-900/20 border-b border-green-200/50 dark:border-green-800/50",children:[m.jsx(hg,{className:"h-4 w-4 text-green-600/70 dark:text-green-400/70"}),m.jsx("span",{className:"text-sm font-medium text-foreground",children:"Tool executed successfully"})]}),m.jsx("div",{className:"p-4",children:typeof t.result=="object"?m.jsx(cE,{data:t.result}):m.jsx("div",{className:"text-sm text-foreground bg-muted/30 p-3 rounded border",children:String(t.result)})})]})})]})]})]})}const BZ="/claude_logo.png",VZ="/openai_logo.png",uE="/ollama_logo.svg",dE="/ollama_dark.png",WR=(e,t)=>{switch(e){case"anthropic":return BZ;case"openai":return VZ;case"ollama":return t==="dark"||t==="system"&&typeof document<"u"&&document.documentElement.classList.contains("dark")?dE:uE;default:return null}},UZ=(e,t)=>WR(e.provider,t),HZ=e=>{switch(e){case"anthropic":return"text-orange-600 dark:text-orange-400";case"openai":return"text-green-600 dark:text-green-400";default:return"text-blue-600 dark:text-blue-400"}},fE=e=>{let t;const n=new Set,r=(h,g)=>{const p=typeof h=="function"?h(t):h;if(!Object.is(p,t)){const x=t;t=g??(typeof p!="object"||p===null)?p:Object.assign({},t,p),n.forEach(v=>v(t,x))}},s=()=>t,u={setState:r,getState:s,getInitialState:()=>d,subscribe:h=>(n.add(h),()=>n.delete(h))},d=t=e(r,s,u);return u},FZ=e=>e?fE(e):fE,$Z=e=>e;function qZ(e,t=$Z){const n=ye.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return ye.useDebugValue(n),n}const GZ=e=>FZ()(t=>({themeMode:(e==null?void 0:e.themeMode)??"light",themePreset:(e==null?void 0:e.themePreset)??"default",setThemeMode:n=>t({themeMode:n}),setThemePreset:n=>t({themePreset:n})})),QR=w.createContext(null),YZ=({children:e,themeMode:t,themePreset:n})=>{const r=w.useRef(null);return r.current??(r.current=GZ({themeMode:t,themePreset:n})),m.jsx(QR.Provider,{value:r.current,children:e})},Xo=e=>{const t=w.useContext(QR);if(!t)throw new Error("Missing PreferencesStoreProvider");return qZ(t,e)},ZZ=()=>m.jsxs("div",{className:"flex items-center gap-2 py-2",children:[m.jsx("span",{className:"text-sm text-muted-foreground",children:"Thinking"}),m.jsxs("div",{className:"flex space-x-1",children:[m.jsx("div",{className:"w-1.5 h-1.5 bg-muted-foreground/60 rounded-full animate-bounce"}),m.jsx("div",{className:"w-1.5 h-1.5 bg-muted-foreground/60 rounded-full animate-bounce [animation-delay:-0.2s]"}),m.jsx("div",{className:"w-1.5 h-1.5 bg-muted-foreground/60 rounded-full animate-bounce [animation-delay:-0.4s]"})]})]}),XZ=({message:e,isLoading:t=!1,onEdit:n,onRegenerate:r,onCopy:s,isReadonly:o=!1,showActions:l=!0,model:u})=>{const[d,h]=w.useState("view"),[g,p]=w.useState(!1),x=Xo(R=>R.themeMode),v=()=>{s?s(e.content):navigator.clipboard.writeText(e.content)},S=R=>{n&&n(e.id,R),h("view")},C=()=>{h("view")},E=()=>{r&&r(e.id)},T=e.role==="assistant"&&t&&(!e.content||e.content.trim()==="");return m.jsx(jf,{children:m.jsxs(Ni.div,{"data-testid":`message-${e.role}`,className:"w-full mx-auto max-w-4xl px-4 group/message",initial:{y:5,opacity:0},animate:{y:0,opacity:1},"data-role":e.role,onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),children:[e.role==="assistant"&&m.jsxs("div",{className:"flex gap-4 w-full",children:[m.jsx("div",{className:"size-8 flex items-center rounded-full justify-center shrink-0 bg-muted/50",children:m.jsx("img",{src:UZ(u,x),alt:`${u==null?void 0:u.id} logo`,className:"h-4 w-4 object-contain"})}),m.jsxs("div",{className:"flex flex-col gap-4 w-full min-w-0",children:[e.attachments&&e.attachments.length>0&&m.jsx("div",{className:"flex flex-row gap-2",children:e.attachments.map(R=>m.jsx("div",{className:"px-3 py-2 bg-muted rounded-lg text-sm",children:R.name},R.id))}),e.toolCalls&&e.toolCalls.length>0&&m.jsx("div",{className:"space-y-2",children:e.toolCalls.map(R=>{var A;const O=(A=e.toolResults)==null?void 0:A.find(M=>M.toolCallId===R.id);return m.jsx(IZ,{toolCall:R,toolResult:O},R.id)})}),T?m.jsx(Ni.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.3},children:m.jsx(ZZ,{})}):d==="view"?m.jsxs("div",{className:"relative",children:[m.jsx("div",{"data-testid":"message-content",className:"prose prose-sm max-w-none dark:prose-invert prose-p:leading-relaxed prose-pre:bg-muted/50 prose-pre:border prose-pre:border-border/30 flex-1 min-w-0",children:m.jsx(LZ,{children:nk(e.content)})}),g&&m.jsxs("div",{className:"absolute -bottom-6 left-0 right-0 flex items-center justify-between",children:[m.jsx("div",{className:"text-xs text-muted-foreground/60",children:rk(e.timestamp)}),l&&!o&&m.jsxs("div",{className:"flex items-center gap-1",children:[m.jsxs(cs,{children:[m.jsx(us,{asChild:!0,children:m.jsx(Je,{variant:"ghost",size:"sm",className:"px-2 h-7 rounded-lg text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-all",onClick:v,children:m.jsx(ya,{size:14})})}),m.jsx(ds,{children:"Copy"})]}),r&&m.jsxs(cs,{children:[m.jsx(us,{asChild:!0,children:m.jsx(Je,{variant:"ghost",size:"sm",className:"px-2 h-7 rounded-lg text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-all",onClick:E,children:m.jsx(C6,{size:14})})}),m.jsx(ds,{children:"Regenerate"})]})]})]})]}):m.jsx("div",{className:"flex flex-row gap-2 items-start",children:m.jsx(lE,{message:e,onSave:S,onCancel:C})})]})]}),e.role==="user"&&m.jsx("div",{className:"flex justify-end w-full",children:m.jsxs("div",{className:"flex flex-col gap-2 max-w-2xl",children:[e.attachments&&e.attachments.length>0&&m.jsx("div",{className:"flex flex-row justify-end gap-2",children:e.attachments.map(R=>m.jsx("div",{className:"px-3 py-2 bg-muted rounded-lg text-sm",children:R.name},R.id))}),d==="view"?m.jsxs("div",{className:"flex items-start gap-2 justify-end",children:[l&&!o&&g&&m.jsx("div",{className:"flex items-center gap-1 mt-1",children:m.jsxs(cs,{children:[m.jsx(us,{asChild:!0,children:m.jsx(Je,{variant:"ghost",size:"sm",className:"px-2 h-7 rounded-lg text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-all",onClick:v,children:m.jsx(ya,{size:14})})}),m.jsx(ds,{children:"Copy"})]})}),m.jsxs("div",{className:"relative",children:[m.jsx("div",{"data-testid":"message-content",className:"bg-primary text-primary-foreground px-4 py-3 rounded-2xl max-w-fit",children:m.jsx("div",{className:"whitespace-pre-wrap break-words font-medium",children:nk(e.content)})}),g&&m.jsx("div",{className:"absolute -bottom-6 right-0 text-xs text-muted-foreground/60",children:rk(e.timestamp)})]})]}):m.jsx("div",{className:"w-full",children:m.jsx(lE,{message:e,onSave:S,onCancel:C})})]})})]})})},KZ=w.memo(XZ,(e,t)=>e.message.id===t.message.id&&e.message.content===t.message.content&&e.isLoading===t.isLoading&&JSON.stringify(e.message.toolCalls)===JSON.stringify(t.message.toolCalls)&&JSON.stringify(e.message.toolResults)===JSON.stringify(t.message.toolResults));function hE({provider:e}){const t=Xo(r=>r.themeMode),n=WR(e,t);return n?m.jsx("img",{src:n,width:12,height:12,alt:`${e} logo`,className:"h-3 w-3 object-contain"}):m.jsx("div",{className:By("h-3 w-3 rounded-sm",HZ(e))})}function WZ({currentModel:e,availableModels:t,onModelChange:n,disabled:r,isLoading:s}){const[o,l]=w.useState(!1),u=e;return m.jsxs(zj,{open:o,onOpenChange:l,children:[m.jsx(Lj,{asChild:!0,children:m.jsx(Je,{variant:"ghost",size:"sm",disabled:r||s,className:"h-8 px-2 rounded-full hover:bg-muted/80 transition-colors text-xs cursor-pointer",children:m.jsxs(m.Fragment,{children:[m.jsx(hE,{provider:u.provider}),m.jsx("span",{className:"text-[10px] font-medium",children:u.name})]})})}),m.jsx(Ij,{align:"start",className:"min-w-[200px]",children:t.map(d=>m.jsxs(nf,{onClick:()=>{n(d),l(!1)},className:"flex items-center gap-3 text-sm cursor-pointer",children:[m.jsx(hE,{provider:d.provider}),m.jsx("div",{className:"flex flex-col",children:m.jsx("span",{className:"font-medium",children:d.name})}),d.id===e.id&&m.jsx("div",{className:"ml-auto w-2 h-2 bg-primary rounded-full"})]},d.id))})]})}function mE({value:e,onChange:t,onSubmit:n,onStop:r,disabled:s=!1,isLoading:o=!1,placeholder:l="Type your message...",className:u,showScrollToBottom:d=!1,onScrollToBottom:h,currentModel:g,availableModels:p,onModelChange:x}){const v=w.useRef(null),S=w.useRef(null),[C,E]=w.useState([]),[T,R]=w.useState([]);console.log(g);const O=g;w.useEffect(()=>{A()},[e]);const A=()=>{v.current&&(v.current.style.height="auto",v.current.style.height=`${Math.min(v.current.scrollHeight,120)}px`)},M=()=>{v.current&&(v.current.style.height="auto")},N=w.useCallback(()=>{!e.trim()||s||o||T.length>0||(n(e.trim(),C.length>0?C:void 0),t(""),E([]),M(),setTimeout(()=>{var D;(D=v.current)==null||D.focus()},0))},[e,s,o,T.length,n,C,t]),z=D=>{D.key==="Enter"&&!D.shiftKey&&!D.nativeEvent.isComposing&&(D.preventDefault(),N())},P=w.useCallback(async D=>{const H=Array.from(D.target.files||[]);if(H.length!==0){R(H.map($=>$.name));try{const $=await Promise.all(H.map(async X=>(await new Promise(Y=>setTimeout(Y,1e3)),{id:Math.random().toString(36).substr(2,9),name:X.name,url:URL.createObjectURL(X),contentType:X.type,size:X.size})));E(X=>[...X,...$])}catch($){console.error("Error uploading files:",$)}finally{R([]),S.current&&(S.current.value="")}}},[]),B=D=>{E(H=>H.filter($=>$.id!==D))};return m.jsxs("div",{className:"relative w-full",children:[m.jsx(jf,{children:d&&m.jsx(Ni.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:10},className:"absolute left-1/2 bottom-full mb-4 -translate-x-1/2 z-50",children:m.jsx(Je,{size:"sm",variant:"outline",className:"rounded-full shadow-lg cursor-pointer",onClick:h,children:m.jsx(OI,{className:"h-4 w-4"})})})}),m.jsx("input",{ref:S,type:"file",multiple:!0,className:"hidden",onChange:P,accept:"image/*,.pdf,.txt,.json,.csv"}),(C.length>0||T.length>0)&&m.jsxs("div",{className:"mb-3 flex flex-wrap gap-2",children:[C.map(D=>m.jsxs("div",{className:"flex items-center gap-2 bg-muted px-3 py-2 rounded-lg text-sm",children:[m.jsx("span",{className:"truncate max-w-[200px]",children:D.name}),m.jsx("button",{onClick:()=>B(D.id),className:"text-muted-foreground hover:text-foreground cursor-pointer",children:"×"})]},D.id)),T.map(D=>m.jsxs("div",{className:"flex items-center gap-2 bg-muted/50 px-3 py-2 rounded-lg text-sm animate-pulse",children:[m.jsx("span",{className:"truncate max-w-[200px]",children:D}),m.jsx("div",{className:"w-3 h-3 border-2 border-current border-t-transparent rounded-full animate-spin"})]},D))]}),m.jsxs("div",{className:"relative",children:[m.jsx(cu,{ref:v,value:e,onChange:D=>t(D.target.value),onKeyDown:z,placeholder:l,disabled:s,className:By("min-h-[56px] max-h-[120px] resize-none pl-16 pr-14 py-4 rounded-3xl","border-border/30 bg-background/50 focus-visible:border-border/50","focus-visible:ring-0 focus-visible:ring-offset-0","transition-all duration-200 ease-in-out overflow-y-auto","text-base placeholder:text-muted-foreground/60",u),rows:1,autoFocus:!0}),m.jsx("div",{className:"absolute bottom-3 left-4 flex items-center gap-1",children:m.jsxs(cs,{children:[m.jsx(us,{asChild:!0,children:m.jsx(Je,{type:"button",variant:"ghost",size:"sm",className:"h-8 w-8 p-0 rounded-full hover:bg-muted/80 transition-colors cursor-pointer",onClick:()=>{var D;return(D=S.current)==null?void 0:D.click()},disabled:s||o,children:m.jsx(x6,{size:16})})}),m.jsx(ds,{children:"Add files"})]})}),m.jsx("div",{className:"absolute bottom-3 right-4 flex items-center gap-1",children:o?m.jsxs(cs,{children:[m.jsx(us,{asChild:!0,children:m.jsx(Je,{type:"button",size:"sm",variant:"outline",className:"h-8 w-8 p-0 rounded-full border-border/30 hover:border-border/50 transition-colors cursor-pointer",onClick:r,children:m.jsx(A6,{size:16})})}),m.jsx(ds,{children:"Stop generating"})]}):m.jsxs(cs,{children:[m.jsx(us,{asChild:!0,children:m.jsx(Je,{type:"button",size:"sm",className:By("h-8 w-8 p-0 rounded-full transition-all duration-200 cursor-pointer",e.trim()&&!s&&T.length===0?"bg-primary text-primary-foreground hover:bg-primary/90 shadow-sm":"bg-muted text-muted-foreground cursor-not-allowed"),onClick:N,disabled:!e.trim()||s||T.length>0,children:m.jsx(Mj,{size:16})})}),m.jsx(ds,{children:"Send message"})]})})]}),m.jsx("div",{className:"flex items-center gap-2 mt-2",children:p.length>0&&O&&m.jsx(WZ,{currentModel:O,availableModels:p,onModelChange:x,disabled:s,isLoading:o})})]})}function QZ({serverConfigs:e,systemPrompt:t=""}){const n=w.useRef(null),[r,s]=w.useState(!0),{messages:o,isLoading:l,error:u,input:d,setInput:h,sendMessage:g,stopGeneration:p,regenerateMessage:x,clearChat:v,model:S,availableModels:C,setModel:E,elicitationRequest:T,elicitationLoading:R,handleElicitationResponse:O}=N9({serverConfigs:e,systemPrompt:t,onError:z=>{qt.error(z)}});console.log("availableModels",C);const A=o.length>0;w.useEffect(()=>{r&&n.current&&(n.current.scrollTop=n.current.scrollHeight)},[o,r]);const M=()=>{if(!n.current)return;const{scrollTop:z,scrollHeight:P,clientHeight:B}=n.current,H=P-z-B<100;s(H)},N=z=>{navigator.clipboard.writeText(z)};return console.log(C),A?m.jsx(ph,{children:m.jsxs("div",{className:"relative bg-background h-screen overflow-hidden",children:[m.jsx("div",{ref:n,onScroll:M,className:"h-full overflow-y-auto pb-40",children:m.jsx("div",{className:"max-w-4xl mx-auto px-4 pt-8 pb-8",children:m.jsxs(jf,{mode:"popLayout",children:[o.map((z,P)=>m.jsx(Ni.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3,delay:P*.05},className:"mb-8",children:m.jsx(KZ,{message:z,model:S||null,isLoading:l&&P===o.length-1,onEdit:()=>{},onRegenerate:x,onCopy:N,showActions:!0})},z.id)),l&&o.length>0&&o[o.length-1].role==="user"&&m.jsx(Ni.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"mb-8",children:m.jsxs("div",{className:"flex gap-4 items-start",children:[m.jsx("div",{className:"w-8 h-8 flex items-center rounded-full justify-center bg-muted/50 shrink-0",children:m.jsx(Dj,{className:"h-4 w-4 text-muted-foreground"})}),m.jsxs("div",{className:"flex items-center gap-2 pt-2",children:[m.jsx("span",{className:"text-sm text-muted-foreground",children:"Thinking"}),m.jsxs("div",{className:"flex space-x-1",children:[m.jsx("div",{className:"w-1.5 h-1.5 bg-muted-foreground/60 rounded-full animate-bounce"}),m.jsx("div",{className:"w-1.5 h-1.5 bg-muted-foreground/60 rounded-full animate-bounce delay-100"}),m.jsx("div",{className:"w-1.5 h-1.5 bg-muted-foreground/60 rounded-full animate-bounce delay-200"})]})]})]})})]})})}),m.jsx(jf,{children:u&&m.jsx(Ni.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:20},className:"absolute bottom-40 left-0 right-0 px-4 py-3 bg-destructive/5 border-t border-destructive/10 z-10",children:m.jsx("div",{className:"max-w-4xl mx-auto",children:m.jsx("p",{className:"text-sm text-destructive",children:u})})})}),m.jsx("div",{className:"absolute bottom-0 left-0 right-0 border-t border-border/50 bg-background/80 backdrop-blur-sm",children:m.jsx("div",{className:"max-w-4xl mx-auto p-4",children:m.jsx(mE,{value:d,onChange:h,onSubmit:g,onStop:p,disabled:C.length===0,isLoading:l,placeholder:"Send a message...",className:"border-2 shadow-sm",currentModel:S,availableModels:C,onModelChange:E,onClearChat:v,hasMessages:A})})}),m.jsx(Iy,{elicitationRequest:T,onResponse:O,loading:R})]})}):m.jsxs("div",{className:"flex flex-col h-screen",children:[m.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center px-4",children:[m.jsx(Ni.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:"text-center space-y-6 max-w-2xl mb-8",children:m.jsxs("div",{className:"space-y-3",children:[m.jsx("h1",{className:"text-4xl font-semibold bg-gradient-to-r from-foreground to-foreground/70 bg-clip-text text-transparent",children:"Let's test out your MCP servers!"}),e&&m.jsx("div",{className:"text-sm text-muted-foreground mt-4",children:m.jsxs("p",{children:["Connected servers: ",Object.keys(e).join(", ")]})})]})}),m.jsxs(Ni.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.1},className:"w-full max-w-3xl",children:[m.jsx(mE,{value:d,onChange:h,onSubmit:g,onStop:p,disabled:C.length===0,isLoading:l,placeholder:"Send a message...",className:"border-2 shadow-lg bg-background/80 backdrop-blur-sm",currentModel:S||null,availableModels:C,onModelChange:E,onClearChat:v,hasMessages:!1}),C.length===0&&m.jsx(Ni.p,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.3},className:"text-sm text-muted-foreground mt-3 text-center",children:"Configure API keys in Settings or start Ollama to enable chat"})]})]}),m.jsx(Iy,{elicitationRequest:T,onResponse:O,loading:R})]})}function JZ(){const{tokens:e,setToken:t,clearToken:n,hasToken:r,getOllamaBaseUrl:s,setOllamaBaseUrl:o}=hN(),[l,u]=w.useState(!1),[d,h]=w.useState(!1),g=Xo(S=>S.themeMode),p=S=>{n(S)},x=()=>{o("http://localhost:11434")},v=S=>S?S.length<=8?"*".repeat(S.length):S.slice(0,4)+"*".repeat(S.length-8)+S.slice(-4):"";return m.jsxs("div",{className:"container mx-auto p-6 max-w-2xl",children:[m.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[m.jsx(Pj,{className:"h-6 w-6"}),m.jsx("h1",{className:"text-2xl font-bold",children:"Settings"})]}),m.jsxs(wa,{children:[m.jsxs(qS,{children:[m.jsxs(GS,{className:"flex items-center gap-2",children:[m.jsx(o6,{className:"h-5 w-5"}),"API Keys"]}),m.jsx("p",{className:"text-sm text-muted-foreground",children:"Configure your LLM provider API keys. Keys are stored locally in your browser."})]}),m.jsxs(Pc,{className:"space-y-6",children:[m.jsxs("div",{className:"space-y-3",children:[m.jsxs("div",{className:"flex items-center justify-between",children:[m.jsx(af,{htmlFor:"anthropic-key",className:"text-base font-medium",children:"Anthropic API Key"}),r("anthropic")&&m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(wr,{className:"h-4 w-4 text-green-500"}),m.jsx("span",{className:"text-xs text-green-600",children:"Configured"})]})]}),m.jsxs("div",{className:"flex gap-2",children:[m.jsxs("div",{className:"relative flex-1",children:[m.jsx(zt,{id:"anthropic-key",type:l?"text":"password",value:l?e.anthropic:v(e.anthropic),onChange:S=>t("anthropic",S.target.value),placeholder:"sk-ant-...",className:"pr-10"}),m.jsx(Je,{type:"button",variant:"ghost",size:"sm",className:"absolute right-0 top-0 h-full px-3 hover:bg-transparent",onClick:()=>u(!l),children:l?m.jsx(SC,{className:"h-4 w-4"}):m.jsx(wf,{className:"h-4 w-4"})})]}),r("anthropic")&&m.jsx(Je,{variant:"outline",size:"sm",onClick:()=>p("anthropic"),children:m.jsx(Fo,{className:"h-4 w-4"})})]}),m.jsxs("p",{className:"text-xs text-muted-foreground",children:["Get your API key from"," ",m.jsx("a",{href:"https://console.anthropic.com/",target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:underline",children:"Anthropic Console"})]})]}),m.jsxs("div",{className:"space-y-3",children:[m.jsxs("div",{className:"flex items-center justify-between",children:[m.jsx(af,{htmlFor:"openai-key",className:"text-base font-medium",children:"OpenAI API Key"}),r("openai")&&m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(wr,{className:"h-4 w-4 text-green-500"}),m.jsx("span",{className:"text-xs text-green-600",children:"Configured"})]})]}),m.jsxs("div",{className:"flex gap-2",children:[m.jsxs("div",{className:"relative flex-1",children:[m.jsx(zt,{id:"openai-key",type:d?"text":"password",value:d?e.openai:v(e.openai),onChange:S=>t("openai",S.target.value),placeholder:"sk-...",className:"pr-10"}),m.jsx(Je,{type:"button",variant:"ghost",size:"sm",className:"absolute right-0 top-0 h-full px-3 hover:bg-transparent",onClick:()=>h(!d),children:d?m.jsx(SC,{className:"h-4 w-4"}):m.jsx(wf,{className:"h-4 w-4"})})]}),r("openai")&&m.jsx(Je,{variant:"outline",size:"sm",onClick:()=>p("openai"),children:m.jsx(Fo,{className:"h-4 w-4"})})]}),m.jsxs("p",{className:"text-xs text-muted-foreground",children:["Get your API key from"," ",m.jsx("a",{href:"https://platform.openai.com/api-keys",target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:underline",children:"OpenAI Platform"})]})]})]})]}),m.jsxs(wa,{className:"mt-6",children:[m.jsxs(qS,{children:[m.jsxs(GS,{className:"flex items-center gap-2",children:[m.jsx("img",{src:g==="dark"?"/ollama_dark.png":"/ollama_logo.svg",alt:"Ollama",className:"h-5 w-5"}),"Ollama Configuration"]}),m.jsx("p",{className:"text-sm text-muted-foreground",children:"Configure your local Ollama server settings."})]}),m.jsx(Pc,{className:"space-y-6",children:m.jsxs("div",{className:"space-y-3",children:[m.jsxs("div",{className:"flex items-center justify-between",children:[m.jsx(af,{htmlFor:"ollama-url",className:"text-base font-medium",children:"Base URL"}),m.jsx("div",{className:"flex items-center gap-2",children:m.jsx("span",{className:"text-xs text-muted-foreground",children:"Default: http://localhost:11434"})})]}),m.jsxs("div",{className:"flex gap-2",children:[m.jsx(zt,{id:"ollama-url",type:"text",value:s(),onChange:S=>o(S.target.value),placeholder:"http://localhost:11434",className:"flex-1"}),m.jsx(Je,{variant:"outline",size:"sm",onClick:x,children:"Reset"})]}),m.jsxs("p",{className:"text-xs text-muted-foreground",children:["Configure the base URL for your Ollama server. This is typically"," ",m.jsx("code",{className:"text-xs bg-muted px-1 py-0.5 rounded",children:"http://localhost:11434"})," ","for local installations."]})]})})]})]})}function Fr(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function Ss(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}const JR=6048e5,eX=864e5,eM=6e4,tM=36e5;let tX={};function Lh(){return tX}function Qc(e,t){var u,d,h,g;const n=Lh(),r=(t==null?void 0:t.weekStartsOn)??((d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.weekStartsOn)??n.weekStartsOn??((g=(h=n.locale)==null?void 0:h.options)==null?void 0:g.weekStartsOn)??0,s=Fr(e),o=s.getDay(),l=(o<r?7:0)+o-r;return s.setDate(s.getDate()-l),s.setHours(0,0,0,0),s}function Pf(e){return Qc(e,{weekStartsOn:1})}function nM(e){const t=Fr(e),n=t.getFullYear(),r=Ss(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const s=Pf(r),o=Ss(e,0);o.setFullYear(n,0,4),o.setHours(0,0,0,0);const l=Pf(o);return t.getTime()>=s.getTime()?n+1:t.getTime()>=l.getTime()?n:n-1}function pE(e){const t=Fr(e);return t.setHours(0,0,0,0),t}function gE(e){const t=Fr(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function nX(e,t){const n=pE(e),r=pE(t),s=+n-gE(n),o=+r-gE(r);return Math.round((s-o)/eX)}function rX(e){const t=nM(e),n=Ss(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Pf(n)}function iX(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function aX(e){if(!iX(e)&&typeof e!="number")return!1;const t=Fr(e);return!isNaN(Number(t))}function sX(e){const t=Fr(e),n=Ss(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}const oX={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},lX=(e,t,n)=>{let r;const s=oX[e];return typeof s=="string"?r=s:t===1?r=s.one:r=s.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function ty(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const cX={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},uX={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},dX={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},fX={date:ty({formats:cX,defaultWidth:"full"}),time:ty({formats:uX,defaultWidth:"full"}),dateTime:ty({formats:dX,defaultWidth:"full"})},hX={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},mX=(e,t,n,r)=>hX[e];function yc(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let s;if(r==="formatting"&&e.formattingValues){const l=e.defaultFormattingWidth||e.defaultWidth,u=n!=null&&n.width?String(n.width):l;s=e.formattingValues[u]||e.formattingValues[l]}else{const l=e.defaultWidth,u=n!=null&&n.width?String(n.width):e.defaultWidth;s=e.values[u]||e.values[l]}const o=e.argumentCallback?e.argumentCallback(t):t;return s[o]}}const pX={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},gX={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},yX={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},xX={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},vX={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},bX={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},wX=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},SX={ordinalNumber:wX,era:yc({values:pX,defaultWidth:"wide"}),quarter:yc({values:gX,defaultWidth:"wide",argumentCallback:e=>e-1}),month:yc({values:yX,defaultWidth:"wide"}),day:yc({values:xX,defaultWidth:"wide"}),dayPeriod:yc({values:vX,defaultWidth:"wide",formattingValues:bX,defaultFormattingWidth:"wide"})};function xc(e){return(t,n={})=>{const r=n.width,s=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(s);if(!o)return null;const l=o[0],u=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],d=Array.isArray(u)?kX(u,p=>p.test(l)):CX(u,p=>p.test(l));let h;h=e.valueCallback?e.valueCallback(d):d,h=n.valueCallback?n.valueCallback(h):h;const g=t.slice(l.length);return{value:h,rest:g}}}function CX(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function kX(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function TX(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const s=r[0],o=t.match(e.parsePattern);if(!o)return null;let l=e.valueCallback?e.valueCallback(o[0]):o[0];l=n.valueCallback?n.valueCallback(l):l;const u=t.slice(s.length);return{value:l,rest:u}}}const EX=/^(\d+)(th|st|nd|rd)?/i,_X=/\d+/i,jX={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},NX={any:[/^b/i,/^(a|c)/i]},AX={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},RX={any:[/1/i,/2/i,/3/i,/4/i]},MX={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},OX={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},DX={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},PX={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},zX={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},LX={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},IX={ordinalNumber:TX({matchPattern:EX,parsePattern:_X,valueCallback:e=>parseInt(e,10)}),era:xc({matchPatterns:jX,defaultMatchWidth:"wide",parsePatterns:NX,defaultParseWidth:"any"}),quarter:xc({matchPatterns:AX,defaultMatchWidth:"wide",parsePatterns:RX,defaultParseWidth:"any",valueCallback:e=>e+1}),month:xc({matchPatterns:MX,defaultMatchWidth:"wide",parsePatterns:OX,defaultParseWidth:"any"}),day:xc({matchPatterns:DX,defaultMatchWidth:"wide",parsePatterns:PX,defaultParseWidth:"any"}),dayPeriod:xc({matchPatterns:zX,defaultMatchWidth:"any",parsePatterns:LX,defaultParseWidth:"any"})},BX={code:"en-US",formatDistance:lX,formatLong:fX,formatRelative:mX,localize:SX,match:IX,options:{weekStartsOn:0,firstWeekContainsDate:1}};function VX(e){const t=Fr(e);return nX(t,sX(t))+1}function UX(e){const t=Fr(e),n=+Pf(t)-+rX(t);return Math.round(n/JR)+1}function rM(e,t){var g,p,x,v;const n=Fr(e),r=n.getFullYear(),s=Lh(),o=(t==null?void 0:t.firstWeekContainsDate)??((p=(g=t==null?void 0:t.locale)==null?void 0:g.options)==null?void 0:p.firstWeekContainsDate)??s.firstWeekContainsDate??((v=(x=s.locale)==null?void 0:x.options)==null?void 0:v.firstWeekContainsDate)??1,l=Ss(e,0);l.setFullYear(r+1,0,o),l.setHours(0,0,0,0);const u=Qc(l,t),d=Ss(e,0);d.setFullYear(r,0,o),d.setHours(0,0,0,0);const h=Qc(d,t);return n.getTime()>=u.getTime()?r+1:n.getTime()>=h.getTime()?r:r-1}function HX(e,t){var u,d,h,g;const n=Lh(),r=(t==null?void 0:t.firstWeekContainsDate)??((d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??n.firstWeekContainsDate??((g=(h=n.locale)==null?void 0:h.options)==null?void 0:g.firstWeekContainsDate)??1,s=rM(e,t),o=Ss(e,0);return o.setFullYear(s,0,r),o.setHours(0,0,0,0),Qc(o,t)}function FX(e,t){const n=Fr(e),r=+Qc(n,t)-+HX(n,t);return Math.round(r/JR)+1}function gt(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const ha={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return gt(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):gt(n+1,2)},d(e,t){return gt(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return gt(e.getHours()%12||12,t.length)},H(e,t){return gt(e.getHours(),t.length)},m(e,t){return gt(e.getMinutes(),t.length)},s(e,t){return gt(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),s=Math.trunc(r*Math.pow(10,n-3));return gt(s,t.length)}},Co={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},yE={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),s=r>0?r:1-r;return n.ordinalNumber(s,{unit:"year"})}return ha.y(e,t)},Y:function(e,t,n,r){const s=rM(e,r),o=s>0?s:1-s;if(t==="YY"){const l=o%100;return gt(l,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):gt(o,t.length)},R:function(e,t){const n=nM(e);return gt(n,t.length)},u:function(e,t){const n=e.getFullYear();return gt(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return gt(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return gt(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return ha.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return gt(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const s=FX(e,r);return t==="wo"?n.ordinalNumber(s,{unit:"week"}):gt(s,t.length)},I:function(e,t,n){const r=UX(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):gt(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):ha.d(e,t)},D:function(e,t,n){const r=VX(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):gt(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const s=e.getDay(),o=(s-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return gt(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(s,{width:"short",context:"formatting"});case"eeee":default:return n.day(s,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const s=e.getDay(),o=(s-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return gt(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(s,{width:"narrow",context:"standalone"});case"cccccc":return n.day(s,{width:"short",context:"standalone"});case"cccc":default:return n.day(s,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),s=r===0?7:r;switch(t){case"i":return String(s);case"ii":return gt(s,t.length);case"io":return n.ordinalNumber(s,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const s=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let s;switch(r===12?s=Co.noon:r===0?s=Co.midnight:s=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let s;switch(r>=17?s=Co.evening:r>=12?s=Co.afternoon:r>=4?s=Co.morning:s=Co.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return ha.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):ha.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):gt(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):gt(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):ha.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):ha.s(e,t)},S:function(e,t){return ha.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return vE(r);case"XXXX":case"XX":return ss(r);case"XXXXX":case"XXX":default:return ss(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return vE(r);case"xxxx":case"xx":return ss(r);case"xxxxx":case"xxx":default:return ss(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+xE(r,":");case"OOOO":default:return"GMT"+ss(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+xE(r,":");case"zzzz":default:return"GMT"+ss(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return gt(r,t.length)},T:function(e,t,n){const r=e.getTime();return gt(r,t.length)}};function xE(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),s=Math.trunc(r/60),o=r%60;return o===0?n+String(s):n+String(s)+t+gt(o,2)}function vE(e,t){return e%60===0?(e>0?"-":"+")+gt(Math.abs(e)/60,2):ss(e,t)}function ss(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),s=gt(Math.trunc(r/60),2),o=gt(r%60,2);return n+s+t+o}const bE=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},iM=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},$X=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],s=n[2];if(!s)return bE(e,t);let o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",bE(r,t)).replace("{{time}}",iM(s,t))},qX={p:iM,P:$X},GX=/^D+$/,YX=/^Y+$/,ZX=["D","DD","YY","YYYY"];function XX(e){return GX.test(e)}function KX(e){return YX.test(e)}function WX(e,t,n){const r=QX(e,t,n);if(console.warn(r),ZX.includes(e))throw new RangeError(r)}function QX(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const JX=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,eK=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,tK=/^'([^]*?)'?$/,nK=/''/g,rK=/[a-zA-Z]/;function iK(e,t,n){var g,p,x,v;const r=Lh(),s=r.locale??BX,o=r.firstWeekContainsDate??((p=(g=r.locale)==null?void 0:g.options)==null?void 0:p.firstWeekContainsDate)??1,l=r.weekStartsOn??((v=(x=r.locale)==null?void 0:x.options)==null?void 0:v.weekStartsOn)??0,u=Fr(e);if(!aX(u))throw new RangeError("Invalid time value");let d=t.match(eK).map(S=>{const C=S[0];if(C==="p"||C==="P"){const E=qX[C];return E(S,s.formatLong)}return S}).join("").match(JX).map(S=>{if(S==="''")return{isToken:!1,value:"'"};const C=S[0];if(C==="'")return{isToken:!1,value:aK(S)};if(yE[C])return{isToken:!0,value:S};if(C.match(rK))throw new RangeError("Format string contains an unescaped latin alphabet character `"+C+"`");return{isToken:!1,value:S}});s.localize.preprocessor&&(d=s.localize.preprocessor(u,d));const h={firstWeekContainsDate:o,weekStartsOn:l,locale:s};return d.map(S=>{if(!S.isToken)return S.value;const C=S.value;(KX(C)||XX(C))&&WX(C,t,String(e));const E=yE[C[0]];return E(u,C,s.localize,h)}).join("")}function aK(e){const t=e.match(tK);return t?t[1].replace(nK,"'"):e}function sK(e,t){const r=uK(e);let s;if(r.date){const d=dK(r.date,2);s=fK(d.restDateString,d.year)}if(!s||isNaN(s.getTime()))return new Date(NaN);const o=s.getTime();let l=0,u;if(r.time&&(l=hK(r.time),isNaN(l)))return new Date(NaN);if(r.timezone){if(u=mK(r.timezone),isNaN(u))return new Date(NaN)}else{const d=new Date(o+l),h=new Date(0);return h.setFullYear(d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()),h.setHours(d.getUTCHours(),d.getUTCMinutes(),d.getUTCSeconds(),d.getUTCMilliseconds()),h}return new Date(o+l+u)}const Wd={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},oK=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,lK=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,cK=/^([+-])(\d{2})(?::?(\d{2}))?$/;function uK(e){const t={},n=e.split(Wd.dateTimeDelimiter);let r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],Wd.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Wd.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){const s=Wd.timezone.exec(r);s?(t.time=r.replace(s[1],""),t.timezone=s[1]):t.time=r}return t}function dK(e,t){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};const s=r[1]?parseInt(r[1]):null,o=r[2]?parseInt(r[2]):null;return{year:o===null?s:o*100,restDateString:e.slice((r[1]||r[2]).length)}}function fK(e,t){if(t===null)return new Date(NaN);const n=e.match(oK);if(!n)return new Date(NaN);const r=!!n[4],s=vc(n[1]),o=vc(n[2])-1,l=vc(n[3]),u=vc(n[4]),d=vc(n[5])-1;if(r)return vK(t,u,d)?pK(t,u,d):new Date(NaN);{const h=new Date(0);return!yK(t,o,l)||!xK(t,s)?new Date(NaN):(h.setUTCFullYear(t,o,Math.max(s,l)),h)}}function vc(e){return e?parseInt(e):1}function hK(e){const t=e.match(lK);if(!t)return NaN;const n=ny(t[1]),r=ny(t[2]),s=ny(t[3]);return bK(n,r,s)?n*tM+r*eM+s*1e3:NaN}function ny(e){return e&&parseFloat(e.replace(",","."))||0}function mK(e){if(e==="Z")return 0;const t=e.match(cK);if(!t)return 0;const n=t[1]==="+"?-1:1,r=parseInt(t[2]),s=t[3]&&parseInt(t[3])||0;return wK(r,s)?n*(r*tM+s*eM):NaN}function pK(e,t,n){const r=new Date(0);r.setUTCFullYear(e,0,4);const s=r.getUTCDay()||7,o=(t-1)*7+n+1-s;return r.setUTCDate(r.getUTCDate()+o),r}const gK=[31,null,31,30,31,30,31,31,30,31,30,31];function aM(e){return e%400===0||e%4===0&&e%100!==0}function yK(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(gK[t]||(aM(e)?29:28))}function xK(e,t){return t>=1&&t<=(aM(e)?366:365)}function vK(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function bK(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function wK(e,t){return t>=0&&t<=59}const SK=(e,t="HH:mm:ss.SSS")=>{const n=typeof e=="string"?sK(e):e;return iK(n,t)};var CK=(e,t,n,r,s,o,l,u)=>{let d=document.documentElement,h=["light","dark"];function g(v){(Array.isArray(e)?e:[e]).forEach(S=>{let C=S==="class",E=C&&o?s.map(T=>o[T]||T):s;C?(d.classList.remove(...E),d.classList.add(o&&o[v]?o[v]:v)):d.setAttribute(S,v)}),p(v)}function p(v){u&&h.includes(v)&&(d.style.colorScheme=v)}function x(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)g(r);else try{let v=localStorage.getItem(t)||n,S=l&&v==="system"?x():v;g(S)}catch{}},kK=w.createContext(void 0),TK={setTheme:e=>{},themes:[]},sM=()=>{var e;return(e=w.useContext(kK))!=null?e:TK};w.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:s,defaultTheme:o,value:l,themes:u,nonce:d,scriptProps:h})=>{let g=JSON.stringify([n,t,o,e,u,l,r,s]).slice(1,-1);return w.createElement("script",{...h,suppressHydrationWarning:!0,nonce:typeof window>"u"?d:"",dangerouslySetInnerHTML:{__html:`(${CK.toString()})(${g})`}})});const EK={error:"bg-red-500/10 text-red-700 border-red-200 dark:text-red-400 dark:border-red-800",warn:"bg-yellow-500/10 text-yellow-700 border-yellow-200 dark:text-yellow-400 dark:border-yellow-800",info:"bg-blue-500/10 text-blue-700 border-blue-200 dark:text-blue-400 dark:border-blue-800",debug:"bg-purple-500/10 text-purple-700 border-purple-200 dark:text-purple-400 dark:border-purple-800",trace:"bg-gray-500/10 text-gray-700 border-gray-200 dark:text-gray-400 dark:border-gray-800"};function oM({level:e}){return m.jsx(zr,{variant:"outline",className:Me("font-mono",EK[e]),children:e.toUpperCase()})}function _K({entry:e,isExpanded:t,onToggleExpand:n}){const r=e.data!==void 0||e.error!==void 0,{theme:s}=sM();return m.jsxs("div",{className:"border rounded-lg font-mono",children:[m.jsx("div",{className:`p-3 cursor-pointer hover:bg-muted/50 ${r?"":"cursor-default"}`,onClick:r?n:void 0,children:m.jsxs("div",{className:"flex items-start gap-3",children:[r&&m.jsx("div",{className:"mt-0.5",children:t?m.jsx(al,{className:"h-4 w-4 text-muted-foreground"}):m.jsx(sl,{className:"h-4 w-4 text-muted-foreground"})}),m.jsx("div",{className:"flex-1 min-w-0",children:m.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[m.jsx("span",{className:"text-muted-foreground font-mono text-xs",children:`[${SK(e.timestamp)}]`}),m.jsx(oM,{level:e.level}),m.jsx(zr,{variant:"secondary",children:e.context}),m.jsx("span",{className:"flex-1 break-words",children:e.message})]})})]})}),t&&r&&m.jsxs("div",{className:"border-t bg-muted/20 p-3 space-y-3",children:[e.data!==void 0&&m.jsxs("div",{children:[m.jsx("div",{className:"text-xs font-semibold text-muted-foreground mb-1",children:"DATA:"}),m.jsx("div",{className:"text-xs bg-background border rounded overflow-auto max-h-60",children:m.jsx(_h,{src:e.data,dark:!0,theme:"atom",enableClipboard:!0,displaySize:!1,collapseStringsAfterLength:100,style:{fontSize:"12px",fontFamily:"ui-monospace, SFMono-Regular, 'SF Mono', monospace",backgroundColor:"hsl(var(--background))",padding:"0",borderRadius:"0",border:"none"}})})]}),e.error&&m.jsxs("div",{children:[m.jsx("div",{className:"text-xs font-semibold text-muted-foreground mb-1",children:"ERROR:"}),m.jsxs("pre",{className:"text-xs bg-red-50 dark:bg-red-950/20 border border-red-200 dark:border-red-800 rounded p-2 overflow-auto max-h-40 text-red-700 dark:text-red-400",children:[e.error.message,e.error.stack&&`
355
+
356
+ ${e.error.stack}`]})]})]})]})}const jK=["error","warn","info","debug","trace"];function NK(){const{entries:e}=k7(),[t,n]=w.useState(new Set),[r,s]=w.useState("all"),[o,l]=w.useState(""),[u,d]=w.useState(!1),h=w.useRef(null),g=w.useRef(null),p=w.useMemo(()=>{const S=r==="all"?e:e.filter(E=>E.level===r);if(!o.trim())return S;const C=o.toLowerCase();return S.filter(E=>E.message.toLowerCase().includes(C)||E.context.toLowerCase().includes(C)||E.data&&JSON.stringify(E.data).toLowerCase().includes(C))},[e,r,o]);w.useEffect(()=>{g.current&&g.current.scrollIntoView({behavior:"smooth"})},[e.length]),w.useEffect(()=>{const S=()=>{if(h.current){const{scrollTop:E}=h.current;d(E>200)}},C=h.current;if(C)return C.addEventListener("scroll",S),()=>C.removeEventListener("scroll",S)},[]);const x=()=>{h.current&&h.current.scrollTo({top:0,behavior:"smooth"})},v=S=>{const C=new Set(t);C.has(S)?C.delete(S):C.add(S),n(C)};return m.jsxs("div",{className:"flex flex-col h-full",children:[m.jsxs("div",{className:"border-b bg-background p-4 space-y-4 flex-shrink-0 sticky top-0 z-10",children:[m.jsx("h2",{className:"text-lg font-semibold",children:"Tracing"}),m.jsxs("div",{className:"flex items-center gap-4",children:[m.jsxs(ka,{value:r,onValueChange:S=>s(S),children:[m.jsx(Ea,{className:"w-32",children:m.jsx(Ta,{})}),m.jsxs(_a,{children:[m.jsx(ar,{value:"all",children:"All Levels"}),jK.map(S=>m.jsx(ar,{value:S,children:m.jsx(oM,{level:S})},S))]})]}),m.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[m.jsx(T6,{className:"h-4 w-4"}),m.jsx(zt,{placeholder:"Search logs...",value:o,onChange:S=>l(S.target.value),className:"h-8"})]})]}),m.jsxs("div",{className:"flex items-center gap-4 text-sm text-muted-foreground",children:[m.jsxs("span",{children:["Total: ",e.length]}),m.jsxs("span",{children:["Filtered: ",p.length]})]})]}),m.jsxs("div",{ref:h,className:"flex-1 overflow-y-auto p-4 space-y-2 font-mono text-sm min-h-0",children:[p.length===0?m.jsx("div",{className:"text-center text-muted-foreground py-8",children:e.length===0?"No logs yet":"No logs match current filters"}):p.map((S,C)=>{const E=t.has(C);return m.jsx(_K,{entry:S,isExpanded:E,onToggleExpand:()=>v(C)},`${S.timestamp}-${C}`)}),m.jsx("div",{ref:g})]}),u&&m.jsxs(Je,{onClick:x,size:"sm",className:"fixed bottom-4 right-4 z-20 shadow-lg",variant:"secondary",children:[m.jsx(Mj,{className:"h-4 w-4 mr-1"}),"Top"]})]})}const ry=768;function AK(){const[e,t]=w.useState(void 0);return w.useEffect(()=>{const n=window.matchMedia(`(max-width: ${ry-1}px)`),r=()=>{t(window.innerWidth<ry)};return n.addEventListener("change",r),t(window.innerWidth<ry),()=>n.removeEventListener("change",r)},[]),!!e}function RK({...e}){return m.jsx(k_,{"data-slot":"sheet",...e})}function MK({...e}){return m.jsx(T_,{"data-slot":"sheet-portal",...e})}function OK({className:e,...t}){return m.jsx(E_,{"data-slot":"sheet-overlay",className:Me("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function DK({className:e,children:t,side:n="right",...r}){return m.jsxs(MK,{children:[m.jsx(OK,{}),m.jsxs(__,{"data-slot":"sheet-content",className:Me("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",n==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",n==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",n==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",n==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",e),...r,children:[t,m.jsxs(A_,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[m.jsx(Fo,{className:"size-4"}),m.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function PK({className:e,...t}){return m.jsx("div",{"data-slot":"sheet-header",className:Me("flex flex-col gap-1.5 p-4",e),...t})}function zK({className:e,...t}){return m.jsx(j_,{"data-slot":"sheet-title",className:Me("text-foreground font-semibold",e),...t})}function LK({className:e,...t}){return m.jsx(N_,{"data-slot":"sheet-description",className:Me("text-muted-foreground text-sm",e),...t})}const IK="sidebar_state",BK=3600*24*7,VK="16rem",UK="18rem",HK="3rem",FK="b",lM=w.createContext(null);function M0(){const e=w.useContext(lM);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function $K({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:s,children:o,...l}){const u=AK(),[d,h]=w.useState(!1),[g,p]=w.useState(e),x=t??g,v=w.useCallback(T=>{const R=typeof T=="function"?T(x):T;n?n(R):p(R),document.cookie=`${IK}=${R}; path=/; max-age=${BK}`},[n,x]),S=w.useCallback(()=>u?h(T=>!T):v(T=>!T),[u,v,h]);w.useEffect(()=>{const T=R=>{R.key===FK&&(R.metaKey||R.ctrlKey)&&(R.preventDefault(),S())};return window.addEventListener("keydown",T),()=>window.removeEventListener("keydown",T)},[S]);const C=x?"expanded":"collapsed",E=w.useMemo(()=>({state:C,open:x,setOpen:v,isMobile:u,openMobile:d,setOpenMobile:h,toggleSidebar:S}),[C,x,v,u,d,h,S]);return m.jsx(lM.Provider,{value:E,children:m.jsx(ph,{delayDuration:0,children:m.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":VK,"--sidebar-width-icon":HK,...s},className:Me("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",r),...l,children:o})})})}function qK({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:s,...o}){const{isMobile:l,state:u,openMobile:d,setOpenMobile:h}=M0();return n==="none"?m.jsx("div",{"data-slot":"sidebar",className:Me("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",r),...o,children:s}):l?m.jsx(RK,{open:d,onOpenChange:h,...o,children:m.jsxs(DK,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:{"--sidebar-width":UK},side:e,children:[m.jsxs(PK,{className:"sr-only",children:[m.jsx(zK,{children:"Sidebar"}),m.jsx(LK,{children:"Displays the mobile sidebar."})]}),m.jsx("div",{className:"flex h-full w-full flex-col",children:s})]})}):m.jsxs("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":u,"data-collapsible":u==="collapsed"?n:"","data-variant":t,"data-side":e,"data-slot":"sidebar",children:[m.jsx("div",{"data-slot":"sidebar-gap",className:Me("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),m.jsx("div",{"data-slot":"sidebar-container",className:Me("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",r),...o,children:m.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:s})})]})}function GK({className:e,onClick:t,...n}){const{toggleSidebar:r}=M0();return m.jsxs(Je,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:Me("size-7",e),onClick:s=>{t==null||t(s),r()},...n,children:[m.jsx(g6,{}),m.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function YK({className:e,...t}){return m.jsx("main",{"data-slot":"sidebar-inset",className:Me("bg-background relative flex w-full flex-1 flex-col","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",e),...t})}function ZK({className:e,...t}){return m.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:Me("flex flex-col gap-2 p-2",e),...t})}function XK({className:e,...t}){return m.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:Me("flex flex-col gap-2 p-2",e),...t})}function KK({className:e,...t}){return m.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:Me("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t})}function WK({className:e,...t}){return m.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:Me("relative flex w-full min-w-0 flex-col p-2",e),...t})}function QK({className:e,...t}){return m.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:Me("w-full text-sm",e),...t})}function JK({className:e,...t}){return m.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:Me("flex w-full min-w-0 flex-col gap-1",e),...t})}function eW({className:e,...t}){return m.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:Me("group/menu-item relative",e),...t})}const tW=Sv("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function nW({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:s,className:o,...l}){const u=e?Fx:"button",{isMobile:d,state:h}=M0(),g=m.jsx(u,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":r,"data-active":t,className:Me(tW({variant:n,size:r}),o),...l});return s?(typeof s=="string"&&(s={children:s}),m.jsxs(cs,{children:[m.jsx(us,{asChild:!0,children:g}),m.jsx(ds,{side:"right",align:"center",hidden:h!=="collapsed"||d,...s})]})):g}function rW({items:e,onItemClick:t}){const n=s=>{t&&t(s)},r=s=>s.isActive||!1;return m.jsx(WK,{children:m.jsx(QK,{children:m.jsx(JK,{children:e.map(s=>m.jsx(eW,{children:m.jsxs(nW,{tooltip:s.title,isActive:r(s),onClick:()=>n(s.url),className:r(s)?"[&[data-active=true]]:bg-black/5 dark:[&[data-active=true]]:bg-white/5 cursor-pointer":"cursor-pointer",children:[s.icon&&m.jsx(s.icon,{className:"h-4 w-4"}),m.jsx("span",{children:s.title})]})},s.title))})})})}const wE=[{id:"connection",items:[{title:"MCP Servers",url:"#servers",icon:bh},{title:"Playground",url:"#chat",icon:Dj},{title:"Tracing",url:"#tracing",icon:t6}]},{id:"tools",items:[{title:"Tools",url:"#tools",icon:a6},{title:"Resources",url:"#resources",icon:ky},{title:"Prompts",url:"#prompts",icon:zI}]},{id:"settings",items:[{title:"Settings",url:"#settings",icon:Pj}]}];function iW({onNavigate:e,activeTab:t,...n}){const r=Xo(o=>o.themeMode),s=o=>{e&&o.startsWith("#")&&e(o.slice(1))};return m.jsxs(qK,{collapsible:"offcanvas",...n,children:[m.jsx(ZK,{children:m.jsx("div",{className:"flex items-center justify-center px-4 py-4",children:m.jsx("img",{src:r==="dark"?"/mcp_jam_dark.png":"/mcp_jam_light.png",alt:"MCP Jam",className:"h-4 w-auto"})})}),m.jsx(KK,{children:wE.map((o,l)=>m.jsxs(w.Fragment,{children:[m.jsx(rW,{items:o.items.map(u=>({...u,isActive:u.url===`#${t}`})),onItemClick:s}),l<wE.length-1&&m.jsx("div",{className:"mx-4 my-2 border-t border-border/50"})]},o.id))}),m.jsx(XK,{})]})}function aW(e){switch(e){case"connected":return"bg-green-500 dark:bg-green-400";case"connecting":return"bg-yellow-500 dark:bg-yellow-400 animate-pulse";case"failed":return"bg-red-500 dark:bg-red-400";case"disconnected":return"bg-muted-foreground";default:return"bg-muted-foreground"}}function sW(e){switch(e){case"connected":return"Connected";case"connecting":return"Connecting...";case"failed":return"Failed";case"disconnected":return"Disconnected";default:return"Unknown"}}function oW({connectedServerConfigs:e,selectedServer:t,selectedMultipleServers:n,isMultiSelectEnabled:r,onServerChange:s,onMultiServerToggle:o,onConnect:l}){const[u,d]=w.useState(!1),h=Object.entries(e);return h.length===0?m.jsx("div",{className:"mb-6 p-4 border rounded-lg bg-muted/30 text-center text-sm text-muted-foreground",children:"No servers connected. Add a server to get started."}):m.jsxs("div",{children:[m.jsxs("div",{className:"flex flex-wrap",children:[h.map(([g,p])=>{const x=r?n.includes(g):t===g;return m.jsxs("button",{onClick:()=>r?o(g):s(g),className:Me("group relative flex items-center gap-3 px-4 py-3 border-r border-b border-border transition-all duration-200 cursor-pointer","hover:bg-accent hover:text-accent-foreground",x?"bg-muted text-foreground":"bg-background text-foreground"),children:[r&&m.jsx("div",{className:Me("w-4 h-4 rounded border-2 flex items-center justify-center transition-colors",x?"bg-primary border-primary text-primary-foreground":"border-muted-foreground/30 hover:border-primary/50"),children:x&&m.jsx(wr,{className:"w-3 h-3"})}),m.jsx("div",{className:Me("w-2 h-2 rounded-full",aW(p.connectionStatus)),title:sW(p.connectionStatus)}),m.jsx("span",{className:"text-sm font-medium truncate max-w-36",children:g}),m.jsx("div",{className:"text-xs opacity-70",children:p.config.command?"STDIO":"HTTP"})]},g)}),m.jsxs("button",{onClick:()=>d(!0),className:Me("group relative flex items-center gap-3 px-4 py-3 border-r border-b border-border transition-all duration-200 cursor-pointer","hover:bg-accent hover:text-accent-foreground","bg-background text-muted-foreground border-dashed"),children:[r&&m.jsx("div",{className:"w-4 h-4"}),m.jsx("span",{className:"text-sm font-medium",children:"Add Server"}),m.jsx("div",{className:"text-xs opacity-70",children:"+"})]})]}),m.jsx(Bj,{isOpen:u,onClose:()=>d(!1),onConnect:l})]})}function lW(e){const t=document.documentElement;t.classList.add("disable-transitions"),t.classList.toggle("dark",e==="dark"),requestAnimationFrame(()=>{t.classList.remove("disable-transitions")})}function cW(){const e=Xo(r=>r.themeMode),t=Xo(r=>r.setThemeMode),n=()=>{const r=e==="dark"?"light":"dark";lW(r),t(r)};return m.jsx(Je,{size:"icon",onClick:n,className:"cursor-pointer",children:e==="dark"?m.jsx(M6,{}):m.jsx(m6,{})})}let O0;O0=globalThis.crypto;async function uW(e){return(await O0).getRandomValues(new Uint8Array(e))}async function dW(e){const t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~";let n="";const r=await uW(e);for(let s=0;s<e;s++){const o=r[s]%t.length;n+=t[o]}return n}async function fW(e){return await dW(e)}async function hW(e){const t=await(await O0).subtle.digest("SHA-256",new TextEncoder().encode(e));return btoa(String.fromCharCode(...new Uint8Array(t))).replace(/\//g,"_").replace(/\+/g,"-").replace(/=/g,"")}async function mW(e){if(e||(e=43),e<43||e>128)throw`Expected a length between 43 and 128. Received ${e}.`;const t=await fW(e),n=await hW(t);return{code_verifier:t,code_challenge:n}}var dt;(function(e){e.assertEqual=s=>{};function t(s){}e.assertIs=t;function n(s){throw new Error}e.assertNever=n,e.arrayToEnum=s=>{const o={};for(const l of s)o[l]=l;return o},e.getValidEnumValues=s=>{const o=e.objectKeys(s).filter(u=>typeof s[s[u]]!="number"),l={};for(const u of o)l[u]=s[u];return e.objectValues(l)},e.objectValues=s=>e.objectKeys(s).map(function(o){return s[o]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const o=[];for(const l in s)Object.prototype.hasOwnProperty.call(s,l)&&o.push(l);return o},e.find=(s,o)=>{for(const l of s)if(o(l))return l},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,o=" | "){return s.map(l=>typeof l=="string"?`'${l}'`:l).join(o)}e.joinValues=r,e.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(dt||(dt={}));var SE;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(SE||(SE={}));const ke=dt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ga=e=>{switch(typeof e){case"undefined":return ke.undefined;case"string":return ke.string;case"number":return Number.isNaN(e)?ke.nan:ke.number;case"boolean":return ke.boolean;case"function":return ke.function;case"bigint":return ke.bigint;case"symbol":return ke.symbol;case"object":return Array.isArray(e)?ke.array:e===null?ke.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ke.promise:typeof Map<"u"&&e instanceof Map?ke.map:typeof Set<"u"&&e instanceof Set?ke.set:typeof Date<"u"&&e instanceof Date?ke.date:ke.object;default:return ke.unknown}},ve=dt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Li extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(o){return o.message},r={_errors:[]},s=o=>{for(const l of o.issues)if(l.code==="invalid_union")l.unionErrors.map(s);else if(l.code==="invalid_return_type")s(l.returnTypeError);else if(l.code==="invalid_arguments")s(l.argumentsError);else if(l.path.length===0)r._errors.push(n(l));else{let u=r,d=0;for(;d<l.path.length;){const h=l.path[d];d===l.path.length-1?(u[h]=u[h]||{_errors:[]},u[h]._errors.push(n(l))):u[h]=u[h]||{_errors:[]},u=u[h],d++}}};return s(this),r}static assert(t){if(!(t instanceof Li))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,dt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const s of this.issues)if(s.path.length>0){const o=s.path[0];n[o]=n[o]||[],n[o].push(t(s))}else r.push(t(s));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Li.create=e=>new Li(e);const xx=(e,t)=>{let n;switch(e.code){case ve.invalid_type:e.received===ke.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case ve.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,dt.jsonStringifyReplacer)}`;break;case ve.unrecognized_keys:n=`Unrecognized key(s) in object: ${dt.joinValues(e.keys,", ")}`;break;case ve.invalid_union:n="Invalid input";break;case ve.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${dt.joinValues(e.options)}`;break;case ve.invalid_enum_value:n=`Invalid enum value. Expected ${dt.joinValues(e.options)}, received '${e.received}'`;break;case ve.invalid_arguments:n="Invalid function arguments";break;case ve.invalid_return_type:n="Invalid function return type";break;case ve.invalid_date:n="Invalid date";break;case ve.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:dt.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case ve.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case ve.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case ve.custom:n="Invalid input";break;case ve.invalid_intersection_types:n="Intersection results could not be merged";break;case ve.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case ve.not_finite:n="Number must be finite";break;default:n=t.defaultError,dt.assertNever(e)}return{message:n}};let pW=xx;function gW(){return pW}const yW=e=>{const{data:t,path:n,errorMaps:r,issueData:s}=e,o=[...n,...s.path||[]],l={...s,path:o};if(s.message!==void 0)return{...s,path:o,message:s.message};let u="";const d=r.filter(h=>!!h).slice().reverse();for(const h of d)u=h(l,{data:t,defaultError:u}).message;return{...s,path:o,message:u}};function Se(e,t){const n=gW(),r=yW({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===xx?void 0:xx].filter(s=>!!s)});e.common.issues.push(r)}class On{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const s of n){if(s.status==="aborted")return Ue;s.status==="dirty"&&t.dirty(),r.push(s.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const s of n){const o=await s.key,l=await s.value;r.push({key:o,value:l})}return On.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const s of n){const{key:o,value:l}=s;if(o.status==="aborted"||l.status==="aborted")return Ue;o.status==="dirty"&&t.dirty(),l.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof l.value<"u"||s.alwaysSet)&&(r[o.value]=l.value)}return{status:t.value,value:r}}}const Ue=Object.freeze({status:"aborted"}),Tc=e=>({status:"dirty",value:e}),_r=e=>({status:"valid",value:e}),CE=e=>e.status==="aborted",kE=e=>e.status==="dirty",Ko=e=>e.status==="valid",zf=e=>typeof Promise<"u"&&e instanceof Promise;var Ae;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Ae||(Ae={}));class si{constructor(t,n,r,s){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const TE=(e,t)=>{if(Ko(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Li(e.common.issues);return this._error=n,this._error}}};function Ze(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:s}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:(l,u)=>{const{message:d}=e;return l.code==="invalid_enum_value"?{message:d??u.defaultError}:typeof u.data>"u"?{message:d??r??u.defaultError}:l.code!=="invalid_type"?{message:u.defaultError}:{message:d??n??u.defaultError}},description:s}}class at{get description(){return this._def.description}_getType(t){return ga(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:ga(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new On,ctx:{common:t.parent.common,data:t.data,parsedType:ga(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(zf(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){const r={common:{issues:[],async:(n==null?void 0:n.async)??!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ga(t)},s=this._parseSync({data:t,path:r.path,parent:r});return TE(r,s)}"~validate"(t){var r,s;const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ga(t)};if(!this["~standard"].async)try{const o=this._parseSync({data:t,path:[],parent:n});return Ko(o)?{value:o.value}:{issues:n.common.issues}}catch(o){(s=(r=o==null?void 0:o.message)==null?void 0:r.toLowerCase())!=null&&s.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(o=>Ko(o)?{value:o.value}:{issues:n.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ga(t)},s=this._parse({data:t,path:r.path,parent:r}),o=await(zf(s)?s:Promise.resolve(s));return TE(r,o)}refine(t,n){const r=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,o)=>{const l=t(s),u=()=>o.addIssue({code:ve.custom,...r(s)});return typeof Promise<"u"&&l instanceof Promise?l.then(d=>d?!0:(u(),!1)):l?!0:(u(),!1)})}refinement(t,n){return this._refinement((r,s)=>t(r)?!0:(s.addIssue(typeof n=="function"?n(r,s):n),!1))}_refinement(t){return new Ts({schema:this,typeName:He.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Mi.create(this,this._def)}nullable(){return Es.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ii.create(this)}promise(){return Hf.create(this,this._def)}or(t){return If.create([this,t],this._def)}and(t){return Bf.create(this,t,this._def)}transform(t){return new Ts({...Ze(this._def),schema:this,typeName:He.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Ff({...Ze(this._def),innerType:this,defaultValue:n,typeName:He.ZodDefault})}brand(){return new fM({typeName:He.ZodBranded,type:this,...Ze(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new $f({...Ze(this._def),innerType:this,catchValue:n,typeName:He.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return P0.create(this,t)}readonly(){return qf.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const xW=/^c[^\s-]{8,}$/i,vW=/^[0-9a-z]+$/,bW=/^[0-9A-HJKMNP-TV-Z]{26}$/i,wW=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,SW=/^[a-z0-9_-]{21}$/i,CW=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,kW=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,TW=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,EW="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let iy;const _W=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,jW=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,NW=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,AW=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,RW=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,MW=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,cM="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",OW=new RegExp(`^${cM}$`);function uM(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function DW(e){return new RegExp(`^${uM(e)}$`)}function PW(e){let t=`${cM}T${uM(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function zW(e,t){return!!((t==="v4"||!t)&&_W.test(e)||(t==="v6"||!t)&&NW.test(e))}function LW(e,t){if(!CW.test(e))return!1;try{const[n]=e.split(".");if(!n)return!1;const r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),s=JSON.parse(atob(r));return!(typeof s!="object"||s===null||"typ"in s&&(s==null?void 0:s.typ)!=="JWT"||!s.alg||t&&s.alg!==t)}catch{return!1}}function IW(e,t){return!!((t==="v4"||!t)&&jW.test(e)||(t==="v6"||!t)&&AW.test(e))}class Ri extends at{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ke.string){const o=this._getOrReturnCtx(t);return Se(o,{code:ve.invalid_type,expected:ke.string,received:o.parsedType}),Ue}const r=new On;let s;for(const o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(s=this._getOrReturnCtx(t,s),Se(s,{code:ve.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="max")t.data.length>o.value&&(s=this._getOrReturnCtx(t,s),Se(s,{code:ve.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const l=t.data.length>o.value,u=t.data.length<o.value;(l||u)&&(s=this._getOrReturnCtx(t,s),l?Se(s,{code:ve.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):u&&Se(s,{code:ve.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")TW.test(t.data)||(s=this._getOrReturnCtx(t,s),Se(s,{validation:"email",code:ve.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")iy||(iy=new RegExp(EW,"u")),iy.test(t.data)||(s=this._getOrReturnCtx(t,s),Se(s,{validation:"emoji",code:ve.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")wW.test(t.data)||(s=this._getOrReturnCtx(t,s),Se(s,{validation:"uuid",code:ve.invalid_string,message:o.message}),r.dirty());else if(o.kind==="nanoid")SW.test(t.data)||(s=this._getOrReturnCtx(t,s),Se(s,{validation:"nanoid",code:ve.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")xW.test(t.data)||(s=this._getOrReturnCtx(t,s),Se(s,{validation:"cuid",code:ve.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")vW.test(t.data)||(s=this._getOrReturnCtx(t,s),Se(s,{validation:"cuid2",code:ve.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")bW.test(t.data)||(s=this._getOrReturnCtx(t,s),Se(s,{validation:"ulid",code:ve.invalid_string,message:o.message}),r.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{s=this._getOrReturnCtx(t,s),Se(s,{validation:"url",code:ve.invalid_string,message:o.message}),r.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(s=this._getOrReturnCtx(t,s),Se(s,{validation:"regex",code:ve.invalid_string,message:o.message}),r.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="includes"?t.data.includes(o.value,o.position)||(s=this._getOrReturnCtx(t,s),Se(s,{code:ve.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),r.dirty()):o.kind==="toLowerCase"?t.data=t.data.toLowerCase():o.kind==="toUpperCase"?t.data=t.data.toUpperCase():o.kind==="startsWith"?t.data.startsWith(o.value)||(s=this._getOrReturnCtx(t,s),Se(s,{code:ve.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(s=this._getOrReturnCtx(t,s),Se(s,{code:ve.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?PW(o).test(t.data)||(s=this._getOrReturnCtx(t,s),Se(s,{code:ve.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="date"?OW.test(t.data)||(s=this._getOrReturnCtx(t,s),Se(s,{code:ve.invalid_string,validation:"date",message:o.message}),r.dirty()):o.kind==="time"?DW(o).test(t.data)||(s=this._getOrReturnCtx(t,s),Se(s,{code:ve.invalid_string,validation:"time",message:o.message}),r.dirty()):o.kind==="duration"?kW.test(t.data)||(s=this._getOrReturnCtx(t,s),Se(s,{validation:"duration",code:ve.invalid_string,message:o.message}),r.dirty()):o.kind==="ip"?zW(t.data,o.version)||(s=this._getOrReturnCtx(t,s),Se(s,{validation:"ip",code:ve.invalid_string,message:o.message}),r.dirty()):o.kind==="jwt"?LW(t.data,o.alg)||(s=this._getOrReturnCtx(t,s),Se(s,{validation:"jwt",code:ve.invalid_string,message:o.message}),r.dirty()):o.kind==="cidr"?IW(t.data,o.version)||(s=this._getOrReturnCtx(t,s),Se(s,{validation:"cidr",code:ve.invalid_string,message:o.message}),r.dirty()):o.kind==="base64"?RW.test(t.data)||(s=this._getOrReturnCtx(t,s),Se(s,{validation:"base64",code:ve.invalid_string,message:o.message}),r.dirty()):o.kind==="base64url"?MW.test(t.data)||(s=this._getOrReturnCtx(t,s),Se(s,{validation:"base64url",code:ve.invalid_string,message:o.message}),r.dirty()):dt.assertNever(o);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(s=>t.test(s),{validation:n,code:ve.invalid_string,...Ae.errToObj(r)})}_addCheck(t){return new Ri({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ae.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ae.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ae.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ae.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Ae.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ae.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ae.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ae.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Ae.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Ae.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Ae.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ae.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Ae.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(t==null?void 0:t.offset)??!1,local:(t==null?void 0:t.local)??!1,...Ae.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...Ae.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Ae.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Ae.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Ae.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Ae.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Ae.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Ae.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Ae.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Ae.errToObj(n)})}nonempty(t){return this.min(1,Ae.errToObj(t))}trim(){return new Ri({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Ri({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Ri({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Ri.create=e=>new Ri({checks:[],typeName:He.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...Ze(e)});function BW(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,s=n>r?n:r,o=Number.parseInt(e.toFixed(s).replace(".","")),l=Number.parseInt(t.toFixed(s).replace(".",""));return o%l/10**s}class Wo extends at{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ke.number){const o=this._getOrReturnCtx(t);return Se(o,{code:ve.invalid_type,expected:ke.number,received:o.parsedType}),Ue}let r;const s=new On;for(const o of this._def.checks)o.kind==="int"?dt.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),Se(r,{code:ve.invalid_type,expected:"integer",received:"float",message:o.message}),s.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),Se(r,{code:ve.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),Se(r,{code:ve.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="multipleOf"?BW(t.data,o.value)!==0&&(r=this._getOrReturnCtx(t,r),Se(r,{code:ve.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),Se(r,{code:ve.not_finite,message:o.message}),s.dirty()):dt.assertNever(o);return{status:s.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ae.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ae.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ae.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ae.toString(n))}setLimit(t,n,r,s){return new Wo({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ae.toString(s)}]})}_addCheck(t){return new Wo({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ae.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ae.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ae.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ae.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ae.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ae.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Ae.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ae.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ae.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&dt.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Wo.create=e=>new Wo({checks:[],typeName:He.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ze(e)});class Jc extends at{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==ke.bigint)return this._getInvalidInput(t);let r;const s=new On;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),Se(r,{code:ve.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),Se(r,{code:ve.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),Se(r,{code:ve.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):dt.assertNever(o);return{status:s.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return Se(n,{code:ve.invalid_type,expected:ke.bigint,received:n.parsedType}),Ue}gte(t,n){return this.setLimit("min",t,!0,Ae.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ae.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ae.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ae.toString(n))}setLimit(t,n,r,s){return new Jc({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ae.toString(s)}]})}_addCheck(t){return new Jc({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ae.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ae.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ae.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ae.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ae.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Jc.create=e=>new Jc({checks:[],typeName:He.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...Ze(e)});class vx extends at{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ke.boolean){const r=this._getOrReturnCtx(t);return Se(r,{code:ve.invalid_type,expected:ke.boolean,received:r.parsedType}),Ue}return _r(t.data)}}vx.create=e=>new vx({typeName:He.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ze(e)});class Lf extends at{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ke.date){const o=this._getOrReturnCtx(t);return Se(o,{code:ve.invalid_type,expected:ke.date,received:o.parsedType}),Ue}if(Number.isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return Se(o,{code:ve.invalid_date}),Ue}const r=new On;let s;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(s=this._getOrReturnCtx(t,s),Se(s,{code:ve.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),r.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(s=this._getOrReturnCtx(t,s),Se(s,{code:ve.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):dt.assertNever(o);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Lf({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Ae.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Ae.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Lf.create=e=>new Lf({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:He.ZodDate,...Ze(e)});class EE extends at{_parse(t){if(this._getType(t)!==ke.symbol){const r=this._getOrReturnCtx(t);return Se(r,{code:ve.invalid_type,expected:ke.symbol,received:r.parsedType}),Ue}return _r(t.data)}}EE.create=e=>new EE({typeName:He.ZodSymbol,...Ze(e)});class bx extends at{_parse(t){if(this._getType(t)!==ke.undefined){const r=this._getOrReturnCtx(t);return Se(r,{code:ve.invalid_type,expected:ke.undefined,received:r.parsedType}),Ue}return _r(t.data)}}bx.create=e=>new bx({typeName:He.ZodUndefined,...Ze(e)});class wx extends at{_parse(t){if(this._getType(t)!==ke.null){const r=this._getOrReturnCtx(t);return Se(r,{code:ve.invalid_type,expected:ke.null,received:r.parsedType}),Ue}return _r(t.data)}}wx.create=e=>new wx({typeName:He.ZodNull,...Ze(e)});class Sx extends at{constructor(){super(...arguments),this._any=!0}_parse(t){return _r(t.data)}}Sx.create=e=>new Sx({typeName:He.ZodAny,...Ze(e)});class Cx extends at{constructor(){super(...arguments),this._unknown=!0}_parse(t){return _r(t.data)}}Cx.create=e=>new Cx({typeName:He.ZodUnknown,...Ze(e)});class Aa extends at{_parse(t){const n=this._getOrReturnCtx(t);return Se(n,{code:ve.invalid_type,expected:ke.never,received:n.parsedType}),Ue}}Aa.create=e=>new Aa({typeName:He.ZodNever,...Ze(e)});class _E extends at{_parse(t){if(this._getType(t)!==ke.undefined){const r=this._getOrReturnCtx(t);return Se(r,{code:ve.invalid_type,expected:ke.void,received:r.parsedType}),Ue}return _r(t.data)}}_E.create=e=>new _E({typeName:He.ZodVoid,...Ze(e)});class ii extends at{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),s=this._def;if(n.parsedType!==ke.array)return Se(n,{code:ve.invalid_type,expected:ke.array,received:n.parsedType}),Ue;if(s.exactLength!==null){const l=n.data.length>s.exactLength.value,u=n.data.length<s.exactLength.value;(l||u)&&(Se(n,{code:l?ve.too_big:ve.too_small,minimum:u?s.exactLength.value:void 0,maximum:l?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),r.dirty())}if(s.minLength!==null&&n.data.length<s.minLength.value&&(Se(n,{code:ve.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),r.dirty()),s.maxLength!==null&&n.data.length>s.maxLength.value&&(Se(n,{code:ve.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((l,u)=>s.type._parseAsync(new si(n,l,n.path,u)))).then(l=>On.mergeArray(r,l));const o=[...n.data].map((l,u)=>s.type._parseSync(new si(n,l,n.path,u)));return On.mergeArray(r,o)}get element(){return this._def.type}min(t,n){return new ii({...this._def,minLength:{value:t,message:Ae.toString(n)}})}max(t,n){return new ii({...this._def,maxLength:{value:t,message:Ae.toString(n)}})}length(t,n){return new ii({...this._def,exactLength:{value:t,message:Ae.toString(n)}})}nonempty(t){return this.min(1,t)}}ii.create=(e,t)=>new ii({type:e,minLength:null,maxLength:null,exactLength:null,typeName:He.ZodArray,...Ze(t)});function Eo(e){if(e instanceof Qt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Mi.create(Eo(r))}return new Qt({...e._def,shape:()=>t})}else return e instanceof ii?new ii({...e._def,type:Eo(e.element)}):e instanceof Mi?Mi.create(Eo(e.unwrap())):e instanceof Es?Es.create(Eo(e.unwrap())):e instanceof Cs?Cs.create(e.items.map(t=>Eo(t))):e}class Qt extends at{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=dt.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==ke.object){const h=this._getOrReturnCtx(t);return Se(h,{code:ve.invalid_type,expected:ke.object,received:h.parsedType}),Ue}const{status:r,ctx:s}=this._processInputParams(t),{shape:o,keys:l}=this._getCached(),u=[];if(!(this._def.catchall instanceof Aa&&this._def.unknownKeys==="strip"))for(const h in s.data)l.includes(h)||u.push(h);const d=[];for(const h of l){const g=o[h],p=s.data[h];d.push({key:{status:"valid",value:h},value:g._parse(new si(s,p,s.path,h)),alwaysSet:h in s.data})}if(this._def.catchall instanceof Aa){const h=this._def.unknownKeys;if(h==="passthrough")for(const g of u)d.push({key:{status:"valid",value:g},value:{status:"valid",value:s.data[g]}});else if(h==="strict")u.length>0&&(Se(s,{code:ve.unrecognized_keys,keys:u}),r.dirty());else if(h!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const h=this._def.catchall;for(const g of u){const p=s.data[g];d.push({key:{status:"valid",value:g},value:h._parse(new si(s,p,s.path,g)),alwaysSet:g in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const h=[];for(const g of d){const p=await g.key,x=await g.value;h.push({key:p,value:x,alwaysSet:g.alwaysSet})}return h}).then(h=>On.mergeObjectSync(r,h)):On.mergeObjectSync(r,d)}get shape(){return this._def.shape()}strict(t){return Ae.errToObj,new Qt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,l;const s=((l=(o=this._def).errorMap)==null?void 0:l.call(o,n,r).message)??r.defaultError;return n.code==="unrecognized_keys"?{message:Ae.errToObj(t).message??s}:{message:s}}}:{}})}strip(){return new Qt({...this._def,unknownKeys:"strip"})}passthrough(){return new Qt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Qt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Qt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:He.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Qt({...this._def,catchall:t})}pick(t){const n={};for(const r of dt.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new Qt({...this._def,shape:()=>n})}omit(t){const n={};for(const r of dt.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new Qt({...this._def,shape:()=>n})}deepPartial(){return Eo(this)}partial(t){const n={};for(const r of dt.objectKeys(this.shape)){const s=this.shape[r];t&&!t[r]?n[r]=s:n[r]=s.optional()}return new Qt({...this._def,shape:()=>n})}required(t){const n={};for(const r of dt.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof Mi;)o=o._def.innerType;n[r]=o}return new Qt({...this._def,shape:()=>n})}keyof(){return dM(dt.objectKeys(this.shape))}}Qt.create=(e,t)=>new Qt({shape:()=>e,unknownKeys:"strip",catchall:Aa.create(),typeName:He.ZodObject,...Ze(t)});Qt.strictCreate=(e,t)=>new Qt({shape:()=>e,unknownKeys:"strict",catchall:Aa.create(),typeName:He.ZodObject,...Ze(t)});Qt.lazycreate=(e,t)=>new Qt({shape:e,unknownKeys:"strip",catchall:Aa.create(),typeName:He.ZodObject,...Ze(t)});class If extends at{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function s(o){for(const u of o)if(u.result.status==="valid")return u.result;for(const u of o)if(u.result.status==="dirty")return n.common.issues.push(...u.ctx.common.issues),u.result;const l=o.map(u=>new Li(u.ctx.common.issues));return Se(n,{code:ve.invalid_union,unionErrors:l}),Ue}if(n.common.async)return Promise.all(r.map(async o=>{const l={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:l}),ctx:l}})).then(s);{let o;const l=[];for(const d of r){const h={...n,common:{...n.common,issues:[]},parent:null},g=d._parseSync({data:n.data,path:n.path,parent:h});if(g.status==="valid")return g;g.status==="dirty"&&!o&&(o={result:g,ctx:h}),h.common.issues.length&&l.push(h.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const u=l.map(d=>new Li(d));return Se(n,{code:ve.invalid_union,unionErrors:u}),Ue}}get options(){return this._def.options}}If.create=(e,t)=>new If({options:e,typeName:He.ZodUnion,...Ze(t)});const ji=e=>e instanceof Tx?ji(e.schema):e instanceof Ts?ji(e.innerType()):e instanceof Uf?[e.value]:e instanceof ks?e.options:e instanceof Ex?dt.objectValues(e.enum):e instanceof Ff?ji(e._def.innerType):e instanceof bx?[void 0]:e instanceof wx?[null]:e instanceof Mi?[void 0,...ji(e.unwrap())]:e instanceof Es?[null,...ji(e.unwrap())]:e instanceof fM||e instanceof qf?ji(e.unwrap()):e instanceof $f?ji(e._def.innerType):[];class D0 extends at{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ke.object)return Se(n,{code:ve.invalid_type,expected:ke.object,received:n.parsedType}),Ue;const r=this.discriminator,s=n.data[r],o=this.optionsMap.get(s);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(Se(n,{code:ve.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Ue)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const s=new Map;for(const o of n){const l=ji(o.shape[t]);if(!l.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const u of l){if(s.has(u))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(u)}`);s.set(u,o)}}return new D0({typeName:He.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:s,...Ze(r)})}}function kx(e,t){const n=ga(e),r=ga(t);if(e===t)return{valid:!0,data:e};if(n===ke.object&&r===ke.object){const s=dt.objectKeys(t),o=dt.objectKeys(e).filter(u=>s.indexOf(u)!==-1),l={...e,...t};for(const u of o){const d=kx(e[u],t[u]);if(!d.valid)return{valid:!1};l[u]=d.data}return{valid:!0,data:l}}else if(n===ke.array&&r===ke.array){if(e.length!==t.length)return{valid:!1};const s=[];for(let o=0;o<e.length;o++){const l=e[o],u=t[o],d=kx(l,u);if(!d.valid)return{valid:!1};s.push(d.data)}return{valid:!0,data:s}}else return n===ke.date&&r===ke.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Bf extends at{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),s=(o,l)=>{if(CE(o)||CE(l))return Ue;const u=kx(o.value,l.value);return u.valid?((kE(o)||kE(l))&&n.dirty(),{status:n.value,value:u.data}):(Se(r,{code:ve.invalid_intersection_types}),Ue)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,l])=>s(o,l)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Bf.create=(e,t,n)=>new Bf({left:e,right:t,typeName:He.ZodIntersection,...Ze(n)});class Cs extends at{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ke.array)return Se(r,{code:ve.invalid_type,expected:ke.array,received:r.parsedType}),Ue;if(r.data.length<this._def.items.length)return Se(r,{code:ve.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ue;!this._def.rest&&r.data.length>this._def.items.length&&(Se(r,{code:ve.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...r.data].map((l,u)=>{const d=this._def.items[u]||this._def.rest;return d?d._parse(new si(r,l,r.path,u)):null}).filter(l=>!!l);return r.common.async?Promise.all(o).then(l=>On.mergeArray(n,l)):On.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new Cs({...this._def,rest:t})}}Cs.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Cs({items:e,typeName:He.ZodTuple,rest:null,...Ze(t)})};class Vf extends at{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ke.object)return Se(r,{code:ve.invalid_type,expected:ke.object,received:r.parsedType}),Ue;const s=[],o=this._def.keyType,l=this._def.valueType;for(const u in r.data)s.push({key:o._parse(new si(r,u,r.path,u)),value:l._parse(new si(r,r.data[u],r.path,u)),alwaysSet:u in r.data});return r.common.async?On.mergeObjectAsync(n,s):On.mergeObjectSync(n,s)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof at?new Vf({keyType:t,valueType:n,typeName:He.ZodRecord,...Ze(r)}):new Vf({keyType:Ri.create(),valueType:t,typeName:He.ZodRecord,...Ze(n)})}}class jE extends at{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ke.map)return Se(r,{code:ve.invalid_type,expected:ke.map,received:r.parsedType}),Ue;const s=this._def.keyType,o=this._def.valueType,l=[...r.data.entries()].map(([u,d],h)=>({key:s._parse(new si(r,u,r.path,[h,"key"])),value:o._parse(new si(r,d,r.path,[h,"value"]))}));if(r.common.async){const u=new Map;return Promise.resolve().then(async()=>{for(const d of l){const h=await d.key,g=await d.value;if(h.status==="aborted"||g.status==="aborted")return Ue;(h.status==="dirty"||g.status==="dirty")&&n.dirty(),u.set(h.value,g.value)}return{status:n.value,value:u}})}else{const u=new Map;for(const d of l){const h=d.key,g=d.value;if(h.status==="aborted"||g.status==="aborted")return Ue;(h.status==="dirty"||g.status==="dirty")&&n.dirty(),u.set(h.value,g.value)}return{status:n.value,value:u}}}}jE.create=(e,t,n)=>new jE({valueType:t,keyType:e,typeName:He.ZodMap,...Ze(n)});class eu extends at{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ke.set)return Se(r,{code:ve.invalid_type,expected:ke.set,received:r.parsedType}),Ue;const s=this._def;s.minSize!==null&&r.data.size<s.minSize.value&&(Se(r,{code:ve.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),n.dirty()),s.maxSize!==null&&r.data.size>s.maxSize.value&&(Se(r,{code:ve.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());const o=this._def.valueType;function l(d){const h=new Set;for(const g of d){if(g.status==="aborted")return Ue;g.status==="dirty"&&n.dirty(),h.add(g.value)}return{status:n.value,value:h}}const u=[...r.data.values()].map((d,h)=>o._parse(new si(r,d,r.path,h)));return r.common.async?Promise.all(u).then(d=>l(d)):l(u)}min(t,n){return new eu({...this._def,minSize:{value:t,message:Ae.toString(n)}})}max(t,n){return new eu({...this._def,maxSize:{value:t,message:Ae.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}eu.create=(e,t)=>new eu({valueType:e,minSize:null,maxSize:null,typeName:He.ZodSet,...Ze(t)});class Tx extends at{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}Tx.create=(e,t)=>new Tx({getter:e,typeName:He.ZodLazy,...Ze(t)});class Uf extends at{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return Se(n,{received:n.data,code:ve.invalid_literal,expected:this._def.value}),Ue}return{status:"valid",value:t.data}}get value(){return this._def.value}}Uf.create=(e,t)=>new Uf({value:e,typeName:He.ZodLiteral,...Ze(t)});function dM(e,t){return new ks({values:e,typeName:He.ZodEnum,...Ze(t)})}class ks extends at{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return Se(n,{expected:dt.joinValues(r),received:n.parsedType,code:ve.invalid_type}),Ue}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return Se(n,{received:n.data,code:ve.invalid_enum_value,options:r}),Ue}return _r(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return ks.create(t,{...this._def,...n})}exclude(t,n=this._def){return ks.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}ks.create=dM;class Ex extends at{_parse(t){const n=dt.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==ke.string&&r.parsedType!==ke.number){const s=dt.objectValues(n);return Se(r,{expected:dt.joinValues(s),received:r.parsedType,code:ve.invalid_type}),Ue}if(this._cache||(this._cache=new Set(dt.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const s=dt.objectValues(n);return Se(r,{received:r.data,code:ve.invalid_enum_value,options:s}),Ue}return _r(t.data)}get enum(){return this._def.values}}Ex.create=(e,t)=>new Ex({values:e,typeName:He.ZodNativeEnum,...Ze(t)});class Hf extends at{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ke.promise&&n.common.async===!1)return Se(n,{code:ve.invalid_type,expected:ke.promise,received:n.parsedType}),Ue;const r=n.parsedType===ke.promise?n.data:Promise.resolve(n.data);return _r(r.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Hf.create=(e,t)=>new Hf({type:e,typeName:He.ZodPromise,...Ze(t)});class Ts extends at{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===He.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),s=this._def.effect||null,o={addIssue:l=>{Se(r,l),l.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),s.type==="preprocess"){const l=s.transform(r.data,o);if(r.common.async)return Promise.resolve(l).then(async u=>{if(n.value==="aborted")return Ue;const d=await this._def.schema._parseAsync({data:u,path:r.path,parent:r});return d.status==="aborted"?Ue:d.status==="dirty"||n.value==="dirty"?Tc(d.value):d});{if(n.value==="aborted")return Ue;const u=this._def.schema._parseSync({data:l,path:r.path,parent:r});return u.status==="aborted"?Ue:u.status==="dirty"||n.value==="dirty"?Tc(u.value):u}}if(s.type==="refinement"){const l=u=>{const d=s.refinement(u,o);if(r.common.async)return Promise.resolve(d);if(d instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(r.common.async===!1){const u=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return u.status==="aborted"?Ue:(u.status==="dirty"&&n.dirty(),l(u.value),{status:n.value,value:u.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(u=>u.status==="aborted"?Ue:(u.status==="dirty"&&n.dirty(),l(u.value).then(()=>({status:n.value,value:u.value}))))}if(s.type==="transform")if(r.common.async===!1){const l=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Ko(l))return Ue;const u=s.transform(l.value,o);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:u}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(l=>Ko(l)?Promise.resolve(s.transform(l.value,o)).then(u=>({status:n.value,value:u})):Ue);dt.assertNever(s)}}Ts.create=(e,t,n)=>new Ts({schema:e,typeName:He.ZodEffects,effect:t,...Ze(n)});Ts.createWithPreprocess=(e,t,n)=>new Ts({schema:t,effect:{type:"preprocess",transform:e},typeName:He.ZodEffects,...Ze(n)});class Mi extends at{_parse(t){return this._getType(t)===ke.undefined?_r(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Mi.create=(e,t)=>new Mi({innerType:e,typeName:He.ZodOptional,...Ze(t)});class Es extends at{_parse(t){return this._getType(t)===ke.null?_r(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Es.create=(e,t)=>new Es({innerType:e,typeName:He.ZodNullable,...Ze(t)});class Ff extends at{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===ke.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Ff.create=(e,t)=>new Ff({innerType:e,typeName:He.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ze(t)});class $f extends at{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return zf(s)?s.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Li(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Li(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}$f.create=(e,t)=>new $f({innerType:e,typeName:He.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ze(t)});class NE extends at{_parse(t){if(this._getType(t)!==ke.nan){const r=this._getOrReturnCtx(t);return Se(r,{code:ve.invalid_type,expected:ke.nan,received:r.parsedType}),Ue}return{status:"valid",value:t.data}}}NE.create=e=>new NE({typeName:He.ZodNaN,...Ze(e)});class fM extends at{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class P0 extends at{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Ue:o.status==="dirty"?(n.dirty(),Tc(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const s=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Ue:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:r.path,parent:r})}}static create(t,n){return new P0({in:t,out:n,typeName:He.ZodPipeline})}}class qf extends at{_parse(t){const n=this._def.innerType._parse(t),r=s=>(Ko(s)&&(s.value=Object.freeze(s.value)),s);return zf(n)?n.then(s=>r(s)):r(n)}unwrap(){return this._def.innerType}}qf.create=(e,t)=>new qf({innerType:e,typeName:He.ZodReadonly,...Ze(t)});var He;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(He||(He={}));const re=Ri.create,dn=Wo.create,an=vx.create,VW=Sx.create,yu=Cx.create;Aa.create;const Ne=ii.create,we=Qt.create,Pn=If.create,UW=D0.create;Bf.create;Cs.create;const xu=Vf.create,$e=Uf.create,Ii=ks.create;Hf.create;const pe=Mi.create;Es.create;const hM="2025-06-18",Ih="2.0",mM=Pn([re(),dn().int()]),pM=re(),HW=we({progressToken:pe(mM)}).passthrough(),jr=we({_meta:pe(HW)}).passthrough(),Gn=we({method:re(),params:pe(jr)}),vu=we({_meta:pe(we({}).passthrough())}).passthrough(),ui=we({method:re(),params:pe(vu)}),Nr=we({_meta:pe(we({}).passthrough())}).passthrough(),Bh=Pn([re(),dn().int()]),FW=we({jsonrpc:$e(Ih),id:Bh}).merge(Gn).strict(),$W=we({jsonrpc:$e(Ih)}).merge(ui).strict(),qW=we({jsonrpc:$e(Ih),id:Bh,result:Nr}).strict();var AE;(function(e){e[e.ConnectionClosed=-32e3]="ConnectionClosed",e[e.RequestTimeout=-32001]="RequestTimeout",e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError"})(AE||(AE={}));const GW=we({jsonrpc:$e(Ih),id:Bh,error:we({code:dn().int(),message:re(),data:pe(yu())})}).strict();Pn([FW,$W,qW,GW]);const gM=Nr.strict(),yM=ui.extend({method:$e("notifications/cancelled"),params:vu.extend({requestId:Bh,reason:re().optional()})}),bu=we({name:re(),title:pe(re())}).passthrough(),xM=bu.extend({version:re()}),YW=we({experimental:pe(we({}).passthrough()),sampling:pe(we({}).passthrough()),elicitation:pe(we({}).passthrough()),roots:pe(we({listChanged:pe(an())}).passthrough())}).passthrough(),ZW=Gn.extend({method:$e("initialize"),params:jr.extend({protocolVersion:re(),capabilities:YW,clientInfo:xM})}),XW=we({experimental:pe(we({}).passthrough()),logging:pe(we({}).passthrough()),completions:pe(we({}).passthrough()),prompts:pe(we({listChanged:pe(an())}).passthrough()),resources:pe(we({subscribe:pe(an()),listChanged:pe(an())}).passthrough()),tools:pe(we({listChanged:pe(an())}).passthrough())}).passthrough(),KW=Nr.extend({protocolVersion:re(),capabilities:XW,serverInfo:xM,instructions:pe(re())}),WW=ui.extend({method:$e("notifications/initialized")}),vM=Gn.extend({method:$e("ping")}),QW=we({progress:dn(),total:pe(dn()),message:pe(re())}).passthrough(),bM=ui.extend({method:$e("notifications/progress"),params:vu.merge(QW).extend({progressToken:mM})}),Vh=Gn.extend({params:jr.extend({cursor:pe(pM)}).optional()}),Uh=Nr.extend({nextCursor:pe(pM)}),wM=we({uri:re(),mimeType:pe(re()),_meta:pe(we({}).passthrough())}).passthrough(),SM=wM.extend({text:re()}),z0=re().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),CM=wM.extend({blob:z0}),kM=bu.extend({uri:re(),description:pe(re()),mimeType:pe(re()),_meta:pe(we({}).passthrough())}),JW=bu.extend({uriTemplate:re(),description:pe(re()),mimeType:pe(re()),_meta:pe(we({}).passthrough())}),eQ=Vh.extend({method:$e("resources/list")}),tQ=Uh.extend({resources:Ne(kM)}),nQ=Vh.extend({method:$e("resources/templates/list")}),rQ=Uh.extend({resourceTemplates:Ne(JW)}),iQ=Gn.extend({method:$e("resources/read"),params:jr.extend({uri:re()})}),aQ=Nr.extend({contents:Ne(Pn([SM,CM]))}),sQ=ui.extend({method:$e("notifications/resources/list_changed")}),oQ=Gn.extend({method:$e("resources/subscribe"),params:jr.extend({uri:re()})}),lQ=Gn.extend({method:$e("resources/unsubscribe"),params:jr.extend({uri:re()})}),cQ=ui.extend({method:$e("notifications/resources/updated"),params:vu.extend({uri:re()})}),uQ=we({name:re(),description:pe(re()),required:pe(an())}).passthrough(),dQ=bu.extend({description:pe(re()),arguments:pe(Ne(uQ)),_meta:pe(we({}).passthrough())}),fQ=Vh.extend({method:$e("prompts/list")}),hQ=Uh.extend({prompts:Ne(dQ)}),mQ=Gn.extend({method:$e("prompts/get"),params:jr.extend({name:re(),arguments:pe(xu(re()))})}),L0=we({type:$e("text"),text:re(),_meta:pe(we({}).passthrough())}).passthrough(),I0=we({type:$e("image"),data:z0,mimeType:re(),_meta:pe(we({}).passthrough())}).passthrough(),B0=we({type:$e("audio"),data:z0,mimeType:re(),_meta:pe(we({}).passthrough())}).passthrough(),pQ=we({type:$e("resource"),resource:Pn([SM,CM]),_meta:pe(we({}).passthrough())}).passthrough(),gQ=kM.extend({type:$e("resource_link")}),TM=Pn([L0,I0,B0,gQ,pQ]),yQ=we({role:Ii(["user","assistant"]),content:TM}).passthrough(),xQ=Nr.extend({description:pe(re()),messages:Ne(yQ)}),vQ=ui.extend({method:$e("notifications/prompts/list_changed")}),bQ=we({title:pe(re()),readOnlyHint:pe(an()),destructiveHint:pe(an()),idempotentHint:pe(an()),openWorldHint:pe(an())}).passthrough(),wQ=bu.extend({description:pe(re()),inputSchema:we({type:$e("object"),properties:pe(we({}).passthrough()),required:pe(Ne(re()))}).passthrough(),outputSchema:pe(we({type:$e("object"),properties:pe(we({}).passthrough()),required:pe(Ne(re()))}).passthrough()),annotations:pe(bQ),_meta:pe(we({}).passthrough())}),SQ=Vh.extend({method:$e("tools/list")}),CQ=Uh.extend({tools:Ne(wQ)}),EM=Nr.extend({content:Ne(TM).default([]),structuredContent:we({}).passthrough().optional(),isError:pe(an())});EM.or(Nr.extend({toolResult:yu()}));const kQ=Gn.extend({method:$e("tools/call"),params:jr.extend({name:re(),arguments:pe(xu(yu()))})}),TQ=ui.extend({method:$e("notifications/tools/list_changed")}),_M=Ii(["debug","info","notice","warning","error","critical","alert","emergency"]),EQ=Gn.extend({method:$e("logging/setLevel"),params:jr.extend({level:_M})}),_Q=ui.extend({method:$e("notifications/message"),params:vu.extend({level:_M,logger:pe(re()),data:yu()})}),jQ=we({name:re().optional()}).passthrough(),NQ=we({hints:pe(Ne(jQ)),costPriority:pe(dn().min(0).max(1)),speedPriority:pe(dn().min(0).max(1)),intelligencePriority:pe(dn().min(0).max(1))}).passthrough(),AQ=we({role:Ii(["user","assistant"]),content:Pn([L0,I0,B0])}).passthrough(),RQ=Gn.extend({method:$e("sampling/createMessage"),params:jr.extend({messages:Ne(AQ),systemPrompt:pe(re()),includeContext:pe(Ii(["none","thisServer","allServers"])),temperature:pe(dn()),maxTokens:dn().int(),stopSequences:pe(Ne(re())),metadata:pe(we({}).passthrough()),modelPreferences:pe(NQ)})}),MQ=Nr.extend({model:re(),stopReason:pe(Ii(["endTurn","stopSequence","maxTokens"]).or(re())),role:Ii(["user","assistant"]),content:UW("type",[L0,I0,B0])}),OQ=we({type:$e("boolean"),title:pe(re()),description:pe(re()),default:pe(an())}).passthrough(),DQ=we({type:$e("string"),title:pe(re()),description:pe(re()),minLength:pe(dn()),maxLength:pe(dn()),format:pe(Ii(["email","uri","date","date-time"]))}).passthrough(),PQ=we({type:Ii(["number","integer"]),title:pe(re()),description:pe(re()),minimum:pe(dn()),maximum:pe(dn())}).passthrough(),zQ=we({type:$e("string"),title:pe(re()),description:pe(re()),enum:Ne(re()),enumNames:pe(Ne(re()))}).passthrough(),LQ=Pn([OQ,DQ,PQ,zQ]),IQ=Gn.extend({method:$e("elicitation/create"),params:jr.extend({message:re(),requestedSchema:we({type:$e("object"),properties:xu(re(),LQ),required:pe(Ne(re()))}).passthrough()})}),BQ=Nr.extend({action:Ii(["accept","decline","cancel"]),content:pe(xu(re(),yu()))}),VQ=we({type:$e("ref/resource"),uri:re()}).passthrough(),UQ=we({type:$e("ref/prompt"),name:re()}).passthrough(),HQ=Gn.extend({method:$e("completion/complete"),params:jr.extend({ref:Pn([UQ,VQ]),argument:we({name:re(),value:re()}).passthrough(),context:pe(we({arguments:pe(xu(re(),re()))}))})}),FQ=Nr.extend({completion:we({values:Ne(re()).max(100),total:pe(dn().int()),hasMore:pe(an())}).passthrough()}),$Q=we({uri:re().startsWith("file://"),name:pe(re()),_meta:pe(we({}).passthrough())}).passthrough(),qQ=Gn.extend({method:$e("roots/list")}),GQ=Nr.extend({roots:Ne($Q)}),YQ=ui.extend({method:$e("notifications/roots/list_changed")});Pn([vM,ZW,HQ,EQ,mQ,fQ,eQ,nQ,iQ,oQ,lQ,kQ,SQ]);Pn([yM,bM,WW,YQ]);Pn([gM,MQ,BQ,GQ]);Pn([vM,RQ,IQ,qQ]);Pn([yM,bM,_Q,cQ,sQ,TQ,vQ]);Pn([gM,KW,FQ,xQ,hQ,tQ,rQ,aQ,EM,CQ]);const ZQ=we({resource:re().url(),authorization_servers:Ne(re().url()).optional(),jwks_uri:re().url().optional(),scopes_supported:Ne(re()).optional(),bearer_methods_supported:Ne(re()).optional(),resource_signing_alg_values_supported:Ne(re()).optional(),resource_name:re().optional(),resource_documentation:re().optional(),resource_policy_uri:re().url().optional(),resource_tos_uri:re().url().optional(),tls_client_certificate_bound_access_tokens:an().optional(),authorization_details_types_supported:Ne(re()).optional(),dpop_signing_alg_values_supported:Ne(re()).optional(),dpop_bound_access_tokens_required:an().optional()}).passthrough(),jM=we({issuer:re(),authorization_endpoint:re(),token_endpoint:re(),registration_endpoint:re().optional(),scopes_supported:Ne(re()).optional(),response_types_supported:Ne(re()),response_modes_supported:Ne(re()).optional(),grant_types_supported:Ne(re()).optional(),token_endpoint_auth_methods_supported:Ne(re()).optional(),token_endpoint_auth_signing_alg_values_supported:Ne(re()).optional(),service_documentation:re().optional(),revocation_endpoint:re().optional(),revocation_endpoint_auth_methods_supported:Ne(re()).optional(),revocation_endpoint_auth_signing_alg_values_supported:Ne(re()).optional(),introspection_endpoint:re().optional(),introspection_endpoint_auth_methods_supported:Ne(re()).optional(),introspection_endpoint_auth_signing_alg_values_supported:Ne(re()).optional(),code_challenge_methods_supported:Ne(re()).optional()}).passthrough(),XQ=we({issuer:re(),authorization_endpoint:re(),token_endpoint:re(),userinfo_endpoint:re().optional(),jwks_uri:re(),registration_endpoint:re().optional(),scopes_supported:Ne(re()).optional(),response_types_supported:Ne(re()),response_modes_supported:Ne(re()).optional(),grant_types_supported:Ne(re()).optional(),acr_values_supported:Ne(re()).optional(),subject_types_supported:Ne(re()),id_token_signing_alg_values_supported:Ne(re()),id_token_encryption_alg_values_supported:Ne(re()).optional(),id_token_encryption_enc_values_supported:Ne(re()).optional(),userinfo_signing_alg_values_supported:Ne(re()).optional(),userinfo_encryption_alg_values_supported:Ne(re()).optional(),userinfo_encryption_enc_values_supported:Ne(re()).optional(),request_object_signing_alg_values_supported:Ne(re()).optional(),request_object_encryption_alg_values_supported:Ne(re()).optional(),request_object_encryption_enc_values_supported:Ne(re()).optional(),token_endpoint_auth_methods_supported:Ne(re()).optional(),token_endpoint_auth_signing_alg_values_supported:Ne(re()).optional(),display_values_supported:Ne(re()).optional(),claim_types_supported:Ne(re()).optional(),claims_supported:Ne(re()).optional(),service_documentation:re().optional(),claims_locales_supported:Ne(re()).optional(),ui_locales_supported:Ne(re()).optional(),claims_parameter_supported:an().optional(),request_parameter_supported:an().optional(),request_uri_parameter_supported:an().optional(),require_request_uri_registration:an().optional(),op_policy_uri:re().optional(),op_tos_uri:re().optional()}).passthrough(),KQ=XQ.merge(jM.pick({code_challenge_methods_supported:!0})),NM=we({access_token:re(),id_token:re().optional(),token_type:re(),expires_in:dn().optional(),scope:re().optional(),refresh_token:re().optional()}).strip(),WQ=we({error:re(),error_description:re().optional(),error_uri:re().optional()}),QQ=we({redirect_uris:Ne(re()).refine(e=>e.every(t=>URL.canParse(t)),{message:"redirect_uris must contain valid URLs"}),token_endpoint_auth_method:re().optional(),grant_types:Ne(re()).optional(),response_types:Ne(re()).optional(),client_name:re().optional(),client_uri:re().optional(),logo_uri:re().optional(),scope:re().optional(),contacts:Ne(re()).optional(),tos_uri:re().optional(),policy_uri:re().optional(),jwks_uri:re().optional(),jwks:VW().optional(),software_id:re().optional(),software_version:re().optional(),software_statement:re().optional()}).strip(),JQ=we({client_id:re(),client_secret:re().optional(),client_id_issued_at:dn().optional(),client_secret_expires_at:dn().optional()}).strip(),eJ=QQ.merge(JQ);we({error:re(),error_description:re().optional()}).strip();we({token:re(),token_type_hint:re().optional()}).strip();function tJ(e){const t=typeof e=="string"?new URL(e):new URL(e.href);return t.hash="",t}function nJ({requestedResource:e,configuredResource:t}){const n=typeof e=="string"?new URL(e):new URL(e.href),r=typeof t=="string"?new URL(t):new URL(t.href);if(n.origin!==r.origin||n.pathname.length<r.pathname.length)return!1;const s=n.pathname.endsWith("/")?n.pathname:n.pathname+"/",o=r.pathname.endsWith("/")?r.pathname:r.pathname+"/";return s.startsWith(o)}class vn extends Error{constructor(t,n){super(t),this.errorUri=n,this.name=this.constructor.name}toResponseObject(){const t={error:this.errorCode,error_description:this.message};return this.errorUri&&(t.error_uri=this.errorUri),t}get errorCode(){return this.constructor.errorCode}}class _x extends vn{}_x.errorCode="invalid_request";class Gf extends vn{}Gf.errorCode="invalid_client";class Yf extends vn{}Yf.errorCode="invalid_grant";class Zf extends vn{}Zf.errorCode="unauthorized_client";class jx extends vn{}jx.errorCode="unsupported_grant_type";class Nx extends vn{}Nx.errorCode="invalid_scope";class Ax extends vn{}Ax.errorCode="access_denied";class Qo extends vn{}Qo.errorCode="server_error";class Rx extends vn{}Rx.errorCode="temporarily_unavailable";class Mx extends vn{}Mx.errorCode="unsupported_response_type";class Ox extends vn{}Ox.errorCode="unsupported_token_type";class Dx extends vn{}Dx.errorCode="invalid_token";class Px extends vn{}Px.errorCode="method_not_allowed";class zx extends vn{}zx.errorCode="too_many_requests";class Lx extends vn{}Lx.errorCode="invalid_client_metadata";class Ix extends vn{}Ix.errorCode="insufficient_scope";const rJ={[_x.errorCode]:_x,[Gf.errorCode]:Gf,[Yf.errorCode]:Yf,[Zf.errorCode]:Zf,[jx.errorCode]:jx,[Nx.errorCode]:Nx,[Ax.errorCode]:Ax,[Qo.errorCode]:Qo,[Rx.errorCode]:Rx,[Mx.errorCode]:Mx,[Ox.errorCode]:Ox,[Dx.errorCode]:Dx,[Px.errorCode]:Px,[zx.errorCode]:zx,[Lx.errorCode]:Lx,[Ix.errorCode]:Ix};function AM(e,t){const n=e.client_secret!==void 0;return t.length===0?n?"client_secret_post":"none":n&&t.includes("client_secret_basic")?"client_secret_basic":n&&t.includes("client_secret_post")?"client_secret_post":t.includes("none")?"none":n?"client_secret_post":"none"}function RM(e,t,n,r){const{client_id:s,client_secret:o}=t;switch(e){case"client_secret_basic":iJ(s,o,n);return;case"client_secret_post":aJ(s,o,r);return;case"none":sJ(s,r);return;default:throw new Error(`Unsupported client authentication method: ${e}`)}}function iJ(e,t,n){if(!t)throw new Error("client_secret_basic authentication requires a client_secret");const r=btoa(`${e}:${t}`);n.set("Authorization",`Basic ${r}`)}function aJ(e,t,n){n.set("client_id",e),t&&n.set("client_secret",t)}function sJ(e,t){t.set("client_id",e)}async function V0(e){const t=e instanceof Response?e.status:void 0,n=e instanceof Response?await e.text():e;try{const r=WQ.parse(JSON.parse(n)),{error:s,error_description:o,error_uri:l}=r,u=rJ[s]||Qo;return new u(o||"",l)}catch(r){const s=`${t?`HTTP ${t}: `:""}Invalid OAuth error response: ${r}. Raw body: ${n}`;return new Qo(s)}}async function U0(e,t){var n,r;try{return await ay(e,t)}catch(s){if(s instanceof Gf||s instanceof Zf)return await((n=e.invalidateCredentials)===null||n===void 0?void 0:n.call(e,"all")),await ay(e,t);if(s instanceof Yf)return await((r=e.invalidateCredentials)===null||r===void 0?void 0:r.call(e,"tokens")),await ay(e,t);throw s}}async function ay(e,{serverUrl:t,authorizationCode:n,scope:r,resourceMetadataUrl:s,fetchFn:o}){let l,u;try{l=await lJ(t,{resourceMetadataUrl:s},o),l.authorization_servers&&l.authorization_servers.length>0&&(u=l.authorization_servers[0])}catch{}u||(u=t);const d=await oJ(t,e,l),h=await hJ(u,{fetchFn:o});let g=await Promise.resolve(e.clientInformation());if(!g){if(n!==void 0)throw new Error("Existing OAuth client information is required when exchanging an authorization code");if(!e.saveClientInformation)throw new Error("OAuth client information must be saveable for dynamic registration");const C=await yJ(u,{metadata:h,clientMetadata:e.clientMetadata});await e.saveClientInformation(C),g=C}if(n!==void 0){const C=await e.codeVerifier(),E=await pJ(u,{metadata:h,clientInformation:g,authorizationCode:n,codeVerifier:C,redirectUri:e.redirectUrl,resource:d,addClientAuthentication:e.addClientAuthentication,fetchFn:o});return await e.saveTokens(E),"AUTHORIZED"}const p=await e.tokens();if(p!=null&&p.refresh_token)try{const C=await gJ(u,{metadata:h,clientInformation:g,refreshToken:p.refresh_token,resource:d,addClientAuthentication:e.addClientAuthentication});return await e.saveTokens(C),"AUTHORIZED"}catch(C){if(!(!(C instanceof vn)||C instanceof Qo))throw C}const x=e.state?await e.state():void 0,{authorizationUrl:v,codeVerifier:S}=await mJ(u,{metadata:h,clientInformation:g,state:x,redirectUrl:e.redirectUrl,scope:r||e.clientMetadata.scope,resource:d});return await e.saveCodeVerifier(S),await e.redirectToAuthorization(v),"REDIRECT"}async function oJ(e,t,n){const r=tJ(e);if(t.validateResourceURL)return await t.validateResourceURL(r,n==null?void 0:n.resource);if(n){if(!nJ({requestedResource:r,configuredResource:n.resource}))throw new Error(`Protected resource ${n.resource} does not match expected ${r} (or origin)`);return new URL(n.resource)}}async function lJ(e,t,n=fetch){const r=await dJ(e,"oauth-protected-resource",n,{protocolVersion:t==null?void 0:t.protocolVersion,metadataUrl:t==null?void 0:t.resourceMetadataUrl});if(!r||r.status===404)throw new Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!r.ok)throw new Error(`HTTP ${r.status} trying to load well-known OAuth protected resource metadata.`);return ZQ.parse(await r.json())}async function H0(e,t,n=fetch){try{return await n(e,{headers:t})}catch(r){if(r instanceof TypeError)return t?H0(e,void 0,n):void 0;throw r}}function cJ(e,t="",n={}){return t.endsWith("/")&&(t=t.slice(0,-1)),n.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function RE(e,t,n=fetch){return await H0(e,{"MCP-Protocol-Version":t},n)}function uJ(e,t){return!e||e.status===404&&t!=="/"}async function dJ(e,t,n,r){var s,o;const l=new URL(e),u=(s=r==null?void 0:r.protocolVersion)!==null&&s!==void 0?s:hM;let d;if(r!=null&&r.metadataUrl)d=new URL(r.metadataUrl);else{const g=cJ(t,l.pathname);d=new URL(g,(o=r==null?void 0:r.metadataServerUrl)!==null&&o!==void 0?o:l),d.search=l.search}let h=await RE(d,u,n);if(!(r!=null&&r.metadataUrl)&&uJ(h,l.pathname)){const g=new URL(`/.well-known/${t}`,l);h=await RE(g,u,n)}return h}function fJ(e){const t=typeof e=="string"?new URL(e):e,n=t.pathname!=="/",r=[];if(!n)return r.push({url:new URL("/.well-known/oauth-authorization-server",t.origin),type:"oauth"}),r.push({url:new URL("/.well-known/openid-configuration",t.origin),type:"oidc"}),r;let s=t.pathname;return s.endsWith("/")&&(s=s.slice(0,-1)),r.push({url:new URL(`/.well-known/oauth-authorization-server${s}`,t.origin),type:"oauth"}),r.push({url:new URL("/.well-known/oauth-authorization-server",t.origin),type:"oauth"}),r.push({url:new URL(`/.well-known/openid-configuration${s}`,t.origin),type:"oidc"}),r.push({url:new URL(`${s}/.well-known/openid-configuration`,t.origin),type:"oidc"}),r}async function hJ(e,{fetchFn:t=fetch,protocolVersion:n=hM}={}){var r;const s={"MCP-Protocol-Version":n},o=fJ(e);for(const{url:l,type:u}of o){const d=await H0(l,s,t);if(!d)throw new Error(`CORS error trying to load ${u==="oauth"?"OAuth":"OpenID provider"} metadata from ${l}`);if(!d.ok){if(d.status>=400&&d.status<500)continue;throw new Error(`HTTP ${d.status} trying to load ${u==="oauth"?"OAuth":"OpenID provider"} metadata from ${l}`)}if(u==="oauth")return jM.parse(await d.json());{const h=KQ.parse(await d.json());if(!(!((r=h.code_challenge_methods_supported)===null||r===void 0)&&r.includes("S256")))throw new Error(`Incompatible OIDC provider at ${l}: does not support S256 code challenge method required by MCP specification`);return h}}}async function mJ(e,{metadata:t,clientInformation:n,redirectUrl:r,scope:s,state:o,resource:l}){const u="code",d="S256";let h;if(t){if(h=new URL(t.authorization_endpoint),!t.response_types_supported.includes(u))throw new Error(`Incompatible auth server: does not support response type ${u}`);if(!t.code_challenge_methods_supported||!t.code_challenge_methods_supported.includes(d))throw new Error(`Incompatible auth server: does not support code challenge method ${d}`)}else h=new URL("/authorize",e);const g=await mW(),p=g.code_verifier,x=g.code_challenge;return h.searchParams.set("response_type",u),h.searchParams.set("client_id",n.client_id),h.searchParams.set("code_challenge",x),h.searchParams.set("code_challenge_method",d),h.searchParams.set("redirect_uri",String(r)),o&&h.searchParams.set("state",o),s&&h.searchParams.set("scope",s),s!=null&&s.includes("offline_access")&&h.searchParams.append("prompt","consent"),l&&h.searchParams.set("resource",l.href),{authorizationUrl:h,codeVerifier:p}}async function pJ(e,{metadata:t,clientInformation:n,authorizationCode:r,codeVerifier:s,redirectUri:o,resource:l,addClientAuthentication:u,fetchFn:d}){var h;const g="authorization_code",p=t!=null&&t.token_endpoint?new URL(t.token_endpoint):new URL("/token",e);if(t!=null&&t.grant_types_supported&&!t.grant_types_supported.includes(g))throw new Error(`Incompatible auth server: does not support grant type ${g}`);const x=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"}),v=new URLSearchParams({grant_type:g,code:r,code_verifier:s,redirect_uri:String(o)});if(u)u(x,v,e,t);else{const C=(h=t==null?void 0:t.token_endpoint_auth_methods_supported)!==null&&h!==void 0?h:[],E=AM(n,C);RM(E,n,x,v)}l&&v.set("resource",l.href);const S=await(d??fetch)(p,{method:"POST",headers:x,body:v});if(!S.ok)throw await V0(S);return NM.parse(await S.json())}async function gJ(e,{metadata:t,clientInformation:n,refreshToken:r,resource:s,addClientAuthentication:o,fetchFn:l}){var u;const d="refresh_token";let h;if(t){if(h=new URL(t.token_endpoint),t.grant_types_supported&&!t.grant_types_supported.includes(d))throw new Error(`Incompatible auth server: does not support grant type ${d}`)}else h=new URL("/token",e);const g=new Headers({"Content-Type":"application/x-www-form-urlencoded"}),p=new URLSearchParams({grant_type:d,refresh_token:r});if(o)o(g,p,e,t);else{const v=(u=t==null?void 0:t.token_endpoint_auth_methods_supported)!==null&&u!==void 0?u:[],S=AM(n,v);RM(S,n,g,p)}s&&p.set("resource",s.href);const x=await(l??fetch)(h,{method:"POST",headers:g,body:p});if(!x.ok)throw await V0(x);return NM.parse({refresh_token:r,...await x.json()})}async function yJ(e,{metadata:t,clientMetadata:n,fetchFn:r}){let s;if(t){if(!t.registration_endpoint)throw new Error("Incompatible auth server: does not support dynamic client registration");s=new URL(t.registration_endpoint)}else s=new URL("/register",e);const o=await(r??fetch)(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!o.ok)throw await V0(o);return eJ.parse(await o.json())}const Io=window.fetch;function F0(){return async function(t,n){const r=typeof t=="string"?t:t instanceof URL?t.toString():t.url;if(r.includes("/.well-known/oauth-authorization-server"))try{const s=`/api/mcp/oauth/metadata?url=${encodeURIComponent(r)}`;return await Io(s,{...n,method:"GET"})}catch(s){return console.error("OAuth metadata proxy failed, falling back to direct fetch:",s),await Io(t,n)}return await Io(t,n)}}class $0{constructor(t,n){ua(this,"serverName");ua(this,"redirectUri");ua(this,"customClientId");this.serverName=t,this.redirectUri=`${window.location.origin}/oauth/callback`,this.customClientId=n}get redirectUrl(){return this.redirectUri}get clientMetadata(){return{client_name:`MCP Inspector - ${this.serverName}`,client_uri:"https://github.com/mcpjam/inspector",redirect_uris:[this.redirectUri],grant_types:["authorization_code","refresh_token"],response_types:["code"],token_endpoint_auth_method:"client_secret_post",scope:"mcp:*"}}clientInformation(){const t=localStorage.getItem(`mcp-client-${this.serverName}`),n=t?JSON.parse(t):void 0;return this.customClientId?n?{...n,client_id:this.customClientId}:{client_id:this.customClientId}:n}async saveClientInformation(t){localStorage.setItem(`mcp-client-${this.serverName}`,JSON.stringify(t))}tokens(){const t=localStorage.getItem(`mcp-tokens-${this.serverName}`);return t?JSON.parse(t):void 0}async saveTokens(t){localStorage.setItem(`mcp-tokens-${this.serverName}`,JSON.stringify(t))}async redirectToAuthorization(t){console.log("Setting mcp-oauth-pending to:",this.serverName),localStorage.setItem("mcp-oauth-pending",this.serverName),window.location.href=t.toString()}async saveCodeVerifier(t){localStorage.setItem(`mcp-verifier-${this.serverName}`,t)}codeVerifier(){const t=localStorage.getItem(`mcp-verifier-${this.serverName}`);if(!t)throw new Error("Code verifier not found");return t}async invalidateCredentials(t){switch(t){case"all":localStorage.removeItem(`mcp-tokens-${this.serverName}`),localStorage.removeItem(`mcp-client-${this.serverName}`),localStorage.removeItem(`mcp-verifier-${this.serverName}`);break;case"client":localStorage.removeItem(`mcp-client-${this.serverName}`);break;case"tokens":localStorage.removeItem(`mcp-tokens-${this.serverName}`);break;case"verifier":localStorage.removeItem(`mcp-verifier-${this.serverName}`);break}}}async function xJ(e){var n;const t=F0();window.fetch=t;try{const r=new $0(e.serverName,e.clientId);if(localStorage.setItem(`mcp-serverUrl-${e.serverName}`,e.serverUrl),localStorage.setItem("mcp-oauth-pending",e.serverName),e.clientId){const o=localStorage.getItem(`mcp-client-${e.serverName}`),l=o?JSON.parse(o):{};localStorage.setItem(`mcp-client-${e.serverName}`,JSON.stringify({...l,client_id:e.clientId}))}const s=await U0(r,{serverUrl:e.serverUrl,scope:((n=e.scopes)==null?void 0:n.join(" "))||"mcp:*"});if(s==="REDIRECT")return{success:!0};if(s==="AUTHORIZED"){const o=r.tokens();if(o)return{success:!0,serverConfig:q0(e.serverUrl,o)}}return{success:!1,error:"OAuth flow failed"}}catch(r){let s="Unknown OAuth error";return r instanceof Error&&(s=r.message,s.includes("invalid_client")||s.includes("client_id")?s="Invalid client ID. Please verify the client ID is correctly registered with the OAuth provider.":s.includes("unauthorized_client")?s="Client not authorized. The client ID may not be registered for this server or scope.":s.includes("invalid_request")&&(s="OAuth request invalid. Please check your client ID and try again.")),{success:!1,error:s}}finally{window.fetch=Io}}async function vJ(e){const t=F0();window.fetch=t;try{const n=localStorage.getItem("mcp-oauth-pending");if(!n)throw new Error("No pending OAuth flow found");const r=localStorage.getItem(`mcp-serverUrl-${n}`);if(!r)throw new Error("Server URL not found for OAuth callback");const s=localStorage.getItem(`mcp-client-${n}`),o=s?JSON.parse(s).client_id:void 0,l=new $0(n,o);if(await U0(l,{serverUrl:r,authorizationCode:e,scope:"mcp:*"})==="AUTHORIZED"){const d=l.tokens();if(d)return localStorage.removeItem("mcp-oauth-pending"),{success:!0,serverConfig:q0(r,d),serverName:n}}return{success:!1,error:"Token exchange failed"}}catch(n){let r="Unknown callback error";return n instanceof Error&&(r=n.message,r.includes("invalid_client")||r.includes("client_id")?r="Invalid client ID during token exchange. Please verify the client ID is correctly registered.":r.includes("unauthorized_client")?r="Client not authorized for token exchange. The client ID may not match the one used for authorization.":r.includes("invalid_grant")&&(r="Authorization code invalid or expired. Please try the OAuth flow again.")),{success:!1,error:r}}finally{window.fetch=Io}}function Qd(e){const t=localStorage.getItem(`mcp-tokens-${e}`),n=localStorage.getItem(`mcp-client-${e}`);if(!t)return;const r=JSON.parse(t),s=n?JSON.parse(n):{};return{...r,client_id:s.client_id||r.client_id}}async function bJ(e){const t=F0();window.fetch=t;try{const n=localStorage.getItem(`mcp-client-${e}`),r=n?JSON.parse(n).client_id:void 0,s=new $0(e,r),o=s.tokens();if(!(o!=null&&o.refresh_token))return{success:!1,error:"No refresh token available"};const l=localStorage.getItem(`mcp-serverUrl-${e}`);if(!l)return{success:!1,error:"Server URL not found for token refresh"};if(await U0(s,{serverUrl:l,scope:"mcp:*"})==="AUTHORIZED"){const d=s.tokens();if(d)return{success:!0,serverConfig:q0(l,d)}}return{success:!1,error:"Token refresh failed"}}catch(n){let r="Unknown refresh error";return n instanceof Error&&(r=n.message,r.includes("invalid_client")||r.includes("client_id")?r="Invalid client ID during token refresh. The stored client ID may be incorrect.":r.includes("invalid_grant")?r="Refresh token invalid or expired. Please re-authenticate with the OAuth provider.":r.includes("unauthorized_client")&&(r="Client not authorized for token refresh. Please re-authenticate.")),{success:!1,error:r}}finally{window.fetch=Io}}function wJ(e){localStorage.removeItem(`mcp-tokens-${e}`),localStorage.removeItem(`mcp-client-${e}`),localStorage.removeItem(`mcp-verifier-${e}`),localStorage.removeItem(`mcp-serverUrl-${e}`)}function q0(e,t){return{url:new URL(e),requestInit:{headers:t.access_token?{Authorization:`Bearer ${t.access_token}`}:{}},oauth:t}}const ME="mcp-inspector-state";function SJ(){var O;const e=Vj("Connections"),[t,n]=w.useState({servers:{},selectedServer:"none",selectedMultipleServers:[],isMultiSelectMode:!1});console.log("appState",t);const[r,s]=w.useState(!0),[o,l]=w.useState({});w.useEffect(()=>{const A=localStorage.getItem(ME);if(A)try{const M=JSON.parse(A),N=Object.fromEntries(Object.entries(M.servers||{}).map(([z,P])=>[z,{...P,connectionStatus:P.connectionStatus||"disconnected",retryCount:P.retryCount||0,lastConnectionTime:P.lastConnectionTime?new Date(P.lastConnectionTime):new Date}]));n({servers:N,selectedServer:M.selectedServer||"none",selectedMultipleServers:M.selectedMultipleServers||[],isMultiSelectMode:M.isMultiSelectMode||!1})}catch(M){e.error("Failed to parse saved state",{error:M instanceof Error?M.message:"Unknown error"})}s(!1)},[]),w.useEffect(()=>{r||localStorage.setItem(ME,JSON.stringify(t))},[t,r]);const u=w.useCallback(()=>{n(A=>({...A,selectedMultipleServers:Object.keys(t.servers)}))},[t.servers]);w.useEffect(()=>{if(!r){const A=new URLSearchParams(window.location.search),M=A.get("code"),N=A.get("error");M?g(M):N&&qt.error(`OAuth authorization failed: ${N}`)}},[r]);const d=w.useCallback(A=>A.type==="stdio"?{command:A.command,args:A.args,env:A.env}:{url:new URL(A.url),requestInit:{headers:A.headers||{}}},[]),h=w.useCallback(async A=>{if(console.log("handleConnectFormData",A),A.type==="stdio"){if(!A.command||A.command.trim()===""){qt.error("Command is required for STDIO connections");return}}else{if(!A.url||A.url.trim()===""){qt.error("URL is required for HTTP connections");return}try{new URL(A.url)}catch(N){qt.error(`Invalid URL format: ${A.url} ${N}`);return}}const M=d(A);n(N=>({...N,servers:{...N.servers,[A.name]:{name:A.name,config:M,lastConnectionTime:new Date,connectionStatus:"connecting",retryCount:0}},selectedServer:A.name}));try{if(A.type==="http"&&A.useOAuth&&A.url){n(B=>({...B,servers:{...B.servers,[A.name]:{...B.servers[A.name],connectionStatus:"oauth-flow"}}}));const P=await xJ({serverName:A.name,serverUrl:A.url,scopes:A.oauthScopes||["mcp:*"],clientId:A.clientId});if(P.success)if(P.serverConfig){try{const D=await(await fetch("/api/mcp/connect",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({serverConfig:P.serverConfig})})).json();D.success?(n(H=>({...H,servers:{...H.servers,[A.name]:{...H.servers[A.name],config:P.serverConfig,connectionStatus:"connected",oauthTokens:Qd(A.name),lastError:void 0}}})),qt.success("Connected successfully with OAuth!")):(n(H=>({...H,servers:{...H.servers,[A.name]:{...H.servers[A.name],connectionStatus:"failed",lastError:D.error||"OAuth connection test failed"}}})),qt.error(`OAuth succeeded but connection failed: ${D.error}`))}catch(B){const D=B instanceof Error?B.message:"Unknown error";n(H=>({...H,servers:{...H.servers,[A.name]:{...H.servers[A.name],connectionStatus:"failed",lastError:D}}})),qt.error(`OAuth succeeded but connection test threw error: ${D}`)}return}else{qt.success("OAuth flow initiated. You will be redirected to authorize access.");return}else{n(B=>({...B,servers:{...B.servers,[A.name]:{...B.servers[A.name],connectionStatus:"failed",retryCount:0,lastError:P.error||"OAuth initialization failed"}}})),qt.error(`OAuth initialization failed: ${P.error}`);return}}const z=await(await fetch("/api/mcp/connect",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({serverConfig:M})})).json();z.success?(n(P=>({...P,servers:{...P.servers,[A.name]:{...P.servers[A.name],connectionStatus:"connected",lastConnectionTime:new Date,retryCount:0,lastError:void 0}}})),e.info("Connection successful",{serverName:A.name}),qt.success("Connected successfully!")):(n(P=>({...P,servers:{...P.servers,[A.name]:{...P.servers[A.name],connectionStatus:"failed",retryCount:0,lastError:z.error}}})),e.error("Connection failed",{serverName:A.name,error:z.error}),qt.error(`Failed to connect to ${A.name}`))}catch(N){const z=N instanceof Error?N.message:"Unknown error";n(P=>({...P,servers:{...P.servers,[A.name]:{...P.servers[A.name],connectionStatus:"failed",retryCount:0,lastError:z}}})),e.error("Connection failed",{serverName:A.name,error:z}),qt.error(`Network error: ${z}`)}},[d]);w.useEffect(()=>{if(!r){const A=window.MCP_CLI_CONFIG;if(A&&A.command){e.info("Auto-connecting to CLI-provided MCP server (from window)",{cliConfig:A});const M={name:A.name||"CLI Server",type:"stdio",command:A.command,args:A.args||[]};h(M);return}fetch("/api/mcp-cli-config").then(M=>M.json()).then(M=>{const N=M.config;if(N&&N.command){e.info("Auto-connecting to CLI-provided MCP server (from API)",{cliConfig:N});const z={name:N.name||"CLI Server",type:"stdio",command:N.command,args:N.args||[]};h(z)}}).catch(M=>{e.debug("No CLI config available",{error:M})})}},[r,h,e]);const g=w.useCallback(async A=>{window.history.replaceState({},document.title,window.location.pathname);try{const M=await vJ(A);if(console.log("OAuth callback result:",M),M.success&&M.serverConfig&&M.serverName){const N=M.serverName,z=t.servers[N];!z||z.connectionStatus!=="oauth-flow"?n(P=>({...P,servers:{...P.servers,[N]:{name:N,config:M.serverConfig,oauthTokens:Qd(N),lastConnectionTime:new Date,connectionStatus:"connecting",retryCount:0}},selectedServer:N})):n(P=>({...P,servers:{...P.servers,[N]:{...P.servers[N],config:M.serverConfig,oauthTokens:Qd(N),connectionStatus:"connecting",lastError:void 0}},selectedServer:N}));try{const B=await(await fetch("/api/mcp/connect",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({serverConfig:M.serverConfig})})).json();B.success?(n(D=>({...D,servers:{...D.servers,[N]:{...D.servers[N],connectionStatus:"connected",lastConnectionTime:new Date,lastError:void 0}}})),e.info("OAuth connection successful",{serverName:N}),qt.success(`OAuth connection successful! Connected to ${N}.`)):(n(D=>({...D,servers:{...D.servers,[N]:{...D.servers[N],connectionStatus:"failed",lastError:B.error||"Connection test failed after OAuth"}}})),e.error("OAuth connection test failed",{serverName:N,error:B.error}),qt.error(`OAuth succeeded but connection test failed: ${B.error}`))}catch(P){const B=P instanceof Error?P.message:"Unknown connection error";n(D=>({...D,servers:{...D.servers,[N]:{...D.servers[N],connectionStatus:"failed",lastError:B}}})),e.error("OAuth connection test error",{serverName:N,error:B}),qt.error(`OAuth succeeded but connection test failed: ${B}`)}}else throw new Error(M.error||"OAuth callback failed")}catch(M){const N=M instanceof Error?M.message:"Unknown error";qt.error(`Error completing OAuth flow: ${N}`),e.error("OAuth callback failed",{error:N})}},[t.servers,e]),p=w.useCallback(async A=>{const M=t.servers[A];return M!=null&&M.oauthTokens&&M.oauthTokens.access_token||null},[t.servers]),x=w.useCallback(async A=>{e.info("Disconnecting from server",{serverName:A}),wJ(A),n(M=>{const N={...M.servers};return delete N[A],{...M,servers:N,selectedServer:M.selectedServer===A?"none":M.selectedServer,selectedMultipleServers:M.selectedMultipleServers.filter(z=>z!==A)}})},[]),v=w.useCallback(async A=>{e.info("Reconnecting to server",{serverName:A});const M=t.servers[A];if(!M)throw new Error(`Server ${A} not found`);n(N=>({...N,servers:{...N.servers,[A]:{...M,connectionStatus:"connecting"}}}));try{let N=M.config;if(M.oauthTokens){e.info("Attempting to refresh OAuth tokens",{serverName:A});const B=await bJ(A);B.success&&B.serverConfig?(e.info("OAuth tokens refreshed successfully",{serverName:A}),N=B.serverConfig,n(D=>({...D,servers:{...D.servers,[A]:{...D.servers[A],config:B.serverConfig,oauthTokens:Qd(A)}}}))):e.warn("OAuth token refresh failed, attempting with existing tokens",{serverName:A,error:B.error})}const P=await(await fetch("/api/mcp/connect",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({serverConfig:N})})).json();if(P.success)return n(B=>({...B,servers:{...B.servers,[A]:{...B.servers[A],connectionStatus:"connected",lastConnectionTime:new Date,retryCount:0,lastError:void 0}}})),e.info("Reconnection successful",{serverName:A,result:P}),{success:!0};n(B=>({...B,servers:{...B.servers,[A]:{...B.servers[A],connectionStatus:"failed",retryCount:B.servers[A].retryCount+1,lastError:P.error||"Connection test failed"}}})),e.error("Reconnection failed",{serverName:A,result:P}),qt.error(`Failed to connect: ${A}`)}catch(N){const z=N instanceof Error?N.message:"Unknown error";throw n(P=>({...P,servers:{...P.servers,[A]:{...P.servers[A],connectionStatus:"failed",retryCount:P.servers[A].retryCount+1,lastError:z}}})),e.error("Reconnection failed",{serverName:A,error:z}),N}},[t.servers]);w.useEffect(()=>{Object.keys(o).forEach(A=>{const M=t.servers[A];(!M||M.connectionStatus!=="failed")&&(clearTimeout(o[A]),l(N=>{const z={...N};return delete z[A],z}))})},[t.servers,o]),w.useEffect(()=>()=>{Object.values(o).forEach(clearTimeout)},[o]);const S=w.useCallback(A=>{n(M=>({...M,selectedServer:A}))},[]),C=w.useCallback(A=>{n(M=>({...M,selectedMCPConfigs:A}))},[]),E=w.useCallback(A=>{n(M=>({...M,isMultiSelectMode:A,selectedMultipleServers:A?[]:M.selectedMultipleServers}))},[]),T=w.useCallback(A=>{n(M=>{const N=M.selectedMultipleServers,z=N.includes(A);return{...M,selectedMultipleServers:z?N.filter(P=>P!==A):[...N,A]}})},[]),R=w.useCallback(async(A,M)=>{var B;console.log("handleUpdateFormData",M);const N=t.servers[A];if((N==null?void 0:N.oauthTokens)!=null&&M.useOAuth&&M.name===A&&M.type==="http"&&M.url===((B=N.config.url)==null?void 0:B.toString())){const D=d(M);n(H=>({...H,servers:{...H.servers,[A]:{...H.servers[A],config:D,connectionStatus:"connecting"}}}));try{if((await(await fetch("/api/mcp/connect",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({serverConfig:N.config})})).json()).success){n(X=>({...X,servers:{...X.servers,[A]:{...X.servers[A],config:D,connectionStatus:"connected",lastConnectionTime:new Date,retryCount:0,lastError:void 0}}})),qt.success("Server configuration updated successfully!");return}else console.warn("OAuth connection test failed, falling back to full reconnect")}catch(H){console.warn("OAuth connection test error, falling back to full reconnect",H)}}await x(A),await h(M),t.selectedServer===A&&M.name!==A&&S(M.name)},[t.servers,t.selectedServer,d,x,h,S]);return{appState:t,isLoading:r,connectedServerConfigs:t.servers,selectedServerEntry:t.servers[t.selectedServer],selectedMCPConfig:(O=t.servers[t.selectedServer])==null?void 0:O.config,selectedMCPConfigs:t.selectedMultipleServers.map(A=>t.servers[A]).filter(Boolean),selectedMCPConfigsMap:t.selectedMultipleServers.reduce((A,M)=>(t.servers[M]&&(A[M]=t.servers[M].config),A),{}),isMultiSelectMode:t.isMultiSelectMode,handleConnect:h,handleDisconnect:x,handleReconnect:v,handleUpdate:R,setSelectedServer:S,setSelectedMCPConfigs:C,toggleMultiSelectMode:E,toggleServerSelection:T,getValidAccessToken:p,setSelectedMultipleServersToAllServers:u}}const CJ=({...e})=>{const{theme:t="system"}=sM();return m.jsx(c7,{theme:t,className:"toaster group",style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"},...e})};function kJ(){const[e,t]=w.useState("servers"),{appState:n,isLoading:r,connectedServerConfigs:s,selectedMCPConfig:o,handleConnect:l,handleDisconnect:u,handleReconnect:d,handleUpdate:h,setSelectedServer:g,toggleServerSelection:p,selectedMCPConfigsMap:x,setSelectedMultipleServersToAllServers:v}=SJ(),S=C=>{t(C),C==="chat"&&v()};return r?m.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:m.jsxs("div",{className:"text-center",children:[m.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary mx-auto"}),m.jsx("p",{className:"mt-4 text-muted-foreground",children:"Loading..."})]})}):m.jsxs(YZ,{themeMode:"light",themePreset:"default",children:[m.jsxs($K,{defaultOpen:!0,children:[m.jsx(iW,{onNavigate:S,activeTab:e}),m.jsxs(YK,{className:"flex flex-col",children:[m.jsx("header",{className:"flex h-12 shrink-0 items-center gap-2 border-b transition-[width,height] ease-linear",children:m.jsxs("div",{className:"flex w-full items-center justify-between px-4 lg:px-6",children:[m.jsx("div",{className:"flex items-center gap-1 lg:gap-2",children:m.jsx(GK,{className:"-ml-1"})}),m.jsx("div",{className:"flex items-center gap-2",children:m.jsx(cW,{})})]})}),m.jsxs("div",{className:"flex-1",children:[(e==="tools"||e==="resources"||e==="prompts"||e==="chat")&&m.jsx(oW,{connectedServerConfigs:s,selectedServer:n.selectedServer,onServerChange:g,onConnect:l,isMultiSelectEnabled:e==="chat",onMultiServerToggle:p,selectedMultipleServers:n.selectedMultipleServers}),e==="servers"&&m.jsx(b7,{connectedServerConfigs:s,onConnect:l,onDisconnect:u,onReconnect:d,onUpdate:h}),e==="tools"&&m.jsx(k9,{serverConfig:o}),e==="resources"&&m.jsx(T9,{serverConfig:o}),e==="prompts"&&m.jsx(E9,{serverConfig:o}),e==="chat"&&m.jsx(QZ,{serverConfigs:x}),e==="tracing"&&m.jsx(NK,{}),e==="settings"&&m.jsx(JZ,{})]})]})]}),m.jsx(CJ,{})]})}WD.createRoot(document.getElementById("root")).render(m.jsx(w.StrictMode,{children:m.jsx(kJ,{})}));
357
+ //# sourceMappingURL=index-C2tpp_KC.js.map