morpheus-cli 0.2.8 → 0.3.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,109 @@
1
+ (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const u of o)if(u.type==="childList")for(const l of u.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&i(l)}).observe(document,{childList:!0,subtree:!0});function n(o){const u={};return o.integrity&&(u.integrity=o.integrity),o.referrerPolicy&&(u.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?u.credentials="include":o.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function i(o){if(o.ep)return;o.ep=!0;const u=n(o);fetch(o.href,u)}})();function Sp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var bh={exports:{}},$s={};var $b;function F2(){if($b)return $s;$b=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(i,o,u){var l=null;if(u!==void 0&&(l=""+u),o.key!==void 0&&(l=""+o.key),"key"in o){u={};for(var f in o)f!=="key"&&(u[f]=o[f])}else u=o;return o=u.ref,{$$typeof:e,type:i,key:l,ref:o!==void 0?o:null,props:u}}return $s.Fragment=t,$s.jsx=n,$s.jsxs=n,$s}var Lb;function q2(){return Lb||(Lb=1,bh.exports=F2()),bh.exports}var v=q2(),Sh={exports:{}},Te={};var Ub;function G2(){if(Ub)return Te;Ub=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),l=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),x=Symbol.iterator;function b(C){return C===null||typeof C!="object"?null:(C=x&&C[x]||C["@@iterator"],typeof C=="function"?C:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},z=Object.assign,A={};function j(C,F,k){this.props=C,this.context=F,this.refs=A,this.updater=k||_}j.prototype.isReactComponent={},j.prototype.setState=function(C,F){if(typeof C!="object"&&typeof C!="function"&&C!=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,C,F,"setState")},j.prototype.forceUpdate=function(C){this.updater.enqueueForceUpdate(this,C,"forceUpdate")};function N(){}N.prototype=j.prototype;function T(C,F,k){this.props=C,this.context=F,this.refs=A,this.updater=k||_}var R=T.prototype=new N;R.constructor=T,z(R,j.prototype),R.isPureReactComponent=!0;var L=Array.isArray;function $(){}var q={H:null,A:null,T:null,S:null},P=Object.prototype.hasOwnProperty;function K(C,F,k){var ae=k.ref;return{$$typeof:e,type:C,key:F,ref:ae!==void 0?ae:null,props:k}}function ie(C,F){return K(C.type,F,C.props)}function ne(C){return typeof C=="object"&&C!==null&&C.$$typeof===e}function oe(C){var F={"=":"=0",":":"=2"};return"$"+C.replace(/[=:]/g,function(k){return F[k]})}var we=/\/+/g;function ue(C,F){return typeof C=="object"&&C!==null&&C.key!=null?oe(""+C.key):F.toString(36)}function re(C){switch(C.status){case"fulfilled":return C.value;case"rejected":throw C.reason;default:switch(typeof C.status=="string"?C.then($,$):(C.status="pending",C.then(function(F){C.status==="pending"&&(C.status="fulfilled",C.value=F)},function(F){C.status==="pending"&&(C.status="rejected",C.reason=F)})),C.status){case"fulfilled":return C.value;case"rejected":throw C.reason}}throw C}function V(C,F,k,ae,xe){var me=typeof C;(me==="undefined"||me==="boolean")&&(C=null);var pe=!1;if(C===null)pe=!0;else switch(me){case"bigint":case"string":case"number":pe=!0;break;case"object":switch(C.$$typeof){case e:case t:pe=!0;break;case p:return pe=C._init,V(pe(C._payload),F,k,ae,xe)}}if(pe)return xe=xe(C),pe=ae===""?"."+ue(C,0):ae,L(xe)?(k="",pe!=null&&(k=pe.replace(we,"$&/")+"/"),V(xe,F,k,"",function(Ct){return Ct})):xe!=null&&(ne(xe)&&(xe=ie(xe,k+(xe.key==null||C&&C.key===xe.key?"":(""+xe.key).replace(we,"$&/")+"/")+pe)),F.push(xe)),1;pe=0;var Ge=ae===""?".":ae+":";if(L(C))for(var De=0;De<C.length;De++)ae=C[De],me=Ge+ue(ae,De),pe+=V(ae,F,k,me,xe);else if(De=b(C),typeof De=="function")for(C=De.call(C),De=0;!(ae=C.next()).done;)ae=ae.value,me=Ge+ue(ae,De++),pe+=V(ae,F,k,me,xe);else if(me==="object"){if(typeof C.then=="function")return V(re(C),F,k,ae,xe);throw F=String(C),Error("Objects are not valid as a React child (found: "+(F==="[object Object]"?"object with keys {"+Object.keys(C).join(", ")+"}":F)+"). If you meant to render a collection of children, use an array instead.")}return pe}function X(C,F,k){if(C==null)return C;var ae=[],xe=0;return V(C,ae,"","",function(me){return F.call(k,me,xe++)}),ae}function G(C){if(C._status===-1){var F=C._result;F=F(),F.then(function(k){(C._status===0||C._status===-1)&&(C._status=1,C._result=k)},function(k){(C._status===0||C._status===-1)&&(C._status=2,C._result=k)}),C._status===-1&&(C._status=0,C._result=F)}if(C._status===1)return C._result.default;throw C._result}var ve=typeof reportError=="function"?reportError:function(C){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var F=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof C=="object"&&C!==null&&typeof C.message=="string"?String(C.message):String(C),error:C});if(!window.dispatchEvent(F))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",C);return}console.error(C)},O={map:X,forEach:function(C,F,k){X(C,function(){F.apply(this,arguments)},k)},count:function(C){var F=0;return X(C,function(){F++}),F},toArray:function(C){return X(C,function(F){return F})||[]},only:function(C){if(!ne(C))throw Error("React.Children.only expected to receive a single React element child.");return C}};return Te.Activity=y,Te.Children=O,Te.Component=j,Te.Fragment=n,Te.Profiler=o,Te.PureComponent=T,Te.StrictMode=i,Te.Suspense=d,Te.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=q,Te.__COMPILER_RUNTIME={__proto__:null,c:function(C){return q.H.useMemoCache(C)}},Te.cache=function(C){return function(){return C.apply(null,arguments)}},Te.cacheSignal=function(){return null},Te.cloneElement=function(C,F,k){if(C==null)throw Error("The argument must be a React element, but you passed "+C+".");var ae=z({},C.props),xe=C.key;if(F!=null)for(me in F.key!==void 0&&(xe=""+F.key),F)!P.call(F,me)||me==="key"||me==="__self"||me==="__source"||me==="ref"&&F.ref===void 0||(ae[me]=F[me]);var me=arguments.length-2;if(me===1)ae.children=k;else if(1<me){for(var pe=Array(me),Ge=0;Ge<me;Ge++)pe[Ge]=arguments[Ge+2];ae.children=pe}return K(C.type,xe,ae)},Te.createContext=function(C){return C={$$typeof:l,_currentValue:C,_currentValue2:C,_threadCount:0,Provider:null,Consumer:null},C.Provider=C,C.Consumer={$$typeof:u,_context:C},C},Te.createElement=function(C,F,k){var ae,xe={},me=null;if(F!=null)for(ae in F.key!==void 0&&(me=""+F.key),F)P.call(F,ae)&&ae!=="key"&&ae!=="__self"&&ae!=="__source"&&(xe[ae]=F[ae]);var pe=arguments.length-2;if(pe===1)xe.children=k;else if(1<pe){for(var Ge=Array(pe),De=0;De<pe;De++)Ge[De]=arguments[De+2];xe.children=Ge}if(C&&C.defaultProps)for(ae in pe=C.defaultProps,pe)xe[ae]===void 0&&(xe[ae]=pe[ae]);return K(C,me,xe)},Te.createRef=function(){return{current:null}},Te.forwardRef=function(C){return{$$typeof:f,render:C}},Te.isValidElement=ne,Te.lazy=function(C){return{$$typeof:p,_payload:{_status:-1,_result:C},_init:G}},Te.memo=function(C,F){return{$$typeof:h,type:C,compare:F===void 0?null:F}},Te.startTransition=function(C){var F=q.T,k={};q.T=k;try{var ae=C(),xe=q.S;xe!==null&&xe(k,ae),typeof ae=="object"&&ae!==null&&typeof ae.then=="function"&&ae.then($,ve)}catch(me){ve(me)}finally{F!==null&&k.types!==null&&(F.types=k.types),q.T=F}},Te.unstable_useCacheRefresh=function(){return q.H.useCacheRefresh()},Te.use=function(C){return q.H.use(C)},Te.useActionState=function(C,F,k){return q.H.useActionState(C,F,k)},Te.useCallback=function(C,F){return q.H.useCallback(C,F)},Te.useContext=function(C){return q.H.useContext(C)},Te.useDebugValue=function(){},Te.useDeferredValue=function(C,F){return q.H.useDeferredValue(C,F)},Te.useEffect=function(C,F){return q.H.useEffect(C,F)},Te.useEffectEvent=function(C){return q.H.useEffectEvent(C)},Te.useId=function(){return q.H.useId()},Te.useImperativeHandle=function(C,F,k){return q.H.useImperativeHandle(C,F,k)},Te.useInsertionEffect=function(C,F){return q.H.useInsertionEffect(C,F)},Te.useLayoutEffect=function(C,F){return q.H.useLayoutEffect(C,F)},Te.useMemo=function(C,F){return q.H.useMemo(C,F)},Te.useOptimistic=function(C,F){return q.H.useOptimistic(C,F)},Te.useReducer=function(C,F,k){return q.H.useReducer(C,F,k)},Te.useRef=function(C){return q.H.useRef(C)},Te.useState=function(C){return q.H.useState(C)},Te.useSyncExternalStore=function(C,F,k){return q.H.useSyncExternalStore(C,F,k)},Te.useTransition=function(){return q.H.useTransition()},Te.version="19.2.4",Te}var Vb;function Vc(){return Vb||(Vb=1,Sh.exports=G2()),Sh.exports}var E=Vc();const wp=Sp(E);var wh={exports:{}},Ls={},kh={exports:{}},zh={};var Pb;function Y2(){return Pb||(Pb=1,(function(e){function t(V,X){var G=V.length;V.push(X);e:for(;0<G;){var ve=G-1>>>1,O=V[ve];if(0<o(O,X))V[ve]=X,V[G]=O,G=ve;else break e}}function n(V){return V.length===0?null:V[0]}function i(V){if(V.length===0)return null;var X=V[0],G=V.pop();if(G!==X){V[0]=G;e:for(var ve=0,O=V.length,C=O>>>1;ve<C;){var F=2*(ve+1)-1,k=V[F],ae=F+1,xe=V[ae];if(0>o(k,G))ae<O&&0>o(xe,k)?(V[ve]=xe,V[ae]=G,ve=ae):(V[ve]=k,V[F]=G,ve=F);else if(ae<O&&0>o(xe,G))V[ve]=xe,V[ae]=G,ve=ae;else break e}}return X}function o(V,X){var G=V.sortIndex-X.sortIndex;return G!==0?G:V.id-X.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var l=Date,f=l.now();e.unstable_now=function(){return l.now()-f}}var d=[],h=[],p=1,y=null,x=3,b=!1,_=!1,z=!1,A=!1,j=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function R(V){for(var X=n(h);X!==null;){if(X.callback===null)i(h);else if(X.startTime<=V)i(h),X.sortIndex=X.expirationTime,t(d,X);else break;X=n(h)}}function L(V){if(z=!1,R(V),!_)if(n(d)!==null)_=!0,$||($=!0,oe());else{var X=n(h);X!==null&&re(L,X.startTime-V)}}var $=!1,q=-1,P=5,K=-1;function ie(){return A?!0:!(e.unstable_now()-K<P)}function ne(){if(A=!1,$){var V=e.unstable_now();K=V;var X=!0;try{e:{_=!1,z&&(z=!1,N(q),q=-1),b=!0;var G=x;try{t:{for(R(V),y=n(d);y!==null&&!(y.expirationTime>V&&ie());){var ve=y.callback;if(typeof ve=="function"){y.callback=null,x=y.priorityLevel;var O=ve(y.expirationTime<=V);if(V=e.unstable_now(),typeof O=="function"){y.callback=O,R(V),X=!0;break t}y===n(d)&&i(d),R(V)}else i(d);y=n(d)}if(y!==null)X=!0;else{var C=n(h);C!==null&&re(L,C.startTime-V),X=!1}}break e}finally{y=null,x=G,b=!1}X=void 0}}finally{X?oe():$=!1}}}var oe;if(typeof T=="function")oe=function(){T(ne)};else if(typeof MessageChannel<"u"){var we=new MessageChannel,ue=we.port2;we.port1.onmessage=ne,oe=function(){ue.postMessage(null)}}else oe=function(){j(ne,0)};function re(V,X){q=j(function(){V(e.unstable_now())},X)}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(V){V.callback=null},e.unstable_forceFrameRate=function(V){0>V||125<V?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<V?Math.floor(1e3/V):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_next=function(V){switch(x){case 1:case 2:case 3:var X=3;break;default:X=x}var G=x;x=X;try{return V()}finally{x=G}},e.unstable_requestPaint=function(){A=!0},e.unstable_runWithPriority=function(V,X){switch(V){case 1:case 2:case 3:case 4:case 5:break;default:V=3}var G=x;x=V;try{return X()}finally{x=G}},e.unstable_scheduleCallback=function(V,X,G){var ve=e.unstable_now();switch(typeof G=="object"&&G!==null?(G=G.delay,G=typeof G=="number"&&0<G?ve+G:ve):G=ve,V){case 1:var O=-1;break;case 2:O=250;break;case 5:O=1073741823;break;case 4:O=1e4;break;default:O=5e3}return O=G+O,V={id:p++,callback:X,priorityLevel:V,startTime:G,expirationTime:O,sortIndex:-1},G>ve?(V.sortIndex=G,t(h,V),n(d)===null&&V===n(h)&&(z?(N(q),q=-1):z=!0,re(L,G-ve))):(V.sortIndex=O,t(d,V),_||b||(_=!0,$||($=!0,oe()))),V},e.unstable_shouldYield=ie,e.unstable_wrapCallback=function(V){var X=x;return function(){var G=x;x=X;try{return V.apply(this,arguments)}finally{x=G}}}})(zh)),zh}var Zb;function X2(){return Zb||(Zb=1,kh.exports=Y2()),kh.exports}var _h={exports:{}},en={};var Bb;function K2(){if(Bb)return en;Bb=1;var e=Vc();function t(d){var h="https://react.dev/errors/"+d;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)h+="&args[]="+encodeURIComponent(arguments[p])}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 i={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},o=Symbol.for("react.portal");function u(d,h,p){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:y==null?null:""+y,children:d,containerInfo:h,implementation:p}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(d,h){if(d==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return en.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,en.createPortal=function(d,h){var p=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 u(d,h,null,p)},en.flushSync=function(d){var h=l.T,p=i.p;try{if(l.T=null,i.p=2,d)return d()}finally{l.T=h,i.p=p,i.d.f()}},en.preconnect=function(d,h){typeof d=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,i.d.C(d,h))},en.prefetchDNS=function(d){typeof d=="string"&&i.d.D(d)},en.preinit=function(d,h){if(typeof d=="string"&&h&&typeof h.as=="string"){var p=h.as,y=f(p,h.crossOrigin),x=typeof h.integrity=="string"?h.integrity:void 0,b=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;p==="style"?i.d.S(d,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:y,integrity:x,fetchPriority:b}):p==="script"&&i.d.X(d,{crossOrigin:y,integrity:x,fetchPriority:b,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},en.preinitModule=function(d,h){if(typeof d=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var p=f(h.as,h.crossOrigin);i.d.M(d,{crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&i.d.M(d)},en.preload=function(d,h){if(typeof d=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var p=h.as,y=f(p,h.crossOrigin);i.d.L(d,p,{crossOrigin:y,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})}},en.preloadModule=function(d,h){if(typeof d=="string")if(h){var p=f(h.as,h.crossOrigin);i.d.m(d,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else i.d.m(d)},en.requestFormReset=function(d){i.d.r(d)},en.unstable_batchedUpdates=function(d,h){return d(h)},en.useFormState=function(d,h,p){return l.H.useFormState(d,h,p)},en.useFormStatus=function(){return l.H.useHostTransitionStatus()},en.version="19.2.4",en}var Ib;function J2(){if(Ib)return _h.exports;Ib=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(),_h.exports=K2(),_h.exports}var Hb;function Q2(){if(Hb)return Ls;Hb=1;var e=X2(),t=Vc(),n=J2();function i(r){var a="https://react.dev/errors/"+r;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)a+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+r+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function u(r){var a=r,s=r;if(r.alternate)for(;a.return;)a=a.return;else{r=a;do a=r,(a.flags&4098)!==0&&(s=a.return),r=a.return;while(r)}return a.tag===3?s:null}function l(r){if(r.tag===13){var a=r.memoizedState;if(a===null&&(r=r.alternate,r!==null&&(a=r.memoizedState)),a!==null)return a.dehydrated}return null}function f(r){if(r.tag===31){var a=r.memoizedState;if(a===null&&(r=r.alternate,r!==null&&(a=r.memoizedState)),a!==null)return a.dehydrated}return null}function d(r){if(u(r)!==r)throw Error(i(188))}function h(r){var a=r.alternate;if(!a){if(a=u(r),a===null)throw Error(i(188));return a!==r?null:r}for(var s=r,c=a;;){var m=s.return;if(m===null)break;var g=m.alternate;if(g===null){if(c=m.return,c!==null){s=c;continue}break}if(m.child===g.child){for(g=m.child;g;){if(g===s)return d(m),r;if(g===c)return d(m),a;g=g.sibling}throw Error(i(188))}if(s.return!==c.return)s=m,c=g;else{for(var S=!1,w=m.child;w;){if(w===s){S=!0,s=m,c=g;break}if(w===c){S=!0,c=m,s=g;break}w=w.sibling}if(!S){for(w=g.child;w;){if(w===s){S=!0,s=g,c=m;break}if(w===c){S=!0,c=g,s=m;break}w=w.sibling}if(!S)throw Error(i(189))}}if(s.alternate!==c)throw Error(i(190))}if(s.tag!==3)throw Error(i(188));return s.stateNode.current===s?r:a}function p(r){var a=r.tag;if(a===5||a===26||a===27||a===6)return r;for(r=r.child;r!==null;){if(a=p(r),a!==null)return a;r=r.sibling}return null}var y=Object.assign,x=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),_=Symbol.for("react.portal"),z=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),N=Symbol.for("react.consumer"),T=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),L=Symbol.for("react.suspense"),$=Symbol.for("react.suspense_list"),q=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),K=Symbol.for("react.activity"),ie=Symbol.for("react.memo_cache_sentinel"),ne=Symbol.iterator;function oe(r){return r===null||typeof r!="object"?null:(r=ne&&r[ne]||r["@@iterator"],typeof r=="function"?r:null)}var we=Symbol.for("react.client.reference");function ue(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===we?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case z:return"Fragment";case j:return"Profiler";case A:return"StrictMode";case L:return"Suspense";case $:return"SuspenseList";case K:return"Activity"}if(typeof r=="object")switch(r.$$typeof){case _:return"Portal";case T:return r.displayName||"Context";case N:return(r._context.displayName||"Context")+".Consumer";case R:var a=r.render;return r=r.displayName,r||(r=a.displayName||a.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case q:return a=r.displayName||null,a!==null?a:ue(r.type)||"Memo";case P:a=r._payload,r=r._init;try{return ue(r(a))}catch{}}return null}var re=Array.isArray,V=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G={pending:!1,data:null,method:null,action:null},ve=[],O=-1;function C(r){return{current:r}}function F(r){0>O||(r.current=ve[O],ve[O]=null,O--)}function k(r,a){O++,ve[O]=r.current,r.current=a}var ae=C(null),xe=C(null),me=C(null),pe=C(null);function Ge(r,a){switch(k(me,a),k(xe,r),k(ae,null),a.nodeType){case 9:case 11:r=(r=a.documentElement)&&(r=r.namespaceURI)?ab(r):0;break;default:if(r=a.tagName,a=a.namespaceURI)a=ab(a),r=ob(a,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}F(ae),k(ae,r)}function De(){F(ae),F(xe),F(me)}function Ct(r){r.memoizedState!==null&&k(pe,r);var a=ae.current,s=ob(a,r.type);a!==s&&(k(xe,r),k(ae,s))}function an(r){xe.current===r&&(F(ae),F(xe)),pe.current===r&&(F(pe),Os._currentValue=G)}var $n,hr;function Ln(r){if($n===void 0)try{throw Error()}catch(s){var a=s.stack.trim().match(/\n( *(at )?)/);$n=a&&a[1]||"",hr=-1<s.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+$n+r+hr}var Ui=!1;function Ze(r,a){if(!r||Ui)return"";Ui=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(a){var ee=function(){throw Error()};if(Object.defineProperty(ee.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ee,[])}catch(H){var I=H}Reflect.construct(r,[],ee)}else{try{ee.call()}catch(H){I=H}r.call(ee.prototype)}}else{try{throw Error()}catch(H){I=H}(ee=r())&&typeof ee.catch=="function"&&ee.catch(function(){})}}catch(H){if(H&&I&&typeof H.stack=="string")return[H.stack,I.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var m=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");m&&m.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var g=c.DetermineComponentFrameRoot(),S=g[0],w=g[1];if(S&&w){var M=S.split(`
4
+ `),B=w.split(`
5
+ `);for(m=c=0;c<M.length&&!M[c].includes("DetermineComponentFrameRoot");)c++;for(;m<B.length&&!B[m].includes("DetermineComponentFrameRoot");)m++;if(c===M.length||m===B.length)for(c=M.length-1,m=B.length-1;1<=c&&0<=m&&M[c]!==B[m];)m--;for(;1<=c&&0<=m;c--,m--)if(M[c]!==B[m]){if(c!==1||m!==1)do if(c--,m--,0>m||M[c]!==B[m]){var Y=`
6
+ `+M[c].replace(" at new "," at ");return r.displayName&&Y.includes("<anonymous>")&&(Y=Y.replace("<anonymous>",r.displayName)),Y}while(1<=c&&0<=m);break}}}finally{Ui=!1,Error.prepareStackTrace=s}return(s=r?r.displayName||r.name:"")?Ln(s):""}function tt(r,a){switch(r.tag){case 26:case 27:case 5:return Ln(r.type);case 16:return Ln("Lazy");case 13:return r.child!==a&&a!==null?Ln("Suspense Fallback"):Ln("Suspense");case 19:return Ln("SuspenseList");case 0:case 15:return Ze(r.type,!1);case 11:return Ze(r.type.render,!1);case 1:return Ze(r.type,!0);case 31:return Ln("Activity");default:return""}}function st(r){try{var a="",s=null;do a+=tt(r,s),s=r,r=r.return;while(r);return a}catch(c){return`
7
+ Error generating stack: `+c.message+`
8
+ `+c.stack}}var Je=Object.prototype.hasOwnProperty,Ht=e.unstable_scheduleCallback,Un=e.unstable_cancelCallback,_t=e.unstable_shouldYield,Vt=e.unstable_requestPaint,lt=e.unstable_now,Sa=e.unstable_getCurrentPriorityLevel,J=e.unstable_ImmediatePriority,le=e.unstable_UserBlockingPriority,ge=e.unstable_NormalPriority,ze=e.unstable_LowPriority,Ve=e.unstable_IdlePriority,on=e.log,_n=e.unstable_setDisableYieldValue,sn=null,Pt=null;function hn(r){if(typeof on=="function"&&_n(r),Pt&&typeof Pt.setStrictMode=="function")try{Pt.setStrictMode(sn,r)}catch{}}var nt=Math.clz32?Math.clz32:NE,Qr=Math.log,ir=Math.LN2;function NE(r){return r>>>=0,r===0?32:31-(Qr(r)/ir|0)|0}var Al=256,jl=262144,Nl=4194304;function Vi(r){var a=r&42;if(a!==0)return a;switch(r&-r){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return r&261888;case 262144:case 524288:case 1048576:case 2097152:return r&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return r&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return r}}function Ol(r,a,s){var c=r.pendingLanes;if(c===0)return 0;var m=0,g=r.suspendedLanes,S=r.pingedLanes;r=r.warmLanes;var w=c&134217727;return w!==0?(c=w&~g,c!==0?m=Vi(c):(S&=w,S!==0?m=Vi(S):s||(s=w&~r,s!==0&&(m=Vi(s))))):(w=c&~g,w!==0?m=Vi(w):S!==0?m=Vi(S):s||(s=c&~r,s!==0&&(m=Vi(s)))),m===0?0:a!==0&&a!==m&&(a&g)===0&&(g=m&-m,s=a&-a,g>=s||g===32&&(s&4194048)!==0)?a:m}function Fo(r,a){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&a)===0}function OE(r,a){switch(r){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 Pg(){var r=Nl;return Nl<<=1,(Nl&62914560)===0&&(Nl=4194304),r}function lf(r){for(var a=[],s=0;31>s;s++)a.push(r);return a}function qo(r,a){r.pendingLanes|=a,a!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function RE(r,a,s,c,m,g){var S=r.pendingLanes;r.pendingLanes=s,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=s,r.entangledLanes&=s,r.errorRecoveryDisabledLanes&=s,r.shellSuspendCounter=0;var w=r.entanglements,M=r.expirationTimes,B=r.hiddenUpdates;for(s=S&~s;0<s;){var Y=31-nt(s),ee=1<<Y;w[Y]=0,M[Y]=-1;var I=B[Y];if(I!==null)for(B[Y]=null,Y=0;Y<I.length;Y++){var H=I[Y];H!==null&&(H.lane&=-536870913)}s&=~ee}c!==0&&Zg(r,c,0),g!==0&&m===0&&r.tag!==0&&(r.suspendedLanes|=g&~(S&~a))}function Zg(r,a,s){r.pendingLanes|=a,r.suspendedLanes&=~a;var c=31-nt(a);r.entangledLanes|=a,r.entanglements[c]=r.entanglements[c]|1073741824|s&261930}function Bg(r,a){var s=r.entangledLanes|=a;for(r=r.entanglements;s;){var c=31-nt(s),m=1<<c;m&a|r[c]&a&&(r[c]|=a),s&=~m}}function Ig(r,a){var s=a&-a;return s=(s&42)!==0?1:uf(s),(s&(r.suspendedLanes|a))!==0?0:s}function uf(r){switch(r){case 2:r=1;break;case 8:r=4;break;case 32:r=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:r=128;break;case 268435456:r=134217728;break;default:r=0}return r}function cf(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function Hg(){var r=X.p;return r!==0?r:(r=window.event,r===void 0?32:Ab(r.type))}function Fg(r,a){var s=X.p;try{return X.p=r,a()}finally{X.p=s}}var Wr=Math.random().toString(36).slice(2),Gt="__reactFiber$"+Wr,mn="__reactProps$"+Wr,wa="__reactContainer$"+Wr,ff="__reactEvents$"+Wr,ME="__reactListeners$"+Wr,DE="__reactHandles$"+Wr,qg="__reactResources$"+Wr,Go="__reactMarker$"+Wr;function df(r){delete r[Gt],delete r[mn],delete r[ff],delete r[ME],delete r[DE]}function ka(r){var a=r[Gt];if(a)return a;for(var s=r.parentNode;s;){if(a=s[wa]||s[Gt]){if(s=a.alternate,a.child!==null||s!==null&&s.child!==null)for(r=hb(r);r!==null;){if(s=r[Gt])return s;r=hb(r)}return a}r=s,s=r.parentNode}return null}function za(r){if(r=r[Gt]||r[wa]){var a=r.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return r}return null}function Yo(r){var a=r.tag;if(a===5||a===26||a===27||a===6)return r.stateNode;throw Error(i(33))}function _a(r){var a=r[qg];return a||(a=r[qg]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function Ft(r){r[Go]=!0}var Gg=new Set,Yg={};function Pi(r,a){Ea(r,a),Ea(r+"Capture",a)}function Ea(r,a){for(Yg[r]=a,r=0;r<a.length;r++)Gg.add(a[r])}var $E=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]*$"),Xg={},Kg={};function LE(r){return Je.call(Kg,r)?!0:Je.call(Xg,r)?!1:$E.test(r)?Kg[r]=!0:(Xg[r]=!0,!1)}function Rl(r,a,s){if(LE(a))if(s===null)r.removeAttribute(a);else{switch(typeof s){case"undefined":case"function":case"symbol":r.removeAttribute(a);return;case"boolean":var c=a.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){r.removeAttribute(a);return}}r.setAttribute(a,""+s)}}function Ml(r,a,s){if(s===null)r.removeAttribute(a);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(a);return}r.setAttribute(a,""+s)}}function Tr(r,a,s,c){if(c===null)r.removeAttribute(s);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(s);return}r.setAttributeNS(a,s,""+c)}}function Vn(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function Jg(r){var a=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function UE(r,a,s){var c=Object.getOwnPropertyDescriptor(r.constructor.prototype,a);if(!r.hasOwnProperty(a)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var m=c.get,g=c.set;return Object.defineProperty(r,a,{configurable:!0,get:function(){return m.call(this)},set:function(S){s=""+S,g.call(this,S)}}),Object.defineProperty(r,a,{enumerable:c.enumerable}),{getValue:function(){return s},setValue:function(S){s=""+S},stopTracking:function(){r._valueTracker=null,delete r[a]}}}}function hf(r){if(!r._valueTracker){var a=Jg(r)?"checked":"value";r._valueTracker=UE(r,a,""+r[a])}}function Qg(r){if(!r)return!1;var a=r._valueTracker;if(!a)return!0;var s=a.getValue(),c="";return r&&(c=Jg(r)?r.checked?"true":"false":r.value),r=c,r!==s?(a.setValue(r),!0):!1}function Dl(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}var VE=/[\n"\\]/g;function Pn(r){return r.replace(VE,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function mf(r,a,s,c,m,g,S,w){r.name="",S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?r.type=S:r.removeAttribute("type"),a!=null?S==="number"?(a===0&&r.value===""||r.value!=a)&&(r.value=""+Vn(a)):r.value!==""+Vn(a)&&(r.value=""+Vn(a)):S!=="submit"&&S!=="reset"||r.removeAttribute("value"),a!=null?pf(r,S,Vn(a)):s!=null?pf(r,S,Vn(s)):c!=null&&r.removeAttribute("value"),m==null&&g!=null&&(r.defaultChecked=!!g),m!=null&&(r.checked=m&&typeof m!="function"&&typeof m!="symbol"),w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?r.name=""+Vn(w):r.removeAttribute("name")}function Wg(r,a,s,c,m,g,S,w){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(r.type=g),a!=null||s!=null){if(!(g!=="submit"&&g!=="reset"||a!=null)){hf(r);return}s=s!=null?""+Vn(s):"",a=a!=null?""+Vn(a):s,w||a===r.value||(r.value=a),r.defaultValue=a}c=c??m,c=typeof c!="function"&&typeof c!="symbol"&&!!c,r.checked=w?r.checked:!!c,r.defaultChecked=!!c,S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(r.name=S),hf(r)}function pf(r,a,s){a==="number"&&Dl(r.ownerDocument)===r||r.defaultValue===""+s||(r.defaultValue=""+s)}function Ta(r,a,s,c){if(r=r.options,a){a={};for(var m=0;m<s.length;m++)a["$"+s[m]]=!0;for(s=0;s<r.length;s++)m=a.hasOwnProperty("$"+r[s].value),r[s].selected!==m&&(r[s].selected=m),m&&c&&(r[s].defaultSelected=!0)}else{for(s=""+Vn(s),a=null,m=0;m<r.length;m++){if(r[m].value===s){r[m].selected=!0,c&&(r[m].defaultSelected=!0);return}a!==null||r[m].disabled||(a=r[m])}a!==null&&(a.selected=!0)}}function ey(r,a,s){if(a!=null&&(a=""+Vn(a),a!==r.value&&(r.value=a),s==null)){r.defaultValue!==a&&(r.defaultValue=a);return}r.defaultValue=s!=null?""+Vn(s):""}function ty(r,a,s,c){if(a==null){if(c!=null){if(s!=null)throw Error(i(92));if(re(c)){if(1<c.length)throw Error(i(93));c=c[0]}s=c}s==null&&(s=""),a=s}s=Vn(a),r.defaultValue=s,c=r.textContent,c===s&&c!==""&&c!==null&&(r.value=c),hf(r)}function Ca(r,a){if(a){var s=r.firstChild;if(s&&s===r.lastChild&&s.nodeType===3){s.nodeValue=a;return}}r.textContent=a}var PE=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 ny(r,a,s){var c=a.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?c?r.setProperty(a,""):a==="float"?r.cssFloat="":r[a]="":c?r.setProperty(a,s):typeof s!="number"||s===0||PE.has(a)?a==="float"?r.cssFloat=s:r[a]=(""+s).trim():r[a]=s+"px"}function ry(r,a,s){if(a!=null&&typeof a!="object")throw Error(i(62));if(r=r.style,s!=null){for(var c in s)!s.hasOwnProperty(c)||a!=null&&a.hasOwnProperty(c)||(c.indexOf("--")===0?r.setProperty(c,""):c==="float"?r.cssFloat="":r[c]="");for(var m in a)c=a[m],a.hasOwnProperty(m)&&s[m]!==c&&ny(r,m,c)}else for(var g in a)a.hasOwnProperty(g)&&ny(r,g,a[g])}function gf(r){if(r.indexOf("-")===-1)return!1;switch(r){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 ZE=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"]]),BE=/^[\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 $l(r){return BE.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function Cr(){}var yf=null;function xf(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Aa=null,ja=null;function iy(r){var a=za(r);if(a&&(r=a.stateNode)){var s=r[mn]||null;e:switch(r=a.stateNode,a.type){case"input":if(mf(r,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),a=s.name,s.type==="radio"&&a!=null){for(s=r;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+Pn(""+a)+'"][type="radio"]'),a=0;a<s.length;a++){var c=s[a];if(c!==r&&c.form===r.form){var m=c[mn]||null;if(!m)throw Error(i(90));mf(c,m.value,m.defaultValue,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name)}}for(a=0;a<s.length;a++)c=s[a],c.form===r.form&&Qg(c)}break e;case"textarea":ey(r,s.value,s.defaultValue);break e;case"select":a=s.value,a!=null&&Ta(r,!!s.multiple,a,!1)}}}var vf=!1;function ay(r,a,s){if(vf)return r(a,s);vf=!0;try{var c=r(a);return c}finally{if(vf=!1,(Aa!==null||ja!==null)&&(ku(),Aa&&(a=Aa,r=ja,ja=Aa=null,iy(a),r)))for(a=0;a<r.length;a++)iy(r[a])}}function Xo(r,a){var s=r.stateNode;if(s===null)return null;var c=s[mn]||null;if(c===null)return null;s=c[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":(c=!c.disabled)||(r=r.type,c=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!c;break e;default:r=!1}if(r)return null;if(s&&typeof s!="function")throw Error(i(231,a,typeof s));return s}var Ar=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),bf=!1;if(Ar)try{var Ko={};Object.defineProperty(Ko,"passive",{get:function(){bf=!0}}),window.addEventListener("test",Ko,Ko),window.removeEventListener("test",Ko,Ko)}catch{bf=!1}var ei=null,Sf=null,Ll=null;function oy(){if(Ll)return Ll;var r,a=Sf,s=a.length,c,m="value"in ei?ei.value:ei.textContent,g=m.length;for(r=0;r<s&&a[r]===m[r];r++);var S=s-r;for(c=1;c<=S&&a[s-c]===m[g-c];c++);return Ll=m.slice(r,1<c?1-c:void 0)}function Ul(r){var a=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&a===13&&(r=13)):r=a,r===10&&(r=13),32<=r||r===13?r:0}function Vl(){return!0}function sy(){return!1}function pn(r){function a(s,c,m,g,S){this._reactName=s,this._targetInst=m,this.type=c,this.nativeEvent=g,this.target=S,this.currentTarget=null;for(var w in r)r.hasOwnProperty(w)&&(s=r[w],this[w]=s?s(g):g[w]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?Vl:sy,this.isPropagationStopped=sy,this}return y(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=Vl)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=Vl)},persist:function(){},isPersistent:Vl}),a}var Zi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Pl=pn(Zi),Jo=y({},Zi,{view:0,detail:0}),IE=pn(Jo),wf,kf,Qo,Zl=y({},Jo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_f,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==Qo&&(Qo&&r.type==="mousemove"?(wf=r.screenX-Qo.screenX,kf=r.screenY-Qo.screenY):kf=wf=0,Qo=r),wf)},movementY:function(r){return"movementY"in r?r.movementY:kf}}),ly=pn(Zl),HE=y({},Zl,{dataTransfer:0}),FE=pn(HE),qE=y({},Jo,{relatedTarget:0}),zf=pn(qE),GE=y({},Zi,{animationName:0,elapsedTime:0,pseudoElement:0}),YE=pn(GE),XE=y({},Zi,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),KE=pn(XE),JE=y({},Zi,{data:0}),uy=pn(JE),QE={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},WE={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"},eT={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function tT(r){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(r):(r=eT[r])?!!a[r]:!1}function _f(){return tT}var nT=y({},Jo,{key:function(r){if(r.key){var a=QE[r.key]||r.key;if(a!=="Unidentified")return a}return r.type==="keypress"?(r=Ul(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?WE[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_f,charCode:function(r){return r.type==="keypress"?Ul(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?Ul(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),rT=pn(nT),iT=y({},Zl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),cy=pn(iT),aT=y({},Jo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_f}),oT=pn(aT),sT=y({},Zi,{propertyName:0,elapsedTime:0,pseudoElement:0}),lT=pn(sT),uT=y({},Zl,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),cT=pn(uT),fT=y({},Zi,{newState:0,oldState:0}),dT=pn(fT),hT=[9,13,27,32],Ef=Ar&&"CompositionEvent"in window,Wo=null;Ar&&"documentMode"in document&&(Wo=document.documentMode);var mT=Ar&&"TextEvent"in window&&!Wo,fy=Ar&&(!Ef||Wo&&8<Wo&&11>=Wo),dy=" ",hy=!1;function my(r,a){switch(r){case"keyup":return hT.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function py(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Na=!1;function pT(r,a){switch(r){case"compositionend":return py(a);case"keypress":return a.which!==32?null:(hy=!0,dy);case"textInput":return r=a.data,r===dy&&hy?null:r;default:return null}}function gT(r,a){if(Na)return r==="compositionend"||!Ef&&my(r,a)?(r=oy(),Ll=Sf=ei=null,Na=!1,r):null;switch(r){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 fy&&a.locale!=="ko"?null:a.data;default:return null}}var yT={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 gy(r){var a=r&&r.nodeName&&r.nodeName.toLowerCase();return a==="input"?!!yT[r.type]:a==="textarea"}function yy(r,a,s,c){Aa?ja?ja.push(c):ja=[c]:Aa=c,a=ju(a,"onChange"),0<a.length&&(s=new Pl("onChange","change",null,s,c),r.push({event:s,listeners:a}))}var es=null,ts=null;function xT(r){Wv(r,0)}function Bl(r){var a=Yo(r);if(Qg(a))return r}function xy(r,a){if(r==="change")return a}var vy=!1;if(Ar){var Tf;if(Ar){var Cf="oninput"in document;if(!Cf){var by=document.createElement("div");by.setAttribute("oninput","return;"),Cf=typeof by.oninput=="function"}Tf=Cf}else Tf=!1;vy=Tf&&(!document.documentMode||9<document.documentMode)}function Sy(){es&&(es.detachEvent("onpropertychange",wy),ts=es=null)}function wy(r){if(r.propertyName==="value"&&Bl(ts)){var a=[];yy(a,ts,r,xf(r)),ay(xT,a)}}function vT(r,a,s){r==="focusin"?(Sy(),es=a,ts=s,es.attachEvent("onpropertychange",wy)):r==="focusout"&&Sy()}function bT(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Bl(ts)}function ST(r,a){if(r==="click")return Bl(a)}function wT(r,a){if(r==="input"||r==="change")return Bl(a)}function kT(r,a){return r===a&&(r!==0||1/r===1/a)||r!==r&&a!==a}var En=typeof Object.is=="function"?Object.is:kT;function ns(r,a){if(En(r,a))return!0;if(typeof r!="object"||r===null||typeof a!="object"||a===null)return!1;var s=Object.keys(r),c=Object.keys(a);if(s.length!==c.length)return!1;for(c=0;c<s.length;c++){var m=s[c];if(!Je.call(a,m)||!En(r[m],a[m]))return!1}return!0}function ky(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function zy(r,a){var s=ky(r);r=0;for(var c;s;){if(s.nodeType===3){if(c=r+s.textContent.length,r<=a&&c>=a)return{node:s,offset:a-r};r=c}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=ky(s)}}function _y(r,a){return r&&a?r===a?!0:r&&r.nodeType===3?!1:a&&a.nodeType===3?_y(r,a.parentNode):"contains"in r?r.contains(a):r.compareDocumentPosition?!!(r.compareDocumentPosition(a)&16):!1:!1}function Ey(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var a=Dl(r.document);a instanceof r.HTMLIFrameElement;){try{var s=typeof a.contentWindow.location.href=="string"}catch{s=!1}if(s)r=a.contentWindow;else break;a=Dl(r.document)}return a}function Af(r){var a=r&&r.nodeName&&r.nodeName.toLowerCase();return a&&(a==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||a==="textarea"||r.contentEditable==="true")}var zT=Ar&&"documentMode"in document&&11>=document.documentMode,Oa=null,jf=null,rs=null,Nf=!1;function Ty(r,a,s){var c=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;Nf||Oa==null||Oa!==Dl(c)||(c=Oa,"selectionStart"in c&&Af(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),rs&&ns(rs,c)||(rs=c,c=ju(jf,"onSelect"),0<c.length&&(a=new Pl("onSelect","select",null,a,s),r.push({event:a,listeners:c}),a.target=Oa)))}function Bi(r,a){var s={};return s[r.toLowerCase()]=a.toLowerCase(),s["Webkit"+r]="webkit"+a,s["Moz"+r]="moz"+a,s}var Ra={animationend:Bi("Animation","AnimationEnd"),animationiteration:Bi("Animation","AnimationIteration"),animationstart:Bi("Animation","AnimationStart"),transitionrun:Bi("Transition","TransitionRun"),transitionstart:Bi("Transition","TransitionStart"),transitioncancel:Bi("Transition","TransitionCancel"),transitionend:Bi("Transition","TransitionEnd")},Of={},Cy={};Ar&&(Cy=document.createElement("div").style,"AnimationEvent"in window||(delete Ra.animationend.animation,delete Ra.animationiteration.animation,delete Ra.animationstart.animation),"TransitionEvent"in window||delete Ra.transitionend.transition);function Ii(r){if(Of[r])return Of[r];if(!Ra[r])return r;var a=Ra[r],s;for(s in a)if(a.hasOwnProperty(s)&&s in Cy)return Of[r]=a[s];return r}var Ay=Ii("animationend"),jy=Ii("animationiteration"),Ny=Ii("animationstart"),_T=Ii("transitionrun"),ET=Ii("transitionstart"),TT=Ii("transitioncancel"),Oy=Ii("transitionend"),Ry=new Map,Rf="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(" ");Rf.push("scrollEnd");function ar(r,a){Ry.set(r,a),Pi(a,[r])}var Il=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof r=="object"&&r!==null&&typeof r.message=="string"?String(r.message):String(r),error:r});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",r);return}console.error(r)},Zn=[],Ma=0,Mf=0;function Hl(){for(var r=Ma,a=Mf=Ma=0;a<r;){var s=Zn[a];Zn[a++]=null;var c=Zn[a];Zn[a++]=null;var m=Zn[a];Zn[a++]=null;var g=Zn[a];if(Zn[a++]=null,c!==null&&m!==null){var S=c.pending;S===null?m.next=m:(m.next=S.next,S.next=m),c.pending=m}g!==0&&My(s,m,g)}}function Fl(r,a,s,c){Zn[Ma++]=r,Zn[Ma++]=a,Zn[Ma++]=s,Zn[Ma++]=c,Mf|=c,r.lanes|=c,r=r.alternate,r!==null&&(r.lanes|=c)}function Df(r,a,s,c){return Fl(r,a,s,c),ql(r)}function Hi(r,a){return Fl(r,null,null,a),ql(r)}function My(r,a,s){r.lanes|=s;var c=r.alternate;c!==null&&(c.lanes|=s);for(var m=!1,g=r.return;g!==null;)g.childLanes|=s,c=g.alternate,c!==null&&(c.childLanes|=s),g.tag===22&&(r=g.stateNode,r===null||r._visibility&1||(m=!0)),r=g,g=g.return;return r.tag===3?(g=r.stateNode,m&&a!==null&&(m=31-nt(s),r=g.hiddenUpdates,c=r[m],c===null?r[m]=[a]:c.push(a),a.lane=s|536870912),g):null}function ql(r){if(50<_s)throw _s=0,Hd=null,Error(i(185));for(var a=r.return;a!==null;)r=a,a=r.return;return r.tag===3?r.stateNode:null}var Da={};function CT(r,a,s,c){this.tag=r,this.key=s,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=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Tn(r,a,s,c){return new CT(r,a,s,c)}function $f(r){return r=r.prototype,!(!r||!r.isReactComponent)}function jr(r,a){var s=r.alternate;return s===null?(s=Tn(r.tag,a,r.key,r.mode),s.elementType=r.elementType,s.type=r.type,s.stateNode=r.stateNode,s.alternate=r,r.alternate=s):(s.pendingProps=a,s.type=r.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=r.flags&65011712,s.childLanes=r.childLanes,s.lanes=r.lanes,s.child=r.child,s.memoizedProps=r.memoizedProps,s.memoizedState=r.memoizedState,s.updateQueue=r.updateQueue,a=r.dependencies,s.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},s.sibling=r.sibling,s.index=r.index,s.ref=r.ref,s.refCleanup=r.refCleanup,s}function Dy(r,a){r.flags&=65011714;var s=r.alternate;return s===null?(r.childLanes=0,r.lanes=a,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=s.childLanes,r.lanes=s.lanes,r.child=s.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=s.memoizedProps,r.memoizedState=s.memoizedState,r.updateQueue=s.updateQueue,r.type=s.type,a=s.dependencies,r.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),r}function Gl(r,a,s,c,m,g){var S=0;if(c=r,typeof r=="function")$f(r)&&(S=1);else if(typeof r=="string")S=R2(r,s,ae.current)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case K:return r=Tn(31,s,a,m),r.elementType=K,r.lanes=g,r;case z:return Fi(s.children,m,g,a);case A:S=8,m|=24;break;case j:return r=Tn(12,s,a,m|2),r.elementType=j,r.lanes=g,r;case L:return r=Tn(13,s,a,m),r.elementType=L,r.lanes=g,r;case $:return r=Tn(19,s,a,m),r.elementType=$,r.lanes=g,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case T:S=10;break e;case N:S=9;break e;case R:S=11;break e;case q:S=14;break e;case P:S=16,c=null;break e}S=29,s=Error(i(130,r===null?"null":typeof r,"")),c=null}return a=Tn(S,s,a,m),a.elementType=r,a.type=c,a.lanes=g,a}function Fi(r,a,s,c){return r=Tn(7,r,c,a),r.lanes=s,r}function Lf(r,a,s){return r=Tn(6,r,null,a),r.lanes=s,r}function $y(r){var a=Tn(18,null,null,0);return a.stateNode=r,a}function Uf(r,a,s){return a=Tn(4,r.children!==null?r.children:[],r.key,a),a.lanes=s,a.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},a}var Ly=new WeakMap;function Bn(r,a){if(typeof r=="object"&&r!==null){var s=Ly.get(r);return s!==void 0?s:(a={value:r,source:a,stack:st(a)},Ly.set(r,a),a)}return{value:r,source:a,stack:st(a)}}var $a=[],La=0,Yl=null,is=0,In=[],Hn=0,ti=null,mr=1,pr="";function Nr(r,a){$a[La++]=is,$a[La++]=Yl,Yl=r,is=a}function Uy(r,a,s){In[Hn++]=mr,In[Hn++]=pr,In[Hn++]=ti,ti=r;var c=mr;r=pr;var m=32-nt(c)-1;c&=~(1<<m),s+=1;var g=32-nt(a)+m;if(30<g){var S=m-m%5;g=(c&(1<<S)-1).toString(32),c>>=S,m-=S,mr=1<<32-nt(a)+m|s<<m|c,pr=g+r}else mr=1<<g|s<<m|c,pr=r}function Vf(r){r.return!==null&&(Nr(r,1),Uy(r,1,0))}function Pf(r){for(;r===Yl;)Yl=$a[--La],$a[La]=null,is=$a[--La],$a[La]=null;for(;r===ti;)ti=In[--Hn],In[Hn]=null,pr=In[--Hn],In[Hn]=null,mr=In[--Hn],In[Hn]=null}function Vy(r,a){In[Hn++]=mr,In[Hn++]=pr,In[Hn++]=ti,mr=a.id,pr=a.overflow,ti=r}var Yt=null,ut=null,Ue=!1,ni=null,Fn=!1,Zf=Error(i(519));function ri(r){var a=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw as(Bn(a,r)),Zf}function Py(r){var a=r.stateNode,s=r.type,c=r.memoizedProps;switch(a[Gt]=r,a[mn]=c,s){case"dialog":Re("cancel",a),Re("close",a);break;case"iframe":case"object":case"embed":Re("load",a);break;case"video":case"audio":for(s=0;s<Ts.length;s++)Re(Ts[s],a);break;case"source":Re("error",a);break;case"img":case"image":case"link":Re("error",a),Re("load",a);break;case"details":Re("toggle",a);break;case"input":Re("invalid",a),Wg(a,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":Re("invalid",a);break;case"textarea":Re("invalid",a),ty(a,c.value,c.defaultValue,c.children)}s=c.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||a.textContent===""+s||c.suppressHydrationWarning===!0||rb(a.textContent,s)?(c.popover!=null&&(Re("beforetoggle",a),Re("toggle",a)),c.onScroll!=null&&Re("scroll",a),c.onScrollEnd!=null&&Re("scrollend",a),c.onClick!=null&&(a.onclick=Cr),a=!0):a=!1,a||ri(r,!0)}function Zy(r){for(Yt=r.return;Yt;)switch(Yt.tag){case 5:case 31:case 13:Fn=!1;return;case 27:case 3:Fn=!0;return;default:Yt=Yt.return}}function Ua(r){if(r!==Yt)return!1;if(!Ue)return Zy(r),Ue=!0,!1;var a=r.tag,s;if((s=a!==3&&a!==27)&&((s=a===5)&&(s=r.type,s=!(s!=="form"&&s!=="button")||ah(r.type,r.memoizedProps)),s=!s),s&&ut&&ri(r),Zy(r),a===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(317));ut=db(r)}else if(a===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(317));ut=db(r)}else a===27?(a=ut,yi(r.type)?(r=ch,ch=null,ut=r):ut=a):ut=Yt?Gn(r.stateNode.nextSibling):null;return!0}function qi(){ut=Yt=null,Ue=!1}function Bf(){var r=ni;return r!==null&&(vn===null?vn=r:vn.push.apply(vn,r),ni=null),r}function as(r){ni===null?ni=[r]:ni.push(r)}var If=C(null),Gi=null,Or=null;function ii(r,a,s){k(If,a._currentValue),a._currentValue=s}function Rr(r){r._currentValue=If.current,F(If)}function Hf(r,a,s){for(;r!==null;){var c=r.alternate;if((r.childLanes&a)!==a?(r.childLanes|=a,c!==null&&(c.childLanes|=a)):c!==null&&(c.childLanes&a)!==a&&(c.childLanes|=a),r===s)break;r=r.return}}function Ff(r,a,s,c){var m=r.child;for(m!==null&&(m.return=r);m!==null;){var g=m.dependencies;if(g!==null){var S=m.child;g=g.firstContext;e:for(;g!==null;){var w=g;g=m;for(var M=0;M<a.length;M++)if(w.context===a[M]){g.lanes|=s,w=g.alternate,w!==null&&(w.lanes|=s),Hf(g.return,s,r),c||(S=null);break e}g=w.next}}else if(m.tag===18){if(S=m.return,S===null)throw Error(i(341));S.lanes|=s,g=S.alternate,g!==null&&(g.lanes|=s),Hf(S,s,r),S=null}else S=m.child;if(S!==null)S.return=m;else for(S=m;S!==null;){if(S===r){S=null;break}if(m=S.sibling,m!==null){m.return=S.return,S=m;break}S=S.return}m=S}}function Va(r,a,s,c){r=null;for(var m=a,g=!1;m!==null;){if(!g){if((m.flags&524288)!==0)g=!0;else if((m.flags&262144)!==0)break}if(m.tag===10){var S=m.alternate;if(S===null)throw Error(i(387));if(S=S.memoizedProps,S!==null){var w=m.type;En(m.pendingProps.value,S.value)||(r!==null?r.push(w):r=[w])}}else if(m===pe.current){if(S=m.alternate,S===null)throw Error(i(387));S.memoizedState.memoizedState!==m.memoizedState.memoizedState&&(r!==null?r.push(Os):r=[Os])}m=m.return}r!==null&&Ff(a,r,s,c),a.flags|=262144}function Xl(r){for(r=r.firstContext;r!==null;){if(!En(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function Yi(r){Gi=r,Or=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function Xt(r){return By(Gi,r)}function Kl(r,a){return Gi===null&&Yi(r),By(r,a)}function By(r,a){var s=a._currentValue;if(a={context:a,memoizedValue:s,next:null},Or===null){if(r===null)throw Error(i(308));Or=a,r.dependencies={lanes:0,firstContext:a},r.flags|=524288}else Or=Or.next=a;return s}var AT=typeof AbortController<"u"?AbortController:function(){var r=[],a=this.signal={aborted:!1,addEventListener:function(s,c){r.push(c)}};this.abort=function(){a.aborted=!0,r.forEach(function(s){return s()})}},jT=e.unstable_scheduleCallback,NT=e.unstable_NormalPriority,At={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function qf(){return{controller:new AT,data:new Map,refCount:0}}function os(r){r.refCount--,r.refCount===0&&jT(NT,function(){r.controller.abort()})}var ss=null,Gf=0,Pa=0,Za=null;function OT(r,a){if(ss===null){var s=ss=[];Gf=0,Pa=Kd(),Za={status:"pending",value:void 0,then:function(c){s.push(c)}}}return Gf++,a.then(Iy,Iy),a}function Iy(){if(--Gf===0&&ss!==null){Za!==null&&(Za.status="fulfilled");var r=ss;ss=null,Pa=0,Za=null;for(var a=0;a<r.length;a++)(0,r[a])()}}function RT(r,a){var s=[],c={status:"pending",value:null,reason:null,then:function(m){s.push(m)}};return r.then(function(){c.status="fulfilled",c.value=a;for(var m=0;m<s.length;m++)(0,s[m])(a)},function(m){for(c.status="rejected",c.reason=m,m=0;m<s.length;m++)(0,s[m])(void 0)}),c}var Hy=V.S;V.S=function(r,a){Tv=lt(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&OT(r,a),Hy!==null&&Hy(r,a)};var Xi=C(null);function Yf(){var r=Xi.current;return r!==null?r:rt.pooledCache}function Jl(r,a){a===null?k(Xi,Xi.current):k(Xi,a.pool)}function Fy(){var r=Yf();return r===null?null:{parent:At._currentValue,pool:r}}var Ba=Error(i(460)),Xf=Error(i(474)),Ql=Error(i(542)),Wl={then:function(){}};function qy(r){return r=r.status,r==="fulfilled"||r==="rejected"}function Gy(r,a,s){switch(s=r[s],s===void 0?r.push(a):s!==a&&(a.then(Cr,Cr),a=s),a.status){case"fulfilled":return a.value;case"rejected":throw r=a.reason,Xy(r),r;default:if(typeof a.status=="string")a.then(Cr,Cr);else{if(r=rt,r!==null&&100<r.shellSuspendCounter)throw Error(i(482));r=a,r.status="pending",r.then(function(c){if(a.status==="pending"){var m=a;m.status="fulfilled",m.value=c}},function(c){if(a.status==="pending"){var m=a;m.status="rejected",m.reason=c}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw r=a.reason,Xy(r),r}throw Ji=a,Ba}}function Ki(r){try{var a=r._init;return a(r._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(Ji=s,Ba):s}}var Ji=null;function Yy(){if(Ji===null)throw Error(i(459));var r=Ji;return Ji=null,r}function Xy(r){if(r===Ba||r===Ql)throw Error(i(483))}var Ia=null,ls=0;function eu(r){var a=ls;return ls+=1,Ia===null&&(Ia=[]),Gy(Ia,r,a)}function us(r,a){a=a.props.ref,r.ref=a!==void 0?a:null}function tu(r,a){throw a.$$typeof===x?Error(i(525)):(r=Object.prototype.toString.call(a),Error(i(31,r==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":r)))}function Ky(r){function a(U,D){if(r){var Z=U.deletions;Z===null?(U.deletions=[D],U.flags|=16):Z.push(D)}}function s(U,D){if(!r)return null;for(;D!==null;)a(U,D),D=D.sibling;return null}function c(U){for(var D=new Map;U!==null;)U.key!==null?D.set(U.key,U):D.set(U.index,U),U=U.sibling;return D}function m(U,D){return U=jr(U,D),U.index=0,U.sibling=null,U}function g(U,D,Z){return U.index=Z,r?(Z=U.alternate,Z!==null?(Z=Z.index,Z<D?(U.flags|=67108866,D):Z):(U.flags|=67108866,D)):(U.flags|=1048576,D)}function S(U){return r&&U.alternate===null&&(U.flags|=67108866),U}function w(U,D,Z,W){return D===null||D.tag!==6?(D=Lf(Z,U.mode,W),D.return=U,D):(D=m(D,Z),D.return=U,D)}function M(U,D,Z,W){var Se=Z.type;return Se===z?Y(U,D,Z.props.children,W,Z.key):D!==null&&(D.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===P&&Ki(Se)===D.type)?(D=m(D,Z.props),us(D,Z),D.return=U,D):(D=Gl(Z.type,Z.key,Z.props,null,U.mode,W),us(D,Z),D.return=U,D)}function B(U,D,Z,W){return D===null||D.tag!==4||D.stateNode.containerInfo!==Z.containerInfo||D.stateNode.implementation!==Z.implementation?(D=Uf(Z,U.mode,W),D.return=U,D):(D=m(D,Z.children||[]),D.return=U,D)}function Y(U,D,Z,W,Se){return D===null||D.tag!==7?(D=Fi(Z,U.mode,W,Se),D.return=U,D):(D=m(D,Z),D.return=U,D)}function ee(U,D,Z){if(typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint")return D=Lf(""+D,U.mode,Z),D.return=U,D;if(typeof D=="object"&&D!==null){switch(D.$$typeof){case b:return Z=Gl(D.type,D.key,D.props,null,U.mode,Z),us(Z,D),Z.return=U,Z;case _:return D=Uf(D,U.mode,Z),D.return=U,D;case P:return D=Ki(D),ee(U,D,Z)}if(re(D)||oe(D))return D=Fi(D,U.mode,Z,null),D.return=U,D;if(typeof D.then=="function")return ee(U,eu(D),Z);if(D.$$typeof===T)return ee(U,Kl(U,D),Z);tu(U,D)}return null}function I(U,D,Z,W){var Se=D!==null?D.key:null;if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return Se!==null?null:w(U,D,""+Z,W);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case b:return Z.key===Se?M(U,D,Z,W):null;case _:return Z.key===Se?B(U,D,Z,W):null;case P:return Z=Ki(Z),I(U,D,Z,W)}if(re(Z)||oe(Z))return Se!==null?null:Y(U,D,Z,W,null);if(typeof Z.then=="function")return I(U,D,eu(Z),W);if(Z.$$typeof===T)return I(U,D,Kl(U,Z),W);tu(U,Z)}return null}function H(U,D,Z,W,Se){if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return U=U.get(Z)||null,w(D,U,""+W,Se);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case b:return U=U.get(W.key===null?Z:W.key)||null,M(D,U,W,Se);case _:return U=U.get(W.key===null?Z:W.key)||null,B(D,U,W,Se);case P:return W=Ki(W),H(U,D,Z,W,Se)}if(re(W)||oe(W))return U=U.get(Z)||null,Y(D,U,W,Se,null);if(typeof W.then=="function")return H(U,D,Z,eu(W),Se);if(W.$$typeof===T)return H(U,D,Z,Kl(D,W),Se);tu(D,W)}return null}function ce(U,D,Z,W){for(var Se=null,Be=null,ye=D,Ae=D=0,Le=null;ye!==null&&Ae<Z.length;Ae++){ye.index>Ae?(Le=ye,ye=null):Le=ye.sibling;var Ie=I(U,ye,Z[Ae],W);if(Ie===null){ye===null&&(ye=Le);break}r&&ye&&Ie.alternate===null&&a(U,ye),D=g(Ie,D,Ae),Be===null?Se=Ie:Be.sibling=Ie,Be=Ie,ye=Le}if(Ae===Z.length)return s(U,ye),Ue&&Nr(U,Ae),Se;if(ye===null){for(;Ae<Z.length;Ae++)ye=ee(U,Z[Ae],W),ye!==null&&(D=g(ye,D,Ae),Be===null?Se=ye:Be.sibling=ye,Be=ye);return Ue&&Nr(U,Ae),Se}for(ye=c(ye);Ae<Z.length;Ae++)Le=H(ye,U,Ae,Z[Ae],W),Le!==null&&(r&&Le.alternate!==null&&ye.delete(Le.key===null?Ae:Le.key),D=g(Le,D,Ae),Be===null?Se=Le:Be.sibling=Le,Be=Le);return r&&ye.forEach(function(wi){return a(U,wi)}),Ue&&Nr(U,Ae),Se}function ke(U,D,Z,W){if(Z==null)throw Error(i(151));for(var Se=null,Be=null,ye=D,Ae=D=0,Le=null,Ie=Z.next();ye!==null&&!Ie.done;Ae++,Ie=Z.next()){ye.index>Ae?(Le=ye,ye=null):Le=ye.sibling;var wi=I(U,ye,Ie.value,W);if(wi===null){ye===null&&(ye=Le);break}r&&ye&&wi.alternate===null&&a(U,ye),D=g(wi,D,Ae),Be===null?Se=wi:Be.sibling=wi,Be=wi,ye=Le}if(Ie.done)return s(U,ye),Ue&&Nr(U,Ae),Se;if(ye===null){for(;!Ie.done;Ae++,Ie=Z.next())Ie=ee(U,Ie.value,W),Ie!==null&&(D=g(Ie,D,Ae),Be===null?Se=Ie:Be.sibling=Ie,Be=Ie);return Ue&&Nr(U,Ae),Se}for(ye=c(ye);!Ie.done;Ae++,Ie=Z.next())Ie=H(ye,U,Ae,Ie.value,W),Ie!==null&&(r&&Ie.alternate!==null&&ye.delete(Ie.key===null?Ae:Ie.key),D=g(Ie,D,Ae),Be===null?Se=Ie:Be.sibling=Ie,Be=Ie);return r&&ye.forEach(function(H2){return a(U,H2)}),Ue&&Nr(U,Ae),Se}function et(U,D,Z,W){if(typeof Z=="object"&&Z!==null&&Z.type===z&&Z.key===null&&(Z=Z.props.children),typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case b:e:{for(var Se=Z.key;D!==null;){if(D.key===Se){if(Se=Z.type,Se===z){if(D.tag===7){s(U,D.sibling),W=m(D,Z.props.children),W.return=U,U=W;break e}}else if(D.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===P&&Ki(Se)===D.type){s(U,D.sibling),W=m(D,Z.props),us(W,Z),W.return=U,U=W;break e}s(U,D);break}else a(U,D);D=D.sibling}Z.type===z?(W=Fi(Z.props.children,U.mode,W,Z.key),W.return=U,U=W):(W=Gl(Z.type,Z.key,Z.props,null,U.mode,W),us(W,Z),W.return=U,U=W)}return S(U);case _:e:{for(Se=Z.key;D!==null;){if(D.key===Se)if(D.tag===4&&D.stateNode.containerInfo===Z.containerInfo&&D.stateNode.implementation===Z.implementation){s(U,D.sibling),W=m(D,Z.children||[]),W.return=U,U=W;break e}else{s(U,D);break}else a(U,D);D=D.sibling}W=Uf(Z,U.mode,W),W.return=U,U=W}return S(U);case P:return Z=Ki(Z),et(U,D,Z,W)}if(re(Z))return ce(U,D,Z,W);if(oe(Z)){if(Se=oe(Z),typeof Se!="function")throw Error(i(150));return Z=Se.call(Z),ke(U,D,Z,W)}if(typeof Z.then=="function")return et(U,D,eu(Z),W);if(Z.$$typeof===T)return et(U,D,Kl(U,Z),W);tu(U,Z)}return typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint"?(Z=""+Z,D!==null&&D.tag===6?(s(U,D.sibling),W=m(D,Z),W.return=U,U=W):(s(U,D),W=Lf(Z,U.mode,W),W.return=U,U=W),S(U)):s(U,D)}return function(U,D,Z,W){try{ls=0;var Se=et(U,D,Z,W);return Ia=null,Se}catch(ye){if(ye===Ba||ye===Ql)throw ye;var Be=Tn(29,ye,null,U.mode);return Be.lanes=W,Be.return=U,Be}}}var Qi=Ky(!0),Jy=Ky(!1),ai=!1;function Kf(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Jf(r,a){r=r.updateQueue,a.updateQueue===r&&(a.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,callbacks:null})}function oi(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function si(r,a,s){var c=r.updateQueue;if(c===null)return null;if(c=c.shared,(He&2)!==0){var m=c.pending;return m===null?a.next=a:(a.next=m.next,m.next=a),c.pending=a,a=ql(r),My(r,null,s),a}return Fl(r,c,a,s),ql(r)}function cs(r,a,s){if(a=a.updateQueue,a!==null&&(a=a.shared,(s&4194048)!==0)){var c=a.lanes;c&=r.pendingLanes,s|=c,a.lanes=s,Bg(r,s)}}function Qf(r,a){var s=r.updateQueue,c=r.alternate;if(c!==null&&(c=c.updateQueue,s===c)){var m=null,g=null;if(s=s.firstBaseUpdate,s!==null){do{var S={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};g===null?m=g=S:g=g.next=S,s=s.next}while(s!==null);g===null?m=g=a:g=g.next=a}else m=g=a;s={baseState:c.baseState,firstBaseUpdate:m,lastBaseUpdate:g,shared:c.shared,callbacks:c.callbacks},r.updateQueue=s;return}r=s.lastBaseUpdate,r===null?s.firstBaseUpdate=a:r.next=a,s.lastBaseUpdate=a}var Wf=!1;function fs(){if(Wf){var r=Za;if(r!==null)throw r}}function ds(r,a,s,c){Wf=!1;var m=r.updateQueue;ai=!1;var g=m.firstBaseUpdate,S=m.lastBaseUpdate,w=m.shared.pending;if(w!==null){m.shared.pending=null;var M=w,B=M.next;M.next=null,S===null?g=B:S.next=B,S=M;var Y=r.alternate;Y!==null&&(Y=Y.updateQueue,w=Y.lastBaseUpdate,w!==S&&(w===null?Y.firstBaseUpdate=B:w.next=B,Y.lastBaseUpdate=M))}if(g!==null){var ee=m.baseState;S=0,Y=B=M=null,w=g;do{var I=w.lane&-536870913,H=I!==w.lane;if(H?($e&I)===I:(c&I)===I){I!==0&&I===Pa&&(Wf=!0),Y!==null&&(Y=Y.next={lane:0,tag:w.tag,payload:w.payload,callback:null,next:null});e:{var ce=r,ke=w;I=a;var et=s;switch(ke.tag){case 1:if(ce=ke.payload,typeof ce=="function"){ee=ce.call(et,ee,I);break e}ee=ce;break e;case 3:ce.flags=ce.flags&-65537|128;case 0:if(ce=ke.payload,I=typeof ce=="function"?ce.call(et,ee,I):ce,I==null)break e;ee=y({},ee,I);break e;case 2:ai=!0}}I=w.callback,I!==null&&(r.flags|=64,H&&(r.flags|=8192),H=m.callbacks,H===null?m.callbacks=[I]:H.push(I))}else H={lane:I,tag:w.tag,payload:w.payload,callback:w.callback,next:null},Y===null?(B=Y=H,M=ee):Y=Y.next=H,S|=I;if(w=w.next,w===null){if(w=m.shared.pending,w===null)break;H=w,w=H.next,H.next=null,m.lastBaseUpdate=H,m.shared.pending=null}}while(!0);Y===null&&(M=ee),m.baseState=M,m.firstBaseUpdate=B,m.lastBaseUpdate=Y,g===null&&(m.shared.lanes=0),di|=S,r.lanes=S,r.memoizedState=ee}}function Qy(r,a){if(typeof r!="function")throw Error(i(191,r));r.call(a)}function Wy(r,a){var s=r.callbacks;if(s!==null)for(r.callbacks=null,r=0;r<s.length;r++)Qy(s[r],a)}var Ha=C(null),nu=C(0);function ex(r,a){r=Br,k(nu,r),k(Ha,a),Br=r|a.baseLanes}function ed(){k(nu,Br),k(Ha,Ha.current)}function td(){Br=nu.current,F(Ha),F(nu)}var Cn=C(null),qn=null;function li(r){var a=r.alternate;k(Et,Et.current&1),k(Cn,r),qn===null&&(a===null||Ha.current!==null||a.memoizedState!==null)&&(qn=r)}function nd(r){k(Et,Et.current),k(Cn,r),qn===null&&(qn=r)}function tx(r){r.tag===22?(k(Et,Et.current),k(Cn,r),qn===null&&(qn=r)):ui()}function ui(){k(Et,Et.current),k(Cn,Cn.current)}function An(r){F(Cn),qn===r&&(qn=null),F(Et)}var Et=C(0);function ru(r){for(var a=r;a!==null;){if(a.tag===13){var s=a.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||lh(s)||uh(s)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===r)break;for(;a.sibling===null;){if(a.return===null||a.return===r)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var Mr=0,Ce=null,Qe=null,jt=null,iu=!1,Fa=!1,Wi=!1,au=0,hs=0,qa=null,MT=0;function wt(){throw Error(i(321))}function rd(r,a){if(a===null)return!1;for(var s=0;s<a.length&&s<r.length;s++)if(!En(r[s],a[s]))return!1;return!0}function id(r,a,s,c,m,g){return Mr=g,Ce=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,V.H=r===null||r.memoizedState===null?Ux:vd,Wi=!1,g=s(c,m),Wi=!1,Fa&&(g=rx(a,s,c,m)),nx(r),g}function nx(r){V.H=gs;var a=Qe!==null&&Qe.next!==null;if(Mr=0,jt=Qe=Ce=null,iu=!1,hs=0,qa=null,a)throw Error(i(300));r===null||Nt||(r=r.dependencies,r!==null&&Xl(r)&&(Nt=!0))}function rx(r,a,s,c){Ce=r;var m=0;do{if(Fa&&(qa=null),hs=0,Fa=!1,25<=m)throw Error(i(301));if(m+=1,jt=Qe=null,r.updateQueue!=null){var g=r.updateQueue;g.lastEffect=null,g.events=null,g.stores=null,g.memoCache!=null&&(g.memoCache.index=0)}V.H=Vx,g=a(s,c)}while(Fa);return g}function DT(){var r=V.H,a=r.useState()[0];return a=typeof a.then=="function"?ms(a):a,r=r.useState()[0],(Qe!==null?Qe.memoizedState:null)!==r&&(Ce.flags|=1024),a}function ad(){var r=au!==0;return au=0,r}function od(r,a,s){a.updateQueue=r.updateQueue,a.flags&=-2053,r.lanes&=~s}function sd(r){if(iu){for(r=r.memoizedState;r!==null;){var a=r.queue;a!==null&&(a.pending=null),r=r.next}iu=!1}Mr=0,jt=Qe=Ce=null,Fa=!1,hs=au=0,qa=null}function ln(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return jt===null?Ce.memoizedState=jt=r:jt=jt.next=r,jt}function Tt(){if(Qe===null){var r=Ce.alternate;r=r!==null?r.memoizedState:null}else r=Qe.next;var a=jt===null?Ce.memoizedState:jt.next;if(a!==null)jt=a,Qe=r;else{if(r===null)throw Ce.alternate===null?Error(i(467)):Error(i(310));Qe=r,r={memoizedState:Qe.memoizedState,baseState:Qe.baseState,baseQueue:Qe.baseQueue,queue:Qe.queue,next:null},jt===null?Ce.memoizedState=jt=r:jt=jt.next=r}return jt}function ou(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ms(r){var a=hs;return hs+=1,qa===null&&(qa=[]),r=Gy(qa,r,a),a=Ce,(jt===null?a.memoizedState:jt.next)===null&&(a=a.alternate,V.H=a===null||a.memoizedState===null?Ux:vd),r}function su(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return ms(r);if(r.$$typeof===T)return Xt(r)}throw Error(i(438,String(r)))}function ld(r){var a=null,s=Ce.updateQueue;if(s!==null&&(a=s.memoCache),a==null){var c=Ce.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(a={data:c.data.map(function(m){return m.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),s===null&&(s=ou(),Ce.updateQueue=s),s.memoCache=a,s=a.data[a.index],s===void 0)for(s=a.data[a.index]=Array(r),c=0;c<r;c++)s[c]=ie;return a.index++,s}function Dr(r,a){return typeof a=="function"?a(r):a}function lu(r){var a=Tt();return ud(a,Qe,r)}function ud(r,a,s){var c=r.queue;if(c===null)throw Error(i(311));c.lastRenderedReducer=s;var m=r.baseQueue,g=c.pending;if(g!==null){if(m!==null){var S=m.next;m.next=g.next,g.next=S}a.baseQueue=m=g,c.pending=null}if(g=r.baseState,m===null)r.memoizedState=g;else{a=m.next;var w=S=null,M=null,B=a,Y=!1;do{var ee=B.lane&-536870913;if(ee!==B.lane?($e&ee)===ee:(Mr&ee)===ee){var I=B.revertLane;if(I===0)M!==null&&(M=M.next={lane:0,revertLane:0,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null}),ee===Pa&&(Y=!0);else if((Mr&I)===I){B=B.next,I===Pa&&(Y=!0);continue}else ee={lane:0,revertLane:B.revertLane,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},M===null?(w=M=ee,S=g):M=M.next=ee,Ce.lanes|=I,di|=I;ee=B.action,Wi&&s(g,ee),g=B.hasEagerState?B.eagerState:s(g,ee)}else I={lane:ee,revertLane:B.revertLane,gesture:B.gesture,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},M===null?(w=M=I,S=g):M=M.next=I,Ce.lanes|=ee,di|=ee;B=B.next}while(B!==null&&B!==a);if(M===null?S=g:M.next=w,!En(g,r.memoizedState)&&(Nt=!0,Y&&(s=Za,s!==null)))throw s;r.memoizedState=g,r.baseState=S,r.baseQueue=M,c.lastRenderedState=g}return m===null&&(c.lanes=0),[r.memoizedState,c.dispatch]}function cd(r){var a=Tt(),s=a.queue;if(s===null)throw Error(i(311));s.lastRenderedReducer=r;var c=s.dispatch,m=s.pending,g=a.memoizedState;if(m!==null){s.pending=null;var S=m=m.next;do g=r(g,S.action),S=S.next;while(S!==m);En(g,a.memoizedState)||(Nt=!0),a.memoizedState=g,a.baseQueue===null&&(a.baseState=g),s.lastRenderedState=g}return[g,c]}function ix(r,a,s){var c=Ce,m=Tt(),g=Ue;if(g){if(s===void 0)throw Error(i(407));s=s()}else s=a();var S=!En((Qe||m).memoizedState,s);if(S&&(m.memoizedState=s,Nt=!0),m=m.queue,hd(sx.bind(null,c,m,r),[r]),m.getSnapshot!==a||S||jt!==null&&jt.memoizedState.tag&1){if(c.flags|=2048,Ga(9,{destroy:void 0},ox.bind(null,c,m,s,a),null),rt===null)throw Error(i(349));g||(Mr&127)!==0||ax(c,a,s)}return s}function ax(r,a,s){r.flags|=16384,r={getSnapshot:a,value:s},a=Ce.updateQueue,a===null?(a=ou(),Ce.updateQueue=a,a.stores=[r]):(s=a.stores,s===null?a.stores=[r]:s.push(r))}function ox(r,a,s,c){a.value=s,a.getSnapshot=c,lx(a)&&ux(r)}function sx(r,a,s){return s(function(){lx(a)&&ux(r)})}function lx(r){var a=r.getSnapshot;r=r.value;try{var s=a();return!En(r,s)}catch{return!0}}function ux(r){var a=Hi(r,2);a!==null&&bn(a,r,2)}function fd(r){var a=ln();if(typeof r=="function"){var s=r;if(r=s(),Wi){hn(!0);try{s()}finally{hn(!1)}}}return a.memoizedState=a.baseState=r,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dr,lastRenderedState:r},a}function cx(r,a,s,c){return r.baseState=s,ud(r,Qe,typeof c=="function"?c:Dr)}function $T(r,a,s,c,m){if(fu(r))throw Error(i(485));if(r=a.action,r!==null){var g={payload:m,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(S){g.listeners.push(S)}};V.T!==null?s(!0):g.isTransition=!1,c(g),s=a.pending,s===null?(g.next=a.pending=g,fx(a,g)):(g.next=s.next,a.pending=s.next=g)}}function fx(r,a){var s=a.action,c=a.payload,m=r.state;if(a.isTransition){var g=V.T,S={};V.T=S;try{var w=s(m,c),M=V.S;M!==null&&M(S,w),dx(r,a,w)}catch(B){dd(r,a,B)}finally{g!==null&&S.types!==null&&(g.types=S.types),V.T=g}}else try{g=s(m,c),dx(r,a,g)}catch(B){dd(r,a,B)}}function dx(r,a,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(c){hx(r,a,c)},function(c){return dd(r,a,c)}):hx(r,a,s)}function hx(r,a,s){a.status="fulfilled",a.value=s,mx(a),r.state=s,a=r.pending,a!==null&&(s=a.next,s===a?r.pending=null:(s=s.next,a.next=s,fx(r,s)))}function dd(r,a,s){var c=r.pending;if(r.pending=null,c!==null){c=c.next;do a.status="rejected",a.reason=s,mx(a),a=a.next;while(a!==c)}r.action=null}function mx(r){r=r.listeners;for(var a=0;a<r.length;a++)(0,r[a])()}function px(r,a){return a}function gx(r,a){if(Ue){var s=rt.formState;if(s!==null){e:{var c=Ce;if(Ue){if(ut){t:{for(var m=ut,g=Fn;m.nodeType!==8;){if(!g){m=null;break t}if(m=Gn(m.nextSibling),m===null){m=null;break t}}g=m.data,m=g==="F!"||g==="F"?m:null}if(m){ut=Gn(m.nextSibling),c=m.data==="F!";break e}}ri(c)}c=!1}c&&(a=s[0])}}return s=ln(),s.memoizedState=s.baseState=a,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:px,lastRenderedState:a},s.queue=c,s=Dx.bind(null,Ce,c),c.dispatch=s,c=fd(!1),g=xd.bind(null,Ce,!1,c.queue),c=ln(),m={state:a,dispatch:null,action:r,pending:null},c.queue=m,s=$T.bind(null,Ce,m,g,s),m.dispatch=s,c.memoizedState=r,[a,s,!1]}function yx(r){var a=Tt();return xx(a,Qe,r)}function xx(r,a,s){if(a=ud(r,a,px)[0],r=lu(Dr)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var c=ms(a)}catch(S){throw S===Ba?Ql:S}else c=a;a=Tt();var m=a.queue,g=m.dispatch;return s!==a.memoizedState&&(Ce.flags|=2048,Ga(9,{destroy:void 0},LT.bind(null,m,s),null)),[c,g,r]}function LT(r,a){r.action=a}function vx(r){var a=Tt(),s=Qe;if(s!==null)return xx(a,s,r);Tt(),a=a.memoizedState,s=Tt();var c=s.queue.dispatch;return s.memoizedState=r,[a,c,!1]}function Ga(r,a,s,c){return r={tag:r,create:s,deps:c,inst:a,next:null},a=Ce.updateQueue,a===null&&(a=ou(),Ce.updateQueue=a),s=a.lastEffect,s===null?a.lastEffect=r.next=r:(c=s.next,s.next=r,r.next=c,a.lastEffect=r),r}function bx(){return Tt().memoizedState}function uu(r,a,s,c){var m=ln();Ce.flags|=r,m.memoizedState=Ga(1|a,{destroy:void 0},s,c===void 0?null:c)}function cu(r,a,s,c){var m=Tt();c=c===void 0?null:c;var g=m.memoizedState.inst;Qe!==null&&c!==null&&rd(c,Qe.memoizedState.deps)?m.memoizedState=Ga(a,g,s,c):(Ce.flags|=r,m.memoizedState=Ga(1|a,g,s,c))}function Sx(r,a){uu(8390656,8,r,a)}function hd(r,a){cu(2048,8,r,a)}function UT(r){Ce.flags|=4;var a=Ce.updateQueue;if(a===null)a=ou(),Ce.updateQueue=a,a.events=[r];else{var s=a.events;s===null?a.events=[r]:s.push(r)}}function wx(r){var a=Tt().memoizedState;return UT({ref:a,nextImpl:r}),function(){if((He&2)!==0)throw Error(i(440));return a.impl.apply(void 0,arguments)}}function kx(r,a){return cu(4,2,r,a)}function zx(r,a){return cu(4,4,r,a)}function _x(r,a){if(typeof a=="function"){r=r();var s=a(r);return function(){typeof s=="function"?s():a(null)}}if(a!=null)return r=r(),a.current=r,function(){a.current=null}}function Ex(r,a,s){s=s!=null?s.concat([r]):null,cu(4,4,_x.bind(null,a,r),s)}function md(){}function Tx(r,a){var s=Tt();a=a===void 0?null:a;var c=s.memoizedState;return a!==null&&rd(a,c[1])?c[0]:(s.memoizedState=[r,a],r)}function Cx(r,a){var s=Tt();a=a===void 0?null:a;var c=s.memoizedState;if(a!==null&&rd(a,c[1]))return c[0];if(c=r(),Wi){hn(!0);try{r()}finally{hn(!1)}}return s.memoizedState=[c,a],c}function pd(r,a,s){return s===void 0||(Mr&1073741824)!==0&&($e&261930)===0?r.memoizedState=a:(r.memoizedState=s,r=Av(),Ce.lanes|=r,di|=r,s)}function Ax(r,a,s,c){return En(s,a)?s:Ha.current!==null?(r=pd(r,s,c),En(r,a)||(Nt=!0),r):(Mr&42)===0||(Mr&1073741824)!==0&&($e&261930)===0?(Nt=!0,r.memoizedState=s):(r=Av(),Ce.lanes|=r,di|=r,a)}function jx(r,a,s,c,m){var g=X.p;X.p=g!==0&&8>g?g:8;var S=V.T,w={};V.T=w,xd(r,!1,a,s);try{var M=m(),B=V.S;if(B!==null&&B(w,M),M!==null&&typeof M=="object"&&typeof M.then=="function"){var Y=RT(M,c);ps(r,a,Y,On(r))}else ps(r,a,c,On(r))}catch(ee){ps(r,a,{then:function(){},status:"rejected",reason:ee},On())}finally{X.p=g,S!==null&&w.types!==null&&(S.types=w.types),V.T=S}}function VT(){}function gd(r,a,s,c){if(r.tag!==5)throw Error(i(476));var m=Nx(r).queue;jx(r,m,a,G,s===null?VT:function(){return Ox(r),s(c)})}function Nx(r){var a=r.memoizedState;if(a!==null)return a;a={memoizedState:G,baseState:G,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dr,lastRenderedState:G},next:null};var s={};return a.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dr,lastRenderedState:s},next:null},r.memoizedState=a,r=r.alternate,r!==null&&(r.memoizedState=a),a}function Ox(r){var a=Nx(r);a.next===null&&(a=r.alternate.memoizedState),ps(r,a.next.queue,{},On())}function yd(){return Xt(Os)}function Rx(){return Tt().memoizedState}function Mx(){return Tt().memoizedState}function PT(r){for(var a=r.return;a!==null;){switch(a.tag){case 24:case 3:var s=On();r=oi(s);var c=si(a,r,s);c!==null&&(bn(c,a,s),cs(c,a,s)),a={cache:qf()},r.payload=a;return}a=a.return}}function ZT(r,a,s){var c=On();s={lane:c,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},fu(r)?$x(a,s):(s=Df(r,a,s,c),s!==null&&(bn(s,r,c),Lx(s,a,c)))}function Dx(r,a,s){var c=On();ps(r,a,s,c)}function ps(r,a,s,c){var m={lane:c,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(fu(r))$x(a,m);else{var g=r.alternate;if(r.lanes===0&&(g===null||g.lanes===0)&&(g=a.lastRenderedReducer,g!==null))try{var S=a.lastRenderedState,w=g(S,s);if(m.hasEagerState=!0,m.eagerState=w,En(w,S))return Fl(r,a,m,0),rt===null&&Hl(),!1}catch{}if(s=Df(r,a,m,c),s!==null)return bn(s,r,c),Lx(s,a,c),!0}return!1}function xd(r,a,s,c){if(c={lane:2,revertLane:Kd(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},fu(r)){if(a)throw Error(i(479))}else a=Df(r,s,c,2),a!==null&&bn(a,r,2)}function fu(r){var a=r.alternate;return r===Ce||a!==null&&a===Ce}function $x(r,a){Fa=iu=!0;var s=r.pending;s===null?a.next=a:(a.next=s.next,s.next=a),r.pending=a}function Lx(r,a,s){if((s&4194048)!==0){var c=a.lanes;c&=r.pendingLanes,s|=c,a.lanes=s,Bg(r,s)}}var gs={readContext:Xt,use:su,useCallback:wt,useContext:wt,useEffect:wt,useImperativeHandle:wt,useLayoutEffect:wt,useInsertionEffect:wt,useMemo:wt,useReducer:wt,useRef:wt,useState:wt,useDebugValue:wt,useDeferredValue:wt,useTransition:wt,useSyncExternalStore:wt,useId:wt,useHostTransitionStatus:wt,useFormState:wt,useActionState:wt,useOptimistic:wt,useMemoCache:wt,useCacheRefresh:wt};gs.useEffectEvent=wt;var Ux={readContext:Xt,use:su,useCallback:function(r,a){return ln().memoizedState=[r,a===void 0?null:a],r},useContext:Xt,useEffect:Sx,useImperativeHandle:function(r,a,s){s=s!=null?s.concat([r]):null,uu(4194308,4,_x.bind(null,a,r),s)},useLayoutEffect:function(r,a){return uu(4194308,4,r,a)},useInsertionEffect:function(r,a){uu(4,2,r,a)},useMemo:function(r,a){var s=ln();a=a===void 0?null:a;var c=r();if(Wi){hn(!0);try{r()}finally{hn(!1)}}return s.memoizedState=[c,a],c},useReducer:function(r,a,s){var c=ln();if(s!==void 0){var m=s(a);if(Wi){hn(!0);try{s(a)}finally{hn(!1)}}}else m=a;return c.memoizedState=c.baseState=m,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:m},c.queue=r,r=r.dispatch=ZT.bind(null,Ce,r),[c.memoizedState,r]},useRef:function(r){var a=ln();return r={current:r},a.memoizedState=r},useState:function(r){r=fd(r);var a=r.queue,s=Dx.bind(null,Ce,a);return a.dispatch=s,[r.memoizedState,s]},useDebugValue:md,useDeferredValue:function(r,a){var s=ln();return pd(s,r,a)},useTransition:function(){var r=fd(!1);return r=jx.bind(null,Ce,r.queue,!0,!1),ln().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,a,s){var c=Ce,m=ln();if(Ue){if(s===void 0)throw Error(i(407));s=s()}else{if(s=a(),rt===null)throw Error(i(349));($e&127)!==0||ax(c,a,s)}m.memoizedState=s;var g={value:s,getSnapshot:a};return m.queue=g,Sx(sx.bind(null,c,g,r),[r]),c.flags|=2048,Ga(9,{destroy:void 0},ox.bind(null,c,g,s,a),null),s},useId:function(){var r=ln(),a=rt.identifierPrefix;if(Ue){var s=pr,c=mr;s=(c&~(1<<32-nt(c)-1)).toString(32)+s,a="_"+a+"R_"+s,s=au++,0<s&&(a+="H"+s.toString(32)),a+="_"}else s=MT++,a="_"+a+"r_"+s.toString(32)+"_";return r.memoizedState=a},useHostTransitionStatus:yd,useFormState:gx,useActionState:gx,useOptimistic:function(r){var a=ln();a.memoizedState=a.baseState=r;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=s,a=xd.bind(null,Ce,!0,s),s.dispatch=a,[r,a]},useMemoCache:ld,useCacheRefresh:function(){return ln().memoizedState=PT.bind(null,Ce)},useEffectEvent:function(r){var a=ln(),s={impl:r};return a.memoizedState=s,function(){if((He&2)!==0)throw Error(i(440));return s.impl.apply(void 0,arguments)}}},vd={readContext:Xt,use:su,useCallback:Tx,useContext:Xt,useEffect:hd,useImperativeHandle:Ex,useInsertionEffect:kx,useLayoutEffect:zx,useMemo:Cx,useReducer:lu,useRef:bx,useState:function(){return lu(Dr)},useDebugValue:md,useDeferredValue:function(r,a){var s=Tt();return Ax(s,Qe.memoizedState,r,a)},useTransition:function(){var r=lu(Dr)[0],a=Tt().memoizedState;return[typeof r=="boolean"?r:ms(r),a]},useSyncExternalStore:ix,useId:Rx,useHostTransitionStatus:yd,useFormState:yx,useActionState:yx,useOptimistic:function(r,a){var s=Tt();return cx(s,Qe,r,a)},useMemoCache:ld,useCacheRefresh:Mx};vd.useEffectEvent=wx;var Vx={readContext:Xt,use:su,useCallback:Tx,useContext:Xt,useEffect:hd,useImperativeHandle:Ex,useInsertionEffect:kx,useLayoutEffect:zx,useMemo:Cx,useReducer:cd,useRef:bx,useState:function(){return cd(Dr)},useDebugValue:md,useDeferredValue:function(r,a){var s=Tt();return Qe===null?pd(s,r,a):Ax(s,Qe.memoizedState,r,a)},useTransition:function(){var r=cd(Dr)[0],a=Tt().memoizedState;return[typeof r=="boolean"?r:ms(r),a]},useSyncExternalStore:ix,useId:Rx,useHostTransitionStatus:yd,useFormState:vx,useActionState:vx,useOptimistic:function(r,a){var s=Tt();return Qe!==null?cx(s,Qe,r,a):(s.baseState=r,[r,s.queue.dispatch])},useMemoCache:ld,useCacheRefresh:Mx};Vx.useEffectEvent=wx;function bd(r,a,s,c){a=r.memoizedState,s=s(c,a),s=s==null?a:y({},a,s),r.memoizedState=s,r.lanes===0&&(r.updateQueue.baseState=s)}var Sd={enqueueSetState:function(r,a,s){r=r._reactInternals;var c=On(),m=oi(c);m.payload=a,s!=null&&(m.callback=s),a=si(r,m,c),a!==null&&(bn(a,r,c),cs(a,r,c))},enqueueReplaceState:function(r,a,s){r=r._reactInternals;var c=On(),m=oi(c);m.tag=1,m.payload=a,s!=null&&(m.callback=s),a=si(r,m,c),a!==null&&(bn(a,r,c),cs(a,r,c))},enqueueForceUpdate:function(r,a){r=r._reactInternals;var s=On(),c=oi(s);c.tag=2,a!=null&&(c.callback=a),a=si(r,c,s),a!==null&&(bn(a,r,s),cs(a,r,s))}};function Px(r,a,s,c,m,g,S){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(c,g,S):a.prototype&&a.prototype.isPureReactComponent?!ns(s,c)||!ns(m,g):!0}function Zx(r,a,s,c){r=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(s,c),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(s,c),a.state!==r&&Sd.enqueueReplaceState(a,a.state,null)}function ea(r,a){var s=a;if("ref"in a){s={};for(var c in a)c!=="ref"&&(s[c]=a[c])}if(r=r.defaultProps){s===a&&(s=y({},s));for(var m in r)s[m]===void 0&&(s[m]=r[m])}return s}function Bx(r){Il(r)}function Ix(r){console.error(r)}function Hx(r){Il(r)}function du(r,a){try{var s=r.onUncaughtError;s(a.value,{componentStack:a.stack})}catch(c){setTimeout(function(){throw c})}}function Fx(r,a,s){try{var c=r.onCaughtError;c(s.value,{componentStack:s.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(m){setTimeout(function(){throw m})}}function wd(r,a,s){return s=oi(s),s.tag=3,s.payload={element:null},s.callback=function(){du(r,a)},s}function qx(r){return r=oi(r),r.tag=3,r}function Gx(r,a,s,c){var m=s.type.getDerivedStateFromError;if(typeof m=="function"){var g=c.value;r.payload=function(){return m(g)},r.callback=function(){Fx(a,s,c)}}var S=s.stateNode;S!==null&&typeof S.componentDidCatch=="function"&&(r.callback=function(){Fx(a,s,c),typeof m!="function"&&(hi===null?hi=new Set([this]):hi.add(this));var w=c.stack;this.componentDidCatch(c.value,{componentStack:w!==null?w:""})})}function BT(r,a,s,c,m){if(s.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(a=s.alternate,a!==null&&Va(a,s,m,!0),s=Cn.current,s!==null){switch(s.tag){case 31:case 13:return qn===null?zu():s.alternate===null&&kt===0&&(kt=3),s.flags&=-257,s.flags|=65536,s.lanes=m,c===Wl?s.flags|=16384:(a=s.updateQueue,a===null?s.updateQueue=new Set([c]):a.add(c),Gd(r,c,m)),!1;case 22:return s.flags|=65536,c===Wl?s.flags|=16384:(a=s.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([c])},s.updateQueue=a):(s=a.retryQueue,s===null?a.retryQueue=new Set([c]):s.add(c)),Gd(r,c,m)),!1}throw Error(i(435,s.tag))}return Gd(r,c,m),zu(),!1}if(Ue)return a=Cn.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=m,c!==Zf&&(r=Error(i(422),{cause:c}),as(Bn(r,s)))):(c!==Zf&&(a=Error(i(423),{cause:c}),as(Bn(a,s))),r=r.current.alternate,r.flags|=65536,m&=-m,r.lanes|=m,c=Bn(c,s),m=wd(r.stateNode,c,m),Qf(r,m),kt!==4&&(kt=2)),!1;var g=Error(i(520),{cause:c});if(g=Bn(g,s),zs===null?zs=[g]:zs.push(g),kt!==4&&(kt=2),a===null)return!0;c=Bn(c,s),s=a;do{switch(s.tag){case 3:return s.flags|=65536,r=m&-m,s.lanes|=r,r=wd(s.stateNode,c,r),Qf(s,r),!1;case 1:if(a=s.type,g=s.stateNode,(s.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(hi===null||!hi.has(g))))return s.flags|=65536,m&=-m,s.lanes|=m,m=qx(m),Gx(m,r,s,c),Qf(s,m),!1}s=s.return}while(s!==null);return!1}var kd=Error(i(461)),Nt=!1;function Kt(r,a,s,c){a.child=r===null?Jy(a,null,s,c):Qi(a,r.child,s,c)}function Yx(r,a,s,c,m){s=s.render;var g=a.ref;if("ref"in c){var S={};for(var w in c)w!=="ref"&&(S[w]=c[w])}else S=c;return Yi(a),c=id(r,a,s,S,g,m),w=ad(),r!==null&&!Nt?(od(r,a,m),$r(r,a,m)):(Ue&&w&&Vf(a),a.flags|=1,Kt(r,a,c,m),a.child)}function Xx(r,a,s,c,m){if(r===null){var g=s.type;return typeof g=="function"&&!$f(g)&&g.defaultProps===void 0&&s.compare===null?(a.tag=15,a.type=g,Kx(r,a,g,c,m)):(r=Gl(s.type,null,c,a,a.mode,m),r.ref=a.ref,r.return=a,a.child=r)}if(g=r.child,!Nd(r,m)){var S=g.memoizedProps;if(s=s.compare,s=s!==null?s:ns,s(S,c)&&r.ref===a.ref)return $r(r,a,m)}return a.flags|=1,r=jr(g,c),r.ref=a.ref,r.return=a,a.child=r}function Kx(r,a,s,c,m){if(r!==null){var g=r.memoizedProps;if(ns(g,c)&&r.ref===a.ref)if(Nt=!1,a.pendingProps=c=g,Nd(r,m))(r.flags&131072)!==0&&(Nt=!0);else return a.lanes=r.lanes,$r(r,a,m)}return zd(r,a,s,c,m)}function Jx(r,a,s,c){var m=c.children,g=r!==null?r.memoizedState:null;if(r===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.mode==="hidden"){if((a.flags&128)!==0){if(g=g!==null?g.baseLanes|s:s,r!==null){for(c=a.child=r.child,m=0;c!==null;)m=m|c.lanes|c.childLanes,c=c.sibling;c=m&~g}else c=0,a.child=null;return Qx(r,a,g,s,c)}if((s&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},r!==null&&Jl(a,g!==null?g.cachePool:null),g!==null?ex(a,g):ed(),tx(a);else return c=a.lanes=536870912,Qx(r,a,g!==null?g.baseLanes|s:s,s,c)}else g!==null?(Jl(a,g.cachePool),ex(a,g),ui(),a.memoizedState=null):(r!==null&&Jl(a,null),ed(),ui());return Kt(r,a,m,s),a.child}function ys(r,a){return r!==null&&r.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function Qx(r,a,s,c,m){var g=Yf();return g=g===null?null:{parent:At._currentValue,pool:g},a.memoizedState={baseLanes:s,cachePool:g},r!==null&&Jl(a,null),ed(),tx(a),r!==null&&Va(r,a,c,!0),a.childLanes=m,null}function hu(r,a){return a=pu({mode:a.mode,children:a.children},r.mode),a.ref=r.ref,r.child=a,a.return=r,a}function Wx(r,a,s){return Qi(a,r.child,null,s),r=hu(a,a.pendingProps),r.flags|=2,An(a),a.memoizedState=null,r}function IT(r,a,s){var c=a.pendingProps,m=(a.flags&128)!==0;if(a.flags&=-129,r===null){if(Ue){if(c.mode==="hidden")return r=hu(a,c),a.lanes=536870912,ys(null,r);if(nd(a),(r=ut)?(r=fb(r,Fn),r=r!==null&&r.data==="&"?r:null,r!==null&&(a.memoizedState={dehydrated:r,treeContext:ti!==null?{id:mr,overflow:pr}:null,retryLane:536870912,hydrationErrors:null},s=$y(r),s.return=a,a.child=s,Yt=a,ut=null)):r=null,r===null)throw ri(a);return a.lanes=536870912,null}return hu(a,c)}var g=r.memoizedState;if(g!==null){var S=g.dehydrated;if(nd(a),m)if(a.flags&256)a.flags&=-257,a=Wx(r,a,s);else if(a.memoizedState!==null)a.child=r.child,a.flags|=128,a=null;else throw Error(i(558));else if(Nt||Va(r,a,s,!1),m=(s&r.childLanes)!==0,Nt||m){if(c=rt,c!==null&&(S=Ig(c,s),S!==0&&S!==g.retryLane))throw g.retryLane=S,Hi(r,S),bn(c,r,S),kd;zu(),a=Wx(r,a,s)}else r=g.treeContext,ut=Gn(S.nextSibling),Yt=a,Ue=!0,ni=null,Fn=!1,r!==null&&Vy(a,r),a=hu(a,c),a.flags|=4096;return a}return r=jr(r.child,{mode:c.mode,children:c.children}),r.ref=a.ref,a.child=r,r.return=a,r}function mu(r,a){var s=a.ref;if(s===null)r!==null&&r.ref!==null&&(a.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(i(284));(r===null||r.ref!==s)&&(a.flags|=4194816)}}function zd(r,a,s,c,m){return Yi(a),s=id(r,a,s,c,void 0,m),c=ad(),r!==null&&!Nt?(od(r,a,m),$r(r,a,m)):(Ue&&c&&Vf(a),a.flags|=1,Kt(r,a,s,m),a.child)}function ev(r,a,s,c,m,g){return Yi(a),a.updateQueue=null,s=rx(a,c,s,m),nx(r),c=ad(),r!==null&&!Nt?(od(r,a,g),$r(r,a,g)):(Ue&&c&&Vf(a),a.flags|=1,Kt(r,a,s,g),a.child)}function tv(r,a,s,c,m){if(Yi(a),a.stateNode===null){var g=Da,S=s.contextType;typeof S=="object"&&S!==null&&(g=Xt(S)),g=new s(c,g),a.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=Sd,a.stateNode=g,g._reactInternals=a,g=a.stateNode,g.props=c,g.state=a.memoizedState,g.refs={},Kf(a),S=s.contextType,g.context=typeof S=="object"&&S!==null?Xt(S):Da,g.state=a.memoizedState,S=s.getDerivedStateFromProps,typeof S=="function"&&(bd(a,s,S,c),g.state=a.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(S=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),S!==g.state&&Sd.enqueueReplaceState(g,g.state,null),ds(a,c,g,m),fs(),g.state=a.memoizedState),typeof g.componentDidMount=="function"&&(a.flags|=4194308),c=!0}else if(r===null){g=a.stateNode;var w=a.memoizedProps,M=ea(s,w);g.props=M;var B=g.context,Y=s.contextType;S=Da,typeof Y=="object"&&Y!==null&&(S=Xt(Y));var ee=s.getDerivedStateFromProps;Y=typeof ee=="function"||typeof g.getSnapshotBeforeUpdate=="function",w=a.pendingProps!==w,Y||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(w||B!==S)&&Zx(a,g,c,S),ai=!1;var I=a.memoizedState;g.state=I,ds(a,c,g,m),fs(),B=a.memoizedState,w||I!==B||ai?(typeof ee=="function"&&(bd(a,s,ee,c),B=a.memoizedState),(M=ai||Px(a,s,M,c,I,B,S))?(Y||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount()),typeof g.componentDidMount=="function"&&(a.flags|=4194308)):(typeof g.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=c,a.memoizedState=B),g.props=c,g.state=B,g.context=S,c=M):(typeof g.componentDidMount=="function"&&(a.flags|=4194308),c=!1)}else{g=a.stateNode,Jf(r,a),S=a.memoizedProps,Y=ea(s,S),g.props=Y,ee=a.pendingProps,I=g.context,B=s.contextType,M=Da,typeof B=="object"&&B!==null&&(M=Xt(B)),w=s.getDerivedStateFromProps,(B=typeof w=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(S!==ee||I!==M)&&Zx(a,g,c,M),ai=!1,I=a.memoizedState,g.state=I,ds(a,c,g,m),fs();var H=a.memoizedState;S!==ee||I!==H||ai||r!==null&&r.dependencies!==null&&Xl(r.dependencies)?(typeof w=="function"&&(bd(a,s,w,c),H=a.memoizedState),(Y=ai||Px(a,s,Y,c,I,H,M)||r!==null&&r.dependencies!==null&&Xl(r.dependencies))?(B||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(c,H,M),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(c,H,M)),typeof g.componentDidUpdate=="function"&&(a.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof g.componentDidUpdate!="function"||S===r.memoizedProps&&I===r.memoizedState||(a.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||S===r.memoizedProps&&I===r.memoizedState||(a.flags|=1024),a.memoizedProps=c,a.memoizedState=H),g.props=c,g.state=H,g.context=M,c=Y):(typeof g.componentDidUpdate!="function"||S===r.memoizedProps&&I===r.memoizedState||(a.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||S===r.memoizedProps&&I===r.memoizedState||(a.flags|=1024),c=!1)}return g=c,mu(r,a),c=(a.flags&128)!==0,g||c?(g=a.stateNode,s=c&&typeof s.getDerivedStateFromError!="function"?null:g.render(),a.flags|=1,r!==null&&c?(a.child=Qi(a,r.child,null,m),a.child=Qi(a,null,s,m)):Kt(r,a,s,m),a.memoizedState=g.state,r=a.child):r=$r(r,a,m),r}function nv(r,a,s,c){return qi(),a.flags|=256,Kt(r,a,s,c),a.child}var _d={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ed(r){return{baseLanes:r,cachePool:Fy()}}function Td(r,a,s){return r=r!==null?r.childLanes&~s:0,a&&(r|=Nn),r}function rv(r,a,s){var c=a.pendingProps,m=!1,g=(a.flags&128)!==0,S;if((S=g)||(S=r!==null&&r.memoizedState===null?!1:(Et.current&2)!==0),S&&(m=!0,a.flags&=-129),S=(a.flags&32)!==0,a.flags&=-33,r===null){if(Ue){if(m?li(a):ui(),(r=ut)?(r=fb(r,Fn),r=r!==null&&r.data!=="&"?r:null,r!==null&&(a.memoizedState={dehydrated:r,treeContext:ti!==null?{id:mr,overflow:pr}:null,retryLane:536870912,hydrationErrors:null},s=$y(r),s.return=a,a.child=s,Yt=a,ut=null)):r=null,r===null)throw ri(a);return uh(r)?a.lanes=32:a.lanes=536870912,null}var w=c.children;return c=c.fallback,m?(ui(),m=a.mode,w=pu({mode:"hidden",children:w},m),c=Fi(c,m,s,null),w.return=a,c.return=a,w.sibling=c,a.child=w,c=a.child,c.memoizedState=Ed(s),c.childLanes=Td(r,S,s),a.memoizedState=_d,ys(null,c)):(li(a),Cd(a,w))}var M=r.memoizedState;if(M!==null&&(w=M.dehydrated,w!==null)){if(g)a.flags&256?(li(a),a.flags&=-257,a=Ad(r,a,s)):a.memoizedState!==null?(ui(),a.child=r.child,a.flags|=128,a=null):(ui(),w=c.fallback,m=a.mode,c=pu({mode:"visible",children:c.children},m),w=Fi(w,m,s,null),w.flags|=2,c.return=a,w.return=a,c.sibling=w,a.child=c,Qi(a,r.child,null,s),c=a.child,c.memoizedState=Ed(s),c.childLanes=Td(r,S,s),a.memoizedState=_d,a=ys(null,c));else if(li(a),uh(w)){if(S=w.nextSibling&&w.nextSibling.dataset,S)var B=S.dgst;S=B,c=Error(i(419)),c.stack="",c.digest=S,as({value:c,source:null,stack:null}),a=Ad(r,a,s)}else if(Nt||Va(r,a,s,!1),S=(s&r.childLanes)!==0,Nt||S){if(S=rt,S!==null&&(c=Ig(S,s),c!==0&&c!==M.retryLane))throw M.retryLane=c,Hi(r,c),bn(S,r,c),kd;lh(w)||zu(),a=Ad(r,a,s)}else lh(w)?(a.flags|=192,a.child=r.child,a=null):(r=M.treeContext,ut=Gn(w.nextSibling),Yt=a,Ue=!0,ni=null,Fn=!1,r!==null&&Vy(a,r),a=Cd(a,c.children),a.flags|=4096);return a}return m?(ui(),w=c.fallback,m=a.mode,M=r.child,B=M.sibling,c=jr(M,{mode:"hidden",children:c.children}),c.subtreeFlags=M.subtreeFlags&65011712,B!==null?w=jr(B,w):(w=Fi(w,m,s,null),w.flags|=2),w.return=a,c.return=a,c.sibling=w,a.child=c,ys(null,c),c=a.child,w=r.child.memoizedState,w===null?w=Ed(s):(m=w.cachePool,m!==null?(M=At._currentValue,m=m.parent!==M?{parent:M,pool:M}:m):m=Fy(),w={baseLanes:w.baseLanes|s,cachePool:m}),c.memoizedState=w,c.childLanes=Td(r,S,s),a.memoizedState=_d,ys(r.child,c)):(li(a),s=r.child,r=s.sibling,s=jr(s,{mode:"visible",children:c.children}),s.return=a,s.sibling=null,r!==null&&(S=a.deletions,S===null?(a.deletions=[r],a.flags|=16):S.push(r)),a.child=s,a.memoizedState=null,s)}function Cd(r,a){return a=pu({mode:"visible",children:a},r.mode),a.return=r,r.child=a}function pu(r,a){return r=Tn(22,r,null,a),r.lanes=0,r}function Ad(r,a,s){return Qi(a,r.child,null,s),r=Cd(a,a.pendingProps.children),r.flags|=2,a.memoizedState=null,r}function iv(r,a,s){r.lanes|=a;var c=r.alternate;c!==null&&(c.lanes|=a),Hf(r.return,a,s)}function jd(r,a,s,c,m,g){var S=r.memoizedState;S===null?r.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:c,tail:s,tailMode:m,treeForkCount:g}:(S.isBackwards=a,S.rendering=null,S.renderingStartTime=0,S.last=c,S.tail=s,S.tailMode=m,S.treeForkCount=g)}function av(r,a,s){var c=a.pendingProps,m=c.revealOrder,g=c.tail;c=c.children;var S=Et.current,w=(S&2)!==0;if(w?(S=S&1|2,a.flags|=128):S&=1,k(Et,S),Kt(r,a,c,s),c=Ue?is:0,!w&&r!==null&&(r.flags&128)!==0)e:for(r=a.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&iv(r,s,a);else if(r.tag===19)iv(r,s,a);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===a)break e;for(;r.sibling===null;){if(r.return===null||r.return===a)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}switch(m){case"forwards":for(s=a.child,m=null;s!==null;)r=s.alternate,r!==null&&ru(r)===null&&(m=s),s=s.sibling;s=m,s===null?(m=a.child,a.child=null):(m=s.sibling,s.sibling=null),jd(a,!1,m,s,g,c);break;case"backwards":case"unstable_legacy-backwards":for(s=null,m=a.child,a.child=null;m!==null;){if(r=m.alternate,r!==null&&ru(r)===null){a.child=m;break}r=m.sibling,m.sibling=s,s=m,m=r}jd(a,!0,s,null,g,c);break;case"together":jd(a,!1,null,null,void 0,c);break;default:a.memoizedState=null}return a.child}function $r(r,a,s){if(r!==null&&(a.dependencies=r.dependencies),di|=a.lanes,(s&a.childLanes)===0)if(r!==null){if(Va(r,a,s,!1),(s&a.childLanes)===0)return null}else return null;if(r!==null&&a.child!==r.child)throw Error(i(153));if(a.child!==null){for(r=a.child,s=jr(r,r.pendingProps),a.child=s,s.return=a;r.sibling!==null;)r=r.sibling,s=s.sibling=jr(r,r.pendingProps),s.return=a;s.sibling=null}return a.child}function Nd(r,a){return(r.lanes&a)!==0?!0:(r=r.dependencies,!!(r!==null&&Xl(r)))}function HT(r,a,s){switch(a.tag){case 3:Ge(a,a.stateNode.containerInfo),ii(a,At,r.memoizedState.cache),qi();break;case 27:case 5:Ct(a);break;case 4:Ge(a,a.stateNode.containerInfo);break;case 10:ii(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,nd(a),null;break;case 13:var c=a.memoizedState;if(c!==null)return c.dehydrated!==null?(li(a),a.flags|=128,null):(s&a.child.childLanes)!==0?rv(r,a,s):(li(a),r=$r(r,a,s),r!==null?r.sibling:null);li(a);break;case 19:var m=(r.flags&128)!==0;if(c=(s&a.childLanes)!==0,c||(Va(r,a,s,!1),c=(s&a.childLanes)!==0),m){if(c)return av(r,a,s);a.flags|=128}if(m=a.memoizedState,m!==null&&(m.rendering=null,m.tail=null,m.lastEffect=null),k(Et,Et.current),c)break;return null;case 22:return a.lanes=0,Jx(r,a,s,a.pendingProps);case 24:ii(a,At,r.memoizedState.cache)}return $r(r,a,s)}function ov(r,a,s){if(r!==null)if(r.memoizedProps!==a.pendingProps)Nt=!0;else{if(!Nd(r,s)&&(a.flags&128)===0)return Nt=!1,HT(r,a,s);Nt=(r.flags&131072)!==0}else Nt=!1,Ue&&(a.flags&1048576)!==0&&Uy(a,is,a.index);switch(a.lanes=0,a.tag){case 16:e:{var c=a.pendingProps;if(r=Ki(a.elementType),a.type=r,typeof r=="function")$f(r)?(c=ea(r,c),a.tag=1,a=tv(null,a,r,c,s)):(a.tag=0,a=zd(null,a,r,c,s));else{if(r!=null){var m=r.$$typeof;if(m===R){a.tag=11,a=Yx(null,a,r,c,s);break e}else if(m===q){a.tag=14,a=Xx(null,a,r,c,s);break e}}throw a=ue(r)||r,Error(i(306,a,""))}}return a;case 0:return zd(r,a,a.type,a.pendingProps,s);case 1:return c=a.type,m=ea(c,a.pendingProps),tv(r,a,c,m,s);case 3:e:{if(Ge(a,a.stateNode.containerInfo),r===null)throw Error(i(387));c=a.pendingProps;var g=a.memoizedState;m=g.element,Jf(r,a),ds(a,c,null,s);var S=a.memoizedState;if(c=S.cache,ii(a,At,c),c!==g.cache&&Ff(a,[At],s,!0),fs(),c=S.element,g.isDehydrated)if(g={element:c,isDehydrated:!1,cache:S.cache},a.updateQueue.baseState=g,a.memoizedState=g,a.flags&256){a=nv(r,a,c,s);break e}else if(c!==m){m=Bn(Error(i(424)),a),as(m),a=nv(r,a,c,s);break e}else for(r=a.stateNode.containerInfo,r.nodeType===9?r=r.body:r=r.nodeName==="HTML"?r.ownerDocument.body:r,ut=Gn(r.firstChild),Yt=a,Ue=!0,ni=null,Fn=!0,s=Jy(a,null,c,s),a.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(qi(),c===m){a=$r(r,a,s);break e}Kt(r,a,c,s)}a=a.child}return a;case 26:return mu(r,a),r===null?(s=yb(a.type,null,a.pendingProps,null))?a.memoizedState=s:Ue||(s=a.type,r=a.pendingProps,c=Nu(me.current).createElement(s),c[Gt]=a,c[mn]=r,Jt(c,s,r),Ft(c),a.stateNode=c):a.memoizedState=yb(a.type,r.memoizedProps,a.pendingProps,r.memoizedState),null;case 27:return Ct(a),r===null&&Ue&&(c=a.stateNode=mb(a.type,a.pendingProps,me.current),Yt=a,Fn=!0,m=ut,yi(a.type)?(ch=m,ut=Gn(c.firstChild)):ut=m),Kt(r,a,a.pendingProps.children,s),mu(r,a),r===null&&(a.flags|=4194304),a.child;case 5:return r===null&&Ue&&((m=c=ut)&&(c=b2(c,a.type,a.pendingProps,Fn),c!==null?(a.stateNode=c,Yt=a,ut=Gn(c.firstChild),Fn=!1,m=!0):m=!1),m||ri(a)),Ct(a),m=a.type,g=a.pendingProps,S=r!==null?r.memoizedProps:null,c=g.children,ah(m,g)?c=null:S!==null&&ah(m,S)&&(a.flags|=32),a.memoizedState!==null&&(m=id(r,a,DT,null,null,s),Os._currentValue=m),mu(r,a),Kt(r,a,c,s),a.child;case 6:return r===null&&Ue&&((r=s=ut)&&(s=S2(s,a.pendingProps,Fn),s!==null?(a.stateNode=s,Yt=a,ut=null,r=!0):r=!1),r||ri(a)),null;case 13:return rv(r,a,s);case 4:return Ge(a,a.stateNode.containerInfo),c=a.pendingProps,r===null?a.child=Qi(a,null,c,s):Kt(r,a,c,s),a.child;case 11:return Yx(r,a,a.type,a.pendingProps,s);case 7:return Kt(r,a,a.pendingProps,s),a.child;case 8:return Kt(r,a,a.pendingProps.children,s),a.child;case 12:return Kt(r,a,a.pendingProps.children,s),a.child;case 10:return c=a.pendingProps,ii(a,a.type,c.value),Kt(r,a,c.children,s),a.child;case 9:return m=a.type._context,c=a.pendingProps.children,Yi(a),m=Xt(m),c=c(m),a.flags|=1,Kt(r,a,c,s),a.child;case 14:return Xx(r,a,a.type,a.pendingProps,s);case 15:return Kx(r,a,a.type,a.pendingProps,s);case 19:return av(r,a,s);case 31:return IT(r,a,s);case 22:return Jx(r,a,s,a.pendingProps);case 24:return Yi(a),c=Xt(At),r===null?(m=Yf(),m===null&&(m=rt,g=qf(),m.pooledCache=g,g.refCount++,g!==null&&(m.pooledCacheLanes|=s),m=g),a.memoizedState={parent:c,cache:m},Kf(a),ii(a,At,m)):((r.lanes&s)!==0&&(Jf(r,a),ds(a,null,null,s),fs()),m=r.memoizedState,g=a.memoizedState,m.parent!==c?(m={parent:c,cache:c},a.memoizedState=m,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=m),ii(a,At,c)):(c=g.cache,ii(a,At,c),c!==m.cache&&Ff(a,[At],s,!0))),Kt(r,a,a.pendingProps.children,s),a.child;case 29:throw a.pendingProps}throw Error(i(156,a.tag))}function Lr(r){r.flags|=4}function Od(r,a,s,c,m){if((a=(r.mode&32)!==0)&&(a=!1),a){if(r.flags|=16777216,(m&335544128)===m)if(r.stateNode.complete)r.flags|=8192;else if(Rv())r.flags|=8192;else throw Ji=Wl,Xf}else r.flags&=-16777217}function sv(r,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!wb(a))if(Rv())r.flags|=8192;else throw Ji=Wl,Xf}function gu(r,a){a!==null&&(r.flags|=4),r.flags&16384&&(a=r.tag!==22?Pg():536870912,r.lanes|=a,Ja|=a)}function xs(r,a){if(!Ue)switch(r.tailMode){case"hidden":a=r.tail;for(var s=null;a!==null;)a.alternate!==null&&(s=a),a=a.sibling;s===null?r.tail=null:s.sibling=null;break;case"collapsed":s=r.tail;for(var c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?a||r.tail===null?r.tail=null:r.tail.sibling=null:c.sibling=null}}function ct(r){var a=r.alternate!==null&&r.alternate.child===r.child,s=0,c=0;if(a)for(var m=r.child;m!==null;)s|=m.lanes|m.childLanes,c|=m.subtreeFlags&65011712,c|=m.flags&65011712,m.return=r,m=m.sibling;else for(m=r.child;m!==null;)s|=m.lanes|m.childLanes,c|=m.subtreeFlags,c|=m.flags,m.return=r,m=m.sibling;return r.subtreeFlags|=c,r.childLanes=s,a}function FT(r,a,s){var c=a.pendingProps;switch(Pf(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ct(a),null;case 1:return ct(a),null;case 3:return s=a.stateNode,c=null,r!==null&&(c=r.memoizedState.cache),a.memoizedState.cache!==c&&(a.flags|=2048),Rr(At),De(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(r===null||r.child===null)&&(Ua(a)?Lr(a):r===null||r.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Bf())),ct(a),null;case 26:var m=a.type,g=a.memoizedState;return r===null?(Lr(a),g!==null?(ct(a),sv(a,g)):(ct(a),Od(a,m,null,c,s))):g?g!==r.memoizedState?(Lr(a),ct(a),sv(a,g)):(ct(a),a.flags&=-16777217):(r=r.memoizedProps,r!==c&&Lr(a),ct(a),Od(a,m,r,c,s)),null;case 27:if(an(a),s=me.current,m=a.type,r!==null&&a.stateNode!=null)r.memoizedProps!==c&&Lr(a);else{if(!c){if(a.stateNode===null)throw Error(i(166));return ct(a),null}r=ae.current,Ua(a)?Py(a):(r=mb(m,c,s),a.stateNode=r,Lr(a))}return ct(a),null;case 5:if(an(a),m=a.type,r!==null&&a.stateNode!=null)r.memoizedProps!==c&&Lr(a);else{if(!c){if(a.stateNode===null)throw Error(i(166));return ct(a),null}if(g=ae.current,Ua(a))Py(a);else{var S=Nu(me.current);switch(g){case 1:g=S.createElementNS("http://www.w3.org/2000/svg",m);break;case 2:g=S.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;default:switch(m){case"svg":g=S.createElementNS("http://www.w3.org/2000/svg",m);break;case"math":g=S.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;case"script":g=S.createElement("div"),g.innerHTML="<script><\/script>",g=g.removeChild(g.firstChild);break;case"select":g=typeof c.is=="string"?S.createElement("select",{is:c.is}):S.createElement("select"),c.multiple?g.multiple=!0:c.size&&(g.size=c.size);break;default:g=typeof c.is=="string"?S.createElement(m,{is:c.is}):S.createElement(m)}}g[Gt]=a,g[mn]=c;e:for(S=a.child;S!==null;){if(S.tag===5||S.tag===6)g.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===a)break e;for(;S.sibling===null;){if(S.return===null||S.return===a)break e;S=S.return}S.sibling.return=S.return,S=S.sibling}a.stateNode=g;e:switch(Jt(g,m,c),m){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}c&&Lr(a)}}return ct(a),Od(a,a.type,r===null?null:r.memoizedProps,a.pendingProps,s),null;case 6:if(r&&a.stateNode!=null)r.memoizedProps!==c&&Lr(a);else{if(typeof c!="string"&&a.stateNode===null)throw Error(i(166));if(r=me.current,Ua(a)){if(r=a.stateNode,s=a.memoizedProps,c=null,m=Yt,m!==null)switch(m.tag){case 27:case 5:c=m.memoizedProps}r[Gt]=a,r=!!(r.nodeValue===s||c!==null&&c.suppressHydrationWarning===!0||rb(r.nodeValue,s)),r||ri(a,!0)}else r=Nu(r).createTextNode(c),r[Gt]=a,a.stateNode=r}return ct(a),null;case 31:if(s=a.memoizedState,r===null||r.memoizedState!==null){if(c=Ua(a),s!==null){if(r===null){if(!c)throw Error(i(318));if(r=a.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(557));r[Gt]=a}else qi(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;ct(a),r=!1}else s=Bf(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=s),r=!0;if(!r)return a.flags&256?(An(a),a):(An(a),null);if((a.flags&128)!==0)throw Error(i(558))}return ct(a),null;case 13:if(c=a.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(m=Ua(a),c!==null&&c.dehydrated!==null){if(r===null){if(!m)throw Error(i(318));if(m=a.memoizedState,m=m!==null?m.dehydrated:null,!m)throw Error(i(317));m[Gt]=a}else qi(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;ct(a),m=!1}else m=Bf(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=m),m=!0;if(!m)return a.flags&256?(An(a),a):(An(a),null)}return An(a),(a.flags&128)!==0?(a.lanes=s,a):(s=c!==null,r=r!==null&&r.memoizedState!==null,s&&(c=a.child,m=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(m=c.alternate.memoizedState.cachePool.pool),g=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(g=c.memoizedState.cachePool.pool),g!==m&&(c.flags|=2048)),s!==r&&s&&(a.child.flags|=8192),gu(a,a.updateQueue),ct(a),null);case 4:return De(),r===null&&eh(a.stateNode.containerInfo),ct(a),null;case 10:return Rr(a.type),ct(a),null;case 19:if(F(Et),c=a.memoizedState,c===null)return ct(a),null;if(m=(a.flags&128)!==0,g=c.rendering,g===null)if(m)xs(c,!1);else{if(kt!==0||r!==null&&(r.flags&128)!==0)for(r=a.child;r!==null;){if(g=ru(r),g!==null){for(a.flags|=128,xs(c,!1),r=g.updateQueue,a.updateQueue=r,gu(a,r),a.subtreeFlags=0,r=s,s=a.child;s!==null;)Dy(s,r),s=s.sibling;return k(Et,Et.current&1|2),Ue&&Nr(a,c.treeForkCount),a.child}r=r.sibling}c.tail!==null&&lt()>Su&&(a.flags|=128,m=!0,xs(c,!1),a.lanes=4194304)}else{if(!m)if(r=ru(g),r!==null){if(a.flags|=128,m=!0,r=r.updateQueue,a.updateQueue=r,gu(a,r),xs(c,!0),c.tail===null&&c.tailMode==="hidden"&&!g.alternate&&!Ue)return ct(a),null}else 2*lt()-c.renderingStartTime>Su&&s!==536870912&&(a.flags|=128,m=!0,xs(c,!1),a.lanes=4194304);c.isBackwards?(g.sibling=a.child,a.child=g):(r=c.last,r!==null?r.sibling=g:a.child=g,c.last=g)}return c.tail!==null?(r=c.tail,c.rendering=r,c.tail=r.sibling,c.renderingStartTime=lt(),r.sibling=null,s=Et.current,k(Et,m?s&1|2:s&1),Ue&&Nr(a,c.treeForkCount),r):(ct(a),null);case 22:case 23:return An(a),td(),c=a.memoizedState!==null,r!==null?r.memoizedState!==null!==c&&(a.flags|=8192):c&&(a.flags|=8192),c?(s&536870912)!==0&&(a.flags&128)===0&&(ct(a),a.subtreeFlags&6&&(a.flags|=8192)):ct(a),s=a.updateQueue,s!==null&&gu(a,s.retryQueue),s=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(s=r.memoizedState.cachePool.pool),c=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(c=a.memoizedState.cachePool.pool),c!==s&&(a.flags|=2048),r!==null&&F(Xi),null;case 24:return s=null,r!==null&&(s=r.memoizedState.cache),a.memoizedState.cache!==s&&(a.flags|=2048),Rr(At),ct(a),null;case 25:return null;case 30:return null}throw Error(i(156,a.tag))}function qT(r,a){switch(Pf(a),a.tag){case 1:return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 3:return Rr(At),De(),r=a.flags,(r&65536)!==0&&(r&128)===0?(a.flags=r&-65537|128,a):null;case 26:case 27:case 5:return an(a),null;case 31:if(a.memoizedState!==null){if(An(a),a.alternate===null)throw Error(i(340));qi()}return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 13:if(An(a),r=a.memoizedState,r!==null&&r.dehydrated!==null){if(a.alternate===null)throw Error(i(340));qi()}return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 19:return F(Et),null;case 4:return De(),null;case 10:return Rr(a.type),null;case 22:case 23:return An(a),td(),r!==null&&F(Xi),r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 24:return Rr(At),null;case 25:return null;default:return null}}function lv(r,a){switch(Pf(a),a.tag){case 3:Rr(At),De();break;case 26:case 27:case 5:an(a);break;case 4:De();break;case 31:a.memoizedState!==null&&An(a);break;case 13:An(a);break;case 19:F(Et);break;case 10:Rr(a.type);break;case 22:case 23:An(a),td(),r!==null&&F(Xi);break;case 24:Rr(At)}}function vs(r,a){try{var s=a.updateQueue,c=s!==null?s.lastEffect:null;if(c!==null){var m=c.next;s=m;do{if((s.tag&r)===r){c=void 0;var g=s.create,S=s.inst;c=g(),S.destroy=c}s=s.next}while(s!==m)}}catch(w){Xe(a,a.return,w)}}function ci(r,a,s){try{var c=a.updateQueue,m=c!==null?c.lastEffect:null;if(m!==null){var g=m.next;c=g;do{if((c.tag&r)===r){var S=c.inst,w=S.destroy;if(w!==void 0){S.destroy=void 0,m=a;var M=s,B=w;try{B()}catch(Y){Xe(m,M,Y)}}}c=c.next}while(c!==g)}}catch(Y){Xe(a,a.return,Y)}}function uv(r){var a=r.updateQueue;if(a!==null){var s=r.stateNode;try{Wy(a,s)}catch(c){Xe(r,r.return,c)}}}function cv(r,a,s){s.props=ea(r.type,r.memoizedProps),s.state=r.memoizedState;try{s.componentWillUnmount()}catch(c){Xe(r,a,c)}}function bs(r,a){try{var s=r.ref;if(s!==null){switch(r.tag){case 26:case 27:case 5:var c=r.stateNode;break;case 30:c=r.stateNode;break;default:c=r.stateNode}typeof s=="function"?r.refCleanup=s(c):s.current=c}}catch(m){Xe(r,a,m)}}function gr(r,a){var s=r.ref,c=r.refCleanup;if(s!==null)if(typeof c=="function")try{c()}catch(m){Xe(r,a,m)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(m){Xe(r,a,m)}else s.current=null}function fv(r){var a=r.type,s=r.memoizedProps,c=r.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":s.autoFocus&&c.focus();break e;case"img":s.src?c.src=s.src:s.srcSet&&(c.srcset=s.srcSet)}}catch(m){Xe(r,r.return,m)}}function Rd(r,a,s){try{var c=r.stateNode;m2(c,r.type,s,a),c[mn]=a}catch(m){Xe(r,r.return,m)}}function dv(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&yi(r.type)||r.tag===4}function Md(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||dv(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.tag===27&&yi(r.type)||r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function Dd(r,a,s){var c=r.tag;if(c===5||c===6)r=r.stateNode,a?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(r,a):(a=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,a.appendChild(r),s=s._reactRootContainer,s!=null||a.onclick!==null||(a.onclick=Cr));else if(c!==4&&(c===27&&yi(r.type)&&(s=r.stateNode,a=null),r=r.child,r!==null))for(Dd(r,a,s),r=r.sibling;r!==null;)Dd(r,a,s),r=r.sibling}function yu(r,a,s){var c=r.tag;if(c===5||c===6)r=r.stateNode,a?s.insertBefore(r,a):s.appendChild(r);else if(c!==4&&(c===27&&yi(r.type)&&(s=r.stateNode),r=r.child,r!==null))for(yu(r,a,s),r=r.sibling;r!==null;)yu(r,a,s),r=r.sibling}function hv(r){var a=r.stateNode,s=r.memoizedProps;try{for(var c=r.type,m=a.attributes;m.length;)a.removeAttributeNode(m[0]);Jt(a,c,s),a[Gt]=r,a[mn]=s}catch(g){Xe(r,r.return,g)}}var Ur=!1,Ot=!1,$d=!1,mv=typeof WeakSet=="function"?WeakSet:Set,qt=null;function GT(r,a){if(r=r.containerInfo,rh=Uu,r=Ey(r),Af(r)){if("selectionStart"in r)var s={start:r.selectionStart,end:r.selectionEnd};else e:{s=(s=r.ownerDocument)&&s.defaultView||window;var c=s.getSelection&&s.getSelection();if(c&&c.rangeCount!==0){s=c.anchorNode;var m=c.anchorOffset,g=c.focusNode;c=c.focusOffset;try{s.nodeType,g.nodeType}catch{s=null;break e}var S=0,w=-1,M=-1,B=0,Y=0,ee=r,I=null;t:for(;;){for(var H;ee!==s||m!==0&&ee.nodeType!==3||(w=S+m),ee!==g||c!==0&&ee.nodeType!==3||(M=S+c),ee.nodeType===3&&(S+=ee.nodeValue.length),(H=ee.firstChild)!==null;)I=ee,ee=H;for(;;){if(ee===r)break t;if(I===s&&++B===m&&(w=S),I===g&&++Y===c&&(M=S),(H=ee.nextSibling)!==null)break;ee=I,I=ee.parentNode}ee=H}s=w===-1||M===-1?null:{start:w,end:M}}else s=null}s=s||{start:0,end:0}}else s=null;for(ih={focusedElem:r,selectionRange:s},Uu=!1,qt=a;qt!==null;)if(a=qt,r=a.child,(a.subtreeFlags&1028)!==0&&r!==null)r.return=a,qt=r;else for(;qt!==null;){switch(a=qt,g=a.alternate,r=a.flags,a.tag){case 0:if((r&4)!==0&&(r=a.updateQueue,r=r!==null?r.events:null,r!==null))for(s=0;s<r.length;s++)m=r[s],m.ref.impl=m.nextImpl;break;case 11:case 15:break;case 1:if((r&1024)!==0&&g!==null){r=void 0,s=a,m=g.memoizedProps,g=g.memoizedState,c=s.stateNode;try{var ce=ea(s.type,m);r=c.getSnapshotBeforeUpdate(ce,g),c.__reactInternalSnapshotBeforeUpdate=r}catch(ke){Xe(s,s.return,ke)}}break;case 3:if((r&1024)!==0){if(r=a.stateNode.containerInfo,s=r.nodeType,s===9)sh(r);else if(s===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":sh(r);break;default:r.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((r&1024)!==0)throw Error(i(163))}if(r=a.sibling,r!==null){r.return=a.return,qt=r;break}qt=a.return}}function pv(r,a,s){var c=s.flags;switch(s.tag){case 0:case 11:case 15:Pr(r,s),c&4&&vs(5,s);break;case 1:if(Pr(r,s),c&4)if(r=s.stateNode,a===null)try{r.componentDidMount()}catch(S){Xe(s,s.return,S)}else{var m=ea(s.type,a.memoizedProps);a=a.memoizedState;try{r.componentDidUpdate(m,a,r.__reactInternalSnapshotBeforeUpdate)}catch(S){Xe(s,s.return,S)}}c&64&&uv(s),c&512&&bs(s,s.return);break;case 3:if(Pr(r,s),c&64&&(r=s.updateQueue,r!==null)){if(a=null,s.child!==null)switch(s.child.tag){case 27:case 5:a=s.child.stateNode;break;case 1:a=s.child.stateNode}try{Wy(r,a)}catch(S){Xe(s,s.return,S)}}break;case 27:a===null&&c&4&&hv(s);case 26:case 5:Pr(r,s),a===null&&c&4&&fv(s),c&512&&bs(s,s.return);break;case 12:Pr(r,s);break;case 31:Pr(r,s),c&4&&xv(r,s);break;case 13:Pr(r,s),c&4&&vv(r,s),c&64&&(r=s.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(s=n2.bind(null,s),w2(r,s))));break;case 22:if(c=s.memoizedState!==null||Ur,!c){a=a!==null&&a.memoizedState!==null||Ot,m=Ur;var g=Ot;Ur=c,(Ot=a)&&!g?Zr(r,s,(s.subtreeFlags&8772)!==0):Pr(r,s),Ur=m,Ot=g}break;case 30:break;default:Pr(r,s)}}function gv(r){var a=r.alternate;a!==null&&(r.alternate=null,gv(a)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(a=r.stateNode,a!==null&&df(a)),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}var dt=null,gn=!1;function Vr(r,a,s){for(s=s.child;s!==null;)yv(r,a,s),s=s.sibling}function yv(r,a,s){if(Pt&&typeof Pt.onCommitFiberUnmount=="function")try{Pt.onCommitFiberUnmount(sn,s)}catch{}switch(s.tag){case 26:Ot||gr(s,a),Vr(r,a,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:Ot||gr(s,a);var c=dt,m=gn;yi(s.type)&&(dt=s.stateNode,gn=!1),Vr(r,a,s),As(s.stateNode),dt=c,gn=m;break;case 5:Ot||gr(s,a);case 6:if(c=dt,m=gn,dt=null,Vr(r,a,s),dt=c,gn=m,dt!==null)if(gn)try{(dt.nodeType===9?dt.body:dt.nodeName==="HTML"?dt.ownerDocument.body:dt).removeChild(s.stateNode)}catch(g){Xe(s,a,g)}else try{dt.removeChild(s.stateNode)}catch(g){Xe(s,a,g)}break;case 18:dt!==null&&(gn?(r=dt,ub(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,s.stateNode),ao(r)):ub(dt,s.stateNode));break;case 4:c=dt,m=gn,dt=s.stateNode.containerInfo,gn=!0,Vr(r,a,s),dt=c,gn=m;break;case 0:case 11:case 14:case 15:ci(2,s,a),Ot||ci(4,s,a),Vr(r,a,s);break;case 1:Ot||(gr(s,a),c=s.stateNode,typeof c.componentWillUnmount=="function"&&cv(s,a,c)),Vr(r,a,s);break;case 21:Vr(r,a,s);break;case 22:Ot=(c=Ot)||s.memoizedState!==null,Vr(r,a,s),Ot=c;break;default:Vr(r,a,s)}}function xv(r,a){if(a.memoizedState===null&&(r=a.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{ao(r)}catch(s){Xe(a,a.return,s)}}}function vv(r,a){if(a.memoizedState===null&&(r=a.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{ao(r)}catch(s){Xe(a,a.return,s)}}function YT(r){switch(r.tag){case 31:case 13:case 19:var a=r.stateNode;return a===null&&(a=r.stateNode=new mv),a;case 22:return r=r.stateNode,a=r._retryCache,a===null&&(a=r._retryCache=new mv),a;default:throw Error(i(435,r.tag))}}function xu(r,a){var s=YT(r);a.forEach(function(c){if(!s.has(c)){s.add(c);var m=r2.bind(null,r,c);c.then(m,m)}})}function yn(r,a){var s=a.deletions;if(s!==null)for(var c=0;c<s.length;c++){var m=s[c],g=r,S=a,w=S;e:for(;w!==null;){switch(w.tag){case 27:if(yi(w.type)){dt=w.stateNode,gn=!1;break e}break;case 5:dt=w.stateNode,gn=!1;break e;case 3:case 4:dt=w.stateNode.containerInfo,gn=!0;break e}w=w.return}if(dt===null)throw Error(i(160));yv(g,S,m),dt=null,gn=!1,g=m.alternate,g!==null&&(g.return=null),m.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)bv(a,r),a=a.sibling}var or=null;function bv(r,a){var s=r.alternate,c=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:yn(a,r),xn(r),c&4&&(ci(3,r,r.return),vs(3,r),ci(5,r,r.return));break;case 1:yn(a,r),xn(r),c&512&&(Ot||s===null||gr(s,s.return)),c&64&&Ur&&(r=r.updateQueue,r!==null&&(c=r.callbacks,c!==null&&(s=r.shared.hiddenCallbacks,r.shared.hiddenCallbacks=s===null?c:s.concat(c))));break;case 26:var m=or;if(yn(a,r),xn(r),c&512&&(Ot||s===null||gr(s,s.return)),c&4){var g=s!==null?s.memoizedState:null;if(c=r.memoizedState,s===null)if(c===null)if(r.stateNode===null){e:{c=r.type,s=r.memoizedProps,m=m.ownerDocument||m;t:switch(c){case"title":g=m.getElementsByTagName("title")[0],(!g||g[Go]||g[Gt]||g.namespaceURI==="http://www.w3.org/2000/svg"||g.hasAttribute("itemprop"))&&(g=m.createElement(c),m.head.insertBefore(g,m.querySelector("head > title"))),Jt(g,c,s),g[Gt]=r,Ft(g),c=g;break e;case"link":var S=bb("link","href",m).get(c+(s.href||""));if(S){for(var w=0;w<S.length;w++)if(g=S[w],g.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&g.getAttribute("rel")===(s.rel==null?null:s.rel)&&g.getAttribute("title")===(s.title==null?null:s.title)&&g.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){S.splice(w,1);break t}}g=m.createElement(c),Jt(g,c,s),m.head.appendChild(g);break;case"meta":if(S=bb("meta","content",m).get(c+(s.content||""))){for(w=0;w<S.length;w++)if(g=S[w],g.getAttribute("content")===(s.content==null?null:""+s.content)&&g.getAttribute("name")===(s.name==null?null:s.name)&&g.getAttribute("property")===(s.property==null?null:s.property)&&g.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&g.getAttribute("charset")===(s.charSet==null?null:s.charSet)){S.splice(w,1);break t}}g=m.createElement(c),Jt(g,c,s),m.head.appendChild(g);break;default:throw Error(i(468,c))}g[Gt]=r,Ft(g),c=g}r.stateNode=c}else Sb(m,r.type,r.stateNode);else r.stateNode=vb(m,c,r.memoizedProps);else g!==c?(g===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):g.count--,c===null?Sb(m,r.type,r.stateNode):vb(m,c,r.memoizedProps)):c===null&&r.stateNode!==null&&Rd(r,r.memoizedProps,s.memoizedProps)}break;case 27:yn(a,r),xn(r),c&512&&(Ot||s===null||gr(s,s.return)),s!==null&&c&4&&Rd(r,r.memoizedProps,s.memoizedProps);break;case 5:if(yn(a,r),xn(r),c&512&&(Ot||s===null||gr(s,s.return)),r.flags&32){m=r.stateNode;try{Ca(m,"")}catch(ce){Xe(r,r.return,ce)}}c&4&&r.stateNode!=null&&(m=r.memoizedProps,Rd(r,m,s!==null?s.memoizedProps:m)),c&1024&&($d=!0);break;case 6:if(yn(a,r),xn(r),c&4){if(r.stateNode===null)throw Error(i(162));c=r.memoizedProps,s=r.stateNode;try{s.nodeValue=c}catch(ce){Xe(r,r.return,ce)}}break;case 3:if(Mu=null,m=or,or=Ou(a.containerInfo),yn(a,r),or=m,xn(r),c&4&&s!==null&&s.memoizedState.isDehydrated)try{ao(a.containerInfo)}catch(ce){Xe(r,r.return,ce)}$d&&($d=!1,Sv(r));break;case 4:c=or,or=Ou(r.stateNode.containerInfo),yn(a,r),xn(r),or=c;break;case 12:yn(a,r),xn(r);break;case 31:yn(a,r),xn(r),c&4&&(c=r.updateQueue,c!==null&&(r.updateQueue=null,xu(r,c)));break;case 13:yn(a,r),xn(r),r.child.flags&8192&&r.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(bu=lt()),c&4&&(c=r.updateQueue,c!==null&&(r.updateQueue=null,xu(r,c)));break;case 22:m=r.memoizedState!==null;var M=s!==null&&s.memoizedState!==null,B=Ur,Y=Ot;if(Ur=B||m,Ot=Y||M,yn(a,r),Ot=Y,Ur=B,xn(r),c&8192)e:for(a=r.stateNode,a._visibility=m?a._visibility&-2:a._visibility|1,m&&(s===null||M||Ur||Ot||ta(r)),s=null,a=r;;){if(a.tag===5||a.tag===26){if(s===null){M=s=a;try{if(g=M.stateNode,m)S=g.style,typeof S.setProperty=="function"?S.setProperty("display","none","important"):S.display="none";else{w=M.stateNode;var ee=M.memoizedProps.style,I=ee!=null&&ee.hasOwnProperty("display")?ee.display:null;w.style.display=I==null||typeof I=="boolean"?"":(""+I).trim()}}catch(ce){Xe(M,M.return,ce)}}}else if(a.tag===6){if(s===null){M=a;try{M.stateNode.nodeValue=m?"":M.memoizedProps}catch(ce){Xe(M,M.return,ce)}}}else if(a.tag===18){if(s===null){M=a;try{var H=M.stateNode;m?cb(H,!0):cb(M.stateNode,!1)}catch(ce){Xe(M,M.return,ce)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===r)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===r)break e;for(;a.sibling===null;){if(a.return===null||a.return===r)break e;s===a&&(s=null),a=a.return}s===a&&(s=null),a.sibling.return=a.return,a=a.sibling}c&4&&(c=r.updateQueue,c!==null&&(s=c.retryQueue,s!==null&&(c.retryQueue=null,xu(r,s))));break;case 19:yn(a,r),xn(r),c&4&&(c=r.updateQueue,c!==null&&(r.updateQueue=null,xu(r,c)));break;case 30:break;case 21:break;default:yn(a,r),xn(r)}}function xn(r){var a=r.flags;if(a&2){try{for(var s,c=r.return;c!==null;){if(dv(c)){s=c;break}c=c.return}if(s==null)throw Error(i(160));switch(s.tag){case 27:var m=s.stateNode,g=Md(r);yu(r,g,m);break;case 5:var S=s.stateNode;s.flags&32&&(Ca(S,""),s.flags&=-33);var w=Md(r);yu(r,w,S);break;case 3:case 4:var M=s.stateNode.containerInfo,B=Md(r);Dd(r,B,M);break;default:throw Error(i(161))}}catch(Y){Xe(r,r.return,Y)}r.flags&=-3}a&4096&&(r.flags&=-4097)}function Sv(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var a=r;Sv(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),r=r.sibling}}function Pr(r,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)pv(r,a.alternate,a),a=a.sibling}function ta(r){for(r=r.child;r!==null;){var a=r;switch(a.tag){case 0:case 11:case 14:case 15:ci(4,a,a.return),ta(a);break;case 1:gr(a,a.return);var s=a.stateNode;typeof s.componentWillUnmount=="function"&&cv(a,a.return,s),ta(a);break;case 27:As(a.stateNode);case 26:case 5:gr(a,a.return),ta(a);break;case 22:a.memoizedState===null&&ta(a);break;case 30:ta(a);break;default:ta(a)}r=r.sibling}}function Zr(r,a,s){for(s=s&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var c=a.alternate,m=r,g=a,S=g.flags;switch(g.tag){case 0:case 11:case 15:Zr(m,g,s),vs(4,g);break;case 1:if(Zr(m,g,s),c=g,m=c.stateNode,typeof m.componentDidMount=="function")try{m.componentDidMount()}catch(B){Xe(c,c.return,B)}if(c=g,m=c.updateQueue,m!==null){var w=c.stateNode;try{var M=m.shared.hiddenCallbacks;if(M!==null)for(m.shared.hiddenCallbacks=null,m=0;m<M.length;m++)Qy(M[m],w)}catch(B){Xe(c,c.return,B)}}s&&S&64&&uv(g),bs(g,g.return);break;case 27:hv(g);case 26:case 5:Zr(m,g,s),s&&c===null&&S&4&&fv(g),bs(g,g.return);break;case 12:Zr(m,g,s);break;case 31:Zr(m,g,s),s&&S&4&&xv(m,g);break;case 13:Zr(m,g,s),s&&S&4&&vv(m,g);break;case 22:g.memoizedState===null&&Zr(m,g,s),bs(g,g.return);break;case 30:break;default:Zr(m,g,s)}a=a.sibling}}function Ld(r,a){var s=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(s=r.memoizedState.cachePool.pool),r=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(r=a.memoizedState.cachePool.pool),r!==s&&(r!=null&&r.refCount++,s!=null&&os(s))}function Ud(r,a){r=null,a.alternate!==null&&(r=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==r&&(a.refCount++,r!=null&&os(r))}function sr(r,a,s,c){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)wv(r,a,s,c),a=a.sibling}function wv(r,a,s,c){var m=a.flags;switch(a.tag){case 0:case 11:case 15:sr(r,a,s,c),m&2048&&vs(9,a);break;case 1:sr(r,a,s,c);break;case 3:sr(r,a,s,c),m&2048&&(r=null,a.alternate!==null&&(r=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==r&&(a.refCount++,r!=null&&os(r)));break;case 12:if(m&2048){sr(r,a,s,c),r=a.stateNode;try{var g=a.memoizedProps,S=g.id,w=g.onPostCommit;typeof w=="function"&&w(S,a.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(M){Xe(a,a.return,M)}}else sr(r,a,s,c);break;case 31:sr(r,a,s,c);break;case 13:sr(r,a,s,c);break;case 23:break;case 22:g=a.stateNode,S=a.alternate,a.memoizedState!==null?g._visibility&2?sr(r,a,s,c):Ss(r,a):g._visibility&2?sr(r,a,s,c):(g._visibility|=2,Ya(r,a,s,c,(a.subtreeFlags&10256)!==0||!1)),m&2048&&Ld(S,a);break;case 24:sr(r,a,s,c),m&2048&&Ud(a.alternate,a);break;default:sr(r,a,s,c)}}function Ya(r,a,s,c,m){for(m=m&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var g=r,S=a,w=s,M=c,B=S.flags;switch(S.tag){case 0:case 11:case 15:Ya(g,S,w,M,m),vs(8,S);break;case 23:break;case 22:var Y=S.stateNode;S.memoizedState!==null?Y._visibility&2?Ya(g,S,w,M,m):Ss(g,S):(Y._visibility|=2,Ya(g,S,w,M,m)),m&&B&2048&&Ld(S.alternate,S);break;case 24:Ya(g,S,w,M,m),m&&B&2048&&Ud(S.alternate,S);break;default:Ya(g,S,w,M,m)}a=a.sibling}}function Ss(r,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var s=r,c=a,m=c.flags;switch(c.tag){case 22:Ss(s,c),m&2048&&Ld(c.alternate,c);break;case 24:Ss(s,c),m&2048&&Ud(c.alternate,c);break;default:Ss(s,c)}a=a.sibling}}var ws=8192;function Xa(r,a,s){if(r.subtreeFlags&ws)for(r=r.child;r!==null;)kv(r,a,s),r=r.sibling}function kv(r,a,s){switch(r.tag){case 26:Xa(r,a,s),r.flags&ws&&r.memoizedState!==null&&M2(s,or,r.memoizedState,r.memoizedProps);break;case 5:Xa(r,a,s);break;case 3:case 4:var c=or;or=Ou(r.stateNode.containerInfo),Xa(r,a,s),or=c;break;case 22:r.memoizedState===null&&(c=r.alternate,c!==null&&c.memoizedState!==null?(c=ws,ws=16777216,Xa(r,a,s),ws=c):Xa(r,a,s));break;default:Xa(r,a,s)}}function zv(r){var a=r.alternate;if(a!==null&&(r=a.child,r!==null)){a.child=null;do a=r.sibling,r.sibling=null,r=a;while(r!==null)}}function ks(r){var a=r.deletions;if((r.flags&16)!==0){if(a!==null)for(var s=0;s<a.length;s++){var c=a[s];qt=c,Ev(c,r)}zv(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)_v(r),r=r.sibling}function _v(r){switch(r.tag){case 0:case 11:case 15:ks(r),r.flags&2048&&ci(9,r,r.return);break;case 3:ks(r);break;case 12:ks(r);break;case 22:var a=r.stateNode;r.memoizedState!==null&&a._visibility&2&&(r.return===null||r.return.tag!==13)?(a._visibility&=-3,vu(r)):ks(r);break;default:ks(r)}}function vu(r){var a=r.deletions;if((r.flags&16)!==0){if(a!==null)for(var s=0;s<a.length;s++){var c=a[s];qt=c,Ev(c,r)}zv(r)}for(r=r.child;r!==null;){switch(a=r,a.tag){case 0:case 11:case 15:ci(8,a,a.return),vu(a);break;case 22:s=a.stateNode,s._visibility&2&&(s._visibility&=-3,vu(a));break;default:vu(a)}r=r.sibling}}function Ev(r,a){for(;qt!==null;){var s=qt;switch(s.tag){case 0:case 11:case 15:ci(8,s,a);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var c=s.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:os(s.memoizedState.cache)}if(c=s.child,c!==null)c.return=s,qt=c;else e:for(s=r;qt!==null;){c=qt;var m=c.sibling,g=c.return;if(gv(c),c===s){qt=null;break e}if(m!==null){m.return=g,qt=m;break e}qt=g}}}var XT={getCacheForType:function(r){var a=Xt(At),s=a.data.get(r);return s===void 0&&(s=r(),a.data.set(r,s)),s},cacheSignal:function(){return Xt(At).controller.signal}},KT=typeof WeakMap=="function"?WeakMap:Map,He=0,rt=null,Oe=null,$e=0,Ye=0,jn=null,fi=!1,Ka=!1,Vd=!1,Br=0,kt=0,di=0,na=0,Pd=0,Nn=0,Ja=0,zs=null,vn=null,Zd=!1,bu=0,Tv=0,Su=1/0,wu=null,hi=null,Zt=0,mi=null,Qa=null,Ir=0,Bd=0,Id=null,Cv=null,_s=0,Hd=null;function On(){return(He&2)!==0&&$e!==0?$e&-$e:V.T!==null?Kd():Hg()}function Av(){if(Nn===0)if(($e&536870912)===0||Ue){var r=jl;jl<<=1,(jl&3932160)===0&&(jl=262144),Nn=r}else Nn=536870912;return r=Cn.current,r!==null&&(r.flags|=32),Nn}function bn(r,a,s){(r===rt&&(Ye===2||Ye===9)||r.cancelPendingCommit!==null)&&(Wa(r,0),pi(r,$e,Nn,!1)),qo(r,s),((He&2)===0||r!==rt)&&(r===rt&&((He&2)===0&&(na|=s),kt===4&&pi(r,$e,Nn,!1)),yr(r))}function jv(r,a,s){if((He&6)!==0)throw Error(i(327));var c=!s&&(a&127)===0&&(a&r.expiredLanes)===0||Fo(r,a),m=c?WT(r,a):qd(r,a,!0),g=c;do{if(m===0){Ka&&!c&&pi(r,a,0,!1);break}else{if(s=r.current.alternate,g&&!JT(s)){m=qd(r,a,!1),g=!1;continue}if(m===2){if(g=a,r.errorRecoveryDisabledLanes&g)var S=0;else S=r.pendingLanes&-536870913,S=S!==0?S:S&536870912?536870912:0;if(S!==0){a=S;e:{var w=r;m=zs;var M=w.current.memoizedState.isDehydrated;if(M&&(Wa(w,S).flags|=256),S=qd(w,S,!1),S!==2){if(Vd&&!M){w.errorRecoveryDisabledLanes|=g,na|=g,m=4;break e}g=vn,vn=m,g!==null&&(vn===null?vn=g:vn.push.apply(vn,g))}m=S}if(g=!1,m!==2)continue}}if(m===1){Wa(r,0),pi(r,a,0,!0);break}e:{switch(c=r,g=m,g){case 0:case 1:throw Error(i(345));case 4:if((a&4194048)!==a)break;case 6:pi(c,a,Nn,!fi);break e;case 2:vn=null;break;case 3:case 5:break;default:throw Error(i(329))}if((a&62914560)===a&&(m=bu+300-lt(),10<m)){if(pi(c,a,Nn,!fi),Ol(c,0,!0)!==0)break e;Ir=a,c.timeoutHandle=sb(Nv.bind(null,c,s,vn,wu,Zd,a,Nn,na,Ja,fi,g,"Throttled",-0,0),m);break e}Nv(c,s,vn,wu,Zd,a,Nn,na,Ja,fi,g,null,-0,0)}}break}while(!0);yr(r)}function Nv(r,a,s,c,m,g,S,w,M,B,Y,ee,I,H){if(r.timeoutHandle=-1,ee=a.subtreeFlags,ee&8192||(ee&16785408)===16785408){ee={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Cr},kv(a,g,ee);var ce=(g&62914560)===g?bu-lt():(g&4194048)===g?Tv-lt():0;if(ce=D2(ee,ce),ce!==null){Ir=g,r.cancelPendingCommit=ce(Vv.bind(null,r,a,g,s,c,m,S,w,M,Y,ee,null,I,H)),pi(r,g,S,!B);return}}Vv(r,a,g,s,c,m,S,w,M)}function JT(r){for(var a=r;;){var s=a.tag;if((s===0||s===11||s===15)&&a.flags&16384&&(s=a.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var c=0;c<s.length;c++){var m=s[c],g=m.getSnapshot;m=m.value;try{if(!En(g(),m))return!1}catch{return!1}}if(s=a.child,a.subtreeFlags&16384&&s!==null)s.return=a,a=s;else{if(a===r)break;for(;a.sibling===null;){if(a.return===null||a.return===r)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function pi(r,a,s,c){a&=~Pd,a&=~na,r.suspendedLanes|=a,r.pingedLanes&=~a,c&&(r.warmLanes|=a),c=r.expirationTimes;for(var m=a;0<m;){var g=31-nt(m),S=1<<g;c[g]=-1,m&=~S}s!==0&&Zg(r,s,a)}function ku(){return(He&6)===0?(Es(0),!1):!0}function Fd(){if(Oe!==null){if(Ye===0)var r=Oe.return;else r=Oe,Or=Gi=null,sd(r),Ia=null,ls=0,r=Oe;for(;r!==null;)lv(r.alternate,r),r=r.return;Oe=null}}function Wa(r,a){var s=r.timeoutHandle;s!==-1&&(r.timeoutHandle=-1,y2(s)),s=r.cancelPendingCommit,s!==null&&(r.cancelPendingCommit=null,s()),Ir=0,Fd(),rt=r,Oe=s=jr(r.current,null),$e=a,Ye=0,jn=null,fi=!1,Ka=Fo(r,a),Vd=!1,Ja=Nn=Pd=na=di=kt=0,vn=zs=null,Zd=!1,(a&8)!==0&&(a|=a&32);var c=r.entangledLanes;if(c!==0)for(r=r.entanglements,c&=a;0<c;){var m=31-nt(c),g=1<<m;a|=r[m],c&=~g}return Br=a,Hl(),s}function Ov(r,a){Ce=null,V.H=gs,a===Ba||a===Ql?(a=Yy(),Ye=3):a===Xf?(a=Yy(),Ye=4):Ye=a===kd?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,jn=a,Oe===null&&(kt=1,du(r,Bn(a,r.current)))}function Rv(){var r=Cn.current;return r===null?!0:($e&4194048)===$e?qn===null:($e&62914560)===$e||($e&536870912)!==0?r===qn:!1}function Mv(){var r=V.H;return V.H=gs,r===null?gs:r}function Dv(){var r=V.A;return V.A=XT,r}function zu(){kt=4,fi||($e&4194048)!==$e&&Cn.current!==null||(Ka=!0),(di&134217727)===0&&(na&134217727)===0||rt===null||pi(rt,$e,Nn,!1)}function qd(r,a,s){var c=He;He|=2;var m=Mv(),g=Dv();(rt!==r||$e!==a)&&(wu=null,Wa(r,a)),a=!1;var S=kt;e:do try{if(Ye!==0&&Oe!==null){var w=Oe,M=jn;switch(Ye){case 8:Fd(),S=6;break e;case 3:case 2:case 9:case 6:Cn.current===null&&(a=!0);var B=Ye;if(Ye=0,jn=null,eo(r,w,M,B),s&&Ka){S=0;break e}break;default:B=Ye,Ye=0,jn=null,eo(r,w,M,B)}}QT(),S=kt;break}catch(Y){Ov(r,Y)}while(!0);return a&&r.shellSuspendCounter++,Or=Gi=null,He=c,V.H=m,V.A=g,Oe===null&&(rt=null,$e=0,Hl()),S}function QT(){for(;Oe!==null;)$v(Oe)}function WT(r,a){var s=He;He|=2;var c=Mv(),m=Dv();rt!==r||$e!==a?(wu=null,Su=lt()+500,Wa(r,a)):Ka=Fo(r,a);e:do try{if(Ye!==0&&Oe!==null){a=Oe;var g=jn;t:switch(Ye){case 1:Ye=0,jn=null,eo(r,a,g,1);break;case 2:case 9:if(qy(g)){Ye=0,jn=null,Lv(a);break}a=function(){Ye!==2&&Ye!==9||rt!==r||(Ye=7),yr(r)},g.then(a,a);break e;case 3:Ye=7;break e;case 4:Ye=5;break e;case 7:qy(g)?(Ye=0,jn=null,Lv(a)):(Ye=0,jn=null,eo(r,a,g,7));break;case 5:var S=null;switch(Oe.tag){case 26:S=Oe.memoizedState;case 5:case 27:var w=Oe;if(S?wb(S):w.stateNode.complete){Ye=0,jn=null;var M=w.sibling;if(M!==null)Oe=M;else{var B=w.return;B!==null?(Oe=B,_u(B)):Oe=null}break t}}Ye=0,jn=null,eo(r,a,g,5);break;case 6:Ye=0,jn=null,eo(r,a,g,6);break;case 8:Fd(),kt=6;break e;default:throw Error(i(462))}}e2();break}catch(Y){Ov(r,Y)}while(!0);return Or=Gi=null,V.H=c,V.A=m,He=s,Oe!==null?0:(rt=null,$e=0,Hl(),kt)}function e2(){for(;Oe!==null&&!_t();)$v(Oe)}function $v(r){var a=ov(r.alternate,r,Br);r.memoizedProps=r.pendingProps,a===null?_u(r):Oe=a}function Lv(r){var a=r,s=a.alternate;switch(a.tag){case 15:case 0:a=ev(s,a,a.pendingProps,a.type,void 0,$e);break;case 11:a=ev(s,a,a.pendingProps,a.type.render,a.ref,$e);break;case 5:sd(a);default:lv(s,a),a=Oe=Dy(a,Br),a=ov(s,a,Br)}r.memoizedProps=r.pendingProps,a===null?_u(r):Oe=a}function eo(r,a,s,c){Or=Gi=null,sd(a),Ia=null,ls=0;var m=a.return;try{if(BT(r,m,a,s,$e)){kt=1,du(r,Bn(s,r.current)),Oe=null;return}}catch(g){if(m!==null)throw Oe=m,g;kt=1,du(r,Bn(s,r.current)),Oe=null;return}a.flags&32768?(Ue||c===1?r=!0:Ka||($e&536870912)!==0?r=!1:(fi=r=!0,(c===2||c===9||c===3||c===6)&&(c=Cn.current,c!==null&&c.tag===13&&(c.flags|=16384))),Uv(a,r)):_u(a)}function _u(r){var a=r;do{if((a.flags&32768)!==0){Uv(a,fi);return}r=a.return;var s=FT(a.alternate,a,Br);if(s!==null){Oe=s;return}if(a=a.sibling,a!==null){Oe=a;return}Oe=a=r}while(a!==null);kt===0&&(kt=5)}function Uv(r,a){do{var s=qT(r.alternate,r);if(s!==null){s.flags&=32767,Oe=s;return}if(s=r.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!a&&(r=r.sibling,r!==null)){Oe=r;return}Oe=r=s}while(r!==null);kt=6,Oe=null}function Vv(r,a,s,c,m,g,S,w,M){r.cancelPendingCommit=null;do Eu();while(Zt!==0);if((He&6)!==0)throw Error(i(327));if(a!==null){if(a===r.current)throw Error(i(177));if(g=a.lanes|a.childLanes,g|=Mf,RE(r,s,g,S,w,M),r===rt&&(Oe=rt=null,$e=0),Qa=a,mi=r,Ir=s,Bd=g,Id=m,Cv=c,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,i2(ge,function(){return Hv(),null})):(r.callbackNode=null,r.callbackPriority=0),c=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||c){c=V.T,V.T=null,m=X.p,X.p=2,S=He,He|=4;try{GT(r,a,s)}finally{He=S,X.p=m,V.T=c}}Zt=1,Pv(),Zv(),Bv()}}function Pv(){if(Zt===1){Zt=0;var r=mi,a=Qa,s=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||s){s=V.T,V.T=null;var c=X.p;X.p=2;var m=He;He|=4;try{bv(a,r);var g=ih,S=Ey(r.containerInfo),w=g.focusedElem,M=g.selectionRange;if(S!==w&&w&&w.ownerDocument&&_y(w.ownerDocument.documentElement,w)){if(M!==null&&Af(w)){var B=M.start,Y=M.end;if(Y===void 0&&(Y=B),"selectionStart"in w)w.selectionStart=B,w.selectionEnd=Math.min(Y,w.value.length);else{var ee=w.ownerDocument||document,I=ee&&ee.defaultView||window;if(I.getSelection){var H=I.getSelection(),ce=w.textContent.length,ke=Math.min(M.start,ce),et=M.end===void 0?ke:Math.min(M.end,ce);!H.extend&&ke>et&&(S=et,et=ke,ke=S);var U=zy(w,ke),D=zy(w,et);if(U&&D&&(H.rangeCount!==1||H.anchorNode!==U.node||H.anchorOffset!==U.offset||H.focusNode!==D.node||H.focusOffset!==D.offset)){var Z=ee.createRange();Z.setStart(U.node,U.offset),H.removeAllRanges(),ke>et?(H.addRange(Z),H.extend(D.node,D.offset)):(Z.setEnd(D.node,D.offset),H.addRange(Z))}}}}for(ee=[],H=w;H=H.parentNode;)H.nodeType===1&&ee.push({element:H,left:H.scrollLeft,top:H.scrollTop});for(typeof w.focus=="function"&&w.focus(),w=0;w<ee.length;w++){var W=ee[w];W.element.scrollLeft=W.left,W.element.scrollTop=W.top}}Uu=!!rh,ih=rh=null}finally{He=m,X.p=c,V.T=s}}r.current=a,Zt=2}}function Zv(){if(Zt===2){Zt=0;var r=mi,a=Qa,s=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||s){s=V.T,V.T=null;var c=X.p;X.p=2;var m=He;He|=4;try{pv(r,a.alternate,a)}finally{He=m,X.p=c,V.T=s}}Zt=3}}function Bv(){if(Zt===4||Zt===3){Zt=0,Vt();var r=mi,a=Qa,s=Ir,c=Cv;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?Zt=5:(Zt=0,Qa=mi=null,Iv(r,r.pendingLanes));var m=r.pendingLanes;if(m===0&&(hi=null),cf(s),a=a.stateNode,Pt&&typeof Pt.onCommitFiberRoot=="function")try{Pt.onCommitFiberRoot(sn,a,void 0,(a.current.flags&128)===128)}catch{}if(c!==null){a=V.T,m=X.p,X.p=2,V.T=null;try{for(var g=r.onRecoverableError,S=0;S<c.length;S++){var w=c[S];g(w.value,{componentStack:w.stack})}}finally{V.T=a,X.p=m}}(Ir&3)!==0&&Eu(),yr(r),m=r.pendingLanes,(s&261930)!==0&&(m&42)!==0?r===Hd?_s++:(_s=0,Hd=r):_s=0,Es(0)}}function Iv(r,a){(r.pooledCacheLanes&=a)===0&&(a=r.pooledCache,a!=null&&(r.pooledCache=null,os(a)))}function Eu(){return Pv(),Zv(),Bv(),Hv()}function Hv(){if(Zt!==5)return!1;var r=mi,a=Bd;Bd=0;var s=cf(Ir),c=V.T,m=X.p;try{X.p=32>s?32:s,V.T=null,s=Id,Id=null;var g=mi,S=Ir;if(Zt=0,Qa=mi=null,Ir=0,(He&6)!==0)throw Error(i(331));var w=He;if(He|=4,_v(g.current),wv(g,g.current,S,s),He=w,Es(0,!1),Pt&&typeof Pt.onPostCommitFiberRoot=="function")try{Pt.onPostCommitFiberRoot(sn,g)}catch{}return!0}finally{X.p=m,V.T=c,Iv(r,a)}}function Fv(r,a,s){a=Bn(s,a),a=wd(r.stateNode,a,2),r=si(r,a,2),r!==null&&(qo(r,2),yr(r))}function Xe(r,a,s){if(r.tag===3)Fv(r,r,s);else for(;a!==null;){if(a.tag===3){Fv(a,r,s);break}else if(a.tag===1){var c=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(hi===null||!hi.has(c))){r=Bn(s,r),s=qx(2),c=si(a,s,2),c!==null&&(Gx(s,c,a,r),qo(c,2),yr(c));break}}a=a.return}}function Gd(r,a,s){var c=r.pingCache;if(c===null){c=r.pingCache=new KT;var m=new Set;c.set(a,m)}else m=c.get(a),m===void 0&&(m=new Set,c.set(a,m));m.has(s)||(Vd=!0,m.add(s),r=t2.bind(null,r,a,s),a.then(r,r))}function t2(r,a,s){var c=r.pingCache;c!==null&&c.delete(a),r.pingedLanes|=r.suspendedLanes&s,r.warmLanes&=~s,rt===r&&($e&s)===s&&(kt===4||kt===3&&($e&62914560)===$e&&300>lt()-bu?(He&2)===0&&Wa(r,0):Pd|=s,Ja===$e&&(Ja=0)),yr(r)}function qv(r,a){a===0&&(a=Pg()),r=Hi(r,a),r!==null&&(qo(r,a),yr(r))}function n2(r){var a=r.memoizedState,s=0;a!==null&&(s=a.retryLane),qv(r,s)}function r2(r,a){var s=0;switch(r.tag){case 31:case 13:var c=r.stateNode,m=r.memoizedState;m!==null&&(s=m.retryLane);break;case 19:c=r.stateNode;break;case 22:c=r.stateNode._retryCache;break;default:throw Error(i(314))}c!==null&&c.delete(a),qv(r,s)}function i2(r,a){return Ht(r,a)}var Tu=null,to=null,Yd=!1,Cu=!1,Xd=!1,gi=0;function yr(r){r!==to&&r.next===null&&(to===null?Tu=to=r:to=to.next=r),Cu=!0,Yd||(Yd=!0,o2())}function Es(r,a){if(!Xd&&Cu){Xd=!0;do for(var s=!1,c=Tu;c!==null;){if(r!==0){var m=c.pendingLanes;if(m===0)var g=0;else{var S=c.suspendedLanes,w=c.pingedLanes;g=(1<<31-nt(42|r)+1)-1,g&=m&~(S&~w),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(s=!0,Kv(c,g))}else g=$e,g=Ol(c,c===rt?g:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(g&3)===0||Fo(c,g)||(s=!0,Kv(c,g));c=c.next}while(s);Xd=!1}}function a2(){Gv()}function Gv(){Cu=Yd=!1;var r=0;gi!==0&&g2()&&(r=gi);for(var a=lt(),s=null,c=Tu;c!==null;){var m=c.next,g=Yv(c,a);g===0?(c.next=null,s===null?Tu=m:s.next=m,m===null&&(to=s)):(s=c,(r!==0||(g&3)!==0)&&(Cu=!0)),c=m}Zt!==0&&Zt!==5||Es(r),gi!==0&&(gi=0)}function Yv(r,a){for(var s=r.suspendedLanes,c=r.pingedLanes,m=r.expirationTimes,g=r.pendingLanes&-62914561;0<g;){var S=31-nt(g),w=1<<S,M=m[S];M===-1?((w&s)===0||(w&c)!==0)&&(m[S]=OE(w,a)):M<=a&&(r.expiredLanes|=w),g&=~w}if(a=rt,s=$e,s=Ol(r,r===a?s:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),c=r.callbackNode,s===0||r===a&&(Ye===2||Ye===9)||r.cancelPendingCommit!==null)return c!==null&&c!==null&&Un(c),r.callbackNode=null,r.callbackPriority=0;if((s&3)===0||Fo(r,s)){if(a=s&-s,a===r.callbackPriority)return a;switch(c!==null&&Un(c),cf(s)){case 2:case 8:s=le;break;case 32:s=ge;break;case 268435456:s=Ve;break;default:s=ge}return c=Xv.bind(null,r),s=Ht(s,c),r.callbackPriority=a,r.callbackNode=s,a}return c!==null&&c!==null&&Un(c),r.callbackPriority=2,r.callbackNode=null,2}function Xv(r,a){if(Zt!==0&&Zt!==5)return r.callbackNode=null,r.callbackPriority=0,null;var s=r.callbackNode;if(Eu()&&r.callbackNode!==s)return null;var c=$e;return c=Ol(r,r===rt?c:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),c===0?null:(jv(r,c,a),Yv(r,lt()),r.callbackNode!=null&&r.callbackNode===s?Xv.bind(null,r):null)}function Kv(r,a){if(Eu())return null;jv(r,a,!0)}function o2(){x2(function(){(He&6)!==0?Ht(J,a2):Gv()})}function Kd(){if(gi===0){var r=Pa;r===0&&(r=Al,Al<<=1,(Al&261888)===0&&(Al=256)),gi=r}return gi}function Jv(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:$l(""+r)}function Qv(r,a){var s=a.ownerDocument.createElement("input");return s.name=a.name,s.value=a.value,r.id&&s.setAttribute("form",r.id),a.parentNode.insertBefore(s,a),r=new FormData(r),s.parentNode.removeChild(s),r}function s2(r,a,s,c,m){if(a==="submit"&&s&&s.stateNode===m){var g=Jv((m[mn]||null).action),S=c.submitter;S&&(a=(a=S[mn]||null)?Jv(a.formAction):S.getAttribute("formAction"),a!==null&&(g=a,S=null));var w=new Pl("action","action",null,c,m);r.push({event:w,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(gi!==0){var M=S?Qv(m,S):new FormData(m);gd(s,{pending:!0,data:M,method:m.method,action:g},null,M)}}else typeof g=="function"&&(w.preventDefault(),M=S?Qv(m,S):new FormData(m),gd(s,{pending:!0,data:M,method:m.method,action:g},g,M))},currentTarget:m}]})}}for(var Jd=0;Jd<Rf.length;Jd++){var Qd=Rf[Jd],l2=Qd.toLowerCase(),u2=Qd[0].toUpperCase()+Qd.slice(1);ar(l2,"on"+u2)}ar(Ay,"onAnimationEnd"),ar(jy,"onAnimationIteration"),ar(Ny,"onAnimationStart"),ar("dblclick","onDoubleClick"),ar("focusin","onFocus"),ar("focusout","onBlur"),ar(_T,"onTransitionRun"),ar(ET,"onTransitionStart"),ar(TT,"onTransitionCancel"),ar(Oy,"onTransitionEnd"),Ea("onMouseEnter",["mouseout","mouseover"]),Ea("onMouseLeave",["mouseout","mouseover"]),Ea("onPointerEnter",["pointerout","pointerover"]),Ea("onPointerLeave",["pointerout","pointerover"]),Pi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Pi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Pi("onBeforeInput",["compositionend","keypress","textInput","paste"]),Pi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Pi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Pi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ts="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(" "),c2=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ts));function Wv(r,a){a=(a&4)!==0;for(var s=0;s<r.length;s++){var c=r[s],m=c.event;c=c.listeners;e:{var g=void 0;if(a)for(var S=c.length-1;0<=S;S--){var w=c[S],M=w.instance,B=w.currentTarget;if(w=w.listener,M!==g&&m.isPropagationStopped())break e;g=w,m.currentTarget=B;try{g(m)}catch(Y){Il(Y)}m.currentTarget=null,g=M}else for(S=0;S<c.length;S++){if(w=c[S],M=w.instance,B=w.currentTarget,w=w.listener,M!==g&&m.isPropagationStopped())break e;g=w,m.currentTarget=B;try{g(m)}catch(Y){Il(Y)}m.currentTarget=null,g=M}}}}function Re(r,a){var s=a[ff];s===void 0&&(s=a[ff]=new Set);var c=r+"__bubble";s.has(c)||(eb(a,r,2,!1),s.add(c))}function Wd(r,a,s){var c=0;a&&(c|=4),eb(s,r,c,a)}var Au="_reactListening"+Math.random().toString(36).slice(2);function eh(r){if(!r[Au]){r[Au]=!0,Gg.forEach(function(s){s!=="selectionchange"&&(c2.has(s)||Wd(s,!1,r),Wd(s,!0,r))});var a=r.nodeType===9?r:r.ownerDocument;a===null||a[Au]||(a[Au]=!0,Wd("selectionchange",!1,a))}}function eb(r,a,s,c){switch(Ab(a)){case 2:var m=U2;break;case 8:m=V2;break;default:m=ph}s=m.bind(null,a,s,r),m=void 0,!bf||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(m=!0),c?m!==void 0?r.addEventListener(a,s,{capture:!0,passive:m}):r.addEventListener(a,s,!0):m!==void 0?r.addEventListener(a,s,{passive:m}):r.addEventListener(a,s,!1)}function th(r,a,s,c,m){var g=c;if((a&1)===0&&(a&2)===0&&c!==null)e:for(;;){if(c===null)return;var S=c.tag;if(S===3||S===4){var w=c.stateNode.containerInfo;if(w===m)break;if(S===4)for(S=c.return;S!==null;){var M=S.tag;if((M===3||M===4)&&S.stateNode.containerInfo===m)return;S=S.return}for(;w!==null;){if(S=ka(w),S===null)return;if(M=S.tag,M===5||M===6||M===26||M===27){c=g=S;continue e}w=w.parentNode}}c=c.return}ay(function(){var B=g,Y=xf(s),ee=[];e:{var I=Ry.get(r);if(I!==void 0){var H=Pl,ce=r;switch(r){case"keypress":if(Ul(s)===0)break e;case"keydown":case"keyup":H=rT;break;case"focusin":ce="focus",H=zf;break;case"focusout":ce="blur",H=zf;break;case"beforeblur":case"afterblur":H=zf;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":H=ly;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":H=FE;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":H=oT;break;case Ay:case jy:case Ny:H=YE;break;case Oy:H=lT;break;case"scroll":case"scrollend":H=IE;break;case"wheel":H=cT;break;case"copy":case"cut":case"paste":H=KE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":H=cy;break;case"toggle":case"beforetoggle":H=dT}var ke=(a&4)!==0,et=!ke&&(r==="scroll"||r==="scrollend"),U=ke?I!==null?I+"Capture":null:I;ke=[];for(var D=B,Z;D!==null;){var W=D;if(Z=W.stateNode,W=W.tag,W!==5&&W!==26&&W!==27||Z===null||U===null||(W=Xo(D,U),W!=null&&ke.push(Cs(D,W,Z))),et)break;D=D.return}0<ke.length&&(I=new H(I,ce,null,s,Y),ee.push({event:I,listeners:ke}))}}if((a&7)===0){e:{if(I=r==="mouseover"||r==="pointerover",H=r==="mouseout"||r==="pointerout",I&&s!==yf&&(ce=s.relatedTarget||s.fromElement)&&(ka(ce)||ce[wa]))break e;if((H||I)&&(I=Y.window===Y?Y:(I=Y.ownerDocument)?I.defaultView||I.parentWindow:window,H?(ce=s.relatedTarget||s.toElement,H=B,ce=ce?ka(ce):null,ce!==null&&(et=u(ce),ke=ce.tag,ce!==et||ke!==5&&ke!==27&&ke!==6)&&(ce=null)):(H=null,ce=B),H!==ce)){if(ke=ly,W="onMouseLeave",U="onMouseEnter",D="mouse",(r==="pointerout"||r==="pointerover")&&(ke=cy,W="onPointerLeave",U="onPointerEnter",D="pointer"),et=H==null?I:Yo(H),Z=ce==null?I:Yo(ce),I=new ke(W,D+"leave",H,s,Y),I.target=et,I.relatedTarget=Z,W=null,ka(Y)===B&&(ke=new ke(U,D+"enter",ce,s,Y),ke.target=Z,ke.relatedTarget=et,W=ke),et=W,H&&ce)t:{for(ke=f2,U=H,D=ce,Z=0,W=U;W;W=ke(W))Z++;W=0;for(var Se=D;Se;Se=ke(Se))W++;for(;0<Z-W;)U=ke(U),Z--;for(;0<W-Z;)D=ke(D),W--;for(;Z--;){if(U===D||D!==null&&U===D.alternate){ke=U;break t}U=ke(U),D=ke(D)}ke=null}else ke=null;H!==null&&tb(ee,I,H,ke,!1),ce!==null&&et!==null&&tb(ee,et,ce,ke,!0)}}e:{if(I=B?Yo(B):window,H=I.nodeName&&I.nodeName.toLowerCase(),H==="select"||H==="input"&&I.type==="file")var Be=xy;else if(gy(I))if(vy)Be=wT;else{Be=bT;var ye=vT}else H=I.nodeName,!H||H.toLowerCase()!=="input"||I.type!=="checkbox"&&I.type!=="radio"?B&&gf(B.elementType)&&(Be=xy):Be=ST;if(Be&&(Be=Be(r,B))){yy(ee,Be,s,Y);break e}ye&&ye(r,I,B),r==="focusout"&&B&&I.type==="number"&&B.memoizedProps.value!=null&&pf(I,"number",I.value)}switch(ye=B?Yo(B):window,r){case"focusin":(gy(ye)||ye.contentEditable==="true")&&(Oa=ye,jf=B,rs=null);break;case"focusout":rs=jf=Oa=null;break;case"mousedown":Nf=!0;break;case"contextmenu":case"mouseup":case"dragend":Nf=!1,Ty(ee,s,Y);break;case"selectionchange":if(zT)break;case"keydown":case"keyup":Ty(ee,s,Y)}var Ae;if(Ef)e:{switch(r){case"compositionstart":var Le="onCompositionStart";break e;case"compositionend":Le="onCompositionEnd";break e;case"compositionupdate":Le="onCompositionUpdate";break e}Le=void 0}else Na?my(r,s)&&(Le="onCompositionEnd"):r==="keydown"&&s.keyCode===229&&(Le="onCompositionStart");Le&&(fy&&s.locale!=="ko"&&(Na||Le!=="onCompositionStart"?Le==="onCompositionEnd"&&Na&&(Ae=oy()):(ei=Y,Sf="value"in ei?ei.value:ei.textContent,Na=!0)),ye=ju(B,Le),0<ye.length&&(Le=new uy(Le,r,null,s,Y),ee.push({event:Le,listeners:ye}),Ae?Le.data=Ae:(Ae=py(s),Ae!==null&&(Le.data=Ae)))),(Ae=mT?pT(r,s):gT(r,s))&&(Le=ju(B,"onBeforeInput"),0<Le.length&&(ye=new uy("onBeforeInput","beforeinput",null,s,Y),ee.push({event:ye,listeners:Le}),ye.data=Ae)),s2(ee,r,B,s,Y)}Wv(ee,a)})}function Cs(r,a,s){return{instance:r,listener:a,currentTarget:s}}function ju(r,a){for(var s=a+"Capture",c=[];r!==null;){var m=r,g=m.stateNode;if(m=m.tag,m!==5&&m!==26&&m!==27||g===null||(m=Xo(r,s),m!=null&&c.unshift(Cs(r,m,g)),m=Xo(r,a),m!=null&&c.push(Cs(r,m,g))),r.tag===3)return c;r=r.return}return[]}function f2(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function tb(r,a,s,c,m){for(var g=a._reactName,S=[];s!==null&&s!==c;){var w=s,M=w.alternate,B=w.stateNode;if(w=w.tag,M!==null&&M===c)break;w!==5&&w!==26&&w!==27||B===null||(M=B,m?(B=Xo(s,g),B!=null&&S.unshift(Cs(s,B,M))):m||(B=Xo(s,g),B!=null&&S.push(Cs(s,B,M)))),s=s.return}S.length!==0&&r.push({event:a,listeners:S})}var d2=/\r\n?/g,h2=/\u0000|\uFFFD/g;function nb(r){return(typeof r=="string"?r:""+r).replace(d2,`
9
+ `).replace(h2,"")}function rb(r,a){return a=nb(a),nb(r)===a}function We(r,a,s,c,m,g){switch(s){case"children":typeof c=="string"?a==="body"||a==="textarea"&&c===""||Ca(r,c):(typeof c=="number"||typeof c=="bigint")&&a!=="body"&&Ca(r,""+c);break;case"className":Ml(r,"class",c);break;case"tabIndex":Ml(r,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":Ml(r,s,c);break;case"style":ry(r,c,g);break;case"data":if(a!=="object"){Ml(r,"data",c);break}case"src":case"href":if(c===""&&(a!=="a"||s!=="href")){r.removeAttribute(s);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){r.removeAttribute(s);break}c=$l(""+c),r.setAttribute(s,c);break;case"action":case"formAction":if(typeof c=="function"){r.setAttribute(s,"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 g=="function"&&(s==="formAction"?(a!=="input"&&We(r,a,"name",m.name,m,null),We(r,a,"formEncType",m.formEncType,m,null),We(r,a,"formMethod",m.formMethod,m,null),We(r,a,"formTarget",m.formTarget,m,null)):(We(r,a,"encType",m.encType,m,null),We(r,a,"method",m.method,m,null),We(r,a,"target",m.target,m,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){r.removeAttribute(s);break}c=$l(""+c),r.setAttribute(s,c);break;case"onClick":c!=null&&(r.onclick=Cr);break;case"onScroll":c!=null&&Re("scroll",r);break;case"onScrollEnd":c!=null&&Re("scrollend",r);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(i(61));if(s=c.__html,s!=null){if(m.children!=null)throw Error(i(60));r.innerHTML=s}}break;case"multiple":r.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":r.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){r.removeAttribute("xlink:href");break}s=$l(""+c),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":c!=null&&typeof c!="function"&&typeof c!="symbol"?r.setAttribute(s,""+c):r.removeAttribute(s);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":c&&typeof c!="function"&&typeof c!="symbol"?r.setAttribute(s,""):r.removeAttribute(s);break;case"capture":case"download":c===!0?r.setAttribute(s,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?r.setAttribute(s,c):r.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?r.setAttribute(s,c):r.removeAttribute(s);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?r.removeAttribute(s):r.setAttribute(s,c);break;case"popover":Re("beforetoggle",r),Re("toggle",r),Rl(r,"popover",c);break;case"xlinkActuate":Tr(r,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":Tr(r,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":Tr(r,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":Tr(r,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":Tr(r,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":Tr(r,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":Tr(r,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":Tr(r,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":Tr(r,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":Rl(r,"is",c);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=ZE.get(s)||s,Rl(r,s,c))}}function nh(r,a,s,c,m,g){switch(s){case"style":ry(r,c,g);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(i(61));if(s=c.__html,s!=null){if(m.children!=null)throw Error(i(60));r.innerHTML=s}}break;case"children":typeof c=="string"?Ca(r,c):(typeof c=="number"||typeof c=="bigint")&&Ca(r,""+c);break;case"onScroll":c!=null&&Re("scroll",r);break;case"onScrollEnd":c!=null&&Re("scrollend",r);break;case"onClick":c!=null&&(r.onclick=Cr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Yg.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(m=s.endsWith("Capture"),a=s.slice(2,m?s.length-7:void 0),g=r[mn]||null,g=g!=null?g[s]:null,typeof g=="function"&&r.removeEventListener(a,g,m),typeof c=="function")){typeof g!="function"&&g!==null&&(s in r?r[s]=null:r.hasAttribute(s)&&r.removeAttribute(s)),r.addEventListener(a,c,m);break e}s in r?r[s]=c:c===!0?r.setAttribute(s,""):Rl(r,s,c)}}}function Jt(r,a,s){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Re("error",r),Re("load",r);var c=!1,m=!1,g;for(g in s)if(s.hasOwnProperty(g)){var S=s[g];if(S!=null)switch(g){case"src":c=!0;break;case"srcSet":m=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:We(r,a,g,S,s,null)}}m&&We(r,a,"srcSet",s.srcSet,s,null),c&&We(r,a,"src",s.src,s,null);return;case"input":Re("invalid",r);var w=g=S=m=null,M=null,B=null;for(c in s)if(s.hasOwnProperty(c)){var Y=s[c];if(Y!=null)switch(c){case"name":m=Y;break;case"type":S=Y;break;case"checked":M=Y;break;case"defaultChecked":B=Y;break;case"value":g=Y;break;case"defaultValue":w=Y;break;case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(i(137,a));break;default:We(r,a,c,Y,s,null)}}Wg(r,g,w,M,B,S,m,!1);return;case"select":Re("invalid",r),c=S=g=null;for(m in s)if(s.hasOwnProperty(m)&&(w=s[m],w!=null))switch(m){case"value":g=w;break;case"defaultValue":S=w;break;case"multiple":c=w;default:We(r,a,m,w,s,null)}a=g,s=S,r.multiple=!!c,a!=null?Ta(r,!!c,a,!1):s!=null&&Ta(r,!!c,s,!0);return;case"textarea":Re("invalid",r),g=m=c=null;for(S in s)if(s.hasOwnProperty(S)&&(w=s[S],w!=null))switch(S){case"value":c=w;break;case"defaultValue":m=w;break;case"children":g=w;break;case"dangerouslySetInnerHTML":if(w!=null)throw Error(i(91));break;default:We(r,a,S,w,s,null)}ty(r,c,m,g);return;case"option":for(M in s)s.hasOwnProperty(M)&&(c=s[M],c!=null)&&(M==="selected"?r.selected=c&&typeof c!="function"&&typeof c!="symbol":We(r,a,M,c,s,null));return;case"dialog":Re("beforetoggle",r),Re("toggle",r),Re("cancel",r),Re("close",r);break;case"iframe":case"object":Re("load",r);break;case"video":case"audio":for(c=0;c<Ts.length;c++)Re(Ts[c],r);break;case"image":Re("error",r),Re("load",r);break;case"details":Re("toggle",r);break;case"embed":case"source":case"link":Re("error",r),Re("load",r);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(B in s)if(s.hasOwnProperty(B)&&(c=s[B],c!=null))switch(B){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:We(r,a,B,c,s,null)}return;default:if(gf(a)){for(Y in s)s.hasOwnProperty(Y)&&(c=s[Y],c!==void 0&&nh(r,a,Y,c,s,void 0));return}}for(w in s)s.hasOwnProperty(w)&&(c=s[w],c!=null&&We(r,a,w,c,s,null))}function m2(r,a,s,c){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var m=null,g=null,S=null,w=null,M=null,B=null,Y=null;for(H in s){var ee=s[H];if(s.hasOwnProperty(H)&&ee!=null)switch(H){case"checked":break;case"value":break;case"defaultValue":M=ee;default:c.hasOwnProperty(H)||We(r,a,H,null,c,ee)}}for(var I in c){var H=c[I];if(ee=s[I],c.hasOwnProperty(I)&&(H!=null||ee!=null))switch(I){case"type":g=H;break;case"name":m=H;break;case"checked":B=H;break;case"defaultChecked":Y=H;break;case"value":S=H;break;case"defaultValue":w=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(i(137,a));break;default:H!==ee&&We(r,a,I,H,c,ee)}}mf(r,S,w,M,B,Y,g,m);return;case"select":H=S=w=I=null;for(g in s)if(M=s[g],s.hasOwnProperty(g)&&M!=null)switch(g){case"value":break;case"multiple":H=M;default:c.hasOwnProperty(g)||We(r,a,g,null,c,M)}for(m in c)if(g=c[m],M=s[m],c.hasOwnProperty(m)&&(g!=null||M!=null))switch(m){case"value":I=g;break;case"defaultValue":w=g;break;case"multiple":S=g;default:g!==M&&We(r,a,m,g,c,M)}a=w,s=S,c=H,I!=null?Ta(r,!!s,I,!1):!!c!=!!s&&(a!=null?Ta(r,!!s,a,!0):Ta(r,!!s,s?[]:"",!1));return;case"textarea":H=I=null;for(w in s)if(m=s[w],s.hasOwnProperty(w)&&m!=null&&!c.hasOwnProperty(w))switch(w){case"value":break;case"children":break;default:We(r,a,w,null,c,m)}for(S in c)if(m=c[S],g=s[S],c.hasOwnProperty(S)&&(m!=null||g!=null))switch(S){case"value":I=m;break;case"defaultValue":H=m;break;case"children":break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(i(91));break;default:m!==g&&We(r,a,S,m,c,g)}ey(r,I,H);return;case"option":for(var ce in s)I=s[ce],s.hasOwnProperty(ce)&&I!=null&&!c.hasOwnProperty(ce)&&(ce==="selected"?r.selected=!1:We(r,a,ce,null,c,I));for(M in c)I=c[M],H=s[M],c.hasOwnProperty(M)&&I!==H&&(I!=null||H!=null)&&(M==="selected"?r.selected=I&&typeof I!="function"&&typeof I!="symbol":We(r,a,M,I,c,H));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 ke in s)I=s[ke],s.hasOwnProperty(ke)&&I!=null&&!c.hasOwnProperty(ke)&&We(r,a,ke,null,c,I);for(B in c)if(I=c[B],H=s[B],c.hasOwnProperty(B)&&I!==H&&(I!=null||H!=null))switch(B){case"children":case"dangerouslySetInnerHTML":if(I!=null)throw Error(i(137,a));break;default:We(r,a,B,I,c,H)}return;default:if(gf(a)){for(var et in s)I=s[et],s.hasOwnProperty(et)&&I!==void 0&&!c.hasOwnProperty(et)&&nh(r,a,et,void 0,c,I);for(Y in c)I=c[Y],H=s[Y],!c.hasOwnProperty(Y)||I===H||I===void 0&&H===void 0||nh(r,a,Y,I,c,H);return}}for(var U in s)I=s[U],s.hasOwnProperty(U)&&I!=null&&!c.hasOwnProperty(U)&&We(r,a,U,null,c,I);for(ee in c)I=c[ee],H=s[ee],!c.hasOwnProperty(ee)||I===H||I==null&&H==null||We(r,a,ee,I,c,H)}function ib(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function p2(){if(typeof performance.getEntriesByType=="function"){for(var r=0,a=0,s=performance.getEntriesByType("resource"),c=0;c<s.length;c++){var m=s[c],g=m.transferSize,S=m.initiatorType,w=m.duration;if(g&&w&&ib(S)){for(S=0,w=m.responseEnd,c+=1;c<s.length;c++){var M=s[c],B=M.startTime;if(B>w)break;var Y=M.transferSize,ee=M.initiatorType;Y&&ib(ee)&&(M=M.responseEnd,S+=Y*(M<w?1:(w-B)/(M-B)))}if(--c,a+=8*(g+S)/(m.duration/1e3),r++,10<r)break}}if(0<r)return a/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r=="number")?r:5}var rh=null,ih=null;function Nu(r){return r.nodeType===9?r:r.ownerDocument}function ab(r){switch(r){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function ob(r,a){if(r===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return r===1&&a==="foreignObject"?0:r}function ah(r,a){return r==="textarea"||r==="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 oh=null;function g2(){var r=window.event;return r&&r.type==="popstate"?r===oh?!1:(oh=r,!0):(oh=null,!1)}var sb=typeof setTimeout=="function"?setTimeout:void 0,y2=typeof clearTimeout=="function"?clearTimeout:void 0,lb=typeof Promise=="function"?Promise:void 0,x2=typeof queueMicrotask=="function"?queueMicrotask:typeof lb<"u"?function(r){return lb.resolve(null).then(r).catch(v2)}:sb;function v2(r){setTimeout(function(){throw r})}function yi(r){return r==="head"}function ub(r,a){var s=a,c=0;do{var m=s.nextSibling;if(r.removeChild(s),m&&m.nodeType===8)if(s=m.data,s==="/$"||s==="/&"){if(c===0){r.removeChild(m),ao(a);return}c--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")c++;else if(s==="html")As(r.ownerDocument.documentElement);else if(s==="head"){s=r.ownerDocument.head,As(s);for(var g=s.firstChild;g;){var S=g.nextSibling,w=g.nodeName;g[Go]||w==="SCRIPT"||w==="STYLE"||w==="LINK"&&g.rel.toLowerCase()==="stylesheet"||s.removeChild(g),g=S}}else s==="body"&&As(r.ownerDocument.body);s=m}while(s);ao(a)}function cb(r,a){var s=r;r=0;do{var c=s.nextSibling;if(s.nodeType===1?a?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(a?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),c&&c.nodeType===8)if(s=c.data,s==="/$"){if(r===0)break;r--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||r++;s=c}while(s)}function sh(r){var a=r.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var s=a;switch(a=a.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":sh(s),df(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}r.removeChild(s)}}function b2(r,a,s,c){for(;r.nodeType===1;){var m=s;if(r.nodeName.toLowerCase()!==a.toLowerCase()){if(!c&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(c){if(!r[Go])switch(a){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(g=r.getAttribute("rel"),g==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(g!==m.rel||r.getAttribute("href")!==(m.href==null||m.href===""?null:m.href)||r.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin)||r.getAttribute("title")!==(m.title==null?null:m.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(g=r.getAttribute("src"),(g!==(m.src==null?null:m.src)||r.getAttribute("type")!==(m.type==null?null:m.type)||r.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin))&&g&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(a==="input"&&r.type==="hidden"){var g=m.name==null?null:""+m.name;if(m.type==="hidden"&&r.getAttribute("name")===g)return r}else return r;if(r=Gn(r.nextSibling),r===null)break}return null}function S2(r,a,s){if(a==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!s||(r=Gn(r.nextSibling),r===null))return null;return r}function fb(r,a){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!a||(r=Gn(r.nextSibling),r===null))return null;return r}function lh(r){return r.data==="$?"||r.data==="$~"}function uh(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function w2(r,a){var s=r.ownerDocument;if(r.data==="$~")r._reactRetry=a;else if(r.data!=="$?"||s.readyState!=="loading")a();else{var c=function(){a(),s.removeEventListener("DOMContentLoaded",c)};s.addEventListener("DOMContentLoaded",c),r._reactRetry=c}}function Gn(r){for(;r!=null;r=r.nextSibling){var a=r.nodeType;if(a===1||a===3)break;if(a===8){if(a=r.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return r}var ch=null;function db(r){r=r.nextSibling;for(var a=0;r;){if(r.nodeType===8){var s=r.data;if(s==="/$"||s==="/&"){if(a===0)return Gn(r.nextSibling);a--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||a++}r=r.nextSibling}return null}function hb(r){r=r.previousSibling;for(var a=0;r;){if(r.nodeType===8){var s=r.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(a===0)return r;a--}else s!=="/$"&&s!=="/&"||a++}r=r.previousSibling}return null}function mb(r,a,s){switch(a=Nu(s),r){case"html":if(r=a.documentElement,!r)throw Error(i(452));return r;case"head":if(r=a.head,!r)throw Error(i(453));return r;case"body":if(r=a.body,!r)throw Error(i(454));return r;default:throw Error(i(451))}}function As(r){for(var a=r.attributes;a.length;)r.removeAttributeNode(a[0]);df(r)}var Yn=new Map,pb=new Set;function Ou(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var Hr=X.d;X.d={f:k2,r:z2,D:_2,C:E2,L:T2,m:C2,X:j2,S:A2,M:N2};function k2(){var r=Hr.f(),a=ku();return r||a}function z2(r){var a=za(r);a!==null&&a.tag===5&&a.type==="form"?Ox(a):Hr.r(r)}var no=typeof document>"u"?null:document;function gb(r,a,s){var c=no;if(c&&typeof a=="string"&&a){var m=Pn(a);m='link[rel="'+r+'"][href="'+m+'"]',typeof s=="string"&&(m+='[crossorigin="'+s+'"]'),pb.has(m)||(pb.add(m),r={rel:r,crossOrigin:s,href:a},c.querySelector(m)===null&&(a=c.createElement("link"),Jt(a,"link",r),Ft(a),c.head.appendChild(a)))}}function _2(r){Hr.D(r),gb("dns-prefetch",r,null)}function E2(r,a){Hr.C(r,a),gb("preconnect",r,a)}function T2(r,a,s){Hr.L(r,a,s);var c=no;if(c&&r&&a){var m='link[rel="preload"][as="'+Pn(a)+'"]';a==="image"&&s&&s.imageSrcSet?(m+='[imagesrcset="'+Pn(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(m+='[imagesizes="'+Pn(s.imageSizes)+'"]')):m+='[href="'+Pn(r)+'"]';var g=m;switch(a){case"style":g=ro(r);break;case"script":g=io(r)}Yn.has(g)||(r=y({rel:"preload",href:a==="image"&&s&&s.imageSrcSet?void 0:r,as:a},s),Yn.set(g,r),c.querySelector(m)!==null||a==="style"&&c.querySelector(js(g))||a==="script"&&c.querySelector(Ns(g))||(a=c.createElement("link"),Jt(a,"link",r),Ft(a),c.head.appendChild(a)))}}function C2(r,a){Hr.m(r,a);var s=no;if(s&&r){var c=a&&typeof a.as=="string"?a.as:"script",m='link[rel="modulepreload"][as="'+Pn(c)+'"][href="'+Pn(r)+'"]',g=m;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=io(r)}if(!Yn.has(g)&&(r=y({rel:"modulepreload",href:r},a),Yn.set(g,r),s.querySelector(m)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(Ns(g)))return}c=s.createElement("link"),Jt(c,"link",r),Ft(c),s.head.appendChild(c)}}}function A2(r,a,s){Hr.S(r,a,s);var c=no;if(c&&r){var m=_a(c).hoistableStyles,g=ro(r);a=a||"default";var S=m.get(g);if(!S){var w={loading:0,preload:null};if(S=c.querySelector(js(g)))w.loading=5;else{r=y({rel:"stylesheet",href:r,"data-precedence":a},s),(s=Yn.get(g))&&fh(r,s);var M=S=c.createElement("link");Ft(M),Jt(M,"link",r),M._p=new Promise(function(B,Y){M.onload=B,M.onerror=Y}),M.addEventListener("load",function(){w.loading|=1}),M.addEventListener("error",function(){w.loading|=2}),w.loading|=4,Ru(S,a,c)}S={type:"stylesheet",instance:S,count:1,state:w},m.set(g,S)}}}function j2(r,a){Hr.X(r,a);var s=no;if(s&&r){var c=_a(s).hoistableScripts,m=io(r),g=c.get(m);g||(g=s.querySelector(Ns(m)),g||(r=y({src:r,async:!0},a),(a=Yn.get(m))&&dh(r,a),g=s.createElement("script"),Ft(g),Jt(g,"link",r),s.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},c.set(m,g))}}function N2(r,a){Hr.M(r,a);var s=no;if(s&&r){var c=_a(s).hoistableScripts,m=io(r),g=c.get(m);g||(g=s.querySelector(Ns(m)),g||(r=y({src:r,async:!0,type:"module"},a),(a=Yn.get(m))&&dh(r,a),g=s.createElement("script"),Ft(g),Jt(g,"link",r),s.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},c.set(m,g))}}function yb(r,a,s,c){var m=(m=me.current)?Ou(m):null;if(!m)throw Error(i(446));switch(r){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(a=ro(s.href),s=_a(m).hoistableStyles,c=s.get(a),c||(c={type:"style",instance:null,count:0,state:null},s.set(a,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){r=ro(s.href);var g=_a(m).hoistableStyles,S=g.get(r);if(S||(m=m.ownerDocument||m,S={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},g.set(r,S),(g=m.querySelector(js(r)))&&!g._p&&(S.instance=g,S.state.loading=5),Yn.has(r)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},Yn.set(r,s),g||O2(m,r,s,S.state))),a&&c===null)throw Error(i(528,""));return S}if(a&&c!==null)throw Error(i(529,""));return null;case"script":return a=s.async,s=s.src,typeof s=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=io(s),s=_a(m).hoistableScripts,c=s.get(a),c||(c={type:"script",instance:null,count:0,state:null},s.set(a,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,r))}}function ro(r){return'href="'+Pn(r)+'"'}function js(r){return'link[rel="stylesheet"]['+r+"]"}function xb(r){return y({},r,{"data-precedence":r.precedence,precedence:null})}function O2(r,a,s,c){r.querySelector('link[rel="preload"][as="style"]['+a+"]")?c.loading=1:(a=r.createElement("link"),c.preload=a,a.addEventListener("load",function(){return c.loading|=1}),a.addEventListener("error",function(){return c.loading|=2}),Jt(a,"link",s),Ft(a),r.head.appendChild(a))}function io(r){return'[src="'+Pn(r)+'"]'}function Ns(r){return"script[async]"+r}function vb(r,a,s){if(a.count++,a.instance===null)switch(a.type){case"style":var c=r.querySelector('style[data-href~="'+Pn(s.href)+'"]');if(c)return a.instance=c,Ft(c),c;var m=y({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return c=(r.ownerDocument||r).createElement("style"),Ft(c),Jt(c,"style",m),Ru(c,s.precedence,r),a.instance=c;case"stylesheet":m=ro(s.href);var g=r.querySelector(js(m));if(g)return a.state.loading|=4,a.instance=g,Ft(g),g;c=xb(s),(m=Yn.get(m))&&fh(c,m),g=(r.ownerDocument||r).createElement("link"),Ft(g);var S=g;return S._p=new Promise(function(w,M){S.onload=w,S.onerror=M}),Jt(g,"link",c),a.state.loading|=4,Ru(g,s.precedence,r),a.instance=g;case"script":return g=io(s.src),(m=r.querySelector(Ns(g)))?(a.instance=m,Ft(m),m):(c=s,(m=Yn.get(g))&&(c=y({},s),dh(c,m)),r=r.ownerDocument||r,m=r.createElement("script"),Ft(m),Jt(m,"link",c),r.head.appendChild(m),a.instance=m);case"void":return null;default:throw Error(i(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(c=a.instance,a.state.loading|=4,Ru(c,s.precedence,r));return a.instance}function Ru(r,a,s){for(var c=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),m=c.length?c[c.length-1]:null,g=m,S=0;S<c.length;S++){var w=c[S];if(w.dataset.precedence===a)g=w;else if(g!==m)break}g?g.parentNode.insertBefore(r,g.nextSibling):(a=s.nodeType===9?s.head:s,a.insertBefore(r,a.firstChild))}function fh(r,a){r.crossOrigin==null&&(r.crossOrigin=a.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=a.referrerPolicy),r.title==null&&(r.title=a.title)}function dh(r,a){r.crossOrigin==null&&(r.crossOrigin=a.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=a.referrerPolicy),r.integrity==null&&(r.integrity=a.integrity)}var Mu=null;function bb(r,a,s){if(Mu===null){var c=new Map,m=Mu=new Map;m.set(s,c)}else m=Mu,c=m.get(s),c||(c=new Map,m.set(s,c));if(c.has(r))return c;for(c.set(r,null),s=s.getElementsByTagName(r),m=0;m<s.length;m++){var g=s[m];if(!(g[Go]||g[Gt]||r==="link"&&g.getAttribute("rel")==="stylesheet")&&g.namespaceURI!=="http://www.w3.org/2000/svg"){var S=g.getAttribute(a)||"";S=r+S;var w=c.get(S);w?w.push(g):c.set(S,[g])}}return c}function Sb(r,a,s){r=r.ownerDocument||r,r.head.insertBefore(s,a==="title"?r.querySelector("head > title"):null)}function R2(r,a,s){if(s===1||a.itemProp!=null)return!1;switch(r){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;return a.rel==="stylesheet"?(r=a.disabled,typeof a.precedence=="string"&&r==null):!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 wb(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function M2(r,a,s,c){if(s.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var m=ro(c.href),g=a.querySelector(js(m));if(g){a=g._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(r.count++,r=Du.bind(r),a.then(r,r)),s.state.loading|=4,s.instance=g,Ft(g);return}g=a.ownerDocument||a,c=xb(c),(m=Yn.get(m))&&fh(c,m),g=g.createElement("link"),Ft(g);var S=g;S._p=new Promise(function(w,M){S.onload=w,S.onerror=M}),Jt(g,"link",c),s.instance=g}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(s,a),(a=s.state.preload)&&(s.state.loading&3)===0&&(r.count++,s=Du.bind(r),a.addEventListener("load",s),a.addEventListener("error",s))}}var hh=0;function D2(r,a){return r.stylesheets&&r.count===0&&Lu(r,r.stylesheets),0<r.count||0<r.imgCount?function(s){var c=setTimeout(function(){if(r.stylesheets&&Lu(r,r.stylesheets),r.unsuspend){var g=r.unsuspend;r.unsuspend=null,g()}},6e4+a);0<r.imgBytes&&hh===0&&(hh=62500*p2());var m=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&Lu(r,r.stylesheets),r.unsuspend)){var g=r.unsuspend;r.unsuspend=null,g()}},(r.imgBytes>hh?50:800)+a);return r.unsuspend=s,function(){r.unsuspend=null,clearTimeout(c),clearTimeout(m)}}:null}function Du(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Lu(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var $u=null;function Lu(r,a){r.stylesheets=null,r.unsuspend!==null&&(r.count++,$u=new Map,a.forEach($2,r),$u=null,Du.call(r))}function $2(r,a){if(!(a.state.loading&4)){var s=$u.get(r);if(s)var c=s.get(null);else{s=new Map,$u.set(r,s);for(var m=r.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g<m.length;g++){var S=m[g];(S.nodeName==="LINK"||S.getAttribute("media")!=="not all")&&(s.set(S.dataset.precedence,S),c=S)}c&&s.set(null,c)}m=a.instance,S=m.getAttribute("data-precedence"),g=s.get(S)||c,g===c&&s.set(null,m),s.set(S,m),this.count++,c=Du.bind(this),m.addEventListener("load",c),m.addEventListener("error",c),g?g.parentNode.insertBefore(m,g.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(m,r.firstChild)),a.state.loading|=4}}var Os={$$typeof:T,Provider:null,Consumer:null,_currentValue:G,_currentValue2:G,_threadCount:0};function L2(r,a,s,c,m,g,S,w,M){this.tag=1,this.containerInfo=r,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=lf(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=lf(0),this.hiddenUpdates=lf(null),this.identifierPrefix=c,this.onUncaughtError=m,this.onCaughtError=g,this.onRecoverableError=S,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=M,this.incompleteTransitions=new Map}function kb(r,a,s,c,m,g,S,w,M,B,Y,ee){return r=new L2(r,a,s,S,M,B,Y,ee,w),a=1,g===!0&&(a|=24),g=Tn(3,null,null,a),r.current=g,g.stateNode=r,a=qf(),a.refCount++,r.pooledCache=a,a.refCount++,g.memoizedState={element:c,isDehydrated:s,cache:a},Kf(g),r}function zb(r){return r?(r=Da,r):Da}function _b(r,a,s,c,m,g){m=zb(m),c.context===null?c.context=m:c.pendingContext=m,c=oi(a),c.payload={element:s},g=g===void 0?null:g,g!==null&&(c.callback=g),s=si(r,c,a),s!==null&&(bn(s,r,a),cs(s,r,a))}function Eb(r,a){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var s=r.retryLane;r.retryLane=s!==0&&s<a?s:a}}function mh(r,a){Eb(r,a),(r=r.alternate)&&Eb(r,a)}function Tb(r){if(r.tag===13||r.tag===31){var a=Hi(r,67108864);a!==null&&bn(a,r,67108864),mh(r,67108864)}}function Cb(r){if(r.tag===13||r.tag===31){var a=On();a=uf(a);var s=Hi(r,a);s!==null&&bn(s,r,a),mh(r,a)}}var Uu=!0;function U2(r,a,s,c){var m=V.T;V.T=null;var g=X.p;try{X.p=2,ph(r,a,s,c)}finally{X.p=g,V.T=m}}function V2(r,a,s,c){var m=V.T;V.T=null;var g=X.p;try{X.p=8,ph(r,a,s,c)}finally{X.p=g,V.T=m}}function ph(r,a,s,c){if(Uu){var m=gh(c);if(m===null)th(r,a,c,Vu,s),jb(r,c);else if(Z2(m,r,a,s,c))c.stopPropagation();else if(jb(r,c),a&4&&-1<P2.indexOf(r)){for(;m!==null;){var g=za(m);if(g!==null)switch(g.tag){case 3:if(g=g.stateNode,g.current.memoizedState.isDehydrated){var S=Vi(g.pendingLanes);if(S!==0){var w=g;for(w.pendingLanes|=2,w.entangledLanes|=2;S;){var M=1<<31-nt(S);w.entanglements[1]|=M,S&=~M}yr(g),(He&6)===0&&(Su=lt()+500,Es(0))}}break;case 31:case 13:w=Hi(g,2),w!==null&&bn(w,g,2),ku(),mh(g,2)}if(g=gh(c),g===null&&th(r,a,c,Vu,s),g===m)break;m=g}m!==null&&c.stopPropagation()}else th(r,a,c,null,s)}}function gh(r){return r=xf(r),yh(r)}var Vu=null;function yh(r){if(Vu=null,r=ka(r),r!==null){var a=u(r);if(a===null)r=null;else{var s=a.tag;if(s===13){if(r=l(a),r!==null)return r;r=null}else if(s===31){if(r=f(a),r!==null)return r;r=null}else if(s===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;r=null}else a!==r&&(r=null)}}return Vu=r,null}function Ab(r){switch(r){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(Sa()){case J:return 2;case le:return 8;case ge:case ze:return 32;case Ve:return 268435456;default:return 32}default:return 32}}var xh=!1,xi=null,vi=null,bi=null,Rs=new Map,Ms=new Map,Si=[],P2="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 jb(r,a){switch(r){case"focusin":case"focusout":xi=null;break;case"dragenter":case"dragleave":vi=null;break;case"mouseover":case"mouseout":bi=null;break;case"pointerover":case"pointerout":Rs.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ms.delete(a.pointerId)}}function Ds(r,a,s,c,m,g){return r===null||r.nativeEvent!==g?(r={blockedOn:a,domEventName:s,eventSystemFlags:c,nativeEvent:g,targetContainers:[m]},a!==null&&(a=za(a),a!==null&&Tb(a)),r):(r.eventSystemFlags|=c,a=r.targetContainers,m!==null&&a.indexOf(m)===-1&&a.push(m),r)}function Z2(r,a,s,c,m){switch(a){case"focusin":return xi=Ds(xi,r,a,s,c,m),!0;case"dragenter":return vi=Ds(vi,r,a,s,c,m),!0;case"mouseover":return bi=Ds(bi,r,a,s,c,m),!0;case"pointerover":var g=m.pointerId;return Rs.set(g,Ds(Rs.get(g)||null,r,a,s,c,m)),!0;case"gotpointercapture":return g=m.pointerId,Ms.set(g,Ds(Ms.get(g)||null,r,a,s,c,m)),!0}return!1}function Nb(r){var a=ka(r.target);if(a!==null){var s=u(a);if(s!==null){if(a=s.tag,a===13){if(a=l(s),a!==null){r.blockedOn=a,Fg(r.priority,function(){Cb(s)});return}}else if(a===31){if(a=f(s),a!==null){r.blockedOn=a,Fg(r.priority,function(){Cb(s)});return}}else if(a===3&&s.stateNode.current.memoizedState.isDehydrated){r.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}r.blockedOn=null}function Pu(r){if(r.blockedOn!==null)return!1;for(var a=r.targetContainers;0<a.length;){var s=gh(r.nativeEvent);if(s===null){s=r.nativeEvent;var c=new s.constructor(s.type,s);yf=c,s.target.dispatchEvent(c),yf=null}else return a=za(s),a!==null&&Tb(a),r.blockedOn=s,!1;a.shift()}return!0}function Ob(r,a,s){Pu(r)&&s.delete(a)}function B2(){xh=!1,xi!==null&&Pu(xi)&&(xi=null),vi!==null&&Pu(vi)&&(vi=null),bi!==null&&Pu(bi)&&(bi=null),Rs.forEach(Ob),Ms.forEach(Ob)}function Zu(r,a){r.blockedOn===a&&(r.blockedOn=null,xh||(xh=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,B2)))}var Bu=null;function Rb(r){Bu!==r&&(Bu=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Bu===r&&(Bu=null);for(var a=0;a<r.length;a+=3){var s=r[a],c=r[a+1],m=r[a+2];if(typeof c!="function"){if(yh(c||s)===null)continue;break}var g=za(s);g!==null&&(r.splice(a,3),a-=3,gd(g,{pending:!0,data:m,method:s.method,action:c},c,m))}}))}function ao(r){function a(M){return Zu(M,r)}xi!==null&&Zu(xi,r),vi!==null&&Zu(vi,r),bi!==null&&Zu(bi,r),Rs.forEach(a),Ms.forEach(a);for(var s=0;s<Si.length;s++){var c=Si[s];c.blockedOn===r&&(c.blockedOn=null)}for(;0<Si.length&&(s=Si[0],s.blockedOn===null);)Nb(s),s.blockedOn===null&&Si.shift();if(s=(r.ownerDocument||r).$$reactFormReplay,s!=null)for(c=0;c<s.length;c+=3){var m=s[c],g=s[c+1],S=m[mn]||null;if(typeof g=="function")S||Rb(s);else if(S){var w=null;if(g&&g.hasAttribute("formAction")){if(m=g,S=g[mn]||null)w=S.formAction;else if(yh(m)!==null)continue}else w=S.action;typeof w=="function"?s[c+1]=w:(s.splice(c,3),c-=3),Rb(s)}}}function Mb(){function r(g){g.canIntercept&&g.info==="react-transition"&&g.intercept({handler:function(){return new Promise(function(S){return m=S})},focusReset:"manual",scroll:"manual"})}function a(){m!==null&&(m(),m=null),c||setTimeout(s,20)}function s(){if(!c&&!navigation.transition){var g=navigation.currentEntry;g&&g.url!=null&&navigation.navigate(g.url,{state:g.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var c=!1,m=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(s,100),function(){c=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),m!==null&&(m(),m=null)}}}function vh(r){this._internalRoot=r}Iu.prototype.render=vh.prototype.render=function(r){var a=this._internalRoot;if(a===null)throw Error(i(409));var s=a.current,c=On();_b(s,c,r,a,null,null)},Iu.prototype.unmount=vh.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var a=r.containerInfo;_b(r.current,2,null,r,null,null),ku(),a[wa]=null}};function Iu(r){this._internalRoot=r}Iu.prototype.unstable_scheduleHydration=function(r){if(r){var a=Hg();r={blockedOn:null,target:r,priority:a};for(var s=0;s<Si.length&&a!==0&&a<Si[s].priority;s++);Si.splice(s,0,r),s===0&&Nb(r)}};var Db=t.version;if(Db!=="19.2.4")throw Error(i(527,Db,"19.2.4"));X.findDOMNode=function(r){var a=r._reactInternals;if(a===void 0)throw typeof r.render=="function"?Error(i(188)):(r=Object.keys(r).join(","),Error(i(268,r)));return r=h(a),r=r!==null?p(r):null,r=r===null?null:r.stateNode,r};var I2={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:V,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Hu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Hu.isDisabled&&Hu.supportsFiber)try{sn=Hu.inject(I2),Pt=Hu}catch{}}return Ls.createRoot=function(r,a){if(!o(r))throw Error(i(299));var s=!1,c="",m=Bx,g=Ix,S=Hx;return a!=null&&(a.unstable_strictMode===!0&&(s=!0),a.identifierPrefix!==void 0&&(c=a.identifierPrefix),a.onUncaughtError!==void 0&&(m=a.onUncaughtError),a.onCaughtError!==void 0&&(g=a.onCaughtError),a.onRecoverableError!==void 0&&(S=a.onRecoverableError)),a=kb(r,1,!1,null,null,s,c,null,m,g,S,Mb),r[wa]=a.current,eh(r),new vh(a)},Ls.hydrateRoot=function(r,a,s){if(!o(r))throw Error(i(299));var c=!1,m="",g=Bx,S=Ix,w=Hx,M=null;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(m=s.identifierPrefix),s.onUncaughtError!==void 0&&(g=s.onUncaughtError),s.onCaughtError!==void 0&&(S=s.onCaughtError),s.onRecoverableError!==void 0&&(w=s.onRecoverableError),s.formState!==void 0&&(M=s.formState)),a=kb(r,1,!0,a,s??null,c,m,M,g,S,w,Mb),a.context=zb(null),s=a.current,c=On(),c=uf(c),m=oi(c),m.callback=null,si(s,m,c),s=c,a.current.lanes=s,qo(a,s),yr(a),r[wa]=a.current,eh(r),new Iu(a)},Ls.version="19.2.4",Ls}var Fb;function W2(){if(Fb)return wh.exports;Fb=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(),wh.exports=Q2(),wh.exports}var eC=W2();var qb="popstate";function tC(e={}){function t(i,o){let{pathname:u,search:l,hash:f}=i.location;return Sm("",{pathname:u,search:l,hash:f},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(i,o){return typeof o=="string"?o:ol(o)}return rC(t,n,null,e)}function mt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function fr(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function nC(){return Math.random().toString(36).substring(2,10)}function Gb(e,t){return{usr:e.state,key:e.key,idx:t}}function Sm(e,t,n=null,i){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Ro(t):t,state:n,key:t&&t.key||i||nC()}}function ol({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Ro(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let i=e.indexOf("?");i>=0&&(t.search=e.substring(i),e=e.substring(0,i)),e&&(t.pathname=e)}return t}function rC(e,t,n,i={}){let{window:o=document.defaultView,v5Compat:u=!1}=i,l=o.history,f="POP",d=null,h=p();h==null&&(h=0,l.replaceState({...l.state,idx:h},""));function p(){return(l.state||{idx:null}).idx}function y(){f="POP";let A=p(),j=A==null?null:A-h;h=A,d&&d({action:f,location:z.location,delta:j})}function x(A,j){f="PUSH";let N=Sm(z.location,A,j);h=p()+1;let T=Gb(N,h),R=z.createHref(N);try{l.pushState(T,"",R)}catch(L){if(L instanceof DOMException&&L.name==="DataCloneError")throw L;o.location.assign(R)}u&&d&&d({action:f,location:z.location,delta:1})}function b(A,j){f="REPLACE";let N=Sm(z.location,A,j);h=p();let T=Gb(N,h),R=z.createHref(N);l.replaceState(T,"",R),u&&d&&d({action:f,location:z.location,delta:0})}function _(A){return iC(A)}let z={get action(){return f},get location(){return e(o,l)},listen(A){if(d)throw new Error("A history only accepts one active listener");return o.addEventListener(qb,y),d=A,()=>{o.removeEventListener(qb,y),d=null}},createHref(A){return t(o,A)},createURL:_,encodeLocation(A){let j=_(A);return{pathname:j.pathname,search:j.search,hash:j.hash}},push:x,replace:b,go(A){return l.go(A)}};return z}function iC(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),mt(n,"No window.location.(origin|href) available to create URL");let i=typeof e=="string"?e:ol(e);return i=i.replace(/ $/,"%20"),!t&&i.startsWith("//")&&(i=n+i),new URL(i,n)}function dw(e,t,n="/"){return aC(e,t,n,!1)}function aC(e,t,n,i){let o=typeof t=="string"?Ro(t):t,u=Kr(o.pathname||"/",n);if(u==null)return null;let l=hw(e);oC(l);let f=null;for(let d=0;f==null&&d<l.length;++d){let h=yC(u);f=pC(l[d],h,i)}return f}function hw(e,t=[],n=[],i="",o=!1){let u=(l,f,d=o,h)=>{let p={relativePath:h===void 0?l.path||"":h,caseSensitive:l.caseSensitive===!0,childrenIndex:f,route:l};if(p.relativePath.startsWith("/")){if(!p.relativePath.startsWith(i)&&d)return;mt(p.relativePath.startsWith(i),`Absolute route path "${p.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),p.relativePath=p.relativePath.slice(i.length)}let y=Yr([i,p.relativePath]),x=n.concat(p);l.children&&l.children.length>0&&(mt(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${y}".`),hw(l.children,t,x,y,d)),!(l.path==null&&!l.index)&&t.push({path:y,score:hC(y,l.index),routesMeta:x})};return e.forEach((l,f)=>{if(l.path===""||!l.path?.includes("?"))u(l,f);else for(let d of mw(l.path))u(l,f,!0,d)}),t}function mw(e){let t=e.split("/");if(t.length===0)return[];let[n,...i]=t,o=n.endsWith("?"),u=n.replace(/\?$/,"");if(i.length===0)return o?[u,""]:[u];let l=mw(i.join("/")),f=[];return f.push(...l.map(d=>d===""?u:[u,d].join("/"))),o&&f.push(...l),f.map(d=>e.startsWith("/")&&d===""?"/":d)}function oC(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:mC(t.routesMeta.map(i=>i.childrenIndex),n.routesMeta.map(i=>i.childrenIndex)))}var sC=/^:[\w-]+$/,lC=3,uC=2,cC=1,fC=10,dC=-2,Yb=e=>e==="*";function hC(e,t){let n=e.split("/"),i=n.length;return n.some(Yb)&&(i+=dC),t&&(i+=uC),n.filter(o=>!Yb(o)).reduce((o,u)=>o+(sC.test(u)?lC:u===""?cC:fC),i)}function mC(e,t){return e.length===t.length&&e.slice(0,-1).every((i,o)=>i===t[o])?e[e.length-1]-t[t.length-1]:0}function pC(e,t,n=!1){let{routesMeta:i}=e,o={},u="/",l=[];for(let f=0;f<i.length;++f){let d=i[f],h=f===i.length-1,p=u==="/"?t:t.slice(u.length)||"/",y=bc({path:d.relativePath,caseSensitive:d.caseSensitive,end:h},p),x=d.route;if(!y&&h&&n&&!i[i.length-1].route.index&&(y=bc({path:d.relativePath,caseSensitive:d.caseSensitive,end:!1},p)),!y)return null;Object.assign(o,y.params),l.push({params:o,pathname:Yr([u,y.pathname]),pathnameBase:SC(Yr([u,y.pathnameBase])),route:x}),y.pathnameBase!=="/"&&(u=Yr([u,y.pathnameBase]))}return l}function bc(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,i]=gC(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let u=o[0],l=u.replace(/(.)\/+$/,"$1"),f=o.slice(1);return{params:i.reduce((h,{paramName:p,isOptional:y},x)=>{if(p==="*"){let _=f[x]||"";l=u.slice(0,u.length-_.length).replace(/(.)\/+$/,"$1")}const b=f[x];return y&&!b?h[p]=void 0:h[p]=(b||"").replace(/%2F/g,"/"),h},{}),pathname:u,pathnameBase:l,pattern:e}}function gC(e,t=!1,n=!0){fr(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let i=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,f,d)=>(i.push({paramName:f,isOptional:d!=null}),d?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(i.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),i]}function yC(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return fr(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Kr(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,i=e.charAt(n);return i&&i!=="/"?null:e.slice(n)||"/"}var xC=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function vC(e,t="/"){let{pathname:n,search:i="",hash:o=""}=typeof e=="string"?Ro(e):e,u;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?u=Xb(n.substring(1),"/"):u=Xb(n,t)):u=t,{pathname:u,search:wC(i),hash:kC(o)}}function Xb(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function Eh(e,t,n,i){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(i)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function bC(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function kp(e){let t=bC(e);return t.map((n,i)=>i===t.length-1?n.pathname:n.pathnameBase)}function zp(e,t,n,i=!1){let o;typeof e=="string"?o=Ro(e):(o={...e},mt(!o.pathname||!o.pathname.includes("?"),Eh("?","pathname","search",o)),mt(!o.pathname||!o.pathname.includes("#"),Eh("#","pathname","hash",o)),mt(!o.search||!o.search.includes("#"),Eh("#","search","hash",o)));let u=e===""||o.pathname==="",l=u?"/":o.pathname,f;if(l==null)f=n;else{let y=t.length-1;if(!i&&l.startsWith("..")){let x=l.split("/");for(;x[0]==="..";)x.shift(),y-=1;o.pathname=x.join("/")}f=y>=0?t[y]:"/"}let d=vC(o,f),h=l&&l!=="/"&&l.endsWith("/"),p=(u||l===".")&&n.endsWith("/");return!d.pathname.endsWith("/")&&(h||p)&&(d.pathname+="/"),d}var Yr=e=>e.join("/").replace(/\/\/+/g,"/"),SC=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),wC=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,kC=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,zC=class{constructor(e,t,n,i=!1){this.status=e,this.statusText=t||"",this.internal=i,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function _C(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function EC(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var pw=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function gw(e,t){let n=e;if(typeof n!="string"||!xC.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let i=n,o=!1;if(pw)try{let u=new URL(window.location.href),l=n.startsWith("//")?new URL(u.protocol+n):new URL(n),f=Kr(l.pathname,t);l.origin===u.origin&&f!=null?n=f+l.search+l.hash:o=!0}catch{fr(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:i,isExternal:o,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var yw=["POST","PUT","PATCH","DELETE"];new Set(yw);var TC=["GET",...yw];new Set(TC);var Mo=E.createContext(null);Mo.displayName="DataRouter";var Pc=E.createContext(null);Pc.displayName="DataRouterState";var CC=E.createContext(!1),xw=E.createContext({isTransitioning:!1});xw.displayName="ViewTransition";var AC=E.createContext(new Map);AC.displayName="Fetchers";var jC=E.createContext(null);jC.displayName="Await";var Dn=E.createContext(null);Dn.displayName="Navigation";var bl=E.createContext(null);bl.displayName="Location";var _r=E.createContext({outlet:null,matches:[],isDataRoute:!1});_r.displayName="Route";var _p=E.createContext(null);_p.displayName="RouteError";var vw="REACT_ROUTER_ERROR",NC="REDIRECT",OC="ROUTE_ERROR_RESPONSE";function RC(e){if(e.startsWith(`${vw}:${NC}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function MC(e){if(e.startsWith(`${vw}:${OC}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new zC(t.status,t.statusText,t.data)}catch{}}function DC(e,{relative:t}={}){mt(Do(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:i}=E.useContext(Dn),{hash:o,pathname:u,search:l}=Sl(e,{relative:t}),f=u;return n!=="/"&&(f=u==="/"?n:Yr([n,u])),i.createHref({pathname:f,search:l,hash:o})}function Do(){return E.useContext(bl)!=null}function dr(){return mt(Do(),"useLocation() may be used only in the context of a <Router> component."),E.useContext(bl).location}var bw="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Sw(e){E.useContext(Dn).static||E.useLayoutEffect(e)}function Ep(){let{isDataRoute:e}=E.useContext(_r);return e?YC():$C()}function $C(){mt(Do(),"useNavigate() may be used only in the context of a <Router> component.");let e=E.useContext(Mo),{basename:t,navigator:n}=E.useContext(Dn),{matches:i}=E.useContext(_r),{pathname:o}=dr(),u=JSON.stringify(kp(i)),l=E.useRef(!1);return Sw(()=>{l.current=!0}),E.useCallback((d,h={})=>{if(fr(l.current,bw),!l.current)return;if(typeof d=="number"){n.go(d);return}let p=zp(d,JSON.parse(u),o,h.relative==="path");e==null&&t!=="/"&&(p.pathname=p.pathname==="/"?t:Yr([t,p.pathname])),(h.replace?n.replace:n.push)(p,h.state,h)},[t,n,u,o,e])}E.createContext(null);function Sl(e,{relative:t}={}){let{matches:n}=E.useContext(_r),{pathname:i}=dr(),o=JSON.stringify(kp(n));return E.useMemo(()=>zp(e,JSON.parse(o),i,t==="path"),[e,o,i,t])}function LC(e,t){return ww(e,t)}function ww(e,t,n,i,o){mt(Do(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:u}=E.useContext(Dn),{matches:l}=E.useContext(_r),f=l[l.length-1],d=f?f.params:{},h=f?f.pathname:"/",p=f?f.pathnameBase:"/",y=f&&f.route;{let N=y&&y.path||"";zw(h,!y||N.endsWith("*")||N.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${h}" (under <Route path="${N}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
10
+
11
+ Please change the parent <Route path="${N}"> to <Route path="${N==="/"?"*":`${N}/*`}">.`)}let x=dr(),b;if(t){let N=typeof t=="string"?Ro(t):t;mt(p==="/"||N.pathname?.startsWith(p),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${p}" but pathname "${N.pathname}" was given in the \`location\` prop.`),b=N}else b=x;let _=b.pathname||"/",z=_;if(p!=="/"){let N=p.replace(/^\//,"").split("/");z="/"+_.replace(/^\//,"").split("/").slice(N.length).join("/")}let A=dw(e,{pathname:z});fr(y||A!=null,`No routes matched location "${b.pathname}${b.search}${b.hash}" `),fr(A==null||A[A.length-1].route.element!==void 0||A[A.length-1].route.Component!==void 0||A[A.length-1].route.lazy!==void 0,`Matched leaf route at location "${b.pathname}${b.search}${b.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let j=BC(A&&A.map(N=>Object.assign({},N,{params:Object.assign({},d,N.params),pathname:Yr([p,u.encodeLocation?u.encodeLocation(N.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:N.pathname]),pathnameBase:N.pathnameBase==="/"?p:Yr([p,u.encodeLocation?u.encodeLocation(N.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:N.pathnameBase])})),l,n,i,o);return t&&j?E.createElement(bl.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...b},navigationType:"POP"}},j):j}function UC(){let e=GC(),t=_C(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:i},u={padding:"2px 4px",backgroundColor:i},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=E.createElement(E.Fragment,null,E.createElement("p",null,"💿 Hey developer 👋"),E.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",E.createElement("code",{style:u},"ErrorBoundary")," or"," ",E.createElement("code",{style:u},"errorElement")," prop on your route.")),E.createElement(E.Fragment,null,E.createElement("h2",null,"Unexpected Application Error!"),E.createElement("h3",{style:{fontStyle:"italic"}},t),n?E.createElement("pre",{style:o},n):null,l)}var VC=E.createElement(UC,null),kw=class extends E.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=MC(e.digest);n&&(e=n)}let t=e!==void 0?E.createElement(_r.Provider,{value:this.props.routeContext},E.createElement(_p.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?E.createElement(PC,{error:e},t):t}};kw.contextType=CC;var Th=new WeakMap;function PC({children:e,error:t}){let{basename:n}=E.useContext(Dn);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let i=RC(t.digest);if(i){let o=Th.get(t);if(o)throw o;let u=gw(i.location,n);if(pw&&!Th.get(t))if(u.isExternal||i.reloadDocument)window.location.href=u.absoluteURL||u.to;else{const l=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(u.to,{replace:i.replace}));throw Th.set(t,l),l}return E.createElement("meta",{httpEquiv:"refresh",content:`0;url=${u.absoluteURL||u.to}`})}}return e}function ZC({routeContext:e,match:t,children:n}){let i=E.useContext(Mo);return i&&i.static&&i.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=t.route.id),E.createElement(_r.Provider,{value:e},n)}function BC(e,t=[],n=null,i=null,o=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let u=e,l=n?.errors;if(l!=null){let p=u.findIndex(y=>y.route.id&&l?.[y.route.id]!==void 0);mt(p>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),u=u.slice(0,Math.min(u.length,p+1))}let f=!1,d=-1;if(n)for(let p=0;p<u.length;p++){let y=u[p];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(d=p),y.route.id){let{loaderData:x,errors:b}=n,_=y.route.loader&&!x.hasOwnProperty(y.route.id)&&(!b||b[y.route.id]===void 0);if(y.route.lazy||_){f=!0,d>=0?u=u.slice(0,d+1):u=[u[0]];break}}}let h=n&&i?(p,y)=>{i(p,{location:n.location,params:n.matches?.[0]?.params??{},unstable_pattern:EC(n.matches),errorInfo:y})}:void 0;return u.reduceRight((p,y,x)=>{let b,_=!1,z=null,A=null;n&&(b=l&&y.route.id?l[y.route.id]:void 0,z=y.route.errorElement||VC,f&&(d<0&&x===0?(zw("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),_=!0,A=null):d===x&&(_=!0,A=y.route.hydrateFallbackElement||null)));let j=t.concat(u.slice(0,x+1)),N=()=>{let T;return b?T=z:_?T=A:y.route.Component?T=E.createElement(y.route.Component,null):y.route.element?T=y.route.element:T=p,E.createElement(ZC,{match:y,routeContext:{outlet:p,matches:j,isDataRoute:n!=null},children:T})};return n&&(y.route.ErrorBoundary||y.route.errorElement||x===0)?E.createElement(kw,{location:n.location,revalidation:n.revalidation,component:z,error:b,children:N(),routeContext:{outlet:null,matches:j,isDataRoute:!0},onError:h}):N()},null)}function Tp(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function IC(e){let t=E.useContext(Mo);return mt(t,Tp(e)),t}function HC(e){let t=E.useContext(Pc);return mt(t,Tp(e)),t}function FC(e){let t=E.useContext(_r);return mt(t,Tp(e)),t}function Cp(e){let t=FC(e),n=t.matches[t.matches.length-1];return mt(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function qC(){return Cp("useRouteId")}function GC(){let e=E.useContext(_p),t=HC("useRouteError"),n=Cp("useRouteError");return e!==void 0?e:t.errors?.[n]}function YC(){let{router:e}=IC("useNavigate"),t=Cp("useNavigate"),n=E.useRef(!1);return Sw(()=>{n.current=!0}),E.useCallback(async(o,u={})=>{fr(n.current,bw),n.current&&(typeof o=="number"?await e.navigate(o):await e.navigate(o,{fromRouteId:t,...u}))},[e,t])}var Kb={};function zw(e,t,n){!t&&!Kb[e]&&(Kb[e]=!0,fr(!1,n))}E.memo(XC);function XC({routes:e,future:t,state:n,onError:i}){return ww(e,void 0,n,i,t)}function _w({to:e,replace:t,state:n,relative:i}){mt(Do(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o}=E.useContext(Dn);fr(!o,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:u}=E.useContext(_r),{pathname:l}=dr(),f=Ep(),d=zp(e,kp(u),l,i==="path"),h=JSON.stringify(d);return E.useEffect(()=>{f(JSON.parse(h),{replace:t,state:n,relative:i})},[f,h,i,t,n]),null}function ur(e){mt(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function KC({basename:e="/",children:t=null,location:n,navigationType:i="POP",navigator:o,static:u=!1,unstable_useTransitions:l}){mt(!Do(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let f=e.replace(/^\/*/,"/"),d=E.useMemo(()=>({basename:f,navigator:o,static:u,unstable_useTransitions:l,future:{}}),[f,o,u,l]);typeof n=="string"&&(n=Ro(n));let{pathname:h="/",search:p="",hash:y="",state:x=null,key:b="default"}=n,_=E.useMemo(()=>{let z=Kr(h,f);return z==null?null:{location:{pathname:z,search:p,hash:y,state:x,key:b},navigationType:i}},[f,h,p,y,x,b,i]);return fr(_!=null,`<Router basename="${f}"> is not able to match the URL "${h}${p}${y}" because it does not start with the basename, so the <Router> won't render anything.`),_==null?null:E.createElement(Dn.Provider,{value:d},E.createElement(bl.Provider,{children:t,value:_}))}function Jb({children:e,location:t}){return LC(wm(e),t)}function wm(e,t=[]){let n=[];return E.Children.forEach(e,(i,o)=>{if(!E.isValidElement(i))return;let u=[...t,o];if(i.type===E.Fragment){n.push.apply(n,wm(i.props.children,u));return}mt(i.type===ur,`[${typeof i.type=="string"?i.type:i.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),mt(!i.props.index||!i.props.children,"An index route cannot have child routes.");let l={id:i.props.id||u.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,middleware:i.props.middleware,loader:i.props.loader,action:i.props.action,hydrateFallbackElement:i.props.hydrateFallbackElement,HydrateFallback:i.props.HydrateFallback,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.hasErrorBoundary===!0||i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(l.children=wm(i.props.children,u)),n.push(l)}),n}var dc="get",hc="application/x-www-form-urlencoded";function Zc(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function JC(e){return Zc(e)&&e.tagName.toLowerCase()==="button"}function QC(e){return Zc(e)&&e.tagName.toLowerCase()==="form"}function WC(e){return Zc(e)&&e.tagName.toLowerCase()==="input"}function eA(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function tA(e,t){return e.button===0&&(!t||t==="_self")&&!eA(e)}var Fu=null;function nA(){if(Fu===null)try{new FormData(document.createElement("form"),0),Fu=!1}catch{Fu=!0}return Fu}var rA=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Ch(e){return e!=null&&!rA.has(e)?(fr(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${hc}"`),null):e}function iA(e,t){let n,i,o,u,l;if(QC(e)){let f=e.getAttribute("action");i=f?Kr(f,t):null,n=e.getAttribute("method")||dc,o=Ch(e.getAttribute("enctype"))||hc,u=new FormData(e)}else if(JC(e)||WC(e)&&(e.type==="submit"||e.type==="image")){let f=e.form;if(f==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let d=e.getAttribute("formaction")||f.getAttribute("action");if(i=d?Kr(d,t):null,n=e.getAttribute("formmethod")||f.getAttribute("method")||dc,o=Ch(e.getAttribute("formenctype"))||Ch(f.getAttribute("enctype"))||hc,u=new FormData(f,e),!nA()){let{name:h,type:p,value:y}=e;if(p==="image"){let x=h?`${h}.`:"";u.append(`${x}x`,"0"),u.append(`${x}y`,"0")}else h&&u.append(h,y)}}else{if(Zc(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=dc,i=null,o=hc,l=e}return u&&o==="text/plain"&&(l=u,u=void 0),{action:i,method:n.toLowerCase(),encType:o,formData:u,body:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Ap(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function aA(e,t,n,i){let o=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${i}`:o.pathname=`${o.pathname}.${i}`:o.pathname==="/"?o.pathname=`_root.${i}`:t&&Kr(o.pathname,t)==="/"?o.pathname=`${t.replace(/\/$/,"")}/_root.${i}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${i}`,o}async function oA(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function sA(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function lA(e,t,n){let i=await Promise.all(e.map(async o=>{let u=t.routes[o.route.id];if(u){let l=await oA(u,n);return l.links?l.links():[]}return[]}));return dA(i.flat(1).filter(sA).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function Qb(e,t,n,i,o,u){let l=(d,h)=>n[h]?d.route.id!==n[h].route.id:!0,f=(d,h)=>n[h].pathname!==d.pathname||n[h].route.path?.endsWith("*")&&n[h].params["*"]!==d.params["*"];return u==="assets"?t.filter((d,h)=>l(d,h)||f(d,h)):u==="data"?t.filter((d,h)=>{let p=i.routes[d.route.id];if(!p||!p.hasLoader)return!1;if(l(d,h)||f(d,h))return!0;if(d.route.shouldRevalidate){let y=d.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:d.params,defaultShouldRevalidate:!0});if(typeof y=="boolean")return y}return!0}):[]}function uA(e,t,{includeHydrateFallback:n}={}){return cA(e.map(i=>{let o=t.routes[i.route.id];if(!o)return[];let u=[o.module];return o.clientActionModule&&(u=u.concat(o.clientActionModule)),o.clientLoaderModule&&(u=u.concat(o.clientLoaderModule)),n&&o.hydrateFallbackModule&&(u=u.concat(o.hydrateFallbackModule)),o.imports&&(u=u.concat(o.imports)),u}).flat(1))}function cA(e){return[...new Set(e)]}function fA(e){let t={},n=Object.keys(e).sort();for(let i of n)t[i]=e[i];return t}function dA(e,t){let n=new Set;return new Set(t),e.reduce((i,o)=>{let u=JSON.stringify(fA(o));return n.has(u)||(n.add(u),i.push({key:u,link:o})),i},[])}function Ew(){let e=E.useContext(Mo);return Ap(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function hA(){let e=E.useContext(Pc);return Ap(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var jp=E.createContext(void 0);jp.displayName="FrameworkContext";function Tw(){let e=E.useContext(jp);return Ap(e,"You must render this element inside a <HydratedRouter> element"),e}function mA(e,t){let n=E.useContext(jp),[i,o]=E.useState(!1),[u,l]=E.useState(!1),{onFocus:f,onBlur:d,onMouseEnter:h,onMouseLeave:p,onTouchStart:y}=t,x=E.useRef(null);E.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let z=j=>{j.forEach(N=>{l(N.isIntersecting)})},A=new IntersectionObserver(z,{threshold:.5});return x.current&&A.observe(x.current),()=>{A.disconnect()}}},[e]),E.useEffect(()=>{if(i){let z=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(z)}}},[i]);let b=()=>{o(!0)},_=()=>{o(!1),l(!1)};return n?e!=="intent"?[u,x,{}]:[u,x,{onFocus:Us(f,b),onBlur:Us(d,_),onMouseEnter:Us(h,b),onMouseLeave:Us(p,_),onTouchStart:Us(y,b)}]:[!1,x,{}]}function Us(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function pA({page:e,...t}){let{router:n}=Ew(),i=E.useMemo(()=>dw(n.routes,e,n.basename),[n.routes,e,n.basename]);return i?E.createElement(yA,{page:e,matches:i,...t}):null}function gA(e){let{manifest:t,routeModules:n}=Tw(),[i,o]=E.useState([]);return E.useEffect(()=>{let u=!1;return lA(e,t,n).then(l=>{u||o(l)}),()=>{u=!0}},[e,t,n]),i}function yA({page:e,matches:t,...n}){let i=dr(),{future:o,manifest:u,routeModules:l}=Tw(),{basename:f}=Ew(),{loaderData:d,matches:h}=hA(),p=E.useMemo(()=>Qb(e,t,h,u,i,"data"),[e,t,h,u,i]),y=E.useMemo(()=>Qb(e,t,h,u,i,"assets"),[e,t,h,u,i]),x=E.useMemo(()=>{if(e===i.pathname+i.search+i.hash)return[];let z=new Set,A=!1;if(t.forEach(N=>{let T=u.routes[N.route.id];!T||!T.hasLoader||(!p.some(R=>R.route.id===N.route.id)&&N.route.id in d&&l[N.route.id]?.shouldRevalidate||T.hasClientLoader?A=!0:z.add(N.route.id))}),z.size===0)return[];let j=aA(e,f,o.unstable_trailingSlashAwareDataRequests,"data");return A&&z.size>0&&j.searchParams.set("_routes",t.filter(N=>z.has(N.route.id)).map(N=>N.route.id).join(",")),[j.pathname+j.search]},[f,o.unstable_trailingSlashAwareDataRequests,d,i,u,p,t,e,l]),b=E.useMemo(()=>uA(y,u),[y,u]),_=gA(y);return E.createElement(E.Fragment,null,x.map(z=>E.createElement("link",{key:z,rel:"prefetch",as:"fetch",href:z,...n})),b.map(z=>E.createElement("link",{key:z,rel:"modulepreload",href:z,...n})),_.map(({key:z,link:A})=>E.createElement("link",{key:z,nonce:n.nonce,...A,crossOrigin:A.crossOrigin??n.crossOrigin})))}function xA(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var vA=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{vA&&(window.__reactRouterVersion="7.13.0")}catch{}function bA({basename:e,children:t,unstable_useTransitions:n,window:i}){let o=E.useRef();o.current==null&&(o.current=tC({window:i,v5Compat:!0}));let u=o.current,[l,f]=E.useState({action:u.action,location:u.location}),d=E.useCallback(h=>{n===!1?f(h):E.startTransition(()=>f(h))},[n]);return E.useLayoutEffect(()=>u.listen(d),[u,d]),E.createElement(KC,{basename:e,children:t,location:l.location,navigationType:l.action,navigator:u,unstable_useTransitions:n})}var Cw=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,fo=E.forwardRef(function({onClick:t,discover:n="render",prefetch:i="none",relative:o,reloadDocument:u,replace:l,state:f,target:d,to:h,preventScrollReset:p,viewTransition:y,unstable_defaultShouldRevalidate:x,...b},_){let{basename:z,unstable_useTransitions:A}=E.useContext(Dn),j=typeof h=="string"&&Cw.test(h),N=gw(h,z);h=N.to;let T=DC(h,{relative:o}),[R,L,$]=mA(i,b),q=zA(h,{replace:l,state:f,target:d,preventScrollReset:p,relative:o,viewTransition:y,unstable_defaultShouldRevalidate:x,unstable_useTransitions:A});function P(ie){t&&t(ie),ie.defaultPrevented||q(ie)}let K=E.createElement("a",{...b,...$,href:N.absoluteURL||T,onClick:N.isExternal||u?t:P,ref:xA(_,L),target:d,"data-discover":!j&&n==="render"?"true":void 0});return R&&!j?E.createElement(E.Fragment,null,K,E.createElement(pA,{page:T})):K});fo.displayName="Link";var SA=E.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:i="",end:o=!1,style:u,to:l,viewTransition:f,children:d,...h},p){let y=Sl(l,{relative:h.relative}),x=dr(),b=E.useContext(Pc),{navigator:_,basename:z}=E.useContext(Dn),A=b!=null&&AA(y)&&f===!0,j=_.encodeLocation?_.encodeLocation(y).pathname:y.pathname,N=x.pathname,T=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;n||(N=N.toLowerCase(),T=T?T.toLowerCase():null,j=j.toLowerCase()),T&&z&&(T=Kr(T,z)||T);const R=j!=="/"&&j.endsWith("/")?j.length-1:j.length;let L=N===j||!o&&N.startsWith(j)&&N.charAt(R)==="/",$=T!=null&&(T===j||!o&&T.startsWith(j)&&T.charAt(j.length)==="/"),q={isActive:L,isPending:$,isTransitioning:A},P=L?t:void 0,K;typeof i=="function"?K=i(q):K=[i,L?"active":null,$?"pending":null,A?"transitioning":null].filter(Boolean).join(" ");let ie=typeof u=="function"?u(q):u;return E.createElement(fo,{...h,"aria-current":P,className:K,ref:p,style:ie,to:l,viewTransition:f},typeof d=="function"?d(q):d)});SA.displayName="NavLink";var wA=E.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:i,replace:o,state:u,method:l=dc,action:f,onSubmit:d,relative:h,preventScrollReset:p,viewTransition:y,unstable_defaultShouldRevalidate:x,...b},_)=>{let{unstable_useTransitions:z}=E.useContext(Dn),A=TA(),j=CA(f,{relative:h}),N=l.toLowerCase()==="get"?"get":"post",T=typeof f=="string"&&Cw.test(f),R=L=>{if(d&&d(L),L.defaultPrevented)return;L.preventDefault();let $=L.nativeEvent.submitter,q=$?.getAttribute("formmethod")||l,P=()=>A($||L.currentTarget,{fetcherKey:t,method:q,navigate:n,replace:o,state:u,relative:h,preventScrollReset:p,viewTransition:y,unstable_defaultShouldRevalidate:x});z&&n!==!1?E.startTransition(()=>P()):P()};return E.createElement("form",{ref:_,method:N,action:j,onSubmit:i?d:R,...b,"data-discover":!T&&e==="render"?"true":void 0})});wA.displayName="Form";function kA(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Aw(e){let t=E.useContext(Mo);return mt(t,kA(e)),t}function zA(e,{target:t,replace:n,state:i,preventScrollReset:o,relative:u,viewTransition:l,unstable_defaultShouldRevalidate:f,unstable_useTransitions:d}={}){let h=Ep(),p=dr(),y=Sl(e,{relative:u});return E.useCallback(x=>{if(tA(x,t)){x.preventDefault();let b=n!==void 0?n:ol(p)===ol(y),_=()=>h(e,{replace:b,state:i,preventScrollReset:o,relative:u,viewTransition:l,unstable_defaultShouldRevalidate:f});d?E.startTransition(()=>_()):_()}},[p,h,y,n,i,t,e,o,u,l,f,d])}var _A=0,EA=()=>`__${String(++_A)}__`;function TA(){let{router:e}=Aw("useSubmit"),{basename:t}=E.useContext(Dn),n=qC(),i=e.fetch,o=e.navigate;return E.useCallback(async(u,l={})=>{let{action:f,method:d,encType:h,formData:p,body:y}=iA(u,t);if(l.navigate===!1){let x=l.fetcherKey||EA();await i(x,n,l.action||f,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:p,body:y,formMethod:l.method||d,formEncType:l.encType||h,flushSync:l.flushSync})}else await o(l.action||f,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:p,body:y,formMethod:l.method||d,formEncType:l.encType||h,replace:l.replace,state:l.state,fromRouteId:n,flushSync:l.flushSync,viewTransition:l.viewTransition})},[i,o,t,n])}function CA(e,{relative:t}={}){let{basename:n}=E.useContext(Dn),i=E.useContext(_r);mt(i,"useFormAction must be used inside a RouteContext");let[o]=i.matches.slice(-1),u={...Sl(e||".",{relative:t})},l=dr();if(e==null){u.search=l.search;let f=new URLSearchParams(u.search),d=f.getAll("index");if(d.some(p=>p==="")){f.delete("index"),d.filter(y=>y).forEach(y=>f.append("index",y));let p=f.toString();u.search=p?`?${p}`:""}}return(!e||e===".")&&o.route.index&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(u.pathname=u.pathname==="/"?n:Yr([n,u.pathname])),ol(u)}function AA(e,{relative:t}={}){let n=E.useContext(xw);mt(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=Aw("useViewTransitionState"),o=Sl(e,{relative:t});if(!n.isTransitioning)return!1;let u=Kr(n.currentLocation.pathname,i)||n.currentLocation.pathname,l=Kr(n.nextLocation.pathname,i)||n.nextLocation.pathname;return bc(o.pathname,l)!=null||bc(o.pathname,u)!=null}const jw=(...e)=>e.filter((t,n,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===n).join(" ").trim();const jA=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const NA=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,i)=>i?i.toUpperCase():n.toLowerCase());const Wb=e=>{const t=NA(e);return t.charAt(0).toUpperCase()+t.slice(1)};var OA={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"};const RA=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const MA=E.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:i,className:o="",children:u,iconNode:l,...f},d)=>E.createElement("svg",{ref:d,...OA,width:t,height:t,stroke:e,strokeWidth:i?Number(n)*24/Number(t):n,className:jw("lucide",o),...!u&&!RA(f)&&{"aria-hidden":"true"},...f},[...l.map(([h,p])=>E.createElement(h,p)),...Array.isArray(u)?u:[u]]));const Me=(e,t)=>{const n=E.forwardRef(({className:i,...o},u)=>E.createElement(MA,{ref:u,iconNode:t,className:jw(`lucide-${jA(Wb(e))}`,`lucide-${e}`,i),...o}));return n.displayName=Wb(e),n};const DA=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],ho=Me("activity",DA);const $A=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],LA=Me("archive",$A);const UA=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],VA=Me("arrow-down",UA);const PA=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],ZA=Me("arrow-up",PA);const BA=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],e0=Me("bot",BA);const IA=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],HA=Me("box",IA);const FA=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],qA=Me("brain",FA);const GA=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],Nw=Me("calendar",GA);const YA=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],km=Me("chart-column",YA);const XA=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],KA=Me("check",XA);const JA=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Ow=Me("clock",JA);const QA=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],Rw=Me("cpu",QA);const WA=[["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"}]],ej=Me("database",WA);const tj=[["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"}]],Mw=Me("eye",tj);const nj=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],rj=Me("file-text",nj);const ij=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],aj=Me("hash",ij);const oj=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],sj=Me("info",oj);const lj=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],t0=Me("layout-dashboard",lj);const uj=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],n0=Me("log-out",uj);const cj=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],fj=Me("menu",cj);const dj=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M12 8v6",key:"1ib9pf"}],["path",{d:"M9 11h6",key:"1fldmi"}]],r0=Me("message-square-plus",dj);const hj=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],sl=Me("message-square",hj);const mj=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],Dw=Me("moon",mj);const pj=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],gj=Me("pencil",pj);const yj=[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]],i0=Me("puzzle",yj);const xj=[["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"}]],vj=Me("refresh-cw",xj);const bj=[["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"}]],a0=Me("rotate-ccw",bj);const Sj=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],wj=Me("search",Sj);const kj=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],zj=Me("send",kj);const _j=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],o0=Me("settings",_j);const Ej=[["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"}]],$w=Me("sun",Ej);const Tj=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],Cj=Me("tag",Tj);const Aj=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],s0=Me("terminal",Aj);const jj=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],zm=Me("trash-2",jj);const Nj=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],Oj=Me("trending-up",Nj);const Rj=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Mj=Me("user",Rj);const Dj=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],$j=Me("x",Dj);var Ah={exports:{}},jh={};var l0;function Lj(){if(l0)return jh;l0=1;var e=Vc();function t(y,x){return y===x&&(y!==0||1/y===1/x)||y!==y&&x!==x}var n=typeof Object.is=="function"?Object.is:t,i=e.useState,o=e.useEffect,u=e.useLayoutEffect,l=e.useDebugValue;function f(y,x){var b=x(),_=i({inst:{value:b,getSnapshot:x}}),z=_[0].inst,A=_[1];return u(function(){z.value=b,z.getSnapshot=x,d(z)&&A({inst:z})},[y,b,x]),o(function(){return d(z)&&A({inst:z}),y(function(){d(z)&&A({inst:z})})},[y]),l(b),b}function d(y){var x=y.getSnapshot;y=y.value;try{var b=x();return!n(y,b)}catch{return!0}}function h(y,x){return x()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:f;return jh.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,jh}var u0;function Uj(){return u0||(u0=1,Ah.exports=Lj()),Ah.exports}var c0=Uj();const Lw=0,Uw=1,Vw=2,f0=3;var d0=Object.prototype.hasOwnProperty;function _m(e,t){var n,i;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((i=e.length)===t.length)for(;i--&&_m(e[i],t[i]););return i===-1}if(!n||typeof e=="object"){i=0;for(n in e)if(d0.call(e,n)&&++i&&!d0.call(t,n)||!(n in t)||!_m(e[n],t[n]))return!1;return Object.keys(t).length===i}}return e!==e&&t!==t}const qr=new WeakMap,Gr=()=>{},tn=Gr(),Em=Object,Pe=e=>e===tn,vr=e=>typeof e=="function",Ti=(e,t)=>({...e,...t}),Pw=e=>vr(e.then),Nh={},qu={},Np="undefined",wl=typeof window!=Np,Tm=typeof document!=Np,Vj=wl&&"Deno"in window,Pj=()=>wl&&typeof window.requestAnimationFrame!=Np,Zw=(e,t)=>{const n=qr.get(e);return[()=>!Pe(t)&&e.get(t)||Nh,i=>{if(!Pe(t)){const o=e.get(t);t in qu||(qu[t]=o),n[5](t,Ti(o,i),o||Nh)}},n[6],()=>!Pe(t)&&t in qu?qu[t]:!Pe(t)&&e.get(t)||Nh]};let Cm=!0;const Zj=()=>Cm,[Am,jm]=wl&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[Gr,Gr],Bj=()=>{const e=Tm&&document.visibilityState;return Pe(e)||e!=="hidden"},Ij=e=>(Tm&&document.addEventListener("visibilitychange",e),Am("focus",e),()=>{Tm&&document.removeEventListener("visibilitychange",e),jm("focus",e)}),Hj=e=>{const t=()=>{Cm=!0,e()},n=()=>{Cm=!1};return Am("online",t),Am("offline",n),()=>{jm("online",t),jm("offline",n)}},Fj={isOnline:Zj,isVisible:Bj},qj={initFocus:Ij,initReconnect:Hj},h0=!wp.useId,wo=!wl||Vj,Gj=e=>Pj()?window.requestAnimationFrame(e):setTimeout(e,1),Oh=wo?E.useEffect:E.useLayoutEffect,Rh=typeof navigator<"u"&&navigator.connection,m0=!wo&&Rh&&(["slow-2g","2g"].includes(Rh.effectiveType)||Rh.saveData),Gu=new WeakMap,Yj=e=>Em.prototype.toString.call(e),Mh=(e,t)=>e===`[object ${t}]`;let Xj=0;const Nm=e=>{const t=typeof e,n=Yj(e),i=Mh(n,"Date"),o=Mh(n,"RegExp"),u=Mh(n,"Object");let l,f;if(Em(e)===e&&!i&&!o){if(l=Gu.get(e),l)return l;if(l=++Xj+"~",Gu.set(e,l),Array.isArray(e)){for(l="@",f=0;f<e.length;f++)l+=Nm(e[f])+",";Gu.set(e,l)}if(u){l="#";const d=Em.keys(e).sort();for(;!Pe(f=d.pop());)Pe(e[f])||(l+=f+":"+Nm(e[f])+",");Gu.set(e,l)}}else l=i?e.toJSON():t=="symbol"?e.toString():t=="string"?JSON.stringify(e):""+e;return l},Op=e=>{if(vr(e))try{e=e()}catch{e=""}const t=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?Nm(e):"",[e,t]};let Kj=0;const Om=()=>++Kj;async function Bw(...e){const[t,n,i,o]=e,u=Ti({populateCache:!0,throwOnError:!0},typeof o=="boolean"?{revalidate:o}:o||{});let l=u.populateCache;const f=u.rollbackOnError;let d=u.optimisticData;const h=x=>typeof f=="function"?f(x):f!==!1,p=u.throwOnError;if(vr(n)){const x=n,b=[],_=t.keys();for(const z of _)!/^\$(inf|sub)\$/.test(z)&&x(t.get(z)._k)&&b.push(z);return Promise.all(b.map(y))}return y(n);async function y(x){const[b]=Op(x);if(!b)return;const[_,z]=Zw(t,b),[A,j,N,T]=qr.get(t),R=()=>{const ue=A[b];return(vr(u.revalidate)?u.revalidate(_().data,x):u.revalidate!==!1)&&(delete N[b],delete T[b],ue&&ue[0])?ue[0](Vw).then(()=>_().data):_().data};if(e.length<3)return R();let L=i,$,q=!1;const P=Om();j[b]=[P,0];const K=!Pe(d),ie=_(),ne=ie.data,oe=ie._c,we=Pe(oe)?ne:oe;if(K&&(d=vr(d)?d(we,ne):d,z({data:d,_c:we})),vr(L))try{L=L(we)}catch(ue){$=ue,q=!0}if(L&&Pw(L))if(L=await L.catch(ue=>{$=ue,q=!0}),P!==j[b][0]){if(q)throw $;return L}else q&&K&&h($)&&(l=!0,z({data:we,_c:tn}));if(l&&!q)if(vr(l)){const ue=l(L,we);z({data:ue,error:tn,_c:tn})}else z({data:L,error:tn,_c:tn});if(j[b][1]=Om(),Promise.resolve(R()).then(()=>{z({_c:tn})}),q){if(p)throw $;return}return L}}const p0=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},Jj=(e,t)=>{if(!qr.has(e)){const n=Ti(qj,t),i=Object.create(null),o=Bw.bind(tn,e);let u=Gr;const l=Object.create(null),f=(p,y)=>{const x=l[p]||[];return l[p]=x,x.push(y),()=>x.splice(x.indexOf(y),1)},d=(p,y,x)=>{e.set(p,y);const b=l[p];if(b)for(const _ of b)_(y,x)},h=()=>{if(!qr.has(e)&&(qr.set(e,[i,Object.create(null),Object.create(null),Object.create(null),o,d,f]),!wo)){const p=n.initFocus(setTimeout.bind(tn,p0.bind(tn,i,Lw))),y=n.initReconnect(setTimeout.bind(tn,p0.bind(tn,i,Uw)));u=()=>{p&&p(),y&&y(),qr.delete(e)}}};return h(),[e,o,h,u]}return[e,qr.get(e)[4]]},Qj=(e,t,n,i,o)=>{const u=n.errorRetryCount,l=o.retryCount,f=~~((Math.random()+.5)*(1<<(l<8?l:8)))*n.errorRetryInterval;!Pe(u)&&l>u||setTimeout(i,f,o)},Wj=_m,[Iw,Rm]=Jj(new Map),eN=Ti({onLoadingSlow:Gr,onSuccess:Gr,onError:Gr,onErrorRetry:Qj,onDiscarded:Gr,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:m0?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:m0?5e3:3e3,compare:Wj,isPaused:()=>!1,cache:Iw,mutate:Rm,fallback:{}},Fj),tN=(e,t)=>{const n=Ti(e,t);if(t){const{use:i,fallback:o}=e,{use:u,fallback:l}=t;i&&u&&(n.use=i.concat(u)),o&&l&&(n.fallback=Ti(o,l))}return n},nN=E.createContext({}),rN="$inf$",Hw=wl&&window.__SWR_DEVTOOLS_USE__,iN=Hw?window.__SWR_DEVTOOLS_USE__:[],aN=()=>{Hw&&(window.__SWR_DEVTOOLS_REACT__=wp)},oN=e=>vr(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}],sN=()=>{const e=E.useContext(nN);return E.useMemo(()=>Ti(eN,e),[e])},lN=e=>(t,n,i)=>e(t,n&&((...u)=>{const[l]=Op(t),[,,,f]=qr.get(Iw);if(l.startsWith(rN))return n(...u);const d=f[l];return Pe(d)?n(...u):(delete f[l],d)}),i),uN=iN.concat(lN),cN=e=>function(...n){const i=sN(),[o,u,l]=oN(n),f=tN(i,l);let d=e;const{use:h}=f,p=(h||[]).concat(uN);for(let y=p.length;y--;)d=p[y](d);return d(o,u||f.fetcher||null,f)},fN=(e,t,n)=>{const i=t[e]||(t[e]=[]);return i.push(n),()=>{const o=i.indexOf(n);o>=0&&(i[o]=i[i.length-1],i.pop())}};aN();const Dh=wp.use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}}),$h={dedupe:!0},g0=Promise.resolve(tn),dN=(e,t,n)=>{const{cache:i,compare:o,suspense:u,fallbackData:l,revalidateOnMount:f,revalidateIfStale:d,refreshInterval:h,refreshWhenHidden:p,refreshWhenOffline:y,keepPreviousData:x,strictServerPrefetchWarning:b}=n,[_,z,A,j]=qr.get(i),[N,T]=Op(e),R=E.useRef(!1),L=E.useRef(!1),$=E.useRef(N),q=E.useRef(t),P=E.useRef(n),K=()=>P.current,ie=()=>K().isVisible()&&K().isOnline(),[ne,oe,we,ue]=Zw(i,N),re=E.useRef({}).current,V=Pe(l)?Pe(n.fallback)?tn:n.fallback[N]:l,X=(Ze,tt)=>{for(const st in re){const Je=st;if(Je==="data"){if(!o(Ze[Je],tt[Je])&&(!Pe(Ze[Je])||!o(me,tt[Je])))return!1}else if(tt[Je]!==Ze[Je])return!1}return!0},G=E.useMemo(()=>{const Ze=!N||!t?!1:Pe(f)?K().isPaused()||u?!1:d!==!1:f,tt=Vt=>{const lt=Ti(Vt);return delete lt._k,Ze?{isValidating:!0,isLoading:!0,...lt}:lt},st=ne(),Je=ue(),Ht=tt(st),Un=st===Je?Ht:tt(Je);let _t=Ht;return[()=>{const Vt=tt(ne());return X(Vt,_t)?(_t.data=Vt.data,_t.isLoading=Vt.isLoading,_t.isValidating=Vt.isValidating,_t.error=Vt.error,_t):(_t=Vt,Vt)},()=>Un]},[i,N]),ve=c0.useSyncExternalStore(E.useCallback(Ze=>we(N,(tt,st)=>{X(st,tt)||Ze()}),[i,N]),G[0],G[1]),O=!R.current,C=_[N]&&_[N].length>0,F=ve.data,k=Pe(F)?V&&Pw(V)?Dh(V):V:F,ae=ve.error,xe=E.useRef(k),me=x?Pe(F)?Pe(xe.current)?k:xe.current:F:k,pe=N&&Pe(k),Ge=!wo&&c0.useSyncExternalStore(()=>Gr,()=>!1,()=>!0);b&&Ge&&!u&&pe&&console.warn(`Missing pre-initiated data for serialized key "${N}" during server-side rendering. Data fethcing should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning.`);const De=C&&!Pe(ae)?!1:O&&!Pe(f)?f:K().isPaused()?!1:u?Pe(k)?!1:d:Pe(k)||d,Ct=!!(N&&t&&O&&De),an=Pe(ve.isValidating)?Ct:ve.isValidating,$n=Pe(ve.isLoading)?Ct:ve.isLoading,hr=E.useCallback(async Ze=>{const tt=q.current;if(!N||!tt||L.current||K().isPaused())return!1;let st,Je,Ht=!0;const Un=Ze||{},_t=!A[N]||!Un.dedupe,Vt=()=>h0?!L.current&&N===$.current&&R.current:N===$.current,lt={isValidating:!1,isLoading:!1},Sa=()=>{oe(lt)},J=()=>{const ge=A[N];ge&&ge[1]===Je&&delete A[N]},le={isValidating:!0};Pe(ne().data)&&(le.isLoading=!0);try{if(_t&&(oe(le),n.loadingTimeout&&Pe(ne().data)&&setTimeout(()=>{Ht&&Vt()&&K().onLoadingSlow(N,n)},n.loadingTimeout),A[N]=[tt(T),Om()]),[st,Je]=A[N],st=await st,_t&&setTimeout(J,n.dedupingInterval),!A[N]||A[N][1]!==Je)return _t&&Vt()&&K().onDiscarded(N),!1;lt.error=tn;const ge=z[N];if(!Pe(ge)&&(Je<=ge[0]||Je<=ge[1]||ge[1]===0))return Sa(),_t&&Vt()&&K().onDiscarded(N),!1;const ze=ne().data;lt.data=o(ze,st)?ze:st,_t&&Vt()&&K().onSuccess(st,N,n)}catch(ge){J();const ze=K(),{shouldRetryOnError:Ve}=ze;ze.isPaused()||(lt.error=ge,_t&&Vt()&&(ze.onError(ge,N,ze),(Ve===!0||vr(Ve)&&Ve(ge))&&(!K().revalidateOnFocus||!K().revalidateOnReconnect||ie())&&ze.onErrorRetry(ge,N,ze,on=>{const _n=_[N];_n&&_n[0]&&_n[0](f0,on)},{retryCount:(Un.retryCount||0)+1,dedupe:!0})))}return Ht=!1,Sa(),!0},[N,i]),Ln=E.useCallback((...Ze)=>Bw(i,$.current,...Ze),[]);if(Oh(()=>{q.current=t,P.current=n,Pe(F)||(xe.current=F)}),Oh(()=>{if(!N)return;const Ze=hr.bind(tn,$h);let tt=0;K().revalidateOnFocus&&(tt=Date.now()+K().focusThrottleInterval);const Je=fN(N,_,(Ht,Un={})=>{if(Ht==Lw){const _t=Date.now();K().revalidateOnFocus&&_t>tt&&ie()&&(tt=_t+K().focusThrottleInterval,Ze())}else if(Ht==Uw)K().revalidateOnReconnect&&ie()&&Ze();else{if(Ht==Vw)return hr();if(Ht==f0)return hr(Un)}});return L.current=!1,$.current=N,R.current=!0,oe({_k:T}),De&&(A[N]||(Pe(k)||wo?Ze():Gj(Ze))),()=>{L.current=!0,Je()}},[N]),Oh(()=>{let Ze;function tt(){const Je=vr(h)?h(ne().data):h;Je&&Ze!==-1&&(Ze=setTimeout(st,Je))}function st(){!ne().error&&(p||K().isVisible())&&(y||K().isOnline())?hr($h).then(tt):tt()}return tt(),()=>{Ze&&(clearTimeout(Ze),Ze=-1)}},[h,p,y,N]),E.useDebugValue(me),u){if(!h0&&wo&&pe)throw new Error("Fallback data is required when using Suspense in SSR.");pe&&(q.current=t,P.current=n,L.current=!1);const Ze=j[N],tt=!Pe(Ze)&&pe?Ln(Ze):g0;if(Dh(tt),!Pe(ae)&&pe)throw ae;const st=pe?hr($h):g0;!Pe(me)&&pe&&(st.status="fulfilled",st.value=!0),Dh(st)}return{mutate:Ln,get data(){return re.data=!0,me},get error(){return re.error=!0,ae},get isValidating(){return re.isValidating=!0,an},get isLoading(){return re.isLoading=!0,$n}}},pa=cN(dN),hN="x-architect-pass",Vs="/api";class ca{static instance;constructor(){}static getInstance(){return ca.instance||(ca.instance=new ca),ca.instance}getHeaders(t={}){const n=localStorage.getItem("morpheus.auth.token"),i={...t};return n&&(i[hN]=n),i}async handleResponse(t){if(t.status===401)throw localStorage.removeItem("morpheus.auth.token"),window.location.pathname.endsWith("/login")||(window.location.href="/login"),new Error("Unauthorized");if(!t.ok){const n=await t.json().catch(()=>({error:"Unknown error"})),i=new Error(n.error||`HTTP error! status: ${t.status}`);throw i.details=n.details,i}return t.json()}async get(t){const n=await fetch(`${Vs}${t}`,{headers:this.getHeaders()});return this.handleResponse(n)}async post(t,n){const i=await fetch(`${Vs}${t}`,{method:"POST",headers:this.getHeaders({"Content-Type":"application/json"}),body:JSON.stringify(n)});return this.handleResponse(i)}async put(t,n){const i=await fetch(`${Vs}${t}`,{method:"PUT",headers:this.getHeaders({"Content-Type":"application/json"}),body:JSON.stringify(n)});return this.handleResponse(i)}async patch(t,n){const i=await fetch(`${Vs}${t}`,{method:"PATCH",headers:this.getHeaders({"Content-Type":"application/json"}),body:JSON.stringify(n)});return this.handleResponse(i)}async delete(t){const n=await fetch(`${Vs}${t}`,{method:"DELETE",headers:this.getHeaders()});return this.handleResponse(n)}}const Dt=ca.getInstance(),ll="/api",Rp=e=>{const t=e.startsWith(ll)?e.substring(ll.length):e;return Dt.get(t)};function Fw(){return pa(`${ll}/status`,Rp,{refreshInterval:5e3})}function mN(){return pa(`${ll}/logs`,Rp)}function pN(e){return pa(e?`${ll}/logs/${e}?limit=1000`:null,Rp,{refreshInterval:2e3})}function qw(e){const t=Math.floor(e/60);if(t>59){const n=Math.floor(t/60),i=t%60;return`${n}h ${i}m`}return`${t}m`}function gN(){const{data:e}=Fw();return v.jsxs("footer",{className:"h-8 bg-azure-bg dark:bg-zinc-950 border-t border-azure-border dark:border-matrix-primary flex items-center px-4 text-xs justify-between select-none z-10 shrink-0",children:[v.jsxs("div",{className:"flex gap-4",children:[v.jsxs("span",{className:e?"text-azure-primary dark:text-matrix-highlight":"text-red-500",children:["● ",e?.status.toUpperCase()||"OFFLINE"]}),v.jsxs("span",{children:["PID: ",e?.pid||"-"]}),v.jsxs("span",{children:["UPTIME: ",e?qw(e.uptimeSeconds):"-"]})]}),v.jsxs("div",{className:"flex gap-4 opacity-70",children:[v.jsxs("span",{children:["v",e?.projectVersion||"0.0.0"]}),v.jsx("span",{children:e?.agentName||"Morpheus"})]})]})}const Mp=E.createContext({});function Dp(e){const t=E.useRef(null);return t.current===null&&(t.current=e()),t.current}const Gw=typeof window<"u",Yw=Gw?E.useLayoutEffect:E.useEffect,Bc=E.createContext(null);function $p(e,t){e.indexOf(t)===-1&&e.push(t)}function Lp(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const kr=(e,t,n)=>n>t?t:n<e?e:n;let Up=()=>{};const Jr={},Xw=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Kw(e){return typeof e=="object"&&e!==null}const Jw=e=>/^0[^.\s]+$/u.test(e);function Vp(e){let t;return()=>(t===void 0&&(t=e()),t)}const tr=e=>e,yN=(e,t)=>n=>t(e(n)),kl=(...e)=>e.reduce(yN),ul=(e,t,n)=>{const i=t-e;return i===0?1:(n-e)/i};class Pp{constructor(){this.subscriptions=[]}add(t){return $p(this.subscriptions,t),()=>Lp(this.subscriptions,t)}notify(t,n,i){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,i);else for(let u=0;u<o;u++){const l=this.subscriptions[u];l&&l(t,n,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Xr=e=>e*1e3,er=e=>e/1e3;function Qw(e,t){return t?e*(1e3/t):0}const Ww=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,xN=1e-7,vN=12;function bN(e,t,n,i,o){let u,l,f=0;do l=t+(n-t)/2,u=Ww(l,i,o)-e,u>0?n=l:t=l;while(Math.abs(u)>xN&&++f<vN);return l}function zl(e,t,n,i){if(e===t&&n===i)return tr;const o=u=>bN(u,0,1,e,n);return u=>u===0||u===1?u:Ww(o(u),t,i)}const ek=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,tk=e=>t=>1-e(1-t),nk=zl(.33,1.53,.69,.99),Zp=tk(nk),rk=ek(Zp),ik=e=>(e*=2)<1?.5*Zp(e):.5*(2-Math.pow(2,-10*(e-1))),Bp=e=>1-Math.sin(Math.acos(e)),ak=tk(Bp),ok=ek(Bp),SN=zl(.42,0,1,1),wN=zl(0,0,.58,1),sk=zl(.42,0,.58,1),kN=e=>Array.isArray(e)&&typeof e[0]!="number",lk=e=>Array.isArray(e)&&typeof e[0]=="number",zN={linear:tr,easeIn:SN,easeInOut:sk,easeOut:wN,circIn:Bp,circInOut:ok,circOut:ak,backIn:Zp,backInOut:rk,backOut:nk,anticipate:ik},_N=e=>typeof e=="string",y0=e=>{if(lk(e)){Up(e.length===4);const[t,n,i,o]=e;return zl(t,n,i,o)}else if(_N(e))return zN[e];return e},Yu=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function EN(e,t){let n=new Set,i=new Set,o=!1,u=!1;const l=new WeakSet;let f={delta:0,timestamp:0,isProcessing:!1};function d(p){l.has(p)&&(h.schedule(p),e()),p(f)}const h={schedule:(p,y=!1,x=!1)=>{const _=x&&o?n:i;return y&&l.add(p),_.has(p)||_.add(p),p},cancel:p=>{i.delete(p),l.delete(p)},process:p=>{if(f=p,o){u=!0;return}o=!0,[n,i]=[i,n],n.forEach(d),n.clear(),o=!1,u&&(u=!1,h.process(p))}};return h}const TN=40;function uk(e,t){let n=!1,i=!0;const o={delta:0,timestamp:0,isProcessing:!1},u=()=>n=!0,l=Yu.reduce((T,R)=>(T[R]=EN(u),T),{}),{setup:f,read:d,resolveKeyframes:h,preUpdate:p,update:y,preRender:x,render:b,postRender:_}=l,z=()=>{const T=Jr.useManualTiming?o.timestamp:performance.now();n=!1,Jr.useManualTiming||(o.delta=i?1e3/60:Math.max(Math.min(T-o.timestamp,TN),1)),o.timestamp=T,o.isProcessing=!0,f.process(o),d.process(o),h.process(o),p.process(o),y.process(o),x.process(o),b.process(o),_.process(o),o.isProcessing=!1,n&&t&&(i=!1,e(z))},A=()=>{n=!0,i=!0,o.isProcessing||e(z)};return{schedule:Yu.reduce((T,R)=>{const L=l[R];return T[R]=($,q=!1,P=!1)=>(n||A(),L.schedule($,q,P)),T},{}),cancel:T=>{for(let R=0;R<Yu.length;R++)l[Yu[R]].cancel(T)},state:o,steps:l}}const{schedule:ft,cancel:Ci,state:Qt,steps:Lh}=uk(typeof requestAnimationFrame<"u"?requestAnimationFrame:tr,!0);let mc;function CN(){mc=void 0}const fn={now:()=>(mc===void 0&&fn.set(Qt.isProcessing||Jr.useManualTiming?Qt.timestamp:performance.now()),mc),set:e=>{mc=e,queueMicrotask(CN)}},ck=e=>t=>typeof t=="string"&&t.startsWith(e),fk=ck("--"),AN=ck("var(--"),Ip=e=>AN(e)?jN.test(e.split("/*")[0].trim()):!1,jN=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function x0(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const $o={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},cl={...$o,transform:e=>kr(0,1,e)},Xu={...$o,default:1},Ws=e=>Math.round(e*1e5)/1e5,Hp=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function NN(e){return e==null}const ON=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Fp=(e,t)=>n=>!!(typeof n=="string"&&ON.test(n)&&n.startsWith(e)||t&&!NN(n)&&Object.prototype.hasOwnProperty.call(n,t)),dk=(e,t,n)=>i=>{if(typeof i!="string")return i;const[o,u,l,f]=i.match(Hp);return{[e]:parseFloat(o),[t]:parseFloat(u),[n]:parseFloat(l),alpha:f!==void 0?parseFloat(f):1}},RN=e=>kr(0,255,e),Uh={...$o,transform:e=>Math.round(RN(e))},fa={test:Fp("rgb","red"),parse:dk("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:i=1})=>"rgba("+Uh.transform(e)+", "+Uh.transform(t)+", "+Uh.transform(n)+", "+Ws(cl.transform(i))+")"};function MN(e){let t="",n="",i="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),i=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),i=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,i+=i,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:o?parseInt(o,16)/255:1}}const Mm={test:Fp("#"),parse:MN,transform:fa.transform},_l=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),_i=_l("deg"),wr=_l("%"),he=_l("px"),DN=_l("vh"),$N=_l("vw"),v0={...wr,parse:e=>wr.parse(e)/100,transform:e=>wr.transform(e*100)},mo={test:Fp("hsl","hue"),parse:dk("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:i=1})=>"hsla("+Math.round(e)+", "+wr.transform(Ws(t))+", "+wr.transform(Ws(n))+", "+Ws(cl.transform(i))+")"},Mt={test:e=>fa.test(e)||Mm.test(e)||mo.test(e),parse:e=>fa.test(e)?fa.parse(e):mo.test(e)?mo.parse(e):Mm.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?fa.transform(e):mo.transform(e),getAnimatableNone:e=>{const t=Mt.parse(e);return t.alpha=0,Mt.transform(t)}},LN=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function UN(e){return isNaN(e)&&typeof e=="string"&&(e.match(Hp)?.length||0)+(e.match(LN)?.length||0)>0}const hk="number",mk="color",VN="var",PN="var(",b0="${}",ZN=/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 fl(e){const t=e.toString(),n=[],i={color:[],number:[],var:[]},o=[];let u=0;const f=t.replace(ZN,d=>(Mt.test(d)?(i.color.push(u),o.push(mk),n.push(Mt.parse(d))):d.startsWith(PN)?(i.var.push(u),o.push(VN),n.push(d)):(i.number.push(u),o.push(hk),n.push(parseFloat(d))),++u,b0)).split(b0);return{values:n,split:f,indexes:i,types:o}}function pk(e){return fl(e).values}function gk(e){const{split:t,types:n}=fl(e),i=t.length;return o=>{let u="";for(let l=0;l<i;l++)if(u+=t[l],o[l]!==void 0){const f=n[l];f===hk?u+=Ws(o[l]):f===mk?u+=Mt.transform(o[l]):u+=o[l]}return u}}const BN=e=>typeof e=="number"?0:Mt.test(e)?Mt.getAnimatableNone(e):e;function IN(e){const t=pk(e);return gk(e)(t.map(BN))}const Ai={test:UN,parse:pk,createTransformer:gk,getAnimatableNone:IN};function Vh(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 HN({hue:e,saturation:t,lightness:n,alpha:i}){e/=360,t/=100,n/=100;let o=0,u=0,l=0;if(!t)o=u=l=n;else{const f=n<.5?n*(1+t):n+t-n*t,d=2*n-f;o=Vh(d,f,e+1/3),u=Vh(d,f,e),l=Vh(d,f,e-1/3)}return{red:Math.round(o*255),green:Math.round(u*255),blue:Math.round(l*255),alpha:i}}function Sc(e,t){return n=>n>0?t:e}const yt=(e,t,n)=>e+(t-e)*n,Ph=(e,t,n)=>{const i=e*e,o=n*(t*t-i)+i;return o<0?0:Math.sqrt(o)},FN=[Mm,fa,mo],qN=e=>FN.find(t=>t.test(e));function S0(e){const t=qN(e);if(!t)return!1;let n=t.parse(e);return t===mo&&(n=HN(n)),n}const w0=(e,t)=>{const n=S0(e),i=S0(t);if(!n||!i)return Sc(e,t);const o={...n};return u=>(o.red=Ph(n.red,i.red,u),o.green=Ph(n.green,i.green,u),o.blue=Ph(n.blue,i.blue,u),o.alpha=yt(n.alpha,i.alpha,u),fa.transform(o))},Dm=new Set(["none","hidden"]);function GN(e,t){return Dm.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function YN(e,t){return n=>yt(e,t,n)}function qp(e){return typeof e=="number"?YN:typeof e=="string"?Ip(e)?Sc:Mt.test(e)?w0:JN:Array.isArray(e)?yk:typeof e=="object"?Mt.test(e)?w0:XN:Sc}function yk(e,t){const n=[...e],i=n.length,o=e.map((u,l)=>qp(u)(u,t[l]));return u=>{for(let l=0;l<i;l++)n[l]=o[l](u);return n}}function XN(e,t){const n={...e,...t},i={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(i[o]=qp(e[o])(e[o],t[o]));return o=>{for(const u in i)n[u]=i[u](o);return n}}function KN(e,t){const n=[],i={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const u=t.types[o],l=e.indexes[u][i[u]],f=e.values[l]??0;n[o]=f,i[u]++}return n}const JN=(e,t)=>{const n=Ai.createTransformer(t),i=fl(e),o=fl(t);return i.indexes.var.length===o.indexes.var.length&&i.indexes.color.length===o.indexes.color.length&&i.indexes.number.length>=o.indexes.number.length?Dm.has(e)&&!o.values.length||Dm.has(t)&&!i.values.length?GN(e,t):kl(yk(KN(i,o),o.values),n):Sc(e,t)};function xk(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?yt(e,t,n):qp(e)(e,t)}const QN=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>ft.update(t,n),stop:()=>Ci(t),now:()=>Qt.isProcessing?Qt.timestamp:fn.now()}},vk=(e,t,n=10)=>{let i="";const o=Math.max(Math.round(t/n),2);for(let u=0;u<o;u++)i+=Math.round(e(u/(o-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},wc=2e4;function Gp(e){let t=0;const n=50;let i=e.next(t);for(;!i.done&&t<wc;)t+=n,i=e.next(t);return t>=wc?1/0:t}function WN(e,t=100,n){const i=n({...e,keyframes:[0,t]}),o=Math.min(Gp(i),wc);return{type:"keyframes",ease:u=>i.next(o*u).value/t,duration:er(o)}}const eO=5;function bk(e,t,n){const i=Math.max(t-eO,0);return Qw(n-e(i),t-i)}const zt={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},Zh=.001;function tO({duration:e=zt.duration,bounce:t=zt.bounce,velocity:n=zt.velocity,mass:i=zt.mass}){let o,u,l=1-t;l=kr(zt.minDamping,zt.maxDamping,l),e=kr(zt.minDuration,zt.maxDuration,er(e)),l<1?(o=h=>{const p=h*l,y=p*e,x=p-n,b=$m(h,l),_=Math.exp(-y);return Zh-x/b*_},u=h=>{const y=h*l*e,x=y*n+n,b=Math.pow(l,2)*Math.pow(h,2)*e,_=Math.exp(-y),z=$m(Math.pow(h,2),l);return(-o(h)+Zh>0?-1:1)*((x-b)*_)/z}):(o=h=>{const p=Math.exp(-h*e),y=(h-n)*e+1;return-Zh+p*y},u=h=>{const p=Math.exp(-h*e),y=(n-h)*(e*e);return p*y});const f=5/e,d=rO(o,u,f);if(e=Xr(e),isNaN(d))return{stiffness:zt.stiffness,damping:zt.damping,duration:e};{const h=Math.pow(d,2)*i;return{stiffness:h,damping:l*2*Math.sqrt(i*h),duration:e}}}const nO=12;function rO(e,t,n){let i=n;for(let o=1;o<nO;o++)i=i-e(i)/t(i);return i}function $m(e,t){return e*Math.sqrt(1-t*t)}const iO=["duration","bounce"],aO=["stiffness","damping","mass"];function k0(e,t){return t.some(n=>e[n]!==void 0)}function oO(e){let t={velocity:zt.velocity,stiffness:zt.stiffness,damping:zt.damping,mass:zt.mass,isResolvedFromDuration:!1,...e};if(!k0(e,aO)&&k0(e,iO))if(e.visualDuration){const n=e.visualDuration,i=2*Math.PI/(n*1.2),o=i*i,u=2*kr(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:zt.mass,stiffness:o,damping:u}}else{const n=tO(e);t={...t,...n,mass:zt.mass},t.isResolvedFromDuration=!0}return t}function kc(e=zt.visualDuration,t=zt.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:i,restDelta:o}=n;const u=n.keyframes[0],l=n.keyframes[n.keyframes.length-1],f={done:!1,value:u},{stiffness:d,damping:h,mass:p,duration:y,velocity:x,isResolvedFromDuration:b}=oO({...n,velocity:-er(n.velocity||0)}),_=x||0,z=h/(2*Math.sqrt(d*p)),A=l-u,j=er(Math.sqrt(d/p)),N=Math.abs(A)<5;i||(i=N?zt.restSpeed.granular:zt.restSpeed.default),o||(o=N?zt.restDelta.granular:zt.restDelta.default);let T;if(z<1){const L=$m(j,z);T=$=>{const q=Math.exp(-z*j*$);return l-q*((_+z*j*A)/L*Math.sin(L*$)+A*Math.cos(L*$))}}else if(z===1)T=L=>l-Math.exp(-j*L)*(A+(_+j*A)*L);else{const L=j*Math.sqrt(z*z-1);T=$=>{const q=Math.exp(-z*j*$),P=Math.min(L*$,300);return l-q*((_+z*j*A)*Math.sinh(P)+L*A*Math.cosh(P))/L}}const R={calculatedDuration:b&&y||null,next:L=>{const $=T(L);if(b)f.done=L>=y;else{let q=L===0?_:0;z<1&&(q=L===0?Xr(_):bk(T,L,$));const P=Math.abs(q)<=i,K=Math.abs(l-$)<=o;f.done=P&&K}return f.value=f.done?l:$,f},toString:()=>{const L=Math.min(Gp(R),wc),$=vk(q=>R.next(L*q).value,L,30);return L+"ms "+$},toTransition:()=>{}};return R}kc.applyToOptions=e=>{const t=WN(e,100,kc);return e.ease=t.ease,e.duration=Xr(t.duration),e.type="keyframes",e};function Lm({keyframes:e,velocity:t=0,power:n=.8,timeConstant:i=325,bounceDamping:o=10,bounceStiffness:u=500,modifyTarget:l,min:f,max:d,restDelta:h=.5,restSpeed:p}){const y=e[0],x={done:!1,value:y},b=P=>f!==void 0&&P<f||d!==void 0&&P>d,_=P=>f===void 0?d:d===void 0||Math.abs(f-P)<Math.abs(d-P)?f:d;let z=n*t;const A=y+z,j=l===void 0?A:l(A);j!==A&&(z=j-y);const N=P=>-z*Math.exp(-P/i),T=P=>j+N(P),R=P=>{const K=N(P),ie=T(P);x.done=Math.abs(K)<=h,x.value=x.done?j:ie};let L,$;const q=P=>{b(x.value)&&(L=P,$=kc({keyframes:[x.value,_(x.value)],velocity:bk(T,P,x.value),damping:o,stiffness:u,restDelta:h,restSpeed:p}))};return q(0),{calculatedDuration:null,next:P=>{let K=!1;return!$&&L===void 0&&(K=!0,R(P),q(P)),L!==void 0&&P>=L?$.next(P-L):(!K&&R(P),x)}}}function sO(e,t,n){const i=[],o=n||Jr.mix||xk,u=e.length-1;for(let l=0;l<u;l++){let f=o(e[l],e[l+1]);if(t){const d=Array.isArray(t)?t[l]||tr:t;f=kl(d,f)}i.push(f)}return i}function lO(e,t,{clamp:n=!0,ease:i,mixer:o}={}){const u=e.length;if(Up(u===t.length),u===1)return()=>t[0];if(u===2&&t[0]===t[1])return()=>t[1];const l=e[0]===e[1];e[0]>e[u-1]&&(e=[...e].reverse(),t=[...t].reverse());const f=sO(t,i,o),d=f.length,h=p=>{if(l&&p<e[0])return t[0];let y=0;if(d>1)for(;y<e.length-2&&!(p<e[y+1]);y++);const x=ul(e[y],e[y+1],p);return f[y](x)};return n?p=>h(kr(e[0],e[u-1],p)):h}function uO(e,t){const n=e[e.length-1];for(let i=1;i<=t;i++){const o=ul(0,t,i);e.push(yt(n,1,o))}}function cO(e){const t=[0];return uO(t,e.length-1),t}function fO(e,t){return e.map(n=>n*t)}function dO(e,t){return e.map(()=>t||sk).splice(0,e.length-1)}function el({duration:e=300,keyframes:t,times:n,ease:i="easeInOut"}){const o=kN(i)?i.map(y0):y0(i),u={done:!1,value:t[0]},l=fO(n&&n.length===t.length?n:cO(t),e),f=lO(l,t,{ease:Array.isArray(o)?o:dO(t,o)});return{calculatedDuration:e,next:d=>(u.value=f(d),u.done=d>=e,u)}}const hO=e=>e!==null;function Yp(e,{repeat:t,repeatType:n="loop"},i,o=1){const u=e.filter(hO),f=o<0||t&&n!=="loop"&&t%2===1?0:u.length-1;return!f||i===void 0?u[f]:i}const mO={decay:Lm,inertia:Lm,tween:el,keyframes:el,spring:kc};function Sk(e){typeof e.type=="string"&&(e.type=mO[e.type])}class Xp{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 pO=e=>e/100;class Kp extends Xp{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==fn.now()&&this.tick(fn.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Sk(t);const{type:n=el,repeat:i=0,repeatDelay:o=0,repeatType:u,velocity:l=0}=t;let{keyframes:f}=t;const d=n||el;d!==el&&typeof f[0]!="number"&&(this.mixKeyframes=kl(pO,xk(f[0],f[1])),f=[0,100]);const h=d({...t,keyframes:f});u==="mirror"&&(this.mirroredGenerator=d({...t,keyframes:[...f].reverse(),velocity:-l})),h.calculatedDuration===null&&(h.calculatedDuration=Gp(h));const{calculatedDuration:p}=h;this.calculatedDuration=p,this.resolvedDuration=p+o,this.totalDuration=this.resolvedDuration*(i+1)-o,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:i,totalDuration:o,mixKeyframes:u,mirroredGenerator:l,resolvedDuration:f,calculatedDuration:d}=this;if(this.startTime===null)return i.next(0);const{delay:h=0,keyframes:p,repeat:y,repeatType:x,repeatDelay:b,type:_,onUpdate:z,finalKeyframe:A}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const j=this.currentTime-h*(this.playbackSpeed>=0?1:-1),N=this.playbackSpeed>=0?j<0:j>o;this.currentTime=Math.max(j,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let T=this.currentTime,R=i;if(y){const P=Math.min(this.currentTime,o)/f;let K=Math.floor(P),ie=P%1;!ie&&P>=1&&(ie=1),ie===1&&K--,K=Math.min(K,y+1),K%2&&(x==="reverse"?(ie=1-ie,b&&(ie-=b/f)):x==="mirror"&&(R=l)),T=kr(0,1,ie)*f}const L=N?{done:!1,value:p[0]}:R.next(T);u&&(L.value=u(L.value));let{done:$}=L;!N&&d!==null&&($=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const q=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&$);return q&&_!==Lm&&(L.value=Yp(p,this.options,A,this.speed)),z&&z(L.value),q&&this.finish(),L}then(t,n){return this.finished.then(t,n)}get duration(){return er(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+er(t)}get time(){return er(this.currentTime)}set time(t){t=Xr(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),this.driver?.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=er(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=QN,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),this.options.onPlay?.();const i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=n??i),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(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}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){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function gO(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const da=e=>e*180/Math.PI,Um=e=>{const t=da(Math.atan2(e[1],e[0]));return Vm(t)},yO={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Um,rotateZ:Um,skewX:e=>da(Math.atan(e[1])),skewY:e=>da(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Vm=e=>(e=e%360,e<0&&(e+=360),e),z0=Um,_0=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),E0=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),xO={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:_0,scaleY:E0,scale:e=>(_0(e)+E0(e))/2,rotateX:e=>Vm(da(Math.atan2(e[6],e[5]))),rotateY:e=>Vm(da(Math.atan2(-e[2],e[0]))),rotateZ:z0,rotate:z0,skewX:e=>da(Math.atan(e[4])),skewY:e=>da(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Pm(e){return e.includes("scale")?1:0}function Zm(e,t){if(!e||e==="none")return Pm(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,o;if(n)i=xO,o=n;else{const f=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=yO,o=f}if(!o)return Pm(t);const u=i[t],l=o[1].split(",").map(bO);return typeof u=="function"?u(l):l[u]}const vO=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Zm(n,t)};function bO(e){return parseFloat(e.trim())}const Lo=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Uo=new Set(Lo),T0=e=>e===$o||e===he,SO=new Set(["x","y","z"]),wO=Lo.filter(e=>!SO.has(e));function kO(e){const t=[];return wO.forEach(n=>{const i=e.getValue(n);i!==void 0&&(t.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),t}const Ei={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})=>Zm(t,"x"),y:(e,{transform:t})=>Zm(t,"y")};Ei.translateX=Ei.x;Ei.translateY=Ei.y;const ha=new Set;let Bm=!1,Im=!1,Hm=!1;function wk(){if(Im){const e=Array.from(ha).filter(i=>i.needsMeasurement),t=new Set(e.map(i=>i.element)),n=new Map;t.forEach(i=>{const o=kO(i);o.length&&(n.set(i,o),i.render())}),e.forEach(i=>i.measureInitialState()),t.forEach(i=>{i.render();const o=n.get(i);o&&o.forEach(([u,l])=>{i.getValue(u)?.set(l)})}),e.forEach(i=>i.measureEndState()),e.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}Im=!1,Bm=!1,ha.forEach(e=>e.complete(Hm)),ha.clear()}function kk(){ha.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Im=!0)})}function zO(){Hm=!0,kk(),wk(),Hm=!1}class Jp{constructor(t,n,i,o,u,l=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=i,this.motionValue=o,this.element=u,this.isAsync=l}scheduleResolve(){this.state="scheduled",this.isAsync?(ha.add(this),Bm||(Bm=!0,ft.read(kk),ft.resolveKeyframes(wk))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:i,motionValue:o}=this;if(t[0]===null){const u=o?.get(),l=t[t.length-1];if(u!==void 0)t[0]=u;else if(i&&n){const f=i.readValue(n,l);f!=null&&(t[0]=f)}t[0]===void 0&&(t[0]=l),o&&u===void 0&&o.set(t[0])}gO(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),ha.delete(this)}cancel(){this.state==="scheduled"&&(ha.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const _O=e=>e.startsWith("--");function EO(e,t,n){_O(t)?e.style.setProperty(t,n):e.style[t]=n}const TO=Vp(()=>window.ScrollTimeline!==void 0),CO={};function AO(e,t){const n=Vp(e);return()=>CO[t]??n()}const zk=AO(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Xs=([e,t,n,i])=>`cubic-bezier(${e}, ${t}, ${n}, ${i})`,C0={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Xs([0,.65,.55,1]),circOut:Xs([.55,0,1,.45]),backIn:Xs([.31,.01,.66,-.59]),backOut:Xs([.33,1.53,.69,.99])};function _k(e,t){if(e)return typeof e=="function"?zk()?vk(e,t):"ease-out":lk(e)?Xs(e):Array.isArray(e)?e.map(n=>_k(n,t)||C0.easeOut):C0[e]}function jO(e,t,n,{delay:i=0,duration:o=300,repeat:u=0,repeatType:l="loop",ease:f="easeOut",times:d}={},h=void 0){const p={[t]:n};d&&(p.offset=d);const y=_k(f,o);Array.isArray(y)&&(p.easing=y);const x={delay:i,duration:o,easing:Array.isArray(y)?"linear":y,fill:"both",iterations:u+1,direction:l==="reverse"?"alternate":"normal"};return h&&(x.pseudoElement=h),e.animate(p,x)}function Ek(e){return typeof e=="function"&&"applyToOptions"in e}function NO({type:e,...t}){return Ek(e)&&zk()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class OO extends Xp{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:i,keyframes:o,pseudoElement:u,allowFlatten:l=!1,finalKeyframe:f,onComplete:d}=t;this.isPseudoElement=!!u,this.allowFlatten=l,this.options=t,Up(typeof t.type!="string");const h=NO(t);this.animation=jO(n,i,o,h,u),h.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!u){const p=Yp(o,this.options,f,this.speed);this.updateMotionValue?this.updateMotionValue(p):EO(n,i,p),this.animation.cancel()}d?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}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(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return er(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+er(t)}get time(){return er(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Xr(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 this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&TO()?(this.animation.timeline=t,tr):n(this)}}const Tk={anticipate:ik,backInOut:rk,circInOut:ok};function RO(e){return e in Tk}function MO(e){typeof e.ease=="string"&&RO(e.ease)&&(e.ease=Tk[e.ease])}const Bh=10;class DO extends OO{constructor(t){MO(t),Sk(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:i,onComplete:o,element:u,...l}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const f=new Kp({...l,autoplay:!1}),d=Math.max(Bh,fn.now()-this.startTime),h=kr(0,Bh,d-Bh);n.setWithVelocity(f.sample(Math.max(0,d-h)).value,f.sample(d).value,h),f.stop()}}const A0=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ai.test(e)||e==="0")&&!e.startsWith("url("));function $O(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 LO(e,t,n,i){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const u=e[e.length-1],l=A0(o,t),f=A0(u,t);return!l||!f?!1:$O(e)||(n==="spring"||Ek(n))&&i}function Fm(e){e.duration=0,e.type="keyframes"}const UO=new Set(["opacity","clipPath","filter","transform"]),VO=Vp(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function PO(e){const{motionValue:t,name:n,repeatDelay:i,repeatType:o,damping:u,type:l}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:d,transformTemplate:h}=t.owner.getProps();return VO()&&n&&UO.has(n)&&(n!=="transform"||!h)&&!d&&!i&&o!=="mirror"&&u!==0&&l!=="inertia"}const ZO=40;class BO extends Xp{constructor({autoplay:t=!0,delay:n=0,type:i="keyframes",repeat:o=0,repeatDelay:u=0,repeatType:l="loop",keyframes:f,name:d,motionValue:h,element:p,...y}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=fn.now();const x={autoplay:t,delay:n,type:i,repeat:o,repeatDelay:u,repeatType:l,name:d,motionValue:h,element:p,...y},b=p?.KeyframeResolver||Jp;this.keyframeResolver=new b(f,(_,z,A)=>this.onKeyframesResolved(_,z,x,!A),d,h,p),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,i,o){this.keyframeResolver=void 0;const{name:u,type:l,velocity:f,delay:d,isHandoff:h,onUpdate:p}=i;this.resolvedAt=fn.now(),LO(t,u,l,f)||((Jr.instantAnimations||!d)&&p?.(Yp(t,i,n)),t[0]=t[t.length-1],Fm(i),i.repeat=0);const x={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>ZO?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:t},b=!h&&PO(x),_=x.motionValue?.owner?.current,z=b?new DO({...x,element:_}):new Kp(x);z.finished.then(()=>{this.notifyFinished()}).catch(tr),this.pendingTimeline&&(this.stopTimeline=z.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=z}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),zO()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}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(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function Ck(e,t,n,i=0,o=1){const u=Array.from(e).sort((h,p)=>h.sortNodePosition(p)).indexOf(t),l=e.size,f=(l-1)*i;return typeof n=="function"?n(u,l):o===1?u*i:f-u*i}const IO=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function HO(e){const t=IO.exec(e);if(!t)return[,];const[,n,i,o]=t;return[`--${n??i}`,o]}function Ak(e,t,n=1){const[i,o]=HO(e);if(!i)return;const u=window.getComputedStyle(t).getPropertyValue(i);if(u){const l=u.trim();return Xw(l)?parseFloat(l):l}return Ip(o)?Ak(o,t,n+1):o}const FO={type:"spring",stiffness:500,damping:25,restSpeed:10},qO=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),GO={type:"keyframes",duration:.8},YO={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},XO=(e,{keyframes:t})=>t.length>2?GO:Uo.has(e)?e.startsWith("scale")?qO(t[1]):FO:YO,KO=e=>e!==null;function JO(e,{repeat:t,repeatType:n="loop"},i){const o=e.filter(KO),u=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[u]}function Qp(e,t){return e?.[t]??e?.default??e}function QO({when:e,delay:t,delayChildren:n,staggerChildren:i,staggerDirection:o,repeat:u,repeatType:l,repeatDelay:f,from:d,elapsed:h,...p}){return!!Object.keys(p).length}const Wp=(e,t,n,i={},o,u)=>l=>{const f=Qp(i,e)||{},d=f.delay||i.delay||0;let{elapsed:h=0}=i;h=h-Xr(d);const p={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...f,delay:-h,onUpdate:x=>{t.set(x),f.onUpdate&&f.onUpdate(x)},onComplete:()=>{l(),f.onComplete&&f.onComplete()},name:e,motionValue:t,element:u?void 0:o};QO(f)||Object.assign(p,XO(e,p)),p.duration&&(p.duration=Xr(p.duration)),p.repeatDelay&&(p.repeatDelay=Xr(p.repeatDelay)),p.from!==void 0&&(p.keyframes[0]=p.from);let y=!1;if((p.type===!1||p.duration===0&&!p.repeatDelay)&&(Fm(p),p.delay===0&&(y=!0)),(Jr.instantAnimations||Jr.skipAnimations)&&(y=!0,Fm(p),p.delay=0),p.allowFlatten=!f.type&&!f.ease,y&&!u&&t.get()!==void 0){const x=JO(p.keyframes,f);if(x!==void 0){ft.update(()=>{p.onUpdate(x),p.onComplete()});return}}return f.isSync?new Kp(p):new BO(p)};function j0(e){const t=[{},{}];return e?.values.forEach((n,i)=>{t[0][i]=n.get(),t[1][i]=n.getVelocity()}),t}function eg(e,t,n,i){if(typeof t=="function"){const[o,u]=j0(i);t=t(n!==void 0?n:e.custom,o,u)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,u]=j0(i);t=t(n!==void 0?n:e.custom,o,u)}return t}function ko(e,t,n){const i=e.getProps();return eg(i,t,n!==void 0?n:i.custom,e)}const jk=new Set(["width","height","top","left","right","bottom",...Lo]),N0=30,WO=e=>!isNaN(parseFloat(e));class e4{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{const o=fn.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const u of this.dependents)u.dirty()},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=WO(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 Pp);const i=this.events[t].add(n);return t==="change"?()=>{i(),ft.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,i){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.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>N0)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,N0);return Qw(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(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ao(e,t){return new e4(e,t)}const qm=e=>Array.isArray(e);function t4(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ao(n))}function n4(e){return qm(e)?e[e.length-1]||0:e}function r4(e,t){const n=ko(e,t);let{transitionEnd:i={},transition:o={},...u}=n||{};u={...u,...i};for(const l in u){const f=n4(u[l]);t4(e,l,f)}}const nn=e=>!!(e&&e.getVelocity);function i4(e){return!!(nn(e)&&e.add)}function Gm(e,t){const n=e.getValue("willChange");if(i4(n))return n.add(t);if(!n&&Jr.WillChange){const i=new Jr.WillChange("auto");e.addValue("willChange",i),i.add(t)}}function tg(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const a4="framerAppearId",Nk="data-"+tg(a4);function Ok(e){return e.props[Nk]}function o4({protectedKeys:e,needsAnimating:t},n){const i=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,i}function Rk(e,t,{delay:n=0,transitionOverride:i,type:o}={}){let{transition:u=e.getDefaultTransition(),transitionEnd:l,...f}=t;const d=u?.reduceMotion;i&&(u=i);const h=[],p=o&&e.animationState&&e.animationState.getState()[o];for(const y in f){const x=e.getValue(y,e.latestValues[y]??null),b=f[y];if(b===void 0||p&&o4(p,y))continue;const _={delay:n,...Qp(u||{},y)},z=x.get();if(z!==void 0&&!x.isAnimating&&!Array.isArray(b)&&b===z&&!_.velocity)continue;let A=!1;if(window.MotionHandoffAnimation){const T=Ok(e);if(T){const R=window.MotionHandoffAnimation(T,y,ft);R!==null&&(_.startTime=R,A=!0)}}Gm(e,y);const j=d??e.shouldReduceMotion;x.start(Wp(y,x,b,j&&jk.has(y)?{type:!1}:_,e,A));const N=x.animation;N&&h.push(N)}return l&&Promise.all(h).then(()=>{ft.update(()=>{l&&r4(e,l)})}),h}function Ym(e,t,n={}){const i=ko(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const u=i?()=>Promise.all(Rk(e,i,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(d=0)=>{const{delayChildren:h=0,staggerChildren:p,staggerDirection:y}=o;return s4(e,t,d,h,p,y,n)}:()=>Promise.resolve(),{when:f}=o;if(f){const[d,h]=f==="beforeChildren"?[u,l]:[l,u];return d().then(()=>h())}else return Promise.all([u(),l(n.delay)])}function s4(e,t,n=0,i=0,o=0,u=1,l){const f=[];for(const d of e.variantChildren)d.notify("AnimationStart",t),f.push(Ym(d,t,{...l,delay:n+(typeof i=="function"?0:i)+Ck(e.variantChildren,d,i,o,u)}).then(()=>d.notify("AnimationComplete",t)));return Promise.all(f)}function l4(e,t,n={}){e.notify("AnimationStart",t);let i;if(Array.isArray(t)){const o=t.map(u=>Ym(e,u,n));i=Promise.all(o)}else if(typeof t=="string")i=Ym(e,t,n);else{const o=typeof t=="function"?ko(e,t,n.custom):t;i=Promise.all(Rk(e,o,n))}return i.then(()=>{e.notify("AnimationComplete",t)})}const u4={test:e=>e==="auto",parse:e=>e},Mk=e=>t=>t.test(e),Dk=[$o,he,wr,_i,$N,DN,u4],O0=e=>Dk.find(Mk(e));function c4(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Jw(e):!0}const f4=new Set(["brightness","contrast","saturate","opacity"]);function d4(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[i]=n.match(Hp)||[];if(!i)return e;const o=n.replace(i,"");let u=f4.has(t)?1:0;return i!==n&&(u*=100),t+"("+u+o+")"}const h4=/\b([a-z-]*)\(.*?\)/gu,Xm={...Ai,getAnimatableNone:e=>{const t=e.match(h4);return t?t.map(d4).join(" "):e}},R0={...$o,transform:Math.round},m4={rotate:_i,rotateX:_i,rotateY:_i,rotateZ:_i,scale:Xu,scaleX:Xu,scaleY:Xu,scaleZ:Xu,skew:_i,skewX:_i,skewY:_i,distance:he,translateX:he,translateY:he,translateZ:he,x:he,y:he,z:he,perspective:he,transformPerspective:he,opacity:cl,originX:v0,originY:v0,originZ:he},ng={borderWidth:he,borderTopWidth:he,borderRightWidth:he,borderBottomWidth:he,borderLeftWidth:he,borderRadius:he,borderTopLeftRadius:he,borderTopRightRadius:he,borderBottomRightRadius:he,borderBottomLeftRadius:he,width:he,maxWidth:he,height:he,maxHeight:he,top:he,right:he,bottom:he,left:he,inset:he,insetBlock:he,insetBlockStart:he,insetBlockEnd:he,insetInline:he,insetInlineStart:he,insetInlineEnd:he,padding:he,paddingTop:he,paddingRight:he,paddingBottom:he,paddingLeft:he,paddingBlock:he,paddingBlockStart:he,paddingBlockEnd:he,paddingInline:he,paddingInlineStart:he,paddingInlineEnd:he,margin:he,marginTop:he,marginRight:he,marginBottom:he,marginLeft:he,marginBlock:he,marginBlockStart:he,marginBlockEnd:he,marginInline:he,marginInlineStart:he,marginInlineEnd:he,fontSize:he,backgroundPositionX:he,backgroundPositionY:he,...m4,zIndex:R0,fillOpacity:cl,strokeOpacity:cl,numOctaves:R0},p4={...ng,color:Mt,backgroundColor:Mt,outlineColor:Mt,fill:Mt,stroke:Mt,borderColor:Mt,borderTopColor:Mt,borderRightColor:Mt,borderBottomColor:Mt,borderLeftColor:Mt,filter:Xm,WebkitFilter:Xm},$k=e=>p4[e];function Lk(e,t){let n=$k(e);return n!==Xm&&(n=Ai),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const g4=new Set(["auto","none","0"]);function y4(e,t,n){let i=0,o;for(;i<e.length&&!o;){const u=e[i];typeof u=="string"&&!g4.has(u)&&fl(u).values.length&&(o=e[i]),i++}if(o&&n)for(const u of t)e[u]=Lk(n,o)}class x4 extends Jp{constructor(t,n,i,o,u){super(t,n,i,o,u,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:i}=this;if(!n||!n.current)return;super.readKeyframes();for(let p=0;p<t.length;p++){let y=t[p];if(typeof y=="string"&&(y=y.trim(),Ip(y))){const x=Ak(y,n.current);x!==void 0&&(t[p]=x),p===t.length-1&&(this.finalKeyframe=y)}}if(this.resolveNoneKeyframes(),!jk.has(i)||t.length!==2)return;const[o,u]=t,l=O0(o),f=O0(u),d=x0(o),h=x0(u);if(d!==h&&Ei[i]){this.needsMeasurement=!0;return}if(l!==f)if(T0(l)&&T0(f))for(let p=0;p<t.length;p++){const y=t[p];typeof y=="string"&&(t[p]=parseFloat(y))}else Ei[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,i=[];for(let o=0;o<t.length;o++)(t[o]===null||c4(t[o]))&&i.push(o);i.length&&y4(t,i,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:i}=this;if(!t||!t.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ei[i](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(i,o).jump(o,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:i}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const u=i.length-1,l=i[u];i[u]=Ei[n](t.measureViewportBox(),window.getComputedStyle(t.current)),l!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=l),this.removedTransforms?.length&&this.removedTransforms.forEach(([f,d])=>{t.getValue(f).set(d)}),this.resolveNoneKeyframes()}}function v4(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let i=document;const o=n?.[e]??i.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e).filter(i=>i!=null)}const Uk=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Km(e){return Kw(e)&&"offsetHeight"in e}const{schedule:rg}=uk(queueMicrotask,!1),cr={x:!1,y:!1};function Vk(){return cr.x||cr.y}function b4(e){return e==="x"||e==="y"?cr[e]?null:(cr[e]=!0,()=>{cr[e]=!1}):cr.x||cr.y?null:(cr.x=cr.y=!0,()=>{cr.x=cr.y=!1})}function Pk(e,t){const n=v4(e),i=new AbortController,o={passive:!0,...t,signal:i.signal};return[n,o,()=>i.abort()]}function M0(e){return!(e.pointerType==="touch"||Vk())}function S4(e,t,n={}){const[i,o,u]=Pk(e,n),l=f=>{if(!M0(f))return;const{target:d}=f,h=t(d,f);if(typeof h!="function"||!d)return;const p=y=>{M0(y)&&(h(y),d.removeEventListener("pointerleave",p))};d.addEventListener("pointerleave",p,o)};return i.forEach(f=>{f.addEventListener("pointerenter",l,o)}),u}const Zk=(e,t)=>t?e===t?!0:Zk(e,t.parentElement):!1,ig=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,w4=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Bk(e){return w4.has(e.tagName)||e.isContentEditable===!0}const pc=new WeakSet;function D0(e){return t=>{t.key==="Enter"&&e(t)}}function Ih(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const k4=(e,t)=>{const n=e.currentTarget;if(!n)return;const i=D0(()=>{if(pc.has(n))return;Ih(n,"down");const o=D0(()=>{Ih(n,"up")}),u=()=>Ih(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",u,t)});n.addEventListener("keydown",i,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),t)};function $0(e){return ig(e)&&!Vk()}function z4(e,t,n={}){const[i,o,u]=Pk(e,n),l=f=>{const d=f.currentTarget;if(!$0(f))return;pc.add(d);const h=t(d,f),p=(b,_)=>{window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",x),pc.has(d)&&pc.delete(d),$0(b)&&typeof h=="function"&&h(b,{success:_})},y=b=>{p(b,d===window||d===document||n.useGlobalTarget||Zk(d,b.target))},x=b=>{p(b,!1)};window.addEventListener("pointerup",y,o),window.addEventListener("pointercancel",x,o)};return i.forEach(f=>{(n.useGlobalTarget?window:f).addEventListener("pointerdown",l,o),Km(f)&&(f.addEventListener("focus",h=>k4(h,o)),!Bk(f)&&!f.hasAttribute("tabindex")&&(f.tabIndex=0))}),u}function Ik(e){return Kw(e)&&"ownerSVGElement"in e}function _4(e){return Ik(e)&&e.tagName==="svg"}const E4=[...Dk,Mt,Ai],T4=e=>E4.find(Mk(e)),L0=()=>({translate:0,scale:1,origin:0,originPoint:0}),po=()=>({x:L0(),y:L0()}),U0=()=>({min:0,max:0}),It=()=>({x:U0(),y:U0()}),Jm={current:null},Hk={current:!1},C4=typeof window<"u";function A4(){if(Hk.current=!0,!!C4)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Jm.current=e.matches;e.addEventListener("change",t),t()}else Jm.current=!1}const j4=new WeakMap;function Ic(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function dl(e){return typeof e=="string"||Array.isArray(e)}const ag=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],og=["initial",...ag];function Hc(e){return Ic(e.animate)||og.some(t=>dl(e[t]))}function Fk(e){return!!(Hc(e)||e.variants)}function N4(e,t,n){for(const i in t){const o=t[i],u=n[i];if(nn(o))e.addValue(i,o);else if(nn(u))e.addValue(i,Ao(o,{owner:e}));else if(u!==o)if(e.hasValue(i)){const l=e.getValue(i);l.liveStyle===!0?l.jump(o):l.hasAnimated||l.set(o)}else{const l=e.getStaticValue(i);e.addValue(i,Ao(l!==void 0?l:o,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const V0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let zc={};function qk(e){zc=e}function O4(){return zc}class R4{scrapeMotionValuesFromProps(t,n,i){return{}}constructor({parent:t,props:n,presenceContext:i,reducedMotionConfig:o,blockInitialAnimation:u,visualState:l},f={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Jp,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,ft.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=i,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=f,this.blockInitialAnimation=!!u,this.isControllingVariants=Hc(n),this.isVariantNode=Fk(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:p,...y}=this.scrapeMotionValuesFromProps(n,{},this);for(const x in y){const b=y[x];d[x]!==void 0&&nn(b)&&b.set(d[x])}}mount(t){this.current=t,j4.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,i)=>this.bindToMotionValue(i,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Hk.current||A4(),this.shouldReduceMotion=Jm.current),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Ci(this.notifyUpdate),Ci(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(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}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const i=Uo.has(t);i&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&ft.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let u;typeof window<"u"&&window.MotionCheckAppearSync&&(u=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),u&&u(),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 zc){const n=zc[t];if(!n)continue;const{isEnabled:i,Feature:o}=n;if(!this.features[t]&&o&&i(this.props)&&(this.features[t]=new o(this)),this.features[t]){const u=this.features[t];u.isMounted?u.update():(u.mount(),u.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):It()}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 i=0;i<V0.length;i++){const o=V0[i];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const u="on"+o,l=t[u];l&&(this.propEventSubscriptions[o]=this.on(o,l))}this.prevMotionValues=N4(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 i=this.values.get(t);n!==i&&(i&&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 i=this.values.get(t);return i===void 0&&n!==void 0&&(i=Ao(n===null?void 0:n,{owner:this}),this.addValue(t,i)),i}readValue(t,n){let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(Xw(i)||Jw(i))?i=parseFloat(i):!T4(i)&&Ai.test(n)&&(i=Lk(t,n)),this.setBaseTarget(t,nn(i)?i.get():i)),nn(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let i;if(typeof n=="string"||typeof n=="object"){const u=eg(this.props,n,this.presenceContext?.custom);u&&(i=u[t])}if(n&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!nn(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Pp),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){rg.render(this.render)}}class Gk extends R4{constructor(){super(...arguments),this.KeyframeResolver=x4}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const i=t.style;return i?i[n]:void 0}removeValueFromRenderState(t,{vars:n,style:i}){delete n[t],delete i[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;nn(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Oi{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Yk({top:e,left:t,right:n,bottom:i}){return{x:{min:t,max:n},y:{min:e,max:i}}}function M4({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function D4(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),i=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function Hh(e){return e===void 0||e===1}function Qm({scale:e,scaleX:t,scaleY:n}){return!Hh(e)||!Hh(t)||!Hh(n)}function la(e){return Qm(e)||Xk(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Xk(e){return P0(e.x)||P0(e.y)}function P0(e){return e&&e!=="0%"}function _c(e,t,n){const i=e-n,o=t*i;return n+o}function Z0(e,t,n,i,o){return o!==void 0&&(e=_c(e,o,i)),_c(e,n,i)+t}function Wm(e,t=0,n=1,i,o){e.min=Z0(e.min,t,n,i,o),e.max=Z0(e.max,t,n,i,o)}function Kk(e,{x:t,y:n}){Wm(e.x,t.translate,t.scale,t.originPoint),Wm(e.y,n.translate,n.scale,n.originPoint)}const B0=.999999999999,I0=1.0000000000001;function $4(e,t,n,i=!1){const o=n.length;if(!o)return;t.x=t.y=1;let u,l;for(let f=0;f<o;f++){u=n[f],l=u.projectionDelta;const{visualElement:d}=u.options;d&&d.props.style&&d.props.style.display==="contents"||(i&&u.options.layoutScroll&&u.scroll&&u!==u.root&&yo(e,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),l&&(t.x*=l.x.scale,t.y*=l.y.scale,Kk(e,l)),i&&la(u.latestValues)&&yo(e,u.latestValues))}t.x<I0&&t.x>B0&&(t.x=1),t.y<I0&&t.y>B0&&(t.y=1)}function go(e,t){e.min=e.min+t,e.max=e.max+t}function H0(e,t,n,i,o=.5){const u=yt(e.min,e.max,o);Wm(e,t,n,u,i)}function yo(e,t){H0(e.x,t.x,t.scaleX,t.scale,t.originX),H0(e.y,t.y,t.scaleY,t.scale,t.originY)}function Jk(e,t){return Yk(D4(e.getBoundingClientRect(),t))}function L4(e,t,n){const i=Jk(e,n),{scroll:o}=t;return o&&(go(i.x,o.offset.x),go(i.y,o.offset.y)),i}const U4={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},V4=Lo.length;function P4(e,t,n){let i="",o=!0;for(let u=0;u<V4;u++){const l=Lo[u],f=e[l];if(f===void 0)continue;let d=!0;if(typeof f=="number")d=f===(l.startsWith("scale")?1:0);else{const h=parseFloat(f);d=l.startsWith("scale")?h===1:h===0}if(!d||n){const h=Uk(f,ng[l]);if(!d){o=!1;const p=U4[l]||l;i+=`${p}(${h}) `}n&&(t[l]=h)}}return i=i.trim(),n?i=n(t,o?"":i):o&&(i="none"),i}function sg(e,t,n){const{style:i,vars:o,transformOrigin:u}=e;let l=!1,f=!1;for(const d in t){const h=t[d];if(Uo.has(d)){l=!0;continue}else if(fk(d)){o[d]=h;continue}else{const p=Uk(h,ng[d]);d.startsWith("origin")?(f=!0,u[d]=p):i[d]=p}}if(t.transform||(l||n?i.transform=P4(t,e.transform,n):i.transform&&(i.transform="none")),f){const{originX:d="50%",originY:h="50%",originZ:p=0}=u;i.transformOrigin=`${d} ${h} ${p}`}}function Qk(e,{style:t,vars:n},i,o){const u=e.style;let l;for(l in t)u[l]=t[l];o?.applyProjectionStyles(u,i);for(l in n)u.setProperty(l,n[l])}function F0(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ps={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(he.test(e))e=parseFloat(e);else return e;const n=F0(e,t.target.x),i=F0(e,t.target.y);return`${n}% ${i}%`}},Z4={correct:(e,{treeScale:t,projectionDelta:n})=>{const i=e,o=Ai.parse(e);if(o.length>5)return i;const u=Ai.createTransformer(e),l=typeof o[0]!="number"?1:0,f=n.x.scale*t.x,d=n.y.scale*t.y;o[0+l]/=f,o[1+l]/=d;const h=yt(f,d,.5);return typeof o[2+l]=="number"&&(o[2+l]/=h),typeof o[3+l]=="number"&&(o[3+l]/=h),u(o)}},ep={borderRadius:{...Ps,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ps,borderTopRightRadius:Ps,borderBottomLeftRadius:Ps,borderBottomRightRadius:Ps,boxShadow:Z4};function Wk(e,{layout:t,layoutId:n}){return Uo.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!ep[e]||e==="opacity")}function lg(e,t,n){const i=e.style,o=t?.style,u={};if(!i)return u;for(const l in i)(nn(i[l])||o&&nn(o[l])||Wk(l,e)||n?.getValue(l)?.liveStyle!==void 0)&&(u[l]=i[l]);return u}function B4(e){return window.getComputedStyle(e)}class I4 extends Gk{constructor(){super(...arguments),this.type="html",this.renderInstance=Qk}readValueFromInstance(t,n){if(Uo.has(n))return this.projection?.isProjecting?Pm(n):vO(t,n);{const i=B4(t),o=(fk(n)?i.getPropertyValue(n):i[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Jk(t,n)}build(t,n,i){sg(t,n,i.transformTemplate)}scrapeMotionValuesFromProps(t,n,i){return lg(t,n,i)}}const H4={offset:"stroke-dashoffset",array:"stroke-dasharray"},F4={offset:"strokeDashoffset",array:"strokeDasharray"};function q4(e,t,n=1,i=0,o=!0){e.pathLength=1;const u=o?H4:F4;e[u.offset]=`${-i}`,e[u.array]=`${t} ${n}`}const G4=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function ez(e,{attrX:t,attrY:n,attrScale:i,pathLength:o,pathSpacing:u=1,pathOffset:l=0,...f},d,h,p){if(sg(e,f,h),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:y,style:x}=e;y.transform&&(x.transform=y.transform,delete y.transform),(x.transform||y.transformOrigin)&&(x.transformOrigin=y.transformOrigin??"50% 50%",delete y.transformOrigin),x.transform&&(x.transformBox=p?.transformBox??"fill-box",delete y.transformBox);for(const b of G4)y[b]!==void 0&&(x[b]=y[b],delete y[b]);t!==void 0&&(y.x=t),n!==void 0&&(y.y=n),i!==void 0&&(y.scale=i),o!==void 0&&q4(y,o,u,l,!1)}const tz=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"]),nz=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Y4(e,t,n,i){Qk(e,t,void 0,i);for(const o in t.attrs)e.setAttribute(tz.has(o)?o:tg(o),t.attrs[o])}function rz(e,t,n){const i=lg(e,t,n);for(const o in e)if(nn(e[o])||nn(t[o])){const u=Lo.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;i[u]=e[o]}return i}class X4 extends Gk{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=It}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Uo.has(n)){const i=$k(n);return i&&i.default||0}return n=tz.has(n)?n:tg(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,i){return rz(t,n,i)}build(t,n,i){ez(t,n,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(t,n,i,o){Y4(t,n,i,o)}mount(t){this.isSVGTag=nz(t.tagName),super.mount(t)}}const K4=og.length;function iz(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?iz(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<K4;n++){const i=og[n],o=e.props[i];(dl(o)||o===!1)&&(t[i]=o)}return t}function az(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let i=0;i<n;i++)if(t[i]!==e[i])return!1;return!0}const J4=[...ag].reverse(),Q4=ag.length;function W4(e){return t=>Promise.all(t.map(({animation:n,options:i})=>l4(e,n,i)))}function eR(e){let t=W4(e),n=q0(),i=!0;const o=d=>(h,p)=>{const y=ko(e,p,d==="exit"?e.presenceContext?.custom:void 0);if(y){const{transition:x,transitionEnd:b,..._}=y;h={...h,..._,...b}}return h};function u(d){t=d(e)}function l(d){const{props:h}=e,p=iz(e.parent)||{},y=[],x=new Set;let b={},_=1/0;for(let A=0;A<Q4;A++){const j=J4[A],N=n[j],T=h[j]!==void 0?h[j]:p[j],R=dl(T),L=j===d?N.isActive:null;L===!1&&(_=A);let $=T===p[j]&&T!==h[j]&&R;if($&&i&&e.manuallyAnimateOnMount&&($=!1),N.protectedKeys={...b},!N.isActive&&L===null||!T&&!N.prevProp||Ic(T)||typeof T=="boolean")continue;const q=tR(N.prevProp,T);let P=q||j===d&&N.isActive&&!$&&R||A>_&&R,K=!1;const ie=Array.isArray(T)?T:[T];let ne=ie.reduce(o(j),{});L===!1&&(ne={});const{prevResolvedValues:oe={}}=N,we={...oe,...ne},ue=X=>{P=!0,x.has(X)&&(K=!0,x.delete(X)),N.needsAnimating[X]=!0;const G=e.getValue(X);G&&(G.liveStyle=!1)};for(const X in we){const G=ne[X],ve=oe[X];if(b.hasOwnProperty(X))continue;let O=!1;qm(G)&&qm(ve)?O=!az(G,ve):O=G!==ve,O?G!=null?ue(X):x.add(X):G!==void 0&&x.has(X)?ue(X):N.protectedKeys[X]=!0}N.prevProp=T,N.prevResolvedValues=ne,N.isActive&&(b={...b,...ne}),i&&e.blockInitialAnimation&&(P=!1);const re=$&&q;P&&(!re||K)&&y.push(...ie.map(X=>{const G={type:j};if(typeof X=="string"&&i&&!re&&e.manuallyAnimateOnMount&&e.parent){const{parent:ve}=e,O=ko(ve,X);if(ve.enteringChildren&&O){const{delayChildren:C}=O.transition||{};G.delay=Ck(ve.enteringChildren,e,C)}}return{animation:X,options:G}}))}if(x.size){const A={};if(typeof h.initial!="boolean"){const j=ko(e,Array.isArray(h.initial)?h.initial[0]:h.initial);j&&j.transition&&(A.transition=j.transition)}x.forEach(j=>{const N=e.getBaseTarget(j),T=e.getValue(j);T&&(T.liveStyle=!0),A[j]=N??null}),y.push({animation:A})}let z=!!y.length;return i&&(h.initial===!1||h.initial===h.animate)&&!e.manuallyAnimateOnMount&&(z=!1),i=!1,z?t(y):Promise.resolve()}function f(d,h){if(n[d].isActive===h)return Promise.resolve();e.variantChildren?.forEach(y=>y.animationState?.setActive(d,h)),n[d].isActive=h;const p=l(d);for(const y in n)n[y].protectedKeys={};return p}return{animateChanges:l,setActive:f,setAnimateFunction:u,getState:()=>n,reset:()=>{n=q0()}}}function tR(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!az(t,e):!1}function ra(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function q0(){return{animate:ra(!0),whileInView:ra(),whileHover:ra(),whileTap:ra(),whileDrag:ra(),whileFocus:ra(),exit:ra()}}function G0(e,t){e.min=t.min,e.max=t.max}function lr(e,t){G0(e.x,t.x),G0(e.y,t.y)}function Y0(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const oz=1e-4,nR=1-oz,rR=1+oz,sz=.01,iR=0-sz,aR=0+sz;function dn(e){return e.max-e.min}function oR(e,t,n){return Math.abs(e-t)<=n}function X0(e,t,n,i=.5){e.origin=i,e.originPoint=yt(t.min,t.max,e.origin),e.scale=dn(n)/dn(t),e.translate=yt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=nR&&e.scale<=rR||isNaN(e.scale))&&(e.scale=1),(e.translate>=iR&&e.translate<=aR||isNaN(e.translate))&&(e.translate=0)}function tl(e,t,n,i){X0(e.x,t.x,n.x,i?i.originX:void 0),X0(e.y,t.y,n.y,i?i.originY:void 0)}function K0(e,t,n){e.min=n.min+t.min,e.max=e.min+dn(t)}function sR(e,t,n){K0(e.x,t.x,n.x),K0(e.y,t.y,n.y)}function J0(e,t,n){e.min=t.min-n.min,e.max=e.min+dn(t)}function Ec(e,t,n){J0(e.x,t.x,n.x),J0(e.y,t.y,n.y)}function Q0(e,t,n,i,o){return e-=t,e=_c(e,1/n,i),o!==void 0&&(e=_c(e,1/o,i)),e}function lR(e,t=0,n=1,i=.5,o,u=e,l=e){if(wr.test(t)&&(t=parseFloat(t),t=yt(l.min,l.max,t/100)-l.min),typeof t!="number")return;let f=yt(u.min,u.max,i);e===u&&(f-=t),e.min=Q0(e.min,t,n,f,o),e.max=Q0(e.max,t,n,f,o)}function W0(e,t,[n,i,o],u,l){lR(e,t[n],t[i],t[o],t.scale,u,l)}const uR=["x","scaleX","originX"],cR=["y","scaleY","originY"];function e1(e,t,n,i){W0(e.x,t,uR,n?n.x:void 0,i?i.x:void 0),W0(e.y,t,cR,n?n.y:void 0,i?i.y:void 0)}function t1(e){return e.translate===0&&e.scale===1}function lz(e){return t1(e.x)&&t1(e.y)}function n1(e,t){return e.min===t.min&&e.max===t.max}function fR(e,t){return n1(e.x,t.x)&&n1(e.y,t.y)}function r1(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function uz(e,t){return r1(e.x,t.x)&&r1(e.y,t.y)}function i1(e){return dn(e.x)/dn(e.y)}function a1(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Kn(e){return[e("x"),e("y")]}function dR(e,t,n){let i="";const o=e.x.translate/t.x,u=e.y.translate/t.y,l=n?.z||0;if((o||u||l)&&(i=`translate3d(${o}px, ${u}px, ${l}px) `),(t.x!==1||t.y!==1)&&(i+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:h,rotate:p,rotateX:y,rotateY:x,skewX:b,skewY:_}=n;h&&(i=`perspective(${h}px) ${i}`),p&&(i+=`rotate(${p}deg) `),y&&(i+=`rotateX(${y}deg) `),x&&(i+=`rotateY(${x}deg) `),b&&(i+=`skewX(${b}deg) `),_&&(i+=`skewY(${_}deg) `)}const f=e.x.scale*t.x,d=e.y.scale*t.y;return(f!==1||d!==1)&&(i+=`scale(${f}, ${d})`),i||"none"}const cz=["TopLeft","TopRight","BottomLeft","BottomRight"],hR=cz.length,o1=e=>typeof e=="string"?parseFloat(e):e,s1=e=>typeof e=="number"||he.test(e);function mR(e,t,n,i,o,u){o?(e.opacity=yt(0,n.opacity??1,pR(i)),e.opacityExit=yt(t.opacity??1,0,gR(i))):u&&(e.opacity=yt(t.opacity??1,n.opacity??1,i));for(let l=0;l<hR;l++){const f=`border${cz[l]}Radius`;let d=l1(t,f),h=l1(n,f);if(d===void 0&&h===void 0)continue;d||(d=0),h||(h=0),d===0||h===0||s1(d)===s1(h)?(e[f]=Math.max(yt(o1(d),o1(h),i),0),(wr.test(h)||wr.test(d))&&(e[f]+="%")):e[f]=h}(t.rotate||n.rotate)&&(e.rotate=yt(t.rotate||0,n.rotate||0,i))}function l1(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const pR=fz(0,.5,ak),gR=fz(.5,.95,tr);function fz(e,t,n){return i=>i<e?0:i>t?1:n(ul(e,t,i))}function yR(e,t,n){const i=nn(e)?e:Ao(e);return i.start(Wp("",i,t,n)),i.animation}function hl(e,t,n,i={passive:!0}){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n)}const xR=(e,t)=>e.depth-t.depth;class vR{constructor(){this.children=[],this.isDirty=!1}add(t){$p(this.children,t),this.isDirty=!0}remove(t){Lp(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(xR),this.isDirty=!1,this.children.forEach(t)}}function bR(e,t){const n=fn.now(),i=({timestamp:o})=>{const u=o-n;u>=t&&(Ci(i),e(u-t))};return ft.setup(i,!0),()=>Ci(i)}function gc(e){return nn(e)?e.get():e}class SR{constructor(){this.members=[]}add(t){$p(this.members,t),t.scheduleRender()}remove(t){if(Lp(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(o=>t===o);if(n===0)return!1;let i;for(let o=n;o>=0;o--){const u=this.members[o];if(u.isPresent!==!1){i=u;break}}return i?(this.promote(i),!0):!1}promote(t,n){const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender();const o=i.options.layoutDependency,u=t.options.layoutDependency;o!==void 0&&u!==void 0&&o===u||(t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0));const{crossfade:f}=t.options;f===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:i}=t;n.onExitComplete&&n.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const yc={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Fh=["","X","Y","Z"],wR=1e3;let kR=0;function qh(e,t,n,i){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),i&&(i[e]=0))}function dz(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Ok(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:u}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ft,!(o||u))}const{parent:i}=e;i&&!i.hasCheckedOptimisedAppear&&dz(i)}function hz({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:i,resetTransform:o}){return class{constructor(l={},f=t?.()){this.id=kR++,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.layoutVersion=0,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(ER),this.nodes.forEach(jR),this.nodes.forEach(NR),this.nodes.forEach(TR)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=l,this.root=f?f.root||f:this,this.path=f?[...f.path,f]:[],this.parent=f,this.depth=f?f.depth+1:0;for(let d=0;d<this.path.length;d++)this.path[d].shouldResetTransform=!0;this.root===this&&(this.nodes=new vR)}addEventListener(l,f){return this.eventHandlers.has(l)||this.eventHandlers.set(l,new Pp),this.eventHandlers.get(l).add(f)}notifyListeners(l,...f){const d=this.eventHandlers.get(l);d&&d.notify(...f)}hasListeners(l){return this.eventHandlers.has(l)}mount(l){if(this.instance)return;this.isSVG=Ik(l)&&!_4(l),this.instance=l;const{layoutId:f,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||f)&&(this.isLayoutDirty=!0),e){let p,y=0;const x=()=>this.root.updateBlockedByResize=!1;ft.read(()=>{y=window.innerWidth}),e(l,()=>{const b=window.innerWidth;b!==y&&(y=b,this.root.updateBlockedByResize=!0,p&&p(),p=bR(x,250),yc.hasAnimatedSinceResize&&(yc.hasAnimatedSinceResize=!1,this.nodes.forEach(f1)))})}f&&this.root.registerSharedNode(f,this),this.options.animate!==!1&&h&&(f||d)&&this.addEventListener("didUpdate",({delta:p,hasLayoutChanged:y,hasRelativeLayoutChanged:x,layout:b})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const _=this.options.transition||h.getDefaultTransition()||$R,{onLayoutAnimationStart:z,onLayoutAnimationComplete:A}=h.getProps(),j=!this.targetLayout||!uz(this.targetLayout,b),N=!y&&x;if(this.options.layoutRoot||this.resumeFrom||N||y&&(j||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const T={...Qp(_,"layout"),onPlay:z,onComplete:A};(h.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T),this.setAnimationOrigin(p,N)}else y||f1(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=b})}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(),Ci(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(OR),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&&dz(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let p=0;p<this.path.length;p++){const y=this.path[p];y.shouldResetTransform=!0,y.updateScroll("snapshot"),y.options.layoutRoot&&y.willUpdate(!1)}const{layoutId:f,layout:d}=this.options;if(f===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(u1);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(c1);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(AR),this.nodes.forEach(zR),this.nodes.forEach(_R)):this.nodes.forEach(c1),this.clearAllSnapshots();const f=fn.now();Qt.delta=kr(0,1e3/60,f-Qt.timestamp),Qt.timestamp=f,Qt.isProcessing=!0,Lh.update.process(Qt),Lh.preRender.process(Qt),Lh.render.process(Qt),Qt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,rg.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(CR),this.sharedNodes.forEach(RR)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ft.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ft.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!dn(this.snapshot.measuredBox.x)&&!dn(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.layoutVersion++,this.layoutCorrected=It(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:f}=this.options;f&&f.notify("LayoutMeasure",this.layout.layoutBox,l?l.layoutBox:void 0)}updateScroll(l="measure"){let f=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===l&&(f=!1),f&&this.instance){const d=i(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(!o)return;const l=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,f=this.projectionDelta&&!lz(this.projectionDelta),d=this.getTransformTemplate(),h=d?d(this.latestValues,""):void 0,p=h!==this.prevTransformTemplateValue;l&&this.instance&&(f||la(this.latestValues)||p)&&(o(this.instance,h),this.shouldResetTransform=!1,this.scheduleRender())}measure(l=!0){const f=this.measurePageBox();let d=this.removeElementScroll(f);return l&&(d=this.removeTransform(d)),LR(d),{animationId:this.root.animationId,measuredBox:f,layoutBox:d,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:l}=this.options;if(!l)return It();const f=l.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(UR))){const{scroll:h}=this.root;h&&(go(f.x,h.offset.x),go(f.y,h.offset.y))}return f}removeElementScroll(l){const f=It();if(lr(f,l),this.scroll?.wasRoot)return f;for(let d=0;d<this.path.length;d++){const h=this.path[d],{scroll:p,options:y}=h;h!==this.root&&p&&y.layoutScroll&&(p.wasRoot&&lr(f,l),go(f.x,p.offset.x),go(f.y,p.offset.y))}return f}applyTransform(l,f=!1){const d=It();lr(d,l);for(let h=0;h<this.path.length;h++){const p=this.path[h];!f&&p.options.layoutScroll&&p.scroll&&p!==p.root&&yo(d,{x:-p.scroll.offset.x,y:-p.scroll.offset.y}),la(p.latestValues)&&yo(d,p.latestValues)}return la(this.latestValues)&&yo(d,this.latestValues),d}removeTransform(l){const f=It();lr(f,l);for(let d=0;d<this.path.length;d++){const h=this.path[d];if(!h.instance||!la(h.latestValues))continue;Qm(h.latestValues)&&h.updateSnapshot();const p=It(),y=h.measurePageBox();lr(p,y),e1(f,h.latestValues,h.snapshot?h.snapshot.layoutBox:void 0,p)}return la(this.latestValues)&&e1(f,this.latestValues),f}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!==Qt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(l=!1){const f=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=f.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=f.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=f.isSharedProjectionDirty);const d=!!this.resumingFrom||this!==f;if(!(l||d&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:p,layoutId:y}=this.options;if(!this.layout||!(p||y))return;this.resolvedRelativeTargetAt=Qt.timestamp;const x=this.getClosestProjectingParent();x&&this.linkedParentVersion!==x.layoutVersion&&!x.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(x&&x.layout?this.createRelativeTarget(x,this.layout.layoutBox,x.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=It(),this.targetWithTransforms=It()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),sR(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):lr(this.target,this.layout.layoutBox),Kk(this.target,this.targetDelta)):lr(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,x&&!!x.resumingFrom==!!this.resumingFrom&&!x.options.layoutScroll&&x.target&&this.animationProgress!==1?this.createRelativeTarget(x,this.target,x.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Qm(this.parent.latestValues)||Xk(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(l,f,d){this.relativeParent=l,this.linkedParentVersion=l.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=It(),this.relativeTargetOrigin=It(),Ec(this.relativeTargetOrigin,f,d),lr(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const l=this.getLead(),f=!!this.resumingFrom||this!==l;let d=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(d=!1),f&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(d=!1),this.resolvedRelativeTargetAt===Qt.timestamp&&(d=!1),d)return;const{layout:h,layoutId:p}=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||p))return;lr(this.layoutCorrected,this.layout.layoutBox);const y=this.treeScale.x,x=this.treeScale.y;$4(this.layoutCorrected,this.treeScale,this.path,f),l.layout&&!l.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(l.target=l.layout.layoutBox,l.targetWithTransforms=It());const{target:b}=l;if(!b){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Y0(this.prevProjectionDelta.x,this.projectionDelta.x),Y0(this.prevProjectionDelta.y,this.projectionDelta.y)),tl(this.projectionDelta,this.layoutCorrected,b,this.latestValues),(this.treeScale.x!==y||this.treeScale.y!==x||!a1(this.projectionDelta.x,this.prevProjectionDelta.x)||!a1(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",b))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(l=!0){if(this.options.visualElement?.scheduleRender(),l){const f=this.getStack();f&&f.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=po(),this.projectionDelta=po(),this.projectionDeltaWithTransform=po()}setAnimationOrigin(l,f=!1){const d=this.snapshot,h=d?d.latestValues:{},p={...this.latestValues},y=po();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!f;const x=It(),b=d?d.source:void 0,_=this.layout?this.layout.source:void 0,z=b!==_,A=this.getStack(),j=!A||A.members.length<=1,N=!!(z&&!j&&this.options.crossfade===!0&&!this.path.some(DR));this.animationProgress=0;let T;this.mixTargetDelta=R=>{const L=R/1e3;d1(y.x,l.x,L),d1(y.y,l.y,L),this.setTargetDelta(y),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ec(x,this.layout.layoutBox,this.relativeParent.layout.layoutBox),MR(this.relativeTarget,this.relativeTargetOrigin,x,L),T&&fR(this.relativeTarget,T)&&(this.isProjectionDirty=!1),T||(T=It()),lr(T,this.relativeTarget)),z&&(this.animationValues=p,mR(p,h,this.latestValues,L,N,j)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=L},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(l){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Ci(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ft.update(()=>{yc.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ao(0)),this.currentAnimation=yR(this.motionValue,[0,1e3],{...l,velocity:0,isSync:!0,onUpdate:f=>{this.mixTargetDelta(f),l.onUpdate&&l.onUpdate(f)},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(wR),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const l=this.getLead();let{targetWithTransforms:f,target:d,layout:h,latestValues:p}=l;if(!(!f||!d||!h)){if(this!==l&&this.layout&&h&&mz(this.options.animationType,this.layout.layoutBox,h.layoutBox)){d=this.target||It();const y=dn(this.layout.layoutBox.x);d.x.min=l.target.x.min,d.x.max=d.x.min+y;const x=dn(this.layout.layoutBox.y);d.y.min=l.target.y.min,d.y.max=d.y.min+x}lr(f,d),yo(f,p),tl(this.projectionDeltaWithTransform,this.layoutCorrected,f,p)}}registerSharedNode(l,f){this.sharedNodes.has(l)||this.sharedNodes.set(l,new SR),this.sharedNodes.get(l).add(f);const h=f.options.initialPromotionConfig;f.promote({transition:h?h.transition:void 0,preserveFollowOpacity:h&&h.shouldPreserveFollowOpacity?h.shouldPreserveFollowOpacity(f):void 0})}isLead(){const l=this.getStack();return l?l.lead===this:!0}getLead(){const{layoutId:l}=this.options;return l?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:l}=this.options;return l?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:l}=this.options;if(l)return this.root.sharedNodes.get(l)}promote({needsReset:l,transition:f,preserveFollowOpacity:d}={}){const h=this.getStack();h&&h.promote(this,d),l&&(this.projectionDelta=void 0,this.needsReset=!0),f&&this.setOptions({transition:f})}relegate(){const l=this.getStack();return l?l.relegate(this):!1}resetSkewAndRotation(){const{visualElement:l}=this.options;if(!l)return;let f=!1;const{latestValues:d}=l;if((d.z||d.rotate||d.rotateX||d.rotateY||d.rotateZ||d.skewX||d.skewY)&&(f=!0),!f)return;const h={};d.z&&qh("z",l,h,this.animationValues);for(let p=0;p<Fh.length;p++)qh(`rotate${Fh[p]}`,l,h,this.animationValues),qh(`skew${Fh[p]}`,l,h,this.animationValues);l.render();for(const p in h)l.setStaticValue(p,h[p]),this.animationValues&&(this.animationValues[p]=h[p]);l.scheduleRender()}applyProjectionStyles(l,f){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=gc(f?.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=gc(f?.pointerEvents)||""),this.hasProjected&&!la(this.latestValues)&&(l.transform=d?d({},""):"none",this.hasProjected=!1);return}l.visibility="";const p=h.animationValues||h.latestValues;this.applyTransformsToTarget();let y=dR(this.projectionDeltaWithTransform,this.treeScale,p);d&&(y=d(p,y)),l.transform=y;const{x,y:b}=this.projectionDelta;l.transformOrigin=`${x.origin*100}% ${b.origin*100}% 0`,h.animationValues?l.opacity=h===this?p.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:p.opacityExit:l.opacity=h===this?p.opacity!==void 0?p.opacity:"":p.opacityExit!==void 0?p.opacityExit:0;for(const _ in ep){if(p[_]===void 0)continue;const{correct:z,applyTo:A,isCSSVariable:j}=ep[_],N=y==="none"?p[_]:z(p[_],h);if(A){const T=A.length;for(let R=0;R<T;R++)l[A[R]]=N}else j?this.options.visualElement.renderState.vars[_]=N:l[_]=N}this.options.layoutId&&(l.pointerEvents=h===this?gc(f?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(l=>l.currentAnimation?.stop()),this.root.nodes.forEach(u1),this.root.sharedNodes.clear()}}}function zR(e){e.updateLayout()}function _R(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=e.layout,{animationType:o}=e.options,u=t.source!==e.layout.source;o==="size"?Kn(p=>{const y=u?t.measuredBox[p]:t.layoutBox[p],x=dn(y);y.min=n[p].min,y.max=y.min+x}):mz(o,t.layoutBox,n)&&Kn(p=>{const y=u?t.measuredBox[p]:t.layoutBox[p],x=dn(n[p]);y.max=y.min+x,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[p].max=e.relativeTarget[p].min+x)});const l=po();tl(l,n,t.layoutBox);const f=po();u?tl(f,e.applyTransform(i,!0),t.measuredBox):tl(f,n,t.layoutBox);const d=!lz(l);let h=!1;if(!e.resumeFrom){const p=e.getClosestProjectingParent();if(p&&!p.resumeFrom){const{snapshot:y,layout:x}=p;if(y&&x){const b=It();Ec(b,t.layoutBox,y.layoutBox);const _=It();Ec(_,n,x.layoutBox),uz(b,_)||(h=!0),p.options.layoutRoot&&(e.relativeTarget=_,e.relativeTargetOrigin=b,e.relativeParent=p)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:f,layoutDelta:l,hasLayoutChanged:d,hasRelativeLayoutChanged:h})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function ER(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 TR(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function CR(e){e.clearSnapshot()}function u1(e){e.clearMeasurements()}function c1(e){e.isLayoutDirty=!1}function AR(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function f1(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function jR(e){e.resolveTargetDelta()}function NR(e){e.calcProjection()}function OR(e){e.resetSkewAndRotation()}function RR(e){e.removeLeadSnapshot()}function d1(e,t,n){e.translate=yt(t.translate,0,n),e.scale=yt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function h1(e,t,n,i){e.min=yt(t.min,n.min,i),e.max=yt(t.max,n.max,i)}function MR(e,t,n,i){h1(e.x,t.x,n.x,i),h1(e.y,t.y,n.y,i)}function DR(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const $R={duration:.45,ease:[.4,0,.1,1]},m1=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),p1=m1("applewebkit/")&&!m1("chrome/")?Math.round:tr;function g1(e){e.min=p1(e.min),e.max=p1(e.max)}function LR(e){g1(e.x),g1(e.y)}function mz(e,t,n){return e==="position"||e==="preserve-aspect"&&!oR(i1(t),i1(n),.2)}function UR(e){return e!==e.root&&e.scroll?.wasRoot}const VR=hz({attachResizeListener:(e,t)=>hl(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Gh={current:void 0},pz=hz({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Gh.current){const e=new VR({});e.mount(window),e.setOptions({layoutScroll:!0}),Gh.current=e}return Gh.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),ug=E.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function y1(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function PR(...e){return t=>{let n=!1;const i=e.map(o=>{const u=y1(o,t);return!n&&typeof u=="function"&&(n=!0),u});if(n)return()=>{for(let o=0;o<i.length;o++){const u=i[o];typeof u=="function"?u():y1(e[o],null)}}}}function ZR(...e){return E.useCallback(PR(...e),e)}class BR extends E.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const i=n.offsetParent,o=Km(i)&&i.offsetWidth||0,u=Km(i)&&i.offsetHeight||0,l=this.props.sizeRef.current;l.height=n.offsetHeight||0,l.width=n.offsetWidth||0,l.top=n.offsetTop,l.left=n.offsetLeft,l.right=o-l.width-l.left,l.bottom=u-l.height-l.top}return null}componentDidUpdate(){}render(){return this.props.children}}function IR({children:e,isPresent:t,anchorX:n,anchorY:i,root:o}){const u=E.useId(),l=E.useRef(null),f=E.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:d}=E.useContext(ug),h=e.props?.ref??e?.ref,p=ZR(l,h);return E.useInsertionEffect(()=>{const{width:y,height:x,top:b,left:_,right:z,bottom:A}=f.current;if(t||!l.current||!y||!x)return;const j=n==="left"?`left: ${_}`:`right: ${z}`,N=i==="bottom"?`bottom: ${A}`:`top: ${b}`;l.current.dataset.motionPopId=u;const T=document.createElement("style");d&&(T.nonce=d);const R=o??document.head;return R.appendChild(T),T.sheet&&T.sheet.insertRule(`
12
+ [data-motion-pop-id="${u}"] {
13
+ position: absolute !important;
14
+ width: ${y}px !important;
15
+ height: ${x}px !important;
16
+ ${j}px !important;
17
+ ${N}px !important;
18
+ }
19
+ `),()=>{R.contains(T)&&R.removeChild(T)}},[t]),v.jsx(BR,{isPresent:t,childRef:l,sizeRef:f,children:E.cloneElement(e,{ref:p})})}const HR=({children:e,initial:t,isPresent:n,onExitComplete:i,custom:o,presenceAffectsLayout:u,mode:l,anchorX:f,anchorY:d,root:h})=>{const p=Dp(FR),y=E.useId();let x=!0,b=E.useMemo(()=>(x=!1,{id:y,initial:t,isPresent:n,custom:o,onExitComplete:_=>{p.set(_,!0);for(const z of p.values())if(!z)return;i&&i()},register:_=>(p.set(_,!1),()=>p.delete(_))}),[n,p,i]);return u&&x&&(b={...b}),E.useMemo(()=>{p.forEach((_,z)=>p.set(z,!1))},[n]),E.useEffect(()=>{!n&&!p.size&&i&&i()},[n]),l==="popLayout"&&(e=v.jsx(IR,{isPresent:n,anchorX:f,anchorY:d,root:h,children:e})),v.jsx(Bc.Provider,{value:b,children:e})};function FR(){return new Map}function gz(e=!0){const t=E.useContext(Bc);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:i,register:o}=t,u=E.useId();E.useEffect(()=>{if(e)return o(u)},[e]);const l=E.useCallback(()=>e&&i&&i(u),[u,i,e]);return!n&&i?[!1,l]:[!0]}const Ku=e=>e.key||"";function x1(e){const t=[];return E.Children.forEach(e,n=>{E.isValidElement(n)&&t.push(n)}),t}const qR=({children:e,custom:t,initial:n=!0,onExitComplete:i,presenceAffectsLayout:o=!0,mode:u="sync",propagate:l=!1,anchorX:f="left",anchorY:d="top",root:h})=>{const[p,y]=gz(l),x=E.useMemo(()=>x1(e),[e]),b=l&&!p?[]:x.map(Ku),_=E.useRef(!0),z=E.useRef(x),A=Dp(()=>new Map),j=E.useRef(new Set),[N,T]=E.useState(x),[R,L]=E.useState(x);Yw(()=>{_.current=!1,z.current=x;for(let P=0;P<R.length;P++){const K=Ku(R[P]);b.includes(K)?(A.delete(K),j.current.delete(K)):A.get(K)!==!0&&A.set(K,!1)}},[R,b.length,b.join("-")]);const $=[];if(x!==N){let P=[...x];for(let K=0;K<R.length;K++){const ie=R[K],ne=Ku(ie);b.includes(ne)||(P.splice(K,0,ie),$.push(ie))}return u==="wait"&&$.length&&(P=$),L(x1(P)),T(x),null}const{forceRender:q}=E.useContext(Mp);return v.jsx(v.Fragment,{children:R.map(P=>{const K=Ku(P),ie=l&&!p?!1:x===R||b.includes(K),ne=()=>{if(j.current.has(K))return;if(j.current.add(K),A.has(K))A.set(K,!0);else return;let oe=!0;A.forEach(we=>{we||(oe=!1)}),oe&&(q?.(),L(z.current),l&&y?.(),i&&i())};return v.jsx(HR,{isPresent:ie,initial:!_.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:u,root:h,onExitComplete:ie?void 0:ne,anchorX:f,anchorY:d,children:P},K)})})},yz=E.createContext({strict:!1}),v1={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"]};let b1=!1;function GR(){if(b1)return;const e={};for(const t in v1)e[t]={isEnabled:n=>v1[t].some(i=>!!n[i])};qk(e),b1=!0}function xz(){return GR(),O4()}function YR(e){const t=xz();for(const n in e)t[n]={...t[n],...e[n]};qk(t)}const XR=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 Tc(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||XR.has(e)}let vz=e=>!Tc(e);function KR(e){typeof e=="function"&&(vz=t=>t.startsWith("on")?!Tc(t):e(t))}try{KR(require("@emotion/is-prop-valid").default)}catch{}function JR(e,t,n){const i={};for(const o in e)o==="values"&&typeof e.values=="object"||(vz(o)||n===!0&&Tc(o)||!t&&!Tc(o)||e.draggable&&o.startsWith("onDrag"))&&(i[o]=e[o]);return i}const Fc=E.createContext({});function QR(e,t){if(Hc(e)){const{initial:n,animate:i}=e;return{initial:n===!1||dl(n)?n:void 0,animate:dl(i)?i:void 0}}return e.inherit!==!1?t:{}}function WR(e){const{initial:t,animate:n}=QR(e,E.useContext(Fc));return E.useMemo(()=>({initial:t,animate:n}),[S1(t),S1(n)])}function S1(e){return Array.isArray(e)?e.join(" "):e}const cg=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function bz(e,t,n){for(const i in t)!nn(t[i])&&!Wk(i,n)&&(e[i]=t[i])}function eM({transformTemplate:e},t){return E.useMemo(()=>{const n=cg();return sg(n,t,e),Object.assign({},n.vars,n.style)},[t])}function tM(e,t){const n=e.style||{},i={};return bz(i,n,e),Object.assign(i,eM(e,t)),i}function nM(e,t){const n={},i=tM(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.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=i,n}const Sz=()=>({...cg(),attrs:{}});function rM(e,t,n,i){const o=E.useMemo(()=>{const u=Sz();return ez(u,t,nz(i),e.transformTemplate,e.style),{...u.attrs,style:{...u.style}}},[t]);if(e.style){const u={};bz(u,e.style,e),o.style={...u,...o.style}}return o}const iM=["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 fg(e){return typeof e!="string"||e.includes("-")?!1:!!(iM.indexOf(e)>-1||/[A-Z]/u.test(e))}function aM(e,t,n,{latestValues:i},o,u=!1,l){const d=(l??fg(e)?rM:nM)(t,i,o,e),h=JR(t,typeof e=="string",u),p=e!==E.Fragment?{...h,...d,ref:n}:{},{children:y}=t,x=E.useMemo(()=>nn(y)?y.get():y,[y]);return E.createElement(e,{...p,children:x})}function oM({scrapeMotionValuesFromProps:e,createRenderState:t},n,i,o){return{latestValues:sM(n,i,o,e),renderState:t()}}function sM(e,t,n,i){const o={},u=i(e,{});for(const x in u)o[x]=gc(u[x]);let{initial:l,animate:f}=e;const d=Hc(e),h=Fk(e);t&&h&&!d&&e.inherit!==!1&&(l===void 0&&(l=t.initial),f===void 0&&(f=t.animate));let p=n?n.initial===!1:!1;p=p||l===!1;const y=p?f:l;if(y&&typeof y!="boolean"&&!Ic(y)){const x=Array.isArray(y)?y:[y];for(let b=0;b<x.length;b++){const _=eg(e,x[b]);if(_){const{transitionEnd:z,transition:A,...j}=_;for(const N in j){let T=j[N];if(Array.isArray(T)){const R=p?T.length-1:0;T=T[R]}T!==null&&(o[N]=T)}for(const N in z)o[N]=z[N]}}}return o}const wz=e=>(t,n)=>{const i=E.useContext(Fc),o=E.useContext(Bc),u=()=>oM(e,t,i,o);return n?u():Dp(u)},lM=wz({scrapeMotionValuesFromProps:lg,createRenderState:cg}),uM=wz({scrapeMotionValuesFromProps:rz,createRenderState:Sz}),cM=Symbol.for("motionComponentSymbol");function fM(e,t,n){const i=E.useRef(n);E.useInsertionEffect(()=>{i.current=n});const o=E.useRef(null);return E.useCallback(u=>{u&&e.onMount?.(u),t&&(u?t.mount(u):t.unmount());const l=i.current;if(typeof l=="function")if(u){const f=l(u);typeof f=="function"&&(o.current=f)}else o.current?(o.current(),o.current=null):l(u);else l&&(l.current=u)},[t])}const kz=E.createContext({});function Ks(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function dM(e,t,n,i,o,u){const{visualElement:l}=E.useContext(Fc),f=E.useContext(yz),d=E.useContext(Bc),h=E.useContext(ug).reducedMotion,p=E.useRef(null),y=E.useRef(!1);i=i||f.renderer,!p.current&&i&&(p.current=i(e,{visualState:t,parent:l,props:n,presenceContext:d,blockInitialAnimation:d?d.initial===!1:!1,reducedMotionConfig:h,isSVG:u}),y.current&&p.current&&(p.current.manuallyAnimateOnMount=!0));const x=p.current,b=E.useContext(kz);x&&!x.projection&&o&&(x.type==="html"||x.type==="svg")&&hM(p.current,n,o,b);const _=E.useRef(!1);E.useInsertionEffect(()=>{x&&_.current&&x.update(n,d)});const z=n[Nk],A=E.useRef(!!z&&!window.MotionHandoffIsComplete?.(z)&&window.MotionHasOptimisedAnimation?.(z));return Yw(()=>{y.current=!0,x&&(_.current=!0,window.MotionIsMounted=!0,x.updateFeatures(),x.scheduleRenderMicrotask(),A.current&&x.animationState&&x.animationState.animateChanges())}),E.useEffect(()=>{x&&(!A.current&&x.animationState&&x.animationState.animateChanges(),A.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(z)}),A.current=!1),x.enteringChildren=void 0)}),x}function hM(e,t,n,i){const{layoutId:o,layout:u,drag:l,dragConstraints:f,layoutScroll:d,layoutRoot:h,layoutCrossfade:p}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:zz(e.parent)),e.projection.setOptions({layoutId:o,layout:u,alwaysMeasureLayout:!!l||f&&Ks(f),visualElement:e,animationType:typeof u=="string"?u:"both",initialPromotionConfig:i,crossfade:p,layoutScroll:d,layoutRoot:h})}function zz(e){if(e)return e.options.allowProjection!==!1?e.projection:zz(e.parent)}function Yh(e,{forwardMotionProps:t=!1,type:n}={},i,o){i&&YR(i);const u=n?n==="svg":fg(e),l=u?uM:lM;function f(h,p){let y;const x={...E.useContext(ug),...h,layoutId:mM(h)},{isStatic:b}=x,_=WR(h),z=l(h,b);if(!b&&Gw){pM();const A=gM(x);y=A.MeasureLayout,_.visualElement=dM(e,z,x,o,A.ProjectionNode,u)}return v.jsxs(Fc.Provider,{value:_,children:[y&&_.visualElement?v.jsx(y,{visualElement:_.visualElement,...x}):null,aM(e,h,fM(z,_.visualElement,p),z,b,t,u)]})}f.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const d=E.forwardRef(f);return d[cM]=e,d}function mM({layoutId:e}){const t=E.useContext(Mp).id;return t&&e!==void 0?t+"-"+e:e}function pM(e,t){E.useContext(yz).strict}function gM(e){const t=xz(),{drag:n,layout:i}=t;if(!n&&!i)return{};const o={...n,...i};return{MeasureLayout:n?.isEnabled(e)||i?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function yM(e,t){if(typeof Proxy>"u")return Yh;const n=new Map,i=(u,l)=>Yh(u,l,e,t),o=(u,l)=>i(u,l);return new Proxy(o,{get:(u,l)=>l==="create"?i:(n.has(l)||n.set(l,Yh(l,void 0,e,t)),n.get(l))})}const xM=(e,t)=>t.isSVG??fg(e)?new X4(t):new I4(t,{allowProjection:e!==E.Fragment});class vM extends Oi{constructor(t){super(t),t.animationState||(t.animationState=eR(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ic(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(){this.node.animationState.reset(),this.unmountControls?.()}}let bM=0;class SM extends Oi{constructor(){super(...arguments),this.id=bM++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.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 wM={animation:{Feature:vM},exit:{Feature:SM}};function El(e){return{point:{x:e.pageX,y:e.pageY}}}const kM=e=>t=>ig(t)&&e(t,El(t));function nl(e,t,n,i){return hl(e,t,kM(n),i)}const _z=({current:e})=>e?e.ownerDocument.defaultView:null,w1=(e,t)=>Math.abs(e-t);function zM(e,t){const n=w1(e.x,t.x),i=w1(e.y,t.y);return Math.sqrt(n**2+i**2)}const k1=new Set(["auto","scroll"]);class Ez{constructor(t,n,{transformPagePoint:i,contextWindow:o=window,dragSnapToOrigin:u=!1,distanceThreshold:l=3,element:f}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=b=>{this.handleScroll(b.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=Kh(this.lastMoveEventInfo,this.history),_=this.startEvent!==null,z=zM(b.offset,{x:0,y:0})>=this.distanceThreshold;if(!_&&!z)return;const{point:A}=b,{timestamp:j}=Qt;this.history.push({...A,timestamp:j});const{onStart:N,onMove:T}=this.handlers;_||(N&&N(this.lastMoveEvent,b),this.startEvent=this.lastMoveEvent),T&&T(this.lastMoveEvent,b)},this.handlePointerMove=(b,_)=>{this.lastMoveEvent=b,this.lastMoveEventInfo=Xh(_,this.transformPagePoint),ft.update(this.updatePoint,!0)},this.handlePointerUp=(b,_)=>{this.end();const{onEnd:z,onSessionEnd:A,resumeAnimation:j}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&j&&j(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const N=Kh(b.type==="pointercancel"?this.lastMoveEventInfo:Xh(_,this.transformPagePoint),this.history);this.startEvent&&z&&z(b,N),A&&A(b,N)},!ig(t))return;this.dragSnapToOrigin=u,this.handlers=n,this.transformPagePoint=i,this.distanceThreshold=l,this.contextWindow=o||window;const d=El(t),h=Xh(d,this.transformPagePoint),{point:p}=h,{timestamp:y}=Qt;this.history=[{...p,timestamp:y}];const{onSessionStart:x}=n;x&&x(t,Kh(h,this.history)),this.removeListeners=kl(nl(this.contextWindow,"pointermove",this.handlePointerMove),nl(this.contextWindow,"pointerup",this.handlePointerUp),nl(this.contextWindow,"pointercancel",this.handlePointerUp)),f&&this.startScrollTracking(f)}startScrollTracking(t){let n=t.parentElement;for(;n;){const i=getComputedStyle(n);(k1.has(i.overflowX)||k1.has(i.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const i=t===window,o=i?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},u={x:o.x-n.x,y:o.y-n.y};u.x===0&&u.y===0||(i?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=u.x,this.lastMoveEventInfo.point.y+=u.y):this.history.length>0&&(this.history[0].x-=u.x,this.history[0].y-=u.y),this.scrollPositions.set(t,o),ft.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Ci(this.updatePoint)}}function Xh(e,t){return t?{point:t(e.point)}:e}function z1(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Kh({point:e},t){return{point:e,delta:z1(e,Tz(t)),offset:z1(e,_M(t)),velocity:EM(t,.1)}}function _M(e){return e[0]}function Tz(e){return e[e.length-1]}function EM(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,i=null;const o=Tz(e);for(;n>=0&&(i=e[n],!(o.timestamp-i.timestamp>Xr(t)));)n--;if(!i)return{x:0,y:0};const u=er(o.timestamp-i.timestamp);if(u===0)return{x:0,y:0};const l={x:(o.x-i.x)/u,y:(o.y-i.y)/u};return l.x===1/0&&(l.x=0),l.y===1/0&&(l.y=0),l}function TM(e,{min:t,max:n},i){return t!==void 0&&e<t?e=i?yt(t,e,i.min):Math.max(e,t):n!==void 0&&e>n&&(e=i?yt(n,e,i.max):Math.min(e,n)),e}function _1(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 CM(e,{top:t,left:n,bottom:i,right:o}){return{x:_1(e.x,n,o),y:_1(e.y,t,i)}}function E1(e,t){let n=t.min-e.min,i=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,i]=[i,n]),{min:n,max:i}}function AM(e,t){return{x:E1(e.x,t.x),y:E1(e.y,t.y)}}function jM(e,t){let n=.5;const i=dn(e),o=dn(t);return o>i?n=ul(t.min,t.max-i,e.min):i>o&&(n=ul(e.min,e.max-o,t.min)),kr(0,1,n)}function NM(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 tp=.35;function OM(e=tp){return e===!1?e=0:e===!0&&(e=tp),{x:T1(e,"left","right"),y:T1(e,"top","bottom")}}function T1(e,t,n){return{min:C1(e,t),max:C1(e,n)}}function C1(e,t){return typeof e=="number"?e:e[t]||0}const RM=new WeakMap;class MM{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=It(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:i}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const u=y=>{n?(this.stopAnimation(),this.snapToCursor(El(y).point)):this.pauseAnimation()},l=(y,x)=>{this.stopAnimation();const{drag:b,dragPropagation:_,onDragStart:z}=this.getProps();if(b&&!_&&(this.openDragLock&&this.openDragLock(),this.openDragLock=b4(b),!this.openDragLock))return;this.latestPointerEvent=y,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),Kn(j=>{let N=this.getAxisMotionValue(j).get()||0;if(wr.test(N)){const{projection:T}=this.visualElement;if(T&&T.layout){const R=T.layout.layoutBox[j];R&&(N=dn(R)*(parseFloat(N)/100))}}this.originPoint[j]=N}),z&&ft.postRender(()=>z(y,x)),Gm(this.visualElement,"transform");const{animationState:A}=this.visualElement;A&&A.setActive("whileDrag",!0)},f=(y,x)=>{this.latestPointerEvent=y,this.latestPanInfo=x;const{dragPropagation:b,dragDirectionLock:_,onDirectionLock:z,onDrag:A}=this.getProps();if(!b&&!this.openDragLock)return;const{offset:j}=x;if(_&&this.currentDirection===null){this.currentDirection=DM(j),this.currentDirection!==null&&z&&z(this.currentDirection);return}this.updateAxis("x",x.point,j),this.updateAxis("y",x.point,j),this.visualElement.render(),A&&A(y,x)},d=(y,x)=>{this.latestPointerEvent=y,this.latestPanInfo=x,this.stop(y,x),this.latestPointerEvent=null,this.latestPanInfo=null},h=()=>Kn(y=>this.getAnimationState(y)==="paused"&&this.getAxisMotionValue(y).animation?.play()),{dragSnapToOrigin:p}=this.getProps();this.panSession=new Ez(t,{onSessionStart:u,onStart:l,onMove:f,onSessionEnd:d,resumeAnimation:h},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:p,distanceThreshold:i,contextWindow:_z(this.visualElement),element:this.visualElement.current})}stop(t,n){const i=t||this.latestPointerEvent,o=n||this.latestPanInfo,u=this.isDragging;if(this.cancel(),!u||!o||!i)return;const{velocity:l}=o;this.startAnimation(l);const{onDragEnd:f}=this.getProps();f&&ft.postRender(()=>f(i,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,i){const{drag:o}=this.getProps();if(!i||!Ju(t,o,this.currentDirection))return;const u=this.getAxisMotionValue(t);let l=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(l=TM(l,this.constraints[t],this.elastic[t])),u.set(l)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,o=this.constraints;t&&Ks(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&i?this.constraints=CM(i.layoutBox,t):this.constraints=!1,this.elastic=OM(n),o!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Kn(u=>{this.constraints!==!1&&this.getAxisMotionValue(u)&&(this.constraints[u]=NM(i.layoutBox[u],this.constraints[u]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Ks(t))return!1;const i=t.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const u=L4(i,o.root,this.visualElement.getTransformPagePoint());let l=AM(o.layout.layoutBox,u);if(n){const f=n(M4(l));this.hasMutatedConstraints=!!f,f&&(l=Yk(f))}return l}startAnimation(t){const{drag:n,dragMomentum:i,dragElastic:o,dragTransition:u,dragSnapToOrigin:l,onDragTransitionEnd:f}=this.getProps(),d=this.constraints||{},h=Kn(p=>{if(!Ju(p,n,this.currentDirection))return;let y=d&&d[p]||{};l&&(y={min:0,max:0});const x=o?200:1e6,b=o?40:1e7,_={type:"inertia",velocity:i?t[p]:0,bounceStiffness:x,bounceDamping:b,timeConstant:750,restDelta:1,restSpeed:10,...u,...y};return this.startAxisValueAnimation(p,_)});return Promise.all(h).then(f)}startAxisValueAnimation(t,n){const i=this.getAxisMotionValue(t);return Gm(this.visualElement,t),i.start(Wp(t,i,0,n,this.visualElement,!1))}stopAnimation(){Kn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Kn(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps(),o=i[n];return o||this.visualElement.getValue(t,(i.initial?i.initial[t]:void 0)||0)}snapToCursor(t){Kn(n=>{const{drag:i}=this.getProps();if(!Ju(n,i,this.currentDirection))return;const{projection:o}=this.visualElement,u=this.getAxisMotionValue(n);if(o&&o.layout){const{min:l,max:f}=o.layout.layoutBox[n],d=u.get()||0;u.set(t[n]-yt(l,f,.5)+d)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!Ks(n)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Kn(l=>{const f=this.getAxisMotionValue(l);if(f&&this.constraints!==!1){const d=f.get();o[l]=jM({min:d,max:d},this.constraints[l])}});const{transformTemplate:u}=this.visualElement.getProps();this.visualElement.current.style.transform=u?u({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),Kn(l=>{if(!Ju(l,t,null))return;const f=this.getAxisMotionValue(l),{min:d,max:h}=this.constraints[l];f.set(yt(d,h,o[l]))})}addListeners(){if(!this.visualElement.current)return;RM.set(this.visualElement,this);const t=this.visualElement.current,n=nl(t,"pointerdown",d=>{const{drag:h,dragListener:p=!0}=this.getProps(),y=d.target,x=y!==t&&Bk(y);h&&p&&!x&&this.start(d)}),i=()=>{const{dragConstraints:d}=this.getProps();Ks(d)&&d.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,u=o.addEventListener("measure",i);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),ft.read(i);const l=hl(window,"resize",()=>this.scalePositionWithinConstraints()),f=o.addEventListener("didUpdate",(({delta:d,hasLayoutChanged:h})=>{this.isDragging&&h&&(Kn(p=>{const y=this.getAxisMotionValue(p);y&&(this.originPoint[p]+=d[p].translate,y.set(y.get()+d[p].translate))}),this.visualElement.render())}));return()=>{l(),n(),u(),f&&f()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:i=!1,dragPropagation:o=!1,dragConstraints:u=!1,dragElastic:l=tp,dragMomentum:f=!0}=t;return{...t,drag:n,dragDirectionLock:i,dragPropagation:o,dragConstraints:u,dragElastic:l,dragMomentum:f}}}function Ju(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function DM(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class $M extends Oi{constructor(t){super(t),this.removeGroupControls=tr,this.removeListeners=tr,this.controls=new MM(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||tr}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const A1=e=>(t,n)=>{e&&ft.postRender(()=>e(t,n))};class LM extends Oi{constructor(){super(...arguments),this.removePointerDownListener=tr}onPointerDown(t){this.session=new Ez(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:_z(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:i,onPanEnd:o}=this.node.getProps();return{onSessionStart:A1(t),onStart:A1(n),onMove:i,onEnd:(u,l)=>{delete this.session,o&&ft.postRender(()=>o(u,l))}}}mount(){this.removePointerDownListener=nl(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Jh=!1;class UM extends E.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i,layoutId:o}=this.props,{projection:u}=t;u&&(n.group&&n.group.add(u),i&&i.register&&o&&i.register(u),Jh&&u.root.didUpdate(),u.addEventListener("animationComplete",()=>{this.safeToRemove()}),u.setOptions({...u.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),yc.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:i,drag:o,isPresent:u}=this.props,{projection:l}=i;return l&&(l.isPresent=u,t.layoutDependency!==n&&l.setOptions({...l.options,layoutDependency:n}),Jh=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==u?l.willUpdate():this.safeToRemove(),t.isPresent!==u&&(u?l.promote():l.relegate()||ft.postRender(()=>{const f=l.getStack();(!f||!f.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),rg.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i}=this.props,{projection:o}=t;Jh=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),i&&i.deregister&&i.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Cz(e){const[t,n]=gz(),i=E.useContext(Mp);return v.jsx(UM,{...e,layoutGroup:i,switchLayoutGroup:E.useContext(kz),isPresent:t,safeToRemove:n})}const VM={pan:{Feature:LM},drag:{Feature:$M,ProjectionNode:pz,MeasureLayout:Cz}};function j1(e,t,n){const{props:i}=e;e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,u=i[o];u&&ft.postRender(()=>u(t,El(t)))}class PM extends Oi{mount(){const{current:t}=this.node;t&&(this.unmount=S4(t,(n,i)=>(j1(this.node,i,"Start"),o=>j1(this.node,o,"End"))))}unmount(){}}class ZM extends Oi{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=kl(hl(this.node.current,"focus",()=>this.onFocus()),hl(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function N1(e,t,n){const{props:i}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&i.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),u=i[o];u&&ft.postRender(()=>u(t,El(t)))}class BM extends Oi{mount(){const{current:t}=this.node;t&&(this.unmount=z4(t,(n,i)=>(N1(this.node,i,"Start"),(o,{success:u})=>N1(this.node,o,u?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const np=new WeakMap,Qh=new WeakMap,IM=e=>{const t=np.get(e.target);t&&t(e)},HM=e=>{e.forEach(IM)};function FM({root:e,...t}){const n=e||document;Qh.has(n)||Qh.set(n,{});const i=Qh.get(n),o=JSON.stringify(t);return i[o]||(i[o]=new IntersectionObserver(HM,{root:e,...t})),i[o]}function qM(e,t,n){const i=FM(t);return np.set(e,n),i.observe(e),()=>{np.delete(e),i.unobserve(e)}}const GM={some:0,all:1};class YM extends Oi{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:i,amount:o="some",once:u}=t,l={root:n?n.current:void 0,rootMargin:i,threshold:typeof o=="number"?o:GM[o]},f=d=>{const{isIntersecting:h}=d;if(this.isInView===h||(this.isInView=h,u&&!h&&this.hasEnteredView))return;h&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",h);const{onViewportEnter:p,onViewportLeave:y}=this.node.getProps(),x=h?p:y;x&&x(d)};return qM(this.node.current,l,f)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(XM(t,n))&&this.startObserver()}unmount(){}}function XM({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const KM={inView:{Feature:YM},tap:{Feature:BM},focus:{Feature:ZM},hover:{Feature:PM}},JM={layout:{ProjectionNode:pz,MeasureLayout:Cz}},QM={...wM,...KM,...VM,...JM},Sr=yM(QM,xM),Az=()=>{const[e,t]=E.useState(!!localStorage.getItem("morpheus.auth.token"));return E.useEffect(()=>{const o=()=>{t(!!localStorage.getItem("morpheus.auth.token"))};return window.addEventListener("storage",o),()=>window.removeEventListener("storage",o)},[]),{isAuthenticated:e,login:o=>{localStorage.setItem("morpheus.auth.token",o),t(!0)},logout:()=>{localStorage.removeItem("morpheus.auth.token"),t(!1),window.location.href="/login"}}};function WM({onMenuClick:e,isDark:t,toggleTheme:n}){return v.jsxs("header",{className:"lg:hidden fixed top-0 left-0 right-0 z-50 bg-azure-surface dark:bg-black border-b border-azure-border dark:border-matrix-primary/30 p-4 flex items-center justify-between",children:[v.jsxs("h1",{className:"text-lg font-bold text-azure-primary dark:text-matrix-highlight flex items-center gap-2",children:[v.jsx(ho,{className:"w-6 h-6"}),"MORPHEUS"]}),v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("button",{onClick:n,className:"p-1 rounded hover:bg-azure-hover dark:hover:bg-matrix-primary/50 text-azure-text-muted dark:text-matrix-secondary transition-colors focus:outline-none focus:ring-2 focus:ring-azure-primary dark:focus:ring-matrix-highlight","aria-label":t?"Modo claro":"Modo escuro",children:t?v.jsx($w,{className:"w-5 h-5"}):v.jsx(Dw,{className:"w-5 h-5"})}),v.jsx("button",{onClick:e,className:"p-2 rounded hover:bg-azure-hover dark:hover:bg-matrix-primary/50 text-azure-text-muted dark:text-matrix-secondary transition-colors focus:outline-none focus:ring-2 focus:ring-azure-primary dark:focus:ring-matrix-secondary","aria-label":"Abrir menu",children:v.jsx(fj,{className:"w-6 h-6"})})]})]})}const qc=({open:e,onOpenChange:t,children:n})=>e?v.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[v.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm",onClick:()=>t(!1)}),v.jsx("div",{className:"relative bg-azure-surface dark:bg-zinc-900 rounded-lg border border-azure-border dark:border-matrix-primary shadow-lg w-full max-w-md md:max-w-2xl max-h-[90vh] overflow-hidden flex flex-col",children:n})]}):null,Gc=({className:e,children:t})=>v.jsx("div",{className:`relative bg-azure-surface dark:bg-zinc-900 rounded-lg border border-azure-border dark:border-matrix-primary shadow-lg w-full max-w-md md:max-w-2xl max-h-[90vh] overflow-hidden flex flex-col ${e}`,children:v.jsx("div",{className:"overflow-y-auto flex-grow p-6",children:t})}),Yc=({children:e})=>v.jsx("div",{className:"flex flex-col space-y-1.5 text-center sm:text-left border-b border-azure-border dark:border-matrix-primary p-6",children:e}),Xc=({className:e,children:t})=>v.jsx("h3",{className:`text-lg font-semibold leading-none tracking-tight ${e}`,children:t}),eD=({className:e,children:t})=>v.jsx("div",{className:`mt-6 flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 ${e}`,children:t}),Wn=({className:e,variant:t="default",size:n="default",...i})=>{const f=`inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-white transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-zinc-950 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 dark:ring-offset-zinc-950 dark:focus-visible:ring-zinc-300 ${t==="destructive"?"bg-red-500 text-zinc-50 hover:bg-red-500/90 dark:bg-red-900 dark:text-zinc-50 dark:hover:bg-red-900/90":t==="outline"?"border border-azure-border dark:border-matrix-primary bg-transparent hover:bg-azure-hover dark:hover:bg-matrix-primary/50 text-azure-text-primary dark:text-matrix-secondary":t==="secondary"?"bg-azure-surface dark:bg-zinc-800 hover:bg-azure-hover dark:hover:bg-zinc-700/80 text-azure-text-primary dark:text-matrix-secondary":t==="ghost"?"hover:bg-azure-hover dark:hover:bg-matrix-primary/50 text-azure-text-primary dark:text-matrix-secondary":t==="link"?"text-azure-primary dark:text-matrix-highlight underline-offset-4 hover:underline":"bg-azure-primary dark:bg-matrix-highlight text-azure-text-inverse dark:text-black hover:bg-azure-primary/90 dark:hover:bg-matrix-highlight/90"} ${n==="sm"?"h-9 px-3 rounded-md":n==="lg"?"h-11 px-8 rounded-md":n==="icon"?"h-10 w-10":"h-10 px-4 py-2"} ${e||""}`;return v.jsx("button",{className:f,...i})};function tD({isOpen:e,onClose:t,onConfirm:n}){return v.jsx(qc,{open:e,onOpenChange:t,children:v.jsxs(Gc,{className:"sm:max-w-md bg-azure-surface dark:bg-zinc-900 border-azure-border dark:border-matrix-primary",children:[v.jsx(Yc,{children:v.jsx(Xc,{className:"text-azure-primary dark:text-matrix-highlight flex items-center gap-2",children:"Confirm Restart"})}),v.jsxs("div",{children:[v.jsx("p",{className:"text-azure-text-secondary dark:text-matrix-secondary mb-6",children:"Are you sure you want to restart the Morpheus agent? This will temporarily disconnect all services and channels."}),v.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 justify-end",children:[v.jsx(Wn,{variant:"outline",onClick:t,children:"Cancel"}),v.jsx(Wn,{variant:"destructive",onClick:()=>{n(),t()},children:"Confirm Restart"})]})]})]})})}function nD({children:e}){const t=dr(),[n,i]=E.useState(()=>{const x=localStorage.getItem("theme");return x?x==="dark":!0}),[o,u]=E.useState(!1),[l,f]=E.useState(!1),{logout:d}=Az(),h=async()=>{try{await Dt.post("/restart",{}),alert("Restart initiated successfully. The agent will restart shortly.")}catch(x){console.error("Failed to restart:",x),alert("Failed to restart the agent. Please try again.")}};E.useEffect(()=>{n?(document.documentElement.classList.add("dark"),localStorage.setItem("theme","dark")):(document.documentElement.classList.remove("dark"),localStorage.setItem("theme","light"))},[n]),E.useEffect(()=>{u(!1)},[t.pathname]);const p=[{icon:t0,label:"Dashboard",path:"/"},{icon:sl,label:"Chat",path:"/chat"},{icon:o0,label:"Zaion",path:"/zaion"},{icon:i0,label:"MCP Servers",path:"/mcp-servers"},{icon:km,label:"Usage Stats",path:"/stats"},{icon:ho,label:"Sati Memories",path:"/sati-memories"}],y=[{icon:t0,label:"Dashboard",path:"/"},{icon:sl,label:"Chat",path:"/chat"},{icon:o0,label:"Zaion",path:"/zaion"},{icon:i0,label:"MCP Servers",path:"/mcp-servers"},{icon:km,label:"Usage Stats",path:"/stats"},{icon:ho,label:"Sati Memories",path:"/sati-memories"}];return v.jsxs("div",{className:"flex flex-col h-screen bg-azure-bg dark:bg-black text-azure-text-primary dark:text-matrix-secondary font-mono overflow-hidden transition-colors duration-300",children:[v.jsx(WM,{onMenuClick:()=>u(!0),isDark:n,toggleTheme:()=>i(!n)}),v.jsxs("div",{className:"flex flex-1 overflow-hidden pt-16 lg:pt-0",children:[" ",v.jsxs("div",{className:"hidden lg:flex w-64 border-r border-azure-border dark:border-matrix-primary/30 bg-azure-surface dark:bg-black flex-col shrink-0 transition-colors duration-300",children:[v.jsxs("div",{className:"p-4 border-b border-azure-border dark:border-matrix-primary/30 flex justify-between items-center",children:[v.jsxs("h1",{className:"text-xl font-bold text-azure-primary dark:text-matrix-highlight flex items-center gap-2",children:[v.jsx(ho,{className:"w-6 h-6"}),"MORPHEUS"]}),v.jsx("button",{onClick:()=>i(!n),className:"p-1 rounded hover:bg-azure-hover dark:hover:bg-matrix-primary/50 text-azure-text-muted dark:text-matrix-secondary transition-colors",children:n?v.jsx($w,{className:"w-4 h-4"}):v.jsx(Dw,{className:"w-4 h-4"})})]}),v.jsxs("nav",{className:"flex-1 p-4 space-y-2",children:[p.map(x=>{const b=t.pathname===x.path;return v.jsxs(fo,{to:x.path,className:`flex items-center gap-3 px-4 py-3 rounded transition-colors ${b?"bg-azure-active text-azure-primary dark:bg-matrix-primary dark:text-matrix-highlight":"hover:bg-azure-hover dark:hover:bg-matrix-primary/50 text-azure-text-secondary dark:text-matrix-secondary"}`,children:[v.jsx(x.icon,{className:"w-5 h-5"}),v.jsx("span",{children:x.label})]},x.path)}),v.jsxs(fo,{to:"/logs",className:`flex items-center gap-3 px-4 py-3 rounded transition-colors ${t.pathname==="/logs"?"bg-azure-active text-azure-primary dark:bg-matrix-primary dark:text-matrix-highlight":"hover:bg-azure-hover dark:hover:bg-matrix-primary/50 text-azure-text-secondary dark:text-matrix-secondary"}`,children:[v.jsx(s0,{className:"w-5 h-5"}),v.jsx("span",{children:"Logs"})]},"/logs")]}),v.jsx("div",{className:"p-2",children:v.jsxs("button",{onClick:()=>f(!0),className:"flex items-center gap-3 px-4 py-3 rounded w-full text-left hover:bg-azure-hover dark:hover:bg-matrix-primary/50 text-azure-text-secondary dark:text-matrix-secondary transition-colors",children:[v.jsx(a0,{className:"w-5 h-5"}),v.jsx("span",{children:"Restart"})]})}),v.jsx("div",{className:"p-2",children:v.jsxs("button",{onClick:d,className:"flex items-center gap-3 px-4 py-3 rounded w-full text-left hover:bg-red-50 dark:hover:bg-red-900/20 text-azure-text-secondary dark:text-matrix-secondary hover:text-red-600 transition-colors",children:[v.jsx(n0,{className:"w-5 h-5"}),v.jsx("span",{children:"Logout"})]})})]}),v.jsx(qR,{children:o&&v.jsxs(Sr.div,{className:"fixed inset-0 z-50 lg:hidden",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:()=>u(!1),children:[v.jsx("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm"}),v.jsxs(Sr.div,{className:"absolute left-0 top-0 bottom-0 w-64 bg-azure-surface dark:bg-black flex flex-col shadow-xl",initial:{x:"-100%"},animate:{x:0},exit:{x:"-100%"},transition:{type:"spring",damping:25,stiffness:200},onClick:x=>x.stopPropagation(),children:[v.jsxs("div",{className:"p-4 border-b border-azure-border dark:border-matrix-primary/30 flex justify-between items-center",children:[v.jsxs("h1",{className:"text-xl font-bold text-azure-primary dark:text-matrix-highlight flex items-center gap-2",children:[v.jsx(ho,{className:"w-6 h-6"}),"MORPHEUS"]}),v.jsx("button",{onClick:()=>u(!1),className:"p-2 rounded hover:bg-azure-hover dark:hover:bg-matrix-primary/50 text-azure-text-muted dark:text-matrix-secondary transition-colors","aria-label":"Fechar menu",children:v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:v.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),v.jsxs("nav",{className:"flex-1 p-4 space-y-2 overflow-y-auto",children:[y.map(x=>{const b=t.pathname===x.path;return v.jsxs(fo,{to:x.path,className:`flex items-center gap-3 px-4 py-3 rounded transition-colors ${b?"bg-azure-active text-azure-primary dark:bg-matrix-primary dark:text-matrix-highlight":"hover:bg-azure-hover dark:hover:bg-matrix-primary/50 text-azure-text-secondary dark:text-matrix-secondary"}`,onClick:()=>u(!1),children:[v.jsx(x.icon,{className:"w-5 h-5"}),v.jsx("span",{children:x.label})]},x.path)}),v.jsxs(fo,{to:"/logs",className:"flex items-center gap-3 px-4 py-3 rounded transition-colors hidden lg:flex hover:bg-azure-hover dark:hover:bg-matrix-primary/50 text-azure-text-secondary dark:text-matrix-secondary",onClick:()=>u(!1),children:[v.jsx(s0,{className:"w-5 h-5"}),v.jsx("span",{children:"Logs"})]})]}),v.jsx("div",{className:"p-2",children:v.jsxs("button",{onClick:()=>{f(!0),u(!1)},className:"flex items-center gap-3 px-4 py-3 rounded w-full text-left hover:bg-azure-hover dark:hover:bg-matrix-primary/50 text-azure-text-secondary dark:text-matrix-secondary transition-colors",children:[v.jsx(a0,{className:"w-5 h-5"}),v.jsx("span",{children:"Restart"})]})}),v.jsx("div",{className:"p-2",children:v.jsxs("button",{onClick:()=>{d(),u(!1)},className:"flex items-center gap-3 px-4 py-3 rounded w-full text-left hover:bg-red-50 dark:hover:bg-red-900/20 text-azure-text-secondary dark:text-matrix-secondary hover:text-red-600 transition-colors",children:[v.jsx(n0,{className:"w-5 h-5"}),v.jsx("span",{children:"Logout"})]})})]})]})}),v.jsxs("main",{className:`flex-1 p-4 md:p-8 relative flex flex-col ${t.pathname==="/chat"?"overflow-hidden":"overflow-auto"}`,children:[v.jsx("div",{className:`w-full mx-auto flex-1 ${t.pathname==="/chat"?"h-full":"max-w-6xl"}`,children:e}),v.jsx("div",{className:"pointer-events-none absolute inset-0 bg-[linear-gradient(rgba(18,16,16,0)_50%,rgba(0,0,0,0.1)_50%),linear-gradient(90deg,rgba(0,255,0,0.03),rgba(0,255,0,0.01))] bg-[length:100%_2px,3px_100%] opacity-0 dark:opacity-20 transition-opacity duration-300"})]})]}),v.jsx(gN,{}),v.jsx(tD,{isOpen:l,onClose:()=>f(!1),onConfirm:h})]})}const rD={hidden:{opacity:0,y:20},show:{opacity:1,y:0}},ua=({title:e,value:t,icon:n,subValue:i})=>v.jsxs(Sr.div,{variants:rD,className:"border border-azure-border dark:border-matrix-primary bg-azure-surface/50 dark:bg-zinc-950/50 p-6 rounded relative overflow-hidden group hover:border-azure-primary dark:hover:border-matrix-highlight transition-colors",children:[v.jsxs("div",{className:"flex justify-between items-start mb-4",children:[v.jsx("h3",{className:"text-azure-text-secondary dark:text-matrix-secondary text-sm font-bold uppercase",children:e}),v.jsx(n,{className:"w-6 h-6 text-azure-primary dark:text-matrix-primary group-hover:text-azure-primary dark:group-hover:text-matrix-highlight transition-colors"})]}),v.jsx("div",{className:"text-3xl font-bold text-azure-primary dark:text-matrix-highlight mb-1 font-mono tracking-tighter truncate",children:t}),i&&v.jsx("div",{className:"text-xs text-azure-text-secondary dark:text-matrix-secondary opacity-70 font-mono",children:i})]}),rp={fetchUsageStats:async()=>Dt.get("/stats/usage"),fetchGroupedUsageStats:async()=>Dt.get("/stats/usage/grouped")};function iD(){const{data:e}=pa("/api/stats/usage",rp.fetchUsageStats,{refreshInterval:5e3});return v.jsxs(v.Fragment,{children:[v.jsx(ua,{title:"Total Input",value:e?e.totalInputTokens.toLocaleString():"-",icon:VA,subValue:"Tokens processed"}),v.jsx(ua,{title:"Total Output",value:e?e.totalOutputTokens.toLocaleString():"-",icon:ZA,subValue:"Tokens generated"})]})}function aD(){const{data:e}=Fw(),t={hidden:{opacity:0},show:{opacity:1,transition:{staggerChildren:.1}}},n={hidden:{opacity:0,y:20},show:{opacity:1,y:0}};return v.jsxs(Sr.div,{className:"space-y-8",variants:t,initial:"hidden",animate:"show",children:[v.jsxs(Sr.div,{variants:n,children:[v.jsx("h2",{className:"text-2xl font-bold text-azure-primary dark:text-matrix-highlight mb-2",children:"SYSTEM STATUS"}),v.jsx("p",{className:"text-azure-text-secondary dark:text-matrix-secondary opacity-80",children:"Overview of the Morpheus agent runtime."})]}),v.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[v.jsx(ua,{title:"Agent Status",value:e?.status.toUpperCase()||"CONNECTING...",icon:ho,subValue:e?`PID: ${e.pid}`:""}),v.jsx(ua,{title:"Uptime",value:e?qw(e.uptimeSeconds):"-",icon:Ow,subValue:e?`${e.uptimeSeconds.toFixed(0)} seconds`:""}),v.jsx(ua,{title:"Version",value:e?.projectVersion||"-",icon:Rw,subValue:`Node ${e?.nodeVersion||"-"}`}),v.jsx(ua,{title:"Provider",value:e?.llmProvider?.toUpperCase()||"-",icon:qA,subValue:"LLM Inference Engine"}),v.jsx(ua,{title:"Model",value:e?.llmModel||"-",icon:HA,subValue:"Active Model"}),v.jsx(iD,{})]})]})}const oD=({sessions:e,activeSessionId:t,onSelectSession:n,onCreateSession:i,onArchiveSession:o,onDeleteSession:u,onRenameSession:l,isOpen:f,toggleSidebar:d})=>{const[h,p]=E.useState(null),[y,x]=E.useState(""),b=E.useRef(null);E.useEffect(()=>{h&&b.current&&b.current.focus()},[h]);const _=(N,T)=>{N.stopPropagation(),p(T.id),x(T.title||"Untitled Session")},z=N=>{N?.stopPropagation(),h&&y.trim()&&(l(h,y.trim()),p(null))},A=N=>{N?.stopPropagation(),p(null)},j=N=>{N.key==="Enter"?z():N.key==="Escape"&&A()};return f?v.jsxs("div",{className:"w-80 bg-white dark:bg-black border-r border-gray-200 dark:border-matrix-primary/30 flex flex-col h-full transition-all duration-300",children:[v.jsxs("div",{className:"p-4 border-b border-gray-200 dark:border-matrix-primary/30 flex justify-between items-center bg-azure-bg dark:bg-black",children:[v.jsx("h2",{className:"text-lg font-semibold text-gray-800 dark:text-matrix-highlight",children:"Sessions"}),v.jsx("button",{onClick:d,className:"p-1 rounded-lg hover:bg-gray-200 dark:hover:bg-matrix-primary/20 text-gray-500 dark:text-matrix-secondary",children:v.jsx(sl,{size:18})})]}),v.jsx("div",{className:"p-4",children:v.jsxs("button",{onClick:i,className:"w-full flex items-center justify-center gap-2 bg-azure-primary text-white dark:bg-matrix-highlight dark:text-black py-2 px-4 rounded-lg hover:bg-azure-secondary dark:hover:bg-matrix-secondary transition-colors shadow-sm",children:[v.jsx(r0,{size:18}),v.jsx("span",{children:"New Chat"})]})}),v.jsxs("div",{className:"flex-1 overflow-y-auto px-2 space-y-1 custom-scrollbar",children:[e.map(N=>v.jsxs("div",{onClick:()=>n(N.id),className:`group flex items-center justify-between p-3 rounded-lg cursor-pointer transition-all border ${t===N.id?"bg-azure-hover dark:bg-matrix-primary/20 border-azure-primary dark:border-matrix-highlight":"hover:bg-gray-50 dark:hover:bg-matrix-primary/10 border-transparent"}`,children:[v.jsx("div",{className:"flex flex-col overflow-hidden w-full mr-2",children:h===N.id?v.jsx("div",{className:"flex items-center gap-1 w-full",onClick:T=>T.stopPropagation(),children:v.jsx("input",{ref:b,type:"text",value:y,onChange:T=>x(T.target.value),onKeyDown:j,className:"w-full text-sm px-1 py-0.5 bg-white dark:bg-black border border-azure-primary dark:border-matrix-highlight rounded focus:outline-none dark:text-matrix-highlight"})}):v.jsxs(v.Fragment,{children:[v.jsx("span",{className:`text-sm font-medium truncate ${t===N.id?"text-azure-primary dark:text-matrix-highlight":"text-gray-700 dark:text-matrix-secondary"}`,children:N.title||"Untitled Session"}),v.jsx("span",{className:"text-xs text-gray-400 dark:text-matrix-secondary/70 mt-0.5",children:new Date(N.started_at).toLocaleString()})]})}),v.jsx("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:h===N.id?v.jsxs(v.Fragment,{children:[v.jsx("button",{onClick:z,className:"p-1.5 text-green-600 hover:bg-green-50 dark:text-matrix-highlight dark:hover:bg-matrix-primary/20 rounded",title:"Save",children:v.jsx(KA,{size:14})}),v.jsx("button",{onClick:A,className:"p-1.5 text-red-500 hover:bg-red-50 dark:text-red-400 dark:hover:bg-red-900/20 rounded",title:"Cancel",children:v.jsx($j,{size:14})})]}):v.jsxs(v.Fragment,{children:[v.jsx("button",{onClick:T=>_(T,N),className:"p-1.5 text-gray-400 hover:text-blue-500 hover:bg-blue-50 dark:hover:bg-blue-900/20 dark:text-matrix-secondary/50 dark:hover:text-blue-400 rounded",title:"Rename",children:v.jsx(gj,{size:14})}),v.jsx("button",{onClick:T=>{T.stopPropagation(),o(N.id)},className:"p-1.5 text-gray-400 hover:text-amber-500 hover:bg-amber-50 dark:hover:bg-amber-900/20 dark:text-matrix-secondary/50 dark:hover:text-amber-500 rounded",title:"Archive",children:v.jsx(LA,{size:14})}),v.jsx("button",{onClick:T=>{T.stopPropagation(),u(N.id)},className:"p-1.5 text-gray-400 hover:text-red-500 hover:bg-red-50 dark:hover:bg-red-900/20 dark:text-matrix-secondary/50 dark:hover:text-red-500 rounded",title:"Delete",children:v.jsx(zm,{size:14})})]})})]},N.id)),e.length===0&&v.jsx("div",{className:"text-center text-gray-400 dark:text-matrix-secondary/50 mt-10 text-sm",children:"No active sessions."})]})]}):v.jsxs("div",{className:"w-16 bg-white dark:bg-black border-r border-gray-200 dark:border-matrix-primary/30 flex flex-col items-center py-4 space-y-4 transition-colors duration-300",children:[v.jsx("button",{onClick:d,className:"p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-matrix-primary/20 text-gray-500 dark:text-matrix-secondary",title:"Expand Sidebar",children:v.jsx(sl,{})}),v.jsx("div",{className:"border-t border-gray-200 dark:border-matrix-primary/30 w-full my-2"}),v.jsx("button",{onClick:i,className:"p-3 bg-azure-primary text-white dark:bg-matrix-highlight dark:text-black rounded-full hover:bg-azure-secondary dark:hover:bg-matrix-secondary shadow-lg transition-all",title:"New Session",children:v.jsx(r0,{size:20})})]})};function sD(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const lD=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,uD=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,cD={};function O1(e,t){return(cD.jsx?uD:lD).test(e)}const fD=/[ \t\n\f\r]/g;function dD(e){return typeof e=="object"?e.type==="text"?R1(e.value):!1:R1(e)}function R1(e){return e.replace(fD,"")===""}class Tl{constructor(t,n,i){this.normal=n,this.property=t,i&&(this.space=i)}}Tl.prototype.normal={};Tl.prototype.property={};Tl.prototype.space=void 0;function jz(e,t){const n={},i={};for(const o of e)Object.assign(n,o.property),Object.assign(i,o.normal);return new Tl(n,i,t)}function ip(e){return e.toLowerCase()}class kn{constructor(t,n){this.attribute=n,this.property=t}}kn.prototype.attribute="";kn.prototype.booleanish=!1;kn.prototype.boolean=!1;kn.prototype.commaOrSpaceSeparated=!1;kn.prototype.commaSeparated=!1;kn.prototype.defined=!1;kn.prototype.mustUseProperty=!1;kn.prototype.number=!1;kn.prototype.overloadedBoolean=!1;kn.prototype.property="";kn.prototype.spaceSeparated=!1;kn.prototype.space=void 0;let hD=0;const je=xa(),Rt=xa(),ap=xa(),se=xa(),it=xa(),zo=xa(),Rn=xa();function xa(){return 2**++hD}const op=Object.freeze(Object.defineProperty({__proto__:null,boolean:je,booleanish:Rt,commaOrSpaceSeparated:Rn,commaSeparated:zo,number:se,overloadedBoolean:ap,spaceSeparated:it},Symbol.toStringTag,{value:"Module"})),Wh=Object.keys(op);class dg extends kn{constructor(t,n,i,o){let u=-1;if(super(t,n),M1(this,"space",o),typeof i=="number")for(;++u<Wh.length;){const l=Wh[u];M1(this,Wh[u],(i&op[l])===op[l])}}}dg.prototype.defined=!0;function M1(e,t,n){n&&(e[t]=n)}function Vo(e){const t={},n={};for(const[i,o]of Object.entries(e.properties)){const u=new dg(i,e.transform(e.attributes||{},i),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(i)&&(u.mustUseProperty=!0),t[i]=u,n[ip(i)]=i,n[ip(u.attribute)]=i}return new Tl(t,n,e.space)}const Nz=Vo({properties:{ariaActiveDescendant:null,ariaAtomic:Rt,ariaAutoComplete:null,ariaBusy:Rt,ariaChecked:Rt,ariaColCount:se,ariaColIndex:se,ariaColSpan:se,ariaControls:it,ariaCurrent:null,ariaDescribedBy:it,ariaDetails:null,ariaDisabled:Rt,ariaDropEffect:it,ariaErrorMessage:null,ariaExpanded:Rt,ariaFlowTo:it,ariaGrabbed:Rt,ariaHasPopup:null,ariaHidden:Rt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:it,ariaLevel:se,ariaLive:null,ariaModal:Rt,ariaMultiLine:Rt,ariaMultiSelectable:Rt,ariaOrientation:null,ariaOwns:it,ariaPlaceholder:null,ariaPosInSet:se,ariaPressed:Rt,ariaReadOnly:Rt,ariaRelevant:null,ariaRequired:Rt,ariaRoleDescription:it,ariaRowCount:se,ariaRowIndex:se,ariaRowSpan:se,ariaSelected:Rt,ariaSetSize:se,ariaSort:null,ariaValueMax:se,ariaValueMin:se,ariaValueNow:se,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Oz(e,t){return t in e?e[t]:t}function Rz(e,t){return Oz(e,t.toLowerCase())}const mD=Vo({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:zo,acceptCharset:it,accessKey:it,action:null,allow:null,allowFullScreen:je,allowPaymentRequest:je,allowUserMedia:je,alt:null,as:null,async:je,autoCapitalize:null,autoComplete:it,autoFocus:je,autoPlay:je,blocking:it,capture:null,charSet:null,checked:je,cite:null,className:it,cols:se,colSpan:null,content:null,contentEditable:Rt,controls:je,controlsList:it,coords:se|zo,crossOrigin:null,data:null,dateTime:null,decoding:null,default:je,defer:je,dir:null,dirName:null,disabled:je,download:ap,draggable:Rt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:je,formTarget:null,headers:it,height:se,hidden:ap,high:se,href:null,hrefLang:null,htmlFor:it,httpEquiv:it,id:null,imageSizes:null,imageSrcSet:null,inert:je,inputMode:null,integrity:null,is:null,isMap:je,itemId:null,itemProp:it,itemRef:it,itemScope:je,itemType:it,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:je,low:se,manifest:null,max:null,maxLength:se,media:null,method:null,min:null,minLength:se,multiple:je,muted:je,name:null,nonce:null,noModule:je,noValidate:je,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:je,optimum:se,pattern:null,ping:it,placeholder:null,playsInline:je,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:je,referrerPolicy:null,rel:it,required:je,reversed:je,rows:se,rowSpan:se,sandbox:it,scope:null,scoped:je,seamless:je,selected:je,shadowRootClonable:je,shadowRootDelegatesFocus:je,shadowRootMode:null,shape:null,size:se,sizes:null,slot:null,span:se,spellCheck:Rt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:se,step:null,style:null,tabIndex:se,target:null,title:null,translate:null,type:null,typeMustMatch:je,useMap:null,value:Rt,width:se,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:it,axis:null,background:null,bgColor:null,border:se,borderColor:null,bottomMargin:se,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:je,declare:je,event:null,face:null,frame:null,frameBorder:null,hSpace:se,leftMargin:se,link:null,longDesc:null,lowSrc:null,marginHeight:se,marginWidth:se,noResize:je,noHref:je,noShade:je,noWrap:je,object:null,profile:null,prompt:null,rev:null,rightMargin:se,rules:null,scheme:null,scrolling:Rt,standby:null,summary:null,text:null,topMargin:se,valueType:null,version:null,vAlign:null,vLink:null,vSpace:se,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:je,disableRemotePlayback:je,prefix:null,property:null,results:se,security:null,unselectable:null},space:"html",transform:Rz}),pD=Vo({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:Rn,accentHeight:se,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:se,amplitude:se,arabicForm:null,ascent:se,attributeName:null,attributeType:null,azimuth:se,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:se,by:null,calcMode:null,capHeight:se,className:it,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:se,diffuseConstant:se,direction:null,display:null,dur:null,divisor:se,dominantBaseline:null,download:je,dx:null,dy:null,edgeMode:null,editable:null,elevation:se,enableBackground:null,end:null,event:null,exponent:se,externalResourcesRequired:null,fill:null,fillOpacity:se,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:zo,g2:zo,glyphName:zo,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:se,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:se,horizOriginX:se,horizOriginY:se,id:null,ideographic:se,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:se,k:se,k1:se,k2:se,k3:se,k4:se,kernelMatrix:Rn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:se,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:se,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:se,overlineThickness:se,paintOrder:null,panose1:null,path:null,pathLength:se,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:it,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:se,pointsAtY:se,pointsAtZ:se,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Rn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Rn,rev:Rn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Rn,requiredFeatures:Rn,requiredFonts:Rn,requiredFormats:Rn,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:se,specularExponent:se,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:se,strikethroughThickness:se,string:null,stroke:null,strokeDashArray:Rn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:se,strokeOpacity:se,strokeWidth:null,style:null,surfaceScale:se,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Rn,tabIndex:se,tableValues:null,target:null,targetX:se,targetY:se,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Rn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:se,underlineThickness:se,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:se,values:null,vAlphabetic:se,vMathematical:se,vectorEffect:null,vHanging:se,vIdeographic:se,version:null,vertAdvY:se,vertOriginX:se,vertOriginY:se,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:se,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Oz}),Mz=Vo({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()}}),Dz=Vo({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Rz}),$z=Vo({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),gD={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"},yD=/[A-Z]/g,D1=/-[a-z]/g,xD=/^data[-\w.:]+$/i;function vD(e,t){const n=ip(t);let i=t,o=kn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&xD.test(t)){if(t.charAt(4)==="-"){const u=t.slice(5).replace(D1,SD);i="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=t.slice(4);if(!D1.test(u)){let l=u.replace(yD,bD);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}o=dg}return new o(i,t)}function bD(e){return"-"+e.toLowerCase()}function SD(e){return e.charAt(1).toUpperCase()}const wD=jz([Nz,mD,Mz,Dz,$z],"html"),hg=jz([Nz,pD,Mz,Dz,$z],"svg");function kD(e){return e.join(" ").trim()}var oo={},em,$1;function zD(){if($1)return em;$1=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,u=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,f=/^\s+|\s+$/g,d=`
20
+ `,h="/",p="*",y="",x="comment",b="declaration";function _(A,j){if(typeof A!="string")throw new TypeError("First argument must be a string");if(!A)return[];j=j||{};var N=1,T=1;function R(ue){var re=ue.match(t);re&&(N+=re.length);var V=ue.lastIndexOf(d);T=~V?ue.length-V:T+ue.length}function L(){var ue={line:N,column:T};return function(re){return re.position=new $(ue),K(),re}}function $(ue){this.start=ue,this.end={line:N,column:T},this.source=j.source}$.prototype.content=A;function q(ue){var re=new Error(j.source+":"+N+":"+T+": "+ue);if(re.reason=ue,re.filename=j.source,re.line=N,re.column=T,re.source=A,!j.silent)throw re}function P(ue){var re=ue.exec(A);if(re){var V=re[0];return R(V),A=A.slice(V.length),re}}function K(){P(n)}function ie(ue){var re;for(ue=ue||[];re=ne();)re!==!1&&ue.push(re);return ue}function ne(){var ue=L();if(!(h!=A.charAt(0)||p!=A.charAt(1))){for(var re=2;y!=A.charAt(re)&&(p!=A.charAt(re)||h!=A.charAt(re+1));)++re;if(re+=2,y===A.charAt(re-1))return q("End of comment missing");var V=A.slice(2,re-2);return T+=2,R(V),A=A.slice(re),T+=2,ue({type:x,comment:V})}}function oe(){var ue=L(),re=P(i);if(re){if(ne(),!P(o))return q("property missing ':'");var V=P(u),X=ue({type:b,property:z(re[0].replace(e,y)),value:V?z(V[0].replace(e,y)):y});return P(l),X}}function we(){var ue=[];ie(ue);for(var re;re=oe();)re!==!1&&(ue.push(re),ie(ue));return ue}return K(),we()}function z(A){return A?A.replace(f,y):y}return em=_,em}var L1;function _D(){if(L1)return oo;L1=1;var e=oo&&oo.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(oo,"__esModule",{value:!0}),oo.default=n;const t=e(zD());function n(i,o){let u=null;if(!i||typeof i!="string")return u;const l=(0,t.default)(i),f=typeof o=="function";return l.forEach(d=>{if(d.type!=="declaration")return;const{property:h,value:p}=d;f?o(h,p,d):p&&(u=u||{},u[h]=p)}),u}return oo}var Zs={},U1;function ED(){if(U1)return Zs;U1=1,Object.defineProperty(Zs,"__esModule",{value:!0}),Zs.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,u=function(h){return!h||n.test(h)||e.test(h)},l=function(h,p){return p.toUpperCase()},f=function(h,p){return"".concat(p,"-")},d=function(h,p){return p===void 0&&(p={}),u(h)?h:(h=h.toLowerCase(),p.reactCompat?h=h.replace(o,f):h=h.replace(i,f),h.replace(t,l))};return Zs.camelCase=d,Zs}var Bs,V1;function TD(){if(V1)return Bs;V1=1;var e=Bs&&Bs.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(_D()),n=ED();function i(o,u){var l={};return!o||typeof o!="string"||(0,t.default)(o,function(f,d){f&&d&&(l[(0,n.camelCase)(f,u)]=d)}),l}return i.default=i,Bs=i,Bs}var CD=TD();const AD=Sp(CD),Lz=Uz("end"),mg=Uz("start");function Uz(e){return t;function t(n){const i=n&&n.position&&n.position[e]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function jD(e){const t=mg(e),n=Lz(e);if(t&&n)return{start:t,end:n}}function rl(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?P1(e.position):"start"in e||"end"in e?P1(e):"line"in e||"column"in e?sp(e):""}function sp(e){return Z1(e&&e.line)+":"+Z1(e&&e.column)}function P1(e){return sp(e&&e.start)+"-"+sp(e&&e.end)}function Z1(e){return e&&typeof e=="number"?e:1}class rn extends Error{constructor(t,n,i){super(),typeof n=="string"&&(i=n,n=void 0);let o="",u={},l=!1;if(n&&("line"in n&&"column"in n?u={place:n}:"start"in n&&"end"in n?u={place:n}:"type"in n?u={ancestors:[n],place:n.position}:u={...n}),typeof t=="string"?o=t:!u.cause&&t&&(l=!0,o=t.message,u.cause=t),!u.ruleId&&!u.source&&typeof i=="string"){const d=i.indexOf(":");d===-1?u.ruleId=i:(u.source=i.slice(0,d),u.ruleId=i.slice(d+1))}if(!u.place&&u.ancestors&&u.ancestors){const d=u.ancestors[u.ancestors.length-1];d&&(u.place=d.position)}const f=u.place&&"start"in u.place?u.place.start:u.place;this.ancestors=u.ancestors||void 0,this.cause=u.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=f?f.line:void 0,this.name=rl(u.place)||"1:1",this.place=u.place||void 0,this.reason=this.message,this.ruleId=u.ruleId||void 0,this.source=u.source||void 0,this.stack=l&&u.cause&&typeof u.cause.stack=="string"?u.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}rn.prototype.file="";rn.prototype.name="";rn.prototype.reason="";rn.prototype.message="";rn.prototype.stack="";rn.prototype.column=void 0;rn.prototype.line=void 0;rn.prototype.ancestors=void 0;rn.prototype.cause=void 0;rn.prototype.fatal=void 0;rn.prototype.place=void 0;rn.prototype.ruleId=void 0;rn.prototype.source=void 0;const pg={}.hasOwnProperty,ND=new Map,OD=/[A-Z]/g,RD=new Set(["table","tbody","thead","tfoot","tr"]),MD=new Set(["td","th"]),Vz="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function DD(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let i;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=ID(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");i=BD(n,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:i,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"?hg:wD,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},u=Pz(o,e,void 0);return u&&typeof u!="string"?u:o.create(e,o.Fragment,{children:u||void 0},void 0)}function Pz(e,t,n){if(t.type==="element")return $D(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return LD(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return VD(e,t,n);if(t.type==="mdxjsEsm")return UD(e,t);if(t.type==="root")return PD(e,t,n);if(t.type==="text")return ZD(e,t)}function $D(e,t,n){const i=e.schema;let o=i;t.tagName.toLowerCase()==="svg"&&i.space==="html"&&(o=hg,e.schema=o),e.ancestors.push(t);const u=Bz(e,t.tagName,!1),l=HD(e,t);let f=yg(e,t);return RD.has(t.tagName)&&(f=f.filter(function(d){return typeof d=="string"?!dD(d):!0})),Zz(e,l,u,t),gg(l,f),e.ancestors.pop(),e.schema=i,e.create(t,u,l,n)}function LD(e,t){if(t.data&&t.data.estree&&e.evaluater){const i=t.data.estree.body[0];return i.type,e.evaluater.evaluateExpression(i.expression)}ml(e,t.position)}function UD(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ml(e,t.position)}function VD(e,t,n){const i=e.schema;let o=i;t.name==="svg"&&i.space==="html"&&(o=hg,e.schema=o),e.ancestors.push(t);const u=t.name===null?e.Fragment:Bz(e,t.name,!0),l=FD(e,t),f=yg(e,t);return Zz(e,l,u,t),gg(l,f),e.ancestors.pop(),e.schema=i,e.create(t,u,l,n)}function PD(e,t,n){const i={};return gg(i,yg(e,t)),e.create(t,e.Fragment,i,n)}function ZD(e,t){return t.value}function Zz(e,t,n,i){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=i)}function gg(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function BD(e,t,n){return i;function i(o,u,l,f){const h=Array.isArray(l.children)?n:t;return f?h(u,l,f):h(u,l)}}function ID(e,t){return n;function n(i,o,u,l){const f=Array.isArray(u.children),d=mg(i);return t(o,u,l,f,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function HD(e,t){const n={};let i,o;for(o in t.properties)if(o!=="children"&&pg.call(t.properties,o)){const u=qD(e,o,t.properties[o]);if(u){const[l,f]=u;e.tableCellAlignToStyle&&l==="align"&&typeof f=="string"&&MD.has(t.tagName)?i=f:n[l]=f}}if(i){const u=n.style||(n.style={});u[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return n}function FD(e,t){const n={};for(const i of t.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&e.evaluater){const u=i.data.estree.body[0];u.type;const l=u.expression;l.type;const f=l.properties[0];f.type,Object.assign(n,e.evaluater.evaluateExpression(f.argument))}else ml(e,t.position);else{const o=i.name;let u;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&e.evaluater){const f=i.value.data.estree.body[0];f.type,u=e.evaluater.evaluateExpression(f.expression)}else ml(e,t.position);else u=i.value===null?!0:i.value;n[o]=u}return n}function yg(e,t){const n=[];let i=-1;const o=e.passKeys?new Map:ND;for(;++i<t.children.length;){const u=t.children[i];let l;if(e.passKeys){const d=u.type==="element"?u.tagName:u.type==="mdxJsxFlowElement"||u.type==="mdxJsxTextElement"?u.name:void 0;if(d){const h=o.get(d)||0;l=d+"-"+h,o.set(d,h+1)}}const f=Pz(e,u,l);f!==void 0&&n.push(f)}return n}function qD(e,t,n){const i=vD(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=i.commaSeparated?sD(n):kD(n)),i.property==="style"){let o=typeof n=="object"?n:GD(e,String(n));return e.stylePropertyNameCase==="css"&&(o=YD(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&i.space?gD[i.property]||i.property:i.attribute,n]}}function GD(e,t){try{return AD(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const i=n,o=new rn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=Vz+"#cannot-parse-style-attribute",o}}function Bz(e,t,n){let i;if(!n)i={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let u=-1,l;for(;++u<o.length;){const f=O1(o[u])?{type:"Identifier",name:o[u]}:{type:"Literal",value:o[u]};l=l?{type:"MemberExpression",object:l,property:f,computed:!!(u&&f.type==="Literal"),optional:!1}:f}i=l}else i=O1(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(i.type==="Literal"){const o=i.value;return pg.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(i);ml(e)}function ml(e,t){const n=new rn("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=Vz+"#cannot-handle-mdx-estrees-without-createevaluater",n}function YD(e){const t={};let n;for(n in e)pg.call(e,n)&&(t[XD(n)]=e[n]);return t}function XD(e){let t=e.replace(OD,KD);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function KD(e){return"-"+e.toLowerCase()}const tm={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"]},JD={};function QD(e,t){const n=JD,i=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Iz(e,i,o)}function Iz(e,t,n){if(WD(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 B1(e.children,t,n)}return Array.isArray(e)?B1(e,t,n):""}function B1(e,t,n){const i=[];let o=-1;for(;++o<e.length;)i[o]=Iz(e[o],t,n);return i.join("")}function WD(e){return!!(e&&typeof e=="object")}const I1=document.createElement("i");function xg(e){const t="&"+e+";";I1.innerHTML=t;const n=I1.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function zr(e,t,n,i){const o=e.length;let u=0,l;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,i.length<1e4)l=Array.from(i),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);u<i.length;)l=i.slice(u,u+1e4),l.unshift(t,0),e.splice(...l),u+=1e4,t+=1e4}function Qn(e,t){return e.length>0?(zr(e,e.length,0,t),e):t}const H1={}.hasOwnProperty;function e3(e){const t={};let n=-1;for(;++n<e.length;)t3(t,e[n]);return t}function t3(e,t){let n;for(n in t){const o=(H1.call(e,n)?e[n]:void 0)||(e[n]={}),u=t[n];let l;if(u)for(l in u){H1.call(o,l)||(o[l]=[]);const f=u[l];n3(o[l],Array.isArray(f)?f:f?[f]:[])}}}function n3(e,t){let n=-1;const i=[];for(;++n<t.length;)(t[n].add==="after"?e:i).push(t[n]);zr(e,0,0,i)}function Hz(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 _o(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const br=Ri(/[A-Za-z]/),Mn=Ri(/[\dA-Za-z]/),r3=Ri(/[#-'*+\--9=?A-Z^-~]/);function lp(e){return e!==null&&(e<32||e===127)}const up=Ri(/\d/),i3=Ri(/[\dA-Fa-f]/),a3=Ri(/[!-/:-@[-`{-~]/);function _e(e){return e!==null&&e<-2}function wn(e){return e!==null&&(e<0||e===32)}function Fe(e){return e===-2||e===-1||e===32}const o3=Ri(new RegExp("\\p{P}|\\p{S}","u")),s3=Ri(/\s/);function Ri(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Po(e){const t=[];let n=-1,i=0,o=0;for(;++n<e.length;){const u=e.charCodeAt(n);let l="";if(u===37&&Mn(e.charCodeAt(n+1))&&Mn(e.charCodeAt(n+2)))o=2;else if(u<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(u))||(l=String.fromCharCode(u));else if(u>55295&&u<57344){const f=e.charCodeAt(n+1);u<56320&&f>56319&&f<57344?(l=String.fromCharCode(u,f),o=1):l="�"}else l=String.fromCharCode(u);l&&(t.push(e.slice(i,n),encodeURIComponent(l)),i=n+o+1,l=""),o&&(n+=o,o=0)}return t.join("")+e.slice(i)}function ot(e,t,n,i){const o=i?i-1:Number.POSITIVE_INFINITY;let u=0;return l;function l(d){return Fe(d)?(e.enter(n),f(d)):t(d)}function f(d){return Fe(d)&&u++<o?(e.consume(d),f):(e.exit(n),t(d))}}const l3={tokenize:u3};function u3(e){const t=e.attempt(this.parser.constructs.contentInitial,i,o);let n;return t;function i(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),ot(e,t,"linePrefix")}function o(f){return e.enter("paragraph"),u(f)}function u(f){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,l(f)}function l(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return _e(f)?(e.consume(f),e.exit("chunkText"),u):(e.consume(f),l)}}const c3={tokenize:f3},F1={tokenize:d3};function f3(e){const t=this,n=[];let i=0,o,u,l;return f;function f(T){if(i<n.length){const R=n[i];return t.containerState=R[1],e.attempt(R[0].continuation,d,h)(T)}return h(T)}function d(T){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&N();const R=t.events.length;let L=R,$;for(;L--;)if(t.events[L][0]==="exit"&&t.events[L][1].type==="chunkFlow"){$=t.events[L][1].end;break}j(i);let q=R;for(;q<t.events.length;)t.events[q][1].end={...$},q++;return zr(t.events,L+1,0,t.events.slice(R)),t.events.length=q,h(T)}return f(T)}function h(T){if(i===n.length){if(!o)return x(T);if(o.currentConstruct&&o.currentConstruct.concrete)return _(T);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(F1,p,y)(T)}function p(T){return o&&N(),j(i),x(T)}function y(T){return t.parser.lazy[t.now().line]=i!==n.length,l=t.now().offset,_(T)}function x(T){return t.containerState={},e.attempt(F1,b,_)(T)}function b(T){return i++,n.push([t.currentConstruct,t.containerState]),x(T)}function _(T){if(T===null){o&&N(),j(0),e.consume(T);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:u}),z(T)}function z(T){if(T===null){A(e.exit("chunkFlow"),!0),j(0),e.consume(T);return}return _e(T)?(e.consume(T),A(e.exit("chunkFlow")),i=0,t.interrupt=void 0,f):(e.consume(T),z)}function A(T,R){const L=t.sliceStream(T);if(R&&L.push(null),T.previous=u,u&&(u.next=T),u=T,o.defineSkip(T.start),o.write(L),t.parser.lazy[T.start.line]){let $=o.events.length;for(;$--;)if(o.events[$][1].start.offset<l&&(!o.events[$][1].end||o.events[$][1].end.offset>l))return;const q=t.events.length;let P=q,K,ie;for(;P--;)if(t.events[P][0]==="exit"&&t.events[P][1].type==="chunkFlow"){if(K){ie=t.events[P][1].end;break}K=!0}for(j(i),$=q;$<t.events.length;)t.events[$][1].end={...ie},$++;zr(t.events,P+1,0,t.events.slice(q)),t.events.length=$}}function j(T){let R=n.length;for(;R-- >T;){const L=n[R];t.containerState=L[1],L[0].exit.call(t,e)}n.length=T}function N(){o.write([null]),u=void 0,o=void 0,t.containerState._closeFlow=void 0}}function d3(e,t,n){return ot(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function q1(e){if(e===null||wn(e)||s3(e))return 1;if(o3(e))return 2}function vg(e,t,n){const i=[];let o=-1;for(;++o<e.length;){const u=e[o].resolveAll;u&&!i.includes(u)&&(t=u(t,n),i.push(u))}return t}const cp={name:"attention",resolveAll:h3,tokenize:m3};function h3(e,t){let n=-1,i,o,u,l,f,d,h,p;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(i=n;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const y={...e[i][1].end},x={...e[n][1].start};G1(y,-d),G1(x,d),l={type:d>1?"strongSequence":"emphasisSequence",start:y,end:{...e[i][1].end}},f={type:d>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:x},u={type:d>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[n][1].start}},o={type:d>1?"strong":"emphasis",start:{...l.start},end:{...f.end}},e[i][1].end={...l.start},e[n][1].start={...f.end},h=[],e[i][1].end.offset-e[i][1].start.offset&&(h=Qn(h,[["enter",e[i][1],t],["exit",e[i][1],t]])),h=Qn(h,[["enter",o,t],["enter",l,t],["exit",l,t],["enter",u,t]]),h=Qn(h,vg(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),h=Qn(h,[["exit",u,t],["enter",f,t],["exit",f,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,h=Qn(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,zr(e,i-1,n-i+3,h),n=i+h.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function m3(e,t){const n=this.parser.constructs.attentionMarkers.null,i=this.previous,o=q1(i);let u;return l;function l(d){return u=d,e.enter("attentionSequence"),f(d)}function f(d){if(d===u)return e.consume(d),f;const h=e.exit("attentionSequence"),p=q1(d),y=!p||p===2&&o||n.includes(d),x=!o||o===2&&p||n.includes(i);return h._open=!!(u===42?y:y&&(o||!x)),h._close=!!(u===42?x:x&&(p||!y)),t(d)}}function G1(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const p3={name:"autolink",tokenize:g3};function g3(e,t,n){let i=0;return o;function o(b){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),u}function u(b){return br(b)?(e.consume(b),l):b===64?n(b):h(b)}function l(b){return b===43||b===45||b===46||Mn(b)?(i=1,f(b)):h(b)}function f(b){return b===58?(e.consume(b),i=0,d):(b===43||b===45||b===46||Mn(b))&&i++<32?(e.consume(b),f):(i=0,h(b))}function d(b){return b===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):b===null||b===32||b===60||lp(b)?n(b):(e.consume(b),d)}function h(b){return b===64?(e.consume(b),p):r3(b)?(e.consume(b),h):n(b)}function p(b){return Mn(b)?y(b):n(b)}function y(b){return b===46?(e.consume(b),i=0,p):b===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):x(b)}function x(b){if((b===45||Mn(b))&&i++<63){const _=b===45?x:y;return e.consume(b),_}return n(b)}}const Kc={partial:!0,tokenize:y3};function y3(e,t,n){return i;function i(u){return Fe(u)?ot(e,o,"linePrefix")(u):o(u)}function o(u){return u===null||_e(u)?t(u):n(u)}}const Fz={continuation:{tokenize:v3},exit:b3,name:"blockQuote",tokenize:x3};function x3(e,t,n){const i=this;return o;function o(l){if(l===62){const f=i.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),u}return n(l)}function u(l){return Fe(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function v3(e,t,n){const i=this;return o;function o(l){return Fe(l)?ot(e,u,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):u(l)}function u(l){return e.attempt(Fz,t,n)(l)}}function b3(e){e.exit("blockQuote")}const qz={name:"characterEscape",tokenize:S3};function S3(e,t,n){return i;function i(u){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(u),e.exit("escapeMarker"),o}function o(u){return a3(u)?(e.enter("characterEscapeValue"),e.consume(u),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(u)}}const Gz={name:"characterReference",tokenize:w3};function w3(e,t,n){const i=this;let o=0,u,l;return f;function f(y){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(y),e.exit("characterReferenceMarker"),d}function d(y){return y===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(y),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),u=31,l=Mn,p(y))}function h(y){return y===88||y===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(y),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),u=6,l=i3,p):(e.enter("characterReferenceValue"),u=7,l=up,p(y))}function p(y){if(y===59&&o){const x=e.exit("characterReferenceValue");return l===Mn&&!xg(i.sliceSerialize(x))?n(y):(e.enter("characterReferenceMarker"),e.consume(y),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(y)&&o++<u?(e.consume(y),p):n(y)}}const Y1={partial:!0,tokenize:z3},X1={concrete:!0,name:"codeFenced",tokenize:k3};function k3(e,t,n){const i=this,o={partial:!0,tokenize:L};let u=0,l=0,f;return d;function d($){return h($)}function h($){const q=i.events[i.events.length-1];return u=q&&q[1].type==="linePrefix"?q[2].sliceSerialize(q[1],!0).length:0,f=$,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p($)}function p($){return $===f?(l++,e.consume($),p):l<3?n($):(e.exit("codeFencedFenceSequence"),Fe($)?ot(e,y,"whitespace")($):y($))}function y($){return $===null||_e($)?(e.exit("codeFencedFence"),i.interrupt?t($):e.check(Y1,z,R)($)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),x($))}function x($){return $===null||_e($)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),y($)):Fe($)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ot(e,b,"whitespace")($)):$===96&&$===f?n($):(e.consume($),x)}function b($){return $===null||_e($)?y($):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),_($))}function _($){return $===null||_e($)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),y($)):$===96&&$===f?n($):(e.consume($),_)}function z($){return e.attempt(o,R,A)($)}function A($){return e.enter("lineEnding"),e.consume($),e.exit("lineEnding"),j}function j($){return u>0&&Fe($)?ot(e,N,"linePrefix",u+1)($):N($)}function N($){return $===null||_e($)?e.check(Y1,z,R)($):(e.enter("codeFlowValue"),T($))}function T($){return $===null||_e($)?(e.exit("codeFlowValue"),N($)):(e.consume($),T)}function R($){return e.exit("codeFenced"),t($)}function L($,q,P){let K=0;return ie;function ie(re){return $.enter("lineEnding"),$.consume(re),$.exit("lineEnding"),ne}function ne(re){return $.enter("codeFencedFence"),Fe(re)?ot($,oe,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(re):oe(re)}function oe(re){return re===f?($.enter("codeFencedFenceSequence"),we(re)):P(re)}function we(re){return re===f?(K++,$.consume(re),we):K>=l?($.exit("codeFencedFenceSequence"),Fe(re)?ot($,ue,"whitespace")(re):ue(re)):P(re)}function ue(re){return re===null||_e(re)?($.exit("codeFencedFence"),q(re)):P(re)}}}function z3(e,t,n){const i=this;return o;function o(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),u)}function u(l){return i.parser.lazy[i.now().line]?n(l):t(l)}}const nm={name:"codeIndented",tokenize:E3},_3={partial:!0,tokenize:T3};function E3(e,t,n){const i=this;return o;function o(h){return e.enter("codeIndented"),ot(e,u,"linePrefix",5)(h)}function u(h){const p=i.events[i.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?l(h):n(h)}function l(h){return h===null?d(h):_e(h)?e.attempt(_3,l,d)(h):(e.enter("codeFlowValue"),f(h))}function f(h){return h===null||_e(h)?(e.exit("codeFlowValue"),l(h)):(e.consume(h),f)}function d(h){return e.exit("codeIndented"),t(h)}}function T3(e,t,n){const i=this;return o;function o(l){return i.parser.lazy[i.now().line]?n(l):_e(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):ot(e,u,"linePrefix",5)(l)}function u(l){const f=i.events[i.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(l):_e(l)?o(l):n(l)}}const C3={name:"codeText",previous:j3,resolve:A3,tokenize:N3};function A3(e){let t=e.length-4,n=3,i,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(i=n;++i<t;)if(e[i][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(i=n-1,t++;++i<=t;)o===void 0?i!==t&&e[i][1].type!=="lineEnding"&&(o=i):(i===t||e[i][1].type==="lineEnding")&&(e[o][1].type="codeTextData",i!==o+2&&(e[o][1].end=e[i-1][1].end,e.splice(o+2,i-o-2),t-=i-o-2,i=o+2),o=void 0);return e}function j3(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function N3(e,t,n){let i=0,o,u;return l;function l(y){return e.enter("codeText"),e.enter("codeTextSequence"),f(y)}function f(y){return y===96?(e.consume(y),i++,f):(e.exit("codeTextSequence"),d(y))}function d(y){return y===null?n(y):y===32?(e.enter("space"),e.consume(y),e.exit("space"),d):y===96?(u=e.enter("codeTextSequence"),o=0,p(y)):_e(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),d):(e.enter("codeTextData"),h(y))}function h(y){return y===null||y===32||y===96||_e(y)?(e.exit("codeTextData"),d(y)):(e.consume(y),h)}function p(y){return y===96?(e.consume(y),o++,p):o===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(y)):(u.type="codeTextData",h(y))}}class O3{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 i=n??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(t,i):t>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(t,n,i){const o=n||0;this.setCursor(Math.trunc(t));const u=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return i&&Is(this.left,i),u.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),Is(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Is(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);Is(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Is(this.left,n.reverse())}}}function Is(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 Yz(e){const t={};let n=-1,i,o,u,l,f,d,h;const p=new O3(e);for(;++n<p.length;){for(;n in t;)n=t[n];if(i=p.get(n),n&&i[1].type==="chunkFlow"&&p.get(n-1)[1].type==="listItemPrefix"&&(d=i[1]._tokenizer.events,u=0,u<d.length&&d[u][1].type==="lineEndingBlank"&&(u+=2),u<d.length&&d[u][1].type==="content"))for(;++u<d.length&&d[u][1].type!=="content";)d[u][1].type==="chunkText"&&(d[u][1]._isInFirstContentOfListItem=!0,u++);if(i[0]==="enter")i[1].contentType&&(Object.assign(t,R3(p,n)),n=t[n],h=!0);else if(i[1]._container){for(u=n,o=void 0;u--;)if(l=p.get(u),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(o&&(p.get(o)[1].type="lineEndingBlank"),l[1].type="lineEnding",o=u);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;o&&(i[1].end={...p.get(o)[1].start},f=p.slice(o,n),f.unshift(i),p.splice(o,n-o+1,f))}}return zr(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!h}function R3(e,t){const n=e.get(t)[1],i=e.get(t)[2];let o=t-1;const u=[];let l=n._tokenizer;l||(l=i.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const f=l.events,d=[],h={};let p,y,x=-1,b=n,_=0,z=0;const A=[z];for(;b;){for(;e.get(++o)[1]!==b;);u.push(o),b._tokenizer||(p=i.sliceStream(b),b.next||p.push(null),y&&l.defineSkip(b.start),b._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(p),b._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),y=b,b=b.next}for(b=n;++x<f.length;)f[x][0]==="exit"&&f[x-1][0]==="enter"&&f[x][1].type===f[x-1][1].type&&f[x][1].start.line!==f[x][1].end.line&&(z=x+1,A.push(z),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(l.events=[],b?(b._tokenizer=void 0,b.previous=void 0):A.pop(),x=A.length;x--;){const j=f.slice(A[x],A[x+1]),N=u.pop();d.push([N,N+j.length-1]),e.splice(N,2,j)}for(d.reverse(),x=-1;++x<d.length;)h[_+d[x][0]]=_+d[x][1],_+=d[x][1]-d[x][0]-1;return h}const M3={resolve:$3,tokenize:L3},D3={partial:!0,tokenize:U3};function $3(e){return Yz(e),e}function L3(e,t){let n;return i;function i(f){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(f)}function o(f){return f===null?u(f):_e(f)?e.check(D3,l,u)(f):(e.consume(f),o)}function u(f){return e.exit("chunkContent"),e.exit("content"),t(f)}function l(f){return e.consume(f),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function U3(e,t,n){const i=this;return o;function o(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),ot(e,u,"linePrefix")}function u(l){if(l===null||_e(l))return n(l);const f=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(l):e.interrupt(i.parser.constructs.flow,n,t)(l)}}function Xz(e,t,n,i,o,u,l,f,d){const h=d||Number.POSITIVE_INFINITY;let p=0;return y;function y(j){return j===60?(e.enter(i),e.enter(o),e.enter(u),e.consume(j),e.exit(u),x):j===null||j===32||j===41||lp(j)?n(j):(e.enter(i),e.enter(l),e.enter(f),e.enter("chunkString",{contentType:"string"}),z(j))}function x(j){return j===62?(e.enter(u),e.consume(j),e.exit(u),e.exit(o),e.exit(i),t):(e.enter(f),e.enter("chunkString",{contentType:"string"}),b(j))}function b(j){return j===62?(e.exit("chunkString"),e.exit(f),x(j)):j===null||j===60||_e(j)?n(j):(e.consume(j),j===92?_:b)}function _(j){return j===60||j===62||j===92?(e.consume(j),b):b(j)}function z(j){return!p&&(j===null||j===41||wn(j))?(e.exit("chunkString"),e.exit(f),e.exit(l),e.exit(i),t(j)):p<h&&j===40?(e.consume(j),p++,z):j===41?(e.consume(j),p--,z):j===null||j===32||j===40||lp(j)?n(j):(e.consume(j),j===92?A:z)}function A(j){return j===40||j===41||j===92?(e.consume(j),z):z(j)}}function Kz(e,t,n,i,o,u){const l=this;let f=0,d;return h;function h(b){return e.enter(i),e.enter(o),e.consume(b),e.exit(o),e.enter(u),p}function p(b){return f>999||b===null||b===91||b===93&&!d||b===94&&!f&&"_hiddenFootnoteSupport"in l.parser.constructs?n(b):b===93?(e.exit(u),e.enter(o),e.consume(b),e.exit(o),e.exit(i),t):_e(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),y(b))}function y(b){return b===null||b===91||b===93||_e(b)||f++>999?(e.exit("chunkString"),p(b)):(e.consume(b),d||(d=!Fe(b)),b===92?x:y)}function x(b){return b===91||b===92||b===93?(e.consume(b),f++,y):y(b)}}function Jz(e,t,n,i,o,u){let l;return f;function f(x){return x===34||x===39||x===40?(e.enter(i),e.enter(o),e.consume(x),e.exit(o),l=x===40?41:x,d):n(x)}function d(x){return x===l?(e.enter(o),e.consume(x),e.exit(o),e.exit(i),t):(e.enter(u),h(x))}function h(x){return x===l?(e.exit(u),d(l)):x===null?n(x):_e(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),ot(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(x))}function p(x){return x===l||x===null||_e(x)?(e.exit("chunkString"),h(x)):(e.consume(x),x===92?y:p)}function y(x){return x===l||x===92?(e.consume(x),p):p(x)}}function il(e,t){let n;return i;function i(o){return _e(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,i):Fe(o)?ot(e,i,n?"linePrefix":"lineSuffix")(o):t(o)}}const V3={name:"definition",tokenize:Z3},P3={partial:!0,tokenize:B3};function Z3(e,t,n){const i=this;let o;return u;function u(b){return e.enter("definition"),l(b)}function l(b){return Kz.call(i,e,f,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function f(b){return o=_o(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),d):n(b)}function d(b){return wn(b)?il(e,h)(b):h(b)}function h(b){return Xz(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function p(b){return e.attempt(P3,y,y)(b)}function y(b){return Fe(b)?ot(e,x,"whitespace")(b):x(b)}function x(b){return b===null||_e(b)?(e.exit("definition"),i.parser.defined.push(o),t(b)):n(b)}}function B3(e,t,n){return i;function i(f){return wn(f)?il(e,o)(f):n(f)}function o(f){return Jz(e,u,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function u(f){return Fe(f)?ot(e,l,"whitespace")(f):l(f)}function l(f){return f===null||_e(f)?t(f):n(f)}}const I3={name:"hardBreakEscape",tokenize:H3};function H3(e,t,n){return i;function i(u){return e.enter("hardBreakEscape"),e.consume(u),o}function o(u){return _e(u)?(e.exit("hardBreakEscape"),t(u)):n(u)}}const F3={name:"headingAtx",resolve:q3,tokenize:G3};function q3(e,t){let n=e.length-2,i=3,o,u;return e[i][1].type==="whitespace"&&(i+=2),n-2>i&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(i===n-1||n-4>i&&e[n-2][1].type==="whitespace")&&(n-=i+1===n?2:4),n>i&&(o={type:"atxHeadingText",start:e[i][1].start,end:e[n][1].end},u={type:"chunkText",start:e[i][1].start,end:e[n][1].end,contentType:"text"},zr(e,i,n-i+1,[["enter",o,t],["enter",u,t],["exit",u,t],["exit",o,t]])),e}function G3(e,t,n){let i=0;return o;function o(p){return e.enter("atxHeading"),u(p)}function u(p){return e.enter("atxHeadingSequence"),l(p)}function l(p){return p===35&&i++<6?(e.consume(p),l):p===null||wn(p)?(e.exit("atxHeadingSequence"),f(p)):n(p)}function f(p){return p===35?(e.enter("atxHeadingSequence"),d(p)):p===null||_e(p)?(e.exit("atxHeading"),t(p)):Fe(p)?ot(e,f,"whitespace")(p):(e.enter("atxHeadingText"),h(p))}function d(p){return p===35?(e.consume(p),d):(e.exit("atxHeadingSequence"),f(p))}function h(p){return p===null||p===35||wn(p)?(e.exit("atxHeadingText"),f(p)):(e.consume(p),h)}}const Y3=["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"],K1=["pre","script","style","textarea"],X3={concrete:!0,name:"htmlFlow",resolveTo:Q3,tokenize:W3},K3={partial:!0,tokenize:t$},J3={partial:!0,tokenize:e$};function Q3(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 W3(e,t,n){const i=this;let o,u,l,f,d;return h;function h(k){return p(k)}function p(k){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(k),y}function y(k){return k===33?(e.consume(k),x):k===47?(e.consume(k),u=!0,z):k===63?(e.consume(k),o=3,i.interrupt?t:O):br(k)?(e.consume(k),l=String.fromCharCode(k),A):n(k)}function x(k){return k===45?(e.consume(k),o=2,b):k===91?(e.consume(k),o=5,f=0,_):br(k)?(e.consume(k),o=4,i.interrupt?t:O):n(k)}function b(k){return k===45?(e.consume(k),i.interrupt?t:O):n(k)}function _(k){const ae="CDATA[";return k===ae.charCodeAt(f++)?(e.consume(k),f===ae.length?i.interrupt?t:oe:_):n(k)}function z(k){return br(k)?(e.consume(k),l=String.fromCharCode(k),A):n(k)}function A(k){if(k===null||k===47||k===62||wn(k)){const ae=k===47,xe=l.toLowerCase();return!ae&&!u&&K1.includes(xe)?(o=1,i.interrupt?t(k):oe(k)):Y3.includes(l.toLowerCase())?(o=6,ae?(e.consume(k),j):i.interrupt?t(k):oe(k)):(o=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(k):u?N(k):T(k))}return k===45||Mn(k)?(e.consume(k),l+=String.fromCharCode(k),A):n(k)}function j(k){return k===62?(e.consume(k),i.interrupt?t:oe):n(k)}function N(k){return Fe(k)?(e.consume(k),N):ie(k)}function T(k){return k===47?(e.consume(k),ie):k===58||k===95||br(k)?(e.consume(k),R):Fe(k)?(e.consume(k),T):ie(k)}function R(k){return k===45||k===46||k===58||k===95||Mn(k)?(e.consume(k),R):L(k)}function L(k){return k===61?(e.consume(k),$):Fe(k)?(e.consume(k),L):T(k)}function $(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),d=k,q):Fe(k)?(e.consume(k),$):P(k)}function q(k){return k===d?(e.consume(k),d=null,K):k===null||_e(k)?n(k):(e.consume(k),q)}function P(k){return k===null||k===34||k===39||k===47||k===60||k===61||k===62||k===96||wn(k)?L(k):(e.consume(k),P)}function K(k){return k===47||k===62||Fe(k)?T(k):n(k)}function ie(k){return k===62?(e.consume(k),ne):n(k)}function ne(k){return k===null||_e(k)?oe(k):Fe(k)?(e.consume(k),ne):n(k)}function oe(k){return k===45&&o===2?(e.consume(k),V):k===60&&o===1?(e.consume(k),X):k===62&&o===4?(e.consume(k),C):k===63&&o===3?(e.consume(k),O):k===93&&o===5?(e.consume(k),ve):_e(k)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(K3,F,we)(k)):k===null||_e(k)?(e.exit("htmlFlowData"),we(k)):(e.consume(k),oe)}function we(k){return e.check(J3,ue,F)(k)}function ue(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),re}function re(k){return k===null||_e(k)?we(k):(e.enter("htmlFlowData"),oe(k))}function V(k){return k===45?(e.consume(k),O):oe(k)}function X(k){return k===47?(e.consume(k),l="",G):oe(k)}function G(k){if(k===62){const ae=l.toLowerCase();return K1.includes(ae)?(e.consume(k),C):oe(k)}return br(k)&&l.length<8?(e.consume(k),l+=String.fromCharCode(k),G):oe(k)}function ve(k){return k===93?(e.consume(k),O):oe(k)}function O(k){return k===62?(e.consume(k),C):k===45&&o===2?(e.consume(k),O):oe(k)}function C(k){return k===null||_e(k)?(e.exit("htmlFlowData"),F(k)):(e.consume(k),C)}function F(k){return e.exit("htmlFlow"),t(k)}}function e$(e,t,n){const i=this;return o;function o(l){return _e(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),u):n(l)}function u(l){return i.parser.lazy[i.now().line]?n(l):t(l)}}function t$(e,t,n){return i;function i(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Kc,t,n)}}const n$={name:"htmlText",tokenize:r$};function r$(e,t,n){const i=this;let o,u,l;return f;function f(O){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(O),d}function d(O){return O===33?(e.consume(O),h):O===47?(e.consume(O),L):O===63?(e.consume(O),T):br(O)?(e.consume(O),P):n(O)}function h(O){return O===45?(e.consume(O),p):O===91?(e.consume(O),u=0,_):br(O)?(e.consume(O),N):n(O)}function p(O){return O===45?(e.consume(O),b):n(O)}function y(O){return O===null?n(O):O===45?(e.consume(O),x):_e(O)?(l=y,X(O)):(e.consume(O),y)}function x(O){return O===45?(e.consume(O),b):y(O)}function b(O){return O===62?V(O):O===45?x(O):y(O)}function _(O){const C="CDATA[";return O===C.charCodeAt(u++)?(e.consume(O),u===C.length?z:_):n(O)}function z(O){return O===null?n(O):O===93?(e.consume(O),A):_e(O)?(l=z,X(O)):(e.consume(O),z)}function A(O){return O===93?(e.consume(O),j):z(O)}function j(O){return O===62?V(O):O===93?(e.consume(O),j):z(O)}function N(O){return O===null||O===62?V(O):_e(O)?(l=N,X(O)):(e.consume(O),N)}function T(O){return O===null?n(O):O===63?(e.consume(O),R):_e(O)?(l=T,X(O)):(e.consume(O),T)}function R(O){return O===62?V(O):T(O)}function L(O){return br(O)?(e.consume(O),$):n(O)}function $(O){return O===45||Mn(O)?(e.consume(O),$):q(O)}function q(O){return _e(O)?(l=q,X(O)):Fe(O)?(e.consume(O),q):V(O)}function P(O){return O===45||Mn(O)?(e.consume(O),P):O===47||O===62||wn(O)?K(O):n(O)}function K(O){return O===47?(e.consume(O),V):O===58||O===95||br(O)?(e.consume(O),ie):_e(O)?(l=K,X(O)):Fe(O)?(e.consume(O),K):V(O)}function ie(O){return O===45||O===46||O===58||O===95||Mn(O)?(e.consume(O),ie):ne(O)}function ne(O){return O===61?(e.consume(O),oe):_e(O)?(l=ne,X(O)):Fe(O)?(e.consume(O),ne):K(O)}function oe(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),o=O,we):_e(O)?(l=oe,X(O)):Fe(O)?(e.consume(O),oe):(e.consume(O),ue)}function we(O){return O===o?(e.consume(O),o=void 0,re):O===null?n(O):_e(O)?(l=we,X(O)):(e.consume(O),we)}function ue(O){return O===null||O===34||O===39||O===60||O===61||O===96?n(O):O===47||O===62||wn(O)?K(O):(e.consume(O),ue)}function re(O){return O===47||O===62||wn(O)?K(O):n(O)}function V(O){return O===62?(e.consume(O),e.exit("htmlTextData"),e.exit("htmlText"),t):n(O)}function X(O){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),G}function G(O){return Fe(O)?ot(e,ve,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):ve(O)}function ve(O){return e.enter("htmlTextData"),l(O)}}const bg={name:"labelEnd",resolveAll:s$,resolveTo:l$,tokenize:u$},i$={tokenize:c$},a$={tokenize:f$},o$={tokenize:d$};function s$(e){let t=-1;const n=[];for(;++t<e.length;){const i=e[t][1];if(n.push(e[t]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const o=i.type==="labelImage"?4:2;i.type="data",t+=o}}return e.length!==n.length&&zr(e,0,e.length,n),e}function l$(e,t){let n=e.length,i=0,o,u,l,f;for(;n--;)if(o=e[n][1],u){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(u=n,o.type!=="labelLink")){i=2;break}}else o.type==="labelEnd"&&(l=n);const d={type:e[u][1].type==="labelLink"?"link":"image",start:{...e[u][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[u][1].start},end:{...e[l][1].end}},p={type:"labelText",start:{...e[u+i+2][1].end},end:{...e[l-2][1].start}};return f=[["enter",d,t],["enter",h,t]],f=Qn(f,e.slice(u+1,u+i+3)),f=Qn(f,[["enter",p,t]]),f=Qn(f,vg(t.parser.constructs.insideSpan.null,e.slice(u+i+4,l-3),t)),f=Qn(f,[["exit",p,t],e[l-2],e[l-1],["exit",h,t]]),f=Qn(f,e.slice(l+1)),f=Qn(f,[["exit",d,t]]),zr(e,u,e.length,f),e}function u$(e,t,n){const i=this;let o=i.events.length,u,l;for(;o--;)if((i.events[o][1].type==="labelImage"||i.events[o][1].type==="labelLink")&&!i.events[o][1]._balanced){u=i.events[o][1];break}return f;function f(x){return u?u._inactive?y(x):(l=i.parser.defined.includes(_o(i.sliceSerialize({start:u.end,end:i.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(i$,p,l?p:y)(x):x===91?e.attempt(a$,p,l?h:y)(x):l?p(x):y(x)}function h(x){return e.attempt(o$,p,y)(x)}function p(x){return t(x)}function y(x){return u._balanced=!0,n(x)}}function c$(e,t,n){return i;function i(y){return e.enter("resource"),e.enter("resourceMarker"),e.consume(y),e.exit("resourceMarker"),o}function o(y){return wn(y)?il(e,u)(y):u(y)}function u(y){return y===41?p(y):Xz(e,l,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(y)}function l(y){return wn(y)?il(e,d)(y):p(y)}function f(y){return n(y)}function d(y){return y===34||y===39||y===40?Jz(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(y):p(y)}function h(y){return wn(y)?il(e,p)(y):p(y)}function p(y){return y===41?(e.enter("resourceMarker"),e.consume(y),e.exit("resourceMarker"),e.exit("resource"),t):n(y)}}function f$(e,t,n){const i=this;return o;function o(f){return Kz.call(i,e,u,l,"reference","referenceMarker","referenceString")(f)}function u(f){return i.parser.defined.includes(_o(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?t(f):n(f)}function l(f){return n(f)}}function d$(e,t,n){return i;function i(u){return e.enter("reference"),e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),o}function o(u){return u===93?(e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),e.exit("reference"),t):n(u)}}const h$={name:"labelStartImage",resolveAll:bg.resolveAll,tokenize:m$};function m$(e,t,n){const i=this;return o;function o(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),u}function u(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),l):n(f)}function l(f){return f===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(f):t(f)}}const p$={name:"labelStartLink",resolveAll:bg.resolveAll,tokenize:g$};function g$(e,t,n){const i=this;return o;function o(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),u}function u(l){return l===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(l):t(l)}}const rm={name:"lineEnding",tokenize:y$};function y$(e,t){return n;function n(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),ot(e,t,"linePrefix")}}const xc={name:"thematicBreak",tokenize:x$};function x$(e,t,n){let i=0,o;return u;function u(h){return e.enter("thematicBreak"),l(h)}function l(h){return o=h,f(h)}function f(h){return h===o?(e.enter("thematicBreakSequence"),d(h)):i>=3&&(h===null||_e(h))?(e.exit("thematicBreak"),t(h)):n(h)}function d(h){return h===o?(e.consume(h),i++,d):(e.exit("thematicBreakSequence"),Fe(h)?ot(e,f,"whitespace")(h):f(h))}}const Sn={continuation:{tokenize:w$},exit:z$,name:"list",tokenize:S$},v$={partial:!0,tokenize:_$},b$={partial:!0,tokenize:k$};function S$(e,t,n){const i=this,o=i.events[i.events.length-1];let u=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,l=0;return f;function f(b){const _=i.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(_==="listUnordered"?!i.containerState.marker||b===i.containerState.marker:up(b)){if(i.containerState.type||(i.containerState.type=_,e.enter(_,{_container:!0})),_==="listUnordered")return e.enter("listItemPrefix"),b===42||b===45?e.check(xc,n,h)(b):h(b);if(!i.interrupt||b===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(b)}return n(b)}function d(b){return up(b)&&++l<10?(e.consume(b),d):(!i.interrupt||l<2)&&(i.containerState.marker?b===i.containerState.marker:b===41||b===46)?(e.exit("listItemValue"),h(b)):n(b)}function h(b){return e.enter("listItemMarker"),e.consume(b),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||b,e.check(Kc,i.interrupt?n:p,e.attempt(v$,x,y))}function p(b){return i.containerState.initialBlankLine=!0,u++,x(b)}function y(b){return Fe(b)?(e.enter("listItemPrefixWhitespace"),e.consume(b),e.exit("listItemPrefixWhitespace"),x):n(b)}function x(b){return i.containerState.size=u+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(b)}}function w$(e,t,n){const i=this;return i.containerState._closeFlow=void 0,e.check(Kc,o,u);function o(f){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,ot(e,t,"listItemIndent",i.containerState.size+1)(f)}function u(f){return i.containerState.furtherBlankLines||!Fe(f)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,l(f)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(b$,t,l)(f))}function l(f){return i.containerState._closeFlow=!0,i.interrupt=void 0,ot(e,e.attempt(Sn,t,n),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function k$(e,t,n){const i=this;return ot(e,o,"listItemIndent",i.containerState.size+1);function o(u){const l=i.events[i.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===i.containerState.size?t(u):n(u)}}function z$(e){e.exit(this.containerState.type)}function _$(e,t,n){const i=this;return ot(e,o,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(u){const l=i.events[i.events.length-1];return!Fe(u)&&l&&l[1].type==="listItemPrefixWhitespace"?t(u):n(u)}}const J1={name:"setextUnderline",resolveTo:E$,tokenize:T$};function E$(e,t){let n=e.length,i,o,u;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){i=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!u&&e[n][1].type==="definition"&&(u=n);const l={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",u?(e.splice(o,0,["enter",l,t]),e.splice(u+1,0,["exit",e[i][1],t]),e[i][1].end={...e[u][1].end}):e[i][1]=l,e.push(["exit",l,t]),e}function T$(e,t,n){const i=this;let o;return u;function u(h){let p=i.events.length,y;for(;p--;)if(i.events[p][1].type!=="lineEnding"&&i.events[p][1].type!=="linePrefix"&&i.events[p][1].type!=="content"){y=i.events[p][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||y)?(e.enter("setextHeadingLine"),o=h,l(h)):n(h)}function l(h){return e.enter("setextHeadingLineSequence"),f(h)}function f(h){return h===o?(e.consume(h),f):(e.exit("setextHeadingLineSequence"),Fe(h)?ot(e,d,"lineSuffix")(h):d(h))}function d(h){return h===null||_e(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const C$={tokenize:A$};function A$(e){const t=this,n=e.attempt(Kc,i,e.attempt(this.parser.constructs.flowInitial,o,ot(e,e.attempt(this.parser.constructs.flow,o,e.attempt(M3,o)),"linePrefix")));return n;function i(u){if(u===null){e.consume(u);return}return e.enter("lineEndingBlank"),e.consume(u),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const j$={resolveAll:Wz()},N$=Qz("string"),O$=Qz("text");function Qz(e){return{resolveAll:Wz(e==="text"?R$:void 0),tokenize:t};function t(n){const i=this,o=this.parser.constructs[e],u=n.attempt(o,l,f);return l;function l(p){return h(p)?u(p):f(p)}function f(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),d}function d(p){return h(p)?(n.exit("data"),u(p)):(n.consume(p),d)}function h(p){if(p===null)return!0;const y=o[p];let x=-1;if(y)for(;++x<y.length;){const b=y[x];if(!b.previous||b.previous.call(i,i.previous))return!0}return!1}}}function Wz(e){return t;function t(n,i){let o=-1,u;for(;++o<=n.length;)u===void 0?n[o]&&n[o][1].type==="data"&&(u=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==u+2&&(n[u][1].end=n[o-1][1].end,n.splice(u+2,o-u-2),o=u+2),u=void 0);return e?e(n,i):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 i=e[n-1][1],o=t.sliceStream(i);let u=o.length,l=-1,f=0,d;for(;u--;){const h=o[u];if(typeof h=="string"){for(l=h.length;h.charCodeAt(l-1)===32;)f++,l--;if(l)break;l=-1}else if(h===-2)d=!0,f++;else if(h!==-1){u++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(f=0),f){const h={type:n===e.length||d||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:u?l:i.start._bufferIndex+l,_index:i.start._index+u,line:i.end.line,column:i.end.column-f,offset:i.end.offset-f},end:{...i.end}};i.end={...h.start},i.start.offset===i.end.offset?Object.assign(i,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const M$={42:Sn,43:Sn,45:Sn,48:Sn,49:Sn,50:Sn,51:Sn,52:Sn,53:Sn,54:Sn,55:Sn,56:Sn,57:Sn,62:Fz},D$={91:V3},$$={[-2]:nm,[-1]:nm,32:nm},L$={35:F3,42:xc,45:[J1,xc],60:X3,61:J1,95:xc,96:X1,126:X1},U$={38:Gz,92:qz},V$={[-5]:rm,[-4]:rm,[-3]:rm,33:h$,38:Gz,42:cp,60:[p3,n$],91:p$,92:[I3,qz],93:bg,95:cp,96:C3},P$={null:[cp,j$]},Z$={null:[42,95]},B$={null:[]},I$=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Z$,contentInitial:D$,disable:B$,document:M$,flow:L$,flowInitial:$$,insideSpan:P$,string:U$,text:V$},Symbol.toStringTag,{value:"Module"}));function H$(e,t,n){let i={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},u=[];let l=[],f=[];const d={attempt:q(L),check:q($),consume:N,enter:T,exit:R,interrupt:q($,{interrupt:!0})},h={code:null,containerState:{},defineSkip:z,events:[],now:_,parser:e,previous:null,sliceSerialize:x,sliceStream:b,write:y};let p=t.tokenize.call(h,d);return t.resolveAll&&u.push(t),h;function y(ne){return l=Qn(l,ne),A(),l[l.length-1]!==null?[]:(P(t,0),h.events=vg(u,h.events,h),h.events)}function x(ne,oe){return q$(b(ne),oe)}function b(ne){return F$(l,ne)}function _(){const{_bufferIndex:ne,_index:oe,line:we,column:ue,offset:re}=i;return{_bufferIndex:ne,_index:oe,line:we,column:ue,offset:re}}function z(ne){o[ne.line]=ne.column,ie()}function A(){let ne;for(;i._index<l.length;){const oe=l[i._index];if(typeof oe=="string")for(ne=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===ne&&i._bufferIndex<oe.length;)j(oe.charCodeAt(i._bufferIndex));else j(oe)}}function j(ne){p=p(ne)}function N(ne){_e(ne)?(i.line++,i.column=1,i.offset+=ne===-3?2:1,ie()):ne!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===l[i._index].length&&(i._bufferIndex=-1,i._index++)),h.previous=ne}function T(ne,oe){const we=oe||{};return we.type=ne,we.start=_(),h.events.push(["enter",we,h]),f.push(we),we}function R(ne){const oe=f.pop();return oe.end=_(),h.events.push(["exit",oe,h]),oe}function L(ne,oe){P(ne,oe.from)}function $(ne,oe){oe.restore()}function q(ne,oe){return we;function we(ue,re,V){let X,G,ve,O;return Array.isArray(ue)?F(ue):"tokenize"in ue?F([ue]):C(ue);function C(me){return pe;function pe(Ge){const De=Ge!==null&&me[Ge],Ct=Ge!==null&&me.null,an=[...Array.isArray(De)?De:De?[De]:[],...Array.isArray(Ct)?Ct:Ct?[Ct]:[]];return F(an)(Ge)}}function F(me){return X=me,G=0,me.length===0?V:k(me[G])}function k(me){return pe;function pe(Ge){return O=K(),ve=me,me.partial||(h.currentConstruct=me),me.name&&h.parser.constructs.disable.null.includes(me.name)?xe():me.tokenize.call(oe?Object.assign(Object.create(h),oe):h,d,ae,xe)(Ge)}}function ae(me){return ne(ve,O),re}function xe(me){return O.restore(),++G<X.length?k(X[G]):V}}}function P(ne,oe){ne.resolveAll&&!u.includes(ne)&&u.push(ne),ne.resolve&&zr(h.events,oe,h.events.length-oe,ne.resolve(h.events.slice(oe),h)),ne.resolveTo&&(h.events=ne.resolveTo(h.events,h))}function K(){const ne=_(),oe=h.previous,we=h.currentConstruct,ue=h.events.length,re=Array.from(f);return{from:ue,restore:V};function V(){i=ne,h.previous=oe,h.currentConstruct=we,h.events.length=ue,f=re,ie()}}function ie(){i.line in o&&i.column<2&&(i.column=o[i.line],i.offset+=o[i.line]-1)}}function F$(e,t){const n=t.start._index,i=t.start._bufferIndex,o=t.end._index,u=t.end._bufferIndex;let l;if(n===o)l=[e[n].slice(i,u)];else{if(l=e.slice(n,o),i>-1){const f=l[0];typeof f=="string"?l[0]=f.slice(i):l.shift()}u>0&&l.push(e[o].slice(0,u))}return l}function q$(e,t){let n=-1;const i=[];let o;for(;++n<e.length;){const u=e[n];let l;if(typeof u=="string")l=u;else switch(u){case-5:{l="\r";break}case-4:{l=`
21
+ `;break}case-3:{l=`\r
22
+ `;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&o)continue;l=" ";break}default:l=String.fromCharCode(u)}o=u===-2,i.push(l)}return i.join("")}function G$(e){const i={constructs:e3([I$,...(e||{}).extensions||[]]),content:o(l3),defined:[],document:o(c3),flow:o(C$),lazy:{},string:o(N$),text:o(O$)};return i;function o(u){return l;function l(f){return H$(i,u,f)}}}function Y$(e){for(;!Yz(e););return e}const Q1=/[\0\t\n\r]/g;function X$(){let e=1,t="",n=!0,i;return o;function o(u,l,f){const d=[];let h,p,y,x,b;for(u=t+(typeof u=="string"?u.toString():new TextDecoder(l||void 0).decode(u)),y=0,t="",n&&(u.charCodeAt(0)===65279&&y++,n=void 0);y<u.length;){if(Q1.lastIndex=y,h=Q1.exec(u),x=h&&h.index!==void 0?h.index:u.length,b=u.charCodeAt(x),!h){t=u.slice(y);break}if(b===10&&y===x&&i)d.push(-3),i=void 0;else switch(i&&(d.push(-5),i=void 0),y<x&&(d.push(u.slice(y,x)),e+=x-y),b){case 0:{d.push(65533),e++;break}case 9:{for(p=Math.ceil(e/4)*4,d.push(-2);e++<p;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:i=!0,e=1}y=x+1}return f&&(i&&d.push(-5),t&&d.push(t),d.push(null)),d}}const K$=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function J$(e){return e.replace(K$,Q$)}function Q$(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),u=o===120||o===88;return Hz(n.slice(u?2:1),u?16:10)}return xg(n)||e}const e_={}.hasOwnProperty;function W$(e,t,n){return typeof t!="string"&&(n=t,t=void 0),e5(n)(Y$(G$(n).document().write(X$()(e,t,!0))))}function e5(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(Je),autolinkProtocol:K,autolinkEmail:K,atxHeading:u(Ui),blockQuote:u(Ct),characterEscape:K,characterReference:K,codeFenced:u(an),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:u(an,l),codeText:u($n,l),codeTextData:K,data:K,codeFlowValue:K,definition:u(hr),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:u(Ln),hardBreakEscape:u(Ze),hardBreakTrailing:u(Ze),htmlFlow:u(tt,l),htmlFlowData:K,htmlText:u(tt,l),htmlTextData:K,image:u(st),label:l,link:u(Je),listItem:u(Un),listItemValue:x,listOrdered:u(Ht,y),listUnordered:u(Ht),paragraph:u(_t),reference:k,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:u(Ui),strong:u(Vt),thematicBreak:u(Sa)},exit:{atxHeading:d(),atxHeadingSequence:L,autolink:d(),autolinkEmail:De,autolinkProtocol:Ge,blockQuote:d(),characterEscapeValue:ie,characterReferenceMarkerHexadecimal:xe,characterReferenceMarkerNumeric:xe,characterReferenceValue:me,characterReference:pe,codeFenced:d(A),codeFencedFence:z,codeFencedFenceInfo:b,codeFencedFenceMeta:_,codeFlowValue:ie,codeIndented:d(j),codeText:d(re),codeTextData:ie,data:ie,definition:d(),definitionDestinationString:R,definitionLabelString:N,definitionTitleString:T,emphasis:d(),hardBreakEscape:d(oe),hardBreakTrailing:d(oe),htmlFlow:d(we),htmlFlowData:ie,htmlText:d(ue),htmlTextData:ie,image:d(X),label:ve,labelText:G,lineEnding:ne,link:d(V),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:ae,resourceDestinationString:O,resourceTitleString:C,resource:F,setextHeading:d(P),setextHeadingLineSequence:q,setextHeadingText:$,strong:d(),thematicBreak:d()}};t_(t,(e||{}).mdastExtensions||[]);const n={};return i;function i(J){let le={type:"root",children:[]};const ge={stack:[le],tokenStack:[],config:t,enter:f,exit:h,buffer:l,resume:p,data:n},ze=[];let Ve=-1;for(;++Ve<J.length;)if(J[Ve][1].type==="listOrdered"||J[Ve][1].type==="listUnordered")if(J[Ve][0]==="enter")ze.push(Ve);else{const on=ze.pop();Ve=o(J,on,Ve)}for(Ve=-1;++Ve<J.length;){const on=t[J[Ve][0]];e_.call(on,J[Ve][1].type)&&on[J[Ve][1].type].call(Object.assign({sliceSerialize:J[Ve][2].sliceSerialize},ge),J[Ve][1])}if(ge.tokenStack.length>0){const on=ge.tokenStack[ge.tokenStack.length-1];(on[1]||W1).call(ge,void 0,on[0])}for(le.position={start:ki(J.length>0?J[0][1].start:{line:1,column:1,offset:0}),end:ki(J.length>0?J[J.length-2][1].end:{line:1,column:1,offset:0})},Ve=-1;++Ve<t.transforms.length;)le=t.transforms[Ve](le)||le;return le}function o(J,le,ge){let ze=le-1,Ve=-1,on=!1,_n,sn,Pt,hn;for(;++ze<=ge;){const nt=J[ze];switch(nt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{nt[0]==="enter"?Ve++:Ve--,hn=void 0;break}case"lineEndingBlank":{nt[0]==="enter"&&(_n&&!hn&&!Ve&&!Pt&&(Pt=ze),hn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:hn=void 0}if(!Ve&&nt[0]==="enter"&&nt[1].type==="listItemPrefix"||Ve===-1&&nt[0]==="exit"&&(nt[1].type==="listUnordered"||nt[1].type==="listOrdered")){if(_n){let Qr=ze;for(sn=void 0;Qr--;){const ir=J[Qr];if(ir[1].type==="lineEnding"||ir[1].type==="lineEndingBlank"){if(ir[0]==="exit")continue;sn&&(J[sn][1].type="lineEndingBlank",on=!0),ir[1].type="lineEnding",sn=Qr}else if(!(ir[1].type==="linePrefix"||ir[1].type==="blockQuotePrefix"||ir[1].type==="blockQuotePrefixWhitespace"||ir[1].type==="blockQuoteMarker"||ir[1].type==="listItemIndent"))break}Pt&&(!sn||Pt<sn)&&(_n._spread=!0),_n.end=Object.assign({},sn?J[sn][1].start:nt[1].end),J.splice(sn||ze,0,["exit",_n,nt[2]]),ze++,ge++}if(nt[1].type==="listItemPrefix"){const Qr={type:"listItem",_spread:!1,start:Object.assign({},nt[1].start),end:void 0};_n=Qr,J.splice(ze,0,["enter",Qr,nt[2]]),ze++,ge++,Pt=void 0,hn=!0}}}return J[le][1]._spread=on,ge}function u(J,le){return ge;function ge(ze){f.call(this,J(ze),ze),le&&le.call(this,ze)}}function l(){this.stack.push({type:"fragment",children:[]})}function f(J,le,ge){this.stack[this.stack.length-1].children.push(J),this.stack.push(J),this.tokenStack.push([le,ge||void 0]),J.position={start:ki(le.start),end:void 0}}function d(J){return le;function le(ge){J&&J.call(this,ge),h.call(this,ge)}}function h(J,le){const ge=this.stack.pop(),ze=this.tokenStack.pop();if(ze)ze[0].type!==J.type&&(le?le.call(this,J,ze[0]):(ze[1]||W1).call(this,J,ze[0]));else throw new Error("Cannot close `"+J.type+"` ("+rl({start:J.start,end:J.end})+"): it’s not open");ge.position.end=ki(J.end)}function p(){return QD(this.stack.pop())}function y(){this.data.expectingFirstListItemValue=!0}function x(J){if(this.data.expectingFirstListItemValue){const le=this.stack[this.stack.length-2];le.start=Number.parseInt(this.sliceSerialize(J),10),this.data.expectingFirstListItemValue=void 0}}function b(){const J=this.resume(),le=this.stack[this.stack.length-1];le.lang=J}function _(){const J=this.resume(),le=this.stack[this.stack.length-1];le.meta=J}function z(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function A(){const J=this.resume(),le=this.stack[this.stack.length-1];le.value=J.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function j(){const J=this.resume(),le=this.stack[this.stack.length-1];le.value=J.replace(/(\r?\n|\r)$/g,"")}function N(J){const le=this.resume(),ge=this.stack[this.stack.length-1];ge.label=le,ge.identifier=_o(this.sliceSerialize(J)).toLowerCase()}function T(){const J=this.resume(),le=this.stack[this.stack.length-1];le.title=J}function R(){const J=this.resume(),le=this.stack[this.stack.length-1];le.url=J}function L(J){const le=this.stack[this.stack.length-1];if(!le.depth){const ge=this.sliceSerialize(J).length;le.depth=ge}}function $(){this.data.setextHeadingSlurpLineEnding=!0}function q(J){const le=this.stack[this.stack.length-1];le.depth=this.sliceSerialize(J).codePointAt(0)===61?1:2}function P(){this.data.setextHeadingSlurpLineEnding=void 0}function K(J){const ge=this.stack[this.stack.length-1].children;let ze=ge[ge.length-1];(!ze||ze.type!=="text")&&(ze=lt(),ze.position={start:ki(J.start),end:void 0},ge.push(ze)),this.stack.push(ze)}function ie(J){const le=this.stack.pop();le.value+=this.sliceSerialize(J),le.position.end=ki(J.end)}function ne(J){const le=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ge=le.children[le.children.length-1];ge.position.end=ki(J.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(le.type)&&(K.call(this,J),ie.call(this,J))}function oe(){this.data.atHardBreak=!0}function we(){const J=this.resume(),le=this.stack[this.stack.length-1];le.value=J}function ue(){const J=this.resume(),le=this.stack[this.stack.length-1];le.value=J}function re(){const J=this.resume(),le=this.stack[this.stack.length-1];le.value=J}function V(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const le=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=le,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function X(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const le=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=le,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function G(J){const le=this.sliceSerialize(J),ge=this.stack[this.stack.length-2];ge.label=J$(le),ge.identifier=_o(le).toLowerCase()}function ve(){const J=this.stack[this.stack.length-1],le=this.resume(),ge=this.stack[this.stack.length-1];if(this.data.inReference=!0,ge.type==="link"){const ze=J.children;ge.children=ze}else ge.alt=le}function O(){const J=this.resume(),le=this.stack[this.stack.length-1];le.url=J}function C(){const J=this.resume(),le=this.stack[this.stack.length-1];le.title=J}function F(){this.data.inReference=void 0}function k(){this.data.referenceType="collapsed"}function ae(J){const le=this.resume(),ge=this.stack[this.stack.length-1];ge.label=le,ge.identifier=_o(this.sliceSerialize(J)).toLowerCase(),this.data.referenceType="full"}function xe(J){this.data.characterReferenceType=J.type}function me(J){const le=this.sliceSerialize(J),ge=this.data.characterReferenceType;let ze;ge?(ze=Hz(le,ge==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ze=xg(le);const Ve=this.stack[this.stack.length-1];Ve.value+=ze}function pe(J){const le=this.stack.pop();le.position.end=ki(J.end)}function Ge(J){ie.call(this,J);const le=this.stack[this.stack.length-1];le.url=this.sliceSerialize(J)}function De(J){ie.call(this,J);const le=this.stack[this.stack.length-1];le.url="mailto:"+this.sliceSerialize(J)}function Ct(){return{type:"blockquote",children:[]}}function an(){return{type:"code",lang:null,meta:null,value:""}}function $n(){return{type:"inlineCode",value:""}}function hr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ln(){return{type:"emphasis",children:[]}}function Ui(){return{type:"heading",depth:0,children:[]}}function Ze(){return{type:"break"}}function tt(){return{type:"html",value:""}}function st(){return{type:"image",title:null,url:"",alt:null}}function Je(){return{type:"link",title:null,url:"",children:[]}}function Ht(J){return{type:"list",ordered:J.type==="listOrdered",start:null,spread:J._spread,children:[]}}function Un(J){return{type:"listItem",spread:J._spread,checked:null,children:[]}}function _t(){return{type:"paragraph",children:[]}}function Vt(){return{type:"strong",children:[]}}function lt(){return{type:"text",value:""}}function Sa(){return{type:"thematicBreak"}}}function ki(e){return{line:e.line,column:e.column,offset:e.offset}}function t_(e,t){let n=-1;for(;++n<t.length;){const i=t[n];Array.isArray(i)?t_(e,i):t5(e,i)}}function t5(e,t){let n;for(n in t)if(e_.call(t,n))switch(n){case"canContainEols":{const i=t[n];i&&e[n].push(...i);break}case"transforms":{const i=t[n];i&&e[n].push(...i);break}case"enter":case"exit":{const i=t[n];i&&Object.assign(e[n],i);break}}}function W1(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+rl({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+rl({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+rl({start:t.start,end:t.end})+") is still open")}function n5(e){const t=this;t.parser=n;function n(i){return W$(i,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function r5(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 i5(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
23
+ `}]}function a5(e,t){const n=t.value?t.value+`
24
+ `:"",i={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(i.className=["language-"+o[0]]);let u={type:"element",tagName:"code",properties:i,children:[{type:"text",value:n}]};return t.meta&&(u.data={meta:t.meta}),e.patch(t,u),u=e.applyData(t,u),u={type:"element",tagName:"pre",properties:{},children:[u]},e.patch(t,u),u}function o5(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function s5(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function l5(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),o=Po(i.toLowerCase()),u=e.footnoteOrder.indexOf(i);let l,f=e.footnoteCounts.get(i);f===void 0?(f=0,e.footnoteOrder.push(i),l=e.footnoteOrder.length):l=u+1,f+=1,e.footnoteCounts.set(i,f);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(f>1?"-"+f:""),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 u5(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 c5(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function n_(e,t){const n=t.referenceType;let i="]";if(n==="collapsed"?i+="[]":n==="full"&&(i+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+i}];const o=e.all(t),u=o[0];u&&u.type==="text"?u.value="["+u.value:o.unshift({type:"text",value:"["});const l=o[o.length-1];return l&&l.type==="text"?l.value+=i:o.push({type:"text",value:i}),o}function f5(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return n_(e,t);const o={src:Po(i.url||""),alt:t.alt};i.title!==null&&i.title!==void 0&&(o.title=i.title);const u={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,u),e.applyData(t,u)}function d5(e,t){const n={src:Po(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 i={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,i),e.applyData(t,i)}function h5(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const i={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,i),e.applyData(t,i)}function m5(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return n_(e,t);const o={href:Po(i.url||"")};i.title!==null&&i.title!==void 0&&(o.title=i.title);const u={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,u),e.applyData(t,u)}function p5(e,t){const n={href:Po(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const i={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function g5(e,t,n){const i=e.all(t),o=n?y5(n):r_(t),u={},l=[];if(typeof t.checked=="boolean"){const p=i[0];let y;p&&p.type==="element"&&p.tagName==="p"?y=p:(y={type:"element",tagName:"p",properties:{},children:[]},i.unshift(y)),y.children.length>0&&y.children.unshift({type:"text",value:" "}),y.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),u.className=["task-list-item"]}let f=-1;for(;++f<i.length;){const p=i[f];(o||f!==0||p.type!=="element"||p.tagName!=="p")&&l.push({type:"text",value:`
25
+ `}),p.type==="element"&&p.tagName==="p"&&!o?l.push(...p.children):l.push(p)}const d=i[i.length-1];d&&(o||d.type!=="element"||d.tagName!=="p")&&l.push({type:"text",value:`
26
+ `});const h={type:"element",tagName:"li",properties:u,children:l};return e.patch(t,h),e.applyData(t,h)}function y5(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let i=-1;for(;!t&&++i<n.length;)t=r_(n[i])}return t}function r_(e){const t=e.spread;return t??e.children.length>1}function x5(e,t){const n={},i=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o<i.length;){const l=i[o];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 u={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(i,!0)};return e.patch(t,u),e.applyData(t,u)}function v5(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function b5(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function S5(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function w5(e,t){const n=e.all(t),i=n.shift(),o=[];if(i){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([i],!0)};e.patch(t.children[0],l),o.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},f=mg(t.children[1]),d=Lz(t.children[t.children.length-1]);f&&d&&(l.position={start:f,end:d}),o.push(l)}const u={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,u),e.applyData(t,u)}function k5(e,t,n){const i=n?n.children:void 0,u=(i?i.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,f=l?l.length:t.children.length;let d=-1;const h=[];for(;++d<f;){const y=t.children[d],x={},b=l?l[d]:void 0;b&&(x.align=b);let _={type:"element",tagName:u,properties:x,children:[]};y&&(_.children=e.all(y),e.patch(y,_),_=e.applyData(y,_)),h.push(_)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,p),e.applyData(t,p)}function z5(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const eS=9,tS=32;function _5(e){const t=String(e),n=/\r?\n|\r/g;let i=n.exec(t),o=0;const u=[];for(;i;)u.push(nS(t.slice(o,i.index),o>0,!0),i[0]),o=i.index+i[0].length,i=n.exec(t);return u.push(nS(t.slice(o),o>0,!1)),u.join("")}function nS(e,t,n){let i=0,o=e.length;if(t){let u=e.codePointAt(i);for(;u===eS||u===tS;)i++,u=e.codePointAt(i)}if(n){let u=e.codePointAt(o-1);for(;u===eS||u===tS;)o--,u=e.codePointAt(o-1)}return o>i?e.slice(i,o):""}function E5(e,t){const n={type:"text",value:_5(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function T5(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const C5={blockquote:r5,break:i5,code:a5,delete:o5,emphasis:s5,footnoteReference:l5,heading:u5,html:c5,imageReference:f5,image:d5,inlineCode:h5,linkReference:m5,link:p5,listItem:g5,list:x5,paragraph:v5,root:b5,strong:S5,table:w5,tableCell:z5,tableRow:k5,text:E5,thematicBreak:T5,toml:Qu,yaml:Qu,definition:Qu,footnoteDefinition:Qu};function Qu(){}const i_=-1,Jc=0,al=1,Cc=2,Sg=3,wg=4,kg=5,zg=6,a_=7,o_=8,rS=typeof self=="object"?self:globalThis,A5=(e,t)=>{const n=(o,u)=>(e.set(u,o),o),i=o=>{if(e.has(o))return e.get(o);const[u,l]=t[o];switch(u){case Jc:case i_:return n(l,o);case al:{const f=n([],o);for(const d of l)f.push(i(d));return f}case Cc:{const f=n({},o);for(const[d,h]of l)f[i(d)]=i(h);return f}case Sg:return n(new Date(l),o);case wg:{const{source:f,flags:d}=l;return n(new RegExp(f,d),o)}case kg:{const f=n(new Map,o);for(const[d,h]of l)f.set(i(d),i(h));return f}case zg:{const f=n(new Set,o);for(const d of l)f.add(i(d));return f}case a_:{const{name:f,message:d}=l;return n(new rS[f](d),o)}case o_:return n(BigInt(l),o);case"BigInt":return n(Object(BigInt(l)),o);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:f}=new Uint8Array(l);return n(new DataView(f),l)}}return n(new rS[u](l),o)};return i},iS=e=>A5(new Map,e)(0),so="",{toString:j5}={},{keys:N5}=Object,Hs=e=>{const t=typeof e;if(t!=="object"||!e)return[Jc,t];const n=j5.call(e).slice(8,-1);switch(n){case"Array":return[al,so];case"Object":return[Cc,so];case"Date":return[Sg,so];case"RegExp":return[wg,so];case"Map":return[kg,so];case"Set":return[zg,so];case"DataView":return[al,n]}return n.includes("Array")?[al,n]:n.includes("Error")?[a_,n]:[Cc,n]},Wu=([e,t])=>e===Jc&&(t==="function"||t==="symbol"),O5=(e,t,n,i)=>{const o=(l,f)=>{const d=i.push(l)-1;return n.set(f,d),d},u=l=>{if(n.has(l))return n.get(l);let[f,d]=Hs(l);switch(f){case Jc:{let p=l;switch(d){case"bigint":f=o_,p=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);p=null;break;case"undefined":return o([i_],l)}return o([f,p],l)}case al:{if(d){let x=l;return d==="DataView"?x=new Uint8Array(l.buffer):d==="ArrayBuffer"&&(x=new Uint8Array(l)),o([d,[...x]],l)}const p=[],y=o([f,p],l);for(const x of l)p.push(u(x));return y}case Cc:{if(d)switch(d){case"BigInt":return o([d,l.toString()],l);case"Boolean":case"Number":case"String":return o([d,l.valueOf()],l)}if(t&&"toJSON"in l)return u(l.toJSON());const p=[],y=o([f,p],l);for(const x of N5(l))(e||!Wu(Hs(l[x])))&&p.push([u(x),u(l[x])]);return y}case Sg:return o([f,l.toISOString()],l);case wg:{const{source:p,flags:y}=l;return o([f,{source:p,flags:y}],l)}case kg:{const p=[],y=o([f,p],l);for(const[x,b]of l)(e||!(Wu(Hs(x))||Wu(Hs(b))))&&p.push([u(x),u(b)]);return y}case zg:{const p=[],y=o([f,p],l);for(const x of l)(e||!Wu(Hs(x)))&&p.push(u(x));return y}}const{message:h}=l;return o([f,{name:d,message:h}],l)};return u},aS=(e,{json:t,lossy:n}={})=>{const i=[];return O5(!(t||n),!!t,new Map,i)(e),i},Ac=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?iS(aS(e,t)):structuredClone(e):(e,t)=>iS(aS(e,t));function R5(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 M5(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function D5(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||R5,i=e.options.footnoteBackLabel||M5,o=e.options.footnoteLabel||"Footnotes",u=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let d=-1;for(;++d<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[d]);if(!h)continue;const p=e.all(h),y=String(h.identifier).toUpperCase(),x=Po(y.toLowerCase());let b=0;const _=[],z=e.footnoteCounts.get(y);for(;z!==void 0&&++b<=z;){_.length>0&&_.push({type:"text",value:" "});let N=typeof n=="string"?n:n(d,b);typeof N=="string"&&(N={type:"text",value:N}),_.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+x+(b>1?"-"+b:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(d,b),className:["data-footnote-backref"]},children:Array.isArray(N)?N:[N]})}const A=p[p.length-1];if(A&&A.type==="element"&&A.tagName==="p"){const N=A.children[A.children.length-1];N&&N.type==="text"?N.value+=" ":A.children.push({type:"text",value:" "}),A.children.push(..._)}else p.push(..._);const j={type:"element",tagName:"li",properties:{id:t+"fn-"+x},children:e.wrap(p,!0)};e.patch(h,j),f.push(j)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:u,properties:{...Ac(l),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
27
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
28
+ `}]}}const s_=(function(e){if(e==null)return V5;if(typeof e=="function")return Qc(e);if(typeof e=="object")return Array.isArray(e)?$5(e):L5(e);if(typeof e=="string")return U5(e);throw new Error("Expected function, string, or object as test")});function $5(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=s_(e[n]);return Qc(i);function i(...o){let u=-1;for(;++u<t.length;)if(t[u].apply(this,o))return!0;return!1}}function L5(e){const t=e;return Qc(n);function n(i){const o=i;let u;for(u in e)if(o[u]!==t[u])return!1;return!0}}function U5(e){return Qc(t);function t(n){return n&&n.type===e}}function Qc(e){return t;function t(n,i,o){return!!(P5(n)&&e.call(this,n,typeof i=="number"?i:void 0,o||void 0))}}function V5(){return!0}function P5(e){return e!==null&&typeof e=="object"&&"type"in e}const l_=[],Z5=!0,oS=!1,B5="skip";function I5(e,t,n,i){let o;typeof t=="function"&&typeof n!="function"?(i=n,n=t):o=t;const u=s_(o),l=i?-1:1;f(e,void 0,[])();function f(d,h,p){const y=d&&typeof d=="object"?d:{};if(typeof y.type=="string"){const b=typeof y.tagName=="string"?y.tagName:typeof y.name=="string"?y.name:void 0;Object.defineProperty(x,"name",{value:"node ("+(d.type+(b?"<"+b+">":""))+")"})}return x;function x(){let b=l_,_,z,A;if((!t||u(d,h,p[p.length-1]||void 0))&&(b=H5(n(d,p)),b[0]===oS))return b;if("children"in d&&d.children){const j=d;if(j.children&&b[0]!==B5)for(z=(i?j.children.length:-1)+l,A=p.concat(j);z>-1&&z<j.children.length;){const N=j.children[z];if(_=f(N,z,A)(),_[0]===oS)return _;z=typeof _[1]=="number"?_[1]:z+l}}return b}}}function H5(e){return Array.isArray(e)?e:typeof e=="number"?[Z5,e]:e==null?l_:[e]}function u_(e,t,n,i){let o,u,l;typeof t=="function"&&typeof n!="function"?(u=void 0,l=t,o=n):(u=t,l=n,o=i),I5(e,u,f,o);function f(d,h){const p=h[h.length-1],y=p?p.children.indexOf(d):void 0;return l(d,y,p)}}const fp={}.hasOwnProperty,F5={};function q5(e,t){const n=t||F5,i=new Map,o=new Map,u=new Map,l={...C5,...n.handlers},f={all:h,applyData:Y5,definitionById:i,footnoteById:o,footnoteCounts:u,footnoteOrder:[],handlers:l,one:d,options:n,patch:G5,wrap:K5};return u_(e,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const y=p.type==="definition"?i:o,x=String(p.identifier).toUpperCase();y.has(x)||y.set(x,p)}}),f;function d(p,y){const x=p.type,b=f.handlers[x];if(fp.call(f.handlers,x)&&b)return b(f,p,y);if(f.options.passThrough&&f.options.passThrough.includes(x)){if("children"in p){const{children:z,...A}=p,j=Ac(A);return j.children=f.all(p),j}return Ac(p)}return(f.options.unknownHandler||X5)(f,p,y)}function h(p){const y=[];if("children"in p){const x=p.children;let b=-1;for(;++b<x.length;){const _=f.one(x[b],p);if(_){if(b&&x[b-1].type==="break"&&(!Array.isArray(_)&&_.type==="text"&&(_.value=sS(_.value)),!Array.isArray(_)&&_.type==="element")){const z=_.children[0];z&&z.type==="text"&&(z.value=sS(z.value))}Array.isArray(_)?y.push(..._):y.push(_)}}}return y}}function G5(e,t){e.position&&(t.position=jD(e))}function Y5(e,t){let n=t;if(e&&e.data){const i=e.data.hName,o=e.data.hChildren,u=e.data.hProperties;if(typeof i=="string")if(n.type==="element")n.tagName=i;else{const l="children"in n?n.children:[n];n={type:"element",tagName:i,properties:{},children:l}}n.type==="element"&&u&&Object.assign(n.properties,Ac(u)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function X5(e,t){const n=t.data||{},i="value"in t&&!(fp.call(n,"hProperties")||fp.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function K5(e,t){const n=[];let i=-1;for(t&&n.push({type:"text",value:`
29
+ `});++i<e.length;)i&&n.push({type:"text",value:`
30
+ `}),n.push(e[i]);return t&&e.length>0&&n.push({type:"text",value:`
31
+ `}),n}function sS(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function lS(e,t){const n=q5(e,t),i=n.one(e,void 0),o=D5(n),u=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return o&&u.children.push({type:"text",value:`
32
+ `},o),u}function J5(e,t){return e&&"run"in e?async function(n,i){const o=lS(n,{file:i,...t});await e.run(o,i)}:function(n,i){return lS(n,{file:i,...e||t})}}function uS(e){if(e)throw e}var im,cS;function Q5(){if(cS)return im;cS=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},u=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var p=e.call(h,"constructor"),y=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!p&&!y)return!1;var x;for(x in h);return typeof x>"u"||e.call(h,x)},l=function(h,p){n&&p.name==="__proto__"?n(h,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):h[p.name]=p.newValue},f=function(h,p){if(p==="__proto__")if(e.call(h,p)){if(i)return i(h,p).value}else return;return h[p]};return im=function d(){var h,p,y,x,b,_,z=arguments[0],A=1,j=arguments.length,N=!1;for(typeof z=="boolean"&&(N=z,z=arguments[1]||{},A=2),(z==null||typeof z!="object"&&typeof z!="function")&&(z={});A<j;++A)if(h=arguments[A],h!=null)for(p in h)y=f(z,p),x=f(h,p),z!==x&&(N&&x&&(u(x)||(b=o(x)))?(b?(b=!1,_=y&&o(y)?y:[]):_=y&&u(y)?y:{},l(z,{name:p,newValue:d(N,_,x)})):typeof x<"u"&&l(z,{name:p,newValue:x}));return z},im}var W5=Q5();const am=Sp(W5);function dp(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 e6(){const e=[],t={run:n,use:i};return t;function n(...o){let u=-1;const l=o.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);f(null,...o);function f(d,...h){const p=e[++u];let y=-1;if(d){l(d);return}for(;++y<o.length;)(h[y]===null||h[y]===void 0)&&(h[y]=o[y]);o=h,p?t6(p,f)(...h):l(null,...h)}}function i(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function t6(e,t){let n;return i;function i(...l){const f=e.length>l.length;let d;f&&l.push(o);try{d=e.apply(this,l)}catch(h){const p=h;if(f&&n)throw p;return o(p)}f||(d&&d.then&&typeof d.then=="function"?d.then(u,o):d instanceof Error?o(d):u(d))}function o(l,...f){n||(n=!0,t(l,...f))}function u(l){o(null,l)}}const xr={basename:n6,dirname:r6,extname:i6,join:a6,sep:"/"};function n6(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Cl(e);let n=0,i=-1,o=e.length,u;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(u){n=o+1;break}}else i<0&&(u=!0,i=o+1);return i<0?"":e.slice(n,i)}if(t===e)return"";let l=-1,f=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(u){n=o+1;break}}else l<0&&(u=!0,l=o+1),f>-1&&(e.codePointAt(o)===t.codePointAt(f--)?f<0&&(i=o):(f=-1,i=l));return n===i?i=l:i<0&&(i=e.length),e.slice(n,i)}function r6(e){if(Cl(e),e.length===0)return".";let t=-1,n=e.length,i;for(;--n;)if(e.codePointAt(n)===47){if(i){t=n;break}}else i||(i=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function i6(e){Cl(e);let t=e.length,n=-1,i=0,o=-1,u=0,l;for(;t--;){const f=e.codePointAt(t);if(f===47){if(l){i=t+1;break}continue}n<0&&(l=!0,n=t+1),f===46?o<0?o=t:u!==1&&(u=1):o>-1&&(u=-1)}return o<0||n<0||u===0||u===1&&o===n-1&&o===i+1?"":e.slice(o,n)}function a6(...e){let t=-1,n;for(;++t<e.length;)Cl(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":o6(n)}function o6(e){Cl(e);const t=e.codePointAt(0)===47;let n=s6(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function s6(e,t){let n="",i=0,o=-1,u=0,l=-1,f,d;for(;++l<=e.length;){if(l<e.length)f=e.codePointAt(l);else{if(f===47)break;f=47}if(f===47){if(!(o===l-1||u===1))if(o!==l-1&&u===2){if(n.length<2||i!==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="",i=0):(n=n.slice(0,d),i=n.length-1-n.lastIndexOf("/")),o=l,u=0;continue}}else if(n.length>0){n="",i=0,o=l,u=0;continue}}t&&(n=n.length>0?n+"/..":"..",i=2)}else n.length>0?n+="/"+e.slice(o+1,l):n=e.slice(o+1,l),i=l-o-1;o=l,u=0}else f===46&&u>-1?u++:u=-1}return n}function Cl(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const l6={cwd:u6};function u6(){return"/"}function hp(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function c6(e){if(typeof e=="string")e=new URL(e);else if(!hp(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 f6(e)}function f6(e){if(e.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const i=t.codePointAt(n+2);if(i===70||i===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const om=["history","path","basename","stem","extname","dirname"];class c_{constructor(t){let n;t?hp(t)?n={path:t}:typeof t=="string"||d6(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":l6.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<om.length;){const u=om[i];u in n&&n[u]!==void 0&&n[u]!==null&&(this[u]=u==="history"?[...n[u]]:n[u])}let o;for(o in n)om.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?xr.basename(this.path):void 0}set basename(t){lm(t,"basename"),sm(t,"basename"),this.path=xr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?xr.dirname(this.path):void 0}set dirname(t){fS(this.basename,"dirname"),this.path=xr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?xr.extname(this.path):void 0}set extname(t){if(sm(t,"extname"),fS(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=xr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){hp(t)&&(t=c6(t)),lm(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?xr.basename(this.path,this.extname):void 0}set stem(t){lm(t,"stem"),sm(t,"stem"),this.path=xr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,i){const o=this.message(t,n,i);throw o.fatal=!0,o}info(t,n,i){const o=this.message(t,n,i);return o.fatal=void 0,o}message(t,n,i){const o=new rn(t,n,i);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function sm(e,t){if(e&&e.includes(xr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+xr.sep+"`")}function lm(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function fS(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function d6(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const h6=(function(e){const i=this.constructor.prototype,o=i[e],u=function(){return o.apply(u,arguments)};return Object.setPrototypeOf(u,i),u}),m6={}.hasOwnProperty;class _g extends h6{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=e6()}copy(){const t=new _g;let n=-1;for(;++n<this.attachers.length;){const i=this.attachers[n];t.use(...i)}return t.data(am(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(fm("data",this.frozen),this.namespace[t]=n,this):m6.call(this.namespace,t)&&this.namespace[t]||void 0:t?(fm("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,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const o=n.call(t,...i);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=ec(t),i=this.parser||this.Parser;return um("parse",i),i(String(n),n)}process(t,n){const i=this;return this.freeze(),um("process",this.parser||this.Parser),cm("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(u,l){const f=ec(t),d=i.parse(f);i.run(d,f,function(p,y,x){if(p||!y||!x)return h(p);const b=y,_=i.stringify(b,x);y6(_)?x.value=_:x.result=_,h(p,x)});function h(p,y){p||!y?l(p):u?u(y):n(void 0,y)}}}processSync(t){let n=!1,i;return this.freeze(),um("processSync",this.parser||this.Parser),cm("processSync",this.compiler||this.Compiler),this.process(t,o),hS("processSync","process",n),i;function o(u,l){n=!0,uS(u),i=l}}run(t,n,i){dS(t),this.freeze();const o=this.transformers;return!i&&typeof n=="function"&&(i=n,n=void 0),i?u(void 0,i):new Promise(u);function u(l,f){const d=ec(n);o.run(t,d,h);function h(p,y,x){const b=y||t;p?f(p):l?l(b):i(void 0,b,x)}}}runSync(t,n){let i=!1,o;return this.run(t,n,u),hS("runSync","run",i),o;function u(l,f){uS(l),o=f,i=!0}}stringify(t,n){this.freeze();const i=ec(n),o=this.compiler||this.Compiler;return cm("stringify",o),dS(t),o(t,i)}use(t,...n){const i=this.attachers,o=this.namespace;if(fm("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?f(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function u(h){if(typeof h=="function")d(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[p,...y]=h;d(p,y)}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");f(h.plugins),h.settings&&(o.settings=am(!0,o.settings,h.settings))}function f(h){let p=-1;if(h!=null)if(Array.isArray(h))for(;++p<h.length;){const y=h[p];u(y)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function d(h,p){let y=-1,x=-1;for(;++y<i.length;)if(i[y][0]===h){x=y;break}if(x===-1)i.push([h,...p]);else if(p.length>0){let[b,..._]=p;const z=i[x][1];dp(z)&&dp(b)&&(b=am(!0,z,b)),i[x]=[h,b,..._]}}}}const p6=new _g().freeze();function um(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function cm(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function fm(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 dS(e){if(!dp(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function hS(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ec(e){return g6(e)?e:new c_(e)}function g6(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function y6(e){return typeof e=="string"||x6(e)}function x6(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const v6="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",mS=[],pS={allowDangerousHtml:!0},b6=/^(https?|ircs?|mailto|xmpp)$/i,S6=[{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 w6(e){const t=k6(e),n=z6(e);return _6(t.runSync(t.parse(n),n),e)}function k6(e){const t=e.rehypePlugins||mS,n=e.remarkPlugins||mS,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...pS}:pS;return p6().use(n5).use(n).use(J5,i).use(t)}function z6(e){const t=e.children||"",n=new c_;return typeof t=="string"&&(n.value=t),n}function _6(e,t){const n=t.allowedElements,i=t.allowElement,o=t.components,u=t.disallowedElements,l=t.skipHtml,f=t.unwrapDisallowed,d=t.urlTransform||E6;for(const p of S6)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+v6+p.id,void 0);return u_(e,h),DD(e,{Fragment:v.Fragment,components:o,ignoreInvalidStyle:!0,jsx:v.jsx,jsxs:v.jsxs,passKeys:!0,passNode:!0});function h(p,y,x){if(p.type==="raw"&&x&&typeof y=="number")return l?x.children.splice(y,1):x.children[y]={type:"text",value:p.value},y;if(p.type==="element"){let b;for(b in tm)if(Object.hasOwn(tm,b)&&Object.hasOwn(p.properties,b)){const _=p.properties[b],z=tm[b];(z===null||z.includes(p.tagName))&&(p.properties[b]=d(String(_||""),b,p))}}if(p.type==="element"){let b=n?!n.includes(p.tagName):u?u.includes(p.tagName):!1;if(!b&&i&&typeof y=="number"&&(b=!i(p,y,x)),b&&x&&typeof y=="number")return f&&p.children?x.children.splice(y,1,...p.children):x.children.splice(y,1),y}}}function E6(e){const t=e.indexOf(":"),n=e.indexOf("?"),i=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||n!==-1&&t>n||i!==-1&&t>i||b6.test(e.slice(0,t))?e:""}const T6=({messages:e,onSendMessage:t,isLoading:n,activeSessionId:i})=>{const[o,u]=E.useState(""),l=E.useRef(null),f=()=>{l.current?.scrollIntoView({behavior:"smooth"})};E.useEffect(()=>{f()},[e,n]);const d=h=>{h.preventDefault(),!(!o.trim()||n)&&(t(o),u(""))};return i?v.jsxs("div",{className:"flex-1 flex flex-col h-full bg-gray-50 dark:bg-black relative overflow-hidden transition-colors duration-300",children:[v.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-6 min-h-0",children:[e.map((h,p)=>v.jsxs("div",{className:`flex gap-4 ${h.type==="human"?"justify-end":"justify-start"}`,children:[h.type!=="human"&&v.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center flex-shrink-0 ${h.type==="tool"?"bg-purple-100 text-purple-600 dark:bg-purple-900/30 dark:text-purple-400":"bg-azure-primary/10 text-azure-primary dark:bg-matrix-primary/20 dark:text-matrix-highlight"}`,children:h.type==="tool"?v.jsx(Rw,{size:16}):v.jsx(e0,{size:18})}),v.jsx("div",{className:`max-w-[80%] rounded-2xl p-4 shadow-sm ${h.type==="human"?"bg-azure-primary text-white dark:bg-matrix-primary dark:text-matrix-highlight dark:border dark:border-matrix-highlight/20 rounded-br-none":h.type==="tool"?"bg-gray-100 dark:bg-zinc-900 border border-gray-200 dark:border-zinc-800 text-gray-800 dark:text-gray-200 font-mono text-sm":"bg-white dark:bg-black border border-gray-100 dark:border-matrix-primary/30 text-gray-800 dark:text-matrix-secondary rounded-bl-none"}`,children:h.type==="tool"?v.jsxs("div",{className:"overflow-x-auto",children:[v.jsx("p",{className:"text-xs text-gray-500 mb-1 font-sans font-semibold",children:"Tool Output:"}),v.jsx("pre",{className:"whitespace-pre-wrap break-all",children:typeof h.content=="string"?h.content:JSON.stringify(h.content,null,2)})]}):v.jsx("div",{className:"prose dark:prose-invert max-w-none text-sm leading-relaxed dark:prose-p:text-matrix-secondary dark:prose-headings:text-matrix-highlight dark:prose-strong:text-matrix-highlight dark:prose-code:text-matrix-highlight",children:v.jsx(w6,{children:h.content})})}),h.type==="human"&&v.jsx("div",{className:"w-8 h-8 rounded-full bg-gray-200 dark:bg-matrix-primary/20 flex items-center justify-center flex-shrink-0 text-gray-500 dark:text-matrix-secondary",children:v.jsx(Mj,{size:18})})]},p)),n&&v.jsxs("div",{className:"flex gap-4 justify-start",children:[v.jsx("div",{className:"w-8 h-8 rounded-full bg-azure-primary/10 text-azure-primary dark:bg-matrix-primary/20 dark:text-matrix-highlight flex items-center justify-center flex-shrink-0",children:v.jsx(e0,{size:18})}),v.jsxs("div",{className:"bg-white dark:bg-black border border-gray-100 dark:border-matrix-primary/30 p-4 rounded-2xl rounded-bl-none shadow-sm flex items-center gap-2",children:[v.jsx("div",{className:"w-2 h-2 bg-azure-primary dark:bg-matrix-highlight rounded-full animate-bounce",style:{animationDelay:"0ms"}}),v.jsx("div",{className:"w-2 h-2 bg-azure-primary dark:bg-matrix-highlight rounded-full animate-bounce",style:{animationDelay:"150ms"}}),v.jsx("div",{className:"w-2 h-2 bg-azure-primary dark:bg-matrix-highlight rounded-full animate-bounce",style:{animationDelay:"300ms"}})]})]}),v.jsx("div",{ref:l})]}),v.jsx("div",{className:"p-4 bg-white dark:bg-black border-t border-gray-200 dark:border-matrix-primary/30 shrink-0",children:v.jsxs("form",{onSubmit:d,className:"max-w-4xl mx-auto relative flex items-center gap-2",children:[v.jsx("input",{type:"text",value:o,onChange:h=>u(h.target.value),placeholder:"Type your message...",className:"flex-1 bg-gray-100 dark:bg-black/50 border border-transparent dark:border-matrix-primary/30 rounded-xl px-4 py-3 focus:ring-2 focus:ring-azure-primary dark:focus:ring-matrix-highlight outline-none transition-all dark:text-matrix-highlight dark:placeholder-matrix-secondary/50",disabled:n}),v.jsx("button",{type:"submit",disabled:!o.trim()||n,className:"p-3 bg-azure-primary text-white dark:bg-matrix-secondary dark:text-black dark:hover:bg-matrix-highlight rounded-xl hover:bg-azure-secondary disabled:opacity-50 disabled:cursor-not-allowed transition-colors shadow-md",children:v.jsx(zj,{size:20})})]})})]}):v.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center bg-gray-50 dark:bg-black text-gray-400 dark:text-matrix-secondary/50 h-full",children:[v.jsx(C6,{size:48,className:"mb-4 opacity-20"}),v.jsx("p",{children:"Select a session to start chatting or create a new one."})]})},C6=({size:e,className:t})=>v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,children:v.jsx("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})}),ia={getSessions:async()=>Dt.get("/sessions"),createSession:async()=>Dt.post("/sessions",{}),deleteSession:async e=>Dt.delete(`/sessions/${e}`),renameSession:async(e,t)=>Dt.patch(`/sessions/${e}/title`,{title:t}),archiveSession:async e=>Dt.post(`/sessions/${e}/archive`,{}),getMessages:async e=>Dt.get(`/sessions/${e}/messages`),sendMessage:async(e,t)=>Dt.post("/chat",{sessionId:e,message:t})};function A6({isOpen:e,onClose:t,onConfirm:n,title:i,description:o,confirmJson:u="Confirm",variant:l="default"}){return v.jsx(qc,{open:e,onOpenChange:t,children:v.jsxs(Gc,{className:"sm:max-w-md bg-azure-surface dark:bg-black border-azure-border dark:border-matrix-primary/30",children:[v.jsx(Yc,{children:v.jsx(Xc,{className:"text-azure-primary dark:text-matrix-highlight flex items-center gap-2",children:i})}),v.jsx("div",{className:"py-4",children:v.jsx("p",{className:"text-azure-text-secondary dark:text-matrix-secondary",children:o})}),v.jsxs(eD,{className:"flex flex-col sm:flex-row gap-3 sm:justify-end",children:[v.jsx(Wn,{variant:"outline",onClick:t,className:"dark:border-matrix-primary/30 dark:text-matrix-secondary dark:hover:bg-matrix-primary/20",children:"Cancel"}),v.jsx(Wn,{variant:l,onClick:()=>{n(),t()},className:l==="destructive"?"dark:bg-red-900/50 dark:text-red-200 dark:hover:bg-red-800/60":"dark:bg-matrix-primary dark:text-black dark:hover:bg-matrix-highlight",children:u})]})]})})}const j6=()=>{const[e,t]=E.useState([]),[n,i]=E.useState(null),[o,u]=E.useState([]),[l,f]=E.useState(!1),[d,h]=E.useState(!0),[p,y]=E.useState({isOpen:!1,title:"",description:"",onConfirm:()=>{}}),x=async()=>{try{const T=await ia.getSessions();t(T)}catch(T){console.error("Failed to load sessions:",T)}};E.useEffect(()=>{x()},[]),E.useEffect(()=>{n?b(n):u([])},[n]);const b=async T=>{try{const R=await ia.getMessages(T);u(R.filter(L=>L.type!=="system"&&L.type!=="tool"))}catch(R){console.error("Failed to load messages:",R)}},_=async()=>{try{const T=await ia.createSession();await x(),i(T.id)}catch(T){console.error("Failed to create session:",T)}},z=async T=>{if(!n)return;const R={type:"human",content:T};u(L=>[...L,R]),f(!0);try{await ia.sendMessage(n,T),await b(n),await x()}catch(L){console.error("Failed to send message:",L)}finally{f(!1)}},A=T=>{y({isOpen:!0,title:"Archive Session",description:"Are you sure you want to archive this session? It will be moved to the archives.",confirmJson:"Archive",onConfirm:async()=>{try{await ia.archiveSession(T),n===T&&i(null),await x()}catch(R){console.error("Failed to archive session:",R)}}})},j=T=>{y({isOpen:!0,title:"Delete Session",description:"Are you sure you want to DELETE this session? This action cannot be undone.",confirmJson:"Delete",variant:"destructive",onConfirm:async()=>{try{await ia.deleteSession(T),n===T&&i(null),await x()}catch(R){console.error("Failed to delete session:",R)}}})},N=async(T,R)=>{try{await ia.renameSession(T,R),await x()}catch(L){console.error("Failed to rename session:",L)}};return v.jsxs("div",{className:"flex h-full w-full overflow-hidden bg-gray-50 dark:bg-zinc-950",children:[v.jsx(oD,{sessions:e,activeSessionId:n,onSelectSession:i,onCreateSession:_,onArchiveSession:A,onDeleteSession:j,onRenameSession:N,isOpen:d,toggleSidebar:()=>h(!d)}),v.jsx("div",{className:"flex-1 flex flex-col h-full overflow-hidden",children:v.jsx(T6,{messages:o,onSendMessage:z,isLoading:l,activeSessionId:n})}),v.jsx(A6,{isOpen:p.isOpen,onClose:()=>y(T=>({...T,isOpen:!1})),onConfirm:p.onConfirm,title:p.title,description:p.description,confirmJson:p.confirmJson,variant:p.variant})]})};function aa({title:e,description:t,children:n}){return v.jsxs("div",{className:"border border-azure-border dark:border-matrix-primary rounded-lg p-6 bg-azure-surface/50 dark:bg-matrix-base/50",children:[v.jsxs("div",{className:"mb-4",children:[v.jsx("h3",{className:"text-lg font-medium text-azure-text-primary dark:text-matrix-highlight",children:e}),t&&v.jsx("p",{className:"text-sm text-azure-text-secondary dark:text-matrix-secondary mt-1",children:t})]}),v.jsx("div",{className:"space-y-4",children:n})]})}const N6=(e,t)=>{const n=new Array(e.length+t.length);for(let i=0;i<e.length;i++)n[i]=e[i];for(let i=0;i<t.length;i++)n[e.length+i]=t[i];return n},O6=(e,t)=>({classGroupId:e,validator:t}),f_=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),jc="-",gS=[],R6="arbitrary..",M6=e=>{const t=$6(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return D6(l);const f=l.split(jc),d=f[0]===""&&f.length>1?1:0;return d_(f,d,t)},getConflictingClassGroupIds:(l,f)=>{if(f){const d=i[l],h=n[l];return d?h?N6(h,d):d:h||gS}return n[l]||gS}}},d_=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],u=n.nextPart.get(o);if(u){const h=d_(e,t+1,u);if(h)return h}const l=n.validators;if(l===null)return;const f=t===0?e.join(jc):e.slice(t).join(jc),d=l.length;for(let h=0;h<d;h++){const p=l[h];if(p.validator(f))return p.classGroupId}},D6=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),i=t.slice(0,n);return i?R6+i:void 0})(),$6=e=>{const{theme:t,classGroups:n}=e;return L6(n,t)},L6=(e,t)=>{const n=f_();for(const i in e){const o=e[i];Eg(o,n,i,t)}return n},Eg=(e,t,n,i)=>{const o=e.length;for(let u=0;u<o;u++){const l=e[u];U6(l,t,n,i)}},U6=(e,t,n,i)=>{if(typeof e=="string"){V6(e,t,n);return}if(typeof e=="function"){P6(e,t,n,i);return}Z6(e,t,n,i)},V6=(e,t,n)=>{const i=e===""?t:h_(t,e);i.classGroupId=n},P6=(e,t,n,i)=>{if(B6(e)){Eg(e(i),t,n,i);return}t.validators===null&&(t.validators=[]),t.validators.push(O6(n,e))},Z6=(e,t,n,i)=>{const o=Object.entries(e),u=o.length;for(let l=0;l<u;l++){const[f,d]=o[l];Eg(d,h_(t,f),n,i)}},h_=(e,t)=>{let n=e;const i=t.split(jc),o=i.length;for(let u=0;u<o;u++){const l=i[u];let f=n.nextPart.get(l);f||(f=f_(),n.nextPart.set(l,f)),n=f}return n},B6=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,I6=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),i=Object.create(null);const o=(u,l)=>{n[u]=l,t++,t>e&&(t=0,i=n,n=Object.create(null))};return{get(u){let l=n[u];if(l!==void 0)return l;if((l=i[u])!==void 0)return o(u,l),l},set(u,l){u in n?n[u]=l:o(u,l)}}},mp="!",yS=":",H6=[],xS=(e,t,n,i,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:i,isExternal:o}),F6=e=>{const{prefix:t,experimentalParseClassName:n}=e;let i=o=>{const u=[];let l=0,f=0,d=0,h;const p=o.length;for(let z=0;z<p;z++){const A=o[z];if(l===0&&f===0){if(A===yS){u.push(o.slice(d,z)),d=z+1;continue}if(A==="/"){h=z;continue}}A==="["?l++:A==="]"?l--:A==="("?f++:A===")"&&f--}const y=u.length===0?o:o.slice(d);let x=y,b=!1;y.endsWith(mp)?(x=y.slice(0,-1),b=!0):y.startsWith(mp)&&(x=y.slice(1),b=!0);const _=h&&h>d?h-d:void 0;return xS(u,b,x,_)};if(t){const o=t+yS,u=i;i=l=>l.startsWith(o)?u(l.slice(o.length)):xS(H6,!1,l,void 0,!0)}if(n){const o=i;i=u=>n({className:u,parseClassName:o})}return i},q6=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,i)=>{t.set(n,1e6+i)}),n=>{const i=[];let o=[];for(let u=0;u<n.length;u++){const l=n[u],f=l[0]==="[",d=t.has(l);f||d?(o.length>0&&(o.sort(),i.push(...o),o=[]),i.push(l)):o.push(l)}return o.length>0&&(o.sort(),i.push(...o)),i}},G6=e=>({cache:I6(e.cacheSize),parseClassName:F6(e),sortModifiers:q6(e),...M6(e)}),Y6=/\s+/,X6=(e,t)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:o,sortModifiers:u}=t,l=[],f=e.trim().split(Y6);let d="";for(let h=f.length-1;h>=0;h-=1){const p=f[h],{isExternal:y,modifiers:x,hasImportantModifier:b,baseClassName:_,maybePostfixModifierPosition:z}=n(p);if(y){d=p+(d.length>0?" "+d:d);continue}let A=!!z,j=i(A?_.substring(0,z):_);if(!j){if(!A){d=p+(d.length>0?" "+d:d);continue}if(j=i(_),!j){d=p+(d.length>0?" "+d:d);continue}A=!1}const N=x.length===0?"":x.length===1?x[0]:u(x).join(":"),T=b?N+mp:N,R=T+j;if(l.indexOf(R)>-1)continue;l.push(R);const L=o(j,A);for(let $=0;$<L.length;++$){const q=L[$];l.push(T+q)}d=p+(d.length>0?" "+d:d)}return d},K6=(...e)=>{let t=0,n,i,o="";for(;t<e.length;)(n=e[t++])&&(i=m_(n))&&(o&&(o+=" "),o+=i);return o},m_=e=>{if(typeof e=="string")return e;let t,n="";for(let i=0;i<e.length;i++)e[i]&&(t=m_(e[i]))&&(n&&(n+=" "),n+=t);return n},J6=(e,...t)=>{let n,i,o,u;const l=d=>{const h=t.reduce((p,y)=>y(p),e());return n=G6(h),i=n.cache.get,o=n.cache.set,u=f,f(d)},f=d=>{const h=i(d);if(h)return h;const p=X6(d,n);return o(d,p),p};return u=l,(...d)=>u(K6(...d))},Q6=[],Bt=e=>{const t=n=>n[e]||Q6;return t.isThemeGetter=!0,t},p_=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,g_=/^\((?:(\w[\w-]*):)?(.+)\)$/i,W6=/^\d+\/\d+$/,eL=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,tL=/\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$/,nL=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,rL=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,iL=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,lo=e=>W6.test(e),Ne=e=>!!e&&!Number.isNaN(Number(e)),zi=e=>!!e&&Number.isInteger(Number(e)),dm=e=>e.endsWith("%")&&Ne(e.slice(0,-1)),Fr=e=>eL.test(e),aL=()=>!0,oL=e=>tL.test(e)&&!nL.test(e),y_=()=>!1,sL=e=>rL.test(e),lL=e=>iL.test(e),uL=e=>!fe(e)&&!de(e),cL=e=>Zo(e,b_,y_),fe=e=>p_.test(e),oa=e=>Zo(e,S_,oL),hm=e=>Zo(e,pL,Ne),vS=e=>Zo(e,x_,y_),fL=e=>Zo(e,v_,lL),tc=e=>Zo(e,w_,sL),de=e=>g_.test(e),Fs=e=>Bo(e,S_),dL=e=>Bo(e,gL),bS=e=>Bo(e,x_),hL=e=>Bo(e,b_),mL=e=>Bo(e,v_),nc=e=>Bo(e,w_,!0),Zo=(e,t,n)=>{const i=p_.exec(e);return i?i[1]?t(i[1]):n(i[2]):!1},Bo=(e,t,n=!1)=>{const i=g_.exec(e);return i?i[1]?t(i[1]):n:!1},x_=e=>e==="position"||e==="percentage",v_=e=>e==="image"||e==="url",b_=e=>e==="length"||e==="size"||e==="bg-size",S_=e=>e==="length",pL=e=>e==="number",gL=e=>e==="family-name",w_=e=>e==="shadow",yL=()=>{const e=Bt("color"),t=Bt("font"),n=Bt("text"),i=Bt("font-weight"),o=Bt("tracking"),u=Bt("leading"),l=Bt("breakpoint"),f=Bt("container"),d=Bt("spacing"),h=Bt("radius"),p=Bt("shadow"),y=Bt("inset-shadow"),x=Bt("text-shadow"),b=Bt("drop-shadow"),_=Bt("blur"),z=Bt("perspective"),A=Bt("aspect"),j=Bt("ease"),N=Bt("animate"),T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],L=()=>[...R(),de,fe],$=()=>["auto","hidden","clip","visible","scroll"],q=()=>["auto","contain","none"],P=()=>[de,fe,d],K=()=>[lo,"full","auto",...P()],ie=()=>[zi,"none","subgrid",de,fe],ne=()=>["auto",{span:["full",zi,de,fe]},zi,de,fe],oe=()=>[zi,"auto",de,fe],we=()=>["auto","min","max","fr",de,fe],ue=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],re=()=>["start","end","center","stretch","center-safe","end-safe"],V=()=>["auto",...P()],X=()=>[lo,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],G=()=>[e,de,fe],ve=()=>[...R(),bS,vS,{position:[de,fe]}],O=()=>["no-repeat",{repeat:["","x","y","space","round"]}],C=()=>["auto","cover","contain",hL,cL,{size:[de,fe]}],F=()=>[dm,Fs,oa],k=()=>["","none","full",h,de,fe],ae=()=>["",Ne,Fs,oa],xe=()=>["solid","dashed","dotted","double"],me=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],pe=()=>[Ne,dm,bS,vS],Ge=()=>["","none",_,de,fe],De=()=>["none",Ne,de,fe],Ct=()=>["none",Ne,de,fe],an=()=>[Ne,de,fe],$n=()=>[lo,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Fr],breakpoint:[Fr],color:[aL],container:[Fr],"drop-shadow":[Fr],ease:["in","out","in-out"],font:[uL],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Fr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Fr],shadow:[Fr],spacing:["px",Ne],text:[Fr],"text-shadow":[Fr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",lo,fe,de,A]}],container:["container"],columns:[{columns:[Ne,fe,de,f]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"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:L()}],overflow:[{overflow:$()}],"overflow-x":[{"overflow-x":$()}],"overflow-y":[{"overflow-y":$()}],overscroll:[{overscroll:q()}],"overscroll-x":[{"overscroll-x":q()}],"overscroll-y":[{"overscroll-y":q()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:K()}],"inset-x":[{"inset-x":K()}],"inset-y":[{"inset-y":K()}],start:[{start:K()}],end:[{end:K()}],top:[{top:K()}],right:[{right:K()}],bottom:[{bottom:K()}],left:[{left:K()}],visibility:["visible","invisible","collapse"],z:[{z:[zi,"auto",de,fe]}],basis:[{basis:[lo,"full","auto",f,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ne,lo,"auto","initial","none",fe]}],grow:[{grow:["",Ne,de,fe]}],shrink:[{shrink:["",Ne,de,fe]}],order:[{order:[zi,"first","last","none",de,fe]}],"grid-cols":[{"grid-cols":ie()}],"col-start-end":[{col:ne()}],"col-start":[{"col-start":oe()}],"col-end":[{"col-end":oe()}],"grid-rows":[{"grid-rows":ie()}],"row-start-end":[{row:ne()}],"row-start":[{"row-start":oe()}],"row-end":[{"row-end":oe()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":we()}],"auto-rows":[{"auto-rows":we()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...ue(),"normal"]}],"justify-items":[{"justify-items":[...re(),"normal"]}],"justify-self":[{"justify-self":["auto",...re()]}],"align-content":[{content:["normal",...ue()]}],"align-items":[{items:[...re(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...re(),{baseline:["","last"]}]}],"place-content":[{"place-content":ue()}],"place-items":[{"place-items":[...re(),"baseline"]}],"place-self":[{"place-self":["auto",...re()]}],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:V()}],mx:[{mx:V()}],my:[{my:V()}],ms:[{ms:V()}],me:[{me:V()}],mt:[{mt:V()}],mr:[{mr:V()}],mb:[{mb:V()}],ml:[{ml:V()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:X()}],w:[{w:[f,"screen",...X()]}],"min-w":[{"min-w":[f,"screen","none",...X()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[l]},...X()]}],h:[{h:["screen","lh",...X()]}],"min-h":[{"min-h":["screen","lh","none",...X()]}],"max-h":[{"max-h":["screen","lh",...X()]}],"font-size":[{text:["base",n,Fs,oa]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,de,hm]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",dm,fe]}],"font-family":[{font:[dL,fe,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:[o,de,fe]}],"line-clamp":[{"line-clamp":[Ne,"none",de,hm]}],leading:[{leading:[u,...P()]}],"list-image":[{"list-image":["none",de,fe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",de,fe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:G()}],"text-color":[{text:G()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...xe(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ne,"from-font","auto",de,oa]}],"text-decoration-color":[{decoration:G()}],"underline-offset":[{"underline-offset":[Ne,"auto",de,fe]}],"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",de,fe]}],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",de,fe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ve()}],"bg-repeat":[{bg:O()}],"bg-size":[{bg:C()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},zi,de,fe],radial:["",de,fe],conic:[zi,de,fe]},mL,fL]}],"bg-color":[{bg:G()}],"gradient-from-pos":[{from:F()}],"gradient-via-pos":[{via:F()}],"gradient-to-pos":[{to:F()}],"gradient-from":[{from:G()}],"gradient-via":[{via:G()}],"gradient-to":[{to:G()}],rounded:[{rounded:k()}],"rounded-s":[{"rounded-s":k()}],"rounded-e":[{"rounded-e":k()}],"rounded-t":[{"rounded-t":k()}],"rounded-r":[{"rounded-r":k()}],"rounded-b":[{"rounded-b":k()}],"rounded-l":[{"rounded-l":k()}],"rounded-ss":[{"rounded-ss":k()}],"rounded-se":[{"rounded-se":k()}],"rounded-ee":[{"rounded-ee":k()}],"rounded-es":[{"rounded-es":k()}],"rounded-tl":[{"rounded-tl":k()}],"rounded-tr":[{"rounded-tr":k()}],"rounded-br":[{"rounded-br":k()}],"rounded-bl":[{"rounded-bl":k()}],"border-w":[{border:ae()}],"border-w-x":[{"border-x":ae()}],"border-w-y":[{"border-y":ae()}],"border-w-s":[{"border-s":ae()}],"border-w-e":[{"border-e":ae()}],"border-w-t":[{"border-t":ae()}],"border-w-r":[{"border-r":ae()}],"border-w-b":[{"border-b":ae()}],"border-w-l":[{"border-l":ae()}],"divide-x":[{"divide-x":ae()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ae()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...xe(),"hidden","none"]}],"divide-style":[{divide:[...xe(),"hidden","none"]}],"border-color":[{border:G()}],"border-color-x":[{"border-x":G()}],"border-color-y":[{"border-y":G()}],"border-color-s":[{"border-s":G()}],"border-color-e":[{"border-e":G()}],"border-color-t":[{"border-t":G()}],"border-color-r":[{"border-r":G()}],"border-color-b":[{"border-b":G()}],"border-color-l":[{"border-l":G()}],"divide-color":[{divide:G()}],"outline-style":[{outline:[...xe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ne,de,fe]}],"outline-w":[{outline:["",Ne,Fs,oa]}],"outline-color":[{outline:G()}],shadow:[{shadow:["","none",p,nc,tc]}],"shadow-color":[{shadow:G()}],"inset-shadow":[{"inset-shadow":["none",y,nc,tc]}],"inset-shadow-color":[{"inset-shadow":G()}],"ring-w":[{ring:ae()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:G()}],"ring-offset-w":[{"ring-offset":[Ne,oa]}],"ring-offset-color":[{"ring-offset":G()}],"inset-ring-w":[{"inset-ring":ae()}],"inset-ring-color":[{"inset-ring":G()}],"text-shadow":[{"text-shadow":["none",x,nc,tc]}],"text-shadow-color":[{"text-shadow":G()}],opacity:[{opacity:[Ne,de,fe]}],"mix-blend":[{"mix-blend":[...me(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":me()}],"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":[Ne]}],"mask-image-linear-from-pos":[{"mask-linear-from":pe()}],"mask-image-linear-to-pos":[{"mask-linear-to":pe()}],"mask-image-linear-from-color":[{"mask-linear-from":G()}],"mask-image-linear-to-color":[{"mask-linear-to":G()}],"mask-image-t-from-pos":[{"mask-t-from":pe()}],"mask-image-t-to-pos":[{"mask-t-to":pe()}],"mask-image-t-from-color":[{"mask-t-from":G()}],"mask-image-t-to-color":[{"mask-t-to":G()}],"mask-image-r-from-pos":[{"mask-r-from":pe()}],"mask-image-r-to-pos":[{"mask-r-to":pe()}],"mask-image-r-from-color":[{"mask-r-from":G()}],"mask-image-r-to-color":[{"mask-r-to":G()}],"mask-image-b-from-pos":[{"mask-b-from":pe()}],"mask-image-b-to-pos":[{"mask-b-to":pe()}],"mask-image-b-from-color":[{"mask-b-from":G()}],"mask-image-b-to-color":[{"mask-b-to":G()}],"mask-image-l-from-pos":[{"mask-l-from":pe()}],"mask-image-l-to-pos":[{"mask-l-to":pe()}],"mask-image-l-from-color":[{"mask-l-from":G()}],"mask-image-l-to-color":[{"mask-l-to":G()}],"mask-image-x-from-pos":[{"mask-x-from":pe()}],"mask-image-x-to-pos":[{"mask-x-to":pe()}],"mask-image-x-from-color":[{"mask-x-from":G()}],"mask-image-x-to-color":[{"mask-x-to":G()}],"mask-image-y-from-pos":[{"mask-y-from":pe()}],"mask-image-y-to-pos":[{"mask-y-to":pe()}],"mask-image-y-from-color":[{"mask-y-from":G()}],"mask-image-y-to-color":[{"mask-y-to":G()}],"mask-image-radial":[{"mask-radial":[de,fe]}],"mask-image-radial-from-pos":[{"mask-radial-from":pe()}],"mask-image-radial-to-pos":[{"mask-radial-to":pe()}],"mask-image-radial-from-color":[{"mask-radial-from":G()}],"mask-image-radial-to-color":[{"mask-radial-to":G()}],"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":R()}],"mask-image-conic-pos":[{"mask-conic":[Ne]}],"mask-image-conic-from-pos":[{"mask-conic-from":pe()}],"mask-image-conic-to-pos":[{"mask-conic-to":pe()}],"mask-image-conic-from-color":[{"mask-conic-from":G()}],"mask-image-conic-to-color":[{"mask-conic-to":G()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ve()}],"mask-repeat":[{mask:O()}],"mask-size":[{mask:C()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",de,fe]}],filter:[{filter:["","none",de,fe]}],blur:[{blur:Ge()}],brightness:[{brightness:[Ne,de,fe]}],contrast:[{contrast:[Ne,de,fe]}],"drop-shadow":[{"drop-shadow":["","none",b,nc,tc]}],"drop-shadow-color":[{"drop-shadow":G()}],grayscale:[{grayscale:["",Ne,de,fe]}],"hue-rotate":[{"hue-rotate":[Ne,de,fe]}],invert:[{invert:["",Ne,de,fe]}],saturate:[{saturate:[Ne,de,fe]}],sepia:[{sepia:["",Ne,de,fe]}],"backdrop-filter":[{"backdrop-filter":["","none",de,fe]}],"backdrop-blur":[{"backdrop-blur":Ge()}],"backdrop-brightness":[{"backdrop-brightness":[Ne,de,fe]}],"backdrop-contrast":[{"backdrop-contrast":[Ne,de,fe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ne,de,fe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ne,de,fe]}],"backdrop-invert":[{"backdrop-invert":["",Ne,de,fe]}],"backdrop-opacity":[{"backdrop-opacity":[Ne,de,fe]}],"backdrop-saturate":[{"backdrop-saturate":[Ne,de,fe]}],"backdrop-sepia":[{"backdrop-sepia":["",Ne,de,fe]}],"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",de,fe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ne,"initial",de,fe]}],ease:[{ease:["linear","initial",j,de,fe]}],delay:[{delay:[Ne,de,fe]}],animate:[{animate:["none",N,de,fe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[z,de,fe]}],"perspective-origin":[{"perspective-origin":L()}],rotate:[{rotate:De()}],"rotate-x":[{"rotate-x":De()}],"rotate-y":[{"rotate-y":De()}],"rotate-z":[{"rotate-z":De()}],scale:[{scale:Ct()}],"scale-x":[{"scale-x":Ct()}],"scale-y":[{"scale-y":Ct()}],"scale-z":[{"scale-z":Ct()}],"scale-3d":["scale-3d"],skew:[{skew:an()}],"skew-x":[{"skew-x":an()}],"skew-y":[{"skew-y":an()}],transform:[{transform:[de,fe,"","none","gpu","cpu"]}],"transform-origin":[{origin:L()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:$n()}],"translate-x":[{"translate-x":$n()}],"translate-y":[{"translate-y":$n()}],"translate-z":[{"translate-z":$n()}],"translate-none":["translate-none"],accent:[{accent:G()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:G()}],"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",de,fe]}],"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",de,fe]}],fill:[{fill:["none",...G()]}],"stroke-w":[{stroke:[Ne,Fs,oa,hm]}],stroke:[{stroke:["none",...G()]}],"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"]}},Eo=J6(yL);function Xn({label:e,error:t,helperText:n,className:i,...o}){return v.jsxs("div",{className:"flex flex-col gap-1.5",children:[v.jsx("label",{className:"text-sm font-medium text-azure-text-primary/80 dark:text-matrix-highlight/80",children:e}),v.jsx("input",{className:Eo("bg-azure-bg dark:bg-matrix-base border border-azure-border dark:border-matrix-primary text-azure-text-primary dark:text-matrix-highlight placeholder-azure-text-secondary/50 dark:placeholder-matrix-secondary/50 rounded-md px-3 py-2 text-sm focus:outline-none focus:ring-1 focus:ring-azure-primary dark:focus:ring-matrix-highlight focus:border-azure-primary dark:focus:border-matrix-highlight transition-colors",t&&"border-red-500 focus:border-red-500 focus:ring-red-500",i),...o}),n&&!t&&v.jsx("p",{className:"text-xs text-azure-text-secondary dark:text-matrix-secondary",children:n}),t&&v.jsx("p",{className:"text-xs text-red-500",children:t})]})}function rc({label:e,options:t,error:n,helperText:i,className:o,...u}){return v.jsxs("div",{className:"flex flex-col gap-1.5",children:[v.jsx("label",{className:"text-sm font-medium text-azure-text-primary/80 dark:text-matrix-highlight/80",children:e}),v.jsx("select",{className:Eo("bg-azure-bg dark:bg-matrix-base border border-azure-border dark:border-matrix-primary text-azure-text-primary dark:text-matrix-highlight rounded-md px-3 py-2 text-sm focus:outline-none focus:ring-1 focus:ring-azure-primary dark:focus:ring-matrix-highlight focus:border-azure-primary dark:focus:border-matrix-highlight transition-colors appearance-none",n&&"border-red-500 focus:border-red-500 focus:ring-red-500",o),...u,children:t.map(l=>v.jsx("option",{value:l.value,className:"bg-azure-bg dark:bg-matrix-base",children:l.label},l.value))}),i&&!n&&v.jsx("p",{className:"text-xs text-azure-text-secondary dark:text-matrix-secondary",children:i}),n&&v.jsx("p",{className:"text-xs text-red-500",children:n})]})}function uo({label:e,error:t,helperText:n,className:i,...o}){return v.jsxs("div",{className:"flex flex-col gap-1.5",children:[v.jsx("label",{className:"text-sm font-medium text-azure-text-primary/80 dark:text-matrix-highlight/80",children:e}),v.jsx("input",{type:"number",className:Eo("bg-azure-bg dark:bg-matrix-base border border-azure-border dark:border-matrix-primary text-azure-text-primary dark:text-matrix-highlight placeholder-azure-text-secondary/50 dark:placeholder-matrix-secondary/50 rounded-md px-3 py-2 text-sm focus:outline-none focus:ring-1 focus:ring-azure-primary dark:focus:ring-matrix-highlight focus:border-azure-primary dark:focus:border-matrix-highlight transition-colors",t&&"border-red-500 focus:border-red-500 focus:ring-red-500",i),...o}),n&&!t&&v.jsx("p",{className:"text-xs text-azure-text-secondary dark:text-matrix-secondary",children:n}),t&&v.jsx("p",{className:"text-xs text-red-500",children:t})]})}function qs({label:e,checked:t,onChange:n,helperText:i,disabled:o}){return v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsxs("div",{className:"flex flex-col",children:[v.jsx("span",{className:Eo("text-sm font-medium text-azure-text-primary/80 dark:text-matrix-highlight/80",o&&"opacity-50"),children:e}),i&&v.jsx("span",{className:"text-xs text-azure-text-secondary dark:text-matrix-secondary",children:i})]}),v.jsx("button",{type:"button",role:"switch","aria-checked":t,onClick:()=>!o&&n(!t),className:Eo("relative inline-flex h-6 w-11 items-center rounded-full transition-colors focus:outline-none focus:ring-2 focus:ring-azure-primary dark:focus:ring-matrix-highlight focus:ring-offset-2 focus:ring-offset-azure-bg dark:focus:ring-offset-black",t?"bg-azure-primary dark:bg-matrix-highlight":"bg-slate-300 dark:bg-matrix-primary",o&&"opacity-50 cursor-not-allowed"),children:v.jsx("span",{className:Eo("inline-block h-4 w-4 transform rounded-full bg-white dark:bg-black transition-transform",t?"translate-x-6":"translate-x-1")})})]})}const ic={fetchConfig:async()=>Dt.get("/config"),updateConfig:async e=>Dt.post("/config",e),getSatiConfig:async()=>Dt.get("/config/sati"),updateSatiConfig:async e=>Dt.post("/config/sati",e),deleteSatiConfig:async()=>Dt.delete("/config/sati")};function Q(e,t,n){function i(f,d){if(f._zod||Object.defineProperty(f,"_zod",{value:{def:d,constr:l,traits:new Set},enumerable:!1}),f._zod.traits.has(e))return;f._zod.traits.add(e),t(f,d);const h=l.prototype,p=Object.keys(h);for(let y=0;y<p.length;y++){const x=p[y];x in f||(f[x]=h[x].bind(f))}}const o=n?.Parent??Object;class u extends o{}Object.defineProperty(u,"name",{value:e});function l(f){var d;const h=n?.Parent?new u:this;i(h,f),(d=h._zod).deferred??(d.deferred=[]);for(const p of h._zod.deferred)p();return h}return Object.defineProperty(l,"init",{value:i}),Object.defineProperty(l,Symbol.hasInstance,{value:f=>n?.Parent&&f instanceof n.Parent?!0:f?._zod?.traits?.has(e)}),Object.defineProperty(l,"name",{value:e}),l}let To=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},k_=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};const z_={};function ji(e){return z_}function __(e){const t=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,o])=>t.indexOf(+i)===-1).map(([i,o])=>o)}function pp(e,t){return typeof t=="bigint"?t.toString():t}function Wc(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Tg(e){return e==null}function Cg(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function xL(e,t){const n=(e.toString().split(".")[1]||"").length,i=t.toString();let o=(i.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(i)){const d=i.match(/\d?e-(\d?)/);d?.[1]&&(o=Number.parseInt(d[1]))}const u=n>o?n:o,l=Number.parseInt(e.toFixed(u).replace(".","")),f=Number.parseInt(t.toFixed(u).replace(".",""));return l%f/10**u}const SS=Symbol("evaluating");function qe(e,t,n){let i;Object.defineProperty(e,t,{get(){if(i!==SS)return i===void 0&&(i=SS,i=n()),i},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function va(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Mi(...e){const t={};for(const n of e){const i=Object.getOwnPropertyDescriptors(n);Object.assign(t,i)}return Object.defineProperties({},t)}function wS(e){return JSON.stringify(e)}function vL(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const E_="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function pl(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const bL=Wc(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function jo(e){if(pl(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(pl(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function T_(e){return jo(e)?{...e}:Array.isArray(e)?[...e]:e}const SL=new Set(["string","number","symbol"]);function No(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Di(e,t,n){const i=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(i._zod.parent=e),i}function be(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function wL(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const kL={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function zL(e,t){const n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const u=Mi(e._zod.def,{get shape(){const l={};for(const f in t){if(!(f in n.shape))throw new Error(`Unrecognized key: "${f}"`);t[f]&&(l[f]=n.shape[f])}return va(this,"shape",l),l},checks:[]});return Di(e,u)}function _L(e,t){const n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const u=Mi(e._zod.def,{get shape(){const l={...e._zod.def.shape};for(const f in t){if(!(f in n.shape))throw new Error(`Unrecognized key: "${f}"`);t[f]&&delete l[f]}return va(this,"shape",l),l},checks:[]});return Di(e,u)}function EL(e,t){if(!jo(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const u=e._zod.def.shape;for(const l in t)if(Object.getOwnPropertyDescriptor(u,l)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=Mi(e._zod.def,{get shape(){const u={...e._zod.def.shape,...t};return va(this,"shape",u),u}});return Di(e,o)}function TL(e,t){if(!jo(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=Mi(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return va(this,"shape",i),i}});return Di(e,n)}function CL(e,t){const n=Mi(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t._zod.def.shape};return va(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:[]});return Di(e,n)}function AL(e,t,n){const o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const l=Mi(t._zod.def,{get shape(){const f=t._zod.def.shape,d={...f};if(n)for(const h in n){if(!(h in f))throw new Error(`Unrecognized key: "${h}"`);n[h]&&(d[h]=e?new e({type:"optional",innerType:f[h]}):f[h])}else for(const h in f)d[h]=e?new e({type:"optional",innerType:f[h]}):f[h];return va(this,"shape",d),d},checks:[]});return Di(t,l)}function jL(e,t,n){const i=Mi(t._zod.def,{get shape(){const o=t._zod.def.shape,u={...o};if(n)for(const l in n){if(!(l in u))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(u[l]=new e({type:"nonoptional",innerType:o[l]}))}else for(const l in o)u[l]=new e({type:"nonoptional",innerType:o[l]});return va(this,"shape",u),u}});return Di(t,i)}function xo(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function vo(e,t){return t.map(n=>{var i;return(i=n).path??(i.path=[]),n.path.unshift(e),n})}function ac(e){return typeof e=="string"?e:e?.message}function Ni(e,t,n){const i={...e,path:e.path??[]};if(!e.message){const o=ac(e.inst?._zod.def?.error?.(e))??ac(t?.error?.(e))??ac(n.customError?.(e))??ac(n.localeError?.(e))??"Invalid input";i.message=o}return delete i.inst,delete i.continue,t?.reportInput||delete i.input,i}function Ag(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function gl(...e){const[t,n,i]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:i}:{...t}}const C_=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,pp,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},A_=Q("$ZodError",C_),j_=Q("$ZodError",C_,{Parent:Error});function NL(e,t=n=>n.message){const n={},i=[];for(const o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):i.push(t(o));return{formErrors:i,fieldErrors:n}}function OL(e,t=n=>n.message){const n={_errors:[]},i=o=>{for(const u of o.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(l=>i({issues:l}));else if(u.code==="invalid_key")i({issues:u.issues});else if(u.code==="invalid_element")i({issues:u.issues});else if(u.path.length===0)n._errors.push(t(u));else{let l=n,f=0;for(;f<u.path.length;){const d=u.path[f];f===u.path.length-1?(l[d]=l[d]||{_errors:[]},l[d]._errors.push(t(u))):l[d]=l[d]||{_errors:[]},l=l[d],f++}}};return i(e),n}const jg=e=>(t,n,i,o)=>{const u=i?Object.assign(i,{async:!1}):{async:!1},l=t._zod.run({value:n,issues:[]},u);if(l instanceof Promise)throw new To;if(l.issues.length){const f=new(o?.Err??e)(l.issues.map(d=>Ni(d,u,ji())));throw E_(f,o?.callee),f}return l.value},Ng=e=>async(t,n,i,o)=>{const u=i?Object.assign(i,{async:!0}):{async:!0};let l=t._zod.run({value:n,issues:[]},u);if(l instanceof Promise&&(l=await l),l.issues.length){const f=new(o?.Err??e)(l.issues.map(d=>Ni(d,u,ji())));throw E_(f,o?.callee),f}return l.value},ef=e=>(t,n,i)=>{const o=i?{...i,async:!1}:{async:!1},u=t._zod.run({value:n,issues:[]},o);if(u instanceof Promise)throw new To;return u.issues.length?{success:!1,error:new(e??A_)(u.issues.map(l=>Ni(l,o,ji())))}:{success:!0,data:u.value}},RL=ef(j_),tf=e=>async(t,n,i)=>{const o=i?Object.assign(i,{async:!0}):{async:!0};let u=t._zod.run({value:n,issues:[]},o);return u instanceof Promise&&(u=await u),u.issues.length?{success:!1,error:new e(u.issues.map(l=>Ni(l,o,ji())))}:{success:!0,data:u.value}},ML=tf(j_),DL=e=>(t,n,i)=>{const o=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return jg(e)(t,n,o)},$L=e=>(t,n,i)=>jg(e)(t,n,i),LL=e=>async(t,n,i)=>{const o=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Ng(e)(t,n,o)},UL=e=>async(t,n,i)=>Ng(e)(t,n,i),VL=e=>(t,n,i)=>{const o=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return ef(e)(t,n,o)},PL=e=>(t,n,i)=>ef(e)(t,n,i),ZL=e=>async(t,n,i)=>{const o=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return tf(e)(t,n,o)},BL=e=>async(t,n,i)=>tf(e)(t,n,i),IL=/^[cC][^\s-]{8,}$/,HL=/^[0-9a-z]+$/,FL=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,qL=/^[0-9a-vA-V]{20}$/,GL=/^[A-Za-z0-9]{27}$/,YL=/^[a-zA-Z0-9_-]{21}$/,XL=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,KL=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,kS=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,JL=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,QL="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function WL(){return new RegExp(QL,"u")}const e9=/^(?:(?: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])$/,t9=/^(([0-9a-fA-F]{1,4}:){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}|:))$/,n9=/^((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])\/([0-9]|[1-2][0-9]|3[0-2])$/,r9=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,i9=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,N_=/^[A-Za-z0-9_-]*$/,a9=/^\+[1-9]\d{6,14}$/,O_="(?:(?:\\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])))",o9=new RegExp(`^${O_}$`);function R_(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function s9(e){return new RegExp(`^${R_(e)}$`)}function l9(e){const t=R_({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const i=`${t}(?:${n.join("|")})`;return new RegExp(`^${O_}T(?:${i})$`)}const u9=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},c9=/^-?\d+$/,M_=/^-?\d+(?:\.\d+)?$/,f9=/^(?:true|false)$/i,d9=/^[^A-Z]*$/,h9=/^[^a-z]*$/,zn=Q("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),D_={number:"number",bigint:"bigint",object:"date"},$_=Q("$ZodCheckLessThan",(e,t)=>{zn.init(e,t);const n=D_[typeof t.value];e._zod.onattach.push(i=>{const o=i._zod.bag,u=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<u&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),L_=Q("$ZodCheckGreaterThan",(e,t)=>{zn.init(e,t);const n=D_[typeof t.value];e._zod.onattach.push(i=>{const o=i._zod.bag,u=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>u&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),m9=Q("$ZodCheckMultipleOf",(e,t)=>{zn.init(e,t),e._zod.onattach.push(n=>{var i;(i=n._zod.bag).multipleOf??(i.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):xL(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),p9=Q("$ZodCheckNumberFormat",(e,t)=>{zn.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),i=n?"int":"number",[o,u]=kL[t.format];e._zod.onattach.push(l=>{const f=l._zod.bag;f.format=t.format,f.minimum=o,f.maximum=u,n&&(f.pattern=c9)}),e._zod.check=l=>{const f=l.value;if(n){if(!Number.isInteger(f)){l.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:f,inst:e});return}if(!Number.isSafeInteger(f)){f>0?l.issues.push({input:f,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}):l.issues.push({input:f,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort});return}}f<o&&l.issues.push({origin:"number",input:f,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),f>u&&l.issues.push({origin:"number",input:f,code:"too_big",maximum:u,inclusive:!0,inst:e,continue:!t.abort})}}),g9=Q("$ZodCheckMaxLength",(e,t)=>{var n;zn.init(e,t),(n=e._zod.def).when??(n.when=i=>{const o=i.value;return!Tg(o)&&o.length!==void 0}),e._zod.onattach.push(i=>{const o=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{const o=i.value;if(o.length<=t.maximum)return;const l=Ag(o);i.issues.push({origin:l,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),y9=Q("$ZodCheckMinLength",(e,t)=>{var n;zn.init(e,t),(n=e._zod.def).when??(n.when=i=>{const o=i.value;return!Tg(o)&&o.length!==void 0}),e._zod.onattach.push(i=>{const o=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{const o=i.value;if(o.length>=t.minimum)return;const l=Ag(o);i.issues.push({origin:l,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),x9=Q("$ZodCheckLengthEquals",(e,t)=>{var n;zn.init(e,t),(n=e._zod.def).when??(n.when=i=>{const o=i.value;return!Tg(o)&&o.length!==void 0}),e._zod.onattach.push(i=>{const o=i._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=i=>{const o=i.value,u=o.length;if(u===t.length)return;const l=Ag(o),f=u>t.length;i.issues.push({origin:l,...f?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),nf=Q("$ZodCheckStringFormat",(e,t)=>{var n,i;zn.init(e,t),e._zod.onattach.push(o=>{const u=o._zod.bag;u.format=t.format,t.pattern&&(u.patterns??(u.patterns=new Set),u.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),v9=Q("$ZodCheckRegex",(e,t)=>{nf.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),b9=Q("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=d9),nf.init(e,t)}),S9=Q("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=h9),nf.init(e,t)}),w9=Q("$ZodCheckIncludes",(e,t)=>{zn.init(e,t);const n=No(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=i,e._zod.onattach.push(o=>{const u=o._zod.bag;u.patterns??(u.patterns=new Set),u.patterns.add(i)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),k9=Q("$ZodCheckStartsWith",(e,t)=>{zn.init(e,t);const n=new RegExp(`^${No(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(i=>{const o=i._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),z9=Q("$ZodCheckEndsWith",(e,t)=>{zn.init(e,t);const n=new RegExp(`.*${No(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(i=>{const o=i._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}}),_9=Q("$ZodCheckOverwrite",(e,t)=>{zn.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});let E9=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const i=t.split(`
33
+ `).filter(l=>l),o=Math.min(...i.map(l=>l.length-l.trimStart().length)),u=i.map(l=>l.slice(o)).map(l=>" ".repeat(this.indent*2)+l);for(const l of u)this.content.push(l)}compile(){const t=Function,n=this?.args,o=[...(this?.content??[""]).map(u=>` ${u}`)];return new t(...n,o.join(`
34
+ `))}};const T9={major:4,minor:3,patch:6},xt=Q("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=T9;const i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(const o of i)for(const u of o._zod.onattach)u(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const o=(l,f,d)=>{let h=xo(l),p;for(const y of f){if(y._zod.def.when){if(!y._zod.def.when(l))continue}else if(h)continue;const x=l.issues.length,b=y._zod.check(l);if(b instanceof Promise&&d?.async===!1)throw new To;if(p||b instanceof Promise)p=(p??Promise.resolve()).then(async()=>{await b,l.issues.length!==x&&(h||(h=xo(l,x)))});else{if(l.issues.length===x)continue;h||(h=xo(l,x))}}return p?p.then(()=>l):l},u=(l,f,d)=>{if(xo(l))return l.aborted=!0,l;const h=o(f,i,d);if(h instanceof Promise){if(d.async===!1)throw new To;return h.then(p=>e._zod.parse(p,d))}return e._zod.parse(h,d)};e._zod.run=(l,f)=>{if(f.skipChecks)return e._zod.parse(l,f);if(f.direction==="backward"){const h=e._zod.parse({value:l.value,issues:[]},{...f,skipChecks:!0});return h instanceof Promise?h.then(p=>u(p,l,f)):u(h,l,f)}const d=e._zod.parse(l,f);if(d instanceof Promise){if(f.async===!1)throw new To;return d.then(h=>o(h,i,f))}return o(d,i,f)}}qe(e,"~standard",()=>({validate:o=>{try{const u=RL(e,o);return u.success?{value:u.data}:{issues:u.error?.issues}}catch{return ML(e,o).then(l=>l.success?{value:l.data}:{issues:l.error?.issues})}},vendor:"zod",version:1}))}),Og=Q("$ZodString",(e,t)=>{xt.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??u9(e._zod.bag),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),pt=Q("$ZodStringFormat",(e,t)=>{nf.init(e,t),Og.init(e,t)}),C9=Q("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=KL),pt.init(e,t)}),A9=Q("$ZodUUID",(e,t)=>{if(t.version){const i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(i===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=kS(i))}else t.pattern??(t.pattern=kS());pt.init(e,t)}),j9=Q("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=JL),pt.init(e,t)}),N9=Q("$ZodURL",(e,t)=>{pt.init(e,t),e._zod.check=n=>{try{const i=n.value.trim(),o=new URL(i);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=o.href:n.value=i;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),O9=Q("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=WL()),pt.init(e,t)}),R9=Q("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=YL),pt.init(e,t)}),M9=Q("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=IL),pt.init(e,t)}),D9=Q("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=HL),pt.init(e,t)}),$9=Q("$ZodULID",(e,t)=>{t.pattern??(t.pattern=FL),pt.init(e,t)}),L9=Q("$ZodXID",(e,t)=>{t.pattern??(t.pattern=qL),pt.init(e,t)}),U9=Q("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=GL),pt.init(e,t)}),V9=Q("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=l9(t)),pt.init(e,t)}),P9=Q("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=o9),pt.init(e,t)}),Z9=Q("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=s9(t)),pt.init(e,t)}),B9=Q("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=XL),pt.init(e,t)}),I9=Q("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=e9),pt.init(e,t),e._zod.bag.format="ipv4"}),H9=Q("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=t9),pt.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),F9=Q("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=n9),pt.init(e,t)}),q9=Q("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=r9),pt.init(e,t),e._zod.check=n=>{const i=n.value.split("/");try{if(i.length!==2)throw new Error;const[o,u]=i;if(!u)throw new Error;const l=Number(u);if(`${l}`!==u)throw new Error;if(l<0||l>128)throw new Error;new URL(`http://[${o}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function U_(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const G9=Q("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=i9),pt.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{U_(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function Y9(e){if(!N_.test(e))return!1;const t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return U_(n)}const X9=Q("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=N_),pt.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{Y9(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),K9=Q("$ZodE164",(e,t)=>{t.pattern??(t.pattern=a9),pt.init(e,t)});function J9(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[i]=n;if(!i)return!1;const o=JSON.parse(atob(i));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}const Q9=Q("$ZodJWT",(e,t)=>{pt.init(e,t),e._zod.check=n=>{J9(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),V_=Q("$ZodNumber",(e,t)=>{xt.init(e,t),e._zod.pattern=e._zod.bag.pattern??M_,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const o=n.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return n;const u=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...u?{received:u}:{}}),n}}),W9=Q("$ZodNumberFormat",(e,t)=>{p9.init(e,t),V_.init(e,t)}),eU=Q("$ZodBoolean",(e,t)=>{xt.init(e,t),e._zod.pattern=f9,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=!!n.value}catch{}const o=n.value;return typeof o=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),n}}),tU=Q("$ZodUnknown",(e,t)=>{xt.init(e,t),e._zod.parse=n=>n}),nU=Q("$ZodNever",(e,t)=>{xt.init(e,t),e._zod.parse=(n,i)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function zS(e,t,n){e.issues.length&&t.issues.push(...vo(n,e.issues)),t.value[n]=e.value}const rU=Q("$ZodArray",(e,t)=>{xt.init(e,t),e._zod.parse=(n,i)=>{const o=n.value;if(!Array.isArray(o))return n.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),n;n.value=Array(o.length);const u=[];for(let l=0;l<o.length;l++){const f=o[l],d=t.element._zod.run({value:f,issues:[]},i);d instanceof Promise?u.push(d.then(h=>zS(h,n,l))):zS(d,n,l)}return u.length?Promise.all(u).then(()=>n):n}});function Nc(e,t,n,i,o){if(e.issues.length){if(o&&!(n in i))return;t.issues.push(...vo(n,e.issues))}e.value===void 0?n in i&&(t.value[n]=void 0):t.value[n]=e.value}function P_(e){const t=Object.keys(e.shape);for(const i of t)if(!e.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);const n=wL(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Z_(e,t,n,i,o,u){const l=[],f=o.keySet,d=o.catchall._zod,h=d.def.type,p=d.optout==="optional";for(const y in t){if(f.has(y))continue;if(h==="never"){l.push(y);continue}const x=d.run({value:t[y],issues:[]},i);x instanceof Promise?e.push(x.then(b=>Nc(b,n,y,t,p))):Nc(x,n,y,t,p)}return l.length&&n.issues.push({code:"unrecognized_keys",keys:l,input:t,inst:u}),e.length?Promise.all(e).then(()=>n):n}const iU=Q("$ZodObject",(e,t)=>{if(xt.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const f=t.shape;Object.defineProperty(t,"shape",{get:()=>{const d={...f};return Object.defineProperty(t,"shape",{value:d}),d}})}const i=Wc(()=>P_(t));qe(e._zod,"propValues",()=>{const f=t.shape,d={};for(const h in f){const p=f[h]._zod;if(p.values){d[h]??(d[h]=new Set);for(const y of p.values)d[h].add(y)}}return d});const o=pl,u=t.catchall;let l;e._zod.parse=(f,d)=>{l??(l=i.value);const h=f.value;if(!o(h))return f.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),f;f.value={};const p=[],y=l.shape;for(const x of l.keys){const b=y[x],_=b._zod.optout==="optional",z=b._zod.run({value:h[x],issues:[]},d);z instanceof Promise?p.push(z.then(A=>Nc(A,f,x,h,_))):Nc(z,f,x,h,_)}return u?Z_(p,h,f,d,i.value,e):p.length?Promise.all(p).then(()=>f):f}}),aU=Q("$ZodObjectJIT",(e,t)=>{iU.init(e,t);const n=e._zod.parse,i=Wc(()=>P_(t)),o=x=>{const b=new E9(["shape","payload","ctx"]),_=i.value,z=T=>{const R=wS(T);return`shape[${R}]._zod.run({ value: input[${R}], issues: [] }, ctx)`};b.write("const input = payload.value;");const A=Object.create(null);let j=0;for(const T of _.keys)A[T]=`key_${j++}`;b.write("const newResult = {};");for(const T of _.keys){const R=A[T],L=wS(T),q=x[T]?._zod?.optout==="optional";b.write(`const ${R} = ${z(T)};`),q?b.write(`
35
+ if (${R}.issues.length) {
36
+ if (${L} in input) {
37
+ payload.issues = payload.issues.concat(${R}.issues.map(iss => ({
38
+ ...iss,
39
+ path: iss.path ? [${L}, ...iss.path] : [${L}]
40
+ })));
41
+ }
42
+ }
43
+
44
+ if (${R}.value === undefined) {
45
+ if (${L} in input) {
46
+ newResult[${L}] = undefined;
47
+ }
48
+ } else {
49
+ newResult[${L}] = ${R}.value;
50
+ }
51
+
52
+ `):b.write(`
53
+ if (${R}.issues.length) {
54
+ payload.issues = payload.issues.concat(${R}.issues.map(iss => ({
55
+ ...iss,
56
+ path: iss.path ? [${L}, ...iss.path] : [${L}]
57
+ })));
58
+ }
59
+
60
+ if (${R}.value === undefined) {
61
+ if (${L} in input) {
62
+ newResult[${L}] = undefined;
63
+ }
64
+ } else {
65
+ newResult[${L}] = ${R}.value;
66
+ }
67
+
68
+ `)}b.write("payload.value = newResult;"),b.write("return payload;");const N=b.compile();return(T,R)=>N(x,T,R)};let u;const l=pl,f=!z_.jitless,h=f&&bL.value,p=t.catchall;let y;e._zod.parse=(x,b)=>{y??(y=i.value);const _=x.value;return l(_)?f&&h&&b?.async===!1&&b.jitless!==!0?(u||(u=o(t.shape)),x=u(x,b),p?Z_([],_,x,b,y,e):x):n(x,b):(x.issues.push({expected:"object",code:"invalid_type",input:_,inst:e}),x)}});function _S(e,t,n,i){for(const u of e)if(u.issues.length===0)return t.value=u.value,t;const o=e.filter(u=>!xo(u));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(u=>u.issues.map(l=>Ni(l,i,ji())))}),t)}const B_=Q("$ZodUnion",(e,t)=>{xt.init(e,t),qe(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),qe(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),qe(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),qe(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(u=>u._zod.pattern);return new RegExp(`^(${o.map(u=>Cg(u.source)).join("|")})$`)}});const n=t.options.length===1,i=t.options[0]._zod.run;e._zod.parse=(o,u)=>{if(n)return i(o,u);let l=!1;const f=[];for(const d of t.options){const h=d._zod.run({value:o.value,issues:[]},u);if(h instanceof Promise)f.push(h),l=!0;else{if(h.issues.length===0)return h;f.push(h)}}return l?Promise.all(f).then(d=>_S(d,o,e,u)):_S(f,o,e,u)}}),oU=Q("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,B_.init(e,t);const n=e._zod.parse;qe(e._zod,"propValues",()=>{const o={};for(const u of t.options){const l=u._zod.propValues;if(!l||Object.keys(l).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(u)}"`);for(const[f,d]of Object.entries(l)){o[f]||(o[f]=new Set);for(const h of d)o[f].add(h)}}return o});const i=Wc(()=>{const o=t.options,u=new Map;for(const l of o){const f=l._zod.propValues?.[t.discriminator];if(!f||f.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(l)}"`);for(const d of f){if(u.has(d))throw new Error(`Duplicate discriminator value "${String(d)}"`);u.set(d,l)}}return u});e._zod.parse=(o,u)=>{const l=o.value;if(!pl(l))return o.issues.push({code:"invalid_type",expected:"object",input:l,inst:e}),o;const f=i.value.get(l?.[t.discriminator]);return f?f._zod.run(o,u):t.unionFallback?n(o,u):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:l,path:[t.discriminator],inst:e}),o)}}),sU=Q("$ZodIntersection",(e,t)=>{xt.init(e,t),e._zod.parse=(n,i)=>{const o=n.value,u=t.left._zod.run({value:o,issues:[]},i),l=t.right._zod.run({value:o,issues:[]},i);return u instanceof Promise||l instanceof Promise?Promise.all([u,l]).then(([d,h])=>ES(n,d,h)):ES(n,u,l)}});function gp(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(jo(e)&&jo(t)){const n=Object.keys(t),i=Object.keys(e).filter(u=>n.indexOf(u)!==-1),o={...e,...t};for(const u of i){const l=gp(e[u],t[u]);if(!l.valid)return{valid:!1,mergeErrorPath:[u,...l.mergeErrorPath]};o[u]=l.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let i=0;i<e.length;i++){const o=e[i],u=t[i],l=gp(o,u);if(!l.valid)return{valid:!1,mergeErrorPath:[i,...l.mergeErrorPath]};n.push(l.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function ES(e,t,n){const i=new Map;let o;for(const f of t.issues)if(f.code==="unrecognized_keys"){o??(o=f);for(const d of f.keys)i.has(d)||i.set(d,{}),i.get(d).l=!0}else e.issues.push(f);for(const f of n.issues)if(f.code==="unrecognized_keys")for(const d of f.keys)i.has(d)||i.set(d,{}),i.get(d).r=!0;else e.issues.push(f);const u=[...i].filter(([,f])=>f.l&&f.r).map(([f])=>f);if(u.length&&o&&e.issues.push({...o,keys:u}),xo(e))return e;const l=gp(t.value,n.value);if(!l.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(l.mergeErrorPath)}`);return e.value=l.data,e}const lU=Q("$ZodRecord",(e,t)=>{xt.init(e,t),e._zod.parse=(n,i)=>{const o=n.value;if(!jo(o))return n.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),n;const u=[],l=t.keyType._zod.values;if(l){n.value={};const f=new Set;for(const h of l)if(typeof h=="string"||typeof h=="number"||typeof h=="symbol"){f.add(typeof h=="number"?h.toString():h);const p=t.valueType._zod.run({value:o[h],issues:[]},i);p instanceof Promise?u.push(p.then(y=>{y.issues.length&&n.issues.push(...vo(h,y.issues)),n.value[h]=y.value})):(p.issues.length&&n.issues.push(...vo(h,p.issues)),n.value[h]=p.value)}let d;for(const h in o)f.has(h)||(d=d??[],d.push(h));d&&d.length>0&&n.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:d})}else{n.value={};for(const f of Reflect.ownKeys(o)){if(f==="__proto__")continue;let d=t.keyType._zod.run({value:f,issues:[]},i);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof f=="string"&&M_.test(f)&&d.issues.length){const y=t.keyType._zod.run({value:Number(f),issues:[]},i);if(y instanceof Promise)throw new Error("Async schemas not supported in object keys currently");y.issues.length===0&&(d=y)}if(d.issues.length){t.mode==="loose"?n.value[f]=o[f]:n.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(y=>Ni(y,i,ji())),input:f,path:[f],inst:e});continue}const p=t.valueType._zod.run({value:o[f],issues:[]},i);p instanceof Promise?u.push(p.then(y=>{y.issues.length&&n.issues.push(...vo(f,y.issues)),n.value[d.value]=y.value})):(p.issues.length&&n.issues.push(...vo(f,p.issues)),n.value[d.value]=p.value)}}return u.length?Promise.all(u).then(()=>n):n}}),uU=Q("$ZodEnum",(e,t)=>{xt.init(e,t);const n=__(t.entries),i=new Set(n);e._zod.values=i,e._zod.pattern=new RegExp(`^(${n.filter(o=>SL.has(typeof o)).map(o=>typeof o=="string"?No(o):o.toString()).join("|")})$`),e._zod.parse=(o,u)=>{const l=o.value;return i.has(l)||o.issues.push({code:"invalid_value",values:n,input:l,inst:e}),o}}),cU=Q("$ZodLiteral",(e,t)=>{if(xt.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(i=>typeof i=="string"?No(i):i?No(i.toString()):String(i)).join("|")})$`),e._zod.parse=(i,o)=>{const u=i.value;return n.has(u)||i.issues.push({code:"invalid_value",values:t.values,input:u,inst:e}),i}}),fU=Q("$ZodTransform",(e,t)=>{xt.init(e,t),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new k_(e.constructor.name);const o=t.transform(n.value,n);if(i.async)return(o instanceof Promise?o:Promise.resolve(o)).then(l=>(n.value=l,n));if(o instanceof Promise)throw new To;return n.value=o,n}});function TS(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const I_=Q("$ZodOptional",(e,t)=>{xt.init(e,t),e._zod.optin="optional",e._zod.optout="optional",qe(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),qe(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Cg(n.source)})?$`):void 0}),e._zod.parse=(n,i)=>{if(t.innerType._zod.optin==="optional"){const o=t.innerType._zod.run(n,i);return o instanceof Promise?o.then(u=>TS(u,n.value)):TS(o,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,i)}}),dU=Q("$ZodExactOptional",(e,t)=>{I_.init(e,t),qe(e._zod,"values",()=>t.innerType._zod.values),qe(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,i)=>t.innerType._zod.run(n,i)}),hU=Q("$ZodNullable",(e,t)=>{xt.init(e,t),qe(e._zod,"optin",()=>t.innerType._zod.optin),qe(e._zod,"optout",()=>t.innerType._zod.optout),qe(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Cg(n.source)}|null)$`):void 0}),qe(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,i)=>n.value===null?n:t.innerType._zod.run(n,i)}),mU=Q("$ZodDefault",(e,t)=>{xt.init(e,t),e._zod.optin="optional",qe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);if(n.value===void 0)return n.value=t.defaultValue,n;const o=t.innerType._zod.run(n,i);return o instanceof Promise?o.then(u=>CS(u,t)):CS(o,t)}});function CS(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const pU=Q("$ZodPrefault",(e,t)=>{xt.init(e,t),e._zod.optin="optional",qe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>(i.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,i))}),gU=Q("$ZodNonOptional",(e,t)=>{xt.init(e,t),qe(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(i=>i!==void 0)):void 0}),e._zod.parse=(n,i)=>{const o=t.innerType._zod.run(n,i);return o instanceof Promise?o.then(u=>AS(u,e)):AS(o,e)}});function AS(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const yU=Q("$ZodCatch",(e,t)=>{xt.init(e,t),qe(e._zod,"optin",()=>t.innerType._zod.optin),qe(e._zod,"optout",()=>t.innerType._zod.optout),qe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);const o=t.innerType._zod.run(n,i);return o instanceof Promise?o.then(u=>(n.value=u.value,u.issues.length&&(n.value=t.catchValue({...n,error:{issues:u.issues.map(l=>Ni(l,i,ji()))},input:n.value}),n.issues=[]),n)):(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(u=>Ni(u,i,ji()))},input:n.value}),n.issues=[]),n)}}),xU=Q("$ZodPipe",(e,t)=>{xt.init(e,t),qe(e._zod,"values",()=>t.in._zod.values),qe(e._zod,"optin",()=>t.in._zod.optin),qe(e._zod,"optout",()=>t.out._zod.optout),qe(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,i)=>{if(i.direction==="backward"){const u=t.out._zod.run(n,i);return u instanceof Promise?u.then(l=>oc(l,t.in,i)):oc(u,t.in,i)}const o=t.in._zod.run(n,i);return o instanceof Promise?o.then(u=>oc(u,t.out,i)):oc(o,t.out,i)}});function oc(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const vU=Q("$ZodReadonly",(e,t)=>{xt.init(e,t),qe(e._zod,"propValues",()=>t.innerType._zod.propValues),qe(e._zod,"values",()=>t.innerType._zod.values),qe(e._zod,"optin",()=>t.innerType?._zod?.optin),qe(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);const o=t.innerType._zod.run(n,i);return o instanceof Promise?o.then(jS):jS(o)}});function jS(e){return e.value=Object.freeze(e.value),e}const bU=Q("$ZodCustom",(e,t)=>{zn.init(e,t),xt.init(e,t),e._zod.parse=(n,i)=>n,e._zod.check=n=>{const i=n.value,o=t.fn(i);if(o instanceof Promise)return o.then(u=>NS(u,n,i,e));NS(o,n,i,e)}});function NS(e,t,n,i){if(!e){const o={code:"custom",input:n,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(o.params=i._zod.def.params),t.issues.push(gl(o))}}var OS;let SU=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const i=n[0];return this._map.set(t,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const i={...this.get(n)??{}};delete i.id;const o={...i,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function wU(){return new SU}(OS=globalThis).__zod_globalRegistry??(OS.__zod_globalRegistry=wU());const Js=globalThis.__zod_globalRegistry;function kU(e,t){return new e({type:"string",...be(t)})}function zU(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...be(t)})}function RS(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...be(t)})}function _U(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...be(t)})}function EU(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...be(t)})}function TU(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...be(t)})}function CU(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...be(t)})}function AU(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...be(t)})}function jU(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...be(t)})}function NU(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...be(t)})}function OU(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...be(t)})}function RU(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...be(t)})}function MU(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...be(t)})}function DU(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...be(t)})}function $U(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...be(t)})}function LU(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...be(t)})}function UU(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...be(t)})}function VU(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...be(t)})}function PU(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...be(t)})}function ZU(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...be(t)})}function BU(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...be(t)})}function IU(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...be(t)})}function HU(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...be(t)})}function FU(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...be(t)})}function qU(e,t){return new e({type:"string",format:"date",check:"string_format",...be(t)})}function GU(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...be(t)})}function YU(e,t){return new e({type:"string",format:"duration",check:"string_format",...be(t)})}function XU(e,t){return new e({type:"number",checks:[],...be(t)})}function KU(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...be(t)})}function JU(e,t){return new e({type:"boolean",...be(t)})}function QU(e){return new e({type:"unknown"})}function WU(e,t){return new e({type:"never",...be(t)})}function MS(e,t){return new $_({check:"less_than",...be(t),value:e,inclusive:!1})}function mm(e,t){return new $_({check:"less_than",...be(t),value:e,inclusive:!0})}function DS(e,t){return new L_({check:"greater_than",...be(t),value:e,inclusive:!1})}function pm(e,t){return new L_({check:"greater_than",...be(t),value:e,inclusive:!0})}function $S(e,t){return new m9({check:"multiple_of",...be(t),value:e})}function H_(e,t){return new g9({check:"max_length",...be(t),maximum:e})}function Oc(e,t){return new y9({check:"min_length",...be(t),minimum:e})}function F_(e,t){return new x9({check:"length_equals",...be(t),length:e})}function eV(e,t){return new v9({check:"string_format",format:"regex",...be(t),pattern:e})}function tV(e){return new b9({check:"string_format",format:"lowercase",...be(e)})}function nV(e){return new S9({check:"string_format",format:"uppercase",...be(e)})}function rV(e,t){return new w9({check:"string_format",format:"includes",...be(t),includes:e})}function iV(e,t){return new k9({check:"string_format",format:"starts_with",...be(t),prefix:e})}function aV(e,t){return new z9({check:"string_format",format:"ends_with",...be(t),suffix:e})}function Io(e){return new _9({check:"overwrite",tx:e})}function oV(e){return Io(t=>t.normalize(e))}function sV(){return Io(e=>e.trim())}function lV(){return Io(e=>e.toLowerCase())}function uV(){return Io(e=>e.toUpperCase())}function cV(){return Io(e=>vL(e))}function fV(e,t,n){return new e({type:"array",element:t,...be(n)})}function dV(e,t,n){return new e({type:"custom",check:"custom",fn:t,...be(n)})}function hV(e){const t=mV(n=>(n.addIssue=i=>{if(typeof i=="string")n.issues.push(gl(i,n.value,t._zod.def));else{const o=i;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),n.issues.push(gl(o))}},e(n.value,n)));return t}function mV(e,t){const n=new zn({check:"custom",...be(t)});return n._zod.check=e,n}function q_(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Js,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function $t(e,t,n={path:[],schemaPath:[]}){var i;const o=e._zod.def,u=t.seen.get(e);if(u)return u.count++,n.schemaPath.includes(e)&&(u.cycle=n.path),u.schema;const l={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,l);const f=e._zod.toJSONSchema?.();if(f)l.schema=f;else{const p={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,l.schema,p);else{const x=l.schema,b=t.processors[o.type];if(!b)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);b(e,t,x,p)}const y=e._zod.parent;y&&(l.ref||(l.ref=y),$t(y,t,p),t.seen.get(y).isParent=!0)}const d=t.metadataRegistry.get(e);return d&&Object.assign(l.schema,d),t.io==="input"&&un(e)&&(delete l.schema.examples,delete l.schema.default),t.io==="input"&&l.schema._prefault&&((i=l.schema).default??(i.default=l.schema._prefault)),delete l.schema._prefault,t.seen.get(e).schema}function G_(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=new Map;for(const l of e.seen.entries()){const f=e.metadataRegistry.get(l[0])?.id;if(f){const d=i.get(f);if(d&&d!==l[0])throw new Error(`Duplicate schema id "${f}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(f,l[0])}}const o=l=>{const f=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const y=e.external.registry.get(l[0])?.id,x=e.external.uri??(_=>_);if(y)return{ref:x(y)};const b=l[1].defId??l[1].schema.id??`schema${e.counter++}`;return l[1].defId=b,{defId:b,ref:`${x("__shared")}#/${f}/${b}`}}if(l[1]===n)return{ref:"#"};const h=`#/${f}/`,p=l[1].schema.id??`__schema${e.counter++}`;return{defId:p,ref:h+p}},u=l=>{if(l[1].schema.$ref)return;const f=l[1],{ref:d,defId:h}=o(l);f.def={...f.schema},h&&(f.defId=h);const p=f.schema;for(const y in p)delete p[y];p.$ref=d};if(e.cycles==="throw")for(const l of e.seen.entries()){const f=l[1];if(f.cycle)throw new Error(`Cycle detected: #/${f.cycle?.join("/")}/<root>
69
+
70
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const l of e.seen.entries()){const f=l[1];if(t===l[0]){u(l);continue}if(e.external){const h=e.external.registry.get(l[0])?.id;if(t!==l[0]&&h){u(l);continue}}if(e.metadataRegistry.get(l[0])?.id){u(l);continue}if(f.cycle){u(l);continue}if(f.count>1&&e.reused==="ref"){u(l);continue}}}function Y_(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=l=>{const f=e.seen.get(l);if(f.ref===null)return;const d=f.def??f.schema,h={...d},p=f.ref;if(f.ref=null,p){i(p);const x=e.seen.get(p),b=x.schema;if(b.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(d.allOf=d.allOf??[],d.allOf.push(b)):Object.assign(d,b),Object.assign(d,h),l._zod.parent===p)for(const z in d)z==="$ref"||z==="allOf"||z in h||delete d[z];if(b.$ref&&x.def)for(const z in d)z==="$ref"||z==="allOf"||z in x.def&&JSON.stringify(d[z])===JSON.stringify(x.def[z])&&delete d[z]}const y=l._zod.parent;if(y&&y!==p){i(y);const x=e.seen.get(y);if(x?.schema.$ref&&(d.$ref=x.schema.$ref,x.def))for(const b in d)b==="$ref"||b==="allOf"||b in x.def&&JSON.stringify(d[b])===JSON.stringify(x.def[b])&&delete d[b]}e.override({zodSchema:l,jsonSchema:d,path:f.path??[]})};for(const l of[...e.seen.entries()].reverse())i(l[0]);const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const l=e.external.registry.get(t)?.id;if(!l)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(l)}Object.assign(o,n.def??n.schema);const u=e.external?.defs??{};for(const l of e.seen.entries()){const f=l[1];f.def&&f.defId&&(u[f.defId]=f.def)}e.external||Object.keys(u).length>0&&(e.target==="draft-2020-12"?o.$defs=u:o.definitions=u);try{const l=JSON.parse(JSON.stringify(o));return Object.defineProperty(l,"~standard",{value:{...t["~standard"],jsonSchema:{input:Rc(t,"input",e.processors),output:Rc(t,"output",e.processors)}},enumerable:!1,writable:!1}),l}catch{throw new Error("Error converting schema to JSON.")}}function un(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return un(i.element,n);if(i.type==="set")return un(i.valueType,n);if(i.type==="lazy")return un(i.getter(),n);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return un(i.innerType,n);if(i.type==="intersection")return un(i.left,n)||un(i.right,n);if(i.type==="record"||i.type==="map")return un(i.keyType,n)||un(i.valueType,n);if(i.type==="pipe")return un(i.in,n)||un(i.out,n);if(i.type==="object"){for(const o in i.shape)if(un(i.shape[o],n))return!0;return!1}if(i.type==="union"){for(const o of i.options)if(un(o,n))return!0;return!1}if(i.type==="tuple"){for(const o of i.items)if(un(o,n))return!0;return!!(i.rest&&un(i.rest,n))}return!1}const pV=(e,t={})=>n=>{const i=q_({...n,processors:t});return $t(e,i),G_(i,e),Y_(i,e)},Rc=(e,t,n={})=>i=>{const{libraryOptions:o,target:u}=i??{},l=q_({...o??{},target:u,io:t,processors:n});return $t(e,l),G_(l,e),Y_(l,e)},gV={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},yV=(e,t,n,i)=>{const o=n;o.type="string";const{minimum:u,maximum:l,format:f,patterns:d,contentEncoding:h}=e._zod.bag;if(typeof u=="number"&&(o.minLength=u),typeof l=="number"&&(o.maxLength=l),f&&(o.format=gV[f]??f,o.format===""&&delete o.format,f==="time"&&delete o.format),h&&(o.contentEncoding=h),d&&d.size>0){const p=[...d];p.length===1?o.pattern=p[0].source:p.length>1&&(o.allOf=[...p.map(y=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:y.source}))])}},xV=(e,t,n,i)=>{const o=n,{minimum:u,maximum:l,format:f,multipleOf:d,exclusiveMaximum:h,exclusiveMinimum:p}=e._zod.bag;typeof f=="string"&&f.includes("int")?o.type="integer":o.type="number",typeof p=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(o.minimum=p,o.exclusiveMinimum=!0):o.exclusiveMinimum=p),typeof u=="number"&&(o.minimum=u,typeof p=="number"&&t.target!=="draft-04"&&(p>=u?delete o.minimum:delete o.exclusiveMinimum)),typeof h=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(o.maximum=h,o.exclusiveMaximum=!0):o.exclusiveMaximum=h),typeof l=="number"&&(o.maximum=l,typeof h=="number"&&t.target!=="draft-04"&&(h<=l?delete o.maximum:delete o.exclusiveMaximum)),typeof d=="number"&&(o.multipleOf=d)},vV=(e,t,n,i)=>{n.type="boolean"},bV=(e,t,n,i)=>{n.not={}},SV=(e,t,n,i)=>{},wV=(e,t,n,i)=>{const o=e._zod.def,u=__(o.entries);u.every(l=>typeof l=="number")&&(n.type="number"),u.every(l=>typeof l=="string")&&(n.type="string"),n.enum=u},kV=(e,t,n,i)=>{const o=e._zod.def,u=[];for(const l of o.values)if(l===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof l=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");u.push(Number(l))}else u.push(l);if(u.length!==0)if(u.length===1){const l=u[0];n.type=l===null?"null":typeof l,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[l]:n.const=l}else u.every(l=>typeof l=="number")&&(n.type="number"),u.every(l=>typeof l=="string")&&(n.type="string"),u.every(l=>typeof l=="boolean")&&(n.type="boolean"),u.every(l=>l===null)&&(n.type="null"),n.enum=u},zV=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},_V=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},EV=(e,t,n,i)=>{const o=n,u=e._zod.def,{minimum:l,maximum:f}=e._zod.bag;typeof l=="number"&&(o.minItems=l),typeof f=="number"&&(o.maxItems=f),o.type="array",o.items=$t(u.element,t,{...i,path:[...i.path,"items"]})},TV=(e,t,n,i)=>{const o=n,u=e._zod.def;o.type="object",o.properties={};const l=u.shape;for(const h in l)o.properties[h]=$t(l[h],t,{...i,path:[...i.path,"properties",h]});const f=new Set(Object.keys(l)),d=new Set([...f].filter(h=>{const p=u.shape[h]._zod;return t.io==="input"?p.optin===void 0:p.optout===void 0}));d.size>0&&(o.required=Array.from(d)),u.catchall?._zod.def.type==="never"?o.additionalProperties=!1:u.catchall?u.catchall&&(o.additionalProperties=$t(u.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},CV=(e,t,n,i)=>{const o=e._zod.def,u=o.inclusive===!1,l=o.options.map((f,d)=>$t(f,t,{...i,path:[...i.path,u?"oneOf":"anyOf",d]}));u?n.oneOf=l:n.anyOf=l},AV=(e,t,n,i)=>{const o=e._zod.def,u=$t(o.left,t,{...i,path:[...i.path,"allOf",0]}),l=$t(o.right,t,{...i,path:[...i.path,"allOf",1]}),f=h=>"allOf"in h&&Object.keys(h).length===1,d=[...f(u)?u.allOf:[u],...f(l)?l.allOf:[l]];n.allOf=d},jV=(e,t,n,i)=>{const o=n,u=e._zod.def;o.type="object";const l=u.keyType,d=l._zod.bag?.patterns;if(u.mode==="loose"&&d&&d.size>0){const p=$t(u.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});o.patternProperties={};for(const y of d)o.patternProperties[y.source]=p}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(o.propertyNames=$t(u.keyType,t,{...i,path:[...i.path,"propertyNames"]})),o.additionalProperties=$t(u.valueType,t,{...i,path:[...i.path,"additionalProperties"]});const h=l._zod.values;if(h){const p=[...h].filter(y=>typeof y=="string"||typeof y=="number");p.length>0&&(o.required=p)}},NV=(e,t,n,i)=>{const o=e._zod.def,u=$t(o.innerType,t,i),l=t.seen.get(e);t.target==="openapi-3.0"?(l.ref=o.innerType,n.nullable=!0):n.anyOf=[u,{type:"null"}]},OV=(e,t,n,i)=>{const o=e._zod.def;$t(o.innerType,t,i);const u=t.seen.get(e);u.ref=o.innerType},RV=(e,t,n,i)=>{const o=e._zod.def;$t(o.innerType,t,i);const u=t.seen.get(e);u.ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))},MV=(e,t,n,i)=>{const o=e._zod.def;$t(o.innerType,t,i);const u=t.seen.get(e);u.ref=o.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},DV=(e,t,n,i)=>{const o=e._zod.def;$t(o.innerType,t,i);const u=t.seen.get(e);u.ref=o.innerType;let l;try{l=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=l},$V=(e,t,n,i)=>{const o=e._zod.def,u=t.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;$t(u,t,i);const l=t.seen.get(e);l.ref=u},LV=(e,t,n,i)=>{const o=e._zod.def;$t(o.innerType,t,i);const u=t.seen.get(e);u.ref=o.innerType,n.readOnly=!0},X_=(e,t,n,i)=>{const o=e._zod.def;$t(o.innerType,t,i);const u=t.seen.get(e);u.ref=o.innerType},UV=Q("ZodISODateTime",(e,t)=>{V9.init(e,t),bt.init(e,t)});function VV(e){return FU(UV,e)}const PV=Q("ZodISODate",(e,t)=>{P9.init(e,t),bt.init(e,t)});function ZV(e){return qU(PV,e)}const BV=Q("ZodISOTime",(e,t)=>{Z9.init(e,t),bt.init(e,t)});function IV(e){return GU(BV,e)}const HV=Q("ZodISODuration",(e,t)=>{B9.init(e,t),bt.init(e,t)});function FV(e){return YU(HV,e)}const qV=(e,t)=>{A_.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>OL(e,n)},flatten:{value:n=>NL(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,pp,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,pp,2)}},isEmpty:{get(){return e.issues.length===0}}})},nr=Q("ZodError",qV,{Parent:Error}),GV=jg(nr),YV=Ng(nr),XV=ef(nr),KV=tf(nr),JV=DL(nr),QV=$L(nr),WV=LL(nr),eP=UL(nr),tP=VL(nr),nP=PL(nr),rP=ZL(nr),iP=BL(nr),vt=Q("ZodType",(e,t)=>(xt.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Rc(e,"input"),output:Rc(e,"output")}}),e.toJSONSchema=pV(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(Mi(t,{checks:[...t.checks??[],...n.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0}),e.with=e.check,e.clone=(n,i)=>Di(e,n,i),e.brand=()=>e,e.register=((n,i)=>(n.add(e,i),e)),e.parse=(n,i)=>GV(e,n,i,{callee:e.parse}),e.safeParse=(n,i)=>XV(e,n,i),e.parseAsync=async(n,i)=>YV(e,n,i,{callee:e.parseAsync}),e.safeParseAsync=async(n,i)=>KV(e,n,i),e.spa=e.safeParseAsync,e.encode=(n,i)=>JV(e,n,i),e.decode=(n,i)=>QV(e,n,i),e.encodeAsync=async(n,i)=>WV(e,n,i),e.decodeAsync=async(n,i)=>eP(e,n,i),e.safeEncode=(n,i)=>tP(e,n,i),e.safeDecode=(n,i)=>nP(e,n,i),e.safeEncodeAsync=async(n,i)=>rP(e,n,i),e.safeDecodeAsync=async(n,i)=>iP(e,n,i),e.refine=(n,i)=>e.check(QP(n,i)),e.superRefine=n=>e.check(WP(n)),e.overwrite=n=>e.check(Io(n)),e.optional=()=>ZS(e),e.exactOptional=()=>VP(e),e.nullable=()=>BS(e),e.nullish=()=>ZS(BS(e)),e.nonoptional=n=>FP(e,n),e.array=()=>yl(e),e.or=n=>W_([e,n]),e.and=n=>RP(e,n),e.transform=n=>IS(e,LP(n)),e.default=n=>BP(e,n),e.prefault=n=>HP(e,n),e.catch=n=>GP(e,n),e.pipe=n=>IS(e,n),e.readonly=()=>KP(e),e.describe=n=>{const i=e.clone();return Js.add(i,{description:n}),i},Object.defineProperty(e,"description",{get(){return Js.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return Js.get(e);const i=e.clone();return Js.add(i,n[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),K_=Q("_ZodString",(e,t)=>{Og.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(i,o,u)=>yV(e,i,o);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...i)=>e.check(eV(...i)),e.includes=(...i)=>e.check(rV(...i)),e.startsWith=(...i)=>e.check(iV(...i)),e.endsWith=(...i)=>e.check(aV(...i)),e.min=(...i)=>e.check(Oc(...i)),e.max=(...i)=>e.check(H_(...i)),e.length=(...i)=>e.check(F_(...i)),e.nonempty=(...i)=>e.check(Oc(1,...i)),e.lowercase=i=>e.check(tV(i)),e.uppercase=i=>e.check(nV(i)),e.trim=()=>e.check(sV()),e.normalize=(...i)=>e.check(oV(...i)),e.toLowerCase=()=>e.check(lV()),e.toUpperCase=()=>e.check(uV()),e.slugify=()=>e.check(cV())}),aP=Q("ZodString",(e,t)=>{Og.init(e,t),K_.init(e,t),e.email=n=>e.check(zU(oP,n)),e.url=n=>e.check(AU(sP,n)),e.jwt=n=>e.check(HU(wP,n)),e.emoji=n=>e.check(jU(lP,n)),e.guid=n=>e.check(RS(LS,n)),e.uuid=n=>e.check(_U(sc,n)),e.uuidv4=n=>e.check(EU(sc,n)),e.uuidv6=n=>e.check(TU(sc,n)),e.uuidv7=n=>e.check(CU(sc,n)),e.nanoid=n=>e.check(NU(uP,n)),e.guid=n=>e.check(RS(LS,n)),e.cuid=n=>e.check(OU(cP,n)),e.cuid2=n=>e.check(RU(fP,n)),e.ulid=n=>e.check(MU(dP,n)),e.base64=n=>e.check(ZU(vP,n)),e.base64url=n=>e.check(BU(bP,n)),e.xid=n=>e.check(DU(hP,n)),e.ksuid=n=>e.check($U(mP,n)),e.ipv4=n=>e.check(LU(pP,n)),e.ipv6=n=>e.check(UU(gP,n)),e.cidrv4=n=>e.check(VU(yP,n)),e.cidrv6=n=>e.check(PU(xP,n)),e.e164=n=>e.check(IU(SP,n)),e.datetime=n=>e.check(VV(n)),e.date=n=>e.check(ZV(n)),e.time=n=>e.check(IV(n)),e.duration=n=>e.check(FV(n))});function at(e){return kU(aP,e)}const bt=Q("ZodStringFormat",(e,t)=>{pt.init(e,t),K_.init(e,t)}),oP=Q("ZodEmail",(e,t)=>{j9.init(e,t),bt.init(e,t)}),LS=Q("ZodGUID",(e,t)=>{C9.init(e,t),bt.init(e,t)}),sc=Q("ZodUUID",(e,t)=>{A9.init(e,t),bt.init(e,t)}),sP=Q("ZodURL",(e,t)=>{N9.init(e,t),bt.init(e,t)}),lP=Q("ZodEmoji",(e,t)=>{O9.init(e,t),bt.init(e,t)}),uP=Q("ZodNanoID",(e,t)=>{R9.init(e,t),bt.init(e,t)}),cP=Q("ZodCUID",(e,t)=>{M9.init(e,t),bt.init(e,t)}),fP=Q("ZodCUID2",(e,t)=>{D9.init(e,t),bt.init(e,t)}),dP=Q("ZodULID",(e,t)=>{$9.init(e,t),bt.init(e,t)}),hP=Q("ZodXID",(e,t)=>{L9.init(e,t),bt.init(e,t)}),mP=Q("ZodKSUID",(e,t)=>{U9.init(e,t),bt.init(e,t)}),pP=Q("ZodIPv4",(e,t)=>{I9.init(e,t),bt.init(e,t)}),gP=Q("ZodIPv6",(e,t)=>{H9.init(e,t),bt.init(e,t)}),yP=Q("ZodCIDRv4",(e,t)=>{F9.init(e,t),bt.init(e,t)}),xP=Q("ZodCIDRv6",(e,t)=>{q9.init(e,t),bt.init(e,t)}),vP=Q("ZodBase64",(e,t)=>{G9.init(e,t),bt.init(e,t)}),bP=Q("ZodBase64URL",(e,t)=>{X9.init(e,t),bt.init(e,t)}),SP=Q("ZodE164",(e,t)=>{K9.init(e,t),bt.init(e,t)}),wP=Q("ZodJWT",(e,t)=>{Q9.init(e,t),bt.init(e,t)}),J_=Q("ZodNumber",(e,t)=>{V_.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(i,o,u)=>xV(e,i,o),e.gt=(i,o)=>e.check(DS(i,o)),e.gte=(i,o)=>e.check(pm(i,o)),e.min=(i,o)=>e.check(pm(i,o)),e.lt=(i,o)=>e.check(MS(i,o)),e.lte=(i,o)=>e.check(mm(i,o)),e.max=(i,o)=>e.check(mm(i,o)),e.int=i=>e.check(US(i)),e.safe=i=>e.check(US(i)),e.positive=i=>e.check(DS(0,i)),e.nonnegative=i=>e.check(pm(0,i)),e.negative=i=>e.check(MS(0,i)),e.nonpositive=i=>e.check(mm(0,i)),e.multipleOf=(i,o)=>e.check($S(i,o)),e.step=(i,o)=>e.check($S(i,o)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function ma(e){return XU(J_,e)}const kP=Q("ZodNumberFormat",(e,t)=>{W9.init(e,t),J_.init(e,t)});function US(e){return KU(kP,e)}const zP=Q("ZodBoolean",(e,t)=>{eU.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>vV(e,n,i)});function bo(e){return JU(zP,e)}const _P=Q("ZodUnknown",(e,t)=>{tU.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>SV()});function VS(){return QU(_P)}const EP=Q("ZodNever",(e,t)=>{nU.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>bV(e,n,i)});function TP(e){return WU(EP,e)}const CP=Q("ZodArray",(e,t)=>{rU.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>EV(e,n,i,o),e.element=t.element,e.min=(n,i)=>e.check(Oc(n,i)),e.nonempty=n=>e.check(Oc(1,n)),e.max=(n,i)=>e.check(H_(n,i)),e.length=(n,i)=>e.check(F_(n,i)),e.unwrap=()=>e.element});function yl(e,t){return fV(CP,e,t)}const AP=Q("ZodObject",(e,t)=>{aU.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>TV(e,n,i,o),qe(e,"shape",()=>t.shape),e.keyof=()=>rf(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:VS()}),e.loose=()=>e.clone({...e._zod.def,catchall:VS()}),e.strict=()=>e.clone({...e._zod.def,catchall:TP()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>EL(e,n),e.safeExtend=n=>TL(e,n),e.merge=n=>CL(e,n),e.pick=n=>zL(e,n),e.omit=n=>_L(e,n),e.partial=(...n)=>AL(eE,e,n[0]),e.required=(...n)=>jL(tE,e,n[0])});function Jn(e,t){const n={type:"object",shape:e??{},...be(t)};return new AP(n)}const Q_=Q("ZodUnion",(e,t)=>{B_.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>CV(e,n,i,o),e.options=t.options});function W_(e,t){return new Q_({type:"union",options:e,...be(t)})}const jP=Q("ZodDiscriminatedUnion",(e,t)=>{Q_.init(e,t),oU.init(e,t)});function NP(e,t,n){return new jP({type:"union",options:t,discriminator:e,...be(n)})}const OP=Q("ZodIntersection",(e,t)=>{sU.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>AV(e,n,i,o)});function RP(e,t){return new OP({type:"intersection",left:e,right:t})}const MP=Q("ZodRecord",(e,t)=>{lU.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>jV(e,n,i,o),e.keyType=t.keyType,e.valueType=t.valueType});function vc(e,t,n){return new MP({type:"record",keyType:e,valueType:t,...be(n)})}const yp=Q("ZodEnum",(e,t)=>{uU.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(i,o,u)=>wV(e,i,o),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(i,o)=>{const u={};for(const l of i)if(n.has(l))u[l]=t.entries[l];else throw new Error(`Key ${l} not found in enum`);return new yp({...t,checks:[],...be(o),entries:u})},e.exclude=(i,o)=>{const u={...t.entries};for(const l of i)if(n.has(l))delete u[l];else throw new Error(`Key ${l} not found in enum`);return new yp({...t,checks:[],...be(o),entries:u})}});function rf(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new yp({type:"enum",entries:n,...be(t)})}const DP=Q("ZodLiteral",(e,t)=>{cU.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>kV(e,n,i),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function PS(e,t){return new DP({type:"literal",values:Array.isArray(e)?e:[e],...be(t)})}const $P=Q("ZodTransform",(e,t)=>{fU.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>_V(e,n),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new k_(e.constructor.name);n.addIssue=u=>{if(typeof u=="string")n.issues.push(gl(u,n.value,t));else{const l=u;l.fatal&&(l.continue=!1),l.code??(l.code="custom"),l.input??(l.input=n.value),l.inst??(l.inst=e),n.issues.push(gl(l))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(u=>(n.value=u,n)):(n.value=o,n)}});function LP(e){return new $P({type:"transform",transform:e})}const eE=Q("ZodOptional",(e,t)=>{I_.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>X_(e,n,i,o),e.unwrap=()=>e._zod.def.innerType});function ZS(e){return new eE({type:"optional",innerType:e})}const UP=Q("ZodExactOptional",(e,t)=>{dU.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>X_(e,n,i,o),e.unwrap=()=>e._zod.def.innerType});function VP(e){return new UP({type:"optional",innerType:e})}const PP=Q("ZodNullable",(e,t)=>{hU.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>NV(e,n,i,o),e.unwrap=()=>e._zod.def.innerType});function BS(e){return new PP({type:"nullable",innerType:e})}const ZP=Q("ZodDefault",(e,t)=>{mU.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>RV(e,n,i,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function BP(e,t){return new ZP({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():T_(t)}})}const IP=Q("ZodPrefault",(e,t)=>{pU.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>MV(e,n,i,o),e.unwrap=()=>e._zod.def.innerType});function HP(e,t){return new IP({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():T_(t)}})}const tE=Q("ZodNonOptional",(e,t)=>{gU.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>OV(e,n,i,o),e.unwrap=()=>e._zod.def.innerType});function FP(e,t){return new tE({type:"nonoptional",innerType:e,...be(t)})}const qP=Q("ZodCatch",(e,t)=>{yU.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>DV(e,n,i,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function GP(e,t){return new qP({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const YP=Q("ZodPipe",(e,t)=>{xU.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>$V(e,n,i,o),e.in=t.in,e.out=t.out});function IS(e,t){return new YP({type:"pipe",in:e,out:t})}const XP=Q("ZodReadonly",(e,t)=>{vU.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>LV(e,n,i,o),e.unwrap=()=>e._zod.def.innerType});function KP(e){return new XP({type:"readonly",innerType:e})}const JP=Q("ZodCustom",(e,t)=>{bU.init(e,t),vt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>zV(e,n)});function QP(e,t={}){return dV(JP,e,t)}function WP(e){return hV(e)}const ht={agent:{name:"morpheus",personality:"helpful_dev"},logging:{enabled:!0,level:"info",retention:"14d"},audio:{provider:"google",model:"gemini-2.5-flash-lite",enabled:!0,maxDurationSeconds:300,supportedMimeTypes:["audio/ogg","audio/mp3","audio/mpeg","audio/wav"]},memory:{limit:100},llm:{provider:"openai",model:"gpt-4",temperature:.7,context_window:100},channels:{telegram:{enabled:!1,allowedUsers:[]},discord:{enabled:!1}},ui:{enabled:!0,port:3333}},e8=Jn({provider:rf(["google"]).default(ht.audio.provider),model:at().min(1).default(ht.audio.model),enabled:bo().default(ht.audio.enabled),apiKey:at().optional(),maxDurationSeconds:ma().default(ht.audio.maxDurationSeconds),supportedMimeTypes:yl(at()).default(ht.audio.supportedMimeTypes)}),nE=Jn({provider:rf(["openai","anthropic","openrouter","ollama","gemini"]).default(ht.llm.provider),model:at().min(1).default(ht.llm.model),temperature:ma().min(0).max(1).default(ht.llm.temperature),max_tokens:ma().int().positive().optional(),api_key:at().optional(),base_url:at().optional(),context_window:ma().int().positive().optional()}),t8=nE.extend({memory_limit:ma().int().positive().optional(),enabled_archived_sessions:bo().default(!0)}),n8=Jn({agent:Jn({name:at().default(ht.agent.name),personality:at().default(ht.agent.personality)}).default(ht.agent),llm:nE.default(ht.llm),sati:t8.optional(),audio:e8.default(ht.audio),memory:Jn({limit:ma().int().positive().optional()}).default(ht.memory),channels:Jn({telegram:Jn({enabled:bo().default(!1),token:at().optional(),allowedUsers:yl(at()).default([])}).default(ht.channels.telegram),discord:Jn({enabled:bo().default(!1),token:at().optional()}).default(ht.channels.discord)}).default(ht.channels),ui:Jn({enabled:bo().default(ht.ui.enabled),port:ma().default(ht.ui.port)}).default(ht.ui),logging:Jn({enabled:bo().default(ht.logging.enabled),level:rf(["debug","info","warn","error"]).default(ht.logging.level),retention:at().default(ht.logging.retention)}).default(ht.logging)}),r8=NP("transport",[Jn({transport:PS("stdio"),command:at().min(1,"Command is required for stdio transport"),args:yl(at()).optional().default([]),env:vc(at(),at()).optional().default({}),_comment:at().optional()}),Jn({transport:PS("http"),url:at().url("Valid URL is required for http transport"),headers:vc(at(),at()).optional().default({}),args:yl(at()).optional().default([]),env:vc(at(),at()).optional().default({}),_comment:at().optional()})]);vc(at(),W_([r8,at()]));function te(e,t,n){function i(f,d){if(f._zod||Object.defineProperty(f,"_zod",{value:{def:d,constr:l,traits:new Set},enumerable:!1}),f._zod.traits.has(e))return;f._zod.traits.add(e),t(f,d);const h=l.prototype,p=Object.keys(h);for(let y=0;y<p.length;y++){const x=p[y];x in f||(f[x]=h[x].bind(f))}}const o=n?.Parent??Object;class u extends o{}Object.defineProperty(u,"name",{value:e});function l(f){var d;const h=n?.Parent?new u:this;i(h,f),(d=h._zod).deferred??(d.deferred=[]);for(const p of h._zod.deferred)p();return h}return Object.defineProperty(l,"init",{value:i}),Object.defineProperty(l,Symbol.hasInstance,{value:f=>n?.Parent&&f instanceof n.Parent?!0:f?._zod?.traits?.has(e)}),Object.defineProperty(l,"name",{value:e}),l}class Co extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class rE extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const iE={};function ga(e){return iE}function aE(e){const t=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,o])=>t.indexOf(+i)===-1).map(([i,o])=>o)}function xp(e,t){return typeof t=="bigint"?t.toString():t}function Rg(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Mg(e){return e==null}function Dg(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const HS=Symbol("evaluating");function Ke(e,t,n){let i;Object.defineProperty(e,t,{get(){if(i!==HS)return i===void 0&&(i=HS,i=n()),i},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function ba(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function $i(...e){const t={};for(const n of e){const i=Object.getOwnPropertyDescriptors(n);Object.assign(t,i)}return Object.defineProperties({},t)}function FS(e){return JSON.stringify(e)}function i8(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const oE="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Mc(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const a8=Rg(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function xl(e){if(Mc(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(Mc(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function sE(e){return xl(e)?{...e}:Array.isArray(e)?[...e]:e}const o8=new Set(["string","number","symbol"]);function Oo(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Li(e,t,n){const i=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(i._zod.parent=e),i}function Ee(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function s8(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function l8(e,t){const n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const u=$i(e._zod.def,{get shape(){const l={};for(const f in t){if(!(f in n.shape))throw new Error(`Unrecognized key: "${f}"`);t[f]&&(l[f]=n.shape[f])}return ba(this,"shape",l),l},checks:[]});return Li(e,u)}function u8(e,t){const n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const u=$i(e._zod.def,{get shape(){const l={...e._zod.def.shape};for(const f in t){if(!(f in n.shape))throw new Error(`Unrecognized key: "${f}"`);t[f]&&delete l[f]}return ba(this,"shape",l),l},checks:[]});return Li(e,u)}function c8(e,t){if(!xl(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const u=e._zod.def.shape;for(const l in t)if(Object.getOwnPropertyDescriptor(u,l)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=$i(e._zod.def,{get shape(){const u={...e._zod.def.shape,...t};return ba(this,"shape",u),u}});return Li(e,o)}function f8(e,t){if(!xl(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=$i(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return ba(this,"shape",i),i}});return Li(e,n)}function d8(e,t){const n=$i(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t._zod.def.shape};return ba(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:[]});return Li(e,n)}function h8(e,t,n){const o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const l=$i(t._zod.def,{get shape(){const f=t._zod.def.shape,d={...f};if(n)for(const h in n){if(!(h in f))throw new Error(`Unrecognized key: "${h}"`);n[h]&&(d[h]=e?new e({type:"optional",innerType:f[h]}):f[h])}else for(const h in f)d[h]=e?new e({type:"optional",innerType:f[h]}):f[h];return ba(this,"shape",d),d},checks:[]});return Li(t,l)}function m8(e,t,n){const i=$i(t._zod.def,{get shape(){const o=t._zod.def.shape,u={...o};if(n)for(const l in n){if(!(l in u))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(u[l]=new e({type:"nonoptional",innerType:o[l]}))}else for(const l in o)u[l]=new e({type:"nonoptional",innerType:o[l]});return ba(this,"shape",u),u}});return Li(t,i)}function So(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function lE(e,t){return t.map(n=>{var i;return(i=n).path??(i.path=[]),n.path.unshift(e),n})}function lc(e){return typeof e=="string"?e:e?.message}function ya(e,t,n){const i={...e,path:e.path??[]};if(!e.message){const o=lc(e.inst?._zod.def?.error?.(e))??lc(t?.error?.(e))??lc(n.customError?.(e))??lc(n.localeError?.(e))??"Invalid input";i.message=o}return delete i.inst,delete i.continue,t?.reportInput||delete i.input,i}function $g(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function vl(...e){const[t,n,i]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:i}:{...t}}const uE=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,xp,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},cE=te("$ZodError",uE),fE=te("$ZodError",uE,{Parent:Error});function p8(e,t=n=>n.message){const n={},i=[];for(const o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):i.push(t(o));return{formErrors:i,fieldErrors:n}}function g8(e,t=n=>n.message){const n={_errors:[]},i=o=>{for(const u of o.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(l=>i({issues:l}));else if(u.code==="invalid_key")i({issues:u.issues});else if(u.code==="invalid_element")i({issues:u.issues});else if(u.path.length===0)n._errors.push(t(u));else{let l=n,f=0;for(;f<u.path.length;){const d=u.path[f];f===u.path.length-1?(l[d]=l[d]||{_errors:[]},l[d]._errors.push(t(u))):l[d]=l[d]||{_errors:[]},l=l[d],f++}}};return i(e),n}const Lg=e=>(t,n,i,o)=>{const u=i?Object.assign(i,{async:!1}):{async:!1},l=t._zod.run({value:n,issues:[]},u);if(l instanceof Promise)throw new Co;if(l.issues.length){const f=new(o?.Err??e)(l.issues.map(d=>ya(d,u,ga())));throw oE(f,o?.callee),f}return l.value},Ug=e=>async(t,n,i,o)=>{const u=i?Object.assign(i,{async:!0}):{async:!0};let l=t._zod.run({value:n,issues:[]},u);if(l instanceof Promise&&(l=await l),l.issues.length){const f=new(o?.Err??e)(l.issues.map(d=>ya(d,u,ga())));throw oE(f,o?.callee),f}return l.value},af=e=>(t,n,i)=>{const o=i?{...i,async:!1}:{async:!1},u=t._zod.run({value:n,issues:[]},o);if(u instanceof Promise)throw new Co;return u.issues.length?{success:!1,error:new(e??cE)(u.issues.map(l=>ya(l,o,ga())))}:{success:!0,data:u.value}},y8=af(fE),of=e=>async(t,n,i)=>{const o=i?Object.assign(i,{async:!0}):{async:!0};let u=t._zod.run({value:n,issues:[]},o);return u instanceof Promise&&(u=await u),u.issues.length?{success:!1,error:new e(u.issues.map(l=>ya(l,o,ga())))}:{success:!0,data:u.value}},x8=of(fE),v8=e=>(t,n,i)=>{const o=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Lg(e)(t,n,o)},b8=e=>(t,n,i)=>Lg(e)(t,n,i),S8=e=>async(t,n,i)=>{const o=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Ug(e)(t,n,o)},w8=e=>async(t,n,i)=>Ug(e)(t,n,i),k8=e=>(t,n,i)=>{const o=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return af(e)(t,n,o)},z8=e=>(t,n,i)=>af(e)(t,n,i),_8=e=>async(t,n,i)=>{const o=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return of(e)(t,n,o)},E8=e=>async(t,n,i)=>of(e)(t,n,i),T8=/^[cC][^\s-]{8,}$/,C8=/^[0-9a-z]+$/,A8=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,j8=/^[0-9a-vA-V]{20}$/,N8=/^[A-Za-z0-9]{27}$/,O8=/^[a-zA-Z0-9_-]{21}$/,R8=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,M8=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,qS=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,D8=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,$8="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function L8(){return new RegExp($8,"u")}const U8=/^(?:(?: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])$/,V8=/^(([0-9a-fA-F]{1,4}:){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}|:))$/,P8=/^((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])\/([0-9]|[1-2][0-9]|3[0-2])$/,Z8=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,B8=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,dE=/^[A-Za-z0-9_-]*$/,I8=/^\+[1-9]\d{6,14}$/,hE="(?:(?:\\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])))",H8=new RegExp(`^${hE}$`);function mE(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function F8(e){return new RegExp(`^${mE(e)}$`)}function q8(e){const t=mE({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const i=`${t}(?:${n.join("|")})`;return new RegExp(`^${hE}T(?:${i})$`)}const G8=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Y8=/^[^A-Z]*$/,X8=/^[^a-z]*$/,Er=te("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),K8=te("$ZodCheckMaxLength",(e,t)=>{var n;Er.init(e,t),(n=e._zod.def).when??(n.when=i=>{const o=i.value;return!Mg(o)&&o.length!==void 0}),e._zod.onattach.push(i=>{const o=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{const o=i.value;if(o.length<=t.maximum)return;const l=$g(o);i.issues.push({origin:l,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),J8=te("$ZodCheckMinLength",(e,t)=>{var n;Er.init(e,t),(n=e._zod.def).when??(n.when=i=>{const o=i.value;return!Mg(o)&&o.length!==void 0}),e._zod.onattach.push(i=>{const o=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{const o=i.value;if(o.length>=t.minimum)return;const l=$g(o);i.issues.push({origin:l,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Q8=te("$ZodCheckLengthEquals",(e,t)=>{var n;Er.init(e,t),(n=e._zod.def).when??(n.when=i=>{const o=i.value;return!Mg(o)&&o.length!==void 0}),e._zod.onattach.push(i=>{const o=i._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=i=>{const o=i.value,u=o.length;if(u===t.length)return;const l=$g(o),f=u>t.length;i.issues.push({origin:l,...f?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),sf=te("$ZodCheckStringFormat",(e,t)=>{var n,i;Er.init(e,t),e._zod.onattach.push(o=>{const u=o._zod.bag;u.format=t.format,t.pattern&&(u.patterns??(u.patterns=new Set),u.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),W8=te("$ZodCheckRegex",(e,t)=>{sf.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),eZ=te("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Y8),sf.init(e,t)}),tZ=te("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=X8),sf.init(e,t)}),nZ=te("$ZodCheckIncludes",(e,t)=>{Er.init(e,t);const n=Oo(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=i,e._zod.onattach.push(o=>{const u=o._zod.bag;u.patterns??(u.patterns=new Set),u.patterns.add(i)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),rZ=te("$ZodCheckStartsWith",(e,t)=>{Er.init(e,t);const n=new RegExp(`^${Oo(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(i=>{const o=i._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),iZ=te("$ZodCheckEndsWith",(e,t)=>{Er.init(e,t);const n=new RegExp(`.*${Oo(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(i=>{const o=i._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}}),aZ=te("$ZodCheckOverwrite",(e,t)=>{Er.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class oZ{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const i=t.split(`
71
+ `).filter(l=>l),o=Math.min(...i.map(l=>l.length-l.trimStart().length)),u=i.map(l=>l.slice(o)).map(l=>" ".repeat(this.indent*2)+l);for(const l of u)this.content.push(l)}compile(){const t=Function,n=this?.args,o=[...(this?.content??[""]).map(u=>` ${u}`)];return new t(...n,o.join(`
72
+ `))}}const sZ={major:4,minor:3,patch:6},Lt=te("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=sZ;const i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(const o of i)for(const u of o._zod.onattach)u(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const o=(l,f,d)=>{let h=So(l),p;for(const y of f){if(y._zod.def.when){if(!y._zod.def.when(l))continue}else if(h)continue;const x=l.issues.length,b=y._zod.check(l);if(b instanceof Promise&&d?.async===!1)throw new Co;if(p||b instanceof Promise)p=(p??Promise.resolve()).then(async()=>{await b,l.issues.length!==x&&(h||(h=So(l,x)))});else{if(l.issues.length===x)continue;h||(h=So(l,x))}}return p?p.then(()=>l):l},u=(l,f,d)=>{if(So(l))return l.aborted=!0,l;const h=o(f,i,d);if(h instanceof Promise){if(d.async===!1)throw new Co;return h.then(p=>e._zod.parse(p,d))}return e._zod.parse(h,d)};e._zod.run=(l,f)=>{if(f.skipChecks)return e._zod.parse(l,f);if(f.direction==="backward"){const h=e._zod.parse({value:l.value,issues:[]},{...f,skipChecks:!0});return h instanceof Promise?h.then(p=>u(p,l,f)):u(h,l,f)}const d=e._zod.parse(l,f);if(d instanceof Promise){if(f.async===!1)throw new Co;return d.then(h=>o(h,i,f))}return o(d,i,f)}}Ke(e,"~standard",()=>({validate:o=>{try{const u=y8(e,o);return u.success?{value:u.data}:{issues:u.error?.issues}}catch{return x8(e,o).then(l=>l.success?{value:l.data}:{issues:l.error?.issues})}},vendor:"zod",version:1}))}),Vg=te("$ZodString",(e,t)=>{Lt.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??G8(e._zod.bag),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),gt=te("$ZodStringFormat",(e,t)=>{sf.init(e,t),Vg.init(e,t)}),lZ=te("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=M8),gt.init(e,t)}),uZ=te("$ZodUUID",(e,t)=>{if(t.version){const i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(i===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=qS(i))}else t.pattern??(t.pattern=qS());gt.init(e,t)}),cZ=te("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=D8),gt.init(e,t)}),fZ=te("$ZodURL",(e,t)=>{gt.init(e,t),e._zod.check=n=>{try{const i=n.value.trim(),o=new URL(i);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=o.href:n.value=i;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),dZ=te("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=L8()),gt.init(e,t)}),hZ=te("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=O8),gt.init(e,t)}),mZ=te("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=T8),gt.init(e,t)}),pZ=te("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=C8),gt.init(e,t)}),gZ=te("$ZodULID",(e,t)=>{t.pattern??(t.pattern=A8),gt.init(e,t)}),yZ=te("$ZodXID",(e,t)=>{t.pattern??(t.pattern=j8),gt.init(e,t)}),xZ=te("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=N8),gt.init(e,t)}),vZ=te("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=q8(t)),gt.init(e,t)}),bZ=te("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=H8),gt.init(e,t)}),SZ=te("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=F8(t)),gt.init(e,t)}),wZ=te("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=R8),gt.init(e,t)}),kZ=te("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=U8),gt.init(e,t),e._zod.bag.format="ipv4"}),zZ=te("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=V8),gt.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),_Z=te("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=P8),gt.init(e,t)}),EZ=te("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Z8),gt.init(e,t),e._zod.check=n=>{const i=n.value.split("/");try{if(i.length!==2)throw new Error;const[o,u]=i;if(!u)throw new Error;const l=Number(u);if(`${l}`!==u)throw new Error;if(l<0||l>128)throw new Error;new URL(`http://[${o}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function pE(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const TZ=te("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=B8),gt.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{pE(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function CZ(e){if(!dE.test(e))return!1;const t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return pE(n)}const AZ=te("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=dE),gt.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{CZ(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),jZ=te("$ZodE164",(e,t)=>{t.pattern??(t.pattern=I8),gt.init(e,t)});function NZ(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[i]=n;if(!i)return!1;const o=JSON.parse(atob(i));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}const OZ=te("$ZodJWT",(e,t)=>{gt.init(e,t),e._zod.check=n=>{NZ(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),RZ=te("$ZodUnknown",(e,t)=>{Lt.init(e,t),e._zod.parse=n=>n}),MZ=te("$ZodNever",(e,t)=>{Lt.init(e,t),e._zod.parse=(n,i)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function GS(e,t,n){e.issues.length&&t.issues.push(...lE(n,e.issues)),t.value[n]=e.value}const DZ=te("$ZodArray",(e,t)=>{Lt.init(e,t),e._zod.parse=(n,i)=>{const o=n.value;if(!Array.isArray(o))return n.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),n;n.value=Array(o.length);const u=[];for(let l=0;l<o.length;l++){const f=o[l],d=t.element._zod.run({value:f,issues:[]},i);d instanceof Promise?u.push(d.then(h=>GS(h,n,l))):GS(d,n,l)}return u.length?Promise.all(u).then(()=>n):n}});function Dc(e,t,n,i,o){if(e.issues.length){if(o&&!(n in i))return;t.issues.push(...lE(n,e.issues))}e.value===void 0?n in i&&(t.value[n]=void 0):t.value[n]=e.value}function gE(e){const t=Object.keys(e.shape);for(const i of t)if(!e.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);const n=s8(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function yE(e,t,n,i,o,u){const l=[],f=o.keySet,d=o.catchall._zod,h=d.def.type,p=d.optout==="optional";for(const y in t){if(f.has(y))continue;if(h==="never"){l.push(y);continue}const x=d.run({value:t[y],issues:[]},i);x instanceof Promise?e.push(x.then(b=>Dc(b,n,y,t,p))):Dc(x,n,y,t,p)}return l.length&&n.issues.push({code:"unrecognized_keys",keys:l,input:t,inst:u}),e.length?Promise.all(e).then(()=>n):n}const $Z=te("$ZodObject",(e,t)=>{if(Lt.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const f=t.shape;Object.defineProperty(t,"shape",{get:()=>{const d={...f};return Object.defineProperty(t,"shape",{value:d}),d}})}const i=Rg(()=>gE(t));Ke(e._zod,"propValues",()=>{const f=t.shape,d={};for(const h in f){const p=f[h]._zod;if(p.values){d[h]??(d[h]=new Set);for(const y of p.values)d[h].add(y)}}return d});const o=Mc,u=t.catchall;let l;e._zod.parse=(f,d)=>{l??(l=i.value);const h=f.value;if(!o(h))return f.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),f;f.value={};const p=[],y=l.shape;for(const x of l.keys){const b=y[x],_=b._zod.optout==="optional",z=b._zod.run({value:h[x],issues:[]},d);z instanceof Promise?p.push(z.then(A=>Dc(A,f,x,h,_))):Dc(z,f,x,h,_)}return u?yE(p,h,f,d,i.value,e):p.length?Promise.all(p).then(()=>f):f}}),LZ=te("$ZodObjectJIT",(e,t)=>{$Z.init(e,t);const n=e._zod.parse,i=Rg(()=>gE(t)),o=x=>{const b=new oZ(["shape","payload","ctx"]),_=i.value,z=T=>{const R=FS(T);return`shape[${R}]._zod.run({ value: input[${R}], issues: [] }, ctx)`};b.write("const input = payload.value;");const A=Object.create(null);let j=0;for(const T of _.keys)A[T]=`key_${j++}`;b.write("const newResult = {};");for(const T of _.keys){const R=A[T],L=FS(T),q=x[T]?._zod?.optout==="optional";b.write(`const ${R} = ${z(T)};`),q?b.write(`
73
+ if (${R}.issues.length) {
74
+ if (${L} in input) {
75
+ payload.issues = payload.issues.concat(${R}.issues.map(iss => ({
76
+ ...iss,
77
+ path: iss.path ? [${L}, ...iss.path] : [${L}]
78
+ })));
79
+ }
80
+ }
81
+
82
+ if (${R}.value === undefined) {
83
+ if (${L} in input) {
84
+ newResult[${L}] = undefined;
85
+ }
86
+ } else {
87
+ newResult[${L}] = ${R}.value;
88
+ }
89
+
90
+ `):b.write(`
91
+ if (${R}.issues.length) {
92
+ payload.issues = payload.issues.concat(${R}.issues.map(iss => ({
93
+ ...iss,
94
+ path: iss.path ? [${L}, ...iss.path] : [${L}]
95
+ })));
96
+ }
97
+
98
+ if (${R}.value === undefined) {
99
+ if (${L} in input) {
100
+ newResult[${L}] = undefined;
101
+ }
102
+ } else {
103
+ newResult[${L}] = ${R}.value;
104
+ }
105
+
106
+ `)}b.write("payload.value = newResult;"),b.write("return payload;");const N=b.compile();return(T,R)=>N(x,T,R)};let u;const l=Mc,f=!iE.jitless,h=f&&a8.value,p=t.catchall;let y;e._zod.parse=(x,b)=>{y??(y=i.value);const _=x.value;return l(_)?f&&h&&b?.async===!1&&b.jitless!==!0?(u||(u=o(t.shape)),x=u(x,b),p?yE([],_,x,b,y,e):x):n(x,b):(x.issues.push({expected:"object",code:"invalid_type",input:_,inst:e}),x)}});function YS(e,t,n,i){for(const u of e)if(u.issues.length===0)return t.value=u.value,t;const o=e.filter(u=>!So(u));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(u=>u.issues.map(l=>ya(l,i,ga())))}),t)}const UZ=te("$ZodUnion",(e,t)=>{Lt.init(e,t),Ke(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),Ke(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),Ke(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),Ke(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(u=>u._zod.pattern);return new RegExp(`^(${o.map(u=>Dg(u.source)).join("|")})$`)}});const n=t.options.length===1,i=t.options[0]._zod.run;e._zod.parse=(o,u)=>{if(n)return i(o,u);let l=!1;const f=[];for(const d of t.options){const h=d._zod.run({value:o.value,issues:[]},u);if(h instanceof Promise)f.push(h),l=!0;else{if(h.issues.length===0)return h;f.push(h)}}return l?Promise.all(f).then(d=>YS(d,o,e,u)):YS(f,o,e,u)}}),VZ=te("$ZodIntersection",(e,t)=>{Lt.init(e,t),e._zod.parse=(n,i)=>{const o=n.value,u=t.left._zod.run({value:o,issues:[]},i),l=t.right._zod.run({value:o,issues:[]},i);return u instanceof Promise||l instanceof Promise?Promise.all([u,l]).then(([d,h])=>XS(n,d,h)):XS(n,u,l)}});function vp(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(xl(e)&&xl(t)){const n=Object.keys(t),i=Object.keys(e).filter(u=>n.indexOf(u)!==-1),o={...e,...t};for(const u of i){const l=vp(e[u],t[u]);if(!l.valid)return{valid:!1,mergeErrorPath:[u,...l.mergeErrorPath]};o[u]=l.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let i=0;i<e.length;i++){const o=e[i],u=t[i],l=vp(o,u);if(!l.valid)return{valid:!1,mergeErrorPath:[i,...l.mergeErrorPath]};n.push(l.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function XS(e,t,n){const i=new Map;let o;for(const f of t.issues)if(f.code==="unrecognized_keys"){o??(o=f);for(const d of f.keys)i.has(d)||i.set(d,{}),i.get(d).l=!0}else e.issues.push(f);for(const f of n.issues)if(f.code==="unrecognized_keys")for(const d of f.keys)i.has(d)||i.set(d,{}),i.get(d).r=!0;else e.issues.push(f);const u=[...i].filter(([,f])=>f.l&&f.r).map(([f])=>f);if(u.length&&o&&e.issues.push({...o,keys:u}),So(e))return e;const l=vp(t.value,n.value);if(!l.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(l.mergeErrorPath)}`);return e.value=l.data,e}const PZ=te("$ZodEnum",(e,t)=>{Lt.init(e,t);const n=aE(t.entries),i=new Set(n);e._zod.values=i,e._zod.pattern=new RegExp(`^(${n.filter(o=>o8.has(typeof o)).map(o=>typeof o=="string"?Oo(o):o.toString()).join("|")})$`),e._zod.parse=(o,u)=>{const l=o.value;return i.has(l)||o.issues.push({code:"invalid_value",values:n,input:l,inst:e}),o}}),ZZ=te("$ZodLiteral",(e,t)=>{if(Lt.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(i=>typeof i=="string"?Oo(i):i?Oo(i.toString()):String(i)).join("|")})$`),e._zod.parse=(i,o)=>{const u=i.value;return n.has(u)||i.issues.push({code:"invalid_value",values:t.values,input:u,inst:e}),i}}),BZ=te("$ZodTransform",(e,t)=>{Lt.init(e,t),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new rE(e.constructor.name);const o=t.transform(n.value,n);if(i.async)return(o instanceof Promise?o:Promise.resolve(o)).then(l=>(n.value=l,n));if(o instanceof Promise)throw new Co;return n.value=o,n}});function KS(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const xE=te("$ZodOptional",(e,t)=>{Lt.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Ke(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Ke(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Dg(n.source)})?$`):void 0}),e._zod.parse=(n,i)=>{if(t.innerType._zod.optin==="optional"){const o=t.innerType._zod.run(n,i);return o instanceof Promise?o.then(u=>KS(u,n.value)):KS(o,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,i)}}),IZ=te("$ZodExactOptional",(e,t)=>{xE.init(e,t),Ke(e._zod,"values",()=>t.innerType._zod.values),Ke(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,i)=>t.innerType._zod.run(n,i)}),HZ=te("$ZodNullable",(e,t)=>{Lt.init(e,t),Ke(e._zod,"optin",()=>t.innerType._zod.optin),Ke(e._zod,"optout",()=>t.innerType._zod.optout),Ke(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Dg(n.source)}|null)$`):void 0}),Ke(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,i)=>n.value===null?n:t.innerType._zod.run(n,i)}),FZ=te("$ZodDefault",(e,t)=>{Lt.init(e,t),e._zod.optin="optional",Ke(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);if(n.value===void 0)return n.value=t.defaultValue,n;const o=t.innerType._zod.run(n,i);return o instanceof Promise?o.then(u=>JS(u,t)):JS(o,t)}});function JS(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const qZ=te("$ZodPrefault",(e,t)=>{Lt.init(e,t),e._zod.optin="optional",Ke(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>(i.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,i))}),GZ=te("$ZodNonOptional",(e,t)=>{Lt.init(e,t),Ke(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(i=>i!==void 0)):void 0}),e._zod.parse=(n,i)=>{const o=t.innerType._zod.run(n,i);return o instanceof Promise?o.then(u=>QS(u,e)):QS(o,e)}});function QS(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const YZ=te("$ZodCatch",(e,t)=>{Lt.init(e,t),Ke(e._zod,"optin",()=>t.innerType._zod.optin),Ke(e._zod,"optout",()=>t.innerType._zod.optout),Ke(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);const o=t.innerType._zod.run(n,i);return o instanceof Promise?o.then(u=>(n.value=u.value,u.issues.length&&(n.value=t.catchValue({...n,error:{issues:u.issues.map(l=>ya(l,i,ga()))},input:n.value}),n.issues=[]),n)):(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(u=>ya(u,i,ga()))},input:n.value}),n.issues=[]),n)}}),XZ=te("$ZodPipe",(e,t)=>{Lt.init(e,t),Ke(e._zod,"values",()=>t.in._zod.values),Ke(e._zod,"optin",()=>t.in._zod.optin),Ke(e._zod,"optout",()=>t.out._zod.optout),Ke(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,i)=>{if(i.direction==="backward"){const u=t.out._zod.run(n,i);return u instanceof Promise?u.then(l=>uc(l,t.in,i)):uc(u,t.in,i)}const o=t.in._zod.run(n,i);return o instanceof Promise?o.then(u=>uc(u,t.out,i)):uc(o,t.out,i)}});function uc(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const KZ=te("$ZodReadonly",(e,t)=>{Lt.init(e,t),Ke(e._zod,"propValues",()=>t.innerType._zod.propValues),Ke(e._zod,"values",()=>t.innerType._zod.values),Ke(e._zod,"optin",()=>t.innerType?._zod?.optin),Ke(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);const o=t.innerType._zod.run(n,i);return o instanceof Promise?o.then(WS):WS(o)}});function WS(e){return e.value=Object.freeze(e.value),e}const JZ=te("$ZodCustom",(e,t)=>{Er.init(e,t),Lt.init(e,t),e._zod.parse=(n,i)=>n,e._zod.check=n=>{const i=n.value,o=t.fn(i);if(o instanceof Promise)return o.then(u=>ew(u,n,i,e));ew(o,n,i,e)}});function ew(e,t,n,i){if(!e){const o={code:"custom",input:n,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(o.params=i._zod.def.params),t.issues.push(vl(o))}}var tw;class QZ{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const i=n[0];return this._map.set(t,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const i={...this.get(n)??{}};delete i.id;const o={...i,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function WZ(){return new QZ}(tw=globalThis).__zod_globalRegistry??(tw.__zod_globalRegistry=WZ());const Qs=globalThis.__zod_globalRegistry;function eB(e,t){return new e({type:"string",...Ee(t)})}function tB(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Ee(t)})}function nw(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Ee(t)})}function nB(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Ee(t)})}function rB(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Ee(t)})}function iB(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Ee(t)})}function aB(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Ee(t)})}function oB(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Ee(t)})}function sB(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Ee(t)})}function lB(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Ee(t)})}function uB(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Ee(t)})}function cB(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Ee(t)})}function fB(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Ee(t)})}function dB(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Ee(t)})}function hB(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Ee(t)})}function mB(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Ee(t)})}function pB(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Ee(t)})}function gB(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Ee(t)})}function yB(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Ee(t)})}function xB(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Ee(t)})}function vB(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Ee(t)})}function bB(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Ee(t)})}function SB(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Ee(t)})}function wB(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Ee(t)})}function kB(e,t){return new e({type:"string",format:"date",check:"string_format",...Ee(t)})}function zB(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Ee(t)})}function _B(e,t){return new e({type:"string",format:"duration",check:"string_format",...Ee(t)})}function EB(e){return new e({type:"unknown"})}function TB(e,t){return new e({type:"never",...Ee(t)})}function vE(e,t){return new K8({check:"max_length",...Ee(t),maximum:e})}function $c(e,t){return new J8({check:"min_length",...Ee(t),minimum:e})}function bE(e,t){return new Q8({check:"length_equals",...Ee(t),length:e})}function CB(e,t){return new W8({check:"string_format",format:"regex",...Ee(t),pattern:e})}function AB(e){return new eZ({check:"string_format",format:"lowercase",...Ee(e)})}function jB(e){return new tZ({check:"string_format",format:"uppercase",...Ee(e)})}function NB(e,t){return new nZ({check:"string_format",format:"includes",...Ee(t),includes:e})}function OB(e,t){return new rZ({check:"string_format",format:"starts_with",...Ee(t),prefix:e})}function RB(e,t){return new iZ({check:"string_format",format:"ends_with",...Ee(t),suffix:e})}function Ho(e){return new aZ({check:"overwrite",tx:e})}function MB(e){return Ho(t=>t.normalize(e))}function DB(){return Ho(e=>e.trim())}function $B(){return Ho(e=>e.toLowerCase())}function LB(){return Ho(e=>e.toUpperCase())}function UB(){return Ho(e=>i8(e))}function VB(e,t,n){return new e({type:"array",element:t,...Ee(n)})}function PB(e,t,n){return new e({type:"custom",check:"custom",fn:t,...Ee(n)})}function ZB(e){const t=BB(n=>(n.addIssue=i=>{if(typeof i=="string")n.issues.push(vl(i,n.value,t._zod.def));else{const o=i;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),n.issues.push(vl(o))}},e(n.value,n)));return t}function BB(e,t){const n=new Er({check:"custom",...Ee(t)});return n._zod.check=e,n}function SE(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Qs,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Wt(e,t,n={path:[],schemaPath:[]}){var i;const o=e._zod.def,u=t.seen.get(e);if(u)return u.count++,n.schemaPath.includes(e)&&(u.cycle=n.path),u.schema;const l={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,l);const f=e._zod.toJSONSchema?.();if(f)l.schema=f;else{const p={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,l.schema,p);else{const x=l.schema,b=t.processors[o.type];if(!b)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);b(e,t,x,p)}const y=e._zod.parent;y&&(l.ref||(l.ref=y),Wt(y,t,p),t.seen.get(y).isParent=!0)}const d=t.metadataRegistry.get(e);return d&&Object.assign(l.schema,d),t.io==="input"&&cn(e)&&(delete l.schema.examples,delete l.schema.default),t.io==="input"&&l.schema._prefault&&((i=l.schema).default??(i.default=l.schema._prefault)),delete l.schema._prefault,t.seen.get(e).schema}function wE(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=new Map;for(const l of e.seen.entries()){const f=e.metadataRegistry.get(l[0])?.id;if(f){const d=i.get(f);if(d&&d!==l[0])throw new Error(`Duplicate schema id "${f}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(f,l[0])}}const o=l=>{const f=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const y=e.external.registry.get(l[0])?.id,x=e.external.uri??(_=>_);if(y)return{ref:x(y)};const b=l[1].defId??l[1].schema.id??`schema${e.counter++}`;return l[1].defId=b,{defId:b,ref:`${x("__shared")}#/${f}/${b}`}}if(l[1]===n)return{ref:"#"};const h=`#/${f}/`,p=l[1].schema.id??`__schema${e.counter++}`;return{defId:p,ref:h+p}},u=l=>{if(l[1].schema.$ref)return;const f=l[1],{ref:d,defId:h}=o(l);f.def={...f.schema},h&&(f.defId=h);const p=f.schema;for(const y in p)delete p[y];p.$ref=d};if(e.cycles==="throw")for(const l of e.seen.entries()){const f=l[1];if(f.cycle)throw new Error(`Cycle detected: #/${f.cycle?.join("/")}/<root>
107
+
108
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const l of e.seen.entries()){const f=l[1];if(t===l[0]){u(l);continue}if(e.external){const h=e.external.registry.get(l[0])?.id;if(t!==l[0]&&h){u(l);continue}}if(e.metadataRegistry.get(l[0])?.id){u(l);continue}if(f.cycle){u(l);continue}if(f.count>1&&e.reused==="ref"){u(l);continue}}}function kE(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=l=>{const f=e.seen.get(l);if(f.ref===null)return;const d=f.def??f.schema,h={...d},p=f.ref;if(f.ref=null,p){i(p);const x=e.seen.get(p),b=x.schema;if(b.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(d.allOf=d.allOf??[],d.allOf.push(b)):Object.assign(d,b),Object.assign(d,h),l._zod.parent===p)for(const z in d)z==="$ref"||z==="allOf"||z in h||delete d[z];if(b.$ref&&x.def)for(const z in d)z==="$ref"||z==="allOf"||z in x.def&&JSON.stringify(d[z])===JSON.stringify(x.def[z])&&delete d[z]}const y=l._zod.parent;if(y&&y!==p){i(y);const x=e.seen.get(y);if(x?.schema.$ref&&(d.$ref=x.schema.$ref,x.def))for(const b in d)b==="$ref"||b==="allOf"||b in x.def&&JSON.stringify(d[b])===JSON.stringify(x.def[b])&&delete d[b]}e.override({zodSchema:l,jsonSchema:d,path:f.path??[]})};for(const l of[...e.seen.entries()].reverse())i(l[0]);const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const l=e.external.registry.get(t)?.id;if(!l)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(l)}Object.assign(o,n.def??n.schema);const u=e.external?.defs??{};for(const l of e.seen.entries()){const f=l[1];f.def&&f.defId&&(u[f.defId]=f.def)}e.external||Object.keys(u).length>0&&(e.target==="draft-2020-12"?o.$defs=u:o.definitions=u);try{const l=JSON.parse(JSON.stringify(o));return Object.defineProperty(l,"~standard",{value:{...t["~standard"],jsonSchema:{input:Lc(t,"input",e.processors),output:Lc(t,"output",e.processors)}},enumerable:!1,writable:!1}),l}catch{throw new Error("Error converting schema to JSON.")}}function cn(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return cn(i.element,n);if(i.type==="set")return cn(i.valueType,n);if(i.type==="lazy")return cn(i.getter(),n);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return cn(i.innerType,n);if(i.type==="intersection")return cn(i.left,n)||cn(i.right,n);if(i.type==="record"||i.type==="map")return cn(i.keyType,n)||cn(i.valueType,n);if(i.type==="pipe")return cn(i.in,n)||cn(i.out,n);if(i.type==="object"){for(const o in i.shape)if(cn(i.shape[o],n))return!0;return!1}if(i.type==="union"){for(const o of i.options)if(cn(o,n))return!0;return!1}if(i.type==="tuple"){for(const o of i.items)if(cn(o,n))return!0;return!!(i.rest&&cn(i.rest,n))}return!1}const IB=(e,t={})=>n=>{const i=SE({...n,processors:t});return Wt(e,i),wE(i,e),kE(i,e)},Lc=(e,t,n={})=>i=>{const{libraryOptions:o,target:u}=i??{},l=SE({...o??{},target:u,io:t,processors:n});return Wt(e,l),wE(l,e),kE(l,e)},HB={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},FB=(e,t,n,i)=>{const o=n;o.type="string";const{minimum:u,maximum:l,format:f,patterns:d,contentEncoding:h}=e._zod.bag;if(typeof u=="number"&&(o.minLength=u),typeof l=="number"&&(o.maxLength=l),f&&(o.format=HB[f]??f,o.format===""&&delete o.format,f==="time"&&delete o.format),h&&(o.contentEncoding=h),d&&d.size>0){const p=[...d];p.length===1?o.pattern=p[0].source:p.length>1&&(o.allOf=[...p.map(y=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:y.source}))])}},qB=(e,t,n,i)=>{n.not={}},GB=(e,t,n,i)=>{},YB=(e,t,n,i)=>{const o=e._zod.def,u=aE(o.entries);u.every(l=>typeof l=="number")&&(n.type="number"),u.every(l=>typeof l=="string")&&(n.type="string"),n.enum=u},XB=(e,t,n,i)=>{const o=e._zod.def,u=[];for(const l of o.values)if(l===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof l=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");u.push(Number(l))}else u.push(l);if(u.length!==0)if(u.length===1){const l=u[0];n.type=l===null?"null":typeof l,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[l]:n.const=l}else u.every(l=>typeof l=="number")&&(n.type="number"),u.every(l=>typeof l=="string")&&(n.type="string"),u.every(l=>typeof l=="boolean")&&(n.type="boolean"),u.every(l=>l===null)&&(n.type="null"),n.enum=u},KB=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},JB=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},QB=(e,t,n,i)=>{const o=n,u=e._zod.def,{minimum:l,maximum:f}=e._zod.bag;typeof l=="number"&&(o.minItems=l),typeof f=="number"&&(o.maxItems=f),o.type="array",o.items=Wt(u.element,t,{...i,path:[...i.path,"items"]})},WB=(e,t,n,i)=>{const o=n,u=e._zod.def;o.type="object",o.properties={};const l=u.shape;for(const h in l)o.properties[h]=Wt(l[h],t,{...i,path:[...i.path,"properties",h]});const f=new Set(Object.keys(l)),d=new Set([...f].filter(h=>{const p=u.shape[h]._zod;return t.io==="input"?p.optin===void 0:p.optout===void 0}));d.size>0&&(o.required=Array.from(d)),u.catchall?._zod.def.type==="never"?o.additionalProperties=!1:u.catchall?u.catchall&&(o.additionalProperties=Wt(u.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},eI=(e,t,n,i)=>{const o=e._zod.def,u=o.inclusive===!1,l=o.options.map((f,d)=>Wt(f,t,{...i,path:[...i.path,u?"oneOf":"anyOf",d]}));u?n.oneOf=l:n.anyOf=l},tI=(e,t,n,i)=>{const o=e._zod.def,u=Wt(o.left,t,{...i,path:[...i.path,"allOf",0]}),l=Wt(o.right,t,{...i,path:[...i.path,"allOf",1]}),f=h=>"allOf"in h&&Object.keys(h).length===1,d=[...f(u)?u.allOf:[u],...f(l)?l.allOf:[l]];n.allOf=d},nI=(e,t,n,i)=>{const o=e._zod.def,u=Wt(o.innerType,t,i),l=t.seen.get(e);t.target==="openapi-3.0"?(l.ref=o.innerType,n.nullable=!0):n.anyOf=[u,{type:"null"}]},rI=(e,t,n,i)=>{const o=e._zod.def;Wt(o.innerType,t,i);const u=t.seen.get(e);u.ref=o.innerType},iI=(e,t,n,i)=>{const o=e._zod.def;Wt(o.innerType,t,i);const u=t.seen.get(e);u.ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))},aI=(e,t,n,i)=>{const o=e._zod.def;Wt(o.innerType,t,i);const u=t.seen.get(e);u.ref=o.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},oI=(e,t,n,i)=>{const o=e._zod.def;Wt(o.innerType,t,i);const u=t.seen.get(e);u.ref=o.innerType;let l;try{l=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=l},sI=(e,t,n,i)=>{const o=e._zod.def,u=t.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;Wt(u,t,i);const l=t.seen.get(e);l.ref=u},lI=(e,t,n,i)=>{const o=e._zod.def;Wt(o.innerType,t,i);const u=t.seen.get(e);u.ref=o.innerType,n.readOnly=!0},zE=(e,t,n,i)=>{const o=e._zod.def;Wt(o.innerType,t,i);const u=t.seen.get(e);u.ref=o.innerType},uI=te("ZodISODateTime",(e,t)=>{vZ.init(e,t),St.init(e,t)});function cI(e){return wB(uI,e)}const fI=te("ZodISODate",(e,t)=>{bZ.init(e,t),St.init(e,t)});function dI(e){return kB(fI,e)}const hI=te("ZodISOTime",(e,t)=>{SZ.init(e,t),St.init(e,t)});function mI(e){return zB(hI,e)}const pI=te("ZodISODuration",(e,t)=>{wZ.init(e,t),St.init(e,t)});function gI(e){return _B(pI,e)}const _E=(e,t)=>{cE.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>g8(e,n)},flatten:{value:n=>p8(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,xp,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,xp,2)}},isEmpty:{get(){return e.issues.length===0}}})},yI=te("ZodError",_E),rr=te("ZodError",_E,{Parent:Error}),xI=Lg(rr),vI=Ug(rr),bI=af(rr),SI=of(rr),wI=v8(rr),kI=b8(rr),zI=S8(rr),_I=w8(rr),EI=k8(rr),TI=z8(rr),CI=_8(rr),AI=E8(rr),Ut=te("ZodType",(e,t)=>(Lt.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Lc(e,"input"),output:Lc(e,"output")}}),e.toJSONSchema=IB(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone($i(t,{checks:[...t.checks??[],...n.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0}),e.with=e.check,e.clone=(n,i)=>Li(e,n,i),e.brand=()=>e,e.register=((n,i)=>(n.add(e,i),e)),e.parse=(n,i)=>xI(e,n,i,{callee:e.parse}),e.safeParse=(n,i)=>bI(e,n,i),e.parseAsync=async(n,i)=>vI(e,n,i,{callee:e.parseAsync}),e.safeParseAsync=async(n,i)=>SI(e,n,i),e.spa=e.safeParseAsync,e.encode=(n,i)=>wI(e,n,i),e.decode=(n,i)=>kI(e,n,i),e.encodeAsync=async(n,i)=>zI(e,n,i),e.decodeAsync=async(n,i)=>_I(e,n,i),e.safeEncode=(n,i)=>EI(e,n,i),e.safeDecode=(n,i)=>TI(e,n,i),e.safeEncodeAsync=async(n,i)=>CI(e,n,i),e.safeDecodeAsync=async(n,i)=>AI(e,n,i),e.refine=(n,i)=>e.check(w7(n,i)),e.superRefine=n=>e.check(k7(n)),e.overwrite=n=>e.check(Ho(n)),e.optional=()=>ow(e),e.exactOptional=()=>u7(e),e.nullable=()=>sw(e),e.nullish=()=>ow(sw(e)),e.nonoptional=n=>p7(e,n),e.array=()=>QI(e),e.or=n=>TE([e,n]),e.and=n=>r7(e,n),e.transform=n=>lw(e,s7(n)),e.default=n=>d7(e,n),e.prefault=n=>m7(e,n),e.catch=n=>y7(e,n),e.pipe=n=>lw(e,n),e.readonly=()=>b7(e),e.describe=n=>{const i=e.clone();return Qs.add(i,{description:n}),i},Object.defineProperty(e,"description",{get(){return Qs.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return Qs.get(e);const i=e.clone();return Qs.add(i,n[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),EE=te("_ZodString",(e,t)=>{Vg.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(i,o,u)=>FB(e,i,o);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...i)=>e.check(CB(...i)),e.includes=(...i)=>e.check(NB(...i)),e.startsWith=(...i)=>e.check(OB(...i)),e.endsWith=(...i)=>e.check(RB(...i)),e.min=(...i)=>e.check($c(...i)),e.max=(...i)=>e.check(vE(...i)),e.length=(...i)=>e.check(bE(...i)),e.nonempty=(...i)=>e.check($c(1,...i)),e.lowercase=i=>e.check(AB(i)),e.uppercase=i=>e.check(jB(i)),e.trim=()=>e.check(DB()),e.normalize=(...i)=>e.check(MB(...i)),e.toLowerCase=()=>e.check($B()),e.toUpperCase=()=>e.check(LB()),e.slugify=()=>e.check(UB())}),jI=te("ZodString",(e,t)=>{Vg.init(e,t),EE.init(e,t),e.email=n=>e.check(tB(NI,n)),e.url=n=>e.check(oB(OI,n)),e.jwt=n=>e.check(SB(GI,n)),e.emoji=n=>e.check(sB(RI,n)),e.guid=n=>e.check(nw(rw,n)),e.uuid=n=>e.check(nB(cc,n)),e.uuidv4=n=>e.check(rB(cc,n)),e.uuidv6=n=>e.check(iB(cc,n)),e.uuidv7=n=>e.check(aB(cc,n)),e.nanoid=n=>e.check(lB(MI,n)),e.guid=n=>e.check(nw(rw,n)),e.cuid=n=>e.check(uB(DI,n)),e.cuid2=n=>e.check(cB($I,n)),e.ulid=n=>e.check(fB(LI,n)),e.base64=n=>e.check(xB(HI,n)),e.base64url=n=>e.check(vB(FI,n)),e.xid=n=>e.check(dB(UI,n)),e.ksuid=n=>e.check(hB(VI,n)),e.ipv4=n=>e.check(mB(PI,n)),e.ipv6=n=>e.check(pB(ZI,n)),e.cidrv4=n=>e.check(gB(BI,n)),e.cidrv6=n=>e.check(yB(II,n)),e.e164=n=>e.check(bB(qI,n)),e.datetime=n=>e.check(cI(n)),e.date=n=>e.check(dI(n)),e.time=n=>e.check(mI(n)),e.duration=n=>e.check(gI(n))});function gm(e){return eB(jI,e)}const St=te("ZodStringFormat",(e,t)=>{gt.init(e,t),EE.init(e,t)}),NI=te("ZodEmail",(e,t)=>{cZ.init(e,t),St.init(e,t)}),rw=te("ZodGUID",(e,t)=>{lZ.init(e,t),St.init(e,t)}),cc=te("ZodUUID",(e,t)=>{uZ.init(e,t),St.init(e,t)}),OI=te("ZodURL",(e,t)=>{fZ.init(e,t),St.init(e,t)}),RI=te("ZodEmoji",(e,t)=>{dZ.init(e,t),St.init(e,t)}),MI=te("ZodNanoID",(e,t)=>{hZ.init(e,t),St.init(e,t)}),DI=te("ZodCUID",(e,t)=>{mZ.init(e,t),St.init(e,t)}),$I=te("ZodCUID2",(e,t)=>{pZ.init(e,t),St.init(e,t)}),LI=te("ZodULID",(e,t)=>{gZ.init(e,t),St.init(e,t)}),UI=te("ZodXID",(e,t)=>{yZ.init(e,t),St.init(e,t)}),VI=te("ZodKSUID",(e,t)=>{xZ.init(e,t),St.init(e,t)}),PI=te("ZodIPv4",(e,t)=>{kZ.init(e,t),St.init(e,t)}),ZI=te("ZodIPv6",(e,t)=>{zZ.init(e,t),St.init(e,t)}),BI=te("ZodCIDRv4",(e,t)=>{_Z.init(e,t),St.init(e,t)}),II=te("ZodCIDRv6",(e,t)=>{EZ.init(e,t),St.init(e,t)}),HI=te("ZodBase64",(e,t)=>{TZ.init(e,t),St.init(e,t)}),FI=te("ZodBase64URL",(e,t)=>{AZ.init(e,t),St.init(e,t)}),qI=te("ZodE164",(e,t)=>{jZ.init(e,t),St.init(e,t)}),GI=te("ZodJWT",(e,t)=>{OZ.init(e,t),St.init(e,t)}),YI=te("ZodUnknown",(e,t)=>{RZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>GB()});function iw(){return EB(YI)}const XI=te("ZodNever",(e,t)=>{MZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>qB(e,n,i)});function KI(e){return TB(XI,e)}const JI=te("ZodArray",(e,t)=>{DZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>QB(e,n,i,o),e.element=t.element,e.min=(n,i)=>e.check($c(n,i)),e.nonempty=n=>e.check($c(1,n)),e.max=(n,i)=>e.check(vE(n,i)),e.length=(n,i)=>e.check(bE(n,i)),e.unwrap=()=>e.element});function QI(e,t){return VB(JI,e,t)}const WI=te("ZodObject",(e,t)=>{LZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>WB(e,n,i,o),Ke(e,"shape",()=>t.shape),e.keyof=()=>i7(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:iw()}),e.loose=()=>e.clone({...e._zod.def,catchall:iw()}),e.strict=()=>e.clone({...e._zod.def,catchall:KI()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>c8(e,n),e.safeExtend=n=>f8(e,n),e.merge=n=>d8(e,n),e.pick=n=>l8(e,n),e.omit=n=>u8(e,n),e.partial=(...n)=>h8(CE,e,n[0]),e.required=(...n)=>m8(AE,e,n[0])});function e7(e,t){const n={type:"object",shape:e??{},...Ee(t)};return new WI(n)}const t7=te("ZodUnion",(e,t)=>{UZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>eI(e,n,i,o),e.options=t.options});function TE(e,t){return new t7({type:"union",options:e,...Ee(t)})}const n7=te("ZodIntersection",(e,t)=>{VZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>tI(e,n,i,o)});function r7(e,t){return new n7({type:"intersection",left:e,right:t})}const bp=te("ZodEnum",(e,t)=>{PZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(i,o,u)=>YB(e,i,o),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(i,o)=>{const u={};for(const l of i)if(n.has(l))u[l]=t.entries[l];else throw new Error(`Key ${l} not found in enum`);return new bp({...t,checks:[],...Ee(o),entries:u})},e.exclude=(i,o)=>{const u={...t.entries};for(const l of i)if(n.has(l))delete u[l];else throw new Error(`Key ${l} not found in enum`);return new bp({...t,checks:[],...Ee(o),entries:u})}});function i7(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new bp({type:"enum",entries:n,...Ee(t)})}const a7=te("ZodLiteral",(e,t)=>{ZZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>XB(e,n,i),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function aw(e,t){return new a7({type:"literal",values:Array.isArray(e)?e:[e],...Ee(t)})}const o7=te("ZodTransform",(e,t)=>{BZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>JB(e,n),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new rE(e.constructor.name);n.addIssue=u=>{if(typeof u=="string")n.issues.push(vl(u,n.value,t));else{const l=u;l.fatal&&(l.continue=!1),l.code??(l.code="custom"),l.input??(l.input=n.value),l.inst??(l.inst=e),n.issues.push(vl(l))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(u=>(n.value=u,n)):(n.value=o,n)}});function s7(e){return new o7({type:"transform",transform:e})}const CE=te("ZodOptional",(e,t)=>{xE.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>zE(e,n,i,o),e.unwrap=()=>e._zod.def.innerType});function ow(e){return new CE({type:"optional",innerType:e})}const l7=te("ZodExactOptional",(e,t)=>{IZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>zE(e,n,i,o),e.unwrap=()=>e._zod.def.innerType});function u7(e){return new l7({type:"optional",innerType:e})}const c7=te("ZodNullable",(e,t)=>{HZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>nI(e,n,i,o),e.unwrap=()=>e._zod.def.innerType});function sw(e){return new c7({type:"nullable",innerType:e})}const f7=te("ZodDefault",(e,t)=>{FZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>iI(e,n,i,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function d7(e,t){return new f7({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():sE(t)}})}const h7=te("ZodPrefault",(e,t)=>{qZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>aI(e,n,i,o),e.unwrap=()=>e._zod.def.innerType});function m7(e,t){return new h7({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():sE(t)}})}const AE=te("ZodNonOptional",(e,t)=>{GZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>rI(e,n,i,o),e.unwrap=()=>e._zod.def.innerType});function p7(e,t){return new AE({type:"nonoptional",innerType:e,...Ee(t)})}const g7=te("ZodCatch",(e,t)=>{YZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>oI(e,n,i,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function y7(e,t){return new g7({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const x7=te("ZodPipe",(e,t)=>{XZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>sI(e,n,i,o),e.in=t.in,e.out=t.out});function lw(e,t){return new x7({type:"pipe",in:e,out:t})}const v7=te("ZodReadonly",(e,t)=>{KZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>lI(e,n,i,o),e.unwrap=()=>e._zod.def.innerType});function b7(e){return new v7({type:"readonly",innerType:e})}const S7=te("ZodCustom",(e,t)=>{JZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>KB(e,n)});function w7(e,t={}){return PB(S7,e,t)}function k7(e){return ZB(e)}const z7=[{id:"general",label:"General"},{id:"llm",label:"LLM"},{id:"audio",label:"Audio"},{id:"channels",label:"Channels"},{id:"ui",label:"Interface"},{id:"logging",label:"Logging"}];function _7(){const{data:e,error:t}=pa("/api/config",ic.fetchConfig),{data:n}=pa("/api/config/sati",ic.getSatiConfig),[i,o]=E.useState(null),[u,l]=E.useState(null),[f,d]=E.useState("general"),[h,p]=E.useState(!1),[y,x]=E.useState({}),[b,_]=E.useState(null);E.useEffect(()=>{e&&!i&&o(e)},[e]),E.useEffect(()=>{n&&!u&&l(n)},[n]);const z=JSON.stringify(e)!==JSON.stringify(i)||JSON.stringify(n)!==JSON.stringify(u),A=(R,L)=>{if(!i)return;const $=JSON.parse(JSON.stringify(i));let q=$;for(let P=0;P<R.length-1;P++)q=q[R[P]];q[R[R.length-1]]=L,o($);try{n8.parse($),x({})}catch(P){if(P instanceof yI){const K={};P.errors.forEach(ie=>{const ne=ie.path.join(".");K[ne]=ie.message}),x(K)}}},j=(R,L)=>{u&&l({...u,[R]:L})},N=()=>{!i||!u||l({...u,provider:i.llm.provider,model:i.llm.model,api_key:i.llm.api_key})},T=async()=>{if(i){p(!0),_(null);try{await ic.updateConfig(i),u&&await ic.updateSatiConfig(u),Rm("/api/config"),Rm("/api/config/sati"),_({type:"success",message:"Settings saved successfully. Restart Morpheus daemon for changes to take effect."})}catch(R){if(_({type:"error",message:R.message}),R.details&&Array.isArray(R.details)){const L={};R.details.forEach($=>{const q=$.path.join(".");L[q]=$.message}),x(L)}}finally{p(!1)}}};return t?v.jsx("div",{className:"p-8 text-red-500",children:"Failed to load configuration"}):i?v.jsxs("div",{className:"max-w-4xl mx-auto p-0 md:p-6 space-y-6",children:[v.jsxs("div",{className:"flex justify-between items-center",children:[v.jsx("h1",{className:"text-2xl font-bold text-azure-primary dark:text-matrix-highlight",children:"Zaion Settings"}),v.jsx("button",{onClick:T,disabled:!z||Object.keys(y).length>0||h,className:`px-4 py-2 rounded font-medium transition-colors ${z&&Object.keys(y).length===0?"bg-azure-primary text-white hover:bg-azure-active dark:bg-matrix-highlight dark:text-black dark:hover:bg-matrix-highlight/90":"bg-azure-border text-azure-text-secondary cursor-not-allowed dark:bg-matrix-primary/50 dark:text-matrix-highlight/50"}`,children:h?"Saving...":"Save Changes"})]}),b&&v.jsx("div",{className:`p-4 rounded border ${b.type==="success"?"border-azure-primary text-azure-primary bg-azure-primary/10 dark:border-matrix-highlight dark:text-matrix-highlight dark:bg-matrix-highlight/10":"border-red-500 text-red-500 bg-red-900/10"}`,children:b.message}),v.jsx("div",{className:"overflow-x-auto py-1 hide-scrollbar",children:v.jsx("div",{className:"flex space-x-1 border-b border-azure-border dark:border-matrix-primary pb-px min-w-max",children:z7.map(R=>v.jsx("button",{onClick:()=>d(R.id),className:`px-4 py-2 text-sm font-medium rounded-t-md transition-colors flex-shrink-0 ${f===R.id?"bg-azure-surface/50 text-azure-primary border-t border-x border-azure-border dark:bg-matrix-primary/20 dark:text-matrix-highlight dark:border-t dark:border-x dark:border-matrix-primary":"text-azure-text-secondary hover:text-azure-primary dark:text-matrix-secondary dark:hover:text-matrix-highlight"}`,children:R.label},R.id))})}),v.jsxs("div",{className:"space-y-6",children:[f==="general"&&v.jsxs(aa,{title:"Agent Identity",children:[v.jsx(Xn,{label:"Agent Name",value:i.agent.name,onChange:R=>A(["agent","name"],R.target.value),error:y["agent.name"]}),v.jsx(Xn,{label:"Personality",value:i.agent.personality,onChange:R=>A(["agent","personality"],R.target.value),error:y["agent.personality"]})]}),f==="llm"&&v.jsxs(v.Fragment,{children:[v.jsxs(aa,{title:"Oracle Agent",children:[v.jsx(rc,{label:"Provider",value:i.llm.provider,onChange:R=>A(["llm","provider"],R.target.value),options:[{label:"OpenAI",value:"openai"},{label:"Anthropic",value:"anthropic"},{label:"OpenRouter",value:"openrouter"},{label:"Ollama",value:"ollama"},{label:"Google Gemini",value:"gemini"}],error:y["llm.provider"]}),v.jsx(Xn,{label:"Model Name",value:i.llm.model,onChange:R=>A(["llm","model"],R.target.value),error:y["llm.model"]}),v.jsx(uo,{label:"Temperature",value:i.llm.temperature,onChange:R=>A(["llm","temperature"],parseFloat(R.target.value)),step:.1,min:0,max:1,error:y["llm.temperature"]}),v.jsx(uo,{label:"Max Tokens",value:i.llm.max_tokens??"",onChange:R=>A(["llm","max_tokens"],R.target.value?parseInt(R.target.value):void 0),min:1,error:y["llm.max_tokens"],helperText:"Maximum tokens per response. Leave empty for model default."}),v.jsx(uo,{label:"Context Window (Messages)",value:i.llm.context_window??100,onChange:R=>A(["llm","context_window"],parseInt(R.target.value)),min:1,step:1,error:y["llm.context_window"],helperText:"Number of past interactions to load into LLM context (e.g., 100)."}),v.jsx(Xn,{label:"API Key",type:"password",value:i.llm.api_key||"",onChange:R=>A(["llm","api_key"],R.target.value),placeholder:"sk-...",helperText:"Stored locally."}),i.llm.provider==="openrouter"&&v.jsx(Xn,{label:"Base URL",value:i.llm.base_url||"https://openrouter.ai/api/v1",onChange:R=>A(["llm","base_url"],R.target.value),placeholder:"https://openrouter.ai/api/v1",helperText:"Base URL for OpenRouter API"})]}),v.jsxs(aa,{title:"Sati Agent",children:[v.jsx("p",{className:"text-sm text-azure-text-secondary dark:text-matrix-secondary mb-4",children:"Configure the LLM used for memory consolidation"}),v.jsxs("div",{className:"mb-4",children:[v.jsx("button",{type:"button",onClick:N,className:"px-3 py-1.5 text-sm bg-azure-surface border border-azure-border rounded hover:bg-azure-primary/10 dark:bg-matrix-primary/20 dark:border-matrix-primary dark:hover:bg-matrix-highlight/10 text-azure-primary dark:text-matrix-highlight transition-colors",children:"Copy from Oracle Agent"}),v.jsx("p",{className:"text-xs text-azure-text-secondary dark:text-matrix-secondary mt-1",children:"Copy Provider, Model, and API Key from Oracle Agent configuration"})]}),u&&v.jsxs(v.Fragment,{children:[v.jsx(rc,{label:"Provider",value:u.provider,onChange:R=>j("provider",R.target.value),options:[{label:"OpenAI",value:"openai"},{label:"Anthropic",value:"anthropic"},{label:"OpenRouter",value:"openrouter"},{label:"Ollama",value:"ollama"},{label:"Google Gemini",value:"gemini"}]}),v.jsx(Xn,{label:"Model Name",value:u.model,onChange:R=>j("model",R.target.value)}),v.jsx(Xn,{label:"API Key",type:"password",value:u.api_key||"",onChange:R=>j("api_key",R.target.value),placeholder:"sk-...",helperText:"Stored locally."}),u.provider==="openrouter"&&v.jsx(Xn,{label:"Base URL",value:u.base_url||"https://openrouter.ai/api/v1",onChange:R=>j("base_url",R.target.value),placeholder:"https://openrouter.ai/api/v1",helperText:"Base URL for OpenRouter API"}),v.jsx(uo,{label:"Memory Limit",value:u.memory_limit??10,onChange:R=>j("memory_limit",parseInt(R.target.value)),min:1,step:1,helperText:"Number of memory items to retrieve from long-term storage."}),v.jsx(qs,{label:"Enable Archived Sessions in Memory Retrieval",checked:u.enabled_archived_sessions??!0,onChange:R=>j("enabled_archived_sessions",R)})]})]})]}),f==="audio"&&v.jsxs(aa,{title:"Audio Transcription",children:[v.jsx(qs,{label:"Enable Audio",checked:i.audio.enabled,onChange:R=>A(["audio","enabled"],R)}),v.jsx(rc,{label:"Provider",value:i.audio.provider||"google",onChange:R=>A(["audio","provider"],R.target.value),options:[{label:"Google Gemini",value:"google"}],error:y["audio.provider"]}),v.jsx(Xn,{label:"API Key",type:"password",value:i.audio.apiKey||"",onChange:R=>A(["audio","apiKey"],R.target.value),placeholder:"If different from LLM key...",helperText:"Leave empty to use LLM API key if using same provider."}),v.jsx(uo,{label:"Max Duration (Seconds)",value:i.audio.maxDurationSeconds,onChange:R=>A(["audio","maxDurationSeconds"],parseInt(R.target.value)),min:1}),v.jsx(Xn,{label:"Supported Mime Types",value:i.audio.supportedMimeTypes.join(", "),onChange:R=>A(["audio","supportedMimeTypes"],R.target.value.split(",").map(L=>L.trim()).filter(Boolean)),helperText:"Comma separated list (e.g. audio/ogg, audio/mp3)"})]}),f==="channels"&&v.jsxs(aa,{title:"Telegram",children:[v.jsx(qs,{label:"Enable Telegram",checked:i.channels.telegram.enabled,onChange:R=>A(["channels","telegram","enabled"],R)}),i.channels.telegram.enabled&&v.jsxs("div",{className:"space-y-4 mt-4 pl-4 border-l border-matrix-primary",children:[v.jsx(Xn,{label:"Bot Token",type:"password",value:i.channels.telegram.token||"",onChange:R=>A(["channels","telegram","token"],R.target.value)}),v.jsx(Xn,{label:"Allowed Users (comma separated)",value:i.channels.telegram.allowedUsers.join(", "),onChange:R=>A(["channels","telegram","allowedUsers"],R.target.value.split(",").map(L=>L.trim()).filter(Boolean)),helperText:"User IDs allowed to interact with the bot"})]})]}),f==="ui"&&v.jsxs(aa,{title:"Dashboard",children:[v.jsx(qs,{label:"Enable Web UI",checked:i.ui.enabled,onChange:R=>A(["ui","enabled"],R)}),v.jsx(uo,{label:"Port",value:i.ui.port,onChange:R=>A(["ui","port"],parseInt(R.target.value)),disabled:!0,helperText:"Requires restart to change."})]}),f==="logging"&&v.jsxs(aa,{title:"Logging",children:[v.jsx(qs,{label:"Enable Logging",checked:i.logging.enabled,onChange:R=>A(["logging","enabled"],R)}),v.jsx(rc,{label:"Log Level",value:i.logging.level,onChange:R=>A(["logging","level"],R.target.value),options:[{label:"Debug",value:"debug"},{label:"Info",value:"info"},{label:"Warning",value:"warn"},{label:"Error",value:"error"}]})]})]})]}):v.jsx("div",{className:"p-8 text-azure-primary dark:text-matrix-highlight",children:"Loading settings..."})}function E7(){const{data:e}=mN(),[t,n]=E.useState(null),{data:i,mutate:o}=pN(t);return E.useEffect(()=>{!t&&e&&e.length>0&&n(e[0].name)},[e,t]),v.jsxs(Sr.div,{className:"h-full flex flex-col space-y-4 pt-16 md:pt-0",initial:{opacity:0,scale:.98},animate:{opacity:1,scale:1},transition:{duration:.3},children:[v.jsxs("div",{children:[v.jsx("h2",{className:"text-2xl font-bold text-azure-primary dark:text-matrix-highlight",children:"SYSTEM LOGS"}),v.jsx("p",{className:"text-azure-text-secondary dark:text-matrix-secondary opacity-80",children:"View runtime logs."})]}),v.jsxs("div",{className:"flex-1 flex gap-4 overflow-hidden border border-azure-border dark:border-matrix-primary rounded bg-azure-surface dark:bg-zinc-950 p-4",children:[v.jsxs("div",{className:"w-64 flex flex-col gap-2 border-r border-azure-border dark:border-matrix-primary pr-4 overflow-y-auto shrink-0",children:[v.jsx("h3",{className:"font-bold text-azure-text-secondary dark:text-matrix-secondary mb-2 sticky top-0 bg-azure-surface dark:bg-zinc-950",children:"LOG FILES"}),e?.map(u=>v.jsxs("button",{onClick:()=>n(u.name),className:`text-left px-3 py-2 rounded text-sm truncate flex items-center gap-2 group transition-colors ${t===u.name?"bg-azure-active text-azure-primary dark:bg-matrix-primary dark:text-matrix-highlight":"text-azure-text-secondary dark:text-matrix-secondary hover:bg-azure-hover dark:hover:bg-zinc-900 group-hover:text-azure-primary dark:group-hover:text-matrix-highlight"}`,children:[v.jsx(rj,{className:"w-4 h-4 shrink-0"}),v.jsxs("div",{className:"flex flex-col overflow-hidden",children:[v.jsx("span",{className:"truncate font-bold",children:u.name}),v.jsxs("span",{className:"text-xs opacity-70",children:[(u.size/1024).toFixed(1)," KB"]})]})]},u.name))]}),v.jsxs("div",{className:"flex-1 flex flex-col h-full overflow-hidden bg-azure-bg dark:bg-black border border-azure-border dark:border-matrix-primary/50 rounded",children:[v.jsxs("div",{className:"flex justify-between items-center p-2 bg-azure-hover dark:bg-zinc-900 border-b border-azure-border dark:border-matrix-primary/50",children:[v.jsx("span",{className:"text-azure-text-primary dark:text-matrix-highlight font-bold font-mono text-sm",children:t}),v.jsx("button",{onClick:()=>o(),className:"text-azure-text-secondary dark:text-matrix-secondary hover:text-azure-primary dark:hover:text-matrix-highlight transition-colors",children:v.jsx(vj,{className:"w-4 h-4"})})]}),v.jsx("div",{className:"flex-1 overflow-auto p-4 font-mono text-xs whitespace-pre-wrap text-azure-text-primary dark:text-white",children:i?i.lines.join(`
109
+ `):"Select a log file to view content..."})]})]})]})}function T7(){const[e,t]=E.useState(null),[n,i]=E.useState([]),[o,u]=E.useState(!0),[l,f]=E.useState("");if(E.useEffect(()=>{async function p(){try{const[y,x]=await Promise.all([rp.fetchUsageStats(),rp.fetchGroupedUsageStats()]);t(y),i(x)}catch(y){f("Failed to load usage statistics"),console.error(y)}finally{u(!1)}}p()},[]),o)return v.jsx("div",{className:"flex items-center justify-center h-64 text-azure-accent dark:text-matrix-highlight font-mono animate-pulse",children:"LOADING_DATA_STREAM..."});if(l)return v.jsxs("div",{className:"p-4 bg-red-900/20 border border-red-500/50 text-red-500 font-mono rounded",children:["ERROR_ACCESSING_DATABASE: ",l]});const d={hidden:{opacity:0},show:{opacity:1,transition:{staggerChildren:.1}}},h={hidden:{y:20,opacity:0},show:{y:0,opacity:1}};return v.jsxs(Sr.div,{variants:d,initial:"hidden",animate:"show",className:"space-y-6",children:[v.jsx("div",{className:"flex items-center justify-between border-b border-azure-border dark:border-matrix-primary pb-4",children:v.jsxs("div",{children:[v.jsxs("h2",{className:"text-2xl font-bold text-azure-primary dark:text-matrix-highlight font-mono flex items-center gap-2",children:[v.jsx(km,{className:"w-6 h-6"}),"USAGE_ANALYTICS"]}),v.jsx("p",{className:"text-azure-text-muted dark:text-matrix-secondary mt-1 font-mono text-sm",children:"Resource consumption tracking and metrics"})]})}),v.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[v.jsxs(Sr.div,{variants:h,className:"p-6 bg-azure-surface dark:bg-black/40 border border-azure-border dark:border-matrix-primary rounded-lg shadow-sm backdrop-blur-sm",children:[v.jsxs("div",{className:"flex items-center gap-3 mb-2 text-azure-text-muted dark:text-matrix-secondary",children:[v.jsx(sl,{className:"w-5 h-5"}),v.jsx("h3",{className:"font-mono text-sm font-bold uppercase",children:"Total Input Tokens"})]}),v.jsx("p",{className:"text-3xl font-bold text-azure-primary dark:text-matrix-highlight font-mono",children:e?.totalInputTokens.toLocaleString()??0})]}),v.jsxs(Sr.div,{variants:h,className:"p-6 bg-azure-surface dark:bg-black/40 border border-azure-border dark:border-matrix-primary rounded-lg shadow-sm backdrop-blur-sm",children:[v.jsxs("div",{className:"flex items-center gap-3 mb-2 text-azure-text-muted dark:text-matrix-secondary",children:[v.jsx(ej,{className:"w-5 h-5"}),v.jsx("h3",{className:"font-mono text-sm font-bold uppercase",children:"Total Output Tokens"})]}),v.jsx("p",{className:"text-3xl font-bold text-azure-primary dark:text-matrix-highlight font-mono",children:e?.totalOutputTokens.toLocaleString()??0})]})]}),v.jsxs(Sr.div,{variants:h,className:"bg-azure-surface dark:bg-black/40 border border-azure-border dark:border-matrix-primary rounded-lg overflow-hidden backdrop-blur-sm",children:[v.jsx("div",{className:"p-4 border-b border-azure-border dark:border-matrix-primary bg-azure-bg dark:bg-zinc-900/50",children:v.jsx("h3",{className:"text-lg font-bold text-azure-text-primary dark:text-matrix-highlight font-mono uppercase",children:"Usage Breakdown by Model"})}),v.jsx("div",{className:"overflow-x-auto",children:v.jsxs("table",{className:"w-full text-left font-mono text-sm",children:[v.jsx("thead",{className:"bg-azure-bg dark:bg-zinc-900/50 text-azure-text-secondary dark:text-matrix-secondary border-b border-azure-border dark:border-matrix-primary",children:v.jsxs("tr",{children:[v.jsx("th",{className:"p-4",children:"Provider"}),v.jsx("th",{className:"p-4",children:"Model"}),v.jsx("th",{className:"p-4 text-right",children:"Messages"}),v.jsx("th",{className:"p-4 text-right",children:"Input Tokens"}),v.jsx("th",{className:"p-4 text-right",children:"Output Tokens"}),v.jsx("th",{className:"p-4 text-right",children:"Total Tokens"})]})}),v.jsx("tbody",{className:"divide-y divide-azure-border dark:divide-matrix-primary/30",children:n.length===0?v.jsx("tr",{children:v.jsx("td",{colSpan:6,className:"p-8 text-center text-azure-text-muted dark:text-matrix-secondary italic",children:"NO_DATA_AVAILABLE"})}):n.map((p,y)=>v.jsxs("tr",{className:"hover:bg-azure-hover dark:hover:bg-matrix-primary/10 transition-colors",children:[v.jsx("td",{className:"p-4 font-bold text-azure-text-primary dark:text-matrix-highlight",children:p.provider}),v.jsx("td",{className:"p-4 text-azure-text-secondary dark:text-matrix-secondary",children:p.model}),v.jsx("td",{className:"p-4 text-right text-azure-text-primary dark:text-gray-300",children:p.messageCount.toLocaleString()}),v.jsx("td",{className:"p-4 text-right text-azure-text-primary dark:text-gray-300",children:p.totalInputTokens.toLocaleString()}),v.jsx("td",{className:"p-4 text-right text-azure-text-primary dark:text-gray-300",children:p.totalOutputTokens.toLocaleString()}),v.jsx("td",{className:"p-4 text-right font-bold text-azure-text-primary dark:text-matrix-highlight",children:p.totalTokens.toLocaleString()})]},`${p.provider}-${p.model}-${y}`))})]})})]})]})}const C7=()=>{const[e,t]=E.useState(""),[n,i]=E.useState(""),o=Ep(),u=dr(),l=f=>{f.preventDefault(),e&&(i(""),fetch("/api/config",{headers:{"x-architect-pass":e}}).then(async d=>{if(d.ok){localStorage.setItem("morpheus.auth.token",e);const h=u.state?.from?.pathname||"/";o(h,{replace:!0})}else i("Invalid architect password")}).catch(()=>{i("Connection failed")}))};return v.jsx("div",{className:"flex items-center justify-center min-h-screen bg-azure-bg dark:bg-black text-azure-primary dark:text-green-500 font-mono",children:v.jsxs("div",{className:"max-w-md w-full p-8 border border-azure-primary dark:border-green-500 shadow-xl dark:shadow-[0_0_15px_rgba(34,197,94,0.3)] bg-white dark:bg-black rounded-lg dark:rounded-none",children:[v.jsx("h1",{className:"text-2xl font-bold mb-6 text-center tracking-widest uppercase text-azure-primary dark:text-green-500",children:"> The Architect Login"}),v.jsxs("form",{onSubmit:l,className:"space-y-6",children:[v.jsxs("div",{children:[v.jsx("label",{className:"block text-sm mb-2 opacity-70 text-azure-text-secondary dark:text-green-500",children:"ACCESS_PASS:"}),v.jsx("input",{type:"password",value:e,onChange:f=>t(f.target.value),className:"w-full bg-azure-bg dark:bg-black border border-azure-border dark:border-green-800 p-2 focus:outline-none focus:border-azure-primary dark:focus:border-green-500 text-azure-text-primary dark:text-green-500 placeholder-azure-text-secondary/50 dark:placeholder-green-900 rounded dark:rounded-none",placeholder:"••••••••",autoFocus:!0})]}),n&&v.jsxs("div",{className:"text-red-500 text-sm animate-pulse",children:["[!] ERROR: ",n]}),v.jsx("button",{type:"submit",className:"w-full bg-azure-primary hover:bg-azure-active dark:bg-green-900 dark:hover:bg-green-700 text-white dark:text-black font-bold py-2 transition-colors duration-200 uppercase tracking-wider rounded dark:rounded-none",children:"Authenticate"})]}),v.jsx("div",{className:"mt-8 text-[10px] opacity-30 text-center uppercase text-azure-text-secondary dark:text-green-500",children:"Morpheus OS v0.1.5 | Unauthorized access is logged."})]})})},A7=({children:e})=>{const{isAuthenticated:t}=Az(),n=dr();return t?v.jsx(v.Fragment,{children:e}):v.jsx(_w,{to:"/login",state:{from:n},replace:!0})},j7=({className:e,...t})=>v.jsx("div",{className:"relative w-full overflow-auto",children:v.jsx("table",{className:`w-full caption-bottom text-sm ${e}`,...t})}),N7=({...e})=>v.jsx("thead",{...e}),O7=({...e})=>v.jsx("tbody",{...e}),ym=({...e})=>v.jsx("tr",{className:"border-b border-azure-border dark:border-matrix-primary/30 transition-colors hover:bg-azure-hover/50 dark:hover:bg-matrix-primary/10",...e}),co=({className:e,...t})=>v.jsx("th",{className:`h-12 px-4 text-left align-middle font-medium text-azure-text-secondary dark:text-matrix-secondary/70 [&:has([role=checkbox])]:pr-0 ${e}`,...t}),sa=({className:e,...t})=>v.jsx("td",{className:`p-4 align-middle [&:has([role=checkbox])]:pr-0 ${e}`,...t}),uw=({checked:e,onCheckedChange:t,className:n,...i})=>{const o=u=>{t&&t(u.target.checked),i.onChange&&i.onChange(u)};return v.jsx("input",{type:"checkbox",checked:e,onChange:o,className:`h-4 w-4 rounded border-azure-border dark:border-matrix-primary bg-azure-surface dark:bg-zinc-900 text-azure-primary dark:text-matrix-highlight focus:ring-azure-primary dark:focus:ring-matrix-highlight ${n||""}`,...i})},Uc=({className:e,variant:t="default",...n})=>{const o=`inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-zinc-950 focus:ring-offset-2 dark:focus:ring-zinc-300 ${t==="destructive"?"border-transparent bg-red-500 text-zinc-50 dark:bg-red-900 dark:text-zinc-50":t==="secondary"?"border-transparent bg-azure-surface dark:bg-zinc-800 text-azure-text-secondary dark:text-matrix-secondary":t==="outline"?"text-azure-text-primary dark:text-matrix-secondary border-azure-border dark:border-matrix-primary":"border-transparent bg-azure-primary dark:bg-matrix-highlight text-azure-text-inverse dark:text-black"} ${e||""}`;return v.jsx("div",{className:o,...n})},xm=({className:e,...t})=>v.jsx("div",{className:`rounded-lg border border-azure-border dark:border-matrix-primary/30 bg-azure-surface dark:bg-zinc-900 text-azure-text-primary dark:text-matrix-secondary shadow-sm ${e||""}`,...t}),cw=({className:e,...t})=>v.jsx("div",{className:`flex flex-col space-y-1.5 p-6 ${e||""}`,...t}),R7=({className:e,...t})=>v.jsx("h3",{className:`text-2xl font-semibold leading-none tracking-tight ${e||""}`,...t}),vm=({className:e,...t})=>v.jsx("div",{className:`p-6 pt-0 ${e||""}`,...t}),M7=({className:e,variant:t="default",...n})=>{const o=`relative w-full rounded-lg border p-4 ${t==="destructive"?"border-red-500/50 text-red-700 dark:border-red-900/50 dark:text-red-300":"border-azure-border dark:border-matrix-primary"} ${e||""}`;return v.jsx("div",{className:o,...n})},D7=({className:e,...t})=>v.jsx("div",{className:`text-sm [&_p]:leading-relaxed ${e||""}`,...t}),jE=({isOpen:e,onClose:t,title:n,children:i,size:o="md"})=>{if(!e)return null;const u={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl"};return v.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[v.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm",onClick:t}),v.jsxs("div",{className:`relative bg-azure-surface dark:bg-zinc-900 rounded-lg border border-azure-border dark:border-matrix-primary shadow-lg w-full ${u[o]} max-h-[90vh] overflow-hidden flex flex-col`,children:[n&&v.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-azure-border dark:border-matrix-primary",children:[n&&v.jsx("h3",{className:"text-lg font-semibold text-azure-text-primary dark:text-matrix-secondary",children:n}),t&&v.jsx("button",{onClick:t,className:"text-azure-text-secondary dark:text-matrix-tertiary hover:text-azure-text-primary dark:hover:text-matrix-secondary",children:v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:v.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})})]}),v.jsx("div",{className:"overflow-y-auto flex-grow p-6",children:i})]})]})},$7=({isOpen:e,onClose:t,memory:n})=>n?v.jsx(jE,{isOpen:e,onClose:t,title:"Memory Details",size:"lg",children:v.jsxs("div",{className:"space-y-6",children:[v.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx(Cj,{className:"w-4 h-4 text-azure-text-secondary dark:text-matrix-tertiary"}),v.jsx("span",{className:"text-azure-text-secondary dark:text-matrix-tertiary text-sm",children:"Category"})]}),v.jsx("div",{children:v.jsx(Uc,{variant:"outline",children:n.category})}),v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx(Oj,{className:"w-4 h-4 text-azure-text-secondary dark:text-matrix-tertiary"}),v.jsx("span",{className:"text-azure-text-secondary dark:text-matrix-tertiary text-sm",children:"Importance"})]}),v.jsx("div",{children:v.jsx(Uc,{variant:n.importance==="critical"?"destructive":n.importance==="high"?"default":n.importance==="medium"?"secondary":"outline",children:n.importance})}),v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx(Nw,{className:"w-4 h-4 text-azure-text-secondary dark:text-matrix-tertiary"}),v.jsx("span",{className:"text-azure-text-secondary dark:text-matrix-tertiary text-sm",children:"Created"})]}),v.jsx("div",{className:"text-azure-text-primary dark:text-matrix-secondary",children:new Date(n.created_at).toLocaleString()}),v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx(Ow,{className:"w-4 h-4 text-azure-text-secondary dark:text-matrix-tertiary"}),v.jsx("span",{className:"text-azure-text-secondary dark:text-matrix-tertiary text-sm",children:"Updated"})]}),v.jsx("div",{className:"text-azure-text-primary dark:text-matrix-secondary",children:new Date(n.updated_at).toLocaleString()}),v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx(Mw,{className:"w-4 h-4 text-azure-text-secondary dark:text-matrix-tertiary"}),v.jsx("span",{className:"text-azure-text-secondary dark:text-matrix-tertiary text-sm",children:"Access Count"})]}),v.jsx("div",{className:"text-azure-text-primary dark:text-matrix-secondary",children:n.access_count}),v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx(aj,{className:"w-4 h-4 text-azure-text-secondary dark:text-matrix-tertiary"}),v.jsx("span",{className:"text-azure-text-secondary dark:text-matrix-tertiary text-sm",children:"Hash"})]}),v.jsx("div",{className:"text-azure-text-primary dark:text-matrix-secondary break-all text-sm",children:n.hash}),n.source&&v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx(sj,{className:"w-4 h-4 text-azure-text-secondary dark:text-matrix-tertiary"}),v.jsx("span",{className:"text-azure-text-secondary dark:text-matrix-tertiary text-sm",children:"Source"})]}),v.jsx("div",{className:"text-azure-text-primary dark:text-matrix-secondary",children:n.source})]})]}),v.jsxs("div",{children:[v.jsx("h4",{className:"text-azure-text-secondary dark:text-matrix-tertiary text-sm mb-2",children:"Summary"}),v.jsx("p",{className:"text-azure-text-primary dark:text-matrix-secondary bg-azure-surface dark:bg-zinc-800 p-3 rounded-md",children:n.summary})]}),n.details&&v.jsxs("div",{children:[v.jsx("h4",{className:"text-azure-text-secondary dark:text-matrix-tertiary text-sm mb-2",children:"Details"}),v.jsx("div",{className:"text-azure-text-primary dark:text-matrix-secondary bg-azure-surface dark:bg-zinc-800 p-3 rounded-md whitespace-pre-wrap",children:n.details})]}),v.jsx("div",{className:"flex justify-end pt-4",children:v.jsx(Wn,{onClick:t,children:"Close"})})]})}):null,L7=({isOpen:e,onClose:t,onConfirm:n,title:i="Confirm Deletion",message:o="Are you sure you want to delete this item? This action cannot be undone.",confirmButtonText:u="Delete",cancelButtonText:l="Cancel"})=>v.jsx(jE,{isOpen:e,onClose:t,title:i,size:"md",children:v.jsxs("div",{className:"space-y-6",children:[v.jsx("p",{className:"text-azure-text-primary dark:text-matrix-secondary",children:o}),v.jsxs("div",{className:"flex justify-end gap-2",children:[v.jsx(Wn,{variant:"outline",onClick:t,children:l}),v.jsx(Wn,{variant:"destructive",onClick:()=>{n(),t()},children:u})]})]})}),U7=()=>{const[e,t]=E.useState(!1),[n,i]=E.useState(null),o=E.useCallback(d=>(t(!0),i(null),Dt.get(d).then(h=>h).catch(h=>{throw i(h.message||"An error occurred"),h}).finally(()=>{t(!1)})),[]),u=E.useCallback((d,h)=>(t(!0),i(null),Dt.post(d,h).then(p=>p).catch(p=>{throw i(p.message||"An error occurred"),p}).finally(()=>{t(!1)})),[]),l=E.useCallback((d,h)=>(t(!0),i(null),Dt.post(d,h).then(p=>p).catch(p=>{throw i(p.message||"An error occurred"),p}).finally(()=>{t(!1)})),[]),f=E.useCallback(d=>(t(!0),i(null),Dt.delete(d).then(h=>h).catch(h=>{throw i(h.message||"An error occurred"),h}).finally(()=>{t(!1)})),[]);return{get:o,post:u,put:l,del:f,loading:e,error:n}},V7=()=>{const[e,t]=E.useState([]),[n,i]=E.useState(!0),[o,u]=E.useState([]),[l,f]=E.useState(""),[d,h]=E.useState("all"),[p,y]=E.useState("all"),[x,b]=E.useState(null),[_,z]=E.useState(!1),[A,j]=E.useState(null),[N,T]=E.useState(!1),[R,L]=E.useState(null),[$,q]=E.useState(!1),{get:P,del:K,post:ie}=U7();E.useEffect(()=>{ne()},[]);const ne=async()=>{try{i(!0);const C=await P("/sati/memories");t(C),b(null)}catch(C){b("Failed to load memories. Please try again."),console.error("Error fetching memories:",C)}finally{i(!1)}},oe=()=>{o.length===G.length?u([]):u(G.map(C=>C.id))},we=C=>{o.includes(C)?u(o.filter(F=>F!==C)):u([...o,C])},ue=async()=>{if(o.length!==0)try{await ie("/sati/memories/bulk-delete",{ids:o}),await ne(),u([]),z(!1)}catch(C){b("Failed to delete memories. Please try again."),console.error("Error deleting memories:",C)}},re=C=>{L(C),q(!0)},V=async()=>{if(R)try{await K(`/sati/memories/${R}`),await ne()}catch(C){b("Failed to delete memory. Please try again."),console.error("Error deleting memory:",C)}finally{L(null),q(!1)}},X=C=>{j(C),T(!0)},G=e.filter(C=>{const F=C.summary.toLowerCase().includes(l.toLowerCase())||C.details?.toLowerCase().includes(l.toLowerCase())||C.category.toLowerCase().includes(l.toLowerCase()),k=d==="all"||C.category===d,ae=p==="all"||C.importance===p;return F&&k&&ae&&!C.archived}),ve=Array.from(new Set(e.map(C=>C.category))),O=Array.from(new Set(e.map(C=>C.importance)));return n?v.jsx(xm,{className:"w-full",children:v.jsx(vm,{className:"flex justify-center items-center h-64",children:v.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-azure-primary dark:border-matrix-highlight"})})}):v.jsxs("div",{className:"space-y-6",children:[v.jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4",children:[v.jsxs("div",{children:[v.jsx("h1",{className:"text-2xl font-bold text-azure-primary dark:text-matrix-highlight",children:"Sati Memories"}),v.jsx("p",{className:"text-azure-text-muted dark:text-matrix-secondary mt-1",children:"View and manage your long-term memories stored by Sati"})]}),o.length>0&&v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsxs("span",{className:"text-sm text-azure-text-muted dark:text-matrix-secondary",children:[o.length," selected"]}),v.jsxs(Wn,{variant:"destructive",size:"sm",onClick:()=>z(!0),disabled:o.length===0,children:[v.jsx(zm,{className:"w-4 h-4 mr-1"}),"Delete Selected"]})]})]}),x&&v.jsx(M7,{variant:"destructive",children:v.jsx(D7,{children:x})}),v.jsxs(xm,{children:[v.jsx(cw,{className:"border-b border-azure-border dark:border-matrix-primary",children:v.jsxs("div",{className:"flex flex-col lg:flex-row gap-4",children:[v.jsxs("div",{className:"flex flex-col relative w-full",children:[v.jsx(wj,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-azure-text-secondary dark:text-matrix-secondary w-4 h-4"}),v.jsx("input",{type:"text",placeholder:"Search memories...",value:l,onChange:C=>f(C.target.value),className:"w-full pl-10 pr-4 py-2 bg-azure-surface dark:bg-zinc-900 border border-azure-border dark:border-matrix-primary rounded-md text-azure-text-primary dark:text-matrix-secondary focus:outline-none focus:ring-2 focus:ring-azure-primary dark:focus:ring-matrix-highlight"})]}),v.jsxs("div",{className:"flex flex-col sm:flex-row gap-2 w-full",children:[v.jsxs("select",{value:d,onChange:C=>h(C.target.value),className:"px-3 py-2 bg-azure-surface dark:bg-zinc-900 border border-azure-border dark:border-matrix-primary rounded-md text-azure-text-primary dark:text-matrix-secondary focus:outline-none focus:ring-2 focus:ring-azure-primary dark:focus:ring-matrix-highlight flex-grow",children:[v.jsx("option",{value:"all",children:"All Categories"}),ve.map(C=>v.jsx("option",{value:C,children:C},C))]}),v.jsxs("select",{value:p,onChange:C=>y(C.target.value),className:"px-3 py-2 bg-azure-surface dark:bg-zinc-900 border border-azure-border dark:border-matrix-primary rounded-md text-azure-text-primary dark:text-matrix-secondary focus:outline-none focus:ring-2 focus:ring-azure-primary dark:focus:ring-matrix-highlight flex-grow",children:[v.jsx("option",{value:"all",children:"All Importance"}),O.map(C=>v.jsx("option",{value:C,children:C},C))]})]})]})}),v.jsx(vm,{className:"p-0",children:v.jsxs(j7,{children:[v.jsx(N7,{children:v.jsxs(ym,{className:"hover:bg-transparent",children:[v.jsx(co,{className:"w-12",children:v.jsx(uw,{checked:G.length>0&&o.length===G.length,onCheckedChange:oe})}),v.jsx(co,{children:"Summary"}),v.jsx(co,{children:"Category"}),v.jsx(co,{children:"Importance"}),v.jsx(co,{children:"Created"}),v.jsx(co,{className:"w-32",children:"Actions"})]})}),v.jsx(O7,{children:G.length===0?v.jsx(ym,{children:v.jsx(sa,{colSpan:6,className:"text-center py-8 text-azure-text-secondary dark:text-matrix-secondary",children:n?"Loading memories...":"No memories found"})}):G.map(C=>v.jsxs(ym,{children:[v.jsx(sa,{children:v.jsx(uw,{checked:o.includes(C.id),onCheckedChange:()=>we(C.id)})}),v.jsx(sa,{className:"font-medium max-w-xs truncate",children:C.summary}),v.jsx(sa,{children:v.jsx(Uc,{variant:"outline",children:C.category})}),v.jsx(sa,{children:v.jsx(Uc,{variant:C.importance==="critical"?"destructive":C.importance==="high"?"default":C.importance==="medium"?"secondary":"outline",children:C.importance})}),v.jsx(sa,{children:v.jsxs("div",{className:"flex items-center gap-1 text-azure-text-secondary dark:text-matrix-secondary",children:[v.jsx(Nw,{className:"w-4 h-4"}),new Date(C.created_at).toLocaleDateString()]})}),v.jsx(sa,{children:v.jsxs("div",{className:"flex gap-1",children:[v.jsx(Wn,{variant:"ghost",size:"sm",onClick:()=>X(C),className:"text-blue-500 hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300",children:v.jsx(Mw,{className:"w-4 h-4"})}),v.jsx(Wn,{variant:"ghost",size:"sm",onClick:()=>re(C.id),className:"text-red-500 hover:text-red-700 dark:text-red-400 dark:hover:text-red-300",children:v.jsx(zm,{className:"w-4 h-4"})})]})})]},C.id))})]})})]}),_&&v.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:v.jsxs(xm,{className:"w-full max-w-md mx-4",children:[v.jsx(cw,{children:v.jsx(R7,{children:"Delete Memories"})}),v.jsxs(vm,{children:[v.jsxs("p",{className:"mb-4",children:["Are you sure you want to delete ",o.length," ","memory(ies)? This action cannot be undone."]}),v.jsxs("div",{className:"flex justify-end gap-2",children:[v.jsx(Wn,{variant:"outline",onClick:()=>z(!1),children:"Cancel"}),v.jsx(Wn,{variant:"destructive",onClick:ue,children:"Delete"})]})]})]})}),v.jsx($7,{isOpen:N,onClose:()=>T(!1),memory:A}),v.jsx(L7,{isOpen:$,onClose:()=>q(!1),onConfirm:V,title:"Confirm Memory Deletion",message:"Are you sure you want to delete this memory? This action cannot be undone.",confirmButtonText:"Delete Memory",cancelButtonText:"Cancel"})]})},Gs=ca.getInstance(),Ys={fetchServers:async()=>Gs.get("/mcp/servers"),addServer:async(e,t)=>Gs.post("/mcp/servers",{name:e,config:t}),updateServer:async(e,t)=>Gs.put(`/mcp/servers/${encodeURIComponent(e)}`,{config:t}),deleteServer:async e=>Gs.delete(`/mcp/servers/${encodeURIComponent(e)}`),toggleServer:async(e,t)=>Gs.patch(`/mcp/servers/${encodeURIComponent(e)}/toggle`,{enabled:t})},P7=({label:e,values:t,onChange:n,placeholder:i})=>{const o=t.length>0?t:[""],u=(d,h)=>{const p=[...o];p[d]=h,n(p.filter(y=>y.trim().length>0))},l=()=>n([...o,""]),f=d=>{const h=o.filter((p,y)=>y!==d);n(h.filter(p=>p.trim().length>0))};return v.jsxs("div",{className:"space-y-2",children:[v.jsx("div",{className:"text-sm font-semibold text-azure-text-primary dark:text-matrix-highlight",children:e}),o.map((d,h)=>v.jsxs("div",{className:"flex gap-2",children:[v.jsx("input",{className:"flex-1 rounded-md border border-azure-border bg-azure-surface px-3 py-2 text-sm text-azure-text-primary shadow-sm focus:border-azure-primary focus:outline-none dark:border-matrix-primary dark:bg-zinc-950 dark:text-matrix-highlight",value:d,placeholder:i,onChange:p=>u(h,p.target.value)}),v.jsx("button",{type:"button",className:"rounded-md border border-red-300 px-3 py-2 text-sm text-red-600 hover:border-red-400 hover:text-red-500 dark:border-red-900 dark:text-red-400",onClick:()=>f(h),children:"Remove"})]},`${e}-${h}`)),v.jsx("button",{type:"button",className:"text-sm font-semibold text-azure-primary hover:text-azure-secondary dark:text-matrix-highlight hover:dark:text-matrix-secondary",onClick:l,children:"Add argument"})]})},fw=({label:e,values:t,onChange:n,keyPlaceholder:i,valuePlaceholder:o})=>{const u=E.useMemo(()=>t.length>0?t:[{key:"",value:""}],[t]),l=(h,p,y)=>{const x=[...u];x[h]={...x[h],[p]:y},n(x.filter(b=>b.key.trim().length>0||b.value.trim().length>0))},f=()=>n([...u,{key:"",value:""}]),d=h=>{const p=u.filter((y,x)=>x!==h);n(p.filter(y=>y.key.trim().length>0||y.value.trim().length>0))};return v.jsxs("div",{className:"space-y-2",children:[v.jsx("div",{className:"text-sm font-semibold text-azure-text-primary dark:text-matrix-highlight",children:e}),u.map((h,p)=>v.jsxs("div",{className:"grid gap-2 md:grid-cols-5",children:[v.jsx("input",{className:"col-span-2 rounded-md border border-azure-border bg-azure-surface px-3 py-2 text-sm text-azure-text-primary shadow-sm focus:border-azure-primary focus:outline-none dark:border-matrix-primary dark:bg-zinc-950 dark:text-matrix-highlight",value:h.key,placeholder:i,onChange:y=>l(p,"key",y.target.value)}),v.jsx("input",{className:"col-span-2 rounded-md border border-azure-border bg-azure-surface px-3 py-2 text-sm text-azure-text-primary shadow-sm focus:border-azure-primary focus:outline-none dark:border-matrix-primary dark:bg-zinc-950 dark:text-matrix-highlight",value:h.value,placeholder:o,onChange:y=>l(p,"value",y.target.value)}),v.jsx("button",{type:"button",className:"rounded-md border border-red-300 px-3 py-2 text-sm text-red-600 hover:border-red-400 hover:text-red-500 dark:border-red-900 dark:text-red-400",onClick:()=>d(p),children:"Remove"})]},`${e}-${p}`)),v.jsx("button",{type:"button",className:"text-sm font-semibold text-azure-primary hover:text-azure-secondary dark:text-matrix-highlight hover:dark:text-matrix-secondary",onClick:f,children:"Add entry"})]})},Z7=({transport:e,command:t,url:n,args:i,env:o,headers:u,onCommandChange:l,onUrlChange:f,onArgsChange:d,onEnvChange:h,onHeadersChange:p})=>v.jsxs("div",{className:"space-y-4",children:[e==="stdio"&&v.jsxs(v.Fragment,{children:[v.jsxs("label",{className:"block space-y-2 text-sm text-azure-text-primary dark:text-matrix-highlight",children:["Command",v.jsx("input",{className:"w-full rounded-md border border-azure-border bg-azure-surface px-3 py-2 text-sm text-azure-text-primary shadow-sm focus:border-azure-primary focus:outline-none dark:border-matrix-primary dark:bg-zinc-950 dark:text-matrix-highlight",value:t,onChange:y=>l(y.target.value),placeholder:"npx"})]}),v.jsx(P7,{label:"Arguments",values:i,onChange:d,placeholder:"--flag"})]}),e==="http"&&v.jsxs("label",{className:"block space-y-2 text-sm text-azure-text-primary dark:text-matrix-highlight",children:["URL",v.jsx("input",{className:"w-full rounded-md border border-azure-border bg-azure-surface px-3 py-2 text-sm text-azure-text-primary shadow-sm focus:border-azure-primary focus:outline-none dark:border-matrix-primary dark:bg-zinc-950 dark:text-matrix-highlight",value:n,onChange:y=>f(y.target.value),placeholder:"https://example.com/mcp"})]}),v.jsx(fw,{label:"Environment Variables",values:o,onChange:h,keyPlaceholder:"KEY",valuePlaceholder:"value"}),e==="http"&&v.jsx(fw,{label:"Headers",values:u,onChange:p,keyPlaceholder:"Header",valuePlaceholder:"value"})]}),B7=e7({name:gm().min(1,"Name is required"),transport:TE([aw("stdio"),aw("http")]),command:gm().optional(),url:gm().optional()}),fc=e=>e?Object.entries(e).map(([t,n])=>({key:t,value:n})):[],bm=e=>e.reduce((t,n)=>(n.key.trim().length===0||(t[n.key]=n.value),t),{}),I7=({open:e,mode:t,initial:n,onClose:i,onSubmit:o})=>{const[u,l]=E.useState(n?.name??""),[f,d]=E.useState(n?.config.transport??"stdio"),[h,p]=E.useState(n?.config.transport==="stdio"?n.config.command:""),[y,x]=E.useState(n?.config.transport==="http"?n.config.url:""),[b,_]=E.useState(n?.config.args??[]),[z,A]=E.useState(fc(n?.config.env)),[j,N]=E.useState(n?.config.transport==="http"?fc(n.config.headers):[]),[T,R]=E.useState(null);E.useEffect(()=>{e&&(l(n?.name??""),d(n?.config.transport??"stdio"),p(n?.config.transport==="stdio"?n.config.command:""),x(n?.config.transport==="http"?n.config.url:""),_(n?.config.args??[]),A(fc(n?.config.env)),N(n?.config.transport==="http"?fc(n.config.headers):[]),R(null))},[e,n]);const L=t==="create",$=async()=>{const P=B7.safeParse({name:u,transport:f,command:h,url:y});if(!P.success){R(P.error.issues[0]?.message??"Invalid form");return}if(f==="stdio"&&(!h||h.trim().length===0)){R("Command is required for stdio transport.");return}if(f==="http"&&(!y||y.trim().length===0)){R("URL is required for http transport.");return}const K=f==="stdio"?{transport:"stdio",command:h.trim(),args:b.length>0?b:void 0,env:z.length>0?bm(z):void 0}:{transport:"http",url:y.trim(),headers:j.length>0?bm(j):void 0,env:z.length>0?bm(z):void 0};R(null),await o(u.trim(),K)},q=E.useMemo(()=>t==="create"?"Add MCP Server":"Edit MCP Server",[t]);return v.jsx(qc,{open:e,onOpenChange:i,children:v.jsxs(Gc,{children:[v.jsx(Yc,{children:v.jsx(Xc,{children:q})}),v.jsxs("div",{className:"space-y-4",children:[v.jsxs("label",{className:"block space-y-2 text-sm text-azure-text-primary dark:text-matrix-highlight",children:["Name",v.jsx("input",{className:"w-full rounded-md border border-azure-border bg-azure-surface px-3 py-2 text-sm text-azure-text-primary shadow-sm focus:border-azure-primary focus:outline-none disabled:bg-azure-border dark:border-matrix-primary dark:bg-zinc-950 dark:text-matrix-highlight dark:disabled:bg-matrix-primary/50",value:u,onChange:P=>l(P.target.value),placeholder:"coolify",disabled:!L})]}),v.jsxs("label",{className:"block space-y-2 text-sm text-azure-text-primary dark:text-matrix-highlight",children:["Transport",v.jsxs("select",{className:"w-full rounded-md border border-azure-border bg-azure-surface px-3 py-2 text-sm text-azure-text-primary shadow-sm focus:border-azure-primary focus:outline-none dark:border-matrix-primary dark:bg-zinc-950 dark:text-matrix-highlight",value:f,onChange:P=>d(P.target.value),children:[v.jsx("option",{value:"stdio",children:"stdio"}),v.jsx("option",{value:"http",children:"http"})]})]}),v.jsx(Z7,{transport:f,command:h,url:y,args:b,env:z,headers:j,onCommandChange:p,onUrlChange:x,onArgsChange:_,onEnvChange:A,onHeadersChange:N}),T&&v.jsx("div",{className:"rounded-md border border-red-200 bg-red-50 px-3 py-2 text-sm text-red-700 dark:border-red-900 dark:bg-red-950/50 dark:text-red-400",children:T}),v.jsxs("div",{className:"flex justify-end gap-2",children:[v.jsx("button",{type:"button",className:"rounded-md border border-azure-border px-4 py-2 text-sm text-azure-text-primary hover:border-azure-primary hover:text-azure-primary dark:border-matrix-primary dark:text-matrix-secondary hover:dark:border-matrix-highlight hover:dark:text-matrix-highlight",onClick:i,children:"Cancel"}),v.jsx("button",{type:"button",className:"rounded-md bg-azure-primary px-4 py-2 text-sm font-semibold text-white shadow hover:bg-azure-secondary dark:bg-matrix-highlight dark:text-matrix-bg hover:dark:bg-matrix-secondary",onClick:$,children:"Save"})]})]})]})})},H7=({server:e,onEdit:t,onDelete:n,onToggle:i})=>v.jsxs("div",{className:"rounded-2xl border border-azure-border bg-azure-surface/80 p-4 shadow-sm overflow-hidden dark:border-matrix-primary dark:bg-zinc-950/70",children:[v.jsxs("div",{className:"flex items-start justify-between gap-3",children:[v.jsxs("div",{className:"min-w-0 flex-1",children:[v.jsx("div",{className:"text-lg font-semibold text-azure-text-primary break-words dark:text-matrix-highlight",children:e.name}),v.jsx("div",{className:"text-xs uppercase tracking-wide text-azure-text-muted dark:text-matrix-secondary",children:e.config.transport})]}),v.jsx("div",{className:"flex items-center gap-2",children:v.jsx("button",{type:"button",className:`rounded-full px-3 py-1 text-xs font-semibold ${e.enabled?"bg-matrix-highlight dark:text-matrix-primary":"bg-azure-border text-azure-text-secondary dark:bg-matrix-primary/50 dark:text-matrix-secondary"}`,onClick:()=>i(e,!e.enabled),children:e.enabled?"Enabled":"Disabled"})})]}),v.jsxs("div",{className:"mt-4 space-y-2 text-sm text-azure-text-secondary dark:text-matrix-secondary",children:[e.config.transport==="stdio"&&v.jsxs("div",{className:"break-all",children:[v.jsx("span",{className:"font-semibold text-azure-text-primary dark:text-matrix-highlight",children:"Command:"})," ",e.config.command]}),e.config.transport==="http"&&v.jsxs("div",{className:"break-all",children:[v.jsx("span",{className:"font-semibold text-azure-text-primary dark:text-matrix-highlight",children:"URL:"})," ",e.config.url]}),e.config.args&&e.config.args.length>0&&v.jsxs("div",{className:"break-all",children:[v.jsx("span",{className:"font-semibold text-azure-text-primary dark:text-matrix-highlight",children:"Args:"})," ",e.config.args.join(" ")]})]}),v.jsxs("div",{className:"mt-4 flex gap-2",children:[v.jsx("button",{type:"button",className:"rounded-md border border-azure-border px-3 py-2 text-sm text-azure-text-primary hover:border-azure-primary hover:text-azure-primary dark:border-matrix-primary dark:text-matrix-secondary hover:dark:border-matrix-highlight hover:dark:text-matrix-highlight",onClick:()=>t(e),children:"Edit"}),v.jsx("button",{type:"button",className:"rounded-md border border-red-300 px-3 py-2 text-sm text-red-600 hover:border-red-400 hover:text-red-500 dark:border-red-900 dark:text-red-400",onClick:()=>n(e),children:"Delete"})]})]}),F7=()=>{const{data:e,error:t,mutate:n,isLoading:i}=pa("/api/mcp/servers",()=>Ys.fetchServers()),[o,u]=E.useState(""),[l,f]=E.useState("all"),[d,h]=E.useState(!1),[p,y]=E.useState(null),[x,b]=E.useState(!1),[_,z]=E.useState(null),[A,j]=E.useState(null),N=e?.servers??[],T=E.useMemo(()=>N.filter(ie=>{const ne=ie.name.toLowerCase().includes(o.toLowerCase()),oe=l==="all"||ie.config.transport===l;return ne&&oe}),[N,o,l]),R=()=>{y(null),h(!0)},L=ie=>{y(ie),h(!0)},$=async(ie,ne)=>{try{p?await Ys.updateServer(p.name,ne):await Ys.addServer(ie,ne),h(!1),y(null),await n(),j({type:"success",message:"MCPs saved successfully. Restart Morpheus daemon for changes to take effect."})}catch(oe){j({type:"error",message:oe.message||"Failed to save MCP server."})}},q=async ie=>{z(ie),b(!0)},P=async()=>{if(_)try{await Ys.deleteServer(_.name),await n(),b(!1),z(null),j({type:"success",message:"MCPs saved successfully. Restart Morpheus daemon for changes to take effect."})}catch(ie){j({type:"error",message:ie.message||"Failed to delete MCP server."})}},K=async(ie,ne)=>{try{await Ys.toggleServer(ie.name,ne),await n(),j({type:"success",message:"MCPs saved successfully. Restart Morpheus daemon for changes to take effect."})}catch(oe){j({type:"error",message:oe.message||"Failed to toggle MCP server."})}};return v.jsxs("div",{className:"space-y-6",children:[v.jsxs("div",{className:"flex flex-col gap-4 md:flex-row md:items-center md:justify-between",children:[v.jsxs("div",{children:[v.jsx("h1",{className:"text-2xl font-semibold text-azure-primary dark:text-matrix-highlight",children:"MCP Servers"}),v.jsx("p",{className:"text-sm text-azure-text-secondary dark:text-matrix-secondary",children:"Manage MCP servers stored in mcps.json."})]}),v.jsx("button",{type:"button",className:"rounded-md bg-azure-primary px-4 py-2 text-sm font-semibold text-white shadow hover:bg-azure-secondary dark:bg-matrix-highlight dark:text-matrix-bg hover:dark:bg-matrix-secondary",onClick:R,children:"Add Server"})]}),A&&v.jsx("div",{className:`p-4 rounded border ${A.type==="success"?"border-azure-primary text-azure-primary bg-azure-primary/10 dark:border-matrix-highlight dark:text-matrix-highlight dark:bg-matrix-highlight/10":"border-red-500 text-red-500 bg-red-900/10"}`,children:A.message}),v.jsxs("div",{className:"flex flex-col gap-2 md:flex-row md:items-center",children:[v.jsx("input",{className:"w-full rounded-md border border-azure-border bg-azure-surface px-3 py-2 text-sm text-azure-text-primary shadow-sm focus:border-azure-primary focus:outline-none dark:border-matrix-primary dark:bg-zinc-950 dark:text-matrix-highlight",value:o,onChange:ie=>u(ie.target.value),placeholder:"Search by name"}),v.jsxs("select",{className:"rounded-md border border-azure-border bg-azure-surface px-3 py-2 text-sm text-azure-text-primary shadow-sm focus:border-azure-primary focus:outline-none dark:border-matrix-primary dark:bg-zinc-950 dark:text-matrix-highlight",value:l,onChange:ie=>f(ie.target.value),children:[v.jsx("option",{value:"all",children:"All"}),v.jsx("option",{value:"stdio",children:"stdio"}),v.jsx("option",{value:"http",children:"http"})]})]}),i&&v.jsx("div",{className:"text-sm text-azure-text-secondary dark:text-matrix-secondary",children:"Loading MCP servers..."}),t&&v.jsx("div",{className:"text-sm text-red-600 dark:text-red-400",children:"Failed to load MCP servers."}),!i&&T.length===0&&v.jsx("div",{className:"rounded-2xl border border-dashed border-azure-border bg-azure-surface/60 p-6 text-center text-sm text-azure-text-secondary dark:border-matrix-primary dark:bg-zinc-950/60 dark:text-matrix-secondary",children:"No MCP servers found. Add a server to get started."}),v.jsx("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-3",children:T.map(ie=>v.jsx(H7,{server:ie,onEdit:L,onDelete:q,onToggle:K},`${ie.name}-${ie.enabled?"on":"off"}`))}),v.jsx(I7,{open:d,mode:p?"edit":"create",initial:p??void 0,onClose:()=>h(!1),onSubmit:$}),v.jsx(qc,{open:x,onOpenChange:b,children:v.jsxs(Gc,{children:[v.jsx(Yc,{children:v.jsx(Xc,{children:"Confirm Deletion"})}),v.jsxs("div",{className:"space-y-4",children:[v.jsxs("p",{className:"text-sm text-azure-text-secondary dark:text-matrix-secondary",children:["Are you sure you want to delete the MCP server ",v.jsxs("span",{className:"font-semibold text-azure-text-primary dark:text-matrix-highlight",children:['"',_?.name,'"']}),"? This action cannot be undone."]}),v.jsxs("div",{className:"flex justify-end gap-2",children:[v.jsx("button",{type:"button",className:"rounded-md border border-azure-border px-4 py-2 text-sm text-azure-text-primary hover:border-azure-primary hover:text-azure-primary dark:border-matrix-primary dark:text-matrix-secondary hover:dark:border-matrix-highlight hover:dark:text-matrix-highlight",onClick:()=>b(!1),children:"Cancel"}),v.jsx("button",{type:"button",className:"rounded-md bg-red-500 px-4 py-2 text-sm font-semibold text-white shadow hover:bg-red-400 dark:bg-red-600 hover:dark:bg-red-500",onClick:P,children:"Delete"})]})]})]})})]})};function q7(){return v.jsx(bA,{children:v.jsxs(Jb,{children:[v.jsx(ur,{path:"/login",element:v.jsx(C7,{})}),v.jsx(ur,{path:"/*",element:v.jsx(A7,{children:v.jsx(nD,{children:v.jsxs(Jb,{children:[v.jsx(ur,{path:"/",element:v.jsx(aD,{})}),v.jsx(ur,{path:"/chat",element:v.jsx(j6,{})}),v.jsx(ur,{path:"/zaion",element:v.jsx(_7,{})}),v.jsx(ur,{path:"/logs",element:v.jsx(E7,{})}),v.jsx(ur,{path:"/stats",element:v.jsx(T7,{})}),v.jsx(ur,{path:"/sati-memories",element:v.jsx(V7,{})}),v.jsx(ur,{path:"/mcp-servers",element:v.jsx(F7,{})}),v.jsx(ur,{path:"*",element:v.jsx(_w,{to:"/",replace:!0})})]})})})})]})})}eC.createRoot(document.getElementById("root")).render(v.jsx(E.StrictMode,{children:v.jsx(q7,{})}));