morpheus-cli 0.4.0 → 0.4.1
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.
- package/dist/http/api.js +76 -0
- package/dist/runtime/memory/sati/index.js +2 -2
- package/dist/runtime/memory/sati/service.js +3 -2
- package/dist/runtime/memory/sqlite.js +98 -28
- package/dist/runtime/oracle.js +4 -1
- package/dist/runtime/telephonist.js +19 -1
- package/dist/ui/assets/index-CovGlIO5.js +109 -0
- package/dist/ui/assets/index-LrqT6MpO.css +1 -0
- package/dist/ui/index.html +2 -2
- package/dist/ui/sw.js +1 -1
- package/package.json +1 -1
- package/dist/ui/assets/index-CwvCMGLo.css +0 -1
- package/dist/ui/assets/index-D9REy_tK.js +0 -109
|
@@ -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 wp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var kh={exports:{}},Bs={};var Ub;function KT(){if(Ub)return Bs;Ub=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 Bs.Fragment=t,Bs.jsx=n,Bs.jsxs=n,Bs}var Pb;function JT(){return Pb||(Pb=1,kh.exports=KT()),kh.exports}var x=JT(),wh={exports:{}},Te={};var Vb;function QT(){if(Vb)return Te;Vb=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"),v=Symbol.iterator;function b(A){return A===null||typeof A!="object"?null:(A=v&&A[v]||A["@@iterator"],typeof A=="function"?A:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},T=Object.assign,C={};function j(A,q,w){this.props=A,this.context=q,this.refs=C,this.updater=w||E}j.prototype.isReactComponent={},j.prototype.setState=function(A,q){if(typeof A!="object"&&typeof A!="function"&&A!=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,A,q,"setState")},j.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function O(){}O.prototype=j.prototype;function z(A,q,w){this.props=A,this.context=q,this.refs=C,this.updater=w||E}var R=z.prototype=new O;R.constructor=z,T(R,j.prototype),R.isPureReactComponent=!0;var L=Array.isArray;function $(){}var G={H:null,A:null,T:null,S:null},V=Object.prototype.hasOwnProperty;function K(A,q,w){var ie=w.ref;return{$$typeof:e,type:A,key:q,ref:ie!==void 0?ie:null,props:w}}function ue(A,q){return K(A.type,q,A.props)}function re(A){return typeof A=="object"&&A!==null&&A.$$typeof===e}function oe(A){var q={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(w){return q[w]})}var ke=/\/+/g;function le(A,q){return typeof A=="object"&&A!==null&&A.key!=null?oe(""+A.key):q.toString(36)}function ne(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then($,$):(A.status="pending",A.then(function(q){A.status==="pending"&&(A.status="fulfilled",A.value=q)},function(q){A.status==="pending"&&(A.status="rejected",A.reason=q)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function P(A,q,w,ie,ve){var pe=typeof A;(pe==="undefined"||pe==="boolean")&&(A=null);var ge=!1;if(A===null)ge=!0;else switch(pe){case"bigint":case"string":case"number":ge=!0;break;case"object":switch(A.$$typeof){case e:case t:ge=!0;break;case p:return ge=A._init,P(ge(A._payload),q,w,ie,ve)}}if(ge)return ve=ve(A),ge=ie===""?"."+le(A,0):ie,L(ve)?(w="",ge!=null&&(w=ge.replace(ke,"$&/")+"/"),P(ve,q,w,"",function(At){return At})):ve!=null&&(re(ve)&&(ve=ue(ve,w+(ve.key==null||A&&A.key===ve.key?"":(""+ve.key).replace(ke,"$&/")+"/")+ge)),q.push(ve)),1;ge=0;var Ge=ie===""?".":ie+":";if(L(A))for(var De=0;De<A.length;De++)ie=A[De],pe=Ge+le(ie,De),ge+=P(ie,q,w,pe,ve);else if(De=b(A),typeof De=="function")for(A=De.call(A),De=0;!(ie=A.next()).done;)ie=ie.value,pe=Ge+le(ie,De++),ge+=P(ie,q,w,pe,ve);else if(pe==="object"){if(typeof A.then=="function")return P(ne(A),q,w,ie,ve);throw q=String(A),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return ge}function Y(A,q,w){if(A==null)return A;var ie=[],ve=0;return P(A,ie,"","",function(pe){return q.call(w,pe,ve++)}),ie}function Z(A){if(A._status===-1){var q=A._result;q=q(),q.then(function(w){(A._status===0||A._status===-1)&&(A._status=1,A._result=w)},function(w){(A._status===0||A._status===-1)&&(A._status=2,A._result=w)}),A._status===-1&&(A._status=0,A._result=q)}if(A._status===1)return A._result.default;throw A._result}var ce=typeof reportError=="function"?reportError:function(A){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof A=="object"&&A!==null&&typeof A.message=="string"?String(A.message):String(A),error:A});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",A);return}console.error(A)},N={map:Y,forEach:function(A,q,w){Y(A,function(){q.apply(this,arguments)},w)},count:function(A){var q=0;return Y(A,function(){q++}),q},toArray:function(A){return Y(A,function(q){return q})||[]},only:function(A){if(!re(A))throw Error("React.Children.only expected to receive a single React element child.");return A}};return Te.Activity=y,Te.Children=N,Te.Component=j,Te.Fragment=n,Te.Profiler=o,Te.PureComponent=z,Te.StrictMode=i,Te.Suspense=d,Te.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=G,Te.__COMPILER_RUNTIME={__proto__:null,c:function(A){return G.H.useMemoCache(A)}},Te.cache=function(A){return function(){return A.apply(null,arguments)}},Te.cacheSignal=function(){return null},Te.cloneElement=function(A,q,w){if(A==null)throw Error("The argument must be a React element, but you passed "+A+".");var ie=T({},A.props),ve=A.key;if(q!=null)for(pe in q.key!==void 0&&(ve=""+q.key),q)!V.call(q,pe)||pe==="key"||pe==="__self"||pe==="__source"||pe==="ref"&&q.ref===void 0||(ie[pe]=q[pe]);var pe=arguments.length-2;if(pe===1)ie.children=w;else if(1<pe){for(var ge=Array(pe),Ge=0;Ge<pe;Ge++)ge[Ge]=arguments[Ge+2];ie.children=ge}return K(A.type,ve,ie)},Te.createContext=function(A){return A={$$typeof:l,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null},A.Provider=A,A.Consumer={$$typeof:u,_context:A},A},Te.createElement=function(A,q,w){var ie,ve={},pe=null;if(q!=null)for(ie in q.key!==void 0&&(pe=""+q.key),q)V.call(q,ie)&&ie!=="key"&&ie!=="__self"&&ie!=="__source"&&(ve[ie]=q[ie]);var ge=arguments.length-2;if(ge===1)ve.children=w;else if(1<ge){for(var Ge=Array(ge),De=0;De<ge;De++)Ge[De]=arguments[De+2];ve.children=Ge}if(A&&A.defaultProps)for(ie in ge=A.defaultProps,ge)ve[ie]===void 0&&(ve[ie]=ge[ie]);return K(A,pe,ve)},Te.createRef=function(){return{current:null}},Te.forwardRef=function(A){return{$$typeof:f,render:A}},Te.isValidElement=re,Te.lazy=function(A){return{$$typeof:p,_payload:{_status:-1,_result:A},_init:Z}},Te.memo=function(A,q){return{$$typeof:h,type:A,compare:q===void 0?null:q}},Te.startTransition=function(A){var q=G.T,w={};G.T=w;try{var ie=A(),ve=G.S;ve!==null&&ve(w,ie),typeof ie=="object"&&ie!==null&&typeof ie.then=="function"&&ie.then($,ce)}catch(pe){ce(pe)}finally{q!==null&&w.types!==null&&(q.types=w.types),G.T=q}},Te.unstable_useCacheRefresh=function(){return G.H.useCacheRefresh()},Te.use=function(A){return G.H.use(A)},Te.useActionState=function(A,q,w){return G.H.useActionState(A,q,w)},Te.useCallback=function(A,q){return G.H.useCallback(A,q)},Te.useContext=function(A){return G.H.useContext(A)},Te.useDebugValue=function(){},Te.useDeferredValue=function(A,q){return G.H.useDeferredValue(A,q)},Te.useEffect=function(A,q){return G.H.useEffect(A,q)},Te.useEffectEvent=function(A){return G.H.useEffectEvent(A)},Te.useId=function(){return G.H.useId()},Te.useImperativeHandle=function(A,q,w){return G.H.useImperativeHandle(A,q,w)},Te.useInsertionEffect=function(A,q){return G.H.useInsertionEffect(A,q)},Te.useLayoutEffect=function(A,q){return G.H.useLayoutEffect(A,q)},Te.useMemo=function(A,q){return G.H.useMemo(A,q)},Te.useOptimistic=function(A,q){return G.H.useOptimistic(A,q)},Te.useReducer=function(A,q,w){return G.H.useReducer(A,q,w)},Te.useRef=function(A){return G.H.useRef(A)},Te.useState=function(A){return G.H.useState(A)},Te.useSyncExternalStore=function(A,q,w){return G.H.useSyncExternalStore(A,q,w)},Te.useTransition=function(){return G.H.useTransition()},Te.version="19.2.4",Te}var Zb;function Fc(){return Zb||(Zb=1,wh.exports=QT()),wh.exports}var _=Fc();const zp=wp(_);var zh={exports:{}},Is={},_h={exports:{}},Eh={};var Bb;function WT(){return Bb||(Bb=1,(function(e){function t(P,Y){var Z=P.length;P.push(Y);e:for(;0<Z;){var ce=Z-1>>>1,N=P[ce];if(0<o(N,Y))P[ce]=Y,P[Z]=N,Z=ce;else break e}}function n(P){return P.length===0?null:P[0]}function i(P){if(P.length===0)return null;var Y=P[0],Z=P.pop();if(Z!==Y){P[0]=Z;e:for(var ce=0,N=P.length,A=N>>>1;ce<A;){var q=2*(ce+1)-1,w=P[q],ie=q+1,ve=P[ie];if(0>o(w,Z))ie<N&&0>o(ve,w)?(P[ce]=ve,P[ie]=Z,ce=ie):(P[ce]=w,P[q]=Z,ce=q);else if(ie<N&&0>o(ve,Z))P[ce]=ve,P[ie]=Z,ce=ie;else break e}}return Y}function o(P,Y){var Z=P.sortIndex-Y.sortIndex;return Z!==0?Z:P.id-Y.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,v=3,b=!1,E=!1,T=!1,C=!1,j=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,z=typeof setImmediate<"u"?setImmediate:null;function R(P){for(var Y=n(h);Y!==null;){if(Y.callback===null)i(h);else if(Y.startTime<=P)i(h),Y.sortIndex=Y.expirationTime,t(d,Y);else break;Y=n(h)}}function L(P){if(T=!1,R(P),!E)if(n(d)!==null)E=!0,$||($=!0,oe());else{var Y=n(h);Y!==null&&ne(L,Y.startTime-P)}}var $=!1,G=-1,V=5,K=-1;function ue(){return C?!0:!(e.unstable_now()-K<V)}function re(){if(C=!1,$){var P=e.unstable_now();K=P;var Y=!0;try{e:{E=!1,T&&(T=!1,O(G),G=-1),b=!0;var Z=v;try{t:{for(R(P),y=n(d);y!==null&&!(y.expirationTime>P&&ue());){var ce=y.callback;if(typeof ce=="function"){y.callback=null,v=y.priorityLevel;var N=ce(y.expirationTime<=P);if(P=e.unstable_now(),typeof N=="function"){y.callback=N,R(P),Y=!0;break t}y===n(d)&&i(d),R(P)}else i(d);y=n(d)}if(y!==null)Y=!0;else{var A=n(h);A!==null&&ne(L,A.startTime-P),Y=!1}}break e}finally{y=null,v=Z,b=!1}Y=void 0}}finally{Y?oe():$=!1}}}var oe;if(typeof z=="function")oe=function(){z(re)};else if(typeof MessageChannel<"u"){var ke=new MessageChannel,le=ke.port2;ke.port1.onmessage=re,oe=function(){le.postMessage(null)}}else oe=function(){j(re,0)};function ne(P,Y){G=j(function(){P(e.unstable_now())},Y)}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(P){P.callback=null},e.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):V=0<P?Math.floor(1e3/P):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_next=function(P){switch(v){case 1:case 2:case 3:var Y=3;break;default:Y=v}var Z=v;v=Y;try{return P()}finally{v=Z}},e.unstable_requestPaint=function(){C=!0},e.unstable_runWithPriority=function(P,Y){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var Z=v;v=P;try{return Y()}finally{v=Z}},e.unstable_scheduleCallback=function(P,Y,Z){var ce=e.unstable_now();switch(typeof Z=="object"&&Z!==null?(Z=Z.delay,Z=typeof Z=="number"&&0<Z?ce+Z:ce):Z=ce,P){case 1:var N=-1;break;case 2:N=250;break;case 5:N=1073741823;break;case 4:N=1e4;break;default:N=5e3}return N=Z+N,P={id:p++,callback:Y,priorityLevel:P,startTime:Z,expirationTime:N,sortIndex:-1},Z>ce?(P.sortIndex=Z,t(h,P),n(d)===null&&P===n(h)&&(T?(O(G),G=-1):T=!0,ne(L,Z-ce))):(P.sortIndex=N,t(d,P),E||b||(E=!0,$||($=!0,oe()))),P},e.unstable_shouldYield=ue,e.unstable_wrapCallback=function(P){var Y=v;return function(){var Z=v;v=Y;try{return P.apply(this,arguments)}finally{v=Z}}}})(Eh)),Eh}var Ib;function eC(){return Ib||(Ib=1,_h.exports=WT()),_h.exports}var Th={exports:{}},en={};var Hb;function tC(){if(Hb)return en;Hb=1;var e=Fc();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),v=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:v,fetchPriority:b}):p==="script"&&i.d.X(d,{crossOrigin:y,integrity:v,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 Fb;function nC(){if(Fb)return Th.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(),Th.exports=tC(),Th.exports}var qb;function rC(){if(qb)return Is;qb=1;var e=eC(),t=Fc(),n=nC();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,k=m.child;k;){if(k===s){S=!0,s=m,c=g;break}if(k===c){S=!0,c=m,s=g;break}k=k.sibling}if(!S){for(k=g.child;k;){if(k===s){S=!0,s=g,c=m;break}if(k===c){S=!0,c=g,s=m;break}k=k.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,v=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),z=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),L=Symbol.for("react.suspense"),$=Symbol.for("react.suspense_list"),G=Symbol.for("react.memo"),V=Symbol.for("react.lazy"),K=Symbol.for("react.activity"),ue=Symbol.for("react.memo_cache_sentinel"),re=Symbol.iterator;function oe(r){return r===null||typeof r!="object"?null:(r=re&&r[re]||r["@@iterator"],typeof r=="function"?r:null)}var ke=Symbol.for("react.client.reference");function le(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===ke?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case T:return"Fragment";case j:return"Profiler";case C:return"StrictMode";case L:return"Suspense";case $:return"SuspenseList";case K:return"Activity"}if(typeof r=="object")switch(r.$$typeof){case E:return"Portal";case z:return r.displayName||"Context";case O: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 G:return a=r.displayName||null,a!==null?a:le(r.type)||"Memo";case V:a=r._payload,r=r._init;try{return le(r(a))}catch{}}return null}var ne=Array.isArray,P=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z={pending:!1,data:null,method:null,action:null},ce=[],N=-1;function A(r){return{current:r}}function q(r){0>N||(r.current=ce[N],ce[N]=null,N--)}function w(r,a){N++,ce[N]=r.current,r.current=a}var ie=A(null),ve=A(null),pe=A(null),ge=A(null);function Ge(r,a){switch(w(pe,a),w(ve,r),w(ie,null),a.nodeType){case 9:case 11:r=(r=a.documentElement)&&(r=r.namespaceURI)?sb(r):0;break;default:if(r=a.tagName,a=a.namespaceURI)a=sb(a),r=lb(a,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}q(ie),w(ie,r)}function De(){q(ie),q(ve),q(pe)}function At(r){r.memoizedState!==null&&w(ge,r);var a=ie.current,s=lb(a,r.type);a!==s&&(w(ve,r),w(ie,s))}function an(r){ve.current===r&&(q(ie),q(ve)),ge.current===r&&(q(ge),Us._currentValue=Z)}var Un,mr;function Pn(r){if(Un===void 0)try{throw Error()}catch(s){var a=s.stack.trim().match(/\n( *(at )?)/);Un=a&&a[1]||"",mr=-1<s.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+Un+r+mr}var Pi=!1;function Ze(r,a){if(!r||Pi)return"";Pi=!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(F){var H=F}Reflect.construct(r,[],ee)}else{try{ee.call()}catch(F){H=F}r.call(ee.prototype)}}else{try{throw Error()}catch(F){H=F}(ee=r())&&typeof ee.catch=="function"&&ee.catch(function(){})}}catch(F){if(F&&H&&typeof F.stack=="string")return[F.stack,H.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],k=g[1];if(S&&k){var M=S.split(`
|
|
4
|
+
`),I=k.split(`
|
|
5
|
+
`);for(m=c=0;c<M.length&&!M[c].includes("DetermineComponentFrameRoot");)c++;for(;m<I.length&&!I[m].includes("DetermineComponentFrameRoot");)m++;if(c===M.length||m===I.length)for(c=M.length-1,m=I.length-1;1<=c&&0<=m&&M[c]!==I[m];)m--;for(;1<=c&&0<=m;c--,m--)if(M[c]!==I[m]){if(c!==1||m!==1)do if(c--,m--,0>m||M[c]!==I[m]){var X=`
|
|
6
|
+
`+M[c].replace(" at new "," at ");return r.displayName&&X.includes("<anonymous>")&&(X=X.replace("<anonymous>",r.displayName)),X}while(1<=c&&0<=m);break}}}finally{Pi=!1,Error.prepareStackTrace=s}return(s=r?r.displayName||r.name:"")?Pn(s):""}function tt(r,a){switch(r.tag){case 26:case 27:case 5:return Pn(r.type);case 16:return Pn("Lazy");case 13:return r.child!==a&&a!==null?Pn("Suspense Fallback"):Pn("Suspense");case 19:return Pn("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 Pn("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,Vn=e.unstable_cancelCallback,Et=e.unstable_shouldYield,Pt=e.unstable_requestPaint,lt=e.unstable_now,wa=e.unstable_getCurrentPriorityLevel,J=e.unstable_ImmediatePriority,se=e.unstable_UserBlockingPriority,ye=e.unstable_NormalPriority,ze=e.unstable_LowPriority,Pe=e.unstable_IdlePriority,on=e.log,Tn=e.unstable_setDisableYieldValue,sn=null,Vt=null;function mn(r){if(typeof on=="function"&&Tn(r),Vt&&typeof Vt.setStrictMode=="function")try{Vt.setStrictMode(sn,r)}catch{}}var nt=Math.clz32?Math.clz32:$2,Qr=Math.log,or=Math.LN2;function $2(r){return r>>>=0,r===0?32:31-(Qr(r)/or|0)|0}var Rl=256,Ml=262144,Dl=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 $l(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 k=c&134217727;return k!==0?(c=k&~g,c!==0?m=Vi(c):(S&=k,S!==0?m=Vi(S):s||(s=k&~r,s!==0&&(m=Vi(s))))):(k=c&~g,k!==0?m=Vi(k):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 Jo(r,a){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&a)===0}function L2(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 Bg(){var r=Dl;return Dl<<=1,(Dl&62914560)===0&&(Dl=4194304),r}function cf(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 U2(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 k=r.entanglements,M=r.expirationTimes,I=r.hiddenUpdates;for(s=S&~s;0<s;){var X=31-nt(s),ee=1<<X;k[X]=0,M[X]=-1;var H=I[X];if(H!==null)for(I[X]=null,X=0;X<H.length;X++){var F=H[X];F!==null&&(F.lane&=-536870913)}s&=~ee}c!==0&&Ig(r,c,0),g!==0&&m===0&&r.tag!==0&&(r.suspendedLanes|=g&~(S&~a))}function Ig(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 Hg(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 Fg(r,a){var s=a&-a;return s=(s&42)!==0?1:ff(s),(s&(r.suspendedLanes|a))!==0?0:s}function ff(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 df(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function qg(){var r=Y.p;return r!==0?r:(r=window.event,r===void 0?32:Nb(r.type))}function Gg(r,a){var s=Y.p;try{return Y.p=r,a()}finally{Y.p=s}}var Wr=Math.random().toString(36).slice(2),Gt="__reactFiber$"+Wr,pn="__reactProps$"+Wr,za="__reactContainer$"+Wr,hf="__reactEvents$"+Wr,P2="__reactListeners$"+Wr,V2="__reactHandles$"+Wr,Yg="__reactResources$"+Wr,Wo="__reactMarker$"+Wr;function mf(r){delete r[Gt],delete r[pn],delete r[hf],delete r[P2],delete r[V2]}function _a(r){var a=r[Gt];if(a)return a;for(var s=r.parentNode;s;){if(a=s[za]||s[Gt]){if(s=a.alternate,a.child!==null||s!==null&&s.child!==null)for(r=pb(r);r!==null;){if(s=r[Gt])return s;r=pb(r)}return a}r=s,s=r.parentNode}return null}function Ea(r){if(r=r[Gt]||r[za]){var a=r.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return r}return null}function es(r){var a=r.tag;if(a===5||a===26||a===27||a===6)return r.stateNode;throw Error(i(33))}function Ta(r){var a=r[Yg];return a||(a=r[Yg]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function Ft(r){r[Wo]=!0}var Xg=new Set,Kg={};function Zi(r,a){Ca(r,a),Ca(r+"Capture",a)}function Ca(r,a){for(Kg[r]=a,r=0;r<a.length;r++)Xg.add(a[r])}var Z2=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]*$"),Jg={},Qg={};function B2(r){return Je.call(Qg,r)?!0:Je.call(Jg,r)?!1:Z2.test(r)?Qg[r]=!0:(Jg[r]=!0,!1)}function Ll(r,a,s){if(B2(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 Ul(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 Zn(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function Wg(r){var a=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function I2(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 pf(r){if(!r._valueTracker){var a=Wg(r)?"checked":"value";r._valueTracker=I2(r,a,""+r[a])}}function ey(r){if(!r)return!1;var a=r._valueTracker;if(!a)return!0;var s=a.getValue(),c="";return r&&(c=Wg(r)?r.checked?"true":"false":r.value),r=c,r!==s?(a.setValue(r),!0):!1}function Pl(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 H2=/[\n"\\]/g;function Bn(r){return r.replace(H2,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function gf(r,a,s,c,m,g,S,k){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=""+Zn(a)):r.value!==""+Zn(a)&&(r.value=""+Zn(a)):S!=="submit"&&S!=="reset"||r.removeAttribute("value"),a!=null?yf(r,S,Zn(a)):s!=null?yf(r,S,Zn(s)):c!=null&&r.removeAttribute("value"),m==null&&g!=null&&(r.defaultChecked=!!g),m!=null&&(r.checked=m&&typeof m!="function"&&typeof m!="symbol"),k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?r.name=""+Zn(k):r.removeAttribute("name")}function ty(r,a,s,c,m,g,S,k){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)){pf(r);return}s=s!=null?""+Zn(s):"",a=a!=null?""+Zn(a):s,k||a===r.value||(r.value=a),r.defaultValue=a}c=c??m,c=typeof c!="function"&&typeof c!="symbol"&&!!c,r.checked=k?r.checked:!!c,r.defaultChecked=!!c,S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(r.name=S),pf(r)}function yf(r,a,s){a==="number"&&Pl(r.ownerDocument)===r||r.defaultValue===""+s||(r.defaultValue=""+s)}function Aa(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=""+Zn(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 ny(r,a,s){if(a!=null&&(a=""+Zn(a),a!==r.value&&(r.value=a),s==null)){r.defaultValue!==a&&(r.defaultValue=a);return}r.defaultValue=s!=null?""+Zn(s):""}function ry(r,a,s,c){if(a==null){if(c!=null){if(s!=null)throw Error(i(92));if(ne(c)){if(1<c.length)throw Error(i(93));c=c[0]}s=c}s==null&&(s=""),a=s}s=Zn(a),r.defaultValue=s,c=r.textContent,c===s&&c!==""&&c!==null&&(r.value=c),pf(r)}function ja(r,a){if(a){var s=r.firstChild;if(s&&s===r.lastChild&&s.nodeType===3){s.nodeValue=a;return}}r.textContent=a}var F2=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 iy(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||F2.has(a)?a==="float"?r.cssFloat=s:r[a]=(""+s).trim():r[a]=s+"px"}function ay(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&&iy(r,m,c)}else for(var g in a)a.hasOwnProperty(g)&&iy(r,g,a[g])}function xf(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 q2=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"]]),G2=/^[\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 Vl(r){return G2.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function Cr(){}var vf=null;function bf(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Na=null,Oa=null;function oy(r){var a=Ea(r);if(a&&(r=a.stateNode)){var s=r[pn]||null;e:switch(r=a.stateNode,a.type){case"input":if(gf(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="'+Bn(""+a)+'"][type="radio"]'),a=0;a<s.length;a++){var c=s[a];if(c!==r&&c.form===r.form){var m=c[pn]||null;if(!m)throw Error(i(90));gf(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&&ey(c)}break e;case"textarea":ny(r,s.value,s.defaultValue);break e;case"select":a=s.value,a!=null&&Aa(r,!!s.multiple,a,!1)}}}var Sf=!1;function sy(r,a,s){if(Sf)return r(a,s);Sf=!0;try{var c=r(a);return c}finally{if(Sf=!1,(Na!==null||Oa!==null)&&(Tu(),Na&&(a=Na,r=Oa,Oa=Na=null,oy(a),r)))for(a=0;a<r.length;a++)oy(r[a])}}function ts(r,a){var s=r.stateNode;if(s===null)return null;var c=s[pn]||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"),kf=!1;if(Ar)try{var ns={};Object.defineProperty(ns,"passive",{get:function(){kf=!0}}),window.addEventListener("test",ns,ns),window.removeEventListener("test",ns,ns)}catch{kf=!1}var ei=null,wf=null,Zl=null;function ly(){if(Zl)return Zl;var r,a=wf,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 Zl=m.slice(r,1<c?1-c:void 0)}function Bl(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 Il(){return!0}function uy(){return!1}function gn(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 k in r)r.hasOwnProperty(k)&&(s=r[k],this[k]=s?s(g):g[k]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?Il:uy,this.isPropagationStopped=uy,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=Il)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=Il)},persist:function(){},isPersistent:Il}),a}var Bi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Hl=gn(Bi),rs=y({},Bi,{view:0,detail:0}),Y2=gn(rs),zf,_f,is,Fl=y({},rs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Tf,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!==is&&(is&&r.type==="mousemove"?(zf=r.screenX-is.screenX,_f=r.screenY-is.screenY):_f=zf=0,is=r),zf)},movementY:function(r){return"movementY"in r?r.movementY:_f}}),cy=gn(Fl),X2=y({},Fl,{dataTransfer:0}),K2=gn(X2),J2=y({},rs,{relatedTarget:0}),Ef=gn(J2),Q2=y({},Bi,{animationName:0,elapsedTime:0,pseudoElement:0}),W2=gn(Q2),eE=y({},Bi,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),tE=gn(eE),nE=y({},Bi,{data:0}),fy=gn(nE),rE={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},iE={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"},aE={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function oE(r){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(r):(r=aE[r])?!!a[r]:!1}function Tf(){return oE}var sE=y({},rs,{key:function(r){if(r.key){var a=rE[r.key]||r.key;if(a!=="Unidentified")return a}return r.type==="keypress"?(r=Bl(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?iE[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Tf,charCode:function(r){return r.type==="keypress"?Bl(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?Bl(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),lE=gn(sE),uE=y({},Fl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),dy=gn(uE),cE=y({},rs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Tf}),fE=gn(cE),dE=y({},Bi,{propertyName:0,elapsedTime:0,pseudoElement:0}),hE=gn(dE),mE=y({},Fl,{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}),pE=gn(mE),gE=y({},Bi,{newState:0,oldState:0}),yE=gn(gE),xE=[9,13,27,32],Cf=Ar&&"CompositionEvent"in window,as=null;Ar&&"documentMode"in document&&(as=document.documentMode);var vE=Ar&&"TextEvent"in window&&!as,hy=Ar&&(!Cf||as&&8<as&&11>=as),my=" ",py=!1;function gy(r,a){switch(r){case"keyup":return xE.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function yy(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Ra=!1;function bE(r,a){switch(r){case"compositionend":return yy(a);case"keypress":return a.which!==32?null:(py=!0,my);case"textInput":return r=a.data,r===my&&py?null:r;default:return null}}function SE(r,a){if(Ra)return r==="compositionend"||!Cf&&gy(r,a)?(r=ly(),Zl=wf=ei=null,Ra=!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 hy&&a.locale!=="ko"?null:a.data;default:return null}}var kE={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 xy(r){var a=r&&r.nodeName&&r.nodeName.toLowerCase();return a==="input"?!!kE[r.type]:a==="textarea"}function vy(r,a,s,c){Na?Oa?Oa.push(c):Oa=[c]:Na=c,a=Mu(a,"onChange"),0<a.length&&(s=new Hl("onChange","change",null,s,c),r.push({event:s,listeners:a}))}var os=null,ss=null;function wE(r){tb(r,0)}function ql(r){var a=es(r);if(ey(a))return r}function by(r,a){if(r==="change")return a}var Sy=!1;if(Ar){var Af;if(Ar){var jf="oninput"in document;if(!jf){var ky=document.createElement("div");ky.setAttribute("oninput","return;"),jf=typeof ky.oninput=="function"}Af=jf}else Af=!1;Sy=Af&&(!document.documentMode||9<document.documentMode)}function wy(){os&&(os.detachEvent("onpropertychange",zy),ss=os=null)}function zy(r){if(r.propertyName==="value"&&ql(ss)){var a=[];vy(a,ss,r,bf(r)),sy(wE,a)}}function zE(r,a,s){r==="focusin"?(wy(),os=a,ss=s,os.attachEvent("onpropertychange",zy)):r==="focusout"&&wy()}function _E(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return ql(ss)}function EE(r,a){if(r==="click")return ql(a)}function TE(r,a){if(r==="input"||r==="change")return ql(a)}function CE(r,a){return r===a&&(r!==0||1/r===1/a)||r!==r&&a!==a}var Cn=typeof Object.is=="function"?Object.is:CE;function ls(r,a){if(Cn(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)||!Cn(r[m],a[m]))return!1}return!0}function _y(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function Ey(r,a){var s=_y(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=_y(s)}}function Ty(r,a){return r&&a?r===a?!0:r&&r.nodeType===3?!1:a&&a.nodeType===3?Ty(r,a.parentNode):"contains"in r?r.contains(a):r.compareDocumentPosition?!!(r.compareDocumentPosition(a)&16):!1:!1}function Cy(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var a=Pl(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=Pl(r.document)}return a}function Nf(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 AE=Ar&&"documentMode"in document&&11>=document.documentMode,Ma=null,Of=null,us=null,Rf=!1;function Ay(r,a,s){var c=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;Rf||Ma==null||Ma!==Pl(c)||(c=Ma,"selectionStart"in c&&Nf(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}),us&&ls(us,c)||(us=c,c=Mu(Of,"onSelect"),0<c.length&&(a=new Hl("onSelect","select",null,a,s),r.push({event:a,listeners:c}),a.target=Ma)))}function Ii(r,a){var s={};return s[r.toLowerCase()]=a.toLowerCase(),s["Webkit"+r]="webkit"+a,s["Moz"+r]="moz"+a,s}var Da={animationend:Ii("Animation","AnimationEnd"),animationiteration:Ii("Animation","AnimationIteration"),animationstart:Ii("Animation","AnimationStart"),transitionrun:Ii("Transition","TransitionRun"),transitionstart:Ii("Transition","TransitionStart"),transitioncancel:Ii("Transition","TransitionCancel"),transitionend:Ii("Transition","TransitionEnd")},Mf={},jy={};Ar&&(jy=document.createElement("div").style,"AnimationEvent"in window||(delete Da.animationend.animation,delete Da.animationiteration.animation,delete Da.animationstart.animation),"TransitionEvent"in window||delete Da.transitionend.transition);function Hi(r){if(Mf[r])return Mf[r];if(!Da[r])return r;var a=Da[r],s;for(s in a)if(a.hasOwnProperty(s)&&s in jy)return Mf[r]=a[s];return r}var Ny=Hi("animationend"),Oy=Hi("animationiteration"),Ry=Hi("animationstart"),jE=Hi("transitionrun"),NE=Hi("transitionstart"),OE=Hi("transitioncancel"),My=Hi("transitionend"),Dy=new Map,Df="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(" ");Df.push("scrollEnd");function sr(r,a){Dy.set(r,a),Zi(a,[r])}var Gl=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)},In=[],$a=0,$f=0;function Yl(){for(var r=$a,a=$f=$a=0;a<r;){var s=In[a];In[a++]=null;var c=In[a];In[a++]=null;var m=In[a];In[a++]=null;var g=In[a];if(In[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&&$y(s,m,g)}}function Xl(r,a,s,c){In[$a++]=r,In[$a++]=a,In[$a++]=s,In[$a++]=c,$f|=c,r.lanes|=c,r=r.alternate,r!==null&&(r.lanes|=c)}function Lf(r,a,s,c){return Xl(r,a,s,c),Kl(r)}function Fi(r,a){return Xl(r,null,null,a),Kl(r)}function $y(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 Kl(r){if(50<Ns)throw Ns=0,qd=null,Error(i(185));for(var a=r.return;a!==null;)r=a,a=r.return;return r.tag===3?r.stateNode:null}var La={};function RE(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 An(r,a,s,c){return new RE(r,a,s,c)}function Uf(r){return r=r.prototype,!(!r||!r.isReactComponent)}function jr(r,a){var s=r.alternate;return s===null?(s=An(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 Ly(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 Jl(r,a,s,c,m,g){var S=0;if(c=r,typeof r=="function")Uf(r)&&(S=1);else if(typeof r=="string")S=UT(r,s,ie.current)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case K:return r=An(31,s,a,m),r.elementType=K,r.lanes=g,r;case T:return qi(s.children,m,g,a);case C:S=8,m|=24;break;case j:return r=An(12,s,a,m|2),r.elementType=j,r.lanes=g,r;case L:return r=An(13,s,a,m),r.elementType=L,r.lanes=g,r;case $:return r=An(19,s,a,m),r.elementType=$,r.lanes=g,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case z:S=10;break e;case O:S=9;break e;case R:S=11;break e;case G:S=14;break e;case V:S=16,c=null;break e}S=29,s=Error(i(130,r===null?"null":typeof r,"")),c=null}return a=An(S,s,a,m),a.elementType=r,a.type=c,a.lanes=g,a}function qi(r,a,s,c){return r=An(7,r,c,a),r.lanes=s,r}function Pf(r,a,s){return r=An(6,r,null,a),r.lanes=s,r}function Uy(r){var a=An(18,null,null,0);return a.stateNode=r,a}function Vf(r,a,s){return a=An(4,r.children!==null?r.children:[],r.key,a),a.lanes=s,a.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},a}var Py=new WeakMap;function Hn(r,a){if(typeof r=="object"&&r!==null){var s=Py.get(r);return s!==void 0?s:(a={value:r,source:a,stack:st(a)},Py.set(r,a),a)}return{value:r,source:a,stack:st(a)}}var Ua=[],Pa=0,Ql=null,cs=0,Fn=[],qn=0,ti=null,pr=1,gr="";function Nr(r,a){Ua[Pa++]=cs,Ua[Pa++]=Ql,Ql=r,cs=a}function Vy(r,a,s){Fn[qn++]=pr,Fn[qn++]=gr,Fn[qn++]=ti,ti=r;var c=pr;r=gr;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,pr=1<<32-nt(a)+m|s<<m|c,gr=g+r}else pr=1<<g|s<<m|c,gr=r}function Zf(r){r.return!==null&&(Nr(r,1),Vy(r,1,0))}function Bf(r){for(;r===Ql;)Ql=Ua[--Pa],Ua[Pa]=null,cs=Ua[--Pa],Ua[Pa]=null;for(;r===ti;)ti=Fn[--qn],Fn[qn]=null,gr=Fn[--qn],Fn[qn]=null,pr=Fn[--qn],Fn[qn]=null}function Zy(r,a){Fn[qn++]=pr,Fn[qn++]=gr,Fn[qn++]=ti,pr=a.id,gr=a.overflow,ti=r}var Yt=null,ut=null,Ue=!1,ni=null,Gn=!1,If=Error(i(519));function ri(r){var a=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw fs(Hn(a,r)),If}function By(r){var a=r.stateNode,s=r.type,c=r.memoizedProps;switch(a[Gt]=r,a[pn]=c,s){case"dialog":Me("cancel",a),Me("close",a);break;case"iframe":case"object":case"embed":Me("load",a);break;case"video":case"audio":for(s=0;s<Rs.length;s++)Me(Rs[s],a);break;case"source":Me("error",a);break;case"img":case"image":case"link":Me("error",a),Me("load",a);break;case"details":Me("toggle",a);break;case"input":Me("invalid",a),ty(a,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":Me("invalid",a);break;case"textarea":Me("invalid",a),ry(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||ab(a.textContent,s)?(c.popover!=null&&(Me("beforetoggle",a),Me("toggle",a)),c.onScroll!=null&&Me("scroll",a),c.onScrollEnd!=null&&Me("scrollend",a),c.onClick!=null&&(a.onclick=Cr),a=!0):a=!1,a||ri(r,!0)}function Iy(r){for(Yt=r.return;Yt;)switch(Yt.tag){case 5:case 31:case 13:Gn=!1;return;case 27:case 3:Gn=!0;return;default:Yt=Yt.return}}function Va(r){if(r!==Yt)return!1;if(!Ue)return Iy(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")||sh(r.type,r.memoizedProps)),s=!s),s&&ut&&ri(r),Iy(r),a===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(317));ut=mb(r)}else if(a===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(317));ut=mb(r)}else a===27?(a=ut,yi(r.type)?(r=dh,dh=null,ut=r):ut=a):ut=Yt?Xn(r.stateNode.nextSibling):null;return!0}function Gi(){ut=Yt=null,Ue=!1}function Hf(){var r=ni;return r!==null&&(bn===null?bn=r:bn.push.apply(bn,r),ni=null),r}function fs(r){ni===null?ni=[r]:ni.push(r)}var Ff=A(null),Yi=null,Or=null;function ii(r,a,s){w(Ff,a._currentValue),a._currentValue=s}function Rr(r){r._currentValue=Ff.current,q(Ff)}function qf(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 Gf(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 k=g;g=m;for(var M=0;M<a.length;M++)if(k.context===a[M]){g.lanes|=s,k=g.alternate,k!==null&&(k.lanes|=s),qf(g.return,s,r),c||(S=null);break e}g=k.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),qf(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 Za(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 k=m.type;Cn(m.pendingProps.value,S.value)||(r!==null?r.push(k):r=[k])}}else if(m===ge.current){if(S=m.alternate,S===null)throw Error(i(387));S.memoizedState.memoizedState!==m.memoizedState.memoizedState&&(r!==null?r.push(Us):r=[Us])}m=m.return}r!==null&&Gf(a,r,s,c),a.flags|=262144}function Wl(r){for(r=r.firstContext;r!==null;){if(!Cn(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function Xi(r){Yi=r,Or=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function Xt(r){return Hy(Yi,r)}function eu(r,a){return Yi===null&&Xi(r),Hy(r,a)}function Hy(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 ME=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()})}},DE=e.unstable_scheduleCallback,$E=e.unstable_NormalPriority,jt={$$typeof:z,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Yf(){return{controller:new ME,data:new Map,refCount:0}}function ds(r){r.refCount--,r.refCount===0&&DE($E,function(){r.controller.abort()})}var hs=null,Xf=0,Ba=0,Ia=null;function LE(r,a){if(hs===null){var s=hs=[];Xf=0,Ba=Qd(),Ia={status:"pending",value:void 0,then:function(c){s.push(c)}}}return Xf++,a.then(Fy,Fy),a}function Fy(){if(--Xf===0&&hs!==null){Ia!==null&&(Ia.status="fulfilled");var r=hs;hs=null,Ba=0,Ia=null;for(var a=0;a<r.length;a++)(0,r[a])()}}function UE(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 qy=P.S;P.S=function(r,a){Av=lt(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&LE(r,a),qy!==null&&qy(r,a)};var Ki=A(null);function Kf(){var r=Ki.current;return r!==null?r:rt.pooledCache}function tu(r,a){a===null?w(Ki,Ki.current):w(Ki,a.pool)}function Gy(){var r=Kf();return r===null?null:{parent:jt._currentValue,pool:r}}var Ha=Error(i(460)),Jf=Error(i(474)),nu=Error(i(542)),ru={then:function(){}};function Yy(r){return r=r.status,r==="fulfilled"||r==="rejected"}function Xy(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,Jy(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,Jy(r),r}throw Qi=a,Ha}}function Ji(r){try{var a=r._init;return a(r._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(Qi=s,Ha):s}}var Qi=null;function Ky(){if(Qi===null)throw Error(i(459));var r=Qi;return Qi=null,r}function Jy(r){if(r===Ha||r===nu)throw Error(i(483))}var Fa=null,ms=0;function iu(r){var a=ms;return ms+=1,Fa===null&&(Fa=[]),Xy(Fa,r,a)}function ps(r,a){a=a.props.ref,r.ref=a!==void 0?a:null}function au(r,a){throw a.$$typeof===v?Error(i(525)):(r=Object.prototype.toString.call(a),Error(i(31,r==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":r)))}function Qy(r){function a(U,D){if(r){var B=U.deletions;B===null?(U.deletions=[D],U.flags|=16):B.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,B){return U.index=B,r?(B=U.alternate,B!==null?(B=B.index,B<D?(U.flags|=67108866,D):B):(U.flags|=67108866,D)):(U.flags|=1048576,D)}function S(U){return r&&U.alternate===null&&(U.flags|=67108866),U}function k(U,D,B,W){return D===null||D.tag!==6?(D=Pf(B,U.mode,W),D.return=U,D):(D=m(D,B),D.return=U,D)}function M(U,D,B,W){var Se=B.type;return Se===T?X(U,D,B.props.children,W,B.key):D!==null&&(D.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===V&&Ji(Se)===D.type)?(D=m(D,B.props),ps(D,B),D.return=U,D):(D=Jl(B.type,B.key,B.props,null,U.mode,W),ps(D,B),D.return=U,D)}function I(U,D,B,W){return D===null||D.tag!==4||D.stateNode.containerInfo!==B.containerInfo||D.stateNode.implementation!==B.implementation?(D=Vf(B,U.mode,W),D.return=U,D):(D=m(D,B.children||[]),D.return=U,D)}function X(U,D,B,W,Se){return D===null||D.tag!==7?(D=qi(B,U.mode,W,Se),D.return=U,D):(D=m(D,B),D.return=U,D)}function ee(U,D,B){if(typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint")return D=Pf(""+D,U.mode,B),D.return=U,D;if(typeof D=="object"&&D!==null){switch(D.$$typeof){case b:return B=Jl(D.type,D.key,D.props,null,U.mode,B),ps(B,D),B.return=U,B;case E:return D=Vf(D,U.mode,B),D.return=U,D;case V:return D=Ji(D),ee(U,D,B)}if(ne(D)||oe(D))return D=qi(D,U.mode,B,null),D.return=U,D;if(typeof D.then=="function")return ee(U,iu(D),B);if(D.$$typeof===z)return ee(U,eu(U,D),B);au(U,D)}return null}function H(U,D,B,W){var Se=D!==null?D.key:null;if(typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint")return Se!==null?null:k(U,D,""+B,W);if(typeof B=="object"&&B!==null){switch(B.$$typeof){case b:return B.key===Se?M(U,D,B,W):null;case E:return B.key===Se?I(U,D,B,W):null;case V:return B=Ji(B),H(U,D,B,W)}if(ne(B)||oe(B))return Se!==null?null:X(U,D,B,W,null);if(typeof B.then=="function")return H(U,D,iu(B),W);if(B.$$typeof===z)return H(U,D,eu(U,B),W);au(U,B)}return null}function F(U,D,B,W,Se){if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return U=U.get(B)||null,k(D,U,""+W,Se);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case b:return U=U.get(W.key===null?B:W.key)||null,M(D,U,W,Se);case E:return U=U.get(W.key===null?B:W.key)||null,I(D,U,W,Se);case V:return W=Ji(W),F(U,D,B,W,Se)}if(ne(W)||oe(W))return U=U.get(B)||null,X(D,U,W,Se,null);if(typeof W.then=="function")return F(U,D,B,iu(W),Se);if(W.$$typeof===z)return F(U,D,B,eu(D,W),Se);au(D,W)}return null}function fe(U,D,B,W){for(var Se=null,Be=null,xe=D,Ae=D=0,Le=null;xe!==null&&Ae<B.length;Ae++){xe.index>Ae?(Le=xe,xe=null):Le=xe.sibling;var Ie=H(U,xe,B[Ae],W);if(Ie===null){xe===null&&(xe=Le);break}r&&xe&&Ie.alternate===null&&a(U,xe),D=g(Ie,D,Ae),Be===null?Se=Ie:Be.sibling=Ie,Be=Ie,xe=Le}if(Ae===B.length)return s(U,xe),Ue&&Nr(U,Ae),Se;if(xe===null){for(;Ae<B.length;Ae++)xe=ee(U,B[Ae],W),xe!==null&&(D=g(xe,D,Ae),Be===null?Se=xe:Be.sibling=xe,Be=xe);return Ue&&Nr(U,Ae),Se}for(xe=c(xe);Ae<B.length;Ae++)Le=F(xe,U,Ae,B[Ae],W),Le!==null&&(r&&Le.alternate!==null&&xe.delete(Le.key===null?Ae:Le.key),D=g(Le,D,Ae),Be===null?Se=Le:Be.sibling=Le,Be=Le);return r&&xe.forEach(function(ki){return a(U,ki)}),Ue&&Nr(U,Ae),Se}function we(U,D,B,W){if(B==null)throw Error(i(151));for(var Se=null,Be=null,xe=D,Ae=D=0,Le=null,Ie=B.next();xe!==null&&!Ie.done;Ae++,Ie=B.next()){xe.index>Ae?(Le=xe,xe=null):Le=xe.sibling;var ki=H(U,xe,Ie.value,W);if(ki===null){xe===null&&(xe=Le);break}r&&xe&&ki.alternate===null&&a(U,xe),D=g(ki,D,Ae),Be===null?Se=ki:Be.sibling=ki,Be=ki,xe=Le}if(Ie.done)return s(U,xe),Ue&&Nr(U,Ae),Se;if(xe===null){for(;!Ie.done;Ae++,Ie=B.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(xe=c(xe);!Ie.done;Ae++,Ie=B.next())Ie=F(xe,U,Ae,Ie.value,W),Ie!==null&&(r&&Ie.alternate!==null&&xe.delete(Ie.key===null?Ae:Ie.key),D=g(Ie,D,Ae),Be===null?Se=Ie:Be.sibling=Ie,Be=Ie);return r&&xe.forEach(function(XT){return a(U,XT)}),Ue&&Nr(U,Ae),Se}function et(U,D,B,W){if(typeof B=="object"&&B!==null&&B.type===T&&B.key===null&&(B=B.props.children),typeof B=="object"&&B!==null){switch(B.$$typeof){case b:e:{for(var Se=B.key;D!==null;){if(D.key===Se){if(Se=B.type,Se===T){if(D.tag===7){s(U,D.sibling),W=m(D,B.props.children),W.return=U,U=W;break e}}else if(D.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===V&&Ji(Se)===D.type){s(U,D.sibling),W=m(D,B.props),ps(W,B),W.return=U,U=W;break e}s(U,D);break}else a(U,D);D=D.sibling}B.type===T?(W=qi(B.props.children,U.mode,W,B.key),W.return=U,U=W):(W=Jl(B.type,B.key,B.props,null,U.mode,W),ps(W,B),W.return=U,U=W)}return S(U);case E:e:{for(Se=B.key;D!==null;){if(D.key===Se)if(D.tag===4&&D.stateNode.containerInfo===B.containerInfo&&D.stateNode.implementation===B.implementation){s(U,D.sibling),W=m(D,B.children||[]),W.return=U,U=W;break e}else{s(U,D);break}else a(U,D);D=D.sibling}W=Vf(B,U.mode,W),W.return=U,U=W}return S(U);case V:return B=Ji(B),et(U,D,B,W)}if(ne(B))return fe(U,D,B,W);if(oe(B)){if(Se=oe(B),typeof Se!="function")throw Error(i(150));return B=Se.call(B),we(U,D,B,W)}if(typeof B.then=="function")return et(U,D,iu(B),W);if(B.$$typeof===z)return et(U,D,eu(U,B),W);au(U,B)}return typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint"?(B=""+B,D!==null&&D.tag===6?(s(U,D.sibling),W=m(D,B),W.return=U,U=W):(s(U,D),W=Pf(B,U.mode,W),W.return=U,U=W),S(U)):s(U,D)}return function(U,D,B,W){try{ms=0;var Se=et(U,D,B,W);return Fa=null,Se}catch(xe){if(xe===Ha||xe===nu)throw xe;var Be=An(29,xe,null,U.mode);return Be.lanes=W,Be.return=U,Be}}}var Wi=Qy(!0),Wy=Qy(!1),ai=!1;function Qf(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Wf(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=Kl(r),$y(r,null,s),a}return Xl(r,c,a,s),Kl(r)}function gs(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,Hg(r,s)}}function ed(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 td=!1;function ys(){if(td){var r=Ia;if(r!==null)throw r}}function xs(r,a,s,c){td=!1;var m=r.updateQueue;ai=!1;var g=m.firstBaseUpdate,S=m.lastBaseUpdate,k=m.shared.pending;if(k!==null){m.shared.pending=null;var M=k,I=M.next;M.next=null,S===null?g=I:S.next=I,S=M;var X=r.alternate;X!==null&&(X=X.updateQueue,k=X.lastBaseUpdate,k!==S&&(k===null?X.firstBaseUpdate=I:k.next=I,X.lastBaseUpdate=M))}if(g!==null){var ee=m.baseState;S=0,X=I=M=null,k=g;do{var H=k.lane&-536870913,F=H!==k.lane;if(F?($e&H)===H:(c&H)===H){H!==0&&H===Ba&&(td=!0),X!==null&&(X=X.next={lane:0,tag:k.tag,payload:k.payload,callback:null,next:null});e:{var fe=r,we=k;H=a;var et=s;switch(we.tag){case 1:if(fe=we.payload,typeof fe=="function"){ee=fe.call(et,ee,H);break e}ee=fe;break e;case 3:fe.flags=fe.flags&-65537|128;case 0:if(fe=we.payload,H=typeof fe=="function"?fe.call(et,ee,H):fe,H==null)break e;ee=y({},ee,H);break e;case 2:ai=!0}}H=k.callback,H!==null&&(r.flags|=64,F&&(r.flags|=8192),F=m.callbacks,F===null?m.callbacks=[H]:F.push(H))}else F={lane:H,tag:k.tag,payload:k.payload,callback:k.callback,next:null},X===null?(I=X=F,M=ee):X=X.next=F,S|=H;if(k=k.next,k===null){if(k=m.shared.pending,k===null)break;F=k,k=F.next,F.next=null,m.lastBaseUpdate=F,m.shared.pending=null}}while(!0);X===null&&(M=ee),m.baseState=M,m.firstBaseUpdate=I,m.lastBaseUpdate=X,g===null&&(m.shared.lanes=0),di|=S,r.lanes=S,r.memoizedState=ee}}function ex(r,a){if(typeof r!="function")throw Error(i(191,r));r.call(a)}function tx(r,a){var s=r.callbacks;if(s!==null)for(r.callbacks=null,r=0;r<s.length;r++)ex(s[r],a)}var qa=A(null),ou=A(0);function nx(r,a){r=Br,w(ou,r),w(qa,a),Br=r|a.baseLanes}function nd(){w(ou,Br),w(qa,qa.current)}function rd(){Br=ou.current,q(qa),q(ou)}var jn=A(null),Yn=null;function li(r){var a=r.alternate;w(Tt,Tt.current&1),w(jn,r),Yn===null&&(a===null||qa.current!==null||a.memoizedState!==null)&&(Yn=r)}function id(r){w(Tt,Tt.current),w(jn,r),Yn===null&&(Yn=r)}function rx(r){r.tag===22?(w(Tt,Tt.current),w(jn,r),Yn===null&&(Yn=r)):ui()}function ui(){w(Tt,Tt.current),w(jn,jn.current)}function Nn(r){q(jn),Yn===r&&(Yn=null),q(Tt)}var Tt=A(0);function su(r){for(var a=r;a!==null;){if(a.tag===13){var s=a.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||ch(s)||fh(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,Nt=null,lu=!1,Ga=!1,ea=!1,uu=0,vs=0,Ya=null,PE=0;function wt(){throw Error(i(321))}function ad(r,a){if(a===null)return!1;for(var s=0;s<a.length&&s<r.length;s++)if(!Cn(r[s],a[s]))return!1;return!0}function od(r,a,s,c,m,g){return Mr=g,Ce=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,P.H=r===null||r.memoizedState===null?Vx:Sd,ea=!1,g=s(c,m),ea=!1,Ga&&(g=ax(a,s,c,m)),ix(r),g}function ix(r){P.H=ks;var a=Qe!==null&&Qe.next!==null;if(Mr=0,Nt=Qe=Ce=null,lu=!1,vs=0,Ya=null,a)throw Error(i(300));r===null||Ot||(r=r.dependencies,r!==null&&Wl(r)&&(Ot=!0))}function ax(r,a,s,c){Ce=r;var m=0;do{if(Ga&&(Ya=null),vs=0,Ga=!1,25<=m)throw Error(i(301));if(m+=1,Nt=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)}P.H=Zx,g=a(s,c)}while(Ga);return g}function VE(){var r=P.H,a=r.useState()[0];return a=typeof a.then=="function"?bs(a):a,r=r.useState()[0],(Qe!==null?Qe.memoizedState:null)!==r&&(Ce.flags|=1024),a}function sd(){var r=uu!==0;return uu=0,r}function ld(r,a,s){a.updateQueue=r.updateQueue,a.flags&=-2053,r.lanes&=~s}function ud(r){if(lu){for(r=r.memoizedState;r!==null;){var a=r.queue;a!==null&&(a.pending=null),r=r.next}lu=!1}Mr=0,Nt=Qe=Ce=null,Ga=!1,vs=uu=0,Ya=null}function ln(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Nt===null?Ce.memoizedState=Nt=r:Nt=Nt.next=r,Nt}function Ct(){if(Qe===null){var r=Ce.alternate;r=r!==null?r.memoizedState:null}else r=Qe.next;var a=Nt===null?Ce.memoizedState:Nt.next;if(a!==null)Nt=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},Nt===null?Ce.memoizedState=Nt=r:Nt=Nt.next=r}return Nt}function cu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function bs(r){var a=vs;return vs+=1,Ya===null&&(Ya=[]),r=Xy(Ya,r,a),a=Ce,(Nt===null?a.memoizedState:Nt.next)===null&&(a=a.alternate,P.H=a===null||a.memoizedState===null?Vx:Sd),r}function fu(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return bs(r);if(r.$$typeof===z)return Xt(r)}throw Error(i(438,String(r)))}function cd(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=cu(),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]=ue;return a.index++,s}function Dr(r,a){return typeof a=="function"?a(r):a}function du(r){var a=Ct();return fd(a,Qe,r)}function fd(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 k=S=null,M=null,I=a,X=!1;do{var ee=I.lane&-536870913;if(ee!==I.lane?($e&ee)===ee:(Mr&ee)===ee){var H=I.revertLane;if(H===0)M!==null&&(M=M.next={lane:0,revertLane:0,gesture:null,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null}),ee===Ba&&(X=!0);else if((Mr&H)===H){I=I.next,H===Ba&&(X=!0);continue}else ee={lane:0,revertLane:I.revertLane,gesture:null,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null},M===null?(k=M=ee,S=g):M=M.next=ee,Ce.lanes|=H,di|=H;ee=I.action,ea&&s(g,ee),g=I.hasEagerState?I.eagerState:s(g,ee)}else H={lane:ee,revertLane:I.revertLane,gesture:I.gesture,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null},M===null?(k=M=H,S=g):M=M.next=H,Ce.lanes|=ee,di|=ee;I=I.next}while(I!==null&&I!==a);if(M===null?S=g:M.next=k,!Cn(g,r.memoizedState)&&(Ot=!0,X&&(s=Ia,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 dd(r){var a=Ct(),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);Cn(g,a.memoizedState)||(Ot=!0),a.memoizedState=g,a.baseQueue===null&&(a.baseState=g),s.lastRenderedState=g}return[g,c]}function ox(r,a,s){var c=Ce,m=Ct(),g=Ue;if(g){if(s===void 0)throw Error(i(407));s=s()}else s=a();var S=!Cn((Qe||m).memoizedState,s);if(S&&(m.memoizedState=s,Ot=!0),m=m.queue,pd(ux.bind(null,c,m,r),[r]),m.getSnapshot!==a||S||Nt!==null&&Nt.memoizedState.tag&1){if(c.flags|=2048,Xa(9,{destroy:void 0},lx.bind(null,c,m,s,a),null),rt===null)throw Error(i(349));g||(Mr&127)!==0||sx(c,a,s)}return s}function sx(r,a,s){r.flags|=16384,r={getSnapshot:a,value:s},a=Ce.updateQueue,a===null?(a=cu(),Ce.updateQueue=a,a.stores=[r]):(s=a.stores,s===null?a.stores=[r]:s.push(r))}function lx(r,a,s,c){a.value=s,a.getSnapshot=c,cx(a)&&fx(r)}function ux(r,a,s){return s(function(){cx(a)&&fx(r)})}function cx(r){var a=r.getSnapshot;r=r.value;try{var s=a();return!Cn(r,s)}catch{return!0}}function fx(r){var a=Fi(r,2);a!==null&&Sn(a,r,2)}function hd(r){var a=ln();if(typeof r=="function"){var s=r;if(r=s(),ea){mn(!0);try{s()}finally{mn(!1)}}}return a.memoizedState=a.baseState=r,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dr,lastRenderedState:r},a}function dx(r,a,s,c){return r.baseState=s,fd(r,Qe,typeof c=="function"?c:Dr)}function ZE(r,a,s,c,m){if(pu(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)}};P.T!==null?s(!0):g.isTransition=!1,c(g),s=a.pending,s===null?(g.next=a.pending=g,hx(a,g)):(g.next=s.next,a.pending=s.next=g)}}function hx(r,a){var s=a.action,c=a.payload,m=r.state;if(a.isTransition){var g=P.T,S={};P.T=S;try{var k=s(m,c),M=P.S;M!==null&&M(S,k),mx(r,a,k)}catch(I){md(r,a,I)}finally{g!==null&&S.types!==null&&(g.types=S.types),P.T=g}}else try{g=s(m,c),mx(r,a,g)}catch(I){md(r,a,I)}}function mx(r,a,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(c){px(r,a,c)},function(c){return md(r,a,c)}):px(r,a,s)}function px(r,a,s){a.status="fulfilled",a.value=s,gx(a),r.state=s,a=r.pending,a!==null&&(s=a.next,s===a?r.pending=null:(s=s.next,a.next=s,hx(r,s)))}function md(r,a,s){var c=r.pending;if(r.pending=null,c!==null){c=c.next;do a.status="rejected",a.reason=s,gx(a),a=a.next;while(a!==c)}r.action=null}function gx(r){r=r.listeners;for(var a=0;a<r.length;a++)(0,r[a])()}function yx(r,a){return a}function xx(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=Gn;m.nodeType!==8;){if(!g){m=null;break t}if(m=Xn(m.nextSibling),m===null){m=null;break t}}g=m.data,m=g==="F!"||g==="F"?m:null}if(m){ut=Xn(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:yx,lastRenderedState:a},s.queue=c,s=Lx.bind(null,Ce,c),c.dispatch=s,c=hd(!1),g=bd.bind(null,Ce,!1,c.queue),c=ln(),m={state:a,dispatch:null,action:r,pending:null},c.queue=m,s=ZE.bind(null,Ce,m,g,s),m.dispatch=s,c.memoizedState=r,[a,s,!1]}function vx(r){var a=Ct();return bx(a,Qe,r)}function bx(r,a,s){if(a=fd(r,a,yx)[0],r=du(Dr)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var c=bs(a)}catch(S){throw S===Ha?nu:S}else c=a;a=Ct();var m=a.queue,g=m.dispatch;return s!==a.memoizedState&&(Ce.flags|=2048,Xa(9,{destroy:void 0},BE.bind(null,m,s),null)),[c,g,r]}function BE(r,a){r.action=a}function Sx(r){var a=Ct(),s=Qe;if(s!==null)return bx(a,s,r);Ct(),a=a.memoizedState,s=Ct();var c=s.queue.dispatch;return s.memoizedState=r,[a,c,!1]}function Xa(r,a,s,c){return r={tag:r,create:s,deps:c,inst:a,next:null},a=Ce.updateQueue,a===null&&(a=cu(),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 kx(){return Ct().memoizedState}function hu(r,a,s,c){var m=ln();Ce.flags|=r,m.memoizedState=Xa(1|a,{destroy:void 0},s,c===void 0?null:c)}function mu(r,a,s,c){var m=Ct();c=c===void 0?null:c;var g=m.memoizedState.inst;Qe!==null&&c!==null&&ad(c,Qe.memoizedState.deps)?m.memoizedState=Xa(a,g,s,c):(Ce.flags|=r,m.memoizedState=Xa(1|a,g,s,c))}function wx(r,a){hu(8390656,8,r,a)}function pd(r,a){mu(2048,8,r,a)}function IE(r){Ce.flags|=4;var a=Ce.updateQueue;if(a===null)a=cu(),Ce.updateQueue=a,a.events=[r];else{var s=a.events;s===null?a.events=[r]:s.push(r)}}function zx(r){var a=Ct().memoizedState;return IE({ref:a,nextImpl:r}),function(){if((He&2)!==0)throw Error(i(440));return a.impl.apply(void 0,arguments)}}function _x(r,a){return mu(4,2,r,a)}function Ex(r,a){return mu(4,4,r,a)}function Tx(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 Cx(r,a,s){s=s!=null?s.concat([r]):null,mu(4,4,Tx.bind(null,a,r),s)}function gd(){}function Ax(r,a){var s=Ct();a=a===void 0?null:a;var c=s.memoizedState;return a!==null&&ad(a,c[1])?c[0]:(s.memoizedState=[r,a],r)}function jx(r,a){var s=Ct();a=a===void 0?null:a;var c=s.memoizedState;if(a!==null&&ad(a,c[1]))return c[0];if(c=r(),ea){mn(!0);try{r()}finally{mn(!1)}}return s.memoizedState=[c,a],c}function yd(r,a,s){return s===void 0||(Mr&1073741824)!==0&&($e&261930)===0?r.memoizedState=a:(r.memoizedState=s,r=Nv(),Ce.lanes|=r,di|=r,s)}function Nx(r,a,s,c){return Cn(s,a)?s:qa.current!==null?(r=yd(r,s,c),Cn(r,a)||(Ot=!0),r):(Mr&42)===0||(Mr&1073741824)!==0&&($e&261930)===0?(Ot=!0,r.memoizedState=s):(r=Nv(),Ce.lanes|=r,di|=r,a)}function Ox(r,a,s,c,m){var g=Y.p;Y.p=g!==0&&8>g?g:8;var S=P.T,k={};P.T=k,bd(r,!1,a,s);try{var M=m(),I=P.S;if(I!==null&&I(k,M),M!==null&&typeof M=="object"&&typeof M.then=="function"){var X=UE(M,c);Ss(r,a,X,Mn(r))}else Ss(r,a,c,Mn(r))}catch(ee){Ss(r,a,{then:function(){},status:"rejected",reason:ee},Mn())}finally{Y.p=g,S!==null&&k.types!==null&&(S.types=k.types),P.T=S}}function HE(){}function xd(r,a,s,c){if(r.tag!==5)throw Error(i(476));var m=Rx(r).queue;Ox(r,m,a,Z,s===null?HE:function(){return Mx(r),s(c)})}function Rx(r){var a=r.memoizedState;if(a!==null)return a;a={memoizedState:Z,baseState:Z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dr,lastRenderedState:Z},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 Mx(r){var a=Rx(r);a.next===null&&(a=r.alternate.memoizedState),Ss(r,a.next.queue,{},Mn())}function vd(){return Xt(Us)}function Dx(){return Ct().memoizedState}function $x(){return Ct().memoizedState}function FE(r){for(var a=r.return;a!==null;){switch(a.tag){case 24:case 3:var s=Mn();r=oi(s);var c=si(a,r,s);c!==null&&(Sn(c,a,s),gs(c,a,s)),a={cache:Yf()},r.payload=a;return}a=a.return}}function qE(r,a,s){var c=Mn();s={lane:c,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},pu(r)?Ux(a,s):(s=Lf(r,a,s,c),s!==null&&(Sn(s,r,c),Px(s,a,c)))}function Lx(r,a,s){var c=Mn();Ss(r,a,s,c)}function Ss(r,a,s,c){var m={lane:c,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(pu(r))Ux(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,k=g(S,s);if(m.hasEagerState=!0,m.eagerState=k,Cn(k,S))return Xl(r,a,m,0),rt===null&&Yl(),!1}catch{}if(s=Lf(r,a,m,c),s!==null)return Sn(s,r,c),Px(s,a,c),!0}return!1}function bd(r,a,s,c){if(c={lane:2,revertLane:Qd(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},pu(r)){if(a)throw Error(i(479))}else a=Lf(r,s,c,2),a!==null&&Sn(a,r,2)}function pu(r){var a=r.alternate;return r===Ce||a!==null&&a===Ce}function Ux(r,a){Ga=lu=!0;var s=r.pending;s===null?a.next=a:(a.next=s.next,s.next=a),r.pending=a}function Px(r,a,s){if((s&4194048)!==0){var c=a.lanes;c&=r.pendingLanes,s|=c,a.lanes=s,Hg(r,s)}}var ks={readContext:Xt,use:fu,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};ks.useEffectEvent=wt;var Vx={readContext:Xt,use:fu,useCallback:function(r,a){return ln().memoizedState=[r,a===void 0?null:a],r},useContext:Xt,useEffect:wx,useImperativeHandle:function(r,a,s){s=s!=null?s.concat([r]):null,hu(4194308,4,Tx.bind(null,a,r),s)},useLayoutEffect:function(r,a){return hu(4194308,4,r,a)},useInsertionEffect:function(r,a){hu(4,2,r,a)},useMemo:function(r,a){var s=ln();a=a===void 0?null:a;var c=r();if(ea){mn(!0);try{r()}finally{mn(!1)}}return s.memoizedState=[c,a],c},useReducer:function(r,a,s){var c=ln();if(s!==void 0){var m=s(a);if(ea){mn(!0);try{s(a)}finally{mn(!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=qE.bind(null,Ce,r),[c.memoizedState,r]},useRef:function(r){var a=ln();return r={current:r},a.memoizedState=r},useState:function(r){r=hd(r);var a=r.queue,s=Lx.bind(null,Ce,a);return a.dispatch=s,[r.memoizedState,s]},useDebugValue:gd,useDeferredValue:function(r,a){var s=ln();return yd(s,r,a)},useTransition:function(){var r=hd(!1);return r=Ox.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||sx(c,a,s)}m.memoizedState=s;var g={value:s,getSnapshot:a};return m.queue=g,wx(ux.bind(null,c,g,r),[r]),c.flags|=2048,Xa(9,{destroy:void 0},lx.bind(null,c,g,s,a),null),s},useId:function(){var r=ln(),a=rt.identifierPrefix;if(Ue){var s=gr,c=pr;s=(c&~(1<<32-nt(c)-1)).toString(32)+s,a="_"+a+"R_"+s,s=uu++,0<s&&(a+="H"+s.toString(32)),a+="_"}else s=PE++,a="_"+a+"r_"+s.toString(32)+"_";return r.memoizedState=a},useHostTransitionStatus:vd,useFormState:xx,useActionState:xx,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=bd.bind(null,Ce,!0,s),s.dispatch=a,[r,a]},useMemoCache:cd,useCacheRefresh:function(){return ln().memoizedState=FE.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)}}},Sd={readContext:Xt,use:fu,useCallback:Ax,useContext:Xt,useEffect:pd,useImperativeHandle:Cx,useInsertionEffect:_x,useLayoutEffect:Ex,useMemo:jx,useReducer:du,useRef:kx,useState:function(){return du(Dr)},useDebugValue:gd,useDeferredValue:function(r,a){var s=Ct();return Nx(s,Qe.memoizedState,r,a)},useTransition:function(){var r=du(Dr)[0],a=Ct().memoizedState;return[typeof r=="boolean"?r:bs(r),a]},useSyncExternalStore:ox,useId:Dx,useHostTransitionStatus:vd,useFormState:vx,useActionState:vx,useOptimistic:function(r,a){var s=Ct();return dx(s,Qe,r,a)},useMemoCache:cd,useCacheRefresh:$x};Sd.useEffectEvent=zx;var Zx={readContext:Xt,use:fu,useCallback:Ax,useContext:Xt,useEffect:pd,useImperativeHandle:Cx,useInsertionEffect:_x,useLayoutEffect:Ex,useMemo:jx,useReducer:dd,useRef:kx,useState:function(){return dd(Dr)},useDebugValue:gd,useDeferredValue:function(r,a){var s=Ct();return Qe===null?yd(s,r,a):Nx(s,Qe.memoizedState,r,a)},useTransition:function(){var r=dd(Dr)[0],a=Ct().memoizedState;return[typeof r=="boolean"?r:bs(r),a]},useSyncExternalStore:ox,useId:Dx,useHostTransitionStatus:vd,useFormState:Sx,useActionState:Sx,useOptimistic:function(r,a){var s=Ct();return Qe!==null?dx(s,Qe,r,a):(s.baseState=r,[r,s.queue.dispatch])},useMemoCache:cd,useCacheRefresh:$x};Zx.useEffectEvent=zx;function kd(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 wd={enqueueSetState:function(r,a,s){r=r._reactInternals;var c=Mn(),m=oi(c);m.payload=a,s!=null&&(m.callback=s),a=si(r,m,c),a!==null&&(Sn(a,r,c),gs(a,r,c))},enqueueReplaceState:function(r,a,s){r=r._reactInternals;var c=Mn(),m=oi(c);m.tag=1,m.payload=a,s!=null&&(m.callback=s),a=si(r,m,c),a!==null&&(Sn(a,r,c),gs(a,r,c))},enqueueForceUpdate:function(r,a){r=r._reactInternals;var s=Mn(),c=oi(s);c.tag=2,a!=null&&(c.callback=a),a=si(r,c,s),a!==null&&(Sn(a,r,s),gs(a,r,s))}};function Bx(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?!ls(s,c)||!ls(m,g):!0}function Ix(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&&wd.enqueueReplaceState(a,a.state,null)}function ta(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 Hx(r){Gl(r)}function Fx(r){console.error(r)}function qx(r){Gl(r)}function gu(r,a){try{var s=r.onUncaughtError;s(a.value,{componentStack:a.stack})}catch(c){setTimeout(function(){throw c})}}function Gx(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 zd(r,a,s){return s=oi(s),s.tag=3,s.payload={element:null},s.callback=function(){gu(r,a)},s}function Yx(r){return r=oi(r),r.tag=3,r}function Xx(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(){Gx(a,s,c)}}var S=s.stateNode;S!==null&&typeof S.componentDidCatch=="function"&&(r.callback=function(){Gx(a,s,c),typeof m!="function"&&(hi===null?hi=new Set([this]):hi.add(this));var k=c.stack;this.componentDidCatch(c.value,{componentStack:k!==null?k:""})})}function GE(r,a,s,c,m){if(s.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(a=s.alternate,a!==null&&Za(a,s,m,!0),s=jn.current,s!==null){switch(s.tag){case 31:case 13:return Yn===null?Cu():s.alternate===null&&zt===0&&(zt=3),s.flags&=-257,s.flags|=65536,s.lanes=m,c===ru?s.flags|=16384:(a=s.updateQueue,a===null?s.updateQueue=new Set([c]):a.add(c),Xd(r,c,m)),!1;case 22:return s.flags|=65536,c===ru?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)),Xd(r,c,m)),!1}throw Error(i(435,s.tag))}return Xd(r,c,m),Cu(),!1}if(Ue)return a=jn.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=m,c!==If&&(r=Error(i(422),{cause:c}),fs(Hn(r,s)))):(c!==If&&(a=Error(i(423),{cause:c}),fs(Hn(a,s))),r=r.current.alternate,r.flags|=65536,m&=-m,r.lanes|=m,c=Hn(c,s),m=zd(r.stateNode,c,m),ed(r,m),zt!==4&&(zt=2)),!1;var g=Error(i(520),{cause:c});if(g=Hn(g,s),js===null?js=[g]:js.push(g),zt!==4&&(zt=2),a===null)return!0;c=Hn(c,s),s=a;do{switch(s.tag){case 3:return s.flags|=65536,r=m&-m,s.lanes|=r,r=zd(s.stateNode,c,r),ed(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=Yx(m),Xx(m,r,s,c),ed(s,m),!1}s=s.return}while(s!==null);return!1}var _d=Error(i(461)),Ot=!1;function Kt(r,a,s,c){a.child=r===null?Wy(a,null,s,c):Wi(a,r.child,s,c)}function Kx(r,a,s,c,m){s=s.render;var g=a.ref;if("ref"in c){var S={};for(var k in c)k!=="ref"&&(S[k]=c[k])}else S=c;return Xi(a),c=od(r,a,s,S,g,m),k=sd(),r!==null&&!Ot?(ld(r,a,m),$r(r,a,m)):(Ue&&k&&Zf(a),a.flags|=1,Kt(r,a,c,m),a.child)}function Jx(r,a,s,c,m){if(r===null){var g=s.type;return typeof g=="function"&&!Uf(g)&&g.defaultProps===void 0&&s.compare===null?(a.tag=15,a.type=g,Qx(r,a,g,c,m)):(r=Jl(s.type,null,c,a,a.mode,m),r.ref=a.ref,r.return=a,a.child=r)}if(g=r.child,!Rd(r,m)){var S=g.memoizedProps;if(s=s.compare,s=s!==null?s:ls,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 Qx(r,a,s,c,m){if(r!==null){var g=r.memoizedProps;if(ls(g,c)&&r.ref===a.ref)if(Ot=!1,a.pendingProps=c=g,Rd(r,m))(r.flags&131072)!==0&&(Ot=!0);else return a.lanes=r.lanes,$r(r,a,m)}return Ed(r,a,s,c,m)}function Wx(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 ev(r,a,g,s,c)}if((s&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},r!==null&&tu(a,g!==null?g.cachePool:null),g!==null?nx(a,g):nd(),rx(a);else return c=a.lanes=536870912,ev(r,a,g!==null?g.baseLanes|s:s,s,c)}else g!==null?(tu(a,g.cachePool),nx(a,g),ui(),a.memoizedState=null):(r!==null&&tu(a,null),nd(),ui());return Kt(r,a,m,s),a.child}function ws(r,a){return r!==null&&r.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function ev(r,a,s,c,m){var g=Kf();return g=g===null?null:{parent:jt._currentValue,pool:g},a.memoizedState={baseLanes:s,cachePool:g},r!==null&&tu(a,null),nd(),rx(a),r!==null&&Za(r,a,c,!0),a.childLanes=m,null}function yu(r,a){return a=vu({mode:a.mode,children:a.children},r.mode),a.ref=r.ref,r.child=a,a.return=r,a}function tv(r,a,s){return Wi(a,r.child,null,s),r=yu(a,a.pendingProps),r.flags|=2,Nn(a),a.memoizedState=null,r}function YE(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=yu(a,c),a.lanes=536870912,ws(null,r);if(id(a),(r=ut)?(r=hb(r,Gn),r=r!==null&&r.data==="&"?r:null,r!==null&&(a.memoizedState={dehydrated:r,treeContext:ti!==null?{id:pr,overflow:gr}:null,retryLane:536870912,hydrationErrors:null},s=Uy(r),s.return=a,a.child=s,Yt=a,ut=null)):r=null,r===null)throw ri(a);return a.lanes=536870912,null}return yu(a,c)}var g=r.memoizedState;if(g!==null){var S=g.dehydrated;if(id(a),m)if(a.flags&256)a.flags&=-257,a=tv(r,a,s);else if(a.memoizedState!==null)a.child=r.child,a.flags|=128,a=null;else throw Error(i(558));else if(Ot||Za(r,a,s,!1),m=(s&r.childLanes)!==0,Ot||m){if(c=rt,c!==null&&(S=Fg(c,s),S!==0&&S!==g.retryLane))throw g.retryLane=S,Fi(r,S),Sn(c,r,S),_d;Cu(),a=tv(r,a,s)}else r=g.treeContext,ut=Xn(S.nextSibling),Yt=a,Ue=!0,ni=null,Gn=!1,r!==null&&Zy(a,r),a=yu(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 xu(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 Ed(r,a,s,c,m){return Xi(a),s=od(r,a,s,c,void 0,m),c=sd(),r!==null&&!Ot?(ld(r,a,m),$r(r,a,m)):(Ue&&c&&Zf(a),a.flags|=1,Kt(r,a,s,m),a.child)}function nv(r,a,s,c,m,g){return Xi(a),a.updateQueue=null,s=ax(a,c,s,m),ix(r),c=sd(),r!==null&&!Ot?(ld(r,a,g),$r(r,a,g)):(Ue&&c&&Zf(a),a.flags|=1,Kt(r,a,s,g),a.child)}function rv(r,a,s,c,m){if(Xi(a),a.stateNode===null){var g=La,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=wd,a.stateNode=g,g._reactInternals=a,g=a.stateNode,g.props=c,g.state=a.memoizedState,g.refs={},Qf(a),S=s.contextType,g.context=typeof S=="object"&&S!==null?Xt(S):La,g.state=a.memoizedState,S=s.getDerivedStateFromProps,typeof S=="function"&&(kd(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&&wd.enqueueReplaceState(g,g.state,null),xs(a,c,g,m),ys(),g.state=a.memoizedState),typeof g.componentDidMount=="function"&&(a.flags|=4194308),c=!0}else if(r===null){g=a.stateNode;var k=a.memoizedProps,M=ta(s,k);g.props=M;var I=g.context,X=s.contextType;S=La,typeof X=="object"&&X!==null&&(S=Xt(X));var ee=s.getDerivedStateFromProps;X=typeof ee=="function"||typeof g.getSnapshotBeforeUpdate=="function",k=a.pendingProps!==k,X||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(k||I!==S)&&Ix(a,g,c,S),ai=!1;var H=a.memoizedState;g.state=H,xs(a,c,g,m),ys(),I=a.memoizedState,k||H!==I||ai?(typeof ee=="function"&&(kd(a,s,ee,c),I=a.memoizedState),(M=ai||Bx(a,s,M,c,H,I,S))?(X||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=I),g.props=c,g.state=I,g.context=S,c=M):(typeof g.componentDidMount=="function"&&(a.flags|=4194308),c=!1)}else{g=a.stateNode,Wf(r,a),S=a.memoizedProps,X=ta(s,S),g.props=X,ee=a.pendingProps,H=g.context,I=s.contextType,M=La,typeof I=="object"&&I!==null&&(M=Xt(I)),k=s.getDerivedStateFromProps,(I=typeof k=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(S!==ee||H!==M)&&Ix(a,g,c,M),ai=!1,H=a.memoizedState,g.state=H,xs(a,c,g,m),ys();var F=a.memoizedState;S!==ee||H!==F||ai||r!==null&&r.dependencies!==null&&Wl(r.dependencies)?(typeof k=="function"&&(kd(a,s,k,c),F=a.memoizedState),(X=ai||Bx(a,s,X,c,H,F,M)||r!==null&&r.dependencies!==null&&Wl(r.dependencies))?(I||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(c,F,M),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(c,F,M)),typeof g.componentDidUpdate=="function"&&(a.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof g.componentDidUpdate!="function"||S===r.memoizedProps&&H===r.memoizedState||(a.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||S===r.memoizedProps&&H===r.memoizedState||(a.flags|=1024),a.memoizedProps=c,a.memoizedState=F),g.props=c,g.state=F,g.context=M,c=X):(typeof g.componentDidUpdate!="function"||S===r.memoizedProps&&H===r.memoizedState||(a.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||S===r.memoizedProps&&H===r.memoizedState||(a.flags|=1024),c=!1)}return g=c,xu(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=Wi(a,r.child,null,m),a.child=Wi(a,null,s,m)):Kt(r,a,s,m),a.memoizedState=g.state,r=a.child):r=$r(r,a,m),r}function iv(r,a,s,c){return Gi(),a.flags|=256,Kt(r,a,s,c),a.child}var Td={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Cd(r){return{baseLanes:r,cachePool:Gy()}}function Ad(r,a,s){return r=r!==null?r.childLanes&~s:0,a&&(r|=Rn),r}function av(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:(Tt.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=hb(r,Gn),r=r!==null&&r.data!=="&"?r:null,r!==null&&(a.memoizedState={dehydrated:r,treeContext:ti!==null?{id:pr,overflow:gr}:null,retryLane:536870912,hydrationErrors:null},s=Uy(r),s.return=a,a.child=s,Yt=a,ut=null)):r=null,r===null)throw ri(a);return fh(r)?a.lanes=32:a.lanes=536870912,null}var k=c.children;return c=c.fallback,m?(ui(),m=a.mode,k=vu({mode:"hidden",children:k},m),c=qi(c,m,s,null),k.return=a,c.return=a,k.sibling=c,a.child=k,c=a.child,c.memoizedState=Cd(s),c.childLanes=Ad(r,S,s),a.memoizedState=Td,ws(null,c)):(li(a),jd(a,k))}var M=r.memoizedState;if(M!==null&&(k=M.dehydrated,k!==null)){if(g)a.flags&256?(li(a),a.flags&=-257,a=Nd(r,a,s)):a.memoizedState!==null?(ui(),a.child=r.child,a.flags|=128,a=null):(ui(),k=c.fallback,m=a.mode,c=vu({mode:"visible",children:c.children},m),k=qi(k,m,s,null),k.flags|=2,c.return=a,k.return=a,c.sibling=k,a.child=c,Wi(a,r.child,null,s),c=a.child,c.memoizedState=Cd(s),c.childLanes=Ad(r,S,s),a.memoizedState=Td,a=ws(null,c));else if(li(a),fh(k)){if(S=k.nextSibling&&k.nextSibling.dataset,S)var I=S.dgst;S=I,c=Error(i(419)),c.stack="",c.digest=S,fs({value:c,source:null,stack:null}),a=Nd(r,a,s)}else if(Ot||Za(r,a,s,!1),S=(s&r.childLanes)!==0,Ot||S){if(S=rt,S!==null&&(c=Fg(S,s),c!==0&&c!==M.retryLane))throw M.retryLane=c,Fi(r,c),Sn(S,r,c),_d;ch(k)||Cu(),a=Nd(r,a,s)}else ch(k)?(a.flags|=192,a.child=r.child,a=null):(r=M.treeContext,ut=Xn(k.nextSibling),Yt=a,Ue=!0,ni=null,Gn=!1,r!==null&&Zy(a,r),a=jd(a,c.children),a.flags|=4096);return a}return m?(ui(),k=c.fallback,m=a.mode,M=r.child,I=M.sibling,c=jr(M,{mode:"hidden",children:c.children}),c.subtreeFlags=M.subtreeFlags&65011712,I!==null?k=jr(I,k):(k=qi(k,m,s,null),k.flags|=2),k.return=a,c.return=a,c.sibling=k,a.child=c,ws(null,c),c=a.child,k=r.child.memoizedState,k===null?k=Cd(s):(m=k.cachePool,m!==null?(M=jt._currentValue,m=m.parent!==M?{parent:M,pool:M}:m):m=Gy(),k={baseLanes:k.baseLanes|s,cachePool:m}),c.memoizedState=k,c.childLanes=Ad(r,S,s),a.memoizedState=Td,ws(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 jd(r,a){return a=vu({mode:"visible",children:a},r.mode),a.return=r,r.child=a}function vu(r,a){return r=An(22,r,null,a),r.lanes=0,r}function Nd(r,a,s){return Wi(a,r.child,null,s),r=jd(a,a.pendingProps.children),r.flags|=2,a.memoizedState=null,r}function ov(r,a,s){r.lanes|=a;var c=r.alternate;c!==null&&(c.lanes|=a),qf(r.return,a,s)}function Od(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 sv(r,a,s){var c=a.pendingProps,m=c.revealOrder,g=c.tail;c=c.children;var S=Tt.current,k=(S&2)!==0;if(k?(S=S&1|2,a.flags|=128):S&=1,w(Tt,S),Kt(r,a,c,s),c=Ue?cs:0,!k&&r!==null&&(r.flags&128)!==0)e:for(r=a.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&ov(r,s,a);else if(r.tag===19)ov(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&&su(r)===null&&(m=s),s=s.sibling;s=m,s===null?(m=a.child,a.child=null):(m=s.sibling,s.sibling=null),Od(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&&su(r)===null){a.child=m;break}r=m.sibling,m.sibling=s,s=m,m=r}Od(a,!0,s,null,g,c);break;case"together":Od(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(Za(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 Rd(r,a){return(r.lanes&a)!==0?!0:(r=r.dependencies,!!(r!==null&&Wl(r)))}function XE(r,a,s){switch(a.tag){case 3:Ge(a,a.stateNode.containerInfo),ii(a,jt,r.memoizedState.cache),Gi();break;case 27:case 5:At(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,id(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?av(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||(Za(r,a,s,!1),c=(s&a.childLanes)!==0),m){if(c)return sv(r,a,s);a.flags|=128}if(m=a.memoizedState,m!==null&&(m.rendering=null,m.tail=null,m.lastEffect=null),w(Tt,Tt.current),c)break;return null;case 22:return a.lanes=0,Wx(r,a,s,a.pendingProps);case 24:ii(a,jt,r.memoizedState.cache)}return $r(r,a,s)}function lv(r,a,s){if(r!==null)if(r.memoizedProps!==a.pendingProps)Ot=!0;else{if(!Rd(r,s)&&(a.flags&128)===0)return Ot=!1,XE(r,a,s);Ot=(r.flags&131072)!==0}else Ot=!1,Ue&&(a.flags&1048576)!==0&&Vy(a,cs,a.index);switch(a.lanes=0,a.tag){case 16:e:{var c=a.pendingProps;if(r=Ji(a.elementType),a.type=r,typeof r=="function")Uf(r)?(c=ta(r,c),a.tag=1,a=rv(null,a,r,c,s)):(a.tag=0,a=Ed(null,a,r,c,s));else{if(r!=null){var m=r.$$typeof;if(m===R){a.tag=11,a=Kx(null,a,r,c,s);break e}else if(m===G){a.tag=14,a=Jx(null,a,r,c,s);break e}}throw a=le(r)||r,Error(i(306,a,""))}}return a;case 0:return Ed(r,a,a.type,a.pendingProps,s);case 1:return c=a.type,m=ta(c,a.pendingProps),rv(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,Wf(r,a),xs(a,c,null,s);var S=a.memoizedState;if(c=S.cache,ii(a,jt,c),c!==g.cache&&Gf(a,[jt],s,!0),ys(),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=iv(r,a,c,s);break e}else if(c!==m){m=Hn(Error(i(424)),a),fs(m),a=iv(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=Xn(r.firstChild),Yt=a,Ue=!0,ni=null,Gn=!0,s=Wy(a,null,c,s),a.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(Gi(),c===m){a=$r(r,a,s);break e}Kt(r,a,c,s)}a=a.child}return a;case 26:return xu(r,a),r===null?(s=vb(a.type,null,a.pendingProps,null))?a.memoizedState=s:Ue||(s=a.type,r=a.pendingProps,c=Du(pe.current).createElement(s),c[Gt]=a,c[pn]=r,Jt(c,s,r),Ft(c),a.stateNode=c):a.memoizedState=vb(a.type,r.memoizedProps,a.pendingProps,r.memoizedState),null;case 27:return At(a),r===null&&Ue&&(c=a.stateNode=gb(a.type,a.pendingProps,pe.current),Yt=a,Gn=!0,m=ut,yi(a.type)?(dh=m,ut=Xn(c.firstChild)):ut=m),Kt(r,a,a.pendingProps.children,s),xu(r,a),r===null&&(a.flags|=4194304),a.child;case 5:return r===null&&Ue&&((m=c=ut)&&(c=_T(c,a.type,a.pendingProps,Gn),c!==null?(a.stateNode=c,Yt=a,ut=Xn(c.firstChild),Gn=!1,m=!0):m=!1),m||ri(a)),At(a),m=a.type,g=a.pendingProps,S=r!==null?r.memoizedProps:null,c=g.children,sh(m,g)?c=null:S!==null&&sh(m,S)&&(a.flags|=32),a.memoizedState!==null&&(m=od(r,a,VE,null,null,s),Us._currentValue=m),xu(r,a),Kt(r,a,c,s),a.child;case 6:return r===null&&Ue&&((r=s=ut)&&(s=ET(s,a.pendingProps,Gn),s!==null?(a.stateNode=s,Yt=a,ut=null,r=!0):r=!1),r||ri(a)),null;case 13:return av(r,a,s);case 4:return Ge(a,a.stateNode.containerInfo),c=a.pendingProps,r===null?a.child=Wi(a,null,c,s):Kt(r,a,c,s),a.child;case 11:return Kx(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,Xi(a),m=Xt(m),c=c(m),a.flags|=1,Kt(r,a,c,s),a.child;case 14:return Jx(r,a,a.type,a.pendingProps,s);case 15:return Qx(r,a,a.type,a.pendingProps,s);case 19:return sv(r,a,s);case 31:return YE(r,a,s);case 22:return Wx(r,a,s,a.pendingProps);case 24:return Xi(a),c=Xt(jt),r===null?(m=Kf(),m===null&&(m=rt,g=Yf(),m.pooledCache=g,g.refCount++,g!==null&&(m.pooledCacheLanes|=s),m=g),a.memoizedState={parent:c,cache:m},Qf(a),ii(a,jt,m)):((r.lanes&s)!==0&&(Wf(r,a),xs(a,null,null,s),ys()),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,jt,c)):(c=g.cache,ii(a,jt,c),c!==m.cache&&Gf(a,[jt],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 Md(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(Dv())r.flags|=8192;else throw Qi=ru,Jf}else r.flags&=-16777217}function uv(r,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!zb(a))if(Dv())r.flags|=8192;else throw Qi=ru,Jf}function bu(r,a){a!==null&&(r.flags|=4),r.flags&16384&&(a=r.tag!==22?Bg():536870912,r.lanes|=a,Wa|=a)}function zs(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 KE(r,a,s){var c=a.pendingProps;switch(Bf(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(jt),De(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(r===null||r.child===null)&&(Va(a)?Lr(a):r===null||r.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Hf())),ct(a),null;case 26:var m=a.type,g=a.memoizedState;return r===null?(Lr(a),g!==null?(ct(a),uv(a,g)):(ct(a),Md(a,m,null,c,s))):g?g!==r.memoizedState?(Lr(a),ct(a),uv(a,g)):(ct(a),a.flags&=-16777217):(r=r.memoizedProps,r!==c&&Lr(a),ct(a),Md(a,m,r,c,s)),null;case 27:if(an(a),s=pe.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=ie.current,Va(a)?By(a):(r=gb(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=ie.current,Va(a))By(a);else{var S=Du(pe.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[pn]=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),Md(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=pe.current,Va(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||ab(r.nodeValue,s)),r||ri(a,!0)}else r=Du(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=Va(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 Gi(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;ct(a),r=!1}else s=Hf(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=s),r=!0;if(!r)return a.flags&256?(Nn(a),a):(Nn(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=Va(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 Gi(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;ct(a),m=!1}else m=Hf(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=m),m=!0;if(!m)return a.flags&256?(Nn(a),a):(Nn(a),null)}return Nn(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),bu(a,a.updateQueue),ct(a),null);case 4:return De(),r===null&&nh(a.stateNode.containerInfo),ct(a),null;case 10:return Rr(a.type),ct(a),null;case 19:if(q(Tt),c=a.memoizedState,c===null)return ct(a),null;if(m=(a.flags&128)!==0,g=c.rendering,g===null)if(m)zs(c,!1);else{if(zt!==0||r!==null&&(r.flags&128)!==0)for(r=a.child;r!==null;){if(g=su(r),g!==null){for(a.flags|=128,zs(c,!1),r=g.updateQueue,a.updateQueue=r,bu(a,r),a.subtreeFlags=0,r=s,s=a.child;s!==null;)Ly(s,r),s=s.sibling;return w(Tt,Tt.current&1|2),Ue&&Nr(a,c.treeForkCount),a.child}r=r.sibling}c.tail!==null&<()>_u&&(a.flags|=128,m=!0,zs(c,!1),a.lanes=4194304)}else{if(!m)if(r=su(g),r!==null){if(a.flags|=128,m=!0,r=r.updateQueue,a.updateQueue=r,bu(a,r),zs(c,!0),c.tail===null&&c.tailMode==="hidden"&&!g.alternate&&!Ue)return ct(a),null}else 2*lt()-c.renderingStartTime>_u&&s!==536870912&&(a.flags|=128,m=!0,zs(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=Tt.current,w(Tt,m?s&1|2:s&1),Ue&&Nr(a,c.treeForkCount),r):(ct(a),null);case 22:case 23:return Nn(a),rd(),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&&bu(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&&q(Ki),null;case 24:return s=null,r!==null&&(s=r.memoizedState.cache),a.memoizedState.cache!==s&&(a.flags|=2048),Rr(jt),ct(a),null;case 25:return null;case 30:return null}throw Error(i(156,a.tag))}function JE(r,a){switch(Bf(a),a.tag){case 1:return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 3:return Rr(jt),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(Nn(a),a.alternate===null)throw Error(i(340));Gi()}return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 13:if(Nn(a),r=a.memoizedState,r!==null&&r.dehydrated!==null){if(a.alternate===null)throw Error(i(340));Gi()}return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 19:return q(Tt),null;case 4:return De(),null;case 10:return Rr(a.type),null;case 22:case 23:return Nn(a),rd(),r!==null&&q(Ki),r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 24:return Rr(jt),null;case 25:return null;default:return null}}function cv(r,a){switch(Bf(a),a.tag){case 3:Rr(jt),De();break;case 26:case 27:case 5:an(a);break;case 4:De();break;case 31:a.memoizedState!==null&&Nn(a);break;case 13:Nn(a);break;case 19:q(Tt);break;case 10:Rr(a.type);break;case 22:case 23:Nn(a),rd(),r!==null&&q(Ki);break;case 24:Rr(jt)}}function _s(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(k){Xe(a,a.return,k)}}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,k=S.destroy;if(k!==void 0){S.destroy=void 0,m=a;var M=s,I=k;try{I()}catch(X){Xe(m,M,X)}}}c=c.next}while(c!==g)}}catch(X){Xe(a,a.return,X)}}function fv(r){var a=r.updateQueue;if(a!==null){var s=r.stateNode;try{tx(a,s)}catch(c){Xe(r,r.return,c)}}}function dv(r,a,s){s.props=ta(r.type,r.memoizedProps),s.state=r.memoizedState;try{s.componentWillUnmount()}catch(c){Xe(r,a,c)}}function Es(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 yr(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 hv(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 Dd(r,a,s){try{var c=r.stateNode;vT(c,r.type,s,a),c[pn]=a}catch(m){Xe(r,r.return,m)}}function mv(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&yi(r.type)||r.tag===4}function $d(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||mv(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 Ld(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(Ld(r,a,s),r=r.sibling;r!==null;)Ld(r,a,s),r=r.sibling}function Su(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(Su(r,a,s),r=r.sibling;r!==null;)Su(r,a,s),r=r.sibling}function pv(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[pn]=s}catch(g){Xe(r,r.return,g)}}var Ur=!1,Rt=!1,Ud=!1,gv=typeof WeakSet=="function"?WeakSet:Set,qt=null;function QE(r,a){if(r=r.containerInfo,ah=Bu,r=Cy(r),Nf(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,k=-1,M=-1,I=0,X=0,ee=r,H=null;t:for(;;){for(var F;ee!==s||m!==0&&ee.nodeType!==3||(k=S+m),ee!==g||c!==0&&ee.nodeType!==3||(M=S+c),ee.nodeType===3&&(S+=ee.nodeValue.length),(F=ee.firstChild)!==null;)H=ee,ee=F;for(;;){if(ee===r)break t;if(H===s&&++I===m&&(k=S),H===g&&++X===c&&(M=S),(F=ee.nextSibling)!==null)break;ee=H,H=ee.parentNode}ee=F}s=k===-1||M===-1?null:{start:k,end:M}}else s=null}s=s||{start:0,end:0}}else s=null;for(oh={focusedElem:r,selectionRange:s},Bu=!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 fe=ta(s.type,m);r=c.getSnapshotBeforeUpdate(fe,g),c.__reactInternalSnapshotBeforeUpdate=r}catch(we){Xe(s,s.return,we)}}break;case 3:if((r&1024)!==0){if(r=a.stateNode.containerInfo,s=r.nodeType,s===9)uh(r);else if(s===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":uh(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 yv(r,a,s){var c=s.flags;switch(s.tag){case 0:case 11:case 15:Vr(r,s),c&4&&_s(5,s);break;case 1:if(Vr(r,s),c&4)if(r=s.stateNode,a===null)try{r.componentDidMount()}catch(S){Xe(s,s.return,S)}else{var m=ta(s.type,a.memoizedProps);a=a.memoizedState;try{r.componentDidUpdate(m,a,r.__reactInternalSnapshotBeforeUpdate)}catch(S){Xe(s,s.return,S)}}c&64&&fv(s),c&512&&Es(s,s.return);break;case 3:if(Vr(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{tx(r,a)}catch(S){Xe(s,s.return,S)}}break;case 27:a===null&&c&4&&pv(s);case 26:case 5:Vr(r,s),a===null&&c&4&&hv(s),c&512&&Es(s,s.return);break;case 12:Vr(r,s);break;case 31:Vr(r,s),c&4&&bv(r,s);break;case 13:Vr(r,s),c&4&&Sv(r,s),c&64&&(r=s.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(s=sT.bind(null,s),TT(r,s))));break;case 22:if(c=s.memoizedState!==null||Ur,!c){a=a!==null&&a.memoizedState!==null||Rt,m=Ur;var g=Rt;Ur=c,(Rt=a)&&!g?Zr(r,s,(s.subtreeFlags&8772)!==0):Vr(r,s),Ur=m,Rt=g}break;case 30:break;default:Vr(r,s)}}function xv(r){var a=r.alternate;a!==null&&(r.alternate=null,xv(a)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(a=r.stateNode,a!==null&&mf(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,yn=!1;function Pr(r,a,s){for(s=s.child;s!==null;)vv(r,a,s),s=s.sibling}function vv(r,a,s){if(Vt&&typeof Vt.onCommitFiberUnmount=="function")try{Vt.onCommitFiberUnmount(sn,s)}catch{}switch(s.tag){case 26:Rt||yr(s,a),Pr(r,a,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:Rt||yr(s,a);var c=dt,m=yn;yi(s.type)&&(dt=s.stateNode,yn=!1),Pr(r,a,s),Ds(s.stateNode),dt=c,yn=m;break;case 5:Rt||yr(s,a);case 6:if(c=dt,m=yn,dt=null,Pr(r,a,s),dt=c,yn=m,dt!==null)if(yn)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&&(yn?(r=dt,fb(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,s.stateNode),so(r)):fb(dt,s.stateNode));break;case 4:c=dt,m=yn,dt=s.stateNode.containerInfo,yn=!0,Pr(r,a,s),dt=c,yn=m;break;case 0:case 11:case 14:case 15:ci(2,s,a),Rt||ci(4,s,a),Pr(r,a,s);break;case 1:Rt||(yr(s,a),c=s.stateNode,typeof c.componentWillUnmount=="function"&&dv(s,a,c)),Pr(r,a,s);break;case 21:Pr(r,a,s);break;case 22:Rt=(c=Rt)||s.memoizedState!==null,Pr(r,a,s),Rt=c;break;default:Pr(r,a,s)}}function bv(r,a){if(a.memoizedState===null&&(r=a.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{so(r)}catch(s){Xe(a,a.return,s)}}}function Sv(r,a){if(a.memoizedState===null&&(r=a.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{so(r)}catch(s){Xe(a,a.return,s)}}function WE(r){switch(r.tag){case 31:case 13:case 19:var a=r.stateNode;return a===null&&(a=r.stateNode=new gv),a;case 22:return r=r.stateNode,a=r._retryCache,a===null&&(a=r._retryCache=new gv),a;default:throw Error(i(435,r.tag))}}function ku(r,a){var s=WE(r);a.forEach(function(c){if(!s.has(c)){s.add(c);var m=lT.bind(null,r,c);c.then(m,m)}})}function xn(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,k=S;e:for(;k!==null;){switch(k.tag){case 27:if(yi(k.type)){dt=k.stateNode,yn=!1;break e}break;case 5:dt=k.stateNode,yn=!1;break e;case 3:case 4:dt=k.stateNode.containerInfo,yn=!0;break e}k=k.return}if(dt===null)throw Error(i(160));vv(g,S,m),dt=null,yn=!1,g=m.alternate,g!==null&&(g.return=null),m.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)kv(a,r),a=a.sibling}var lr=null;function kv(r,a){var s=r.alternate,c=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:xn(a,r),vn(r),c&4&&(ci(3,r,r.return),_s(3,r),ci(5,r,r.return));break;case 1:xn(a,r),vn(r),c&512&&(Rt||s===null||yr(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=lr;if(xn(a,r),vn(r),c&512&&(Rt||s===null||yr(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[Wo]||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=kb("link","href",m).get(c+(s.href||""));if(S){for(var k=0;k<S.length;k++)if(g=S[k],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(k,1);break t}}g=m.createElement(c),Jt(g,c,s),m.head.appendChild(g);break;case"meta":if(S=kb("meta","content",m).get(c+(s.content||""))){for(k=0;k<S.length;k++)if(g=S[k],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(k,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 wb(m,r.type,r.stateNode);else r.stateNode=Sb(m,c,r.memoizedProps);else g!==c?(g===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):g.count--,c===null?wb(m,r.type,r.stateNode):Sb(m,c,r.memoizedProps)):c===null&&r.stateNode!==null&&Dd(r,r.memoizedProps,s.memoizedProps)}break;case 27:xn(a,r),vn(r),c&512&&(Rt||s===null||yr(s,s.return)),s!==null&&c&4&&Dd(r,r.memoizedProps,s.memoizedProps);break;case 5:if(xn(a,r),vn(r),c&512&&(Rt||s===null||yr(s,s.return)),r.flags&32){m=r.stateNode;try{ja(m,"")}catch(fe){Xe(r,r.return,fe)}}c&4&&r.stateNode!=null&&(m=r.memoizedProps,Dd(r,m,s!==null?s.memoizedProps:m)),c&1024&&(Ud=!0);break;case 6:if(xn(a,r),vn(r),c&4){if(r.stateNode===null)throw Error(i(162));c=r.memoizedProps,s=r.stateNode;try{s.nodeValue=c}catch(fe){Xe(r,r.return,fe)}}break;case 3:if(Uu=null,m=lr,lr=$u(a.containerInfo),xn(a,r),lr=m,vn(r),c&4&&s!==null&&s.memoizedState.isDehydrated)try{so(a.containerInfo)}catch(fe){Xe(r,r.return,fe)}Ud&&(Ud=!1,wv(r));break;case 4:c=lr,lr=$u(r.stateNode.containerInfo),xn(a,r),vn(r),lr=c;break;case 12:xn(a,r),vn(r);break;case 31:xn(a,r),vn(r),c&4&&(c=r.updateQueue,c!==null&&(r.updateQueue=null,ku(r,c)));break;case 13:xn(a,r),vn(r),r.child.flags&8192&&r.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(zu=lt()),c&4&&(c=r.updateQueue,c!==null&&(r.updateQueue=null,ku(r,c)));break;case 22:m=r.memoizedState!==null;var M=s!==null&&s.memoizedState!==null,I=Ur,X=Rt;if(Ur=I||m,Rt=X||M,xn(a,r),Rt=X,Ur=I,vn(r),c&8192)e:for(a=r.stateNode,a._visibility=m?a._visibility&-2:a._visibility|1,m&&(s===null||M||Ur||Rt||na(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{k=M.stateNode;var ee=M.memoizedProps.style,H=ee!=null&&ee.hasOwnProperty("display")?ee.display:null;k.style.display=H==null||typeof H=="boolean"?"":(""+H).trim()}}catch(fe){Xe(M,M.return,fe)}}}else if(a.tag===6){if(s===null){M=a;try{M.stateNode.nodeValue=m?"":M.memoizedProps}catch(fe){Xe(M,M.return,fe)}}}else if(a.tag===18){if(s===null){M=a;try{var F=M.stateNode;m?db(F,!0):db(M.stateNode,!1)}catch(fe){Xe(M,M.return,fe)}}}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,ku(r,s))));break;case 19:xn(a,r),vn(r),c&4&&(c=r.updateQueue,c!==null&&(r.updateQueue=null,ku(r,c)));break;case 30:break;case 21:break;default:xn(a,r),vn(r)}}function vn(r){var a=r.flags;if(a&2){try{for(var s,c=r.return;c!==null;){if(mv(c)){s=c;break}c=c.return}if(s==null)throw Error(i(160));switch(s.tag){case 27:var m=s.stateNode,g=$d(r);Su(r,g,m);break;case 5:var S=s.stateNode;s.flags&32&&(ja(S,""),s.flags&=-33);var k=$d(r);Su(r,k,S);break;case 3:case 4:var M=s.stateNode.containerInfo,I=$d(r);Ld(r,I,M);break;default:throw Error(i(161))}}catch(X){Xe(r,r.return,X)}r.flags&=-3}a&4096&&(r.flags&=-4097)}function wv(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var a=r;wv(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),r=r.sibling}}function Vr(r,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)yv(r,a.alternate,a),a=a.sibling}function na(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),na(a);break;case 1:yr(a,a.return);var s=a.stateNode;typeof s.componentWillUnmount=="function"&&dv(a,a.return,s),na(a);break;case 27:Ds(a.stateNode);case 26:case 5:yr(a,a.return),na(a);break;case 22:a.memoizedState===null&&na(a);break;case 30:na(a);break;default:na(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),_s(4,g);break;case 1:if(Zr(m,g,s),c=g,m=c.stateNode,typeof m.componentDidMount=="function")try{m.componentDidMount()}catch(I){Xe(c,c.return,I)}if(c=g,m=c.updateQueue,m!==null){var k=c.stateNode;try{var M=m.shared.hiddenCallbacks;if(M!==null)for(m.shared.hiddenCallbacks=null,m=0;m<M.length;m++)ex(M[m],k)}catch(I){Xe(c,c.return,I)}}s&&S&64&&fv(g),Es(g,g.return);break;case 27:pv(g);case 26:case 5:Zr(m,g,s),s&&c===null&&S&4&&hv(g),Es(g,g.return);break;case 12:Zr(m,g,s);break;case 31:Zr(m,g,s),s&&S&4&&bv(m,g);break;case 13:Zr(m,g,s),s&&S&4&&Sv(m,g);break;case 22:g.memoizedState===null&&Zr(m,g,s),Es(g,g.return);break;case 30:break;default:Zr(m,g,s)}a=a.sibling}}function Pd(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&&ds(s))}function Vd(r,a){r=null,a.alternate!==null&&(r=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==r&&(a.refCount++,r!=null&&ds(r))}function ur(r,a,s,c){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)zv(r,a,s,c),a=a.sibling}function zv(r,a,s,c){var m=a.flags;switch(a.tag){case 0:case 11:case 15:ur(r,a,s,c),m&2048&&_s(9,a);break;case 1:ur(r,a,s,c);break;case 3:ur(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&&ds(r)));break;case 12:if(m&2048){ur(r,a,s,c),r=a.stateNode;try{var g=a.memoizedProps,S=g.id,k=g.onPostCommit;typeof k=="function"&&k(S,a.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(M){Xe(a,a.return,M)}}else ur(r,a,s,c);break;case 31:ur(r,a,s,c);break;case 13:ur(r,a,s,c);break;case 23:break;case 22:g=a.stateNode,S=a.alternate,a.memoizedState!==null?g._visibility&2?ur(r,a,s,c):Ts(r,a):g._visibility&2?ur(r,a,s,c):(g._visibility|=2,Ka(r,a,s,c,(a.subtreeFlags&10256)!==0||!1)),m&2048&&Pd(S,a);break;case 24:ur(r,a,s,c),m&2048&&Vd(a.alternate,a);break;default:ur(r,a,s,c)}}function Ka(r,a,s,c,m){for(m=m&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var g=r,S=a,k=s,M=c,I=S.flags;switch(S.tag){case 0:case 11:case 15:Ka(g,S,k,M,m),_s(8,S);break;case 23:break;case 22:var X=S.stateNode;S.memoizedState!==null?X._visibility&2?Ka(g,S,k,M,m):Ts(g,S):(X._visibility|=2,Ka(g,S,k,M,m)),m&&I&2048&&Pd(S.alternate,S);break;case 24:Ka(g,S,k,M,m),m&&I&2048&&Vd(S.alternate,S);break;default:Ka(g,S,k,M,m)}a=a.sibling}}function Ts(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:Ts(s,c),m&2048&&Pd(c.alternate,c);break;case 24:Ts(s,c),m&2048&&Vd(c.alternate,c);break;default:Ts(s,c)}a=a.sibling}}var Cs=8192;function Ja(r,a,s){if(r.subtreeFlags&Cs)for(r=r.child;r!==null;)_v(r,a,s),r=r.sibling}function _v(r,a,s){switch(r.tag){case 26:Ja(r,a,s),r.flags&Cs&&r.memoizedState!==null&&PT(s,lr,r.memoizedState,r.memoizedProps);break;case 5:Ja(r,a,s);break;case 3:case 4:var c=lr;lr=$u(r.stateNode.containerInfo),Ja(r,a,s),lr=c;break;case 22:r.memoizedState===null&&(c=r.alternate,c!==null&&c.memoizedState!==null?(c=Cs,Cs=16777216,Ja(r,a,s),Cs=c):Ja(r,a,s));break;default:Ja(r,a,s)}}function Ev(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 As(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,Cv(c,r)}Ev(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)Tv(r),r=r.sibling}function Tv(r){switch(r.tag){case 0:case 11:case 15:As(r),r.flags&2048&&ci(9,r,r.return);break;case 3:As(r);break;case 12:As(r);break;case 22:var a=r.stateNode;r.memoizedState!==null&&a._visibility&2&&(r.return===null||r.return.tag!==13)?(a._visibility&=-3,wu(r)):As(r);break;default:As(r)}}function wu(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,Cv(c,r)}Ev(r)}for(r=r.child;r!==null;){switch(a=r,a.tag){case 0:case 11:case 15:ci(8,a,a.return),wu(a);break;case 22:s=a.stateNode,s._visibility&2&&(s._visibility&=-3,wu(a));break;default:wu(a)}r=r.sibling}}function Cv(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:ds(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(xv(c),c===s){qt=null;break e}if(m!==null){m.return=g,qt=m;break e}qt=g}}}var eT={getCacheForType:function(r){var a=Xt(jt),s=a.data.get(r);return s===void 0&&(s=r(),a.data.set(r,s)),s},cacheSignal:function(){return Xt(jt).controller.signal}},tT=typeof WeakMap=="function"?WeakMap:Map,He=0,rt=null,Re=null,$e=0,Ye=0,On=null,fi=!1,Qa=!1,Zd=!1,Br=0,zt=0,di=0,ra=0,Bd=0,Rn=0,Wa=0,js=null,bn=null,Id=!1,zu=0,Av=0,_u=1/0,Eu=null,hi=null,Zt=0,mi=null,eo=null,Ir=0,Hd=0,Fd=null,jv=null,Ns=0,qd=null;function Mn(){return(He&2)!==0&&$e!==0?$e&-$e:P.T!==null?Qd():qg()}function Nv(){if(Rn===0)if(($e&536870912)===0||Ue){var r=Ml;Ml<<=1,(Ml&3932160)===0&&(Ml=262144),Rn=r}else Rn=536870912;return r=jn.current,r!==null&&(r.flags|=32),Rn}function Sn(r,a,s){(r===rt&&(Ye===2||Ye===9)||r.cancelPendingCommit!==null)&&(to(r,0),pi(r,$e,Rn,!1)),Qo(r,s),((He&2)===0||r!==rt)&&(r===rt&&((He&2)===0&&(ra|=s),zt===4&&pi(r,$e,Rn,!1)),xr(r))}function Ov(r,a,s){if((He&6)!==0)throw Error(i(327));var c=!s&&(a&127)===0&&(a&r.expiredLanes)===0||Jo(r,a),m=c?iT(r,a):Yd(r,a,!0),g=c;do{if(m===0){Qa&&!c&&pi(r,a,0,!1);break}else{if(s=r.current.alternate,g&&!nT(s)){m=Yd(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 k=r;m=js;var M=k.current.memoizedState.isDehydrated;if(M&&(to(k,S).flags|=256),S=Yd(k,S,!1),S!==2){if(Zd&&!M){k.errorRecoveryDisabledLanes|=g,ra|=g,m=4;break e}g=bn,bn=m,g!==null&&(bn===null?bn=g:bn.push.apply(bn,g))}m=S}if(g=!1,m!==2)continue}}if(m===1){to(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,Rn,!fi);break e;case 2:bn=null;break;case 3:case 5:break;default:throw Error(i(329))}if((a&62914560)===a&&(m=zu+300-lt(),10<m)){if(pi(c,a,Rn,!fi),$l(c,0,!0)!==0)break e;Ir=a,c.timeoutHandle=ub(Rv.bind(null,c,s,bn,Eu,Id,a,Rn,ra,Wa,fi,g,"Throttled",-0,0),m);break e}Rv(c,s,bn,Eu,Id,a,Rn,ra,Wa,fi,g,null,-0,0)}}break}while(!0);xr(r)}function Rv(r,a,s,c,m,g,S,k,M,I,X,ee,H,F){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},_v(a,g,ee);var fe=(g&62914560)===g?zu-lt():(g&4194048)===g?Av-lt():0;if(fe=VT(ee,fe),fe!==null){Ir=g,r.cancelPendingCommit=fe(Zv.bind(null,r,a,g,s,c,m,S,k,M,X,ee,null,H,F)),pi(r,g,S,!I);return}}Zv(r,a,g,s,c,m,S,k,M)}function nT(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(!Cn(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&=~Bd,a&=~ra,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&&Ig(r,s,a)}function Tu(){return(He&6)===0?(Os(0),!1):!0}function Gd(){if(Re!==null){if(Ye===0)var r=Re.return;else r=Re,Or=Yi=null,ud(r),Fa=null,ms=0,r=Re;for(;r!==null;)cv(r.alternate,r),r=r.return;Re=null}}function to(r,a){var s=r.timeoutHandle;s!==-1&&(r.timeoutHandle=-1,kT(s)),s=r.cancelPendingCommit,s!==null&&(r.cancelPendingCommit=null,s()),Ir=0,Gd(),rt=r,Re=s=jr(r.current,null),$e=a,Ye=0,On=null,fi=!1,Qa=Jo(r,a),Zd=!1,Wa=Rn=Bd=ra=di=zt=0,bn=js=null,Id=!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,Yl(),s}function Mv(r,a){Ce=null,P.H=ks,a===Ha||a===nu?(a=Ky(),Ye=3):a===Jf?(a=Ky(),Ye=4):Ye=a===_d?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,On=a,Re===null&&(zt=1,gu(r,Hn(a,r.current)))}function Dv(){var r=jn.current;return r===null?!0:($e&4194048)===$e?Yn===null:($e&62914560)===$e||($e&536870912)!==0?r===Yn:!1}function $v(){var r=P.H;return P.H=ks,r===null?ks:r}function Lv(){var r=P.A;return P.A=eT,r}function Cu(){zt=4,fi||($e&4194048)!==$e&&jn.current!==null||(Qa=!0),(di&134217727)===0&&(ra&134217727)===0||rt===null||pi(rt,$e,Rn,!1)}function Yd(r,a,s){var c=He;He|=2;var m=$v(),g=Lv();(rt!==r||$e!==a)&&(Eu=null,to(r,a)),a=!1;var S=zt;e:do try{if(Ye!==0&&Re!==null){var k=Re,M=On;switch(Ye){case 8:Gd(),S=6;break e;case 3:case 2:case 9:case 6:jn.current===null&&(a=!0);var I=Ye;if(Ye=0,On=null,no(r,k,M,I),s&&Qa){S=0;break e}break;default:I=Ye,Ye=0,On=null,no(r,k,M,I)}}rT(),S=zt;break}catch(X){Mv(r,X)}while(!0);return a&&r.shellSuspendCounter++,Or=Yi=null,He=c,P.H=m,P.A=g,Re===null&&(rt=null,$e=0,Yl()),S}function rT(){for(;Re!==null;)Uv(Re)}function iT(r,a){var s=He;He|=2;var c=$v(),m=Lv();rt!==r||$e!==a?(Eu=null,_u=lt()+500,to(r,a)):Qa=Jo(r,a);e:do try{if(Ye!==0&&Re!==null){a=Re;var g=On;t:switch(Ye){case 1:Ye=0,On=null,no(r,a,g,1);break;case 2:case 9:if(Yy(g)){Ye=0,On=null,Pv(a);break}a=function(){Ye!==2&&Ye!==9||rt!==r||(Ye=7),xr(r)},g.then(a,a);break e;case 3:Ye=7;break e;case 4:Ye=5;break e;case 7:Yy(g)?(Ye=0,On=null,Pv(a)):(Ye=0,On=null,no(r,a,g,7));break;case 5:var S=null;switch(Re.tag){case 26:S=Re.memoizedState;case 5:case 27:var k=Re;if(S?zb(S):k.stateNode.complete){Ye=0,On=null;var M=k.sibling;if(M!==null)Re=M;else{var I=k.return;I!==null?(Re=I,Au(I)):Re=null}break t}}Ye=0,On=null,no(r,a,g,5);break;case 6:Ye=0,On=null,no(r,a,g,6);break;case 8:Gd(),zt=6;break e;default:throw Error(i(462))}}aT();break}catch(X){Mv(r,X)}while(!0);return Or=Yi=null,P.H=c,P.A=m,He=s,Re!==null?0:(rt=null,$e=0,Yl(),zt)}function aT(){for(;Re!==null&&!Et();)Uv(Re)}function Uv(r){var a=lv(r.alternate,r,Br);r.memoizedProps=r.pendingProps,a===null?Au(r):Re=a}function Pv(r){var a=r,s=a.alternate;switch(a.tag){case 15:case 0:a=nv(s,a,a.pendingProps,a.type,void 0,$e);break;case 11:a=nv(s,a,a.pendingProps,a.type.render,a.ref,$e);break;case 5:ud(a);default:cv(s,a),a=Re=Ly(a,Br),a=lv(s,a,Br)}r.memoizedProps=r.pendingProps,a===null?Au(r):Re=a}function no(r,a,s,c){Or=Yi=null,ud(a),Fa=null,ms=0;var m=a.return;try{if(GE(r,m,a,s,$e)){zt=1,gu(r,Hn(s,r.current)),Re=null;return}}catch(g){if(m!==null)throw Re=m,g;zt=1,gu(r,Hn(s,r.current)),Re=null;return}a.flags&32768?(Ue||c===1?r=!0:Qa||($e&536870912)!==0?r=!1:(fi=r=!0,(c===2||c===9||c===3||c===6)&&(c=jn.current,c!==null&&c.tag===13&&(c.flags|=16384))),Vv(a,r)):Au(a)}function Au(r){var a=r;do{if((a.flags&32768)!==0){Vv(a,fi);return}r=a.return;var s=KE(a.alternate,a,Br);if(s!==null){Re=s;return}if(a=a.sibling,a!==null){Re=a;return}Re=a=r}while(a!==null);zt===0&&(zt=5)}function Vv(r,a){do{var s=JE(r.alternate,r);if(s!==null){s.flags&=32767,Re=s;return}if(s=r.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!a&&(r=r.sibling,r!==null)){Re=r;return}Re=r=s}while(r!==null);zt=6,Re=null}function Zv(r,a,s,c,m,g,S,k,M){r.cancelPendingCommit=null;do ju();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|=$f,U2(r,s,g,S,k,M),r===rt&&(Re=rt=null,$e=0),eo=a,mi=r,Ir=s,Hd=g,Fd=m,jv=c,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,uT(ye,function(){return qv(),null})):(r.callbackNode=null,r.callbackPriority=0),c=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||c){c=P.T,P.T=null,m=Y.p,Y.p=2,S=He,He|=4;try{QE(r,a,s)}finally{He=S,Y.p=m,P.T=c}}Zt=1,Bv(),Iv(),Hv()}}function Bv(){if(Zt===1){Zt=0;var r=mi,a=eo,s=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||s){s=P.T,P.T=null;var c=Y.p;Y.p=2;var m=He;He|=4;try{kv(a,r);var g=oh,S=Cy(r.containerInfo),k=g.focusedElem,M=g.selectionRange;if(S!==k&&k&&k.ownerDocument&&Ty(k.ownerDocument.documentElement,k)){if(M!==null&&Nf(k)){var I=M.start,X=M.end;if(X===void 0&&(X=I),"selectionStart"in k)k.selectionStart=I,k.selectionEnd=Math.min(X,k.value.length);else{var ee=k.ownerDocument||document,H=ee&&ee.defaultView||window;if(H.getSelection){var F=H.getSelection(),fe=k.textContent.length,we=Math.min(M.start,fe),et=M.end===void 0?we:Math.min(M.end,fe);!F.extend&&we>et&&(S=et,et=we,we=S);var U=Ey(k,we),D=Ey(k,et);if(U&&D&&(F.rangeCount!==1||F.anchorNode!==U.node||F.anchorOffset!==U.offset||F.focusNode!==D.node||F.focusOffset!==D.offset)){var B=ee.createRange();B.setStart(U.node,U.offset),F.removeAllRanges(),we>et?(F.addRange(B),F.extend(D.node,D.offset)):(B.setEnd(D.node,D.offset),F.addRange(B))}}}}for(ee=[],F=k;F=F.parentNode;)F.nodeType===1&&ee.push({element:F,left:F.scrollLeft,top:F.scrollTop});for(typeof k.focus=="function"&&k.focus(),k=0;k<ee.length;k++){var W=ee[k];W.element.scrollLeft=W.left,W.element.scrollTop=W.top}}Bu=!!ah,oh=ah=null}finally{He=m,Y.p=c,P.T=s}}r.current=a,Zt=2}}function Iv(){if(Zt===2){Zt=0;var r=mi,a=eo,s=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||s){s=P.T,P.T=null;var c=Y.p;Y.p=2;var m=He;He|=4;try{yv(r,a.alternate,a)}finally{He=m,Y.p=c,P.T=s}}Zt=3}}function Hv(){if(Zt===4||Zt===3){Zt=0,Pt();var r=mi,a=eo,s=Ir,c=jv;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?Zt=5:(Zt=0,eo=mi=null,Fv(r,r.pendingLanes));var m=r.pendingLanes;if(m===0&&(hi=null),df(s),a=a.stateNode,Vt&&typeof Vt.onCommitFiberRoot=="function")try{Vt.onCommitFiberRoot(sn,a,void 0,(a.current.flags&128)===128)}catch{}if(c!==null){a=P.T,m=Y.p,Y.p=2,P.T=null;try{for(var g=r.onRecoverableError,S=0;S<c.length;S++){var k=c[S];g(k.value,{componentStack:k.stack})}}finally{P.T=a,Y.p=m}}(Ir&3)!==0&&ju(),xr(r),m=r.pendingLanes,(s&261930)!==0&&(m&42)!==0?r===qd?Ns++:(Ns=0,qd=r):Ns=0,Os(0)}}function Fv(r,a){(r.pooledCacheLanes&=a)===0&&(a=r.pooledCache,a!=null&&(r.pooledCache=null,ds(a)))}function ju(){return Bv(),Iv(),Hv(),qv()}function qv(){if(Zt!==5)return!1;var r=mi,a=Hd;Hd=0;var s=df(Ir),c=P.T,m=Y.p;try{Y.p=32>s?32:s,P.T=null,s=Fd,Fd=null;var g=mi,S=Ir;if(Zt=0,eo=mi=null,Ir=0,(He&6)!==0)throw Error(i(331));var k=He;if(He|=4,Tv(g.current),zv(g,g.current,S,s),He=k,Os(0,!1),Vt&&typeof Vt.onPostCommitFiberRoot=="function")try{Vt.onPostCommitFiberRoot(sn,g)}catch{}return!0}finally{Y.p=m,P.T=c,Fv(r,a)}}function Gv(r,a,s){a=Hn(s,a),a=zd(r.stateNode,a,2),r=si(r,a,2),r!==null&&(Qo(r,2),xr(r))}function Xe(r,a,s){if(r.tag===3)Gv(r,r,s);else for(;a!==null;){if(a.tag===3){Gv(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=Hn(s,r),s=Yx(2),c=si(a,s,2),c!==null&&(Xx(s,c,a,r),Qo(c,2),xr(c));break}}a=a.return}}function Xd(r,a,s){var c=r.pingCache;if(c===null){c=r.pingCache=new tT;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)||(Zd=!0,m.add(s),r=oT.bind(null,r,a,s),a.then(r,r))}function oT(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&&(zt===4||zt===3&&($e&62914560)===$e&&300>lt()-zu?(He&2)===0&&to(r,0):Bd|=s,Wa===$e&&(Wa=0)),xr(r)}function Yv(r,a){a===0&&(a=Bg()),r=Fi(r,a),r!==null&&(Qo(r,a),xr(r))}function sT(r){var a=r.memoizedState,s=0;a!==null&&(s=a.retryLane),Yv(r,s)}function lT(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),Yv(r,s)}function uT(r,a){return Ht(r,a)}var Nu=null,ro=null,Kd=!1,Ou=!1,Jd=!1,gi=0;function xr(r){r!==ro&&r.next===null&&(ro===null?Nu=ro=r:ro=ro.next=r),Ou=!0,Kd||(Kd=!0,fT())}function Os(r,a){if(!Jd&&Ou){Jd=!0;do for(var s=!1,c=Nu;c!==null;){if(r!==0){var m=c.pendingLanes;if(m===0)var g=0;else{var S=c.suspendedLanes,k=c.pingedLanes;g=(1<<31-nt(42|r)+1)-1,g&=m&~(S&~k),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(s=!0,Qv(c,g))}else g=$e,g=$l(c,c===rt?g:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(g&3)===0||Jo(c,g)||(s=!0,Qv(c,g));c=c.next}while(s);Jd=!1}}function cT(){Xv()}function Xv(){Ou=Kd=!1;var r=0;gi!==0&&ST()&&(r=gi);for(var a=lt(),s=null,c=Nu;c!==null;){var m=c.next,g=Kv(c,a);g===0?(c.next=null,s===null?Nu=m:s.next=m,m===null&&(ro=s)):(s=c,(r!==0||(g&3)!==0)&&(Ou=!0)),c=m}Zt!==0&&Zt!==5||Os(r),gi!==0&&(gi=0)}function Kv(r,a){for(var s=r.suspendedLanes,c=r.pingedLanes,m=r.expirationTimes,g=r.pendingLanes&-62914561;0<g;){var S=31-nt(g),k=1<<S,M=m[S];M===-1?((k&s)===0||(k&c)!==0)&&(m[S]=L2(k,a)):M<=a&&(r.expiredLanes|=k),g&=~k}if(a=rt,s=$e,s=$l(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&&Vn(c),r.callbackNode=null,r.callbackPriority=0;if((s&3)===0||Jo(r,s)){if(a=s&-s,a===r.callbackPriority)return a;switch(c!==null&&Vn(c),df(s)){case 2:case 8:s=se;break;case 32:s=ye;break;case 268435456:s=Pe;break;default:s=ye}return c=Jv.bind(null,r),s=Ht(s,c),r.callbackPriority=a,r.callbackNode=s,a}return c!==null&&c!==null&&Vn(c),r.callbackPriority=2,r.callbackNode=null,2}function Jv(r,a){if(Zt!==0&&Zt!==5)return r.callbackNode=null,r.callbackPriority=0,null;var s=r.callbackNode;if(ju()&&r.callbackNode!==s)return null;var c=$e;return c=$l(r,r===rt?c:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),c===0?null:(Ov(r,c,a),Kv(r,lt()),r.callbackNode!=null&&r.callbackNode===s?Jv.bind(null,r):null)}function Qv(r,a){if(ju())return null;Ov(r,a,!0)}function fT(){wT(function(){(He&6)!==0?Ht(J,cT):Xv()})}function Qd(){if(gi===0){var r=Ba;r===0&&(r=Rl,Rl<<=1,(Rl&261888)===0&&(Rl=256)),gi=r}return gi}function Wv(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:Vl(""+r)}function eb(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 dT(r,a,s,c,m){if(a==="submit"&&s&&s.stateNode===m){var g=Wv((m[pn]||null).action),S=c.submitter;S&&(a=(a=S[pn]||null)?Wv(a.formAction):S.getAttribute("formAction"),a!==null&&(g=a,S=null));var k=new Hl("action","action",null,c,m);r.push({event:k,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(gi!==0){var M=S?eb(m,S):new FormData(m);xd(s,{pending:!0,data:M,method:m.method,action:g},null,M)}}else typeof g=="function"&&(k.preventDefault(),M=S?eb(m,S):new FormData(m),xd(s,{pending:!0,data:M,method:m.method,action:g},g,M))},currentTarget:m}]})}}for(var Wd=0;Wd<Df.length;Wd++){var eh=Df[Wd],hT=eh.toLowerCase(),mT=eh[0].toUpperCase()+eh.slice(1);sr(hT,"on"+mT)}sr(Ny,"onAnimationEnd"),sr(Oy,"onAnimationIteration"),sr(Ry,"onAnimationStart"),sr("dblclick","onDoubleClick"),sr("focusin","onFocus"),sr("focusout","onBlur"),sr(jE,"onTransitionRun"),sr(NE,"onTransitionStart"),sr(OE,"onTransitionCancel"),sr(My,"onTransitionEnd"),Ca("onMouseEnter",["mouseout","mouseover"]),Ca("onMouseLeave",["mouseout","mouseover"]),Ca("onPointerEnter",["pointerout","pointerover"]),Ca("onPointerLeave",["pointerout","pointerover"]),Zi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Zi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Zi("onBeforeInput",["compositionend","keypress","textInput","paste"]),Zi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Zi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Zi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Rs="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(" "),pT=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Rs));function tb(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 k=c[S],M=k.instance,I=k.currentTarget;if(k=k.listener,M!==g&&m.isPropagationStopped())break e;g=k,m.currentTarget=I;try{g(m)}catch(X){Gl(X)}m.currentTarget=null,g=M}else for(S=0;S<c.length;S++){if(k=c[S],M=k.instance,I=k.currentTarget,k=k.listener,M!==g&&m.isPropagationStopped())break e;g=k,m.currentTarget=I;try{g(m)}catch(X){Gl(X)}m.currentTarget=null,g=M}}}}function Me(r,a){var s=a[hf];s===void 0&&(s=a[hf]=new Set);var c=r+"__bubble";s.has(c)||(nb(a,r,2,!1),s.add(c))}function th(r,a,s){var c=0;a&&(c|=4),nb(s,r,c,a)}var Ru="_reactListening"+Math.random().toString(36).slice(2);function nh(r){if(!r[Ru]){r[Ru]=!0,Xg.forEach(function(s){s!=="selectionchange"&&(pT.has(s)||th(s,!1,r),th(s,!0,r))});var a=r.nodeType===9?r:r.ownerDocument;a===null||a[Ru]||(a[Ru]=!0,th("selectionchange",!1,a))}}function nb(r,a,s,c){switch(Nb(a)){case 2:var m=IT;break;case 8:m=HT;break;default:m=yh}s=m.bind(null,a,s,r),m=void 0,!kf||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 rh(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 k=c.stateNode.containerInfo;if(k===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(;k!==null;){if(S=_a(k),S===null)return;if(M=S.tag,M===5||M===6||M===26||M===27){c=g=S;continue e}k=k.parentNode}}c=c.return}sy(function(){var I=g,X=bf(s),ee=[];e:{var H=Dy.get(r);if(H!==void 0){var F=Hl,fe=r;switch(r){case"keypress":if(Bl(s)===0)break e;case"keydown":case"keyup":F=lE;break;case"focusin":fe="focus",F=Ef;break;case"focusout":fe="blur",F=Ef;break;case"beforeblur":case"afterblur":F=Ef;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":F=cy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":F=K2;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":F=fE;break;case Ny:case Oy:case Ry:F=W2;break;case My:F=hE;break;case"scroll":case"scrollend":F=Y2;break;case"wheel":F=pE;break;case"copy":case"cut":case"paste":F=tE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":F=dy;break;case"toggle":case"beforetoggle":F=yE}var we=(a&4)!==0,et=!we&&(r==="scroll"||r==="scrollend"),U=we?H!==null?H+"Capture":null:H;we=[];for(var D=I,B;D!==null;){var W=D;if(B=W.stateNode,W=W.tag,W!==5&&W!==26&&W!==27||B===null||U===null||(W=ts(D,U),W!=null&&we.push(Ms(D,W,B))),et)break;D=D.return}0<we.length&&(H=new F(H,fe,null,s,X),ee.push({event:H,listeners:we}))}}if((a&7)===0){e:{if(H=r==="mouseover"||r==="pointerover",F=r==="mouseout"||r==="pointerout",H&&s!==vf&&(fe=s.relatedTarget||s.fromElement)&&(_a(fe)||fe[za]))break e;if((F||H)&&(H=X.window===X?X:(H=X.ownerDocument)?H.defaultView||H.parentWindow:window,F?(fe=s.relatedTarget||s.toElement,F=I,fe=fe?_a(fe):null,fe!==null&&(et=u(fe),we=fe.tag,fe!==et||we!==5&&we!==27&&we!==6)&&(fe=null)):(F=null,fe=I),F!==fe)){if(we=cy,W="onMouseLeave",U="onMouseEnter",D="mouse",(r==="pointerout"||r==="pointerover")&&(we=dy,W="onPointerLeave",U="onPointerEnter",D="pointer"),et=F==null?H:es(F),B=fe==null?H:es(fe),H=new we(W,D+"leave",F,s,X),H.target=et,H.relatedTarget=B,W=null,_a(X)===I&&(we=new we(U,D+"enter",fe,s,X),we.target=B,we.relatedTarget=et,W=we),et=W,F&&fe)t:{for(we=gT,U=F,D=fe,B=0,W=U;W;W=we(W))B++;W=0;for(var Se=D;Se;Se=we(Se))W++;for(;0<B-W;)U=we(U),B--;for(;0<W-B;)D=we(D),W--;for(;B--;){if(U===D||D!==null&&U===D.alternate){we=U;break t}U=we(U),D=we(D)}we=null}else we=null;F!==null&&rb(ee,H,F,we,!1),fe!==null&&et!==null&&rb(ee,et,fe,we,!0)}}e:{if(H=I?es(I):window,F=H.nodeName&&H.nodeName.toLowerCase(),F==="select"||F==="input"&&H.type==="file")var Be=by;else if(xy(H))if(Sy)Be=TE;else{Be=_E;var xe=zE}else F=H.nodeName,!F||F.toLowerCase()!=="input"||H.type!=="checkbox"&&H.type!=="radio"?I&&xf(I.elementType)&&(Be=by):Be=EE;if(Be&&(Be=Be(r,I))){vy(ee,Be,s,X);break e}xe&&xe(r,H,I),r==="focusout"&&I&&H.type==="number"&&I.memoizedProps.value!=null&&yf(H,"number",H.value)}switch(xe=I?es(I):window,r){case"focusin":(xy(xe)||xe.contentEditable==="true")&&(Ma=xe,Of=I,us=null);break;case"focusout":us=Of=Ma=null;break;case"mousedown":Rf=!0;break;case"contextmenu":case"mouseup":case"dragend":Rf=!1,Ay(ee,s,X);break;case"selectionchange":if(AE)break;case"keydown":case"keyup":Ay(ee,s,X)}var Ae;if(Cf)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 Ra?gy(r,s)&&(Le="onCompositionEnd"):r==="keydown"&&s.keyCode===229&&(Le="onCompositionStart");Le&&(hy&&s.locale!=="ko"&&(Ra||Le!=="onCompositionStart"?Le==="onCompositionEnd"&&Ra&&(Ae=ly()):(ei=X,wf="value"in ei?ei.value:ei.textContent,Ra=!0)),xe=Mu(I,Le),0<xe.length&&(Le=new fy(Le,r,null,s,X),ee.push({event:Le,listeners:xe}),Ae?Le.data=Ae:(Ae=yy(s),Ae!==null&&(Le.data=Ae)))),(Ae=vE?bE(r,s):SE(r,s))&&(Le=Mu(I,"onBeforeInput"),0<Le.length&&(xe=new fy("onBeforeInput","beforeinput",null,s,X),ee.push({event:xe,listeners:Le}),xe.data=Ae)),dT(ee,r,I,s,X)}tb(ee,a)})}function Ms(r,a,s){return{instance:r,listener:a,currentTarget:s}}function Mu(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=ts(r,s),m!=null&&c.unshift(Ms(r,m,g)),m=ts(r,a),m!=null&&c.push(Ms(r,m,g))),r.tag===3)return c;r=r.return}return[]}function gT(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function rb(r,a,s,c,m){for(var g=a._reactName,S=[];s!==null&&s!==c;){var k=s,M=k.alternate,I=k.stateNode;if(k=k.tag,M!==null&&M===c)break;k!==5&&k!==26&&k!==27||I===null||(M=I,m?(I=ts(s,g),I!=null&&S.unshift(Ms(s,I,M))):m||(I=ts(s,g),I!=null&&S.push(Ms(s,I,M)))),s=s.return}S.length!==0&&r.push({event:a,listeners:S})}var yT=/\r\n?/g,xT=/\u0000|\uFFFD/g;function ib(r){return(typeof r=="string"?r:""+r).replace(yT,`
|
|
9
|
+
`).replace(xT,"")}function ab(r,a){return a=ib(a),ib(r)===a}function We(r,a,s,c,m,g){switch(s){case"children":typeof c=="string"?a==="body"||a==="textarea"&&c===""||ja(r,c):(typeof c=="number"||typeof c=="bigint")&&a!=="body"&&ja(r,""+c);break;case"className":Ul(r,"class",c);break;case"tabIndex":Ul(r,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":Ul(r,s,c);break;case"style":ay(r,c,g);break;case"data":if(a!=="object"){Ul(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=Vl(""+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=Vl(""+c),r.setAttribute(s,c);break;case"onClick":c!=null&&(r.onclick=Cr);break;case"onScroll":c!=null&&Me("scroll",r);break;case"onScrollEnd":c!=null&&Me("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=Vl(""+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":Me("beforetoggle",r),Me("toggle",r),Ll(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":Ll(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=q2.get(s)||s,Ll(r,s,c))}}function ih(r,a,s,c,m,g){switch(s){case"style":ay(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"?ja(r,c):(typeof c=="number"||typeof c=="bigint")&&ja(r,""+c);break;case"onScroll":c!=null&&Me("scroll",r);break;case"onScrollEnd":c!=null&&Me("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(!Kg.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[pn]||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,""):Ll(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":Me("error",r),Me("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":Me("invalid",r);var k=g=S=m=null,M=null,I=null;for(c in s)if(s.hasOwnProperty(c)){var X=s[c];if(X!=null)switch(c){case"name":m=X;break;case"type":S=X;break;case"checked":M=X;break;case"defaultChecked":I=X;break;case"value":g=X;break;case"defaultValue":k=X;break;case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(i(137,a));break;default:We(r,a,c,X,s,null)}}ty(r,g,k,M,I,S,m,!1);return;case"select":Me("invalid",r),c=S=g=null;for(m in s)if(s.hasOwnProperty(m)&&(k=s[m],k!=null))switch(m){case"value":g=k;break;case"defaultValue":S=k;break;case"multiple":c=k;default:We(r,a,m,k,s,null)}a=g,s=S,r.multiple=!!c,a!=null?Aa(r,!!c,a,!1):s!=null&&Aa(r,!!c,s,!0);return;case"textarea":Me("invalid",r),g=m=c=null;for(S in s)if(s.hasOwnProperty(S)&&(k=s[S],k!=null))switch(S){case"value":c=k;break;case"defaultValue":m=k;break;case"children":g=k;break;case"dangerouslySetInnerHTML":if(k!=null)throw Error(i(91));break;default:We(r,a,S,k,s,null)}ry(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":Me("beforetoggle",r),Me("toggle",r),Me("cancel",r),Me("close",r);break;case"iframe":case"object":Me("load",r);break;case"video":case"audio":for(c=0;c<Rs.length;c++)Me(Rs[c],r);break;case"image":Me("error",r),Me("load",r);break;case"details":Me("toggle",r);break;case"embed":case"source":case"link":Me("error",r),Me("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(I in s)if(s.hasOwnProperty(I)&&(c=s[I],c!=null))switch(I){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:We(r,a,I,c,s,null)}return;default:if(xf(a)){for(X in s)s.hasOwnProperty(X)&&(c=s[X],c!==void 0&&ih(r,a,X,c,s,void 0));return}}for(k in s)s.hasOwnProperty(k)&&(c=s[k],c!=null&&We(r,a,k,c,s,null))}function vT(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,k=null,M=null,I=null,X=null;for(F in s){var ee=s[F];if(s.hasOwnProperty(F)&&ee!=null)switch(F){case"checked":break;case"value":break;case"defaultValue":M=ee;default:c.hasOwnProperty(F)||We(r,a,F,null,c,ee)}}for(var H in c){var F=c[H];if(ee=s[H],c.hasOwnProperty(H)&&(F!=null||ee!=null))switch(H){case"type":g=F;break;case"name":m=F;break;case"checked":I=F;break;case"defaultChecked":X=F;break;case"value":S=F;break;case"defaultValue":k=F;break;case"children":case"dangerouslySetInnerHTML":if(F!=null)throw Error(i(137,a));break;default:F!==ee&&We(r,a,H,F,c,ee)}}gf(r,S,k,M,I,X,g,m);return;case"select":F=S=k=H=null;for(g in s)if(M=s[g],s.hasOwnProperty(g)&&M!=null)switch(g){case"value":break;case"multiple":F=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":H=g;break;case"defaultValue":k=g;break;case"multiple":S=g;default:g!==M&&We(r,a,m,g,c,M)}a=k,s=S,c=F,H!=null?Aa(r,!!s,H,!1):!!c!=!!s&&(a!=null?Aa(r,!!s,a,!0):Aa(r,!!s,s?[]:"",!1));return;case"textarea":F=H=null;for(k in s)if(m=s[k],s.hasOwnProperty(k)&&m!=null&&!c.hasOwnProperty(k))switch(k){case"value":break;case"children":break;default:We(r,a,k,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":H=m;break;case"defaultValue":F=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)}ny(r,H,F);return;case"option":for(var fe in s)H=s[fe],s.hasOwnProperty(fe)&&H!=null&&!c.hasOwnProperty(fe)&&(fe==="selected"?r.selected=!1:We(r,a,fe,null,c,H));for(M in c)H=c[M],F=s[M],c.hasOwnProperty(M)&&H!==F&&(H!=null||F!=null)&&(M==="selected"?r.selected=H&&typeof H!="function"&&typeof H!="symbol":We(r,a,M,H,c,F));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 we in s)H=s[we],s.hasOwnProperty(we)&&H!=null&&!c.hasOwnProperty(we)&&We(r,a,we,null,c,H);for(I in c)if(H=c[I],F=s[I],c.hasOwnProperty(I)&&H!==F&&(H!=null||F!=null))switch(I){case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(i(137,a));break;default:We(r,a,I,H,c,F)}return;default:if(xf(a)){for(var et in s)H=s[et],s.hasOwnProperty(et)&&H!==void 0&&!c.hasOwnProperty(et)&&ih(r,a,et,void 0,c,H);for(X in c)H=c[X],F=s[X],!c.hasOwnProperty(X)||H===F||H===void 0&&F===void 0||ih(r,a,X,H,c,F);return}}for(var U in s)H=s[U],s.hasOwnProperty(U)&&H!=null&&!c.hasOwnProperty(U)&&We(r,a,U,null,c,H);for(ee in c)H=c[ee],F=s[ee],!c.hasOwnProperty(ee)||H===F||H==null&&F==null||We(r,a,ee,H,c,F)}function ob(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function bT(){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,k=m.duration;if(g&&k&&ob(S)){for(S=0,k=m.responseEnd,c+=1;c<s.length;c++){var M=s[c],I=M.startTime;if(I>k)break;var X=M.transferSize,ee=M.initiatorType;X&&ob(ee)&&(M=M.responseEnd,S+=X*(M<k?1:(k-I)/(M-I)))}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 ah=null,oh=null;function Du(r){return r.nodeType===9?r:r.ownerDocument}function sb(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 lb(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 sh(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 lh=null;function ST(){var r=window.event;return r&&r.type==="popstate"?r===lh?!1:(lh=r,!0):(lh=null,!1)}var ub=typeof setTimeout=="function"?setTimeout:void 0,kT=typeof clearTimeout=="function"?clearTimeout:void 0,cb=typeof Promise=="function"?Promise:void 0,wT=typeof queueMicrotask=="function"?queueMicrotask:typeof cb<"u"?function(r){return cb.resolve(null).then(r).catch(zT)}:ub;function zT(r){setTimeout(function(){throw r})}function yi(r){return r==="head"}function fb(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),so(a);return}c--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")c++;else if(s==="html")Ds(r.ownerDocument.documentElement);else if(s==="head"){s=r.ownerDocument.head,Ds(s);for(var g=s.firstChild;g;){var S=g.nextSibling,k=g.nodeName;g[Wo]||k==="SCRIPT"||k==="STYLE"||k==="LINK"&&g.rel.toLowerCase()==="stylesheet"||s.removeChild(g),g=S}}else s==="body"&&Ds(r.ownerDocument.body);s=m}while(s);so(a)}function db(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 uh(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":uh(s),mf(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}r.removeChild(s)}}function _T(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[Wo])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=Xn(r.nextSibling),r===null)break}return null}function ET(r,a,s){if(a==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!s||(r=Xn(r.nextSibling),r===null))return null;return r}function hb(r,a){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!a||(r=Xn(r.nextSibling),r===null))return null;return r}function ch(r){return r.data==="$?"||r.data==="$~"}function fh(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function TT(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 Xn(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 dh=null;function mb(r){r=r.nextSibling;for(var a=0;r;){if(r.nodeType===8){var s=r.data;if(s==="/$"||s==="/&"){if(a===0)return Xn(r.nextSibling);a--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||a++}r=r.nextSibling}return null}function pb(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 gb(r,a,s){switch(a=Du(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 Ds(r){for(var a=r.attributes;a.length;)r.removeAttributeNode(a[0]);mf(r)}var Kn=new Map,yb=new Set;function $u(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var Hr=Y.d;Y.d={f:CT,r:AT,D:jT,C:NT,L:OT,m:RT,X:DT,S:MT,M:$T};function CT(){var r=Hr.f(),a=Tu();return r||a}function AT(r){var a=Ea(r);a!==null&&a.tag===5&&a.type==="form"?Mx(a):Hr.r(r)}var io=typeof document>"u"?null:document;function xb(r,a,s){var c=io;if(c&&typeof a=="string"&&a){var m=Bn(a);m='link[rel="'+r+'"][href="'+m+'"]',typeof s=="string"&&(m+='[crossorigin="'+s+'"]'),yb.has(m)||(yb.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 jT(r){Hr.D(r),xb("dns-prefetch",r,null)}function NT(r,a){Hr.C(r,a),xb("preconnect",r,a)}function OT(r,a,s){Hr.L(r,a,s);var c=io;if(c&&r&&a){var m='link[rel="preload"][as="'+Bn(a)+'"]';a==="image"&&s&&s.imageSrcSet?(m+='[imagesrcset="'+Bn(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(m+='[imagesizes="'+Bn(s.imageSizes)+'"]')):m+='[href="'+Bn(r)+'"]';var g=m;switch(a){case"style":g=ao(r);break;case"script":g=oo(r)}Kn.has(g)||(r=y({rel:"preload",href:a==="image"&&s&&s.imageSrcSet?void 0:r,as:a},s),Kn.set(g,r),c.querySelector(m)!==null||a==="style"&&c.querySelector($s(g))||a==="script"&&c.querySelector(Ls(g))||(a=c.createElement("link"),Jt(a,"link",r),Ft(a),c.head.appendChild(a)))}}function RT(r,a){Hr.m(r,a);var s=io;if(s&&r){var c=a&&typeof a.as=="string"?a.as:"script",m='link[rel="modulepreload"][as="'+Bn(c)+'"][href="'+Bn(r)+'"]',g=m;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=oo(r)}if(!Kn.has(g)&&(r=y({rel:"modulepreload",href:r},a),Kn.set(g,r),s.querySelector(m)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(Ls(g)))return}c=s.createElement("link"),Jt(c,"link",r),Ft(c),s.head.appendChild(c)}}}function MT(r,a,s){Hr.S(r,a,s);var c=io;if(c&&r){var m=Ta(c).hoistableStyles,g=ao(r);a=a||"default";var S=m.get(g);if(!S){var k={loading:0,preload:null};if(S=c.querySelector($s(g)))k.loading=5;else{r=y({rel:"stylesheet",href:r,"data-precedence":a},s),(s=Kn.get(g))&&hh(r,s);var M=S=c.createElement("link");Ft(M),Jt(M,"link",r),M._p=new Promise(function(I,X){M.onload=I,M.onerror=X}),M.addEventListener("load",function(){k.loading|=1}),M.addEventListener("error",function(){k.loading|=2}),k.loading|=4,Lu(S,a,c)}S={type:"stylesheet",instance:S,count:1,state:k},m.set(g,S)}}}function DT(r,a){Hr.X(r,a);var s=io;if(s&&r){var c=Ta(s).hoistableScripts,m=oo(r),g=c.get(m);g||(g=s.querySelector(Ls(m)),g||(r=y({src:r,async:!0},a),(a=Kn.get(m))&&mh(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 $T(r,a){Hr.M(r,a);var s=io;if(s&&r){var c=Ta(s).hoistableScripts,m=oo(r),g=c.get(m);g||(g=s.querySelector(Ls(m)),g||(r=y({src:r,async:!0,type:"module"},a),(a=Kn.get(m))&&mh(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 vb(r,a,s,c){var m=(m=pe.current)?$u(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=ao(s.href),s=Ta(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=ao(s.href);var g=Ta(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($s(r)))&&!g._p&&(S.instance=g,S.state.loading=5),Kn.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},Kn.set(r,s),g||LT(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=oo(s),s=Ta(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 ao(r){return'href="'+Bn(r)+'"'}function $s(r){return'link[rel="stylesheet"]['+r+"]"}function bb(r){return y({},r,{"data-precedence":r.precedence,precedence:null})}function LT(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 oo(r){return'[src="'+Bn(r)+'"]'}function Ls(r){return"script[async]"+r}function Sb(r,a,s){if(a.count++,a.instance===null)switch(a.type){case"style":var c=r.querySelector('style[data-href~="'+Bn(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),Lu(c,s.precedence,r),a.instance=c;case"stylesheet":m=ao(s.href);var g=r.querySelector($s(m));if(g)return a.state.loading|=4,a.instance=g,Ft(g),g;c=bb(s),(m=Kn.get(m))&&hh(c,m),g=(r.ownerDocument||r).createElement("link"),Ft(g);var S=g;return S._p=new Promise(function(k,M){S.onload=k,S.onerror=M}),Jt(g,"link",c),a.state.loading|=4,Lu(g,s.precedence,r),a.instance=g;case"script":return g=oo(s.src),(m=r.querySelector(Ls(g)))?(a.instance=m,Ft(m),m):(c=s,(m=Kn.get(g))&&(c=y({},s),mh(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,Lu(c,s.precedence,r));return a.instance}function Lu(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 k=c[S];if(k.dataset.precedence===a)g=k;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 hh(r,a){r.crossOrigin==null&&(r.crossOrigin=a.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=a.referrerPolicy),r.title==null&&(r.title=a.title)}function mh(r,a){r.crossOrigin==null&&(r.crossOrigin=a.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=a.referrerPolicy),r.integrity==null&&(r.integrity=a.integrity)}var Uu=null;function kb(r,a,s){if(Uu===null){var c=new Map,m=Uu=new Map;m.set(s,c)}else m=Uu,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[Wo]||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 k=c.get(S);k?k.push(g):c.set(S,[g])}}return c}function wb(r,a,s){r=r.ownerDocument||r,r.head.insertBefore(s,a==="title"?r.querySelector("head > title"):null)}function UT(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 zb(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function PT(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=ao(c.href),g=a.querySelector($s(m));if(g){a=g._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(r.count++,r=Pu.bind(r),a.then(r,r)),s.state.loading|=4,s.instance=g,Ft(g);return}g=a.ownerDocument||a,c=bb(c),(m=Kn.get(m))&&hh(c,m),g=g.createElement("link"),Ft(g);var S=g;S._p=new Promise(function(k,M){S.onload=k,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=Pu.bind(r),a.addEventListener("load",s),a.addEventListener("error",s))}}var ph=0;function VT(r,a){return r.stylesheets&&r.count===0&&Zu(r,r.stylesheets),0<r.count||0<r.imgCount?function(s){var c=setTimeout(function(){if(r.stylesheets&&Zu(r,r.stylesheets),r.unsuspend){var g=r.unsuspend;r.unsuspend=null,g()}},6e4+a);0<r.imgBytes&&ph===0&&(ph=62500*bT());var m=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&Zu(r,r.stylesheets),r.unsuspend)){var g=r.unsuspend;r.unsuspend=null,g()}},(r.imgBytes>ph?50:800)+a);return r.unsuspend=s,function(){r.unsuspend=null,clearTimeout(c),clearTimeout(m)}}:null}function Pu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Zu(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var Vu=null;function Zu(r,a){r.stylesheets=null,r.unsuspend!==null&&(r.count++,Vu=new Map,a.forEach(ZT,r),Vu=null,Pu.call(r))}function ZT(r,a){if(!(a.state.loading&4)){var s=Vu.get(r);if(s)var c=s.get(null);else{s=new Map,Vu.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=Pu.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 Us={$$typeof:z,Provider:null,Consumer:null,_currentValue:Z,_currentValue2:Z,_threadCount:0};function BT(r,a,s,c,m,g,S,k,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=cf(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=cf(0),this.hiddenUpdates=cf(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 _b(r,a,s,c,m,g,S,k,M,I,X,ee){return r=new BT(r,a,s,S,M,I,X,ee,k),a=1,g===!0&&(a|=24),g=An(3,null,null,a),r.current=g,g.stateNode=r,a=Yf(),a.refCount++,r.pooledCache=a,a.refCount++,g.memoizedState={element:c,isDehydrated:s,cache:a},Qf(g),r}function Eb(r){return r?(r=La,r):La}function Tb(r,a,s,c,m,g){m=Eb(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&&(Sn(s,r,a),gs(s,r,a))}function Cb(r,a){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var s=r.retryLane;r.retryLane=s!==0&&s<a?s:a}}function gh(r,a){Cb(r,a),(r=r.alternate)&&Cb(r,a)}function Ab(r){if(r.tag===13||r.tag===31){var a=Fi(r,67108864);a!==null&&Sn(a,r,67108864),gh(r,67108864)}}function jb(r){if(r.tag===13||r.tag===31){var a=Mn();a=ff(a);var s=Fi(r,a);s!==null&&Sn(s,r,a),gh(r,a)}}var Bu=!0;function IT(r,a,s,c){var m=P.T;P.T=null;var g=Y.p;try{Y.p=2,yh(r,a,s,c)}finally{Y.p=g,P.T=m}}function HT(r,a,s,c){var m=P.T;P.T=null;var g=Y.p;try{Y.p=8,yh(r,a,s,c)}finally{Y.p=g,P.T=m}}function yh(r,a,s,c){if(Bu){var m=xh(c);if(m===null)rh(r,a,c,Iu,s),Ob(r,c);else if(qT(m,r,a,s,c))c.stopPropagation();else if(Ob(r,c),a&4&&-1<FT.indexOf(r)){for(;m!==null;){var g=Ea(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 k=g;for(k.pendingLanes|=2,k.entangledLanes|=2;S;){var M=1<<31-nt(S);k.entanglements[1]|=M,S&=~M}xr(g),(He&6)===0&&(_u=lt()+500,Os(0))}}break;case 31:case 13:k=Fi(g,2),k!==null&&Sn(k,g,2),Tu(),gh(g,2)}if(g=xh(c),g===null&&rh(r,a,c,Iu,s),g===m)break;m=g}m!==null&&c.stopPropagation()}else rh(r,a,c,null,s)}}function xh(r){return r=bf(r),vh(r)}var Iu=null;function vh(r){if(Iu=null,r=_a(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 Iu=r,null}function Nb(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(wa()){case J:return 2;case se:return 8;case ye:case ze:return 32;case Pe:return 268435456;default:return 32}default:return 32}}var bh=!1,xi=null,vi=null,bi=null,Ps=new Map,Vs=new Map,Si=[],FT="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 Ob(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":Ps.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":Vs.delete(a.pointerId)}}function Zs(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=Ea(a),a!==null&&Ab(a)),r):(r.eventSystemFlags|=c,a=r.targetContainers,m!==null&&a.indexOf(m)===-1&&a.push(m),r)}function qT(r,a,s,c,m){switch(a){case"focusin":return xi=Zs(xi,r,a,s,c,m),!0;case"dragenter":return vi=Zs(vi,r,a,s,c,m),!0;case"mouseover":return bi=Zs(bi,r,a,s,c,m),!0;case"pointerover":var g=m.pointerId;return Ps.set(g,Zs(Ps.get(g)||null,r,a,s,c,m)),!0;case"gotpointercapture":return g=m.pointerId,Vs.set(g,Zs(Vs.get(g)||null,r,a,s,c,m)),!0}return!1}function Rb(r){var a=_a(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,Gg(r.priority,function(){jb(s)});return}}else if(a===31){if(a=f(s),a!==null){r.blockedOn=a,Gg(r.priority,function(){jb(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 Hu(r){if(r.blockedOn!==null)return!1;for(var a=r.targetContainers;0<a.length;){var s=xh(r.nativeEvent);if(s===null){s=r.nativeEvent;var c=new s.constructor(s.type,s);vf=c,s.target.dispatchEvent(c),vf=null}else return a=Ea(s),a!==null&&Ab(a),r.blockedOn=s,!1;a.shift()}return!0}function Mb(r,a,s){Hu(r)&&s.delete(a)}function GT(){bh=!1,xi!==null&&Hu(xi)&&(xi=null),vi!==null&&Hu(vi)&&(vi=null),bi!==null&&Hu(bi)&&(bi=null),Ps.forEach(Mb),Vs.forEach(Mb)}function Fu(r,a){r.blockedOn===a&&(r.blockedOn=null,bh||(bh=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,GT)))}var qu=null;function Db(r){qu!==r&&(qu=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){qu===r&&(qu=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(vh(c||s)===null)continue;break}var g=Ea(s);g!==null&&(r.splice(a,3),a-=3,xd(g,{pending:!0,data:m,method:s.method,action:c},c,m))}}))}function so(r){function a(M){return Fu(M,r)}xi!==null&&Fu(xi,r),vi!==null&&Fu(vi,r),bi!==null&&Fu(bi,r),Ps.forEach(a),Vs.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);)Rb(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[pn]||null;if(typeof g=="function")S||Db(s);else if(S){var k=null;if(g&&g.hasAttribute("formAction")){if(m=g,S=g[pn]||null)k=S.formAction;else if(vh(m)!==null)continue}else k=S.action;typeof k=="function"?s[c+1]=k:(s.splice(c,3),c-=3),Db(s)}}}function $b(){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 Sh(r){this._internalRoot=r}Gu.prototype.render=Sh.prototype.render=function(r){var a=this._internalRoot;if(a===null)throw Error(i(409));var s=a.current,c=Mn();Tb(s,c,r,a,null,null)},Gu.prototype.unmount=Sh.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var a=r.containerInfo;Tb(r.current,2,null,r,null,null),Tu(),a[za]=null}};function Gu(r){this._internalRoot=r}Gu.prototype.unstable_scheduleHydration=function(r){if(r){var a=qg();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&&Rb(r)}};var Lb=t.version;if(Lb!=="19.2.4")throw Error(i(527,Lb,"19.2.4"));Y.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 YT={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:P,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Yu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Yu.isDisabled&&Yu.supportsFiber)try{sn=Yu.inject(YT),Vt=Yu}catch{}}return Is.createRoot=function(r,a){if(!o(r))throw Error(i(299));var s=!1,c="",m=Hx,g=Fx,S=qx;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=_b(r,1,!1,null,null,s,c,null,m,g,S,$b),r[za]=a.current,nh(r),new Sh(a)},Is.hydrateRoot=function(r,a,s){if(!o(r))throw Error(i(299));var c=!1,m="",g=Hx,S=Fx,k=qx,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&&(k=s.onRecoverableError),s.formState!==void 0&&(M=s.formState)),a=_b(r,1,!0,a,s??null,c,m,M,g,S,k,$b),a.context=Eb(null),s=a.current,c=Mn(),c=ff(c),m=oi(c),m.callback=null,si(s,m,c),s=c,a.current.lanes=s,Qo(a,s),xr(a),r[za]=a.current,nh(r),new Gu(a)},Is.version="19.2.4",Is}var Gb;function iC(){if(Gb)return zh.exports;Gb=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(),zh.exports=rC(),zh.exports}var aC=iC();var Yb="popstate";function oC(e={}){function t(i,o){let{pathname:u,search:l,hash:f}=i.location;return zm("",{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:cl(o)}return lC(t,n,null,e)}function pt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function dr(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function sC(){return Math.random().toString(36).substring(2,10)}function Xb(e,t){return{usr:e.state,key:e.key,idx:t}}function zm(e,t,n=null,i){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Po(t):t,state:n,key:t&&t.key||i||sC()}}function cl({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 Po(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 lC(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 C=p(),j=C==null?null:C-h;h=C,d&&d({action:f,location:T.location,delta:j})}function v(C,j){f="PUSH";let O=zm(T.location,C,j);h=p()+1;let z=Xb(O,h),R=T.createHref(O);try{l.pushState(z,"",R)}catch(L){if(L instanceof DOMException&&L.name==="DataCloneError")throw L;o.location.assign(R)}u&&d&&d({action:f,location:T.location,delta:1})}function b(C,j){f="REPLACE";let O=zm(T.location,C,j);h=p();let z=Xb(O,h),R=T.createHref(O);l.replaceState(z,"",R),u&&d&&d({action:f,location:T.location,delta:0})}function E(C){return uC(C)}let T={get action(){return f},get location(){return e(o,l)},listen(C){if(d)throw new Error("A history only accepts one active listener");return o.addEventListener(Yb,y),d=C,()=>{o.removeEventListener(Yb,y),d=null}},createHref(C){return t(o,C)},createURL:E,encodeLocation(C){let j=E(C);return{pathname:j.pathname,search:j.search,hash:j.hash}},push:v,replace:b,go(C){return l.go(C)}};return T}function uC(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),pt(n,"No window.location.(origin|href) available to create URL");let i=typeof e=="string"?e:cl(e);return i=i.replace(/ $/,"%20"),!t&&i.startsWith("//")&&(i=n+i),new URL(i,n)}function gk(e,t,n="/"){return cC(e,t,n,!1)}function cC(e,t,n,i){let o=typeof t=="string"?Po(t):t,u=Kr(o.pathname||"/",n);if(u==null)return null;let l=yk(e);fC(l);let f=null;for(let d=0;f==null&&d<l.length;++d){let h=kC(u);f=bC(l[d],h,i)}return f}function yk(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;pt(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]),v=n.concat(p);l.children&&l.children.length>0&&(pt(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${y}".`),yk(l.children,t,v,y,d)),!(l.path==null&&!l.index)&&t.push({path:y,score:xC(y,l.index),routesMeta:v})};return e.forEach((l,f)=>{if(l.path===""||!l.path?.includes("?"))u(l,f);else for(let d of xk(l.path))u(l,f,!0,d)}),t}function xk(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=xk(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 fC(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:vC(t.routesMeta.map(i=>i.childrenIndex),n.routesMeta.map(i=>i.childrenIndex)))}var dC=/^:[\w-]+$/,hC=3,mC=2,pC=1,gC=10,yC=-2,Kb=e=>e==="*";function xC(e,t){let n=e.split("/"),i=n.length;return n.some(Kb)&&(i+=yC),t&&(i+=mC),n.filter(o=>!Kb(o)).reduce((o,u)=>o+(dC.test(u)?hC:u===""?pC:gC),i)}function vC(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 bC(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=zc({path:d.relativePath,caseSensitive:d.caseSensitive,end:h},p),v=d.route;if(!y&&h&&n&&!i[i.length-1].route.index&&(y=zc({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:EC(Yr([u,y.pathnameBase])),route:v}),y.pathnameBase!=="/"&&(u=Yr([u,y.pathnameBase]))}return l}function zc(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,i]=SC(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},v)=>{if(p==="*"){let E=f[v]||"";l=u.slice(0,u.length-E.length).replace(/(.)\/+$/,"$1")}const b=f[v];return y&&!b?h[p]=void 0:h[p]=(b||"").replace(/%2F/g,"/"),h},{}),pathname:u,pathnameBase:l,pattern:e}}function SC(e,t=!1,n=!0){dr(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 kC(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return dr(!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 wC=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function zC(e,t="/"){let{pathname:n,search:i="",hash:o=""}=typeof e=="string"?Po(e):e,u;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?u=Jb(n.substring(1),"/"):u=Jb(n,t)):u=t,{pathname:u,search:TC(i),hash:CC(o)}}function Jb(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 Ch(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 _C(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function _p(e){let t=_C(e);return t.map((n,i)=>i===t.length-1?n.pathname:n.pathnameBase)}function Ep(e,t,n,i=!1){let o;typeof e=="string"?o=Po(e):(o={...e},pt(!o.pathname||!o.pathname.includes("?"),Ch("?","pathname","search",o)),pt(!o.pathname||!o.pathname.includes("#"),Ch("#","pathname","hash",o)),pt(!o.search||!o.search.includes("#"),Ch("#","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 v=l.split("/");for(;v[0]==="..";)v.shift(),y-=1;o.pathname=v.join("/")}f=y>=0?t[y]:"/"}let d=zC(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,"/"),EC=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),TC=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,CC=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,AC=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 jC(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function NC(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var vk=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function bk(e,t){let n=e;if(typeof n!="string"||!wC.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let i=n,o=!1;if(vk)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{dr(!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 Sk=["POST","PUT","PATCH","DELETE"];new Set(Sk);var OC=["GET",...Sk];new Set(OC);var Vo=_.createContext(null);Vo.displayName="DataRouter";var qc=_.createContext(null);qc.displayName="DataRouterState";var RC=_.createContext(!1),kk=_.createContext({isTransitioning:!1});kk.displayName="ViewTransition";var MC=_.createContext(new Map);MC.displayName="Fetchers";var DC=_.createContext(null);DC.displayName="Await";var Ln=_.createContext(null);Ln.displayName="Navigation";var zl=_.createContext(null);zl.displayName="Location";var _r=_.createContext({outlet:null,matches:[],isDataRoute:!1});_r.displayName="Route";var Tp=_.createContext(null);Tp.displayName="RouteError";var wk="REACT_ROUTER_ERROR",$C="REDIRECT",LC="ROUTE_ERROR_RESPONSE";function UC(e){if(e.startsWith(`${wk}:${$C}:{`))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 PC(e){if(e.startsWith(`${wk}:${LC}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new AC(t.status,t.statusText,t.data)}catch{}}function VC(e,{relative:t}={}){pt(Zo(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:i}=_.useContext(Ln),{hash:o,pathname:u,search:l}=_l(e,{relative:t}),f=u;return n!=="/"&&(f=u==="/"?n:Yr([n,u])),i.createHref({pathname:f,search:l,hash:o})}function Zo(){return _.useContext(zl)!=null}function hr(){return pt(Zo(),"useLocation() may be used only in the context of a <Router> component."),_.useContext(zl).location}var zk="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function _k(e){_.useContext(Ln).static||_.useLayoutEffect(e)}function Cp(){let{isDataRoute:e}=_.useContext(_r);return e?WC():ZC()}function ZC(){pt(Zo(),"useNavigate() may be used only in the context of a <Router> component.");let e=_.useContext(Vo),{basename:t,navigator:n}=_.useContext(Ln),{matches:i}=_.useContext(_r),{pathname:o}=hr(),u=JSON.stringify(_p(i)),l=_.useRef(!1);return _k(()=>{l.current=!0}),_.useCallback((d,h={})=>{if(dr(l.current,zk),!l.current)return;if(typeof d=="number"){n.go(d);return}let p=Ep(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])}_.createContext(null);function _l(e,{relative:t}={}){let{matches:n}=_.useContext(_r),{pathname:i}=hr(),o=JSON.stringify(_p(n));return _.useMemo(()=>Ep(e,JSON.parse(o),i,t==="path"),[e,o,i,t])}function BC(e,t){return Ek(e,t)}function Ek(e,t,n,i,o){pt(Zo(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:u}=_.useContext(Ln),{matches:l}=_.useContext(_r),f=l[l.length-1],d=f?f.params:{},h=f?f.pathname:"/",p=f?f.pathnameBase:"/",y=f&&f.route;{let O=y&&y.path||"";Ck(h,!y||O.endsWith("*")||O.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${h}" (under <Route path="${O}">) 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="${O}"> to <Route path="${O==="/"?"*":`${O}/*`}">.`)}let v=hr(),b;if(t){let O=typeof t=="string"?Po(t):t;pt(p==="/"||O.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 "${O.pathname}" was given in the \`location\` prop.`),b=O}else b=v;let E=b.pathname||"/",T=E;if(p!=="/"){let O=p.replace(/^\//,"").split("/");T="/"+E.replace(/^\//,"").split("/").slice(O.length).join("/")}let C=gk(e,{pathname:T});dr(y||C!=null,`No routes matched location "${b.pathname}${b.search}${b.hash}" `),dr(C==null||C[C.length-1].route.element!==void 0||C[C.length-1].route.Component!==void 0||C[C.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=GC(C&&C.map(O=>Object.assign({},O,{params:Object.assign({},d,O.params),pathname:Yr([p,u.encodeLocation?u.encodeLocation(O.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:O.pathname]),pathnameBase:O.pathnameBase==="/"?p:Yr([p,u.encodeLocation?u.encodeLocation(O.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:O.pathnameBase])})),l,n,i,o);return t&&j?_.createElement(zl.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...b},navigationType:"POP"}},j):j}function IC(){let e=QC(),t=jC(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=_.createElement(_.Fragment,null,_.createElement("p",null,"💿 Hey developer 👋"),_.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",_.createElement("code",{style:u},"ErrorBoundary")," or"," ",_.createElement("code",{style:u},"errorElement")," prop on your route.")),_.createElement(_.Fragment,null,_.createElement("h2",null,"Unexpected Application Error!"),_.createElement("h3",{style:{fontStyle:"italic"}},t),n?_.createElement("pre",{style:o},n):null,l)}var HC=_.createElement(IC,null),Tk=class extends _.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=PC(e.digest);n&&(e=n)}let t=e!==void 0?_.createElement(_r.Provider,{value:this.props.routeContext},_.createElement(Tp.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?_.createElement(FC,{error:e},t):t}};Tk.contextType=RC;var Ah=new WeakMap;function FC({children:e,error:t}){let{basename:n}=_.useContext(Ln);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let i=UC(t.digest);if(i){let o=Ah.get(t);if(o)throw o;let u=bk(i.location,n);if(vk&&!Ah.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 Ah.set(t,l),l}return _.createElement("meta",{httpEquiv:"refresh",content:`0;url=${u.absoluteURL||u.to}`})}}return e}function qC({routeContext:e,match:t,children:n}){let i=_.useContext(Vo);return i&&i.static&&i.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=t.route.id),_.createElement(_r.Provider,{value:e},n)}function GC(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);pt(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:v,errors:b}=n,E=y.route.loader&&!v.hasOwnProperty(y.route.id)&&(!b||b[y.route.id]===void 0);if(y.route.lazy||E){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:NC(n.matches),errorInfo:y})}:void 0;return u.reduceRight((p,y,v)=>{let b,E=!1,T=null,C=null;n&&(b=l&&y.route.id?l[y.route.id]:void 0,T=y.route.errorElement||HC,f&&(d<0&&v===0?(Ck("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),E=!0,C=null):d===v&&(E=!0,C=y.route.hydrateFallbackElement||null)));let j=t.concat(u.slice(0,v+1)),O=()=>{let z;return b?z=T:E?z=C:y.route.Component?z=_.createElement(y.route.Component,null):y.route.element?z=y.route.element:z=p,_.createElement(qC,{match:y,routeContext:{outlet:p,matches:j,isDataRoute:n!=null},children:z})};return n&&(y.route.ErrorBoundary||y.route.errorElement||v===0)?_.createElement(Tk,{location:n.location,revalidation:n.revalidation,component:T,error:b,children:O(),routeContext:{outlet:null,matches:j,isDataRoute:!0},onError:h}):O()},null)}function Ap(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function YC(e){let t=_.useContext(Vo);return pt(t,Ap(e)),t}function XC(e){let t=_.useContext(qc);return pt(t,Ap(e)),t}function KC(e){let t=_.useContext(_r);return pt(t,Ap(e)),t}function jp(e){let t=KC(e),n=t.matches[t.matches.length-1];return pt(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function JC(){return jp("useRouteId")}function QC(){let e=_.useContext(Tp),t=XC("useRouteError"),n=jp("useRouteError");return e!==void 0?e:t.errors?.[n]}function WC(){let{router:e}=YC("useNavigate"),t=jp("useNavigate"),n=_.useRef(!1);return _k(()=>{n.current=!0}),_.useCallback(async(o,u={})=>{dr(n.current,zk),n.current&&(typeof o=="number"?await e.navigate(o):await e.navigate(o,{fromRouteId:t,...u}))},[e,t])}var Qb={};function Ck(e,t,n){!t&&!Qb[e]&&(Qb[e]=!0,dr(!1,n))}_.memo(eA);function eA({routes:e,future:t,state:n,onError:i}){return Ek(e,void 0,n,i,t)}function Ak({to:e,replace:t,state:n,relative:i}){pt(Zo(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o}=_.useContext(Ln);dr(!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}=_.useContext(_r),{pathname:l}=hr(),f=Cp(),d=Ep(e,_p(u),l,i==="path"),h=JSON.stringify(d);return _.useEffect(()=>{f(JSON.parse(h),{replace:t,state:n,relative:i})},[f,h,i,t,n]),null}function Jn(e){pt(!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 tA({basename:e="/",children:t=null,location:n,navigationType:i="POP",navigator:o,static:u=!1,unstable_useTransitions:l}){pt(!Zo(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let f=e.replace(/^\/*/,"/"),d=_.useMemo(()=>({basename:f,navigator:o,static:u,unstable_useTransitions:l,future:{}}),[f,o,u,l]);typeof n=="string"&&(n=Po(n));let{pathname:h="/",search:p="",hash:y="",state:v=null,key:b="default"}=n,E=_.useMemo(()=>{let T=Kr(h,f);return T==null?null:{location:{pathname:T,search:p,hash:y,state:v,key:b},navigationType:i}},[f,h,p,y,v,b,i]);return dr(E!=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.`),E==null?null:_.createElement(Ln.Provider,{value:d},_.createElement(zl.Provider,{children:t,value:E}))}function Wb({children:e,location:t}){return BC(_m(e),t)}function _m(e,t=[]){let n=[];return _.Children.forEach(e,(i,o)=>{if(!_.isValidElement(i))return;let u=[...t,o];if(i.type===_.Fragment){n.push.apply(n,_m(i.props.children,u));return}pt(i.type===Jn,`[${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>`),pt(!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=_m(i.props.children,u)),n.push(l)}),n}var gc="get",yc="application/x-www-form-urlencoded";function Gc(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function nA(e){return Gc(e)&&e.tagName.toLowerCase()==="button"}function rA(e){return Gc(e)&&e.tagName.toLowerCase()==="form"}function iA(e){return Gc(e)&&e.tagName.toLowerCase()==="input"}function aA(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function oA(e,t){return e.button===0&&(!t||t==="_self")&&!aA(e)}var Xu=null;function sA(){if(Xu===null)try{new FormData(document.createElement("form"),0),Xu=!1}catch{Xu=!0}return Xu}var lA=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function jh(e){return e!=null&&!lA.has(e)?(dr(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${yc}"`),null):e}function uA(e,t){let n,i,o,u,l;if(rA(e)){let f=e.getAttribute("action");i=f?Kr(f,t):null,n=e.getAttribute("method")||gc,o=jh(e.getAttribute("enctype"))||yc,u=new FormData(e)}else if(nA(e)||iA(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")||gc,o=jh(e.getAttribute("formenctype"))||jh(f.getAttribute("enctype"))||yc,u=new FormData(f,e),!sA()){let{name:h,type:p,value:y}=e;if(p==="image"){let v=h?`${h}.`:"";u.append(`${v}x`,"0"),u.append(`${v}y`,"0")}else h&&u.append(h,y)}}else{if(Gc(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=gc,i=null,o=yc,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 Np(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function cA(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 fA(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 dA(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 hA(e,t,n){let i=await Promise.all(e.map(async o=>{let u=t.routes[o.route.id];if(u){let l=await fA(u,n);return l.links?l.links():[]}return[]}));return yA(i.flat(1).filter(dA).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function e0(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 mA(e,t,{includeHydrateFallback:n}={}){return pA(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 pA(e){return[...new Set(e)]}function gA(e){let t={},n=Object.keys(e).sort();for(let i of n)t[i]=e[i];return t}function yA(e,t){let n=new Set;return new Set(t),e.reduce((i,o)=>{let u=JSON.stringify(gA(o));return n.has(u)||(n.add(u),i.push({key:u,link:o})),i},[])}function jk(){let e=_.useContext(Vo);return Np(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function xA(){let e=_.useContext(qc);return Np(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Op=_.createContext(void 0);Op.displayName="FrameworkContext";function Nk(){let e=_.useContext(Op);return Np(e,"You must render this element inside a <HydratedRouter> element"),e}function vA(e,t){let n=_.useContext(Op),[i,o]=_.useState(!1),[u,l]=_.useState(!1),{onFocus:f,onBlur:d,onMouseEnter:h,onMouseLeave:p,onTouchStart:y}=t,v=_.useRef(null);_.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let T=j=>{j.forEach(O=>{l(O.isIntersecting)})},C=new IntersectionObserver(T,{threshold:.5});return v.current&&C.observe(v.current),()=>{C.disconnect()}}},[e]),_.useEffect(()=>{if(i){let T=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(T)}}},[i]);let b=()=>{o(!0)},E=()=>{o(!1),l(!1)};return n?e!=="intent"?[u,v,{}]:[u,v,{onFocus:Hs(f,b),onBlur:Hs(d,E),onMouseEnter:Hs(h,b),onMouseLeave:Hs(p,E),onTouchStart:Hs(y,b)}]:[!1,v,{}]}function Hs(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function bA({page:e,...t}){let{router:n}=jk(),i=_.useMemo(()=>gk(n.routes,e,n.basename),[n.routes,e,n.basename]);return i?_.createElement(kA,{page:e,matches:i,...t}):null}function SA(e){let{manifest:t,routeModules:n}=Nk(),[i,o]=_.useState([]);return _.useEffect(()=>{let u=!1;return hA(e,t,n).then(l=>{u||o(l)}),()=>{u=!0}},[e,t,n]),i}function kA({page:e,matches:t,...n}){let i=hr(),{future:o,manifest:u,routeModules:l}=Nk(),{basename:f}=jk(),{loaderData:d,matches:h}=xA(),p=_.useMemo(()=>e0(e,t,h,u,i,"data"),[e,t,h,u,i]),y=_.useMemo(()=>e0(e,t,h,u,i,"assets"),[e,t,h,u,i]),v=_.useMemo(()=>{if(e===i.pathname+i.search+i.hash)return[];let T=new Set,C=!1;if(t.forEach(O=>{let z=u.routes[O.route.id];!z||!z.hasLoader||(!p.some(R=>R.route.id===O.route.id)&&O.route.id in d&&l[O.route.id]?.shouldRevalidate||z.hasClientLoader?C=!0:T.add(O.route.id))}),T.size===0)return[];let j=cA(e,f,o.unstable_trailingSlashAwareDataRequests,"data");return C&&T.size>0&&j.searchParams.set("_routes",t.filter(O=>T.has(O.route.id)).map(O=>O.route.id).join(",")),[j.pathname+j.search]},[f,o.unstable_trailingSlashAwareDataRequests,d,i,u,p,t,e,l]),b=_.useMemo(()=>mA(y,u),[y,u]),E=SA(y);return _.createElement(_.Fragment,null,v.map(T=>_.createElement("link",{key:T,rel:"prefetch",as:"fetch",href:T,...n})),b.map(T=>_.createElement("link",{key:T,rel:"modulepreload",href:T,...n})),E.map(({key:T,link:C})=>_.createElement("link",{key:T,nonce:n.nonce,...C,crossOrigin:C.crossOrigin??n.crossOrigin})))}function wA(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var zA=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{zA&&(window.__reactRouterVersion="7.13.0")}catch{}function _A({basename:e,children:t,unstable_useTransitions:n,window:i}){let o=_.useRef();o.current==null&&(o.current=oC({window:i,v5Compat:!0}));let u=o.current,[l,f]=_.useState({action:u.action,location:u.location}),d=_.useCallback(h=>{n===!1?f(h):_.startTransition(()=>f(h))},[n]);return _.useLayoutEffect(()=>u.listen(d),[u,d]),_.createElement(tA,{basename:e,children:t,location:l.location,navigationType:l.action,navigator:u,unstable_useTransitions:n})}var Ok=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,mo=_.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:v,...b},E){let{basename:T,unstable_useTransitions:C}=_.useContext(Ln),j=typeof h=="string"&&Ok.test(h),O=bk(h,T);h=O.to;let z=VC(h,{relative:o}),[R,L,$]=vA(i,b),G=AA(h,{replace:l,state:f,target:d,preventScrollReset:p,relative:o,viewTransition:y,unstable_defaultShouldRevalidate:v,unstable_useTransitions:C});function V(ue){t&&t(ue),ue.defaultPrevented||G(ue)}let K=_.createElement("a",{...b,...$,href:O.absoluteURL||z,onClick:O.isExternal||u?t:V,ref:wA(E,L),target:d,"data-discover":!j&&n==="render"?"true":void 0});return R&&!j?_.createElement(_.Fragment,null,K,_.createElement(bA,{page:z})):K});mo.displayName="Link";var EA=_.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=_l(l,{relative:h.relative}),v=hr(),b=_.useContext(qc),{navigator:E,basename:T}=_.useContext(Ln),C=b!=null&&MA(y)&&f===!0,j=E.encodeLocation?E.encodeLocation(y).pathname:y.pathname,O=v.pathname,z=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;n||(O=O.toLowerCase(),z=z?z.toLowerCase():null,j=j.toLowerCase()),z&&T&&(z=Kr(z,T)||z);const R=j!=="/"&&j.endsWith("/")?j.length-1:j.length;let L=O===j||!o&&O.startsWith(j)&&O.charAt(R)==="/",$=z!=null&&(z===j||!o&&z.startsWith(j)&&z.charAt(j.length)==="/"),G={isActive:L,isPending:$,isTransitioning:C},V=L?t:void 0,K;typeof i=="function"?K=i(G):K=[i,L?"active":null,$?"pending":null,C?"transitioning":null].filter(Boolean).join(" ");let ue=typeof u=="function"?u(G):u;return _.createElement(mo,{...h,"aria-current":V,className:K,ref:p,style:ue,to:l,viewTransition:f},typeof d=="function"?d(G):d)});EA.displayName="NavLink";var TA=_.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:i,replace:o,state:u,method:l=gc,action:f,onSubmit:d,relative:h,preventScrollReset:p,viewTransition:y,unstable_defaultShouldRevalidate:v,...b},E)=>{let{unstable_useTransitions:T}=_.useContext(Ln),C=OA(),j=RA(f,{relative:h}),O=l.toLowerCase()==="get"?"get":"post",z=typeof f=="string"&&Ok.test(f),R=L=>{if(d&&d(L),L.defaultPrevented)return;L.preventDefault();let $=L.nativeEvent.submitter,G=$?.getAttribute("formmethod")||l,V=()=>C($||L.currentTarget,{fetcherKey:t,method:G,navigate:n,replace:o,state:u,relative:h,preventScrollReset:p,viewTransition:y,unstable_defaultShouldRevalidate:v});T&&n!==!1?_.startTransition(()=>V()):V()};return _.createElement("form",{ref:E,method:O,action:j,onSubmit:i?d:R,...b,"data-discover":!z&&e==="render"?"true":void 0})});TA.displayName="Form";function CA(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Rk(e){let t=_.useContext(Vo);return pt(t,CA(e)),t}function AA(e,{target:t,replace:n,state:i,preventScrollReset:o,relative:u,viewTransition:l,unstable_defaultShouldRevalidate:f,unstable_useTransitions:d}={}){let h=Cp(),p=hr(),y=_l(e,{relative:u});return _.useCallback(v=>{if(oA(v,t)){v.preventDefault();let b=n!==void 0?n:cl(p)===cl(y),E=()=>h(e,{replace:b,state:i,preventScrollReset:o,relative:u,viewTransition:l,unstable_defaultShouldRevalidate:f});d?_.startTransition(()=>E()):E()}},[p,h,y,n,i,t,e,o,u,l,f,d])}var jA=0,NA=()=>`__${String(++jA)}__`;function OA(){let{router:e}=Rk("useSubmit"),{basename:t}=_.useContext(Ln),n=JC(),i=e.fetch,o=e.navigate;return _.useCallback(async(u,l={})=>{let{action:f,method:d,encType:h,formData:p,body:y}=uA(u,t);if(l.navigate===!1){let v=l.fetcherKey||NA();await i(v,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 RA(e,{relative:t}={}){let{basename:n}=_.useContext(Ln),i=_.useContext(_r);pt(i,"useFormAction must be used inside a RouteContext");let[o]=i.matches.slice(-1),u={..._l(e||".",{relative:t})},l=hr();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])),cl(u)}function MA(e,{relative:t}={}){let n=_.useContext(kk);pt(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=Rk("useViewTransitionState"),o=_l(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 zc(o.pathname,l)!=null||zc(o.pathname,u)!=null}const Mk=(...e)=>e.filter((t,n,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===n).join(" ").trim();const DA=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const $A=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,i)=>i?i.toUpperCase():n.toLowerCase());const t0=e=>{const t=$A(e);return t.charAt(0).toUpperCase()+t.slice(1)};var LA={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 UA=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const PA=_.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:i,className:o="",children:u,iconNode:l,...f},d)=>_.createElement("svg",{ref:d,...LA,width:t,height:t,stroke:e,strokeWidth:i?Number(n)*24/Number(t):n,className:Mk("lucide",o),...!u&&!UA(f)&&{"aria-hidden":"true"},...f},[...l.map(([h,p])=>_.createElement(h,p)),...Array.isArray(u)?u:[u]]));const Oe=(e,t)=>{const n=_.forwardRef(({className:i,...o},u)=>_.createElement(PA,{ref:u,iconNode:t,className:Mk(`lucide-${DA(t0(e))}`,`lucide-${e}`,i),...o}));return n.displayName=t0(e),n};const VA=[["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"}]],po=Oe("activity",VA);const ZA=[["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"}]],BA=Oe("archive",ZA);const IA=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],HA=Oe("arrow-down",IA);const FA=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],qA=Oe("arrow-up",FA);const GA=[["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"}]],n0=Oe("bot",GA);const YA=[["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"}]],XA=Oe("box",YA);const KA=[["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"}]],JA=Oe("brain",KA);const QA=[["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"}]],Dk=Oe("calendar",QA);const WA=[["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"}]],Em=Oe("chart-column",WA);const ej=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],tj=Oe("check",ej);const nj=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],$k=Oe("clock",nj);const rj=[["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"}]],Lk=Oe("cpu",rj);const ij=[["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"}]],aj=Oe("database",ij);const oj=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],_c=Oe("dollar-sign",oj);const sj=[["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"}]],Uk=Oe("eye",sj);const lj=[["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"}]],uj=Oe("file-text",lj);const cj=[["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"}]],fj=Oe("hash",cj);const dj=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],hj=Oe("info",dj);const mj=[["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"}]],r0=Oe("layout-dashboard",mj);const pj=[["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"}]],i0=Oe("log-out",pj);const gj=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],yj=Oe("menu",gj);const xj=[["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"}]],a0=Oe("message-square-plus",xj);const vj=[["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"}]],fl=Oe("message-square",vj);const bj=[["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"}]],Pk=Oe("moon",bj);const Sj=[["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"}]],Vk=Oe("pencil",Sj);const kj=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],wj=Oe("plus",kj);const zj=[["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"}]],o0=Oe("puzzle",zj);const _j=[["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"}]],Ej=Oe("refresh-cw",_j);const Tj=[["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"}]],s0=Oe("rotate-ccw",Tj);const Cj=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Aj=Oe("search",Cj);const jj=[["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"}]],Nj=Oe("send",jj);const Oj=[["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"}]],l0=Oe("settings",Oj);const Rj=[["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"}]],Zk=Oe("sun",Rj);const Mj=[["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"}]],Dj=Oe("tag",Mj);const $j=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],u0=Oe("terminal",$j);const Lj=[["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"}]],Ec=Oe("trash-2",Lj);const Uj=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],Pj=Oe("trending-up",Uj);const Vj=[["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"}]],Zj=Oe("user",Vj);const Bj=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ij=Oe("x",Bj);var Nh={exports:{}},Oh={};var c0;function Hj(){if(c0)return Oh;c0=1;var e=Fc();function t(y,v){return y===v&&(y!==0||1/y===1/v)||y!==y&&v!==v}var n=typeof Object.is=="function"?Object.is:t,i=e.useState,o=e.useEffect,u=e.useLayoutEffect,l=e.useDebugValue;function f(y,v){var b=v(),E=i({inst:{value:b,getSnapshot:v}}),T=E[0].inst,C=E[1];return u(function(){T.value=b,T.getSnapshot=v,d(T)&&C({inst:T})},[y,b,v]),o(function(){return d(T)&&C({inst:T}),y(function(){d(T)&&C({inst:T})})},[y]),l(b),b}function d(y){var v=y.getSnapshot;y=y.value;try{var b=v();return!n(y,b)}catch{return!0}}function h(y,v){return v()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:f;return Oh.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,Oh}var f0;function Fj(){return f0||(f0=1,Nh.exports=Hj()),Nh.exports}var d0=Fj();const Bk=0,Ik=1,Hk=2,h0=3;var m0=Object.prototype.hasOwnProperty;function Tm(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--&&Tm(e[i],t[i]););return i===-1}if(!n||typeof e=="object"){i=0;for(n in e)if(m0.call(e,n)&&++i&&!m0.call(t,n)||!(n in t)||!Tm(e[n],t[n]))return!1;return Object.keys(t).length===i}}return e!==e&&t!==t}const qr=new WeakMap,Gr=()=>{},tn=Gr(),Cm=Object,Ve=e=>e===tn,br=e=>typeof e=="function",Ti=(e,t)=>({...e,...t}),Fk=e=>br(e.then),Rh={},Ku={},Rp="undefined",El=typeof window!=Rp,Am=typeof document!=Rp,qj=El&&"Deno"in window,Gj=()=>El&&typeof window.requestAnimationFrame!=Rp,qk=(e,t)=>{const n=qr.get(e);return[()=>!Ve(t)&&e.get(t)||Rh,i=>{if(!Ve(t)){const o=e.get(t);t in Ku||(Ku[t]=o),n[5](t,Ti(o,i),o||Rh)}},n[6],()=>!Ve(t)&&t in Ku?Ku[t]:!Ve(t)&&e.get(t)||Rh]};let jm=!0;const Yj=()=>jm,[Nm,Om]=El&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[Gr,Gr],Xj=()=>{const e=Am&&document.visibilityState;return Ve(e)||e!=="hidden"},Kj=e=>(Am&&document.addEventListener("visibilitychange",e),Nm("focus",e),()=>{Am&&document.removeEventListener("visibilitychange",e),Om("focus",e)}),Jj=e=>{const t=()=>{jm=!0,e()},n=()=>{jm=!1};return Nm("online",t),Nm("offline",n),()=>{Om("online",t),Om("offline",n)}},Qj={isOnline:Yj,isVisible:Xj},Wj={initFocus:Kj,initReconnect:Jj},p0=!zp.useId,zo=!El||qj,eN=e=>Gj()?window.requestAnimationFrame(e):setTimeout(e,1),Mh=zo?_.useEffect:_.useLayoutEffect,Dh=typeof navigator<"u"&&navigator.connection,g0=!zo&&Dh&&(["slow-2g","2g"].includes(Dh.effectiveType)||Dh.saveData),Ju=new WeakMap,tN=e=>Cm.prototype.toString.call(e),$h=(e,t)=>e===`[object ${t}]`;let nN=0;const Rm=e=>{const t=typeof e,n=tN(e),i=$h(n,"Date"),o=$h(n,"RegExp"),u=$h(n,"Object");let l,f;if(Cm(e)===e&&!i&&!o){if(l=Ju.get(e),l)return l;if(l=++nN+"~",Ju.set(e,l),Array.isArray(e)){for(l="@",f=0;f<e.length;f++)l+=Rm(e[f])+",";Ju.set(e,l)}if(u){l="#";const d=Cm.keys(e).sort();for(;!Ve(f=d.pop());)Ve(e[f])||(l+=f+":"+Rm(e[f])+",");Ju.set(e,l)}}else l=i?e.toJSON():t=="symbol"?e.toString():t=="string"?JSON.stringify(e):""+e;return l},Mp=e=>{if(br(e))try{e=e()}catch{e=""}const t=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?Rm(e):"",[e,t]};let rN=0;const Mm=()=>++rN;async function Gk(...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=v=>typeof f=="function"?f(v):f!==!1,p=u.throwOnError;if(br(n)){const v=n,b=[],E=t.keys();for(const T of E)!/^\$(inf|sub)\$/.test(T)&&v(t.get(T)._k)&&b.push(T);return Promise.all(b.map(y))}return y(n);async function y(v){const[b]=Mp(v);if(!b)return;const[E,T]=qk(t,b),[C,j,O,z]=qr.get(t),R=()=>{const le=C[b];return(br(u.revalidate)?u.revalidate(E().data,v):u.revalidate!==!1)&&(delete O[b],delete z[b],le&&le[0])?le[0](Hk).then(()=>E().data):E().data};if(e.length<3)return R();let L=i,$,G=!1;const V=Mm();j[b]=[V,0];const K=!Ve(d),ue=E(),re=ue.data,oe=ue._c,ke=Ve(oe)?re:oe;if(K&&(d=br(d)?d(ke,re):d,T({data:d,_c:ke})),br(L))try{L=L(ke)}catch(le){$=le,G=!0}if(L&&Fk(L))if(L=await L.catch(le=>{$=le,G=!0}),V!==j[b][0]){if(G)throw $;return L}else G&&K&&h($)&&(l=!0,T({data:ke,_c:tn}));if(l&&!G)if(br(l)){const le=l(L,ke);T({data:le,error:tn,_c:tn})}else T({data:L,error:tn,_c:tn});if(j[b][1]=Mm(),Promise.resolve(R()).then(()=>{T({_c:tn})}),G){if(p)throw $;return}return L}}const y0=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},iN=(e,t)=>{if(!qr.has(e)){const n=Ti(Wj,t),i=Object.create(null),o=Gk.bind(tn,e);let u=Gr;const l=Object.create(null),f=(p,y)=>{const v=l[p]||[];return l[p]=v,v.push(y),()=>v.splice(v.indexOf(y),1)},d=(p,y,v)=>{e.set(p,y);const b=l[p];if(b)for(const E of b)E(y,v)},h=()=>{if(!qr.has(e)&&(qr.set(e,[i,Object.create(null),Object.create(null),Object.create(null),o,d,f]),!zo)){const p=n.initFocus(setTimeout.bind(tn,y0.bind(tn,i,Bk))),y=n.initReconnect(setTimeout.bind(tn,y0.bind(tn,i,Ik)));u=()=>{p&&p(),y&&y(),qr.delete(e)}}};return h(),[e,o,h,u]}return[e,qr.get(e)[4]]},aN=(e,t,n,i,o)=>{const u=n.errorRetryCount,l=o.retryCount,f=~~((Math.random()+.5)*(1<<(l<8?l:8)))*n.errorRetryInterval;!Ve(u)&&l>u||setTimeout(i,f,o)},oN=Tm,[Yk,Dm]=iN(new Map),sN=Ti({onLoadingSlow:Gr,onSuccess:Gr,onError:Gr,onErrorRetry:aN,onDiscarded:Gr,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:g0?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:g0?5e3:3e3,compare:oN,isPaused:()=>!1,cache:Yk,mutate:Dm,fallback:{}},Qj),lN=(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},uN=_.createContext({}),cN="$inf$",Xk=El&&window.__SWR_DEVTOOLS_USE__,fN=Xk?window.__SWR_DEVTOOLS_USE__:[],dN=()=>{Xk&&(window.__SWR_DEVTOOLS_REACT__=zp)},hN=e=>br(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}],mN=()=>{const e=_.useContext(uN);return _.useMemo(()=>Ti(sN,e),[e])},pN=e=>(t,n,i)=>e(t,n&&((...u)=>{const[l]=Mp(t),[,,,f]=qr.get(Yk);if(l.startsWith(cN))return n(...u);const d=f[l];return Ve(d)?n(...u):(delete f[l],d)}),i),gN=fN.concat(pN),yN=e=>function(...n){const i=mN(),[o,u,l]=hN(n),f=lN(i,l);let d=e;const{use:h}=f,p=(h||[]).concat(gN);for(let y=p.length;y--;)d=p[y](d);return d(o,u||f.fetcher||null,f)},xN=(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())}};dN();const Lh=zp.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}}),Uh={dedupe:!0},x0=Promise.resolve(tn),vN=(e,t,n)=>{const{cache:i,compare:o,suspense:u,fallbackData:l,revalidateOnMount:f,revalidateIfStale:d,refreshInterval:h,refreshWhenHidden:p,refreshWhenOffline:y,keepPreviousData:v,strictServerPrefetchWarning:b}=n,[E,T,C,j]=qr.get(i),[O,z]=Mp(e),R=_.useRef(!1),L=_.useRef(!1),$=_.useRef(O),G=_.useRef(t),V=_.useRef(n),K=()=>V.current,ue=()=>K().isVisible()&&K().isOnline(),[re,oe,ke,le]=qk(i,O),ne=_.useRef({}).current,P=Ve(l)?Ve(n.fallback)?tn:n.fallback[O]:l,Y=(Ze,tt)=>{for(const st in ne){const Je=st;if(Je==="data"){if(!o(Ze[Je],tt[Je])&&(!Ve(Ze[Je])||!o(pe,tt[Je])))return!1}else if(tt[Je]!==Ze[Je])return!1}return!0},Z=_.useMemo(()=>{const Ze=!O||!t?!1:Ve(f)?K().isPaused()||u?!1:d!==!1:f,tt=Pt=>{const lt=Ti(Pt);return delete lt._k,Ze?{isValidating:!0,isLoading:!0,...lt}:lt},st=re(),Je=le(),Ht=tt(st),Vn=st===Je?Ht:tt(Je);let Et=Ht;return[()=>{const Pt=tt(re());return Y(Pt,Et)?(Et.data=Pt.data,Et.isLoading=Pt.isLoading,Et.isValidating=Pt.isValidating,Et.error=Pt.error,Et):(Et=Pt,Pt)},()=>Vn]},[i,O]),ce=d0.useSyncExternalStore(_.useCallback(Ze=>ke(O,(tt,st)=>{Y(st,tt)||Ze()}),[i,O]),Z[0],Z[1]),N=!R.current,A=E[O]&&E[O].length>0,q=ce.data,w=Ve(q)?P&&Fk(P)?Lh(P):P:q,ie=ce.error,ve=_.useRef(w),pe=v?Ve(q)?Ve(ve.current)?w:ve.current:q:w,ge=O&&Ve(w),Ge=!zo&&d0.useSyncExternalStore(()=>Gr,()=>!1,()=>!0);b&&Ge&&!u&&ge&&console.warn(`Missing pre-initiated data for serialized key "${O}" 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=A&&!Ve(ie)?!1:N&&!Ve(f)?f:K().isPaused()?!1:u?Ve(w)?!1:d:Ve(w)||d,At=!!(O&&t&&N&&De),an=Ve(ce.isValidating)?At:ce.isValidating,Un=Ve(ce.isLoading)?At:ce.isLoading,mr=_.useCallback(async Ze=>{const tt=G.current;if(!O||!tt||L.current||K().isPaused())return!1;let st,Je,Ht=!0;const Vn=Ze||{},Et=!C[O]||!Vn.dedupe,Pt=()=>p0?!L.current&&O===$.current&&R.current:O===$.current,lt={isValidating:!1,isLoading:!1},wa=()=>{oe(lt)},J=()=>{const ye=C[O];ye&&ye[1]===Je&&delete C[O]},se={isValidating:!0};Ve(re().data)&&(se.isLoading=!0);try{if(Et&&(oe(se),n.loadingTimeout&&Ve(re().data)&&setTimeout(()=>{Ht&&Pt()&&K().onLoadingSlow(O,n)},n.loadingTimeout),C[O]=[tt(z),Mm()]),[st,Je]=C[O],st=await st,Et&&setTimeout(J,n.dedupingInterval),!C[O]||C[O][1]!==Je)return Et&&Pt()&&K().onDiscarded(O),!1;lt.error=tn;const ye=T[O];if(!Ve(ye)&&(Je<=ye[0]||Je<=ye[1]||ye[1]===0))return wa(),Et&&Pt()&&K().onDiscarded(O),!1;const ze=re().data;lt.data=o(ze,st)?ze:st,Et&&Pt()&&K().onSuccess(st,O,n)}catch(ye){J();const ze=K(),{shouldRetryOnError:Pe}=ze;ze.isPaused()||(lt.error=ye,Et&&Pt()&&(ze.onError(ye,O,ze),(Pe===!0||br(Pe)&&Pe(ye))&&(!K().revalidateOnFocus||!K().revalidateOnReconnect||ue())&&ze.onErrorRetry(ye,O,ze,on=>{const Tn=E[O];Tn&&Tn[0]&&Tn[0](h0,on)},{retryCount:(Vn.retryCount||0)+1,dedupe:!0})))}return Ht=!1,wa(),!0},[O,i]),Pn=_.useCallback((...Ze)=>Gk(i,$.current,...Ze),[]);if(Mh(()=>{G.current=t,V.current=n,Ve(q)||(ve.current=q)}),Mh(()=>{if(!O)return;const Ze=mr.bind(tn,Uh);let tt=0;K().revalidateOnFocus&&(tt=Date.now()+K().focusThrottleInterval);const Je=xN(O,E,(Ht,Vn={})=>{if(Ht==Bk){const Et=Date.now();K().revalidateOnFocus&&Et>tt&&ue()&&(tt=Et+K().focusThrottleInterval,Ze())}else if(Ht==Ik)K().revalidateOnReconnect&&ue()&&Ze();else{if(Ht==Hk)return mr();if(Ht==h0)return mr(Vn)}});return L.current=!1,$.current=O,R.current=!0,oe({_k:z}),De&&(C[O]||(Ve(w)||zo?Ze():eN(Ze))),()=>{L.current=!0,Je()}},[O]),Mh(()=>{let Ze;function tt(){const Je=br(h)?h(re().data):h;Je&&Ze!==-1&&(Ze=setTimeout(st,Je))}function st(){!re().error&&(p||K().isVisible())&&(y||K().isOnline())?mr(Uh).then(tt):tt()}return tt(),()=>{Ze&&(clearTimeout(Ze),Ze=-1)}},[h,p,y,O]),_.useDebugValue(pe),u){if(!p0&&zo&&ge)throw new Error("Fallback data is required when using Suspense in SSR.");ge&&(G.current=t,V.current=n,L.current=!1);const Ze=j[O],tt=!Ve(Ze)&&ge?Pn(Ze):x0;if(Lh(tt),!Ve(ie)&&ge)throw ie;const st=ge?mr(Uh):x0;!Ve(pe)&&ge&&(st.status="fulfilled",st.value=!0),Lh(st)}return{mutate:Pn,get data(){return ne.data=!0,pe},get error(){return ne.error=!0,ie},get isValidating(){return ne.isValidating=!0,an},get isLoading(){return ne.isLoading=!0,Un}}},Ci=yN(vN),bN="x-architect-pass",Fs="/api";class ha{static instance;constructor(){}static getInstance(){return ha.instance||(ha.instance=new ha),ha.instance}getHeaders(t={}){const n=localStorage.getItem("morpheus.auth.token"),i={...t};return n&&(i[bN]=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(`${Fs}${t}`,{headers:this.getHeaders()});return this.handleResponse(n)}async post(t,n){const i=await fetch(`${Fs}${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(`${Fs}${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(`${Fs}${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(`${Fs}${t}`,{method:"DELETE",headers:this.getHeaders()});return this.handleResponse(n)}}const mt=ha.getInstance(),dl="/api",Dp=e=>{const t=e.startsWith(dl)?e.substring(dl.length):e;return mt.get(t)};function Kk(){return Ci(`${dl}/status`,Dp,{refreshInterval:5e3})}function SN(){return Ci(`${dl}/logs`,Dp)}function kN(e){return Ci(e?`${dl}/logs/${e}?limit=1000`:null,Dp,{refreshInterval:2e3})}function Jk(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 wN(){const{data:e}=Kk();return x.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:[x.jsxs("div",{className:"flex gap-4",children:[x.jsxs("span",{className:e?"text-azure-primary dark:text-matrix-highlight":"text-red-500",children:["● ",e?.status.toUpperCase()||"OFFLINE"]}),x.jsxs("span",{children:["PID: ",e?.pid||"-"]}),x.jsxs("span",{children:["UPTIME: ",e?Jk(e.uptimeSeconds):"-"]})]}),x.jsxs("div",{className:"flex gap-4 opacity-70",children:[x.jsxs("span",{children:["v",e?.projectVersion||"0.0.0"]}),x.jsx("span",{children:e?.agentName||"Morpheus"})]})]})}const $p=_.createContext({});function Lp(e){const t=_.useRef(null);return t.current===null&&(t.current=e()),t.current}const Qk=typeof window<"u",Wk=Qk?_.useLayoutEffect:_.useEffect,Yc=_.createContext(null);function Up(e,t){e.indexOf(t)===-1&&e.push(t)}function Pp(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const wr=(e,t,n)=>n>t?t:n<e?e:n;let Vp=()=>{};const Jr={},ew=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function tw(e){return typeof e=="object"&&e!==null}const nw=e=>/^0[^.\s]+$/u.test(e);function Zp(e){let t;return()=>(t===void 0&&(t=e()),t)}const rr=e=>e,zN=(e,t)=>n=>t(e(n)),Tl=(...e)=>e.reduce(zN),hl=(e,t,n)=>{const i=t-e;return i===0?1:(n-e)/i};class Bp{constructor(){this.subscriptions=[]}add(t){return Up(this.subscriptions,t),()=>Pp(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,nr=e=>e/1e3;function rw(e,t){return t?e*(1e3/t):0}const iw=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,_N=1e-7,EN=12;function TN(e,t,n,i,o){let u,l,f=0;do l=t+(n-t)/2,u=iw(l,i,o)-e,u>0?n=l:t=l;while(Math.abs(u)>_N&&++f<EN);return l}function Cl(e,t,n,i){if(e===t&&n===i)return rr;const o=u=>TN(u,0,1,e,n);return u=>u===0||u===1?u:iw(o(u),t,i)}const aw=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ow=e=>t=>1-e(1-t),sw=Cl(.33,1.53,.69,.99),Ip=ow(sw),lw=aw(Ip),uw=e=>(e*=2)<1?.5*Ip(e):.5*(2-Math.pow(2,-10*(e-1))),Hp=e=>1-Math.sin(Math.acos(e)),cw=ow(Hp),fw=aw(Hp),CN=Cl(.42,0,1,1),AN=Cl(0,0,.58,1),dw=Cl(.42,0,.58,1),jN=e=>Array.isArray(e)&&typeof e[0]!="number",hw=e=>Array.isArray(e)&&typeof e[0]=="number",NN={linear:rr,easeIn:CN,easeInOut:dw,easeOut:AN,circIn:Hp,circInOut:fw,circOut:cw,backIn:Ip,backInOut:lw,backOut:sw,anticipate:uw},ON=e=>typeof e=="string",v0=e=>{if(hw(e)){Vp(e.length===4);const[t,n,i,o]=e;return Cl(t,n,i,o)}else if(ON(e))return NN[e];return e},Qu=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function RN(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,v=!1)=>{const E=v&&o?n:i;return y&&l.add(p),E.has(p)||E.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 MN=40;function mw(e,t){let n=!1,i=!0;const o={delta:0,timestamp:0,isProcessing:!1},u=()=>n=!0,l=Qu.reduce((z,R)=>(z[R]=RN(u),z),{}),{setup:f,read:d,resolveKeyframes:h,preUpdate:p,update:y,preRender:v,render:b,postRender:E}=l,T=()=>{const z=Jr.useManualTiming?o.timestamp:performance.now();n=!1,Jr.useManualTiming||(o.delta=i?1e3/60:Math.max(Math.min(z-o.timestamp,MN),1)),o.timestamp=z,o.isProcessing=!0,f.process(o),d.process(o),h.process(o),p.process(o),y.process(o),v.process(o),b.process(o),E.process(o),o.isProcessing=!1,n&&t&&(i=!1,e(T))},C=()=>{n=!0,i=!0,o.isProcessing||e(T)};return{schedule:Qu.reduce((z,R)=>{const L=l[R];return z[R]=($,G=!1,V=!1)=>(n||C(),L.schedule($,G,V)),z},{}),cancel:z=>{for(let R=0;R<Qu.length;R++)l[Qu[R]].cancel(z)},state:o,steps:l}}const{schedule:ft,cancel:Ai,state:Qt,steps:Ph}=mw(typeof requestAnimationFrame<"u"?requestAnimationFrame:rr,!0);let xc;function DN(){xc=void 0}const dn={now:()=>(xc===void 0&&dn.set(Qt.isProcessing||Jr.useManualTiming?Qt.timestamp:performance.now()),xc),set:e=>{xc=e,queueMicrotask(DN)}},pw=e=>t=>typeof t=="string"&&t.startsWith(e),gw=pw("--"),$N=pw("var(--"),Fp=e=>$N(e)?LN.test(e.split("/*")[0].trim()):!1,LN=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function b0(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Bo={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ml={...Bo,transform:e=>wr(0,1,e)},Wu={...Bo,default:1},rl=e=>Math.round(e*1e5)/1e5,qp=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function UN(e){return e==null}const PN=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Gp=(e,t)=>n=>!!(typeof n=="string"&&PN.test(n)&&n.startsWith(e)||t&&!UN(n)&&Object.prototype.hasOwnProperty.call(n,t)),yw=(e,t,n)=>i=>{if(typeof i!="string")return i;const[o,u,l,f]=i.match(qp);return{[e]:parseFloat(o),[t]:parseFloat(u),[n]:parseFloat(l),alpha:f!==void 0?parseFloat(f):1}},VN=e=>wr(0,255,e),Vh={...Bo,transform:e=>Math.round(VN(e))},ma={test:Gp("rgb","red"),parse:yw("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:i=1})=>"rgba("+Vh.transform(e)+", "+Vh.transform(t)+", "+Vh.transform(n)+", "+rl(ml.transform(i))+")"};function ZN(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 $m={test:Gp("#"),parse:ZN,transform:ma.transform},Al=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),_i=Al("deg"),kr=Al("%"),me=Al("px"),BN=Al("vh"),IN=Al("vw"),S0={...kr,parse:e=>kr.parse(e)/100,transform:e=>kr.transform(e*100)},go={test:Gp("hsl","hue"),parse:yw("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:i=1})=>"hsla("+Math.round(e)+", "+kr.transform(rl(t))+", "+kr.transform(rl(n))+", "+rl(ml.transform(i))+")"},Dt={test:e=>ma.test(e)||$m.test(e)||go.test(e),parse:e=>ma.test(e)?ma.parse(e):go.test(e)?go.parse(e):$m.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ma.transform(e):go.transform(e),getAnimatableNone:e=>{const t=Dt.parse(e);return t.alpha=0,Dt.transform(t)}},HN=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function FN(e){return isNaN(e)&&typeof e=="string"&&(e.match(qp)?.length||0)+(e.match(HN)?.length||0)>0}const xw="number",vw="color",qN="var",GN="var(",k0="${}",YN=/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 pl(e){const t=e.toString(),n=[],i={color:[],number:[],var:[]},o=[];let u=0;const f=t.replace(YN,d=>(Dt.test(d)?(i.color.push(u),o.push(vw),n.push(Dt.parse(d))):d.startsWith(GN)?(i.var.push(u),o.push(qN),n.push(d)):(i.number.push(u),o.push(xw),n.push(parseFloat(d))),++u,k0)).split(k0);return{values:n,split:f,indexes:i,types:o}}function bw(e){return pl(e).values}function Sw(e){const{split:t,types:n}=pl(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===xw?u+=rl(o[l]):f===vw?u+=Dt.transform(o[l]):u+=o[l]}return u}}const XN=e=>typeof e=="number"?0:Dt.test(e)?Dt.getAnimatableNone(e):e;function KN(e){const t=bw(e);return Sw(e)(t.map(XN))}const ji={test:FN,parse:bw,createTransformer:Sw,getAnimatableNone:KN};function Zh(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 JN({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=Zh(d,f,e+1/3),u=Zh(d,f,e),l=Zh(d,f,e-1/3)}return{red:Math.round(o*255),green:Math.round(u*255),blue:Math.round(l*255),alpha:i}}function Tc(e,t){return n=>n>0?t:e}const xt=(e,t,n)=>e+(t-e)*n,Bh=(e,t,n)=>{const i=e*e,o=n*(t*t-i)+i;return o<0?0:Math.sqrt(o)},QN=[$m,ma,go],WN=e=>QN.find(t=>t.test(e));function w0(e){const t=WN(e);if(!t)return!1;let n=t.parse(e);return t===go&&(n=JN(n)),n}const z0=(e,t)=>{const n=w0(e),i=w0(t);if(!n||!i)return Tc(e,t);const o={...n};return u=>(o.red=Bh(n.red,i.red,u),o.green=Bh(n.green,i.green,u),o.blue=Bh(n.blue,i.blue,u),o.alpha=xt(n.alpha,i.alpha,u),ma.transform(o))},Lm=new Set(["none","hidden"]);function e4(e,t){return Lm.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function t4(e,t){return n=>xt(e,t,n)}function Yp(e){return typeof e=="number"?t4:typeof e=="string"?Fp(e)?Tc:Dt.test(e)?z0:i4:Array.isArray(e)?kw:typeof e=="object"?Dt.test(e)?z0:n4:Tc}function kw(e,t){const n=[...e],i=n.length,o=e.map((u,l)=>Yp(u)(u,t[l]));return u=>{for(let l=0;l<i;l++)n[l]=o[l](u);return n}}function n4(e,t){const n={...e,...t},i={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(i[o]=Yp(e[o])(e[o],t[o]));return o=>{for(const u in i)n[u]=i[u](o);return n}}function r4(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 i4=(e,t)=>{const n=ji.createTransformer(t),i=pl(e),o=pl(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?Lm.has(e)&&!o.values.length||Lm.has(t)&&!i.values.length?e4(e,t):Tl(kw(r4(i,o),o.values),n):Tc(e,t)};function ww(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?xt(e,t,n):Yp(e)(e,t)}const a4=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>ft.update(t,n),stop:()=>Ai(t),now:()=>Qt.isProcessing?Qt.timestamp:dn.now()}},zw=(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)})`},Cc=2e4;function Xp(e){let t=0;const n=50;let i=e.next(t);for(;!i.done&&t<Cc;)t+=n,i=e.next(t);return t>=Cc?1/0:t}function o4(e,t=100,n){const i=n({...e,keyframes:[0,t]}),o=Math.min(Xp(i),Cc);return{type:"keyframes",ease:u=>i.next(o*u).value/t,duration:nr(o)}}const s4=5;function _w(e,t,n){const i=Math.max(t-s4,0);return rw(n-e(i),t-i)}const _t={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},Ih=.001;function l4({duration:e=_t.duration,bounce:t=_t.bounce,velocity:n=_t.velocity,mass:i=_t.mass}){let o,u,l=1-t;l=wr(_t.minDamping,_t.maxDamping,l),e=wr(_t.minDuration,_t.maxDuration,nr(e)),l<1?(o=h=>{const p=h*l,y=p*e,v=p-n,b=Um(h,l),E=Math.exp(-y);return Ih-v/b*E},u=h=>{const y=h*l*e,v=y*n+n,b=Math.pow(l,2)*Math.pow(h,2)*e,E=Math.exp(-y),T=Um(Math.pow(h,2),l);return(-o(h)+Ih>0?-1:1)*((v-b)*E)/T}):(o=h=>{const p=Math.exp(-h*e),y=(h-n)*e+1;return-Ih+p*y},u=h=>{const p=Math.exp(-h*e),y=(n-h)*(e*e);return p*y});const f=5/e,d=c4(o,u,f);if(e=Xr(e),isNaN(d))return{stiffness:_t.stiffness,damping:_t.damping,duration:e};{const h=Math.pow(d,2)*i;return{stiffness:h,damping:l*2*Math.sqrt(i*h),duration:e}}}const u4=12;function c4(e,t,n){let i=n;for(let o=1;o<u4;o++)i=i-e(i)/t(i);return i}function Um(e,t){return e*Math.sqrt(1-t*t)}const f4=["duration","bounce"],d4=["stiffness","damping","mass"];function _0(e,t){return t.some(n=>e[n]!==void 0)}function h4(e){let t={velocity:_t.velocity,stiffness:_t.stiffness,damping:_t.damping,mass:_t.mass,isResolvedFromDuration:!1,...e};if(!_0(e,d4)&&_0(e,f4))if(e.visualDuration){const n=e.visualDuration,i=2*Math.PI/(n*1.2),o=i*i,u=2*wr(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:_t.mass,stiffness:o,damping:u}}else{const n=l4(e);t={...t,...n,mass:_t.mass},t.isResolvedFromDuration=!0}return t}function Ac(e=_t.visualDuration,t=_t.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:v,isResolvedFromDuration:b}=h4({...n,velocity:-nr(n.velocity||0)}),E=v||0,T=h/(2*Math.sqrt(d*p)),C=l-u,j=nr(Math.sqrt(d/p)),O=Math.abs(C)<5;i||(i=O?_t.restSpeed.granular:_t.restSpeed.default),o||(o=O?_t.restDelta.granular:_t.restDelta.default);let z;if(T<1){const L=Um(j,T);z=$=>{const G=Math.exp(-T*j*$);return l-G*((E+T*j*C)/L*Math.sin(L*$)+C*Math.cos(L*$))}}else if(T===1)z=L=>l-Math.exp(-j*L)*(C+(E+j*C)*L);else{const L=j*Math.sqrt(T*T-1);z=$=>{const G=Math.exp(-T*j*$),V=Math.min(L*$,300);return l-G*((E+T*j*C)*Math.sinh(V)+L*C*Math.cosh(V))/L}}const R={calculatedDuration:b&&y||null,next:L=>{const $=z(L);if(b)f.done=L>=y;else{let G=L===0?E:0;T<1&&(G=L===0?Xr(E):_w(z,L,$));const V=Math.abs(G)<=i,K=Math.abs(l-$)<=o;f.done=V&&K}return f.value=f.done?l:$,f},toString:()=>{const L=Math.min(Xp(R),Cc),$=zw(G=>R.next(L*G).value,L,30);return L+"ms "+$},toTransition:()=>{}};return R}Ac.applyToOptions=e=>{const t=o4(e,100,Ac);return e.ease=t.ease,e.duration=Xr(t.duration),e.type="keyframes",e};function Pm({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],v={done:!1,value:y},b=V=>f!==void 0&&V<f||d!==void 0&&V>d,E=V=>f===void 0?d:d===void 0||Math.abs(f-V)<Math.abs(d-V)?f:d;let T=n*t;const C=y+T,j=l===void 0?C:l(C);j!==C&&(T=j-y);const O=V=>-T*Math.exp(-V/i),z=V=>j+O(V),R=V=>{const K=O(V),ue=z(V);v.done=Math.abs(K)<=h,v.value=v.done?j:ue};let L,$;const G=V=>{b(v.value)&&(L=V,$=Ac({keyframes:[v.value,E(v.value)],velocity:_w(z,V,v.value),damping:o,stiffness:u,restDelta:h,restSpeed:p}))};return G(0),{calculatedDuration:null,next:V=>{let K=!1;return!$&&L===void 0&&(K=!0,R(V),G(V)),L!==void 0&&V>=L?$.next(V-L):(!K&&R(V),v)}}}function m4(e,t,n){const i=[],o=n||Jr.mix||ww,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]||rr:t;f=Tl(d,f)}i.push(f)}return i}function p4(e,t,{clamp:n=!0,ease:i,mixer:o}={}){const u=e.length;if(Vp(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=m4(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 v=hl(e[y],e[y+1],p);return f[y](v)};return n?p=>h(wr(e[0],e[u-1],p)):h}function g4(e,t){const n=e[e.length-1];for(let i=1;i<=t;i++){const o=hl(0,t,i);e.push(xt(n,1,o))}}function y4(e){const t=[0];return g4(t,e.length-1),t}function x4(e,t){return e.map(n=>n*t)}function v4(e,t){return e.map(()=>t||dw).splice(0,e.length-1)}function il({duration:e=300,keyframes:t,times:n,ease:i="easeInOut"}){const o=jN(i)?i.map(v0):v0(i),u={done:!1,value:t[0]},l=x4(n&&n.length===t.length?n:y4(t),e),f=p4(l,t,{ease:Array.isArray(o)?o:v4(t,o)});return{calculatedDuration:e,next:d=>(u.value=f(d),u.done=d>=e,u)}}const b4=e=>e!==null;function Kp(e,{repeat:t,repeatType:n="loop"},i,o=1){const u=e.filter(b4),f=o<0||t&&n!=="loop"&&t%2===1?0:u.length-1;return!f||i===void 0?u[f]:i}const S4={decay:Pm,inertia:Pm,tween:il,keyframes:il,spring:Ac};function Ew(e){typeof e.type=="string"&&(e.type=S4[e.type])}class Jp{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 k4=e=>e/100;class Qp extends Jp{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!==dn.now()&&this.tick(dn.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;Ew(t);const{type:n=il,repeat:i=0,repeatDelay:o=0,repeatType:u,velocity:l=0}=t;let{keyframes:f}=t;const d=n||il;d!==il&&typeof f[0]!="number"&&(this.mixKeyframes=Tl(k4,ww(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=Xp(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:v,repeatDelay:b,type:E,onUpdate:T,finalKeyframe:C}=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),O=this.playbackSpeed>=0?j<0:j>o;this.currentTime=Math.max(j,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let z=this.currentTime,R=i;if(y){const V=Math.min(this.currentTime,o)/f;let K=Math.floor(V),ue=V%1;!ue&&V>=1&&(ue=1),ue===1&&K--,K=Math.min(K,y+1),K%2&&(v==="reverse"?(ue=1-ue,b&&(ue-=b/f)):v==="mirror"&&(R=l)),z=wr(0,1,ue)*f}const L=O?{done:!1,value:p[0]}:R.next(z);u&&(L.value=u(L.value));let{done:$}=L;!O&&d!==null&&($=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const G=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&$);return G&&E!==Pm&&(L.value=Kp(p,this.options,C,this.speed)),T&&T(L.value),G&&this.finish(),L}then(t,n){return this.finished.then(t,n)}get duration(){return nr(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+nr(t)}get time(){return nr(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(dn.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=nr(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=a4,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(dn.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 w4(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const pa=e=>e*180/Math.PI,Vm=e=>{const t=pa(Math.atan2(e[1],e[0]));return Zm(t)},z4={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Vm,rotateZ:Vm,skewX:e=>pa(Math.atan(e[1])),skewY:e=>pa(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Zm=e=>(e=e%360,e<0&&(e+=360),e),E0=Vm,T0=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),C0=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),_4={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:T0,scaleY:C0,scale:e=>(T0(e)+C0(e))/2,rotateX:e=>Zm(pa(Math.atan2(e[6],e[5]))),rotateY:e=>Zm(pa(Math.atan2(-e[2],e[0]))),rotateZ:E0,rotate:E0,skewX:e=>pa(Math.atan(e[4])),skewY:e=>pa(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Bm(e){return e.includes("scale")?1:0}function Im(e,t){if(!e||e==="none")return Bm(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,o;if(n)i=_4,o=n;else{const f=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=z4,o=f}if(!o)return Bm(t);const u=i[t],l=o[1].split(",").map(T4);return typeof u=="function"?u(l):l[u]}const E4=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Im(n,t)};function T4(e){return parseFloat(e.trim())}const Io=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ho=new Set(Io),A0=e=>e===Bo||e===me,C4=new Set(["x","y","z"]),A4=Io.filter(e=>!C4.has(e));function j4(e){const t=[];return A4.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})=>Im(t,"x"),y:(e,{transform:t})=>Im(t,"y")};Ei.translateX=Ei.x;Ei.translateY=Ei.y;const ga=new Set;let Hm=!1,Fm=!1,qm=!1;function Tw(){if(Fm){const e=Array.from(ga).filter(i=>i.needsMeasurement),t=new Set(e.map(i=>i.element)),n=new Map;t.forEach(i=>{const o=j4(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)})}Fm=!1,Hm=!1,ga.forEach(e=>e.complete(qm)),ga.clear()}function Cw(){ga.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Fm=!0)})}function N4(){qm=!0,Cw(),Tw(),qm=!1}class Wp{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?(ga.add(this),Hm||(Hm=!0,ft.read(Cw),ft.resolveKeyframes(Tw))):(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])}w4(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),ga.delete(this)}cancel(){this.state==="scheduled"&&(ga.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const O4=e=>e.startsWith("--");function R4(e,t,n){O4(t)?e.style.setProperty(t,n):e.style[t]=n}const M4=Zp(()=>window.ScrollTimeline!==void 0),D4={};function $4(e,t){const n=Zp(e);return()=>D4[t]??n()}const Aw=$4(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Ws=([e,t,n,i])=>`cubic-bezier(${e}, ${t}, ${n}, ${i})`,j0={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ws([0,.65,.55,1]),circOut:Ws([.55,0,1,.45]),backIn:Ws([.31,.01,.66,-.59]),backOut:Ws([.33,1.53,.69,.99])};function jw(e,t){if(e)return typeof e=="function"?Aw()?zw(e,t):"ease-out":hw(e)?Ws(e):Array.isArray(e)?e.map(n=>jw(n,t)||j0.easeOut):j0[e]}function L4(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=jw(f,o);Array.isArray(y)&&(p.easing=y);const v={delay:i,duration:o,easing:Array.isArray(y)?"linear":y,fill:"both",iterations:u+1,direction:l==="reverse"?"alternate":"normal"};return h&&(v.pseudoElement=h),e.animate(p,v)}function Nw(e){return typeof e=="function"&&"applyToOptions"in e}function U4({type:e,...t}){return Nw(e)&&Aw()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class P4 extends Jp{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,Vp(typeof t.type!="string");const h=U4(t);this.animation=L4(n,i,o,h,u),h.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!u){const p=Kp(o,this.options,f,this.speed);this.updateMotionValue?this.updateMotionValue(p):R4(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 nr(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+nr(t)}get time(){return nr(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&&M4()?(this.animation.timeline=t,rr):n(this)}}const Ow={anticipate:uw,backInOut:lw,circInOut:fw};function V4(e){return e in Ow}function Z4(e){typeof e.ease=="string"&&V4(e.ease)&&(e.ease=Ow[e.ease])}const Hh=10;class B4 extends P4{constructor(t){Z4(t),Ew(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 Qp({...l,autoplay:!1}),d=Math.max(Hh,dn.now()-this.startTime),h=wr(0,Hh,d-Hh);n.setWithVelocity(f.sample(Math.max(0,d-h)).value,f.sample(d).value,h),f.stop()}}const N0=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ji.test(e)||e==="0")&&!e.startsWith("url("));function I4(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 H4(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=N0(o,t),f=N0(u,t);return!l||!f?!1:I4(e)||(n==="spring"||Nw(n))&&i}function Gm(e){e.duration=0,e.type="keyframes"}const F4=new Set(["opacity","clipPath","filter","transform"]),q4=Zp(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function G4(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 q4()&&n&&F4.has(n)&&(n!=="transform"||!h)&&!d&&!i&&o!=="mirror"&&u!==0&&l!=="inertia"}const Y4=40;class X4 extends Jp{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=dn.now();const v={autoplay:t,delay:n,type:i,repeat:o,repeatDelay:u,repeatType:l,name:d,motionValue:h,element:p,...y},b=p?.KeyframeResolver||Wp;this.keyframeResolver=new b(f,(E,T,C)=>this.onKeyframesResolved(E,T,v,!C),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=dn.now(),H4(t,u,l,f)||((Jr.instantAnimations||!d)&&p?.(Kp(t,i,n)),t[0]=t[t.length-1],Gm(i),i.repeat=0);const v={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>Y4?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:t},b=!h&&G4(v),E=v.motionValue?.owner?.current,T=b?new B4({...v,element:E}):new Qp(v);T.finished.then(()=>{this.notifyFinished()}).catch(rr),this.pendingTimeline&&(this.stopTimeline=T.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=T}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(),N4()),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 Rw(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 K4=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function J4(e){const t=K4.exec(e);if(!t)return[,];const[,n,i,o]=t;return[`--${n??i}`,o]}function Mw(e,t,n=1){const[i,o]=J4(e);if(!i)return;const u=window.getComputedStyle(t).getPropertyValue(i);if(u){const l=u.trim();return ew(l)?parseFloat(l):l}return Fp(o)?Mw(o,t,n+1):o}const Q4={type:"spring",stiffness:500,damping:25,restSpeed:10},W4=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),eO={type:"keyframes",duration:.8},tO={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},nO=(e,{keyframes:t})=>t.length>2?eO:Ho.has(e)?e.startsWith("scale")?W4(t[1]):Q4:tO,rO=e=>e!==null;function iO(e,{repeat:t,repeatType:n="loop"},i){const o=e.filter(rO),u=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[u]}function eg(e,t){return e?.[t]??e?.default??e}function aO({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 tg=(e,t,n,i={},o,u)=>l=>{const f=eg(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:v=>{t.set(v),f.onUpdate&&f.onUpdate(v)},onComplete:()=>{l(),f.onComplete&&f.onComplete()},name:e,motionValue:t,element:u?void 0:o};aO(f)||Object.assign(p,nO(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)&&(Gm(p),p.delay===0&&(y=!0)),(Jr.instantAnimations||Jr.skipAnimations)&&(y=!0,Gm(p),p.delay=0),p.allowFlatten=!f.type&&!f.ease,y&&!u&&t.get()!==void 0){const v=iO(p.keyframes,f);if(v!==void 0){ft.update(()=>{p.onUpdate(v),p.onComplete()});return}}return f.isSync?new Qp(p):new X4(p)};function O0(e){const t=[{},{}];return e?.values.forEach((n,i)=>{t[0][i]=n.get(),t[1][i]=n.getVelocity()}),t}function ng(e,t,n,i){if(typeof t=="function"){const[o,u]=O0(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]=O0(i);t=t(n!==void 0?n:e.custom,o,u)}return t}function _o(e,t,n){const i=e.getProps();return ng(i,t,n!==void 0?n:i.custom,e)}const Dw=new Set(["width","height","top","left","right","bottom",...Io]),R0=30,oO=e=>!isNaN(parseFloat(e));class sO{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{const o=dn.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=dn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=oO(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 Bp);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=dn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>R0)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,R0);return rw(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 No(e,t){return new sO(e,t)}const Ym=e=>Array.isArray(e);function lO(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,No(n))}function uO(e){return Ym(e)?e[e.length-1]||0:e}function cO(e,t){const n=_o(e,t);let{transitionEnd:i={},transition:o={},...u}=n||{};u={...u,...i};for(const l in u){const f=uO(u[l]);lO(e,l,f)}}const nn=e=>!!(e&&e.getVelocity);function fO(e){return!!(nn(e)&&e.add)}function Xm(e,t){const n=e.getValue("willChange");if(fO(n))return n.add(t);if(!n&&Jr.WillChange){const i=new Jr.WillChange("auto");e.addValue("willChange",i),i.add(t)}}function rg(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const dO="framerAppearId",$w="data-"+rg(dO);function Lw(e){return e.props[$w]}function hO({protectedKeys:e,needsAnimating:t},n){const i=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,i}function Uw(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 v=e.getValue(y,e.latestValues[y]??null),b=f[y];if(b===void 0||p&&hO(p,y))continue;const E={delay:n,...eg(u||{},y)},T=v.get();if(T!==void 0&&!v.isAnimating&&!Array.isArray(b)&&b===T&&!E.velocity)continue;let C=!1;if(window.MotionHandoffAnimation){const z=Lw(e);if(z){const R=window.MotionHandoffAnimation(z,y,ft);R!==null&&(E.startTime=R,C=!0)}}Xm(e,y);const j=d??e.shouldReduceMotion;v.start(tg(y,v,b,j&&Dw.has(y)?{type:!1}:E,e,C));const O=v.animation;O&&h.push(O)}return l&&Promise.all(h).then(()=>{ft.update(()=>{l&&cO(e,l)})}),h}function Km(e,t,n={}){const i=_o(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(Uw(e,i,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(d=0)=>{const{delayChildren:h=0,staggerChildren:p,staggerDirection:y}=o;return mO(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 mO(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(Km(d,t,{...l,delay:n+(typeof i=="function"?0:i)+Rw(e.variantChildren,d,i,o,u)}).then(()=>d.notify("AnimationComplete",t)));return Promise.all(f)}function pO(e,t,n={}){e.notify("AnimationStart",t);let i;if(Array.isArray(t)){const o=t.map(u=>Km(e,u,n));i=Promise.all(o)}else if(typeof t=="string")i=Km(e,t,n);else{const o=typeof t=="function"?_o(e,t,n.custom):t;i=Promise.all(Uw(e,o,n))}return i.then(()=>{e.notify("AnimationComplete",t)})}const gO={test:e=>e==="auto",parse:e=>e},Pw=e=>t=>t.test(e),Vw=[Bo,me,kr,_i,IN,BN,gO],M0=e=>Vw.find(Pw(e));function yO(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||nw(e):!0}const xO=new Set(["brightness","contrast","saturate","opacity"]);function vO(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[i]=n.match(qp)||[];if(!i)return e;const o=n.replace(i,"");let u=xO.has(t)?1:0;return i!==n&&(u*=100),t+"("+u+o+")"}const bO=/\b([a-z-]*)\(.*?\)/gu,Jm={...ji,getAnimatableNone:e=>{const t=e.match(bO);return t?t.map(vO).join(" "):e}},D0={...Bo,transform:Math.round},SO={rotate:_i,rotateX:_i,rotateY:_i,rotateZ:_i,scale:Wu,scaleX:Wu,scaleY:Wu,scaleZ:Wu,skew:_i,skewX:_i,skewY:_i,distance:me,translateX:me,translateY:me,translateZ:me,x:me,y:me,z:me,perspective:me,transformPerspective:me,opacity:ml,originX:S0,originY:S0,originZ:me},ig={borderWidth:me,borderTopWidth:me,borderRightWidth:me,borderBottomWidth:me,borderLeftWidth:me,borderRadius:me,borderTopLeftRadius:me,borderTopRightRadius:me,borderBottomRightRadius:me,borderBottomLeftRadius:me,width:me,maxWidth:me,height:me,maxHeight:me,top:me,right:me,bottom:me,left:me,inset:me,insetBlock:me,insetBlockStart:me,insetBlockEnd:me,insetInline:me,insetInlineStart:me,insetInlineEnd:me,padding:me,paddingTop:me,paddingRight:me,paddingBottom:me,paddingLeft:me,paddingBlock:me,paddingBlockStart:me,paddingBlockEnd:me,paddingInline:me,paddingInlineStart:me,paddingInlineEnd:me,margin:me,marginTop:me,marginRight:me,marginBottom:me,marginLeft:me,marginBlock:me,marginBlockStart:me,marginBlockEnd:me,marginInline:me,marginInlineStart:me,marginInlineEnd:me,fontSize:me,backgroundPositionX:me,backgroundPositionY:me,...SO,zIndex:D0,fillOpacity:ml,strokeOpacity:ml,numOctaves:D0},kO={...ig,color:Dt,backgroundColor:Dt,outlineColor:Dt,fill:Dt,stroke:Dt,borderColor:Dt,borderTopColor:Dt,borderRightColor:Dt,borderBottomColor:Dt,borderLeftColor:Dt,filter:Jm,WebkitFilter:Jm},Zw=e=>kO[e];function Bw(e,t){let n=Zw(e);return n!==Jm&&(n=ji),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const wO=new Set(["auto","none","0"]);function zO(e,t,n){let i=0,o;for(;i<e.length&&!o;){const u=e[i];typeof u=="string"&&!wO.has(u)&&pl(u).values.length&&(o=e[i]),i++}if(o&&n)for(const u of t)e[u]=Bw(n,o)}class _O extends Wp{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(),Fp(y))){const v=Mw(y,n.current);v!==void 0&&(t[p]=v),p===t.length-1&&(this.finalKeyframe=y)}}if(this.resolveNoneKeyframes(),!Dw.has(i)||t.length!==2)return;const[o,u]=t,l=M0(o),f=M0(u),d=b0(o),h=b0(u);if(d!==h&&Ei[i]){this.needsMeasurement=!0;return}if(l!==f)if(A0(l)&&A0(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||yO(t[o]))&&i.push(o);i.length&&zO(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 EO(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 Iw=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Qm(e){return tw(e)&&"offsetHeight"in e}const{schedule:ag}=mw(queueMicrotask,!1),fr={x:!1,y:!1};function Hw(){return fr.x||fr.y}function TO(e){return e==="x"||e==="y"?fr[e]?null:(fr[e]=!0,()=>{fr[e]=!1}):fr.x||fr.y?null:(fr.x=fr.y=!0,()=>{fr.x=fr.y=!1})}function Fw(e,t){const n=EO(e),i=new AbortController,o={passive:!0,...t,signal:i.signal};return[n,o,()=>i.abort()]}function $0(e){return!(e.pointerType==="touch"||Hw())}function CO(e,t,n={}){const[i,o,u]=Fw(e,n),l=f=>{if(!$0(f))return;const{target:d}=f,h=t(d,f);if(typeof h!="function"||!d)return;const p=y=>{$0(y)&&(h(y),d.removeEventListener("pointerleave",p))};d.addEventListener("pointerleave",p,o)};return i.forEach(f=>{f.addEventListener("pointerenter",l,o)}),u}const qw=(e,t)=>t?e===t?!0:qw(e,t.parentElement):!1,og=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,AO=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Gw(e){return AO.has(e.tagName)||e.isContentEditable===!0}const vc=new WeakSet;function L0(e){return t=>{t.key==="Enter"&&e(t)}}function Fh(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const jO=(e,t)=>{const n=e.currentTarget;if(!n)return;const i=L0(()=>{if(vc.has(n))return;Fh(n,"down");const o=L0(()=>{Fh(n,"up")}),u=()=>Fh(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 U0(e){return og(e)&&!Hw()}function NO(e,t,n={}){const[i,o,u]=Fw(e,n),l=f=>{const d=f.currentTarget;if(!U0(f))return;vc.add(d);const h=t(d,f),p=(b,E)=>{window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",v),vc.has(d)&&vc.delete(d),U0(b)&&typeof h=="function"&&h(b,{success:E})},y=b=>{p(b,d===window||d===document||n.useGlobalTarget||qw(d,b.target))},v=b=>{p(b,!1)};window.addEventListener("pointerup",y,o),window.addEventListener("pointercancel",v,o)};return i.forEach(f=>{(n.useGlobalTarget?window:f).addEventListener("pointerdown",l,o),Qm(f)&&(f.addEventListener("focus",h=>jO(h,o)),!Gw(f)&&!f.hasAttribute("tabindex")&&(f.tabIndex=0))}),u}function Yw(e){return tw(e)&&"ownerSVGElement"in e}function OO(e){return Yw(e)&&e.tagName==="svg"}const RO=[...Vw,Dt,ji],MO=e=>RO.find(Pw(e)),P0=()=>({translate:0,scale:1,origin:0,originPoint:0}),yo=()=>({x:P0(),y:P0()}),V0=()=>({min:0,max:0}),It=()=>({x:V0(),y:V0()}),Wm={current:null},Xw={current:!1},DO=typeof window<"u";function $O(){if(Xw.current=!0,!!DO)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Wm.current=e.matches;e.addEventListener("change",t),t()}else Wm.current=!1}const LO=new WeakMap;function Xc(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function gl(e){return typeof e=="string"||Array.isArray(e)}const sg=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],lg=["initial",...sg];function Kc(e){return Xc(e.animate)||lg.some(t=>gl(e[t]))}function Kw(e){return!!(Kc(e)||e.variants)}function UO(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,No(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,No(l!==void 0?l:o,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const Z0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let jc={};function Jw(e){jc=e}function PO(){return jc}class VO{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=Wp,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 v=dn.now();this.renderScheduledAt<v&&(this.renderScheduledAt=v,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=Kc(n),this.isVariantNode=Kw(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:p,...y}=this.scrapeMotionValuesFromProps(n,{},this);for(const v in y){const b=y[v];d[v]!==void 0&&nn(b)&&b.set(d[v])}}mount(t){this.current=t,LO.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:(Xw.current||$O(),this.shouldReduceMotion=Wm.current),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Ai(this.notifyUpdate),Ai(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=Ho.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 jc){const n=jc[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<Z0.length;i++){const o=Z0[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=UO(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=No(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"&&(ew(i)||nw(i))?i=parseFloat(i):!MO(i)&&ji.test(n)&&(i=Bw(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=ng(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 Bp),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){ag.render(this.render)}}class Qw extends VO{constructor(){super(...arguments),this.KeyframeResolver=_O}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 Ri{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Ww({top:e,left:t,right:n,bottom:i}){return{x:{min:t,max:n},y:{min:e,max:i}}}function ZO({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function BO(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 qh(e){return e===void 0||e===1}function ep({scale:e,scaleX:t,scaleY:n}){return!qh(e)||!qh(t)||!qh(n)}function fa(e){return ep(e)||ez(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function ez(e){return B0(e.x)||B0(e.y)}function B0(e){return e&&e!=="0%"}function Nc(e,t,n){const i=e-n,o=t*i;return n+o}function I0(e,t,n,i,o){return o!==void 0&&(e=Nc(e,o,i)),Nc(e,n,i)+t}function tp(e,t=0,n=1,i,o){e.min=I0(e.min,t,n,i,o),e.max=I0(e.max,t,n,i,o)}function tz(e,{x:t,y:n}){tp(e.x,t.translate,t.scale,t.originPoint),tp(e.y,n.translate,n.scale,n.originPoint)}const H0=.999999999999,F0=1.0000000000001;function IO(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&&vo(e,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),l&&(t.x*=l.x.scale,t.y*=l.y.scale,tz(e,l)),i&&fa(u.latestValues)&&vo(e,u.latestValues))}t.x<F0&&t.x>H0&&(t.x=1),t.y<F0&&t.y>H0&&(t.y=1)}function xo(e,t){e.min=e.min+t,e.max=e.max+t}function q0(e,t,n,i,o=.5){const u=xt(e.min,e.max,o);tp(e,t,n,u,i)}function vo(e,t){q0(e.x,t.x,t.scaleX,t.scale,t.originX),q0(e.y,t.y,t.scaleY,t.scale,t.originY)}function nz(e,t){return Ww(BO(e.getBoundingClientRect(),t))}function HO(e,t,n){const i=nz(e,n),{scroll:o}=t;return o&&(xo(i.x,o.offset.x),xo(i.y,o.offset.y)),i}const FO={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},qO=Io.length;function GO(e,t,n){let i="",o=!0;for(let u=0;u<qO;u++){const l=Io[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=Iw(f,ig[l]);if(!d){o=!1;const p=FO[l]||l;i+=`${p}(${h}) `}n&&(t[l]=h)}}return i=i.trim(),n?i=n(t,o?"":i):o&&(i="none"),i}function ug(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(Ho.has(d)){l=!0;continue}else if(gw(d)){o[d]=h;continue}else{const p=Iw(h,ig[d]);d.startsWith("origin")?(f=!0,u[d]=p):i[d]=p}}if(t.transform||(l||n?i.transform=GO(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 rz(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 G0(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const qs={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(me.test(e))e=parseFloat(e);else return e;const n=G0(e,t.target.x),i=G0(e,t.target.y);return`${n}% ${i}%`}},YO={correct:(e,{treeScale:t,projectionDelta:n})=>{const i=e,o=ji.parse(e);if(o.length>5)return i;const u=ji.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=xt(f,d,.5);return typeof o[2+l]=="number"&&(o[2+l]/=h),typeof o[3+l]=="number"&&(o[3+l]/=h),u(o)}},np={borderRadius:{...qs,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:qs,borderTopRightRadius:qs,borderBottomLeftRadius:qs,borderBottomRightRadius:qs,boxShadow:YO};function iz(e,{layout:t,layoutId:n}){return Ho.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!np[e]||e==="opacity")}function cg(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])||iz(l,e)||n?.getValue(l)?.liveStyle!==void 0)&&(u[l]=i[l]);return u}function XO(e){return window.getComputedStyle(e)}class KO extends Qw{constructor(){super(...arguments),this.type="html",this.renderInstance=rz}readValueFromInstance(t,n){if(Ho.has(n))return this.projection?.isProjecting?Bm(n):E4(t,n);{const i=XO(t),o=(gw(n)?i.getPropertyValue(n):i[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return nz(t,n)}build(t,n,i){ug(t,n,i.transformTemplate)}scrapeMotionValuesFromProps(t,n,i){return cg(t,n,i)}}const JO={offset:"stroke-dashoffset",array:"stroke-dasharray"},QO={offset:"strokeDashoffset",array:"strokeDasharray"};function WO(e,t,n=1,i=0,o=!0){e.pathLength=1;const u=o?JO:QO;e[u.offset]=`${-i}`,e[u.array]=`${t} ${n}`}const eR=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function az(e,{attrX:t,attrY:n,attrScale:i,pathLength:o,pathSpacing:u=1,pathOffset:l=0,...f},d,h,p){if(ug(e,f,h),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:y,style:v}=e;y.transform&&(v.transform=y.transform,delete y.transform),(v.transform||y.transformOrigin)&&(v.transformOrigin=y.transformOrigin??"50% 50%",delete y.transformOrigin),v.transform&&(v.transformBox=p?.transformBox??"fill-box",delete y.transformBox);for(const b of eR)y[b]!==void 0&&(v[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&&WO(y,o,u,l,!1)}const oz=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"]),sz=e=>typeof e=="string"&&e.toLowerCase()==="svg";function tR(e,t,n,i){rz(e,t,void 0,i);for(const o in t.attrs)e.setAttribute(oz.has(o)?o:rg(o),t.attrs[o])}function lz(e,t,n){const i=cg(e,t,n);for(const o in e)if(nn(e[o])||nn(t[o])){const u=Io.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;i[u]=e[o]}return i}class nR extends Qw{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=It}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ho.has(n)){const i=Zw(n);return i&&i.default||0}return n=oz.has(n)?n:rg(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,i){return lz(t,n,i)}build(t,n,i){az(t,n,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(t,n,i,o){tR(t,n,i,o)}mount(t){this.isSVGTag=sz(t.tagName),super.mount(t)}}const rR=lg.length;function uz(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?uz(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<rR;n++){const i=lg[n],o=e.props[i];(gl(o)||o===!1)&&(t[i]=o)}return t}function cz(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 iR=[...sg].reverse(),aR=sg.length;function oR(e){return t=>Promise.all(t.map(({animation:n,options:i})=>pO(e,n,i)))}function sR(e){let t=oR(e),n=Y0(),i=!0;const o=d=>(h,p)=>{const y=_o(e,p,d==="exit"?e.presenceContext?.custom:void 0);if(y){const{transition:v,transitionEnd:b,...E}=y;h={...h,...E,...b}}return h};function u(d){t=d(e)}function l(d){const{props:h}=e,p=uz(e.parent)||{},y=[],v=new Set;let b={},E=1/0;for(let C=0;C<aR;C++){const j=iR[C],O=n[j],z=h[j]!==void 0?h[j]:p[j],R=gl(z),L=j===d?O.isActive:null;L===!1&&(E=C);let $=z===p[j]&&z!==h[j]&&R;if($&&i&&e.manuallyAnimateOnMount&&($=!1),O.protectedKeys={...b},!O.isActive&&L===null||!z&&!O.prevProp||Xc(z)||typeof z=="boolean")continue;const G=lR(O.prevProp,z);let V=G||j===d&&O.isActive&&!$&&R||C>E&&R,K=!1;const ue=Array.isArray(z)?z:[z];let re=ue.reduce(o(j),{});L===!1&&(re={});const{prevResolvedValues:oe={}}=O,ke={...oe,...re},le=Y=>{V=!0,v.has(Y)&&(K=!0,v.delete(Y)),O.needsAnimating[Y]=!0;const Z=e.getValue(Y);Z&&(Z.liveStyle=!1)};for(const Y in ke){const Z=re[Y],ce=oe[Y];if(b.hasOwnProperty(Y))continue;let N=!1;Ym(Z)&&Ym(ce)?N=!cz(Z,ce):N=Z!==ce,N?Z!=null?le(Y):v.add(Y):Z!==void 0&&v.has(Y)?le(Y):O.protectedKeys[Y]=!0}O.prevProp=z,O.prevResolvedValues=re,O.isActive&&(b={...b,...re}),i&&e.blockInitialAnimation&&(V=!1);const ne=$&&G;V&&(!ne||K)&&y.push(...ue.map(Y=>{const Z={type:j};if(typeof Y=="string"&&i&&!ne&&e.manuallyAnimateOnMount&&e.parent){const{parent:ce}=e,N=_o(ce,Y);if(ce.enteringChildren&&N){const{delayChildren:A}=N.transition||{};Z.delay=Rw(ce.enteringChildren,e,A)}}return{animation:Y,options:Z}}))}if(v.size){const C={};if(typeof h.initial!="boolean"){const j=_o(e,Array.isArray(h.initial)?h.initial[0]:h.initial);j&&j.transition&&(C.transition=j.transition)}v.forEach(j=>{const O=e.getBaseTarget(j),z=e.getValue(j);z&&(z.liveStyle=!0),C[j]=O??null}),y.push({animation:C})}let T=!!y.length;return i&&(h.initial===!1||h.initial===h.animate)&&!e.manuallyAnimateOnMount&&(T=!1),i=!1,T?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=Y0()}}}function lR(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!cz(t,e):!1}function ia(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Y0(){return{animate:ia(!0),whileInView:ia(),whileHover:ia(),whileTap:ia(),whileDrag:ia(),whileFocus:ia(),exit:ia()}}function X0(e,t){e.min=t.min,e.max=t.max}function cr(e,t){X0(e.x,t.x),X0(e.y,t.y)}function K0(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const fz=1e-4,uR=1-fz,cR=1+fz,dz=.01,fR=0-dz,dR=0+dz;function hn(e){return e.max-e.min}function hR(e,t,n){return Math.abs(e-t)<=n}function J0(e,t,n,i=.5){e.origin=i,e.originPoint=xt(t.min,t.max,e.origin),e.scale=hn(n)/hn(t),e.translate=xt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=uR&&e.scale<=cR||isNaN(e.scale))&&(e.scale=1),(e.translate>=fR&&e.translate<=dR||isNaN(e.translate))&&(e.translate=0)}function al(e,t,n,i){J0(e.x,t.x,n.x,i?i.originX:void 0),J0(e.y,t.y,n.y,i?i.originY:void 0)}function Q0(e,t,n){e.min=n.min+t.min,e.max=e.min+hn(t)}function mR(e,t,n){Q0(e.x,t.x,n.x),Q0(e.y,t.y,n.y)}function W0(e,t,n){e.min=t.min-n.min,e.max=e.min+hn(t)}function Oc(e,t,n){W0(e.x,t.x,n.x),W0(e.y,t.y,n.y)}function e1(e,t,n,i,o){return e-=t,e=Nc(e,1/n,i),o!==void 0&&(e=Nc(e,1/o,i)),e}function pR(e,t=0,n=1,i=.5,o,u=e,l=e){if(kr.test(t)&&(t=parseFloat(t),t=xt(l.min,l.max,t/100)-l.min),typeof t!="number")return;let f=xt(u.min,u.max,i);e===u&&(f-=t),e.min=e1(e.min,t,n,f,o),e.max=e1(e.max,t,n,f,o)}function t1(e,t,[n,i,o],u,l){pR(e,t[n],t[i],t[o],t.scale,u,l)}const gR=["x","scaleX","originX"],yR=["y","scaleY","originY"];function n1(e,t,n,i){t1(e.x,t,gR,n?n.x:void 0,i?i.x:void 0),t1(e.y,t,yR,n?n.y:void 0,i?i.y:void 0)}function r1(e){return e.translate===0&&e.scale===1}function hz(e){return r1(e.x)&&r1(e.y)}function i1(e,t){return e.min===t.min&&e.max===t.max}function xR(e,t){return i1(e.x,t.x)&&i1(e.y,t.y)}function a1(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function mz(e,t){return a1(e.x,t.x)&&a1(e.y,t.y)}function o1(e){return hn(e.x)/hn(e.y)}function s1(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Qn(e){return[e("x"),e("y")]}function vR(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:v,skewX:b,skewY:E}=n;h&&(i=`perspective(${h}px) ${i}`),p&&(i+=`rotate(${p}deg) `),y&&(i+=`rotateX(${y}deg) `),v&&(i+=`rotateY(${v}deg) `),b&&(i+=`skewX(${b}deg) `),E&&(i+=`skewY(${E}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 pz=["TopLeft","TopRight","BottomLeft","BottomRight"],bR=pz.length,l1=e=>typeof e=="string"?parseFloat(e):e,u1=e=>typeof e=="number"||me.test(e);function SR(e,t,n,i,o,u){o?(e.opacity=xt(0,n.opacity??1,kR(i)),e.opacityExit=xt(t.opacity??1,0,wR(i))):u&&(e.opacity=xt(t.opacity??1,n.opacity??1,i));for(let l=0;l<bR;l++){const f=`border${pz[l]}Radius`;let d=c1(t,f),h=c1(n,f);if(d===void 0&&h===void 0)continue;d||(d=0),h||(h=0),d===0||h===0||u1(d)===u1(h)?(e[f]=Math.max(xt(l1(d),l1(h),i),0),(kr.test(h)||kr.test(d))&&(e[f]+="%")):e[f]=h}(t.rotate||n.rotate)&&(e.rotate=xt(t.rotate||0,n.rotate||0,i))}function c1(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const kR=gz(0,.5,cw),wR=gz(.5,.95,rr);function gz(e,t,n){return i=>i<e?0:i>t?1:n(hl(e,t,i))}function zR(e,t,n){const i=nn(e)?e:No(e);return i.start(tg("",i,t,n)),i.animation}function yl(e,t,n,i={passive:!0}){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n)}const _R=(e,t)=>e.depth-t.depth;class ER{constructor(){this.children=[],this.isDirty=!1}add(t){Up(this.children,t),this.isDirty=!0}remove(t){Pp(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(_R),this.isDirty=!1,this.children.forEach(t)}}function TR(e,t){const n=dn.now(),i=({timestamp:o})=>{const u=o-n;u>=t&&(Ai(i),e(u-t))};return ft.setup(i,!0),()=>Ai(i)}function bc(e){return nn(e)?e.get():e}class CR{constructor(){this.members=[]}add(t){Up(this.members,t),t.scheduleRender()}remove(t){if(Pp(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 Sc={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Gh=["","X","Y","Z"],AR=1e3;let jR=0;function Yh(e,t,n,i){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),i&&(i[e]=0))}function yz(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Lw(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&&yz(i)}function xz({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:i,resetTransform:o}){return class{constructor(l={},f=t?.()){this.id=jR++,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(RR),this.nodes.forEach(LR),this.nodes.forEach(UR),this.nodes.forEach(MR)},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 ER)}addEventListener(l,f){return this.eventHandlers.has(l)||this.eventHandlers.set(l,new Bp),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=Yw(l)&&!OO(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 v=()=>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=TR(v,250),Sc.hasAnimatedSinceResize&&(Sc.hasAnimatedSinceResize=!1,this.nodes.forEach(h1)))})}f&&this.root.registerSharedNode(f,this),this.options.animate!==!1&&h&&(f||d)&&this.addEventListener("didUpdate",({delta:p,hasLayoutChanged:y,hasRelativeLayoutChanged:v,layout:b})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const E=this.options.transition||h.getDefaultTransition()||IR,{onLayoutAnimationStart:T,onLayoutAnimationComplete:C}=h.getProps(),j=!this.targetLayout||!mz(this.targetLayout,b),O=!y&&v;if(this.options.layoutRoot||this.resumeFrom||O||y&&(j||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const z={...eg(E,"layout"),onPlay:T,onComplete:C};(h.shouldReduceMotion||this.options.layoutRoot)&&(z.delay=0,z.type=!1),this.startAnimation(z),this.setAnimationOrigin(p,O)}else y||h1(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(),Ai(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(PR),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&&yz(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(f1);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(d1);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach($R),this.nodes.forEach(NR),this.nodes.forEach(OR)):this.nodes.forEach(d1),this.clearAllSnapshots();const f=dn.now();Qt.delta=wr(0,1e3/60,f-Qt.timestamp),Qt.timestamp=f,Qt.isProcessing=!0,Ph.update.process(Qt),Ph.preRender.process(Qt),Ph.render.process(Qt),Qt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ag.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(DR),this.sharedNodes.forEach(VR)}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&&!hn(this.snapshot.measuredBox.x)&&!hn(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&&!hz(this.projectionDelta),d=this.getTransformTemplate(),h=d?d(this.latestValues,""):void 0,p=h!==this.prevTransformTemplateValue;l&&this.instance&&(f||fa(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)),HR(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(FR))){const{scroll:h}=this.root;h&&(xo(f.x,h.offset.x),xo(f.y,h.offset.y))}return f}removeElementScroll(l){const f=It();if(cr(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&&cr(f,l),xo(f.x,p.offset.x),xo(f.y,p.offset.y))}return f}applyTransform(l,f=!1){const d=It();cr(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&&vo(d,{x:-p.scroll.offset.x,y:-p.scroll.offset.y}),fa(p.latestValues)&&vo(d,p.latestValues)}return fa(this.latestValues)&&vo(d,this.latestValues),d}removeTransform(l){const f=It();cr(f,l);for(let d=0;d<this.path.length;d++){const h=this.path[d];if(!h.instance||!fa(h.latestValues))continue;ep(h.latestValues)&&h.updateSnapshot();const p=It(),y=h.measurePageBox();cr(p,y),n1(f,h.latestValues,h.snapshot?h.snapshot.layoutBox:void 0,p)}return fa(this.latestValues)&&n1(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 v=this.getClosestProjectingParent();v&&this.linkedParentVersion!==v.layoutVersion&&!v.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(v&&v.layout?this.createRelativeTarget(v,this.layout.layoutBox,v.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(),mR(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):cr(this.target,this.layout.layoutBox),tz(this.target,this.targetDelta)):cr(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,v&&!!v.resumingFrom==!!this.resumingFrom&&!v.options.layoutScroll&&v.target&&this.animationProgress!==1?this.createRelativeTarget(v,this.target,v.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||ep(this.parent.latestValues)||ez(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(),Oc(this.relativeTargetOrigin,f,d),cr(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;cr(this.layoutCorrected,this.layout.layoutBox);const y=this.treeScale.x,v=this.treeScale.y;IO(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():(K0(this.prevProjectionDelta.x,this.projectionDelta.x),K0(this.prevProjectionDelta.y,this.projectionDelta.y)),al(this.projectionDelta,this.layoutCorrected,b,this.latestValues),(this.treeScale.x!==y||this.treeScale.y!==v||!s1(this.projectionDelta.x,this.prevProjectionDelta.x)||!s1(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=yo(),this.projectionDelta=yo(),this.projectionDeltaWithTransform=yo()}setAnimationOrigin(l,f=!1){const d=this.snapshot,h=d?d.latestValues:{},p={...this.latestValues},y=yo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!f;const v=It(),b=d?d.source:void 0,E=this.layout?this.layout.source:void 0,T=b!==E,C=this.getStack(),j=!C||C.members.length<=1,O=!!(T&&!j&&this.options.crossfade===!0&&!this.path.some(BR));this.animationProgress=0;let z;this.mixTargetDelta=R=>{const L=R/1e3;m1(y.x,l.x,L),m1(y.y,l.y,L),this.setTargetDelta(y),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Oc(v,this.layout.layoutBox,this.relativeParent.layout.layoutBox),ZR(this.relativeTarget,this.relativeTargetOrigin,v,L),z&&xR(this.relativeTarget,z)&&(this.isProjectionDirty=!1),z||(z=It()),cr(z,this.relativeTarget)),T&&(this.animationValues=p,SR(p,h,this.latestValues,L,O,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&&(Ai(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ft.update(()=>{Sc.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=No(0)),this.currentAnimation=zR(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(AR),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&&vz(this.options.animationType,this.layout.layoutBox,h.layoutBox)){d=this.target||It();const y=hn(this.layout.layoutBox.x);d.x.min=l.target.x.min,d.x.max=d.x.min+y;const v=hn(this.layout.layoutBox.y);d.y.min=l.target.y.min,d.y.max=d.y.min+v}cr(f,d),vo(f,p),al(this.projectionDeltaWithTransform,this.layoutCorrected,f,p)}}registerSharedNode(l,f){this.sharedNodes.has(l)||this.sharedNodes.set(l,new CR),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&&Yh("z",l,h,this.animationValues);for(let p=0;p<Gh.length;p++)Yh(`rotate${Gh[p]}`,l,h,this.animationValues),Yh(`skew${Gh[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=bc(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=bc(f?.pointerEvents)||""),this.hasProjected&&!fa(this.latestValues)&&(l.transform=d?d({},""):"none",this.hasProjected=!1);return}l.visibility="";const p=h.animationValues||h.latestValues;this.applyTransformsToTarget();let y=vR(this.projectionDeltaWithTransform,this.treeScale,p);d&&(y=d(p,y)),l.transform=y;const{x:v,y:b}=this.projectionDelta;l.transformOrigin=`${v.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 E in np){if(p[E]===void 0)continue;const{correct:T,applyTo:C,isCSSVariable:j}=np[E],O=y==="none"?p[E]:T(p[E],h);if(C){const z=C.length;for(let R=0;R<z;R++)l[C[R]]=O}else j?this.options.visualElement.renderState.vars[E]=O:l[E]=O}this.options.layoutId&&(l.pointerEvents=h===this?bc(f?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(l=>l.currentAnimation?.stop()),this.root.nodes.forEach(f1),this.root.sharedNodes.clear()}}}function NR(e){e.updateLayout()}function OR(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"?Qn(p=>{const y=u?t.measuredBox[p]:t.layoutBox[p],v=hn(y);y.min=n[p].min,y.max=y.min+v}):vz(o,t.layoutBox,n)&&Qn(p=>{const y=u?t.measuredBox[p]:t.layoutBox[p],v=hn(n[p]);y.max=y.min+v,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[p].max=e.relativeTarget[p].min+v)});const l=yo();al(l,n,t.layoutBox);const f=yo();u?al(f,e.applyTransform(i,!0),t.measuredBox):al(f,n,t.layoutBox);const d=!hz(l);let h=!1;if(!e.resumeFrom){const p=e.getClosestProjectingParent();if(p&&!p.resumeFrom){const{snapshot:y,layout:v}=p;if(y&&v){const b=It();Oc(b,t.layoutBox,y.layoutBox);const E=It();Oc(E,n,v.layoutBox),mz(b,E)||(h=!0),p.options.layoutRoot&&(e.relativeTarget=E,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 RR(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 MR(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function DR(e){e.clearSnapshot()}function f1(e){e.clearMeasurements()}function d1(e){e.isLayoutDirty=!1}function $R(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function h1(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function LR(e){e.resolveTargetDelta()}function UR(e){e.calcProjection()}function PR(e){e.resetSkewAndRotation()}function VR(e){e.removeLeadSnapshot()}function m1(e,t,n){e.translate=xt(t.translate,0,n),e.scale=xt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function p1(e,t,n,i){e.min=xt(t.min,n.min,i),e.max=xt(t.max,n.max,i)}function ZR(e,t,n,i){p1(e.x,t.x,n.x,i),p1(e.y,t.y,n.y,i)}function BR(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const IR={duration:.45,ease:[.4,0,.1,1]},g1=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),y1=g1("applewebkit/")&&!g1("chrome/")?Math.round:rr;function x1(e){e.min=y1(e.min),e.max=y1(e.max)}function HR(e){x1(e.x),x1(e.y)}function vz(e,t,n){return e==="position"||e==="preserve-aspect"&&!hR(o1(t),o1(n),.2)}function FR(e){return e!==e.root&&e.scroll?.wasRoot}const qR=xz({attachResizeListener:(e,t)=>yl(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Xh={current:void 0},bz=xz({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Xh.current){const e=new qR({});e.mount(window),e.setOptions({layoutScroll:!0}),Xh.current=e}return Xh.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),fg=_.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function v1(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function GR(...e){return t=>{let n=!1;const i=e.map(o=>{const u=v1(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():v1(e[o],null)}}}}function YR(...e){return _.useCallback(GR(...e),e)}class XR extends _.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const i=n.offsetParent,o=Qm(i)&&i.offsetWidth||0,u=Qm(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 KR({children:e,isPresent:t,anchorX:n,anchorY:i,root:o}){const u=_.useId(),l=_.useRef(null),f=_.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:d}=_.useContext(fg),h=e.props?.ref??e?.ref,p=YR(l,h);return _.useInsertionEffect(()=>{const{width:y,height:v,top:b,left:E,right:T,bottom:C}=f.current;if(t||!l.current||!y||!v)return;const j=n==="left"?`left: ${E}`:`right: ${T}`,O=i==="bottom"?`bottom: ${C}`:`top: ${b}`;l.current.dataset.motionPopId=u;const z=document.createElement("style");d&&(z.nonce=d);const R=o??document.head;return R.appendChild(z),z.sheet&&z.sheet.insertRule(`
|
|
12
|
+
[data-motion-pop-id="${u}"] {
|
|
13
|
+
position: absolute !important;
|
|
14
|
+
width: ${y}px !important;
|
|
15
|
+
height: ${v}px !important;
|
|
16
|
+
${j}px !important;
|
|
17
|
+
${O}px !important;
|
|
18
|
+
}
|
|
19
|
+
`),()=>{R.contains(z)&&R.removeChild(z)}},[t]),x.jsx(XR,{isPresent:t,childRef:l,sizeRef:f,children:_.cloneElement(e,{ref:p})})}const JR=({children:e,initial:t,isPresent:n,onExitComplete:i,custom:o,presenceAffectsLayout:u,mode:l,anchorX:f,anchorY:d,root:h})=>{const p=Lp(QR),y=_.useId();let v=!0,b=_.useMemo(()=>(v=!1,{id:y,initial:t,isPresent:n,custom:o,onExitComplete:E=>{p.set(E,!0);for(const T of p.values())if(!T)return;i&&i()},register:E=>(p.set(E,!1),()=>p.delete(E))}),[n,p,i]);return u&&v&&(b={...b}),_.useMemo(()=>{p.forEach((E,T)=>p.set(T,!1))},[n]),_.useEffect(()=>{!n&&!p.size&&i&&i()},[n]),l==="popLayout"&&(e=x.jsx(KR,{isPresent:n,anchorX:f,anchorY:d,root:h,children:e})),x.jsx(Yc.Provider,{value:b,children:e})};function QR(){return new Map}function Sz(e=!0){const t=_.useContext(Yc);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:i,register:o}=t,u=_.useId();_.useEffect(()=>{if(e)return o(u)},[e]);const l=_.useCallback(()=>e&&i&&i(u),[u,i,e]);return!n&&i?[!1,l]:[!0]}const ec=e=>e.key||"";function b1(e){const t=[];return _.Children.forEach(e,n=>{_.isValidElement(n)&&t.push(n)}),t}const WR=({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]=Sz(l),v=_.useMemo(()=>b1(e),[e]),b=l&&!p?[]:v.map(ec),E=_.useRef(!0),T=_.useRef(v),C=Lp(()=>new Map),j=_.useRef(new Set),[O,z]=_.useState(v),[R,L]=_.useState(v);Wk(()=>{E.current=!1,T.current=v;for(let V=0;V<R.length;V++){const K=ec(R[V]);b.includes(K)?(C.delete(K),j.current.delete(K)):C.get(K)!==!0&&C.set(K,!1)}},[R,b.length,b.join("-")]);const $=[];if(v!==O){let V=[...v];for(let K=0;K<R.length;K++){const ue=R[K],re=ec(ue);b.includes(re)||(V.splice(K,0,ue),$.push(ue))}return u==="wait"&&$.length&&(V=$),L(b1(V)),z(v),null}const{forceRender:G}=_.useContext($p);return x.jsx(x.Fragment,{children:R.map(V=>{const K=ec(V),ue=l&&!p?!1:v===R||b.includes(K),re=()=>{if(j.current.has(K))return;if(j.current.add(K),C.has(K))C.set(K,!0);else return;let oe=!0;C.forEach(ke=>{ke||(oe=!1)}),oe&&(G?.(),L(T.current),l&&y?.(),i&&i())};return x.jsx(JR,{isPresent:ue,initial:!E.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:u,root:h,onExitComplete:ue?void 0:re,anchorX:f,anchorY:d,children:V},K)})})},kz=_.createContext({strict:!1}),S1={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 k1=!1;function eM(){if(k1)return;const e={};for(const t in S1)e[t]={isEnabled:n=>S1[t].some(i=>!!n[i])};Jw(e),k1=!0}function wz(){return eM(),PO()}function tM(e){const t=wz();for(const n in e)t[n]={...t[n],...e[n]};Jw(t)}const nM=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 Rc(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||nM.has(e)}let zz=e=>!Rc(e);function rM(e){typeof e=="function"&&(zz=t=>t.startsWith("on")?!Rc(t):e(t))}try{rM(require("@emotion/is-prop-valid").default)}catch{}function iM(e,t,n){const i={};for(const o in e)o==="values"&&typeof e.values=="object"||(zz(o)||n===!0&&Rc(o)||!t&&!Rc(o)||e.draggable&&o.startsWith("onDrag"))&&(i[o]=e[o]);return i}const Jc=_.createContext({});function aM(e,t){if(Kc(e)){const{initial:n,animate:i}=e;return{initial:n===!1||gl(n)?n:void 0,animate:gl(i)?i:void 0}}return e.inherit!==!1?t:{}}function oM(e){const{initial:t,animate:n}=aM(e,_.useContext(Jc));return _.useMemo(()=>({initial:t,animate:n}),[w1(t),w1(n)])}function w1(e){return Array.isArray(e)?e.join(" "):e}const dg=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function _z(e,t,n){for(const i in t)!nn(t[i])&&!iz(i,n)&&(e[i]=t[i])}function sM({transformTemplate:e},t){return _.useMemo(()=>{const n=dg();return ug(n,t,e),Object.assign({},n.vars,n.style)},[t])}function lM(e,t){const n=e.style||{},i={};return _z(i,n,e),Object.assign(i,sM(e,t)),i}function uM(e,t){const n={},i=lM(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 Ez=()=>({...dg(),attrs:{}});function cM(e,t,n,i){const o=_.useMemo(()=>{const u=Ez();return az(u,t,sz(i),e.transformTemplate,e.style),{...u.attrs,style:{...u.style}}},[t]);if(e.style){const u={};_z(u,e.style,e),o.style={...u,...o.style}}return o}const fM=["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 hg(e){return typeof e!="string"||e.includes("-")?!1:!!(fM.indexOf(e)>-1||/[A-Z]/u.test(e))}function dM(e,t,n,{latestValues:i},o,u=!1,l){const d=(l??hg(e)?cM:uM)(t,i,o,e),h=iM(t,typeof e=="string",u),p=e!==_.Fragment?{...h,...d,ref:n}:{},{children:y}=t,v=_.useMemo(()=>nn(y)?y.get():y,[y]);return _.createElement(e,{...p,children:v})}function hM({scrapeMotionValuesFromProps:e,createRenderState:t},n,i,o){return{latestValues:mM(n,i,o,e),renderState:t()}}function mM(e,t,n,i){const o={},u=i(e,{});for(const v in u)o[v]=bc(u[v]);let{initial:l,animate:f}=e;const d=Kc(e),h=Kw(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"&&!Xc(y)){const v=Array.isArray(y)?y:[y];for(let b=0;b<v.length;b++){const E=ng(e,v[b]);if(E){const{transitionEnd:T,transition:C,...j}=E;for(const O in j){let z=j[O];if(Array.isArray(z)){const R=p?z.length-1:0;z=z[R]}z!==null&&(o[O]=z)}for(const O in T)o[O]=T[O]}}}return o}const Tz=e=>(t,n)=>{const i=_.useContext(Jc),o=_.useContext(Yc),u=()=>hM(e,t,i,o);return n?u():Lp(u)},pM=Tz({scrapeMotionValuesFromProps:cg,createRenderState:dg}),gM=Tz({scrapeMotionValuesFromProps:lz,createRenderState:Ez}),yM=Symbol.for("motionComponentSymbol");function xM(e,t,n){const i=_.useRef(n);_.useInsertionEffect(()=>{i.current=n});const o=_.useRef(null);return _.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 Cz=_.createContext({});function el(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function vM(e,t,n,i,o,u){const{visualElement:l}=_.useContext(Jc),f=_.useContext(kz),d=_.useContext(Yc),h=_.useContext(fg).reducedMotion,p=_.useRef(null),y=_.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 v=p.current,b=_.useContext(Cz);v&&!v.projection&&o&&(v.type==="html"||v.type==="svg")&&bM(p.current,n,o,b);const E=_.useRef(!1);_.useInsertionEffect(()=>{v&&E.current&&v.update(n,d)});const T=n[$w],C=_.useRef(!!T&&!window.MotionHandoffIsComplete?.(T)&&window.MotionHasOptimisedAnimation?.(T));return Wk(()=>{y.current=!0,v&&(E.current=!0,window.MotionIsMounted=!0,v.updateFeatures(),v.scheduleRenderMicrotask(),C.current&&v.animationState&&v.animationState.animateChanges())}),_.useEffect(()=>{v&&(!C.current&&v.animationState&&v.animationState.animateChanges(),C.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(T)}),C.current=!1),v.enteringChildren=void 0)}),v}function bM(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:Az(e.parent)),e.projection.setOptions({layoutId:o,layout:u,alwaysMeasureLayout:!!l||f&&el(f),visualElement:e,animationType:typeof u=="string"?u:"both",initialPromotionConfig:i,crossfade:p,layoutScroll:d,layoutRoot:h})}function Az(e){if(e)return e.options.allowProjection!==!1?e.projection:Az(e.parent)}function Kh(e,{forwardMotionProps:t=!1,type:n}={},i,o){i&&tM(i);const u=n?n==="svg":hg(e),l=u?gM:pM;function f(h,p){let y;const v={..._.useContext(fg),...h,layoutId:SM(h)},{isStatic:b}=v,E=oM(h),T=l(h,b);if(!b&&Qk){kM();const C=wM(v);y=C.MeasureLayout,E.visualElement=vM(e,T,v,o,C.ProjectionNode,u)}return x.jsxs(Jc.Provider,{value:E,children:[y&&E.visualElement?x.jsx(y,{visualElement:E.visualElement,...v}):null,dM(e,h,xM(T,E.visualElement,p),T,b,t,u)]})}f.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const d=_.forwardRef(f);return d[yM]=e,d}function SM({layoutId:e}){const t=_.useContext($p).id;return t&&e!==void 0?t+"-"+e:e}function kM(e,t){_.useContext(kz).strict}function wM(e){const t=wz(),{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 zM(e,t){if(typeof Proxy>"u")return Kh;const n=new Map,i=(u,l)=>Kh(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,Kh(l,void 0,e,t)),n.get(l))})}const _M=(e,t)=>t.isSVG??hg(e)?new nR(t):new KO(t,{allowProjection:e!==_.Fragment});class EM extends Ri{constructor(t){super(t),t.animationState||(t.animationState=sR(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Xc(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 TM=0;class CM extends Ri{constructor(){super(...arguments),this.id=TM++}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 AM={animation:{Feature:EM},exit:{Feature:CM}};function jl(e){return{point:{x:e.pageX,y:e.pageY}}}const jM=e=>t=>og(t)&&e(t,jl(t));function ol(e,t,n,i){return yl(e,t,jM(n),i)}const jz=({current:e})=>e?e.ownerDocument.defaultView:null,z1=(e,t)=>Math.abs(e-t);function NM(e,t){const n=z1(e.x,t.x),i=z1(e.y,t.y);return Math.sqrt(n**2+i**2)}const _1=new Set(["auto","scroll"]);class Nz{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=Qh(this.lastMoveEventInfo,this.history),E=this.startEvent!==null,T=NM(b.offset,{x:0,y:0})>=this.distanceThreshold;if(!E&&!T)return;const{point:C}=b,{timestamp:j}=Qt;this.history.push({...C,timestamp:j});const{onStart:O,onMove:z}=this.handlers;E||(O&&O(this.lastMoveEvent,b),this.startEvent=this.lastMoveEvent),z&&z(this.lastMoveEvent,b)},this.handlePointerMove=(b,E)=>{this.lastMoveEvent=b,this.lastMoveEventInfo=Jh(E,this.transformPagePoint),ft.update(this.updatePoint,!0)},this.handlePointerUp=(b,E)=>{this.end();const{onEnd:T,onSessionEnd:C,resumeAnimation:j}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&j&&j(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const O=Qh(b.type==="pointercancel"?this.lastMoveEventInfo:Jh(E,this.transformPagePoint),this.history);this.startEvent&&T&&T(b,O),C&&C(b,O)},!og(t))return;this.dragSnapToOrigin=u,this.handlers=n,this.transformPagePoint=i,this.distanceThreshold=l,this.contextWindow=o||window;const d=jl(t),h=Jh(d,this.transformPagePoint),{point:p}=h,{timestamp:y}=Qt;this.history=[{...p,timestamp:y}];const{onSessionStart:v}=n;v&&v(t,Qh(h,this.history)),this.removeListeners=Tl(ol(this.contextWindow,"pointermove",this.handlePointerMove),ol(this.contextWindow,"pointerup",this.handlePointerUp),ol(this.contextWindow,"pointercancel",this.handlePointerUp)),f&&this.startScrollTracking(f)}startScrollTracking(t){let n=t.parentElement;for(;n;){const i=getComputedStyle(n);(_1.has(i.overflowX)||_1.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(),Ai(this.updatePoint)}}function Jh(e,t){return t?{point:t(e.point)}:e}function E1(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Qh({point:e},t){return{point:e,delta:E1(e,Oz(t)),offset:E1(e,OM(t)),velocity:RM(t,.1)}}function OM(e){return e[0]}function Oz(e){return e[e.length-1]}function RM(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,i=null;const o=Oz(e);for(;n>=0&&(i=e[n],!(o.timestamp-i.timestamp>Xr(t)));)n--;if(!i)return{x:0,y:0};const u=nr(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 MM(e,{min:t,max:n},i){return t!==void 0&&e<t?e=i?xt(t,e,i.min):Math.max(e,t):n!==void 0&&e>n&&(e=i?xt(n,e,i.max):Math.min(e,n)),e}function T1(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 DM(e,{top:t,left:n,bottom:i,right:o}){return{x:T1(e.x,n,o),y:T1(e.y,t,i)}}function C1(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 $M(e,t){return{x:C1(e.x,t.x),y:C1(e.y,t.y)}}function LM(e,t){let n=.5;const i=hn(e),o=hn(t);return o>i?n=hl(t.min,t.max-i,e.min):i>o&&(n=hl(e.min,e.max-o,t.min)),wr(0,1,n)}function UM(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 rp=.35;function PM(e=rp){return e===!1?e=0:e===!0&&(e=rp),{x:A1(e,"left","right"),y:A1(e,"top","bottom")}}function A1(e,t,n){return{min:j1(e,t),max:j1(e,n)}}function j1(e,t){return typeof e=="number"?e:e[t]||0}const VM=new WeakMap;class ZM{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(jl(y).point)):this.pauseAnimation()},l=(y,v)=>{this.stopAnimation();const{drag:b,dragPropagation:E,onDragStart:T}=this.getProps();if(b&&!E&&(this.openDragLock&&this.openDragLock(),this.openDragLock=TO(b),!this.openDragLock))return;this.latestPointerEvent=y,this.latestPanInfo=v,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Qn(j=>{let O=this.getAxisMotionValue(j).get()||0;if(kr.test(O)){const{projection:z}=this.visualElement;if(z&&z.layout){const R=z.layout.layoutBox[j];R&&(O=hn(R)*(parseFloat(O)/100))}}this.originPoint[j]=O}),T&&ft.postRender(()=>T(y,v)),Xm(this.visualElement,"transform");const{animationState:C}=this.visualElement;C&&C.setActive("whileDrag",!0)},f=(y,v)=>{this.latestPointerEvent=y,this.latestPanInfo=v;const{dragPropagation:b,dragDirectionLock:E,onDirectionLock:T,onDrag:C}=this.getProps();if(!b&&!this.openDragLock)return;const{offset:j}=v;if(E&&this.currentDirection===null){this.currentDirection=BM(j),this.currentDirection!==null&&T&&T(this.currentDirection);return}this.updateAxis("x",v.point,j),this.updateAxis("y",v.point,j),this.visualElement.render(),C&&C(y,v)},d=(y,v)=>{this.latestPointerEvent=y,this.latestPanInfo=v,this.stop(y,v),this.latestPointerEvent=null,this.latestPanInfo=null},h=()=>Qn(y=>this.getAnimationState(y)==="paused"&&this.getAxisMotionValue(y).animation?.play()),{dragSnapToOrigin:p}=this.getProps();this.panSession=new Nz(t,{onSessionStart:u,onStart:l,onMove:f,onSessionEnd:d,resumeAnimation:h},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:p,distanceThreshold:i,contextWindow:jz(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||!tc(t,o,this.currentDirection))return;const u=this.getAxisMotionValue(t);let l=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(l=MM(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&&el(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&i?this.constraints=DM(i.layoutBox,t):this.constraints=!1,this.elastic=PM(n),o!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Qn(u=>{this.constraints!==!1&&this.getAxisMotionValue(u)&&(this.constraints[u]=UM(i.layoutBox[u],this.constraints[u]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!el(t))return!1;const i=t.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const u=HO(i,o.root,this.visualElement.getTransformPagePoint());let l=$M(o.layout.layoutBox,u);if(n){const f=n(ZO(l));this.hasMutatedConstraints=!!f,f&&(l=Ww(f))}return l}startAnimation(t){const{drag:n,dragMomentum:i,dragElastic:o,dragTransition:u,dragSnapToOrigin:l,onDragTransitionEnd:f}=this.getProps(),d=this.constraints||{},h=Qn(p=>{if(!tc(p,n,this.currentDirection))return;let y=d&&d[p]||{};l&&(y={min:0,max:0});const v=o?200:1e6,b=o?40:1e7,E={type:"inertia",velocity:i?t[p]:0,bounceStiffness:v,bounceDamping:b,timeConstant:750,restDelta:1,restSpeed:10,...u,...y};return this.startAxisValueAnimation(p,E)});return Promise.all(h).then(f)}startAxisValueAnimation(t,n){const i=this.getAxisMotionValue(t);return Xm(this.visualElement,t),i.start(tg(t,i,0,n,this.visualElement,!1))}stopAnimation(){Qn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Qn(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){Qn(n=>{const{drag:i}=this.getProps();if(!tc(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]-xt(l,f,.5)+d)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!el(n)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Qn(l=>{const f=this.getAxisMotionValue(l);if(f&&this.constraints!==!1){const d=f.get();o[l]=LM({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(),Qn(l=>{if(!tc(l,t,null))return;const f=this.getAxisMotionValue(l),{min:d,max:h}=this.constraints[l];f.set(xt(d,h,o[l]))})}addListeners(){if(!this.visualElement.current)return;VM.set(this.visualElement,this);const t=this.visualElement.current,n=ol(t,"pointerdown",d=>{const{drag:h,dragListener:p=!0}=this.getProps(),y=d.target,v=y!==t&&Gw(y);h&&p&&!v&&this.start(d)}),i=()=>{const{dragConstraints:d}=this.getProps();el(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=yl(window,"resize",()=>this.scalePositionWithinConstraints()),f=o.addEventListener("didUpdate",(({delta:d,hasLayoutChanged:h})=>{this.isDragging&&h&&(Qn(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=rp,dragMomentum:f=!0}=t;return{...t,drag:n,dragDirectionLock:i,dragPropagation:o,dragConstraints:u,dragElastic:l,dragMomentum:f}}}function tc(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function BM(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class IM extends Ri{constructor(t){super(t),this.removeGroupControls=rr,this.removeListeners=rr,this.controls=new ZM(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||rr}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 N1=e=>(t,n)=>{e&&ft.postRender(()=>e(t,n))};class HM extends Ri{constructor(){super(...arguments),this.removePointerDownListener=rr}onPointerDown(t){this.session=new Nz(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:jz(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:i,onPanEnd:o}=this.node.getProps();return{onSessionStart:N1(t),onStart:N1(n),onMove:i,onEnd:(u,l)=>{delete this.session,o&&ft.postRender(()=>o(u,l))}}}mount(){this.removePointerDownListener=ol(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 Wh=!1;class FM extends _.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),Wh&&u.root.didUpdate(),u.addEventListener("animationComplete",()=>{this.safeToRemove()}),u.setOptions({...u.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Sc.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}),Wh=!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(),ag.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i}=this.props,{projection:o}=t;Wh=!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 Rz(e){const[t,n]=Sz(),i=_.useContext($p);return x.jsx(FM,{...e,layoutGroup:i,switchLayoutGroup:_.useContext(Cz),isPresent:t,safeToRemove:n})}const qM={pan:{Feature:HM},drag:{Feature:IM,ProjectionNode:bz,MeasureLayout:Rz}};function O1(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,jl(t)))}class GM extends Ri{mount(){const{current:t}=this.node;t&&(this.unmount=CO(t,(n,i)=>(O1(this.node,i,"Start"),o=>O1(this.node,o,"End"))))}unmount(){}}class YM extends Ri{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=Tl(yl(this.node.current,"focus",()=>this.onFocus()),yl(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function R1(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,jl(t)))}class XM extends Ri{mount(){const{current:t}=this.node;t&&(this.unmount=NO(t,(n,i)=>(R1(this.node,i,"Start"),(o,{success:u})=>R1(this.node,o,u?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const ip=new WeakMap,em=new WeakMap,KM=e=>{const t=ip.get(e.target);t&&t(e)},JM=e=>{e.forEach(KM)};function QM({root:e,...t}){const n=e||document;em.has(n)||em.set(n,{});const i=em.get(n),o=JSON.stringify(t);return i[o]||(i[o]=new IntersectionObserver(JM,{root:e,...t})),i[o]}function WM(e,t,n){const i=QM(t);return ip.set(e,n),i.observe(e),()=>{ip.delete(e),i.unobserve(e)}}const eD={some:0,all:1};class tD extends Ri{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:eD[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(),v=h?p:y;v&&v(d)};return WM(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(nD(t,n))&&this.startObserver()}unmount(){}}function nD({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const rD={inView:{Feature:tD},tap:{Feature:XM},focus:{Feature:YM},hover:{Feature:GM}},iD={layout:{ProjectionNode:bz,MeasureLayout:Rz}},aD={...AM,...rD,...qM,...iD},fn=zM(aD,_M),Mz=()=>{const[e,t]=_.useState(!!localStorage.getItem("morpheus.auth.token"));return _.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 oD({onMenuClick:e,isDark:t,toggleTheme:n}){return x.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:[x.jsxs("h1",{className:"text-lg font-bold text-azure-primary dark:text-matrix-highlight flex items-center gap-2",children:[x.jsx(po,{className:"w-6 h-6"}),"MORPHEUS"]}),x.jsxs("div",{className:"flex items-center gap-2",children:[x.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?x.jsx(Zk,{className:"w-5 h-5"}):x.jsx(Pk,{className:"w-5 h-5"})}),x.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:x.jsx(yj,{className:"w-6 h-6"})})]})]})}const Oo=({open:e,onOpenChange:t,children:n})=>e?x.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[x.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm",onClick:()=>t(!1)}),x.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,Ro=({className:e,children:t})=>x.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:x.jsx("div",{className:"overflow-y-auto flex-grow p-6",children:t})}),Mo=({children:e})=>x.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}),Do=({className:e,children:t})=>x.jsx("h3",{className:`text-lg font-semibold leading-none tracking-tight ${e}`,children:t}),sD=({className:e,children:t})=>x.jsx("div",{className:`mt-6 flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 ${e}`,children:t}),tr=({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 x.jsx("button",{className:f,...i})};function lD({isOpen:e,onClose:t,onConfirm:n}){return x.jsx(Oo,{open:e,onOpenChange:t,children:x.jsxs(Ro,{className:"sm:max-w-md bg-azure-surface dark:bg-zinc-900 border-azure-border dark:border-matrix-primary",children:[x.jsx(Mo,{children:x.jsx(Do,{className:"text-azure-primary dark:text-matrix-highlight flex items-center gap-2",children:"Confirm Restart"})}),x.jsxs("div",{children:[x.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."}),x.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 justify-end",children:[x.jsx(tr,{variant:"outline",onClick:t,children:"Cancel"}),x.jsx(tr,{variant:"destructive",onClick:()=>{n(),t()},children:"Confirm Restart"})]})]})]})})}function uD({children:e}){const t=hr(),[n,i]=_.useState(()=>{const v=localStorage.getItem("theme");return v?v==="dark":!0}),[o,u]=_.useState(!1),[l,f]=_.useState(!1),{logout:d}=Mz(),h=async()=>{try{await mt.post("/restart",{}),alert("Restart initiated successfully. The agent will restart shortly.")}catch(v){console.error("Failed to restart:",v),alert("Failed to restart the agent. Please try again.")}};_.useEffect(()=>{n?(document.documentElement.classList.add("dark"),localStorage.setItem("theme","dark")):(document.documentElement.classList.remove("dark"),localStorage.setItem("theme","light"))},[n]),_.useEffect(()=>{u(!1)},[t.pathname]);const p=[{icon:r0,label:"Dashboard",path:"/"},{icon:fl,label:"Chat",path:"/chat"},{icon:l0,label:"Zaion",path:"/zaion"},{icon:o0,label:"MCP Servers",path:"/mcp-servers"},{icon:Em,label:"Usage Stats",path:"/stats"},{icon:_c,label:"Model Pricing",path:"/model-pricing"},{icon:po,label:"Sati Memories",path:"/sati-memories"}],y=[{icon:r0,label:"Dashboard",path:"/"},{icon:fl,label:"Chat",path:"/chat"},{icon:l0,label:"Zaion",path:"/zaion"},{icon:o0,label:"MCP Servers",path:"/mcp-servers"},{icon:Em,label:"Usage Stats",path:"/stats"},{icon:_c,label:"Model Pricing",path:"/model-pricing"},{icon:po,label:"Sati Memories",path:"/sati-memories"}];return x.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:[x.jsx(oD,{onMenuClick:()=>u(!0),isDark:n,toggleTheme:()=>i(!n)}),x.jsxs("div",{className:"flex flex-1 overflow-hidden pt-16 lg:pt-0",children:[" ",x.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:[x.jsxs("div",{className:"p-4 border-b border-azure-border dark:border-matrix-primary/30 flex justify-between items-center",children:[x.jsxs("h1",{className:"text-xl font-bold text-azure-primary dark:text-matrix-highlight flex items-center gap-2",children:[x.jsx(po,{className:"w-6 h-6"}),"MORPHEUS"]}),x.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?x.jsx(Zk,{className:"w-4 h-4"}):x.jsx(Pk,{className:"w-4 h-4"})})]}),x.jsxs("nav",{className:"flex-1 p-4 space-y-2",children:[p.map(v=>{const b=t.pathname===v.path;return x.jsxs(mo,{to:v.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:[x.jsx(v.icon,{className:"w-5 h-5"}),x.jsx("span",{children:v.label})]},v.path)}),x.jsxs(mo,{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:[x.jsx(u0,{className:"w-5 h-5"}),x.jsx("span",{children:"Logs"})]},"/logs")]}),x.jsx("div",{className:"p-2",children:x.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:[x.jsx(s0,{className:"w-5 h-5"}),x.jsx("span",{children:"Restart"})]})}),x.jsx("div",{className:"p-2",children:x.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:[x.jsx(i0,{className:"w-5 h-5"}),x.jsx("span",{children:"Logout"})]})})]}),x.jsx(WR,{children:o&&x.jsxs(fn.div,{className:"fixed inset-0 z-50 lg:hidden",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:()=>u(!1),children:[x.jsx("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm"}),x.jsxs(fn.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:v=>v.stopPropagation(),children:[x.jsxs("div",{className:"p-4 border-b border-azure-border dark:border-matrix-primary/30 flex justify-between items-center",children:[x.jsxs("h1",{className:"text-xl font-bold text-azure-primary dark:text-matrix-highlight flex items-center gap-2",children:[x.jsx(po,{className:"w-6 h-6"}),"MORPHEUS"]}),x.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:x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:x.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),x.jsxs("nav",{className:"flex-1 p-4 space-y-2 overflow-y-auto",children:[y.map(v=>{const b=t.pathname===v.path;return x.jsxs(mo,{to:v.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:[x.jsx(v.icon,{className:"w-5 h-5"}),x.jsx("span",{children:v.label})]},v.path)}),x.jsxs(mo,{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:[x.jsx(u0,{className:"w-5 h-5"}),x.jsx("span",{children:"Logs"})]})]}),x.jsx("div",{className:"p-2",children:x.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:[x.jsx(s0,{className:"w-5 h-5"}),x.jsx("span",{children:"Restart"})]})}),x.jsx("div",{className:"p-2",children:x.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:[x.jsx(i0,{className:"w-5 h-5"}),x.jsx("span",{children:"Logout"})]})})]})]})}),x.jsxs("main",{className:`flex-1 p-4 md:p-8 relative flex flex-col ${t.pathname==="/chat"?"overflow-hidden":"overflow-auto"}`,children:[x.jsx("div",{className:`w-full mx-auto flex-1 ${t.pathname==="/chat"?"h-full":"max-w-6xl"}`,children:e}),x.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"})]})]}),x.jsx(wN,{}),x.jsx(lD,{isOpen:l,onClose:()=>f(!1),onConfirm:h})]})}const cD={hidden:{opacity:0,y:20},show:{opacity:1,y:0}},da=({title:e,value:t,icon:n,subValue:i})=>x.jsxs(fn.div,{variants:cD,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:[x.jsxs("div",{className:"flex justify-between items-start mb-4",children:[x.jsx("h3",{className:"text-azure-text-secondary dark:text-matrix-secondary text-sm font-bold uppercase",children:e}),x.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"})]}),x.jsx("div",{className:"text-3xl font-bold text-azure-primary dark:text-matrix-highlight mb-1 font-mono tracking-tighter truncate",children:t}),i&&x.jsx("div",{className:"text-xs text-azure-text-secondary dark:text-matrix-secondary opacity-70 font-mono",children:i})]}),ap={fetchUsageStats:async()=>mt.get("/stats/usage"),fetchGroupedUsageStats:async()=>mt.get("/stats/usage/grouped")};function fD(){const{data:e}=Ci("/api/stats/usage",ap.fetchUsageStats,{refreshInterval:5e3});return x.jsxs(x.Fragment,{children:[x.jsx(da,{title:"Total Input",value:e?e.totalInputTokens.toLocaleString():"-",icon:HA,subValue:"Tokens processed"}),x.jsx(da,{title:"Total Output",value:e?e.totalOutputTokens.toLocaleString():"-",icon:qA,subValue:"Tokens generated"})]})}function dD(){const{data:e}=Kk(),t={hidden:{opacity:0},show:{opacity:1,transition:{staggerChildren:.1}}},n={hidden:{opacity:0,y:20},show:{opacity:1,y:0}};return x.jsxs(fn.div,{className:"space-y-8",variants:t,initial:"hidden",animate:"show",children:[x.jsxs(fn.div,{variants:n,children:[x.jsx("h2",{className:"text-2xl font-bold text-azure-primary dark:text-matrix-highlight mb-2",children:"SYSTEM STATUS"}),x.jsx("p",{className:"text-azure-text-secondary dark:text-matrix-secondary opacity-80",children:"Overview of the Morpheus agent runtime."})]}),x.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[x.jsx(da,{title:"Agent Status",value:e?.status.toUpperCase()||"CONNECTING...",icon:po,subValue:e?`PID: ${e.pid}`:""}),x.jsx(da,{title:"Uptime",value:e?Jk(e.uptimeSeconds):"-",icon:$k,subValue:e?`${e.uptimeSeconds.toFixed(0)} seconds`:""}),x.jsx(da,{title:"Version",value:e?.projectVersion||"-",icon:Lk,subValue:`Node ${e?.nodeVersion||"-"}`}),x.jsx(da,{title:"Provider",value:e?.llmProvider?.toUpperCase()||"-",icon:JA,subValue:"LLM Inference Engine"}),x.jsx(da,{title:"Model",value:e?.llmModel||"-",icon:XA,subValue:"Active Model"}),x.jsx(fD,{})]})]})}const hD=({sessions:e,activeSessionId:t,onSelectSession:n,onCreateSession:i,onArchiveSession:o,onDeleteSession:u,onRenameSession:l,isOpen:f,toggleSidebar:d})=>{const[h,p]=_.useState(null),[y,v]=_.useState(""),b=_.useRef(null);_.useEffect(()=>{h&&b.current&&b.current.focus()},[h]);const E=(O,z)=>{O.stopPropagation(),p(z.id),v(z.title||"Untitled Session")},T=O=>{O?.stopPropagation(),h&&y.trim()&&(l(h,y.trim()),p(null))},C=O=>{O?.stopPropagation(),p(null)},j=O=>{O.key==="Enter"?T():O.key==="Escape"&&C()};return f?x.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:[x.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:[x.jsx("h2",{className:"text-lg font-semibold text-gray-800 dark:text-matrix-highlight",children:"Sessions"}),x.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:x.jsx(fl,{size:18})})]}),x.jsx("div",{className:"p-4",children:x.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:[x.jsx(a0,{size:18}),x.jsx("span",{children:"New Chat"})]})}),x.jsxs("div",{className:"flex-1 overflow-y-auto px-2 space-y-1 custom-scrollbar",children:[e.map(O=>x.jsxs("div",{onClick:()=>n(O.id),className:`group flex items-center justify-between p-3 rounded-lg cursor-pointer transition-all border ${t===O.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:[x.jsx("div",{className:"flex flex-col overflow-hidden w-full mr-2",children:h===O.id?x.jsx("div",{className:"flex items-center gap-1 w-full",onClick:z=>z.stopPropagation(),children:x.jsx("input",{ref:b,type:"text",value:y,onChange:z=>v(z.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"})}):x.jsxs(x.Fragment,{children:[x.jsx("span",{className:`text-sm font-medium truncate ${t===O.id?"text-azure-primary dark:text-matrix-highlight":"text-gray-700 dark:text-matrix-secondary"}`,children:O.title||"Untitled Session"}),x.jsx("span",{className:"text-xs text-gray-400 dark:text-matrix-secondary/70 mt-0.5",children:new Date(O.started_at).toLocaleString()})]})}),x.jsx("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:h===O.id?x.jsxs(x.Fragment,{children:[x.jsx("button",{onClick:T,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:x.jsx(tj,{size:14})}),x.jsx("button",{onClick:C,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:x.jsx(Ij,{size:14})})]}):x.jsxs(x.Fragment,{children:[x.jsx("button",{onClick:z=>E(z,O),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:x.jsx(Vk,{size:14})}),x.jsx("button",{onClick:z=>{z.stopPropagation(),o(O.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:x.jsx(BA,{size:14})}),x.jsx("button",{onClick:z=>{z.stopPropagation(),u(O.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:x.jsx(Ec,{size:14})})]})})]},O.id)),e.length===0&&x.jsx("div",{className:"text-center text-gray-400 dark:text-matrix-secondary/50 mt-10 text-sm",children:"No active sessions."})]})]}):x.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:[x.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:x.jsx(fl,{})}),x.jsx("div",{className:"border-t border-gray-200 dark:border-matrix-primary/30 w-full my-2"}),x.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:x.jsx(a0,{size:20})})]})};function mD(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const pD=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,gD=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,yD={};function M1(e,t){return(yD.jsx?gD:pD).test(e)}const xD=/[ \t\n\f\r]/g;function vD(e){return typeof e=="object"?e.type==="text"?D1(e.value):!1:D1(e)}function D1(e){return e.replace(xD,"")===""}class Nl{constructor(t,n,i){this.normal=n,this.property=t,i&&(this.space=i)}}Nl.prototype.normal={};Nl.prototype.property={};Nl.prototype.space=void 0;function Dz(e,t){const n={},i={};for(const o of e)Object.assign(n,o.property),Object.assign(i,o.normal);return new Nl(n,i,t)}function op(e){return e.toLowerCase()}class _n{constructor(t,n){this.attribute=n,this.property=t}}_n.prototype.attribute="";_n.prototype.booleanish=!1;_n.prototype.boolean=!1;_n.prototype.commaOrSpaceSeparated=!1;_n.prototype.commaSeparated=!1;_n.prototype.defined=!1;_n.prototype.mustUseProperty=!1;_n.prototype.number=!1;_n.prototype.overloadedBoolean=!1;_n.prototype.property="";_n.prototype.spaceSeparated=!1;_n.prototype.space=void 0;let bD=0;const je=ba(),Mt=ba(),sp=ba(),ae=ba(),at=ba(),Eo=ba(),Dn=ba();function ba(){return 2**++bD}const lp=Object.freeze(Object.defineProperty({__proto__:null,boolean:je,booleanish:Mt,commaOrSpaceSeparated:Dn,commaSeparated:Eo,number:ae,overloadedBoolean:sp,spaceSeparated:at},Symbol.toStringTag,{value:"Module"})),tm=Object.keys(lp);class mg extends _n{constructor(t,n,i,o){let u=-1;if(super(t,n),$1(this,"space",o),typeof i=="number")for(;++u<tm.length;){const l=tm[u];$1(this,tm[u],(i&lp[l])===lp[l])}}}mg.prototype.defined=!0;function $1(e,t,n){n&&(e[t]=n)}function Fo(e){const t={},n={};for(const[i,o]of Object.entries(e.properties)){const u=new mg(i,e.transform(e.attributes||{},i),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(i)&&(u.mustUseProperty=!0),t[i]=u,n[op(i)]=i,n[op(u.attribute)]=i}return new Nl(t,n,e.space)}const $z=Fo({properties:{ariaActiveDescendant:null,ariaAtomic:Mt,ariaAutoComplete:null,ariaBusy:Mt,ariaChecked:Mt,ariaColCount:ae,ariaColIndex:ae,ariaColSpan:ae,ariaControls:at,ariaCurrent:null,ariaDescribedBy:at,ariaDetails:null,ariaDisabled:Mt,ariaDropEffect:at,ariaErrorMessage:null,ariaExpanded:Mt,ariaFlowTo:at,ariaGrabbed:Mt,ariaHasPopup:null,ariaHidden:Mt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:at,ariaLevel:ae,ariaLive:null,ariaModal:Mt,ariaMultiLine:Mt,ariaMultiSelectable:Mt,ariaOrientation:null,ariaOwns:at,ariaPlaceholder:null,ariaPosInSet:ae,ariaPressed:Mt,ariaReadOnly:Mt,ariaRelevant:null,ariaRequired:Mt,ariaRoleDescription:at,ariaRowCount:ae,ariaRowIndex:ae,ariaRowSpan:ae,ariaSelected:Mt,ariaSetSize:ae,ariaSort:null,ariaValueMax:ae,ariaValueMin:ae,ariaValueNow:ae,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Lz(e,t){return t in e?e[t]:t}function Uz(e,t){return Lz(e,t.toLowerCase())}const SD=Fo({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Eo,acceptCharset:at,accessKey:at,action:null,allow:null,allowFullScreen:je,allowPaymentRequest:je,allowUserMedia:je,alt:null,as:null,async:je,autoCapitalize:null,autoComplete:at,autoFocus:je,autoPlay:je,blocking:at,capture:null,charSet:null,checked:je,cite:null,className:at,cols:ae,colSpan:null,content:null,contentEditable:Mt,controls:je,controlsList:at,coords:ae|Eo,crossOrigin:null,data:null,dateTime:null,decoding:null,default:je,defer:je,dir:null,dirName:null,disabled:je,download:sp,draggable:Mt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:je,formTarget:null,headers:at,height:ae,hidden:sp,high:ae,href:null,hrefLang:null,htmlFor:at,httpEquiv:at,id:null,imageSizes:null,imageSrcSet:null,inert:je,inputMode:null,integrity:null,is:null,isMap:je,itemId:null,itemProp:at,itemRef:at,itemScope:je,itemType:at,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:je,low:ae,manifest:null,max:null,maxLength:ae,media:null,method:null,min:null,minLength:ae,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:ae,pattern:null,ping:at,placeholder:null,playsInline:je,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:je,referrerPolicy:null,rel:at,required:je,reversed:je,rows:ae,rowSpan:ae,sandbox:at,scope:null,scoped:je,seamless:je,selected:je,shadowRootClonable:je,shadowRootDelegatesFocus:je,shadowRootMode:null,shape:null,size:ae,sizes:null,slot:null,span:ae,spellCheck:Mt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ae,step:null,style:null,tabIndex:ae,target:null,title:null,translate:null,type:null,typeMustMatch:je,useMap:null,value:Mt,width:ae,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:at,axis:null,background:null,bgColor:null,border:ae,borderColor:null,bottomMargin:ae,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:ae,leftMargin:ae,link:null,longDesc:null,lowSrc:null,marginHeight:ae,marginWidth:ae,noResize:je,noHref:je,noShade:je,noWrap:je,object:null,profile:null,prompt:null,rev:null,rightMargin:ae,rules:null,scheme:null,scrolling:Mt,standby:null,summary:null,text:null,topMargin:ae,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ae,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:je,disableRemotePlayback:je,prefix:null,property:null,results:ae,security:null,unselectable:null},space:"html",transform:Uz}),kD=Fo({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:Dn,accentHeight:ae,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ae,amplitude:ae,arabicForm:null,ascent:ae,attributeName:null,attributeType:null,azimuth:ae,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ae,by:null,calcMode:null,capHeight:ae,className:at,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:ae,diffuseConstant:ae,direction:null,display:null,dur:null,divisor:ae,dominantBaseline:null,download:je,dx:null,dy:null,edgeMode:null,editable:null,elevation:ae,enableBackground:null,end:null,event:null,exponent:ae,externalResourcesRequired:null,fill:null,fillOpacity:ae,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:Eo,g2:Eo,glyphName:Eo,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ae,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ae,horizOriginX:ae,horizOriginY:ae,id:null,ideographic:ae,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ae,k:ae,k1:ae,k2:ae,k3:ae,k4:ae,kernelMatrix:Dn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ae,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:ae,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:ae,overlineThickness:ae,paintOrder:null,panose1:null,path:null,pathLength:ae,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:at,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ae,pointsAtY:ae,pointsAtZ:ae,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Dn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Dn,rev:Dn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Dn,requiredFeatures:Dn,requiredFonts:Dn,requiredFormats:Dn,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:ae,specularExponent:ae,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ae,strikethroughThickness:ae,string:null,stroke:null,strokeDashArray:Dn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ae,strokeOpacity:ae,strokeWidth:null,style:null,surfaceScale:ae,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Dn,tabIndex:ae,tableValues:null,target:null,targetX:ae,targetY:ae,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Dn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ae,underlineThickness:ae,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ae,values:null,vAlphabetic:ae,vMathematical:ae,vectorEffect:null,vHanging:ae,vIdeographic:ae,version:null,vertAdvY:ae,vertOriginX:ae,vertOriginY:ae,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ae,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Lz}),Pz=Fo({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()}}),Vz=Fo({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Uz}),Zz=Fo({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),wD={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"},zD=/[A-Z]/g,L1=/-[a-z]/g,_D=/^data[-\w.:]+$/i;function ED(e,t){const n=op(t);let i=t,o=_n;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&_D.test(t)){if(t.charAt(4)==="-"){const u=t.slice(5).replace(L1,CD);i="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=t.slice(4);if(!L1.test(u)){let l=u.replace(zD,TD);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}o=mg}return new o(i,t)}function TD(e){return"-"+e.toLowerCase()}function CD(e){return e.charAt(1).toUpperCase()}const AD=Dz([$z,SD,Pz,Vz,Zz],"html"),pg=Dz([$z,kD,Pz,Vz,Zz],"svg");function jD(e){return e.join(" ").trim()}var lo={},nm,U1;function ND(){if(U1)return nm;U1=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="",v="comment",b="declaration";function E(C,j){if(typeof C!="string")throw new TypeError("First argument must be a string");if(!C)return[];j=j||{};var O=1,z=1;function R(le){var ne=le.match(t);ne&&(O+=ne.length);var P=le.lastIndexOf(d);z=~P?le.length-P:z+le.length}function L(){var le={line:O,column:z};return function(ne){return ne.position=new $(le),K(),ne}}function $(le){this.start=le,this.end={line:O,column:z},this.source=j.source}$.prototype.content=C;function G(le){var ne=new Error(j.source+":"+O+":"+z+": "+le);if(ne.reason=le,ne.filename=j.source,ne.line=O,ne.column=z,ne.source=C,!j.silent)throw ne}function V(le){var ne=le.exec(C);if(ne){var P=ne[0];return R(P),C=C.slice(P.length),ne}}function K(){V(n)}function ue(le){var ne;for(le=le||[];ne=re();)ne!==!1&&le.push(ne);return le}function re(){var le=L();if(!(h!=C.charAt(0)||p!=C.charAt(1))){for(var ne=2;y!=C.charAt(ne)&&(p!=C.charAt(ne)||h!=C.charAt(ne+1));)++ne;if(ne+=2,y===C.charAt(ne-1))return G("End of comment missing");var P=C.slice(2,ne-2);return z+=2,R(P),C=C.slice(ne),z+=2,le({type:v,comment:P})}}function oe(){var le=L(),ne=V(i);if(ne){if(re(),!V(o))return G("property missing ':'");var P=V(u),Y=le({type:b,property:T(ne[0].replace(e,y)),value:P?T(P[0].replace(e,y)):y});return V(l),Y}}function ke(){var le=[];ue(le);for(var ne;ne=oe();)ne!==!1&&(le.push(ne),ue(le));return le}return K(),ke()}function T(C){return C?C.replace(f,y):y}return nm=E,nm}var P1;function OD(){if(P1)return lo;P1=1;var e=lo&&lo.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(lo,"__esModule",{value:!0}),lo.default=n;const t=e(ND());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 lo}var Gs={},V1;function RD(){if(V1)return Gs;V1=1,Object.defineProperty(Gs,"__esModule",{value:!0}),Gs.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 Gs.camelCase=d,Gs}var Ys,Z1;function MD(){if(Z1)return Ys;Z1=1;var e=Ys&&Ys.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(OD()),n=RD();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,Ys=i,Ys}var DD=MD();const $D=wp(DD),Bz=Iz("end"),gg=Iz("start");function Iz(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 LD(e){const t=gg(e),n=Bz(e);if(t&&n)return{start:t,end:n}}function sl(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?B1(e.position):"start"in e||"end"in e?B1(e):"line"in e||"column"in e?up(e):""}function up(e){return I1(e&&e.line)+":"+I1(e&&e.column)}function B1(e){return up(e&&e.start)+"-"+up(e&&e.end)}function I1(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=sl(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 yg={}.hasOwnProperty,UD=new Map,PD=/[A-Z]/g,VD=new Set(["table","tbody","thead","tfoot","tr"]),ZD=new Set(["td","th"]),Hz="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function BD(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=KD(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=XD(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"?pg:AD,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},u=Fz(o,e,void 0);return u&&typeof u!="string"?u:o.create(e,o.Fragment,{children:u||void 0},void 0)}function Fz(e,t,n){if(t.type==="element")return ID(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return HD(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return qD(e,t,n);if(t.type==="mdxjsEsm")return FD(e,t);if(t.type==="root")return GD(e,t,n);if(t.type==="text")return YD(e,t)}function ID(e,t,n){const i=e.schema;let o=i;t.tagName.toLowerCase()==="svg"&&i.space==="html"&&(o=pg,e.schema=o),e.ancestors.push(t);const u=Gz(e,t.tagName,!1),l=JD(e,t);let f=vg(e,t);return VD.has(t.tagName)&&(f=f.filter(function(d){return typeof d=="string"?!vD(d):!0})),qz(e,l,u,t),xg(l,f),e.ancestors.pop(),e.schema=i,e.create(t,u,l,n)}function HD(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)}xl(e,t.position)}function FD(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);xl(e,t.position)}function qD(e,t,n){const i=e.schema;let o=i;t.name==="svg"&&i.space==="html"&&(o=pg,e.schema=o),e.ancestors.push(t);const u=t.name===null?e.Fragment:Gz(e,t.name,!0),l=QD(e,t),f=vg(e,t);return qz(e,l,u,t),xg(l,f),e.ancestors.pop(),e.schema=i,e.create(t,u,l,n)}function GD(e,t,n){const i={};return xg(i,vg(e,t)),e.create(t,e.Fragment,i,n)}function YD(e,t){return t.value}function qz(e,t,n,i){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=i)}function xg(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function XD(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 KD(e,t){return n;function n(i,o,u,l){const f=Array.isArray(u.children),d=gg(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 JD(e,t){const n={};let i,o;for(o in t.properties)if(o!=="children"&&yg.call(t.properties,o)){const u=WD(e,o,t.properties[o]);if(u){const[l,f]=u;e.tableCellAlignToStyle&&l==="align"&&typeof f=="string"&&ZD.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 QD(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 xl(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 xl(e,t.position);else u=i.value===null?!0:i.value;n[o]=u}return n}function vg(e,t){const n=[];let i=-1;const o=e.passKeys?new Map:UD;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=Fz(e,u,l);f!==void 0&&n.push(f)}return n}function WD(e,t,n){const i=ED(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=i.commaSeparated?mD(n):jD(n)),i.property==="style"){let o=typeof n=="object"?n:e3(e,String(n));return e.stylePropertyNameCase==="css"&&(o=t3(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&i.space?wD[i.property]||i.property:i.attribute,n]}}function e3(e,t){try{return $D(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=Hz+"#cannot-parse-style-attribute",o}}function Gz(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=M1(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=M1(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(i.type==="Literal"){const o=i.value;return yg.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(i);xl(e)}function xl(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=Hz+"#cannot-handle-mdx-estrees-without-createevaluater",n}function t3(e){const t={};let n;for(n in e)yg.call(e,n)&&(t[n3(n)]=e[n]);return t}function n3(e){let t=e.replace(PD,r3);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function r3(e){return"-"+e.toLowerCase()}const rm={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"]},i3={};function a3(e,t){const n=i3,i=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Yz(e,i,o)}function Yz(e,t,n){if(o3(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 H1(e.children,t,n)}return Array.isArray(e)?H1(e,t,n):""}function H1(e,t,n){const i=[];let o=-1;for(;++o<e.length;)i[o]=Yz(e[o],t,n);return i.join("")}function o3(e){return!!(e&&typeof e=="object")}const F1=document.createElement("i");function bg(e){const t="&"+e+";";F1.innerHTML=t;const n=F1.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 er(e,t){return e.length>0?(zr(e,e.length,0,t),e):t}const q1={}.hasOwnProperty;function s3(e){const t={};let n=-1;for(;++n<e.length;)l3(t,e[n]);return t}function l3(e,t){let n;for(n in t){const o=(q1.call(e,n)?e[n]:void 0)||(e[n]={}),u=t[n];let l;if(u)for(l in u){q1.call(o,l)||(o[l]=[]);const f=u[l];u3(o[l],Array.isArray(f)?f:f?[f]:[])}}}function u3(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 Xz(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 To(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Sr=Mi(/[A-Za-z]/),$n=Mi(/[\dA-Za-z]/),c3=Mi(/[#-'*+\--9=?A-Z^-~]/);function cp(e){return e!==null&&(e<32||e===127)}const fp=Mi(/\d/),f3=Mi(/[\dA-Fa-f]/),d3=Mi(/[!-/:-@[-`{-~]/);function _e(e){return e!==null&&e<-2}function zn(e){return e!==null&&(e<0||e===32)}function Fe(e){return e===-2||e===-1||e===32}const h3=Mi(new RegExp("\\p{P}|\\p{S}","u")),m3=Mi(/\s/);function Mi(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function qo(e){const t=[];let n=-1,i=0,o=0;for(;++n<e.length;){const u=e.charCodeAt(n);let l="";if(u===37&&$n(e.charCodeAt(n+1))&&$n(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 p3={tokenize:g3};function g3(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 y3={tokenize:x3},G1={tokenize:v3};function x3(e){const t=this,n=[];let i=0,o,u,l;return f;function f(z){if(i<n.length){const R=n[i];return t.containerState=R[1],e.attempt(R[0].continuation,d,h)(z)}return h(z)}function d(z){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&O();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 G=R;for(;G<t.events.length;)t.events[G][1].end={...$},G++;return zr(t.events,L+1,0,t.events.slice(R)),t.events.length=G,h(z)}return f(z)}function h(z){if(i===n.length){if(!o)return v(z);if(o.currentConstruct&&o.currentConstruct.concrete)return E(z);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(G1,p,y)(z)}function p(z){return o&&O(),j(i),v(z)}function y(z){return t.parser.lazy[t.now().line]=i!==n.length,l=t.now().offset,E(z)}function v(z){return t.containerState={},e.attempt(G1,b,E)(z)}function b(z){return i++,n.push([t.currentConstruct,t.containerState]),v(z)}function E(z){if(z===null){o&&O(),j(0),e.consume(z);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:u}),T(z)}function T(z){if(z===null){C(e.exit("chunkFlow"),!0),j(0),e.consume(z);return}return _e(z)?(e.consume(z),C(e.exit("chunkFlow")),i=0,t.interrupt=void 0,f):(e.consume(z),T)}function C(z,R){const L=t.sliceStream(z);if(R&&L.push(null),z.previous=u,u&&(u.next=z),u=z,o.defineSkip(z.start),o.write(L),t.parser.lazy[z.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 G=t.events.length;let V=G,K,ue;for(;V--;)if(t.events[V][0]==="exit"&&t.events[V][1].type==="chunkFlow"){if(K){ue=t.events[V][1].end;break}K=!0}for(j(i),$=G;$<t.events.length;)t.events[$][1].end={...ue},$++;zr(t.events,V+1,0,t.events.slice(G)),t.events.length=$}}function j(z){let R=n.length;for(;R-- >z;){const L=n[R];t.containerState=L[1],L[0].exit.call(t,e)}n.length=z}function O(){o.write([null]),u=void 0,o=void 0,t.containerState._closeFlow=void 0}}function v3(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 Y1(e){if(e===null||zn(e)||m3(e))return 1;if(h3(e))return 2}function Sg(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 dp={name:"attention",resolveAll:b3,tokenize:S3};function b3(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},v={...e[n][1].start};X1(y,-d),X1(v,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:v},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=er(h,[["enter",e[i][1],t],["exit",e[i][1],t]])),h=er(h,[["enter",o,t],["enter",l,t],["exit",l,t],["enter",u,t]]),h=er(h,Sg(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),h=er(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=er(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 S3(e,t){const n=this.parser.constructs.attentionMarkers.null,i=this.previous,o=Y1(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=Y1(d),y=!p||p===2&&o||n.includes(d),v=!o||o===2&&p||n.includes(i);return h._open=!!(u===42?y:y&&(o||!v)),h._close=!!(u===42?v:v&&(p||!y)),t(d)}}function X1(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const k3={name:"autolink",tokenize:w3};function w3(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 Sr(b)?(e.consume(b),l):b===64?n(b):h(b)}function l(b){return b===43||b===45||b===46||$n(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||$n(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||cp(b)?n(b):(e.consume(b),d)}function h(b){return b===64?(e.consume(b),p):c3(b)?(e.consume(b),h):n(b)}function p(b){return $n(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):v(b)}function v(b){if((b===45||$n(b))&&i++<63){const E=b===45?v:y;return e.consume(b),E}return n(b)}}const Qc={partial:!0,tokenize:z3};function z3(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 Kz={continuation:{tokenize:E3},exit:T3,name:"blockQuote",tokenize:_3};function _3(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 E3(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(Kz,t,n)(l)}}function T3(e){e.exit("blockQuote")}const Jz={name:"characterEscape",tokenize:C3};function C3(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 d3(u)?(e.enter("characterEscapeValue"),e.consume(u),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(u)}}const Qz={name:"characterReference",tokenize:A3};function A3(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=$n,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=f3,p):(e.enter("characterReferenceValue"),u=7,l=fp,p(y))}function p(y){if(y===59&&o){const v=e.exit("characterReferenceValue");return l===$n&&!bg(i.sliceSerialize(v))?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 K1={partial:!0,tokenize:N3},J1={concrete:!0,name:"codeFenced",tokenize:j3};function j3(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 G=i.events[i.events.length-1];return u=G&&G[1].type==="linePrefix"?G[2].sliceSerialize(G[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(K1,T,R)($)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),v($))}function v($){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($),v)}function b($){return $===null||_e($)?y($):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),E($))}function E($){return $===null||_e($)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),y($)):$===96&&$===f?n($):(e.consume($),E)}function T($){return e.attempt(o,R,C)($)}function C($){return e.enter("lineEnding"),e.consume($),e.exit("lineEnding"),j}function j($){return u>0&&Fe($)?ot(e,O,"linePrefix",u+1)($):O($)}function O($){return $===null||_e($)?e.check(K1,T,R)($):(e.enter("codeFlowValue"),z($))}function z($){return $===null||_e($)?(e.exit("codeFlowValue"),O($)):(e.consume($),z)}function R($){return e.exit("codeFenced"),t($)}function L($,G,V){let K=0;return ue;function ue(ne){return $.enter("lineEnding"),$.consume(ne),$.exit("lineEnding"),re}function re(ne){return $.enter("codeFencedFence"),Fe(ne)?ot($,oe,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ne):oe(ne)}function oe(ne){return ne===f?($.enter("codeFencedFenceSequence"),ke(ne)):V(ne)}function ke(ne){return ne===f?(K++,$.consume(ne),ke):K>=l?($.exit("codeFencedFenceSequence"),Fe(ne)?ot($,le,"whitespace")(ne):le(ne)):V(ne)}function le(ne){return ne===null||_e(ne)?($.exit("codeFencedFence"),G(ne)):V(ne)}}}function N3(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 im={name:"codeIndented",tokenize:R3},O3={partial:!0,tokenize:M3};function R3(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(O3,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 M3(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 D3={name:"codeText",previous:L3,resolve:$3,tokenize:U3};function $3(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 L3(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function U3(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 P3{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&&Xs(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),Xs(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Xs(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);Xs(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Xs(this.left,n.reverse())}}}function Xs(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 Wz(e){const t={};let n=-1,i,o,u,l,f,d,h;const p=new P3(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,V3(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 V3(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,v=-1,b=n,E=0,T=0;const C=[T];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;++v<f.length;)f[v][0]==="exit"&&f[v-1][0]==="enter"&&f[v][1].type===f[v-1][1].type&&f[v][1].start.line!==f[v][1].end.line&&(T=v+1,C.push(T),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(l.events=[],b?(b._tokenizer=void 0,b.previous=void 0):C.pop(),v=C.length;v--;){const j=f.slice(C[v],C[v+1]),O=u.pop();d.push([O,O+j.length-1]),e.splice(O,2,j)}for(d.reverse(),v=-1;++v<d.length;)h[E+d[v][0]]=E+d[v][1],E+=d[v][1]-d[v][0]-1;return h}const Z3={resolve:I3,tokenize:H3},B3={partial:!0,tokenize:F3};function I3(e){return Wz(e),e}function H3(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(B3,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 F3(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 e_(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),v):j===null||j===32||j===41||cp(j)?n(j):(e.enter(i),e.enter(l),e.enter(f),e.enter("chunkString",{contentType:"string"}),T(j))}function v(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),v(j)):j===null||j===60||_e(j)?n(j):(e.consume(j),j===92?E:b)}function E(j){return j===60||j===62||j===92?(e.consume(j),b):b(j)}function T(j){return!p&&(j===null||j===41||zn(j))?(e.exit("chunkString"),e.exit(f),e.exit(l),e.exit(i),t(j)):p<h&&j===40?(e.consume(j),p++,T):j===41?(e.consume(j),p--,T):j===null||j===32||j===40||cp(j)?n(j):(e.consume(j),j===92?C:T)}function C(j){return j===40||j===41||j===92?(e.consume(j),T):T(j)}}function t_(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?v:y)}function v(b){return b===91||b===92||b===93?(e.consume(b),f++,y):y(b)}}function n_(e,t,n,i,o,u){let l;return f;function f(v){return v===34||v===39||v===40?(e.enter(i),e.enter(o),e.consume(v),e.exit(o),l=v===40?41:v,d):n(v)}function d(v){return v===l?(e.enter(o),e.consume(v),e.exit(o),e.exit(i),t):(e.enter(u),h(v))}function h(v){return v===l?(e.exit(u),d(l)):v===null?n(v):_e(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),ot(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(v))}function p(v){return v===l||v===null||_e(v)?(e.exit("chunkString"),h(v)):(e.consume(v),v===92?y:p)}function y(v){return v===l||v===92?(e.consume(v),p):p(v)}}function ll(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 q3={name:"definition",tokenize:Y3},G3={partial:!0,tokenize:X3};function Y3(e,t,n){const i=this;let o;return u;function u(b){return e.enter("definition"),l(b)}function l(b){return t_.call(i,e,f,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function f(b){return o=To(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 zn(b)?ll(e,h)(b):h(b)}function h(b){return e_(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function p(b){return e.attempt(G3,y,y)(b)}function y(b){return Fe(b)?ot(e,v,"whitespace")(b):v(b)}function v(b){return b===null||_e(b)?(e.exit("definition"),i.parser.defined.push(o),t(b)):n(b)}}function X3(e,t,n){return i;function i(f){return zn(f)?ll(e,o)(f):n(f)}function o(f){return n_(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 K3={name:"hardBreakEscape",tokenize:J3};function J3(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 Q3={name:"headingAtx",resolve:W3,tokenize:e$};function W3(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 e$(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||zn(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||zn(p)?(e.exit("atxHeadingText"),f(p)):(e.consume(p),h)}}const t$=["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"],Q1=["pre","script","style","textarea"],n$={concrete:!0,name:"htmlFlow",resolveTo:a$,tokenize:o$},r$={partial:!0,tokenize:l$},i$={partial:!0,tokenize:s$};function a$(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 o$(e,t,n){const i=this;let o,u,l,f,d;return h;function h(w){return p(w)}function p(w){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(w),y}function y(w){return w===33?(e.consume(w),v):w===47?(e.consume(w),u=!0,T):w===63?(e.consume(w),o=3,i.interrupt?t:N):Sr(w)?(e.consume(w),l=String.fromCharCode(w),C):n(w)}function v(w){return w===45?(e.consume(w),o=2,b):w===91?(e.consume(w),o=5,f=0,E):Sr(w)?(e.consume(w),o=4,i.interrupt?t:N):n(w)}function b(w){return w===45?(e.consume(w),i.interrupt?t:N):n(w)}function E(w){const ie="CDATA[";return w===ie.charCodeAt(f++)?(e.consume(w),f===ie.length?i.interrupt?t:oe:E):n(w)}function T(w){return Sr(w)?(e.consume(w),l=String.fromCharCode(w),C):n(w)}function C(w){if(w===null||w===47||w===62||zn(w)){const ie=w===47,ve=l.toLowerCase();return!ie&&!u&&Q1.includes(ve)?(o=1,i.interrupt?t(w):oe(w)):t$.includes(l.toLowerCase())?(o=6,ie?(e.consume(w),j):i.interrupt?t(w):oe(w)):(o=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(w):u?O(w):z(w))}return w===45||$n(w)?(e.consume(w),l+=String.fromCharCode(w),C):n(w)}function j(w){return w===62?(e.consume(w),i.interrupt?t:oe):n(w)}function O(w){return Fe(w)?(e.consume(w),O):ue(w)}function z(w){return w===47?(e.consume(w),ue):w===58||w===95||Sr(w)?(e.consume(w),R):Fe(w)?(e.consume(w),z):ue(w)}function R(w){return w===45||w===46||w===58||w===95||$n(w)?(e.consume(w),R):L(w)}function L(w){return w===61?(e.consume(w),$):Fe(w)?(e.consume(w),L):z(w)}function $(w){return w===null||w===60||w===61||w===62||w===96?n(w):w===34||w===39?(e.consume(w),d=w,G):Fe(w)?(e.consume(w),$):V(w)}function G(w){return w===d?(e.consume(w),d=null,K):w===null||_e(w)?n(w):(e.consume(w),G)}function V(w){return w===null||w===34||w===39||w===47||w===60||w===61||w===62||w===96||zn(w)?L(w):(e.consume(w),V)}function K(w){return w===47||w===62||Fe(w)?z(w):n(w)}function ue(w){return w===62?(e.consume(w),re):n(w)}function re(w){return w===null||_e(w)?oe(w):Fe(w)?(e.consume(w),re):n(w)}function oe(w){return w===45&&o===2?(e.consume(w),P):w===60&&o===1?(e.consume(w),Y):w===62&&o===4?(e.consume(w),A):w===63&&o===3?(e.consume(w),N):w===93&&o===5?(e.consume(w),ce):_e(w)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(r$,q,ke)(w)):w===null||_e(w)?(e.exit("htmlFlowData"),ke(w)):(e.consume(w),oe)}function ke(w){return e.check(i$,le,q)(w)}function le(w){return e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),ne}function ne(w){return w===null||_e(w)?ke(w):(e.enter("htmlFlowData"),oe(w))}function P(w){return w===45?(e.consume(w),N):oe(w)}function Y(w){return w===47?(e.consume(w),l="",Z):oe(w)}function Z(w){if(w===62){const ie=l.toLowerCase();return Q1.includes(ie)?(e.consume(w),A):oe(w)}return Sr(w)&&l.length<8?(e.consume(w),l+=String.fromCharCode(w),Z):oe(w)}function ce(w){return w===93?(e.consume(w),N):oe(w)}function N(w){return w===62?(e.consume(w),A):w===45&&o===2?(e.consume(w),N):oe(w)}function A(w){return w===null||_e(w)?(e.exit("htmlFlowData"),q(w)):(e.consume(w),A)}function q(w){return e.exit("htmlFlow"),t(w)}}function s$(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 l$(e,t,n){return i;function i(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Qc,t,n)}}const u$={name:"htmlText",tokenize:c$};function c$(e,t,n){const i=this;let o,u,l;return f;function f(N){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(N),d}function d(N){return N===33?(e.consume(N),h):N===47?(e.consume(N),L):N===63?(e.consume(N),z):Sr(N)?(e.consume(N),V):n(N)}function h(N){return N===45?(e.consume(N),p):N===91?(e.consume(N),u=0,E):Sr(N)?(e.consume(N),O):n(N)}function p(N){return N===45?(e.consume(N),b):n(N)}function y(N){return N===null?n(N):N===45?(e.consume(N),v):_e(N)?(l=y,Y(N)):(e.consume(N),y)}function v(N){return N===45?(e.consume(N),b):y(N)}function b(N){return N===62?P(N):N===45?v(N):y(N)}function E(N){const A="CDATA[";return N===A.charCodeAt(u++)?(e.consume(N),u===A.length?T:E):n(N)}function T(N){return N===null?n(N):N===93?(e.consume(N),C):_e(N)?(l=T,Y(N)):(e.consume(N),T)}function C(N){return N===93?(e.consume(N),j):T(N)}function j(N){return N===62?P(N):N===93?(e.consume(N),j):T(N)}function O(N){return N===null||N===62?P(N):_e(N)?(l=O,Y(N)):(e.consume(N),O)}function z(N){return N===null?n(N):N===63?(e.consume(N),R):_e(N)?(l=z,Y(N)):(e.consume(N),z)}function R(N){return N===62?P(N):z(N)}function L(N){return Sr(N)?(e.consume(N),$):n(N)}function $(N){return N===45||$n(N)?(e.consume(N),$):G(N)}function G(N){return _e(N)?(l=G,Y(N)):Fe(N)?(e.consume(N),G):P(N)}function V(N){return N===45||$n(N)?(e.consume(N),V):N===47||N===62||zn(N)?K(N):n(N)}function K(N){return N===47?(e.consume(N),P):N===58||N===95||Sr(N)?(e.consume(N),ue):_e(N)?(l=K,Y(N)):Fe(N)?(e.consume(N),K):P(N)}function ue(N){return N===45||N===46||N===58||N===95||$n(N)?(e.consume(N),ue):re(N)}function re(N){return N===61?(e.consume(N),oe):_e(N)?(l=re,Y(N)):Fe(N)?(e.consume(N),re):K(N)}function oe(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),o=N,ke):_e(N)?(l=oe,Y(N)):Fe(N)?(e.consume(N),oe):(e.consume(N),le)}function ke(N){return N===o?(e.consume(N),o=void 0,ne):N===null?n(N):_e(N)?(l=ke,Y(N)):(e.consume(N),ke)}function le(N){return N===null||N===34||N===39||N===60||N===61||N===96?n(N):N===47||N===62||zn(N)?K(N):(e.consume(N),le)}function ne(N){return N===47||N===62||zn(N)?K(N):n(N)}function P(N){return N===62?(e.consume(N),e.exit("htmlTextData"),e.exit("htmlText"),t):n(N)}function Y(N){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),Z}function Z(N){return Fe(N)?ot(e,ce,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):ce(N)}function ce(N){return e.enter("htmlTextData"),l(N)}}const kg={name:"labelEnd",resolveAll:m$,resolveTo:p$,tokenize:g$},f$={tokenize:y$},d$={tokenize:x$},h$={tokenize:v$};function m$(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 p$(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=er(f,e.slice(u+1,u+i+3)),f=er(f,[["enter",p,t]]),f=er(f,Sg(t.parser.constructs.insideSpan.null,e.slice(u+i+4,l-3),t)),f=er(f,[["exit",p,t],e[l-2],e[l-1],["exit",h,t]]),f=er(f,e.slice(l+1)),f=er(f,[["exit",d,t]]),zr(e,u,e.length,f),e}function g$(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(v){return u?u._inactive?y(v):(l=i.parser.defined.includes(To(i.sliceSerialize({start:u.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(v),e.exit("labelMarker"),e.exit("labelEnd"),d):n(v)}function d(v){return v===40?e.attempt(f$,p,l?p:y)(v):v===91?e.attempt(d$,p,l?h:y)(v):l?p(v):y(v)}function h(v){return e.attempt(h$,p,y)(v)}function p(v){return t(v)}function y(v){return u._balanced=!0,n(v)}}function y$(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 zn(y)?ll(e,u)(y):u(y)}function u(y){return y===41?p(y):e_(e,l,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(y)}function l(y){return zn(y)?ll(e,d)(y):p(y)}function f(y){return n(y)}function d(y){return y===34||y===39||y===40?n_(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(y):p(y)}function h(y){return zn(y)?ll(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 x$(e,t,n){const i=this;return o;function o(f){return t_.call(i,e,u,l,"reference","referenceMarker","referenceString")(f)}function u(f){return i.parser.defined.includes(To(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?t(f):n(f)}function l(f){return n(f)}}function v$(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 b$={name:"labelStartImage",resolveAll:kg.resolveAll,tokenize:S$};function S$(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 k$={name:"labelStartLink",resolveAll:kg.resolveAll,tokenize:w$};function w$(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 am={name:"lineEnding",tokenize:z$};function z$(e,t){return n;function n(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),ot(e,t,"linePrefix")}}const kc={name:"thematicBreak",tokenize:_$};function _$(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 wn={continuation:{tokenize:A$},exit:N$,name:"list",tokenize:C$},E$={partial:!0,tokenize:O$},T$={partial:!0,tokenize:j$};function C$(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 E=i.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(E==="listUnordered"?!i.containerState.marker||b===i.containerState.marker:fp(b)){if(i.containerState.type||(i.containerState.type=E,e.enter(E,{_container:!0})),E==="listUnordered")return e.enter("listItemPrefix"),b===42||b===45?e.check(kc,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 fp(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(Qc,i.interrupt?n:p,e.attempt(E$,v,y))}function p(b){return i.containerState.initialBlankLine=!0,u++,v(b)}function y(b){return Fe(b)?(e.enter("listItemPrefixWhitespace"),e.consume(b),e.exit("listItemPrefixWhitespace"),v):n(b)}function v(b){return i.containerState.size=u+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(b)}}function A$(e,t,n){const i=this;return i.containerState._closeFlow=void 0,e.check(Qc,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(T$,t,l)(f))}function l(f){return i.containerState._closeFlow=!0,i.interrupt=void 0,ot(e,e.attempt(wn,t,n),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function j$(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 N$(e){e.exit(this.containerState.type)}function O$(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 W1={name:"setextUnderline",resolveTo:R$,tokenize:M$};function R$(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 M$(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 D$={tokenize:$$};function $$(e){const t=this,n=e.attempt(Qc,i,e.attempt(this.parser.constructs.flowInitial,o,ot(e,e.attempt(this.parser.constructs.flow,o,e.attempt(Z3,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 L$={resolveAll:i_()},U$=r_("string"),P$=r_("text");function r_(e){return{resolveAll:i_(e==="text"?V$: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 v=-1;if(y)for(;++v<y.length;){const b=y[v];if(!b.previous||b.previous.call(i,i.previous))return!0}return!1}}}function i_(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 V$(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 Z$={42:wn,43:wn,45:wn,48:wn,49:wn,50:wn,51:wn,52:wn,53:wn,54:wn,55:wn,56:wn,57:wn,62:Kz},B$={91:q3},I$={[-2]:im,[-1]:im,32:im},H$={35:Q3,42:kc,45:[W1,kc],60:n$,61:W1,95:kc,96:J1,126:J1},F$={38:Qz,92:Jz},q$={[-5]:am,[-4]:am,[-3]:am,33:b$,38:Qz,42:dp,60:[k3,u$],91:k$,92:[K3,Jz],93:kg,95:dp,96:D3},G$={null:[dp,L$]},Y$={null:[42,95]},X$={null:[]},K$=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Y$,contentInitial:B$,disable:X$,document:Z$,flow:H$,flowInitial:I$,insideSpan:G$,string:F$,text:q$},Symbol.toStringTag,{value:"Module"}));function J$(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:G(L),check:G($),consume:O,enter:z,exit:R,interrupt:G($,{interrupt:!0})},h={code:null,containerState:{},defineSkip:T,events:[],now:E,parser:e,previous:null,sliceSerialize:v,sliceStream:b,write:y};let p=t.tokenize.call(h,d);return t.resolveAll&&u.push(t),h;function y(re){return l=er(l,re),C(),l[l.length-1]!==null?[]:(V(t,0),h.events=Sg(u,h.events,h),h.events)}function v(re,oe){return W$(b(re),oe)}function b(re){return Q$(l,re)}function E(){const{_bufferIndex:re,_index:oe,line:ke,column:le,offset:ne}=i;return{_bufferIndex:re,_index:oe,line:ke,column:le,offset:ne}}function T(re){o[re.line]=re.column,ue()}function C(){let re;for(;i._index<l.length;){const oe=l[i._index];if(typeof oe=="string")for(re=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===re&&i._bufferIndex<oe.length;)j(oe.charCodeAt(i._bufferIndex));else j(oe)}}function j(re){p=p(re)}function O(re){_e(re)?(i.line++,i.column=1,i.offset+=re===-3?2:1,ue()):re!==-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=re}function z(re,oe){const ke=oe||{};return ke.type=re,ke.start=E(),h.events.push(["enter",ke,h]),f.push(ke),ke}function R(re){const oe=f.pop();return oe.end=E(),h.events.push(["exit",oe,h]),oe}function L(re,oe){V(re,oe.from)}function $(re,oe){oe.restore()}function G(re,oe){return ke;function ke(le,ne,P){let Y,Z,ce,N;return Array.isArray(le)?q(le):"tokenize"in le?q([le]):A(le);function A(pe){return ge;function ge(Ge){const De=Ge!==null&&pe[Ge],At=Ge!==null&&pe.null,an=[...Array.isArray(De)?De:De?[De]:[],...Array.isArray(At)?At:At?[At]:[]];return q(an)(Ge)}}function q(pe){return Y=pe,Z=0,pe.length===0?P:w(pe[Z])}function w(pe){return ge;function ge(Ge){return N=K(),ce=pe,pe.partial||(h.currentConstruct=pe),pe.name&&h.parser.constructs.disable.null.includes(pe.name)?ve():pe.tokenize.call(oe?Object.assign(Object.create(h),oe):h,d,ie,ve)(Ge)}}function ie(pe){return re(ce,N),ne}function ve(pe){return N.restore(),++Z<Y.length?w(Y[Z]):P}}}function V(re,oe){re.resolveAll&&!u.includes(re)&&u.push(re),re.resolve&&zr(h.events,oe,h.events.length-oe,re.resolve(h.events.slice(oe),h)),re.resolveTo&&(h.events=re.resolveTo(h.events,h))}function K(){const re=E(),oe=h.previous,ke=h.currentConstruct,le=h.events.length,ne=Array.from(f);return{from:le,restore:P};function P(){i=re,h.previous=oe,h.currentConstruct=ke,h.events.length=le,f=ne,ue()}}function ue(){i.line in o&&i.column<2&&(i.column=o[i.line],i.offset+=o[i.line]-1)}}function Q$(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 W$(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 e5(e){const i={constructs:s3([K$,...(e||{}).extensions||[]]),content:o(p3),defined:[],document:o(y3),flow:o(D$),lazy:{},string:o(U$),text:o(P$)};return i;function o(u){return l;function l(f){return J$(i,u,f)}}}function t5(e){for(;!Wz(e););return e}const eS=/[\0\t\n\r]/g;function n5(){let e=1,t="",n=!0,i;return o;function o(u,l,f){const d=[];let h,p,y,v,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(eS.lastIndex=y,h=eS.exec(u),v=h&&h.index!==void 0?h.index:u.length,b=u.charCodeAt(v),!h){t=u.slice(y);break}if(b===10&&y===v&&i)d.push(-3),i=void 0;else switch(i&&(d.push(-5),i=void 0),y<v&&(d.push(u.slice(y,v)),e+=v-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=v+1}return f&&(i&&d.push(-5),t&&d.push(t),d.push(null)),d}}const r5=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function i5(e){return e.replace(r5,a5)}function a5(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),u=o===120||o===88;return Xz(n.slice(u?2:1),u?16:10)}return bg(n)||e}const a_={}.hasOwnProperty;function o5(e,t,n){return typeof t!="string"&&(n=t,t=void 0),s5(n)(t5(e5(n).document().write(n5()(e,t,!0))))}function s5(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(Je),autolinkProtocol:K,autolinkEmail:K,atxHeading:u(Pi),blockQuote:u(At),characterEscape:K,characterReference:K,codeFenced:u(an),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:u(an,l),codeText:u(Un,l),codeTextData:K,data:K,codeFlowValue:K,definition:u(mr),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:u(Pn),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(Vn),listItemValue:v,listOrdered:u(Ht,y),listUnordered:u(Ht),paragraph:u(Et),reference:w,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:u(Pi),strong:u(Pt),thematicBreak:u(wa)},exit:{atxHeading:d(),atxHeadingSequence:L,autolink:d(),autolinkEmail:De,autolinkProtocol:Ge,blockQuote:d(),characterEscapeValue:ue,characterReferenceMarkerHexadecimal:ve,characterReferenceMarkerNumeric:ve,characterReferenceValue:pe,characterReference:ge,codeFenced:d(C),codeFencedFence:T,codeFencedFenceInfo:b,codeFencedFenceMeta:E,codeFlowValue:ue,codeIndented:d(j),codeText:d(ne),codeTextData:ue,data:ue,definition:d(),definitionDestinationString:R,definitionLabelString:O,definitionTitleString:z,emphasis:d(),hardBreakEscape:d(oe),hardBreakTrailing:d(oe),htmlFlow:d(ke),htmlFlowData:ue,htmlText:d(le),htmlTextData:ue,image:d(Y),label:ce,labelText:Z,lineEnding:re,link:d(P),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:ie,resourceDestinationString:N,resourceTitleString:A,resource:q,setextHeading:d(V),setextHeadingLineSequence:G,setextHeadingText:$,strong:d(),thematicBreak:d()}};o_(t,(e||{}).mdastExtensions||[]);const n={};return i;function i(J){let se={type:"root",children:[]};const ye={stack:[se],tokenStack:[],config:t,enter:f,exit:h,buffer:l,resume:p,data:n},ze=[];let Pe=-1;for(;++Pe<J.length;)if(J[Pe][1].type==="listOrdered"||J[Pe][1].type==="listUnordered")if(J[Pe][0]==="enter")ze.push(Pe);else{const on=ze.pop();Pe=o(J,on,Pe)}for(Pe=-1;++Pe<J.length;){const on=t[J[Pe][0]];a_.call(on,J[Pe][1].type)&&on[J[Pe][1].type].call(Object.assign({sliceSerialize:J[Pe][2].sliceSerialize},ye),J[Pe][1])}if(ye.tokenStack.length>0){const on=ye.tokenStack[ye.tokenStack.length-1];(on[1]||tS).call(ye,void 0,on[0])}for(se.position={start:wi(J.length>0?J[0][1].start:{line:1,column:1,offset:0}),end:wi(J.length>0?J[J.length-2][1].end:{line:1,column:1,offset:0})},Pe=-1;++Pe<t.transforms.length;)se=t.transforms[Pe](se)||se;return se}function o(J,se,ye){let ze=se-1,Pe=-1,on=!1,Tn,sn,Vt,mn;for(;++ze<=ye;){const nt=J[ze];switch(nt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{nt[0]==="enter"?Pe++:Pe--,mn=void 0;break}case"lineEndingBlank":{nt[0]==="enter"&&(Tn&&!mn&&!Pe&&!Vt&&(Vt=ze),mn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:mn=void 0}if(!Pe&&nt[0]==="enter"&&nt[1].type==="listItemPrefix"||Pe===-1&&nt[0]==="exit"&&(nt[1].type==="listUnordered"||nt[1].type==="listOrdered")){if(Tn){let Qr=ze;for(sn=void 0;Qr--;){const or=J[Qr];if(or[1].type==="lineEnding"||or[1].type==="lineEndingBlank"){if(or[0]==="exit")continue;sn&&(J[sn][1].type="lineEndingBlank",on=!0),or[1].type="lineEnding",sn=Qr}else if(!(or[1].type==="linePrefix"||or[1].type==="blockQuotePrefix"||or[1].type==="blockQuotePrefixWhitespace"||or[1].type==="blockQuoteMarker"||or[1].type==="listItemIndent"))break}Vt&&(!sn||Vt<sn)&&(Tn._spread=!0),Tn.end=Object.assign({},sn?J[sn][1].start:nt[1].end),J.splice(sn||ze,0,["exit",Tn,nt[2]]),ze++,ye++}if(nt[1].type==="listItemPrefix"){const Qr={type:"listItem",_spread:!1,start:Object.assign({},nt[1].start),end:void 0};Tn=Qr,J.splice(ze,0,["enter",Qr,nt[2]]),ze++,ye++,Vt=void 0,mn=!0}}}return J[se][1]._spread=on,ye}function u(J,se){return ye;function ye(ze){f.call(this,J(ze),ze),se&&se.call(this,ze)}}function l(){this.stack.push({type:"fragment",children:[]})}function f(J,se,ye){this.stack[this.stack.length-1].children.push(J),this.stack.push(J),this.tokenStack.push([se,ye||void 0]),J.position={start:wi(se.start),end:void 0}}function d(J){return se;function se(ye){J&&J.call(this,ye),h.call(this,ye)}}function h(J,se){const ye=this.stack.pop(),ze=this.tokenStack.pop();if(ze)ze[0].type!==J.type&&(se?se.call(this,J,ze[0]):(ze[1]||tS).call(this,J,ze[0]));else throw new Error("Cannot close `"+J.type+"` ("+sl({start:J.start,end:J.end})+"): it’s not open");ye.position.end=wi(J.end)}function p(){return a3(this.stack.pop())}function y(){this.data.expectingFirstListItemValue=!0}function v(J){if(this.data.expectingFirstListItemValue){const se=this.stack[this.stack.length-2];se.start=Number.parseInt(this.sliceSerialize(J),10),this.data.expectingFirstListItemValue=void 0}}function b(){const J=this.resume(),se=this.stack[this.stack.length-1];se.lang=J}function E(){const J=this.resume(),se=this.stack[this.stack.length-1];se.meta=J}function T(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const J=this.resume(),se=this.stack[this.stack.length-1];se.value=J.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function j(){const J=this.resume(),se=this.stack[this.stack.length-1];se.value=J.replace(/(\r?\n|\r)$/g,"")}function O(J){const se=this.resume(),ye=this.stack[this.stack.length-1];ye.label=se,ye.identifier=To(this.sliceSerialize(J)).toLowerCase()}function z(){const J=this.resume(),se=this.stack[this.stack.length-1];se.title=J}function R(){const J=this.resume(),se=this.stack[this.stack.length-1];se.url=J}function L(J){const se=this.stack[this.stack.length-1];if(!se.depth){const ye=this.sliceSerialize(J).length;se.depth=ye}}function $(){this.data.setextHeadingSlurpLineEnding=!0}function G(J){const se=this.stack[this.stack.length-1];se.depth=this.sliceSerialize(J).codePointAt(0)===61?1:2}function V(){this.data.setextHeadingSlurpLineEnding=void 0}function K(J){const ye=this.stack[this.stack.length-1].children;let ze=ye[ye.length-1];(!ze||ze.type!=="text")&&(ze=lt(),ze.position={start:wi(J.start),end:void 0},ye.push(ze)),this.stack.push(ze)}function ue(J){const se=this.stack.pop();se.value+=this.sliceSerialize(J),se.position.end=wi(J.end)}function re(J){const se=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ye=se.children[se.children.length-1];ye.position.end=wi(J.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(se.type)&&(K.call(this,J),ue.call(this,J))}function oe(){this.data.atHardBreak=!0}function ke(){const J=this.resume(),se=this.stack[this.stack.length-1];se.value=J}function le(){const J=this.resume(),se=this.stack[this.stack.length-1];se.value=J}function ne(){const J=this.resume(),se=this.stack[this.stack.length-1];se.value=J}function P(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const se=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=se,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function Y(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const se=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=se,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function Z(J){const se=this.sliceSerialize(J),ye=this.stack[this.stack.length-2];ye.label=i5(se),ye.identifier=To(se).toLowerCase()}function ce(){const J=this.stack[this.stack.length-1],se=this.resume(),ye=this.stack[this.stack.length-1];if(this.data.inReference=!0,ye.type==="link"){const ze=J.children;ye.children=ze}else ye.alt=se}function N(){const J=this.resume(),se=this.stack[this.stack.length-1];se.url=J}function A(){const J=this.resume(),se=this.stack[this.stack.length-1];se.title=J}function q(){this.data.inReference=void 0}function w(){this.data.referenceType="collapsed"}function ie(J){const se=this.resume(),ye=this.stack[this.stack.length-1];ye.label=se,ye.identifier=To(this.sliceSerialize(J)).toLowerCase(),this.data.referenceType="full"}function ve(J){this.data.characterReferenceType=J.type}function pe(J){const se=this.sliceSerialize(J),ye=this.data.characterReferenceType;let ze;ye?(ze=Xz(se,ye==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ze=bg(se);const Pe=this.stack[this.stack.length-1];Pe.value+=ze}function ge(J){const se=this.stack.pop();se.position.end=wi(J.end)}function Ge(J){ue.call(this,J);const se=this.stack[this.stack.length-1];se.url=this.sliceSerialize(J)}function De(J){ue.call(this,J);const se=this.stack[this.stack.length-1];se.url="mailto:"+this.sliceSerialize(J)}function At(){return{type:"blockquote",children:[]}}function an(){return{type:"code",lang:null,meta:null,value:""}}function Un(){return{type:"inlineCode",value:""}}function mr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Pn(){return{type:"emphasis",children:[]}}function Pi(){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 Vn(J){return{type:"listItem",spread:J._spread,checked:null,children:[]}}function Et(){return{type:"paragraph",children:[]}}function Pt(){return{type:"strong",children:[]}}function lt(){return{type:"text",value:""}}function wa(){return{type:"thematicBreak"}}}function wi(e){return{line:e.line,column:e.column,offset:e.offset}}function o_(e,t){let n=-1;for(;++n<t.length;){const i=t[n];Array.isArray(i)?o_(e,i):l5(e,i)}}function l5(e,t){let n;for(n in t)if(a_.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 tS(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+sl({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+sl({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+sl({start:t.start,end:t.end})+") is still open")}function u5(e){const t=this;t.parser=n;function n(i){return o5(i,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function c5(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 f5(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
23
|
+
`}]}function d5(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 h5(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function m5(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function p5(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),o=qo(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 g5(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 y5(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function s_(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 x5(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return s_(e,t);const o={src:qo(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 v5(e,t){const n={src:qo(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 b5(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 S5(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return s_(e,t);const o={href:qo(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 k5(e,t){const n={href:qo(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 w5(e,t,n){const i=e.all(t),o=n?z5(n):l_(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 z5(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=l_(n[i])}return t}function l_(e){const t=e.spread;return t??e.children.length>1}function _5(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 E5(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function T5(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function C5(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function A5(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=gg(t.children[1]),d=Bz(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 j5(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],v={},b=l?l[d]:void 0;b&&(v.align=b);let E={type:"element",tagName:u,properties:v,children:[]};y&&(E.children=e.all(y),e.patch(y,E),E=e.applyData(y,E)),h.push(E)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,p),e.applyData(t,p)}function N5(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const nS=9,rS=32;function O5(e){const t=String(e),n=/\r?\n|\r/g;let i=n.exec(t),o=0;const u=[];for(;i;)u.push(iS(t.slice(o,i.index),o>0,!0),i[0]),o=i.index+i[0].length,i=n.exec(t);return u.push(iS(t.slice(o),o>0,!1)),u.join("")}function iS(e,t,n){let i=0,o=e.length;if(t){let u=e.codePointAt(i);for(;u===nS||u===rS;)i++,u=e.codePointAt(i)}if(n){let u=e.codePointAt(o-1);for(;u===nS||u===rS;)o--,u=e.codePointAt(o-1)}return o>i?e.slice(i,o):""}function R5(e,t){const n={type:"text",value:O5(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function M5(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const D5={blockquote:c5,break:f5,code:d5,delete:h5,emphasis:m5,footnoteReference:p5,heading:g5,html:y5,imageReference:x5,image:v5,inlineCode:b5,linkReference:S5,link:k5,listItem:w5,list:_5,paragraph:E5,root:T5,strong:C5,table:A5,tableCell:N5,tableRow:j5,text:R5,thematicBreak:M5,toml:nc,yaml:nc,definition:nc,footnoteDefinition:nc};function nc(){}const u_=-1,Wc=0,ul=1,Mc=2,wg=3,zg=4,_g=5,Eg=6,c_=7,f_=8,aS=typeof self=="object"?self:globalThis,$5=(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 Wc:case u_:return n(l,o);case ul:{const f=n([],o);for(const d of l)f.push(i(d));return f}case Mc:{const f=n({},o);for(const[d,h]of l)f[i(d)]=i(h);return f}case wg:return n(new Date(l),o);case zg:{const{source:f,flags:d}=l;return n(new RegExp(f,d),o)}case _g:{const f=n(new Map,o);for(const[d,h]of l)f.set(i(d),i(h));return f}case Eg:{const f=n(new Set,o);for(const d of l)f.add(i(d));return f}case c_:{const{name:f,message:d}=l;return n(new aS[f](d),o)}case f_: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 aS[u](l),o)};return i},oS=e=>$5(new Map,e)(0),uo="",{toString:L5}={},{keys:U5}=Object,Ks=e=>{const t=typeof e;if(t!=="object"||!e)return[Wc,t];const n=L5.call(e).slice(8,-1);switch(n){case"Array":return[ul,uo];case"Object":return[Mc,uo];case"Date":return[wg,uo];case"RegExp":return[zg,uo];case"Map":return[_g,uo];case"Set":return[Eg,uo];case"DataView":return[ul,n]}return n.includes("Array")?[ul,n]:n.includes("Error")?[c_,n]:[Mc,n]},rc=([e,t])=>e===Wc&&(t==="function"||t==="symbol"),P5=(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]=Ks(l);switch(f){case Wc:{let p=l;switch(d){case"bigint":f=f_,p=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);p=null;break;case"undefined":return o([u_],l)}return o([f,p],l)}case ul:{if(d){let v=l;return d==="DataView"?v=new Uint8Array(l.buffer):d==="ArrayBuffer"&&(v=new Uint8Array(l)),o([d,[...v]],l)}const p=[],y=o([f,p],l);for(const v of l)p.push(u(v));return y}case Mc:{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 v of U5(l))(e||!rc(Ks(l[v])))&&p.push([u(v),u(l[v])]);return y}case wg:return o([f,l.toISOString()],l);case zg:{const{source:p,flags:y}=l;return o([f,{source:p,flags:y}],l)}case _g:{const p=[],y=o([f,p],l);for(const[v,b]of l)(e||!(rc(Ks(v))||rc(Ks(b))))&&p.push([u(v),u(b)]);return y}case Eg:{const p=[],y=o([f,p],l);for(const v of l)(e||!rc(Ks(v)))&&p.push(u(v));return y}}const{message:h}=l;return o([f,{name:d,message:h}],l)};return u},sS=(e,{json:t,lossy:n}={})=>{const i=[];return P5(!(t||n),!!t,new Map,i)(e),i},Dc=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?oS(sS(e,t)):structuredClone(e):(e,t)=>oS(sS(e,t));function V5(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 Z5(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function B5(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||V5,i=e.options.footnoteBackLabel||Z5,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(),v=qo(y.toLowerCase());let b=0;const E=[],T=e.footnoteCounts.get(y);for(;T!==void 0&&++b<=T;){E.length>0&&E.push({type:"text",value:" "});let O=typeof n=="string"?n:n(d,b);typeof O=="string"&&(O={type:"text",value:O}),E.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+v+(b>1?"-"+b:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(d,b),className:["data-footnote-backref"]},children:Array.isArray(O)?O:[O]})}const C=p[p.length-1];if(C&&C.type==="element"&&C.tagName==="p"){const O=C.children[C.children.length-1];O&&O.type==="text"?O.value+=" ":C.children.push({type:"text",value:" "}),C.children.push(...E)}else p.push(...E);const j={type:"element",tagName:"li",properties:{id:t+"fn-"+v},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:{...Dc(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 d_=(function(e){if(e==null)return q5;if(typeof e=="function")return ef(e);if(typeof e=="object")return Array.isArray(e)?I5(e):H5(e);if(typeof e=="string")return F5(e);throw new Error("Expected function, string, or object as test")});function I5(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=d_(e[n]);return ef(i);function i(...o){let u=-1;for(;++u<t.length;)if(t[u].apply(this,o))return!0;return!1}}function H5(e){const t=e;return ef(n);function n(i){const o=i;let u;for(u in e)if(o[u]!==t[u])return!1;return!0}}function F5(e){return ef(t);function t(n){return n&&n.type===e}}function ef(e){return t;function t(n,i,o){return!!(G5(n)&&e.call(this,n,typeof i=="number"?i:void 0,o||void 0))}}function q5(){return!0}function G5(e){return e!==null&&typeof e=="object"&&"type"in e}const h_=[],Y5=!0,lS=!1,X5="skip";function K5(e,t,n,i){let o;typeof t=="function"&&typeof n!="function"?(i=n,n=t):o=t;const u=d_(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(v,"name",{value:"node ("+(d.type+(b?"<"+b+">":""))+")"})}return v;function v(){let b=h_,E,T,C;if((!t||u(d,h,p[p.length-1]||void 0))&&(b=J5(n(d,p)),b[0]===lS))return b;if("children"in d&&d.children){const j=d;if(j.children&&b[0]!==X5)for(T=(i?j.children.length:-1)+l,C=p.concat(j);T>-1&&T<j.children.length;){const O=j.children[T];if(E=f(O,T,C)(),E[0]===lS)return E;T=typeof E[1]=="number"?E[1]:T+l}}return b}}}function J5(e){return Array.isArray(e)?e:typeof e=="number"?[Y5,e]:e==null?h_:[e]}function m_(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),K5(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 hp={}.hasOwnProperty,Q5={};function W5(e,t){const n=t||Q5,i=new Map,o=new Map,u=new Map,l={...D5,...n.handlers},f={all:h,applyData:t6,definitionById:i,footnoteById:o,footnoteCounts:u,footnoteOrder:[],handlers:l,one:d,options:n,patch:e6,wrap:r6};return m_(e,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const y=p.type==="definition"?i:o,v=String(p.identifier).toUpperCase();y.has(v)||y.set(v,p)}}),f;function d(p,y){const v=p.type,b=f.handlers[v];if(hp.call(f.handlers,v)&&b)return b(f,p,y);if(f.options.passThrough&&f.options.passThrough.includes(v)){if("children"in p){const{children:T,...C}=p,j=Dc(C);return j.children=f.all(p),j}return Dc(p)}return(f.options.unknownHandler||n6)(f,p,y)}function h(p){const y=[];if("children"in p){const v=p.children;let b=-1;for(;++b<v.length;){const E=f.one(v[b],p);if(E){if(b&&v[b-1].type==="break"&&(!Array.isArray(E)&&E.type==="text"&&(E.value=uS(E.value)),!Array.isArray(E)&&E.type==="element")){const T=E.children[0];T&&T.type==="text"&&(T.value=uS(T.value))}Array.isArray(E)?y.push(...E):y.push(E)}}}return y}}function e6(e,t){e.position&&(t.position=LD(e))}function t6(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,Dc(u)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function n6(e,t){const n=t.data||{},i="value"in t&&!(hp.call(n,"hProperties")||hp.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 r6(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 uS(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function cS(e,t){const n=W5(e,t),i=n.one(e,void 0),o=B5(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 i6(e,t){return e&&"run"in e?async function(n,i){const o=cS(n,{file:i,...t});await e.run(o,i)}:function(n,i){return cS(n,{file:i,...e||t})}}function fS(e){if(e)throw e}var om,dS;function a6(){if(dS)return om;dS=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 v;for(v in h);return typeof v>"u"||e.call(h,v)},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 om=function d(){var h,p,y,v,b,E,T=arguments[0],C=1,j=arguments.length,O=!1;for(typeof T=="boolean"&&(O=T,T=arguments[1]||{},C=2),(T==null||typeof T!="object"&&typeof T!="function")&&(T={});C<j;++C)if(h=arguments[C],h!=null)for(p in h)y=f(T,p),v=f(h,p),T!==v&&(O&&v&&(u(v)||(b=o(v)))?(b?(b=!1,E=y&&o(y)?y:[]):E=y&&u(y)?y:{},l(T,{name:p,newValue:d(O,E,v)})):typeof v<"u"&&l(T,{name:p,newValue:v}));return T},om}var o6=a6();const sm=wp(o6);function mp(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 s6(){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?l6(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 l6(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 vr={basename:u6,dirname:c6,extname:f6,join:d6,sep:"/"};function u6(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ol(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 c6(e){if(Ol(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 f6(e){Ol(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 d6(...e){let t=-1,n;for(;++t<e.length;)Ol(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":h6(n)}function h6(e){Ol(e);const t=e.codePointAt(0)===47;let n=m6(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function m6(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 Ol(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const p6={cwd:g6};function g6(){return"/"}function pp(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function y6(e){if(typeof e=="string")e=new URL(e);else if(!pp(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 x6(e)}function x6(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 lm=["history","path","basename","stem","extname","dirname"];class p_{constructor(t){let n;t?pp(t)?n={path:t}:typeof t=="string"||v6(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":p6.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<lm.length;){const u=lm[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)lm.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?vr.basename(this.path):void 0}set basename(t){cm(t,"basename"),um(t,"basename"),this.path=vr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?vr.dirname(this.path):void 0}set dirname(t){hS(this.basename,"dirname"),this.path=vr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?vr.extname(this.path):void 0}set extname(t){if(um(t,"extname"),hS(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=vr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){pp(t)&&(t=y6(t)),cm(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?vr.basename(this.path,this.extname):void 0}set stem(t){cm(t,"stem"),um(t,"stem"),this.path=vr.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 um(e,t){if(e&&e.includes(vr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+vr.sep+"`")}function cm(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function hS(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function v6(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const b6=(function(e){const i=this.constructor.prototype,o=i[e],u=function(){return o.apply(u,arguments)};return Object.setPrototypeOf(u,i),u}),S6={}.hasOwnProperty;class Tg extends b6{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=s6()}copy(){const t=new Tg;let n=-1;for(;++n<this.attachers.length;){const i=this.attachers[n];t.use(...i)}return t.data(sm(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(hm("data",this.frozen),this.namespace[t]=n,this):S6.call(this.namespace,t)&&this.namespace[t]||void 0:t?(hm("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=ic(t),i=this.parser||this.Parser;return fm("parse",i),i(String(n),n)}process(t,n){const i=this;return this.freeze(),fm("process",this.parser||this.Parser),dm("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(u,l){const f=ic(t),d=i.parse(f);i.run(d,f,function(p,y,v){if(p||!y||!v)return h(p);const b=y,E=i.stringify(b,v);z6(E)?v.value=E:v.result=E,h(p,v)});function h(p,y){p||!y?l(p):u?u(y):n(void 0,y)}}}processSync(t){let n=!1,i;return this.freeze(),fm("processSync",this.parser||this.Parser),dm("processSync",this.compiler||this.Compiler),this.process(t,o),pS("processSync","process",n),i;function o(u,l){n=!0,fS(u),i=l}}run(t,n,i){mS(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=ic(n);o.run(t,d,h);function h(p,y,v){const b=y||t;p?f(p):l?l(b):i(void 0,b,v)}}}runSync(t,n){let i=!1,o;return this.run(t,n,u),pS("runSync","run",i),o;function u(l,f){fS(l),o=f,i=!0}}stringify(t,n){this.freeze();const i=ic(n),o=this.compiler||this.Compiler;return dm("stringify",o),mS(t),o(t,i)}use(t,...n){const i=this.attachers,o=this.namespace;if(hm("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=sm(!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,v=-1;for(;++y<i.length;)if(i[y][0]===h){v=y;break}if(v===-1)i.push([h,...p]);else if(p.length>0){let[b,...E]=p;const T=i[v][1];mp(T)&&mp(b)&&(b=sm(!0,T,b)),i[v]=[h,b,...E]}}}}const k6=new Tg().freeze();function fm(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function dm(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function hm(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 mS(e){if(!mp(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function pS(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ic(e){return w6(e)?e:new p_(e)}function w6(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function z6(e){return typeof e=="string"||_6(e)}function _6(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const E6="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",gS=[],yS={allowDangerousHtml:!0},T6=/^(https?|ircs?|mailto|xmpp)$/i,C6=[{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 A6(e){const t=j6(e),n=N6(e);return O6(t.runSync(t.parse(n),n),e)}function j6(e){const t=e.rehypePlugins||gS,n=e.remarkPlugins||gS,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...yS}:yS;return k6().use(u5).use(n).use(i6,i).use(t)}function N6(e){const t=e.children||"",n=new p_;return typeof t=="string"&&(n.value=t),n}function O6(e,t){const n=t.allowedElements,i=t.allowElement,o=t.components,u=t.disallowedElements,l=t.skipHtml,f=t.unwrapDisallowed,d=t.urlTransform||R6;for(const p of C6)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+E6+p.id,void 0);return m_(e,h),BD(e,{Fragment:x.Fragment,components:o,ignoreInvalidStyle:!0,jsx:x.jsx,jsxs:x.jsxs,passKeys:!0,passNode:!0});function h(p,y,v){if(p.type==="raw"&&v&&typeof y=="number")return l?v.children.splice(y,1):v.children[y]={type:"text",value:p.value},y;if(p.type==="element"){let b;for(b in rm)if(Object.hasOwn(rm,b)&&Object.hasOwn(p.properties,b)){const E=p.properties[b],T=rm[b];(T===null||T.includes(p.tagName))&&(p.properties[b]=d(String(E||""),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,v)),b&&v&&typeof y=="number")return f&&p.children?v.children.splice(y,1,...p.children):v.children.splice(y,1),y}}}function R6(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||T6.test(e.slice(0,t))?e:""}const M6=({messages:e,onSendMessage:t,isLoading:n,activeSessionId:i})=>{const[o,u]=_.useState(""),l=_.useRef(null),f=()=>{l.current?.scrollIntoView({behavior:"smooth"})};_.useEffect(()=>{f()},[e,n]);const d=h=>{h.preventDefault(),!(!o.trim()||n)&&(t(o),u(""))};return i?x.jsxs("div",{className:"flex-1 flex flex-col h-full bg-gray-50 dark:bg-black relative overflow-hidden transition-colors duration-300",children:[x.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-6 min-h-0",children:[e.map((h,p)=>x.jsxs("div",{className:`flex gap-4 ${h.type==="human"?"justify-end":"justify-start"}`,children:[h.type!=="human"&&x.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"?x.jsx(Lk,{size:16}):x.jsx(n0,{size:18})}),x.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"?x.jsxs("div",{className:"overflow-x-auto",children:[x.jsx("p",{className:"text-xs text-gray-500 mb-1 font-sans font-semibold",children:"Tool Output:"}),x.jsx("pre",{className:"whitespace-pre-wrap break-all",children:typeof h.content=="string"?h.content:JSON.stringify(h.content,null,2)})]}):x.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:x.jsx(A6,{children:h.content})})}),h.type==="human"&&x.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:x.jsx(Zj,{size:18})})]},p)),n&&x.jsxs("div",{className:"flex gap-4 justify-start",children:[x.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:x.jsx(n0,{size:18})}),x.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:[x.jsx("div",{className:"w-2 h-2 bg-azure-primary dark:bg-matrix-highlight rounded-full animate-bounce",style:{animationDelay:"0ms"}}),x.jsx("div",{className:"w-2 h-2 bg-azure-primary dark:bg-matrix-highlight rounded-full animate-bounce",style:{animationDelay:"150ms"}}),x.jsx("div",{className:"w-2 h-2 bg-azure-primary dark:bg-matrix-highlight rounded-full animate-bounce",style:{animationDelay:"300ms"}})]})]}),x.jsx("div",{ref:l})]}),x.jsx("div",{className:"p-4 bg-white dark:bg-black border-t border-gray-200 dark:border-matrix-primary/30 shrink-0",children:x.jsxs("form",{onSubmit:d,className:"max-w-4xl mx-auto relative flex items-center gap-2",children:[x.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}),x.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:x.jsx(Nj,{size:20})})]})})]}):x.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:[x.jsx(D6,{size:48,className:"mb-4 opacity-20"}),x.jsx("p",{children:"Select a session to start chatting or create a new one."})]})},D6=({size:e,className:t})=>x.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:x.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"})}),aa={getSessions:async()=>mt.get("/sessions"),createSession:async()=>mt.post("/sessions",{}),deleteSession:async e=>mt.delete(`/sessions/${e}`),renameSession:async(e,t)=>mt.patch(`/sessions/${e}/title`,{title:t}),archiveSession:async e=>mt.post(`/sessions/${e}/archive`,{}),getMessages:async e=>mt.get(`/sessions/${e}/messages`),sendMessage:async(e,t)=>mt.post("/chat",{sessionId:e,message:t})};function $6({isOpen:e,onClose:t,onConfirm:n,title:i,description:o,confirmJson:u="Confirm",variant:l="default"}){return x.jsx(Oo,{open:e,onOpenChange:t,children:x.jsxs(Ro,{className:"sm:max-w-md bg-azure-surface dark:bg-black border-azure-border dark:border-matrix-primary/30",children:[x.jsx(Mo,{children:x.jsx(Do,{className:"text-azure-primary dark:text-matrix-highlight flex items-center gap-2",children:i})}),x.jsx("div",{className:"py-4",children:x.jsx("p",{className:"text-azure-text-secondary dark:text-matrix-secondary",children:o})}),x.jsxs(sD,{className:"flex flex-col sm:flex-row gap-3 sm:justify-end",children:[x.jsx(tr,{variant:"outline",onClick:t,className:"dark:border-matrix-primary/30 dark:text-matrix-secondary dark:hover:bg-matrix-primary/20",children:"Cancel"}),x.jsx(tr,{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 L6=()=>{const[e,t]=_.useState([]),[n,i]=_.useState(null),[o,u]=_.useState([]),[l,f]=_.useState(!1),[d,h]=_.useState(!0),[p,y]=_.useState({isOpen:!1,title:"",description:"",onConfirm:()=>{}}),v=async()=>{try{const z=await aa.getSessions();t(z)}catch(z){console.error("Failed to load sessions:",z)}};_.useEffect(()=>{v()},[]),_.useEffect(()=>{n?b(n):u([])},[n]);const b=async z=>{try{const R=await aa.getMessages(z);u(R.filter(L=>L.type!=="system"&&L.type!=="tool"))}catch(R){console.error("Failed to load messages:",R)}},E=async()=>{try{const z=await aa.createSession();await v(),i(z.id)}catch(z){console.error("Failed to create session:",z)}},T=async z=>{if(!n)return;const R={type:"human",content:z};u(L=>[...L,R]),f(!0);try{await aa.sendMessage(n,z),await b(n),await v()}catch(L){console.error("Failed to send message:",L)}finally{f(!1)}},C=z=>{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 aa.archiveSession(z),n===z&&i(null),await v()}catch(R){console.error("Failed to archive session:",R)}}})},j=z=>{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 aa.deleteSession(z),n===z&&i(null),await v()}catch(R){console.error("Failed to delete session:",R)}}})},O=async(z,R)=>{try{await aa.renameSession(z,R),await v()}catch(L){console.error("Failed to rename session:",L)}};return x.jsxs("div",{className:"flex h-full w-full overflow-hidden bg-gray-50 dark:bg-zinc-950",children:[x.jsx(hD,{sessions:e,activeSessionId:n,onSelectSession:i,onCreateSession:E,onArchiveSession:C,onDeleteSession:j,onRenameSession:O,isOpen:d,toggleSidebar:()=>h(!d)}),x.jsx("div",{className:"flex-1 flex flex-col h-full overflow-hidden",children:x.jsx(M6,{messages:o,onSendMessage:T,isLoading:l,activeSessionId:n})}),x.jsx($6,{isOpen:p.isOpen,onClose:()=>y(z=>({...z,isOpen:!1})),onConfirm:p.onConfirm,title:p.title,description:p.description,confirmJson:p.confirmJson,variant:p.variant})]})};function oa({title:e,description:t,children:n}){return x.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:[x.jsxs("div",{className:"mb-4",children:[x.jsx("h3",{className:"text-lg font-medium text-azure-text-primary dark:text-matrix-highlight",children:e}),t&&x.jsx("p",{className:"text-sm text-azure-text-secondary dark:text-matrix-secondary mt-1",children:t})]}),x.jsx("div",{className:"space-y-4",children:n})]})}const U6=(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},P6=(e,t)=>({classGroupId:e,validator:t}),g_=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),$c="-",xS=[],V6="arbitrary..",Z6=e=>{const t=I6(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return B6(l);const f=l.split($c),d=f[0]===""&&f.length>1?1:0;return y_(f,d,t)},getConflictingClassGroupIds:(l,f)=>{if(f){const d=i[l],h=n[l];return d?h?U6(h,d):d:h||xS}return n[l]||xS}}},y_=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],u=n.nextPart.get(o);if(u){const h=y_(e,t+1,u);if(h)return h}const l=n.validators;if(l===null)return;const f=t===0?e.join($c):e.slice(t).join($c),d=l.length;for(let h=0;h<d;h++){const p=l[h];if(p.validator(f))return p.classGroupId}},B6=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?V6+i:void 0})(),I6=e=>{const{theme:t,classGroups:n}=e;return H6(n,t)},H6=(e,t)=>{const n=g_();for(const i in e){const o=e[i];Cg(o,n,i,t)}return n},Cg=(e,t,n,i)=>{const o=e.length;for(let u=0;u<o;u++){const l=e[u];F6(l,t,n,i)}},F6=(e,t,n,i)=>{if(typeof e=="string"){q6(e,t,n);return}if(typeof e=="function"){G6(e,t,n,i);return}Y6(e,t,n,i)},q6=(e,t,n)=>{const i=e===""?t:x_(t,e);i.classGroupId=n},G6=(e,t,n,i)=>{if(X6(e)){Cg(e(i),t,n,i);return}t.validators===null&&(t.validators=[]),t.validators.push(P6(n,e))},Y6=(e,t,n,i)=>{const o=Object.entries(e),u=o.length;for(let l=0;l<u;l++){const[f,d]=o[l];Cg(d,x_(t,f),n,i)}},x_=(e,t)=>{let n=e;const i=t.split($c),o=i.length;for(let u=0;u<o;u++){const l=i[u];let f=n.nextPart.get(l);f||(f=g_(),n.nextPart.set(l,f)),n=f}return n},X6=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,K6=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)}}},gp="!",vS=":",J6=[],bS=(e,t,n,i,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:i,isExternal:o}),Q6=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 T=0;T<p;T++){const C=o[T];if(l===0&&f===0){if(C===vS){u.push(o.slice(d,T)),d=T+1;continue}if(C==="/"){h=T;continue}}C==="["?l++:C==="]"?l--:C==="("?f++:C===")"&&f--}const y=u.length===0?o:o.slice(d);let v=y,b=!1;y.endsWith(gp)?(v=y.slice(0,-1),b=!0):y.startsWith(gp)&&(v=y.slice(1),b=!0);const E=h&&h>d?h-d:void 0;return bS(u,b,v,E)};if(t){const o=t+vS,u=i;i=l=>l.startsWith(o)?u(l.slice(o.length)):bS(J6,!1,l,void 0,!0)}if(n){const o=i;i=u=>n({className:u,parseClassName:o})}return i},W6=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}},eL=e=>({cache:K6(e.cacheSize),parseClassName:Q6(e),sortModifiers:W6(e),...Z6(e)}),tL=/\s+/,nL=(e,t)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:o,sortModifiers:u}=t,l=[],f=e.trim().split(tL);let d="";for(let h=f.length-1;h>=0;h-=1){const p=f[h],{isExternal:y,modifiers:v,hasImportantModifier:b,baseClassName:E,maybePostfixModifierPosition:T}=n(p);if(y){d=p+(d.length>0?" "+d:d);continue}let C=!!T,j=i(C?E.substring(0,T):E);if(!j){if(!C){d=p+(d.length>0?" "+d:d);continue}if(j=i(E),!j){d=p+(d.length>0?" "+d:d);continue}C=!1}const O=v.length===0?"":v.length===1?v[0]:u(v).join(":"),z=b?O+gp:O,R=z+j;if(l.indexOf(R)>-1)continue;l.push(R);const L=o(j,C);for(let $=0;$<L.length;++$){const G=L[$];l.push(z+G)}d=p+(d.length>0?" "+d:d)}return d},rL=(...e)=>{let t=0,n,i,o="";for(;t<e.length;)(n=e[t++])&&(i=v_(n))&&(o&&(o+=" "),o+=i);return o},v_=e=>{if(typeof e=="string")return e;let t,n="";for(let i=0;i<e.length;i++)e[i]&&(t=v_(e[i]))&&(n&&(n+=" "),n+=t);return n},iL=(e,...t)=>{let n,i,o,u;const l=d=>{const h=t.reduce((p,y)=>y(p),e());return n=eL(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=nL(d,n);return o(d,p),p};return u=l,(...d)=>u(rL(...d))},aL=[],Bt=e=>{const t=n=>n[e]||aL;return t.isThemeGetter=!0,t},b_=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,S_=/^\((?:(\w[\w-]*):)?(.+)\)$/i,oL=/^\d+\/\d+$/,sL=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,lL=/\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$/,uL=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,cL=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,fL=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,co=e=>oL.test(e),Ne=e=>!!e&&!Number.isNaN(Number(e)),zi=e=>!!e&&Number.isInteger(Number(e)),mm=e=>e.endsWith("%")&&Ne(e.slice(0,-1)),Fr=e=>sL.test(e),dL=()=>!0,hL=e=>lL.test(e)&&!uL.test(e),k_=()=>!1,mL=e=>cL.test(e),pL=e=>fL.test(e),gL=e=>!de(e)&&!he(e),yL=e=>Go(e,__,k_),de=e=>b_.test(e),sa=e=>Go(e,E_,hL),pm=e=>Go(e,kL,Ne),SS=e=>Go(e,w_,k_),xL=e=>Go(e,z_,pL),ac=e=>Go(e,T_,mL),he=e=>S_.test(e),Js=e=>Yo(e,E_),vL=e=>Yo(e,wL),kS=e=>Yo(e,w_),bL=e=>Yo(e,__),SL=e=>Yo(e,z_),oc=e=>Yo(e,T_,!0),Go=(e,t,n)=>{const i=b_.exec(e);return i?i[1]?t(i[1]):n(i[2]):!1},Yo=(e,t,n=!1)=>{const i=S_.exec(e);return i?i[1]?t(i[1]):n:!1},w_=e=>e==="position"||e==="percentage",z_=e=>e==="image"||e==="url",__=e=>e==="length"||e==="size"||e==="bg-size",E_=e=>e==="length",kL=e=>e==="number",wL=e=>e==="family-name",T_=e=>e==="shadow",zL=()=>{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"),v=Bt("text-shadow"),b=Bt("drop-shadow"),E=Bt("blur"),T=Bt("perspective"),C=Bt("aspect"),j=Bt("ease"),O=Bt("animate"),z=()=>["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(),he,de],$=()=>["auto","hidden","clip","visible","scroll"],G=()=>["auto","contain","none"],V=()=>[he,de,d],K=()=>[co,"full","auto",...V()],ue=()=>[zi,"none","subgrid",he,de],re=()=>["auto",{span:["full",zi,he,de]},zi,he,de],oe=()=>[zi,"auto",he,de],ke=()=>["auto","min","max","fr",he,de],le=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ne=()=>["start","end","center","stretch","center-safe","end-safe"],P=()=>["auto",...V()],Y=()=>[co,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...V()],Z=()=>[e,he,de],ce=()=>[...R(),kS,SS,{position:[he,de]}],N=()=>["no-repeat",{repeat:["","x","y","space","round"]}],A=()=>["auto","cover","contain",bL,yL,{size:[he,de]}],q=()=>[mm,Js,sa],w=()=>["","none","full",h,he,de],ie=()=>["",Ne,Js,sa],ve=()=>["solid","dashed","dotted","double"],pe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ge=()=>[Ne,mm,kS,SS],Ge=()=>["","none",E,he,de],De=()=>["none",Ne,he,de],At=()=>["none",Ne,he,de],an=()=>[Ne,he,de],Un=()=>[co,"full",...V()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Fr],breakpoint:[Fr],color:[dL],container:[Fr],"drop-shadow":[Fr],ease:["in","out","in-out"],font:[gL],"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",co,de,he,C]}],container:["container"],columns:[{columns:[Ne,de,he,f]}],"break-after":[{"break-after":z()}],"break-before":[{"break-before":z()}],"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:G()}],"overscroll-x":[{"overscroll-x":G()}],"overscroll-y":[{"overscroll-y":G()}],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",he,de]}],basis:[{basis:[co,"full","auto",f,...V()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ne,co,"auto","initial","none",de]}],grow:[{grow:["",Ne,he,de]}],shrink:[{shrink:["",Ne,he,de]}],order:[{order:[zi,"first","last","none",he,de]}],"grid-cols":[{"grid-cols":ue()}],"col-start-end":[{col:re()}],"col-start":[{"col-start":oe()}],"col-end":[{"col-end":oe()}],"grid-rows":[{"grid-rows":ue()}],"row-start-end":[{row:re()}],"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":ke()}],"auto-rows":[{"auto-rows":ke()}],gap:[{gap:V()}],"gap-x":[{"gap-x":V()}],"gap-y":[{"gap-y":V()}],"justify-content":[{justify:[...le(),"normal"]}],"justify-items":[{"justify-items":[...ne(),"normal"]}],"justify-self":[{"justify-self":["auto",...ne()]}],"align-content":[{content:["normal",...le()]}],"align-items":[{items:[...ne(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ne(),{baseline:["","last"]}]}],"place-content":[{"place-content":le()}],"place-items":[{"place-items":[...ne(),"baseline"]}],"place-self":[{"place-self":["auto",...ne()]}],p:[{p:V()}],px:[{px:V()}],py:[{py:V()}],ps:[{ps:V()}],pe:[{pe:V()}],pt:[{pt:V()}],pr:[{pr:V()}],pb:[{pb:V()}],pl:[{pl:V()}],m:[{m:P()}],mx:[{mx:P()}],my:[{my:P()}],ms:[{ms:P()}],me:[{me:P()}],mt:[{mt:P()}],mr:[{mr:P()}],mb:[{mb:P()}],ml:[{ml:P()}],"space-x":[{"space-x":V()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":V()}],"space-y-reverse":["space-y-reverse"],size:[{size:Y()}],w:[{w:[f,"screen",...Y()]}],"min-w":[{"min-w":[f,"screen","none",...Y()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[l]},...Y()]}],h:[{h:["screen","lh",...Y()]}],"min-h":[{"min-h":["screen","lh","none",...Y()]}],"max-h":[{"max-h":["screen","lh",...Y()]}],"font-size":[{text:["base",n,Js,sa]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,he,pm]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",mm,de]}],"font-family":[{font:[vL,de,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,he,de]}],"line-clamp":[{"line-clamp":[Ne,"none",he,pm]}],leading:[{leading:[u,...V()]}],"list-image":[{"list-image":["none",he,de]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",he,de]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Z()}],"text-color":[{text:Z()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ve(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ne,"from-font","auto",he,sa]}],"text-decoration-color":[{decoration:Z()}],"underline-offset":[{"underline-offset":[Ne,"auto",he,de]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:V()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",he,de]}],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",he,de]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ce()}],"bg-repeat":[{bg:N()}],"bg-size":[{bg:A()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},zi,he,de],radial:["",he,de],conic:[zi,he,de]},SL,xL]}],"bg-color":[{bg:Z()}],"gradient-from-pos":[{from:q()}],"gradient-via-pos":[{via:q()}],"gradient-to-pos":[{to:q()}],"gradient-from":[{from:Z()}],"gradient-via":[{via:Z()}],"gradient-to":[{to:Z()}],rounded:[{rounded:w()}],"rounded-s":[{"rounded-s":w()}],"rounded-e":[{"rounded-e":w()}],"rounded-t":[{"rounded-t":w()}],"rounded-r":[{"rounded-r":w()}],"rounded-b":[{"rounded-b":w()}],"rounded-l":[{"rounded-l":w()}],"rounded-ss":[{"rounded-ss":w()}],"rounded-se":[{"rounded-se":w()}],"rounded-ee":[{"rounded-ee":w()}],"rounded-es":[{"rounded-es":w()}],"rounded-tl":[{"rounded-tl":w()}],"rounded-tr":[{"rounded-tr":w()}],"rounded-br":[{"rounded-br":w()}],"rounded-bl":[{"rounded-bl":w()}],"border-w":[{border:ie()}],"border-w-x":[{"border-x":ie()}],"border-w-y":[{"border-y":ie()}],"border-w-s":[{"border-s":ie()}],"border-w-e":[{"border-e":ie()}],"border-w-t":[{"border-t":ie()}],"border-w-r":[{"border-r":ie()}],"border-w-b":[{"border-b":ie()}],"border-w-l":[{"border-l":ie()}],"divide-x":[{"divide-x":ie()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ie()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ve(),"hidden","none"]}],"divide-style":[{divide:[...ve(),"hidden","none"]}],"border-color":[{border:Z()}],"border-color-x":[{"border-x":Z()}],"border-color-y":[{"border-y":Z()}],"border-color-s":[{"border-s":Z()}],"border-color-e":[{"border-e":Z()}],"border-color-t":[{"border-t":Z()}],"border-color-r":[{"border-r":Z()}],"border-color-b":[{"border-b":Z()}],"border-color-l":[{"border-l":Z()}],"divide-color":[{divide:Z()}],"outline-style":[{outline:[...ve(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ne,he,de]}],"outline-w":[{outline:["",Ne,Js,sa]}],"outline-color":[{outline:Z()}],shadow:[{shadow:["","none",p,oc,ac]}],"shadow-color":[{shadow:Z()}],"inset-shadow":[{"inset-shadow":["none",y,oc,ac]}],"inset-shadow-color":[{"inset-shadow":Z()}],"ring-w":[{ring:ie()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Z()}],"ring-offset-w":[{"ring-offset":[Ne,sa]}],"ring-offset-color":[{"ring-offset":Z()}],"inset-ring-w":[{"inset-ring":ie()}],"inset-ring-color":[{"inset-ring":Z()}],"text-shadow":[{"text-shadow":["none",v,oc,ac]}],"text-shadow-color":[{"text-shadow":Z()}],opacity:[{opacity:[Ne,he,de]}],"mix-blend":[{"mix-blend":[...pe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":pe()}],"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":ge()}],"mask-image-linear-to-pos":[{"mask-linear-to":ge()}],"mask-image-linear-from-color":[{"mask-linear-from":Z()}],"mask-image-linear-to-color":[{"mask-linear-to":Z()}],"mask-image-t-from-pos":[{"mask-t-from":ge()}],"mask-image-t-to-pos":[{"mask-t-to":ge()}],"mask-image-t-from-color":[{"mask-t-from":Z()}],"mask-image-t-to-color":[{"mask-t-to":Z()}],"mask-image-r-from-pos":[{"mask-r-from":ge()}],"mask-image-r-to-pos":[{"mask-r-to":ge()}],"mask-image-r-from-color":[{"mask-r-from":Z()}],"mask-image-r-to-color":[{"mask-r-to":Z()}],"mask-image-b-from-pos":[{"mask-b-from":ge()}],"mask-image-b-to-pos":[{"mask-b-to":ge()}],"mask-image-b-from-color":[{"mask-b-from":Z()}],"mask-image-b-to-color":[{"mask-b-to":Z()}],"mask-image-l-from-pos":[{"mask-l-from":ge()}],"mask-image-l-to-pos":[{"mask-l-to":ge()}],"mask-image-l-from-color":[{"mask-l-from":Z()}],"mask-image-l-to-color":[{"mask-l-to":Z()}],"mask-image-x-from-pos":[{"mask-x-from":ge()}],"mask-image-x-to-pos":[{"mask-x-to":ge()}],"mask-image-x-from-color":[{"mask-x-from":Z()}],"mask-image-x-to-color":[{"mask-x-to":Z()}],"mask-image-y-from-pos":[{"mask-y-from":ge()}],"mask-image-y-to-pos":[{"mask-y-to":ge()}],"mask-image-y-from-color":[{"mask-y-from":Z()}],"mask-image-y-to-color":[{"mask-y-to":Z()}],"mask-image-radial":[{"mask-radial":[he,de]}],"mask-image-radial-from-pos":[{"mask-radial-from":ge()}],"mask-image-radial-to-pos":[{"mask-radial-to":ge()}],"mask-image-radial-from-color":[{"mask-radial-from":Z()}],"mask-image-radial-to-color":[{"mask-radial-to":Z()}],"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":ge()}],"mask-image-conic-to-pos":[{"mask-conic-to":ge()}],"mask-image-conic-from-color":[{"mask-conic-from":Z()}],"mask-image-conic-to-color":[{"mask-conic-to":Z()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ce()}],"mask-repeat":[{mask:N()}],"mask-size":[{mask:A()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",he,de]}],filter:[{filter:["","none",he,de]}],blur:[{blur:Ge()}],brightness:[{brightness:[Ne,he,de]}],contrast:[{contrast:[Ne,he,de]}],"drop-shadow":[{"drop-shadow":["","none",b,oc,ac]}],"drop-shadow-color":[{"drop-shadow":Z()}],grayscale:[{grayscale:["",Ne,he,de]}],"hue-rotate":[{"hue-rotate":[Ne,he,de]}],invert:[{invert:["",Ne,he,de]}],saturate:[{saturate:[Ne,he,de]}],sepia:[{sepia:["",Ne,he,de]}],"backdrop-filter":[{"backdrop-filter":["","none",he,de]}],"backdrop-blur":[{"backdrop-blur":Ge()}],"backdrop-brightness":[{"backdrop-brightness":[Ne,he,de]}],"backdrop-contrast":[{"backdrop-contrast":[Ne,he,de]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ne,he,de]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ne,he,de]}],"backdrop-invert":[{"backdrop-invert":["",Ne,he,de]}],"backdrop-opacity":[{"backdrop-opacity":[Ne,he,de]}],"backdrop-saturate":[{"backdrop-saturate":[Ne,he,de]}],"backdrop-sepia":[{"backdrop-sepia":["",Ne,he,de]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":V()}],"border-spacing-x":[{"border-spacing-x":V()}],"border-spacing-y":[{"border-spacing-y":V()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",he,de]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ne,"initial",he,de]}],ease:[{ease:["linear","initial",j,he,de]}],delay:[{delay:[Ne,he,de]}],animate:[{animate:["none",O,he,de]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[T,he,de]}],"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:At()}],"scale-x":[{"scale-x":At()}],"scale-y":[{"scale-y":At()}],"scale-z":[{"scale-z":At()}],"scale-3d":["scale-3d"],skew:[{skew:an()}],"skew-x":[{"skew-x":an()}],"skew-y":[{"skew-y":an()}],transform:[{transform:[he,de,"","none","gpu","cpu"]}],"transform-origin":[{origin:L()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Un()}],"translate-x":[{"translate-x":Un()}],"translate-y":[{"translate-y":Un()}],"translate-z":[{"translate-z":Un()}],"translate-none":["translate-none"],accent:[{accent:Z()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Z()}],"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",he,de]}],"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":V()}],"scroll-mx":[{"scroll-mx":V()}],"scroll-my":[{"scroll-my":V()}],"scroll-ms":[{"scroll-ms":V()}],"scroll-me":[{"scroll-me":V()}],"scroll-mt":[{"scroll-mt":V()}],"scroll-mr":[{"scroll-mr":V()}],"scroll-mb":[{"scroll-mb":V()}],"scroll-ml":[{"scroll-ml":V()}],"scroll-p":[{"scroll-p":V()}],"scroll-px":[{"scroll-px":V()}],"scroll-py":[{"scroll-py":V()}],"scroll-ps":[{"scroll-ps":V()}],"scroll-pe":[{"scroll-pe":V()}],"scroll-pt":[{"scroll-pt":V()}],"scroll-pr":[{"scroll-pr":V()}],"scroll-pb":[{"scroll-pb":V()}],"scroll-pl":[{"scroll-pl":V()}],"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",he,de]}],fill:[{fill:["none",...Z()]}],"stroke-w":[{stroke:[Ne,Js,sa,pm]}],stroke:[{stroke:["none",...Z()]}],"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"]}},Co=iL(zL);function kn({label:e,error:t,helperText:n,className:i,...o}){return x.jsxs("div",{className:"flex flex-col gap-1.5",children:[x.jsx("label",{className:"text-sm font-medium text-azure-text-primary/80 dark:text-matrix-highlight/80",children:e}),x.jsx("input",{className:Co("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&&x.jsx("p",{className:"text-xs text-azure-text-secondary dark:text-matrix-secondary",children:n}),t&&x.jsx("p",{className:"text-xs text-red-500",children:t})]})}function sc({label:e,options:t,error:n,helperText:i,className:o,...u}){return x.jsxs("div",{className:"flex flex-col gap-1.5",children:[x.jsx("label",{className:"text-sm font-medium text-azure-text-primary/80 dark:text-matrix-highlight/80",children:e}),x.jsx("select",{className:Co("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=>x.jsx("option",{value:l.value,className:"bg-azure-bg dark:bg-matrix-base",children:l.label},l.value))}),i&&!n&&x.jsx("p",{className:"text-xs text-azure-text-secondary dark:text-matrix-secondary",children:i}),n&&x.jsx("p",{className:"text-xs text-red-500",children:n})]})}function fo({label:e,error:t,helperText:n,className:i,...o}){return x.jsxs("div",{className:"flex flex-col gap-1.5",children:[x.jsx("label",{className:"text-sm font-medium text-azure-text-primary/80 dark:text-matrix-highlight/80",children:e}),x.jsx("input",{type:"number",className:Co("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&&x.jsx("p",{className:"text-xs text-azure-text-secondary dark:text-matrix-secondary",children:n}),t&&x.jsx("p",{className:"text-xs text-red-500",children:t})]})}function Qs({label:e,checked:t,onChange:n,helperText:i,disabled:o}){return x.jsxs("div",{className:"flex items-center justify-between",children:[x.jsxs("div",{className:"flex flex-col",children:[x.jsx("span",{className:Co("text-sm font-medium text-azure-text-primary/80 dark:text-matrix-highlight/80",o&&"opacity-50"),children:e}),i&&x.jsx("span",{className:"text-xs text-azure-text-secondary dark:text-matrix-secondary",children:i})]}),x.jsx("button",{type:"button",role:"switch","aria-checked":t,onClick:()=>!o&&n(!t),className:Co("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:x.jsx("span",{className:Co("inline-block h-4 w-4 transform rounded-full bg-white dark:bg-black transition-transform",t?"translate-x-6":"translate-x-1")})})]})}const lc={fetchConfig:async()=>mt.get("/config"),updateConfig:async e=>mt.post("/config",e),getSatiConfig:async()=>mt.get("/config/sati"),updateSatiConfig:async e=>mt.post("/config/sati",e),deleteSatiConfig:async()=>mt.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 v=p[y];v in f||(f[v]=h[v].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 Ao=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},C_=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};const A_={};function Ni(e){return A_}function j_(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 yp(e,t){return typeof t=="bigint"?t.toString():t}function tf(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Ag(e){return e==null}function jg(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function _L(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 wS=Symbol("evaluating");function qe(e,t,n){let i;Object.defineProperty(e,t,{get(){if(i!==wS)return i===void 0&&(i=wS,i=n()),i},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function Sa(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Di(...e){const t={};for(const n of e){const i=Object.getOwnPropertyDescriptors(n);Object.assign(t,i)}return Object.defineProperties({},t)}function zS(e){return JSON.stringify(e)}function EL(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const N_="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function vl(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const TL=tf(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function $o(e){if(vl(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(vl(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function O_(e){return $o(e)?{...e}:Array.isArray(e)?[...e]:e}const CL=new Set(["string","number","symbol"]);function Lo(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function $i(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 AL(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const jL={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 NL(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=Di(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 Sa(this,"shape",l),l},checks:[]});return $i(e,u)}function OL(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=Di(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 Sa(this,"shape",l),l},checks:[]});return $i(e,u)}function RL(e,t){if(!$o(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=Di(e._zod.def,{get shape(){const u={...e._zod.def.shape,...t};return Sa(this,"shape",u),u}});return $i(e,o)}function ML(e,t){if(!$o(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=Di(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return Sa(this,"shape",i),i}});return $i(e,n)}function DL(e,t){const n=Di(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t._zod.def.shape};return Sa(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:[]});return $i(e,n)}function $L(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=Di(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 Sa(this,"shape",d),d},checks:[]});return $i(t,l)}function LL(e,t,n){const i=Di(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 Sa(this,"shape",u),u}});return $i(t,i)}function bo(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 So(e,t){return t.map(n=>{var i;return(i=n).path??(i.path=[]),n.path.unshift(e),n})}function uc(e){return typeof e=="string"?e:e?.message}function Oi(e,t,n){const i={...e,path:e.path??[]};if(!e.message){const o=uc(e.inst?._zod.def?.error?.(e))??uc(t?.error?.(e))??uc(n.customError?.(e))??uc(n.localeError?.(e))??"Invalid input";i.message=o}return delete i.inst,delete i.continue,t?.reportInput||delete i.input,i}function Ng(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function bl(...e){const[t,n,i]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:i}:{...t}}const R_=(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,yp,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},M_=Q("$ZodError",R_),D_=Q("$ZodError",R_,{Parent:Error});function UL(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 PL(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 Og=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 Ao;if(l.issues.length){const f=new(o?.Err??e)(l.issues.map(d=>Oi(d,u,Ni())));throw N_(f,o?.callee),f}return l.value},Rg=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=>Oi(d,u,Ni())));throw N_(f,o?.callee),f}return l.value},nf=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 Ao;return u.issues.length?{success:!1,error:new(e??M_)(u.issues.map(l=>Oi(l,o,Ni())))}:{success:!0,data:u.value}},VL=nf(D_),rf=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=>Oi(l,o,Ni())))}:{success:!0,data:u.value}},ZL=rf(D_),BL=e=>(t,n,i)=>{const o=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Og(e)(t,n,o)},IL=e=>(t,n,i)=>Og(e)(t,n,i),HL=e=>async(t,n,i)=>{const o=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Rg(e)(t,n,o)},FL=e=>async(t,n,i)=>Rg(e)(t,n,i),qL=e=>(t,n,i)=>{const o=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return nf(e)(t,n,o)},GL=e=>(t,n,i)=>nf(e)(t,n,i),YL=e=>async(t,n,i)=>{const o=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return rf(e)(t,n,o)},XL=e=>async(t,n,i)=>rf(e)(t,n,i),KL=/^[cC][^\s-]{8,}$/,JL=/^[0-9a-z]+$/,QL=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,WL=/^[0-9a-vA-V]{20}$/,e9=/^[A-Za-z0-9]{27}$/,t9=/^[a-zA-Z0-9_-]{21}$/,n9=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,r9=/^([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})$/,_S=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)$/,i9=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,a9="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function o9(){return new RegExp(a9,"u")}const s9=/^(?:(?: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])$/,l9=/^(([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}|:))$/,u9=/^((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])$/,c9=/^(([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])$/,f9=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,$_=/^[A-Za-z0-9_-]*$/,d9=/^\+[1-9]\d{6,14}$/,L_="(?:(?:\\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])))",h9=new RegExp(`^${L_}$`);function U_(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 m9(e){return new RegExp(`^${U_(e)}$`)}function p9(e){const t=U_({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(`^${L_}T(?:${i})$`)}const g9=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},y9=/^-?\d+$/,P_=/^-?\d+(?:\.\d+)?$/,x9=/^(?:true|false)$/i,v9=/^[^A-Z]*$/,b9=/^[^a-z]*$/,En=Q("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),V_={number:"number",bigint:"bigint",object:"date"},Z_=Q("$ZodCheckLessThan",(e,t)=>{En.init(e,t);const n=V_[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})}}),B_=Q("$ZodCheckGreaterThan",(e,t)=>{En.init(e,t);const n=V_[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})}}),S9=Q("$ZodCheckMultipleOf",(e,t)=>{En.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):_L(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})}}),k9=Q("$ZodCheckNumberFormat",(e,t)=>{En.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),i=n?"int":"number",[o,u]=jL[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=y9)}),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})}}),w9=Q("$ZodCheckMaxLength",(e,t)=>{var n;En.init(e,t),(n=e._zod.def).when??(n.when=i=>{const o=i.value;return!Ag(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=Ng(o);i.issues.push({origin:l,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),z9=Q("$ZodCheckMinLength",(e,t)=>{var n;En.init(e,t),(n=e._zod.def).when??(n.when=i=>{const o=i.value;return!Ag(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=Ng(o);i.issues.push({origin:l,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),_9=Q("$ZodCheckLengthEquals",(e,t)=>{var n;En.init(e,t),(n=e._zod.def).when??(n.when=i=>{const o=i.value;return!Ag(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=Ng(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})}}),af=Q("$ZodCheckStringFormat",(e,t)=>{var n,i;En.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=()=>{})}),E9=Q("$ZodCheckRegex",(e,t)=>{af.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})}}),T9=Q("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=v9),af.init(e,t)}),C9=Q("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=b9),af.init(e,t)}),A9=Q("$ZodCheckIncludes",(e,t)=>{En.init(e,t);const n=Lo(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})}}),j9=Q("$ZodCheckStartsWith",(e,t)=>{En.init(e,t);const n=new RegExp(`^${Lo(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})}}),N9=Q("$ZodCheckEndsWith",(e,t)=>{En.init(e,t);const n=new RegExp(`.*${Lo(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})}}),O9=Q("$ZodCheckOverwrite",(e,t)=>{En.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});let R9=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 M9={major:4,minor:3,patch:6},vt=Q("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=M9;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=bo(l),p;for(const y of f){if(y._zod.def.when){if(!y._zod.def.when(l))continue}else if(h)continue;const v=l.issues.length,b=y._zod.check(l);if(b instanceof Promise&&d?.async===!1)throw new Ao;if(p||b instanceof Promise)p=(p??Promise.resolve()).then(async()=>{await b,l.issues.length!==v&&(h||(h=bo(l,v)))});else{if(l.issues.length===v)continue;h||(h=bo(l,v))}}return p?p.then(()=>l):l},u=(l,f,d)=>{if(bo(l))return l.aborted=!0,l;const h=o(f,i,d);if(h instanceof Promise){if(d.async===!1)throw new Ao;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 Ao;return d.then(h=>o(h,i,f))}return o(d,i,f)}}qe(e,"~standard",()=>({validate:o=>{try{const u=VL(e,o);return u.success?{value:u.data}:{issues:u.error?.issues}}catch{return ZL(e,o).then(l=>l.success?{value:l.data}:{issues:l.error?.issues})}},vendor:"zod",version:1}))}),Mg=Q("$ZodString",(e,t)=>{vt.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??g9(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=Q("$ZodStringFormat",(e,t)=>{af.init(e,t),Mg.init(e,t)}),D9=Q("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=r9),gt.init(e,t)}),$9=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=_S(i))}else t.pattern??(t.pattern=_S());gt.init(e,t)}),L9=Q("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=i9),gt.init(e,t)}),U9=Q("$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})}}}),P9=Q("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=o9()),gt.init(e,t)}),V9=Q("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=t9),gt.init(e,t)}),Z9=Q("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=KL),gt.init(e,t)}),B9=Q("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=JL),gt.init(e,t)}),I9=Q("$ZodULID",(e,t)=>{t.pattern??(t.pattern=QL),gt.init(e,t)}),H9=Q("$ZodXID",(e,t)=>{t.pattern??(t.pattern=WL),gt.init(e,t)}),F9=Q("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=e9),gt.init(e,t)}),q9=Q("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=p9(t)),gt.init(e,t)}),G9=Q("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=h9),gt.init(e,t)}),Y9=Q("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=m9(t)),gt.init(e,t)}),X9=Q("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=n9),gt.init(e,t)}),K9=Q("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=s9),gt.init(e,t),e._zod.bag.format="ipv4"}),J9=Q("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=l9),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})}}}),Q9=Q("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=u9),gt.init(e,t)}),W9=Q("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=c9),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 I_(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const eU=Q("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=f9),gt.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{I_(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function tU(e){if(!$_.test(e))return!1;const t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return I_(n)}const nU=Q("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=$_),gt.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{tU(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),rU=Q("$ZodE164",(e,t)=>{t.pattern??(t.pattern=d9),gt.init(e,t)});function iU(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 aU=Q("$ZodJWT",(e,t)=>{gt.init(e,t),e._zod.check=n=>{iU(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),H_=Q("$ZodNumber",(e,t)=>{vt.init(e,t),e._zod.pattern=e._zod.bag.pattern??P_,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}}),oU=Q("$ZodNumberFormat",(e,t)=>{k9.init(e,t),H_.init(e,t)}),sU=Q("$ZodBoolean",(e,t)=>{vt.init(e,t),e._zod.pattern=x9,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}}),lU=Q("$ZodUnknown",(e,t)=>{vt.init(e,t),e._zod.parse=n=>n}),uU=Q("$ZodNever",(e,t)=>{vt.init(e,t),e._zod.parse=(n,i)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function ES(e,t,n){e.issues.length&&t.issues.push(...So(n,e.issues)),t.value[n]=e.value}const cU=Q("$ZodArray",(e,t)=>{vt.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=>ES(h,n,l))):ES(d,n,l)}return u.length?Promise.all(u).then(()=>n):n}});function Lc(e,t,n,i,o){if(e.issues.length){if(o&&!(n in i))return;t.issues.push(...So(n,e.issues))}e.value===void 0?n in i&&(t.value[n]=void 0):t.value[n]=e.value}function F_(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=AL(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function q_(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 v=d.run({value:t[y],issues:[]},i);v instanceof Promise?e.push(v.then(b=>Lc(b,n,y,t,p))):Lc(v,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 fU=Q("$ZodObject",(e,t)=>{if(vt.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=tf(()=>F_(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=vl,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 v of l.keys){const b=y[v],E=b._zod.optout==="optional",T=b._zod.run({value:h[v],issues:[]},d);T instanceof Promise?p.push(T.then(C=>Lc(C,f,v,h,E))):Lc(T,f,v,h,E)}return u?q_(p,h,f,d,i.value,e):p.length?Promise.all(p).then(()=>f):f}}),dU=Q("$ZodObjectJIT",(e,t)=>{fU.init(e,t);const n=e._zod.parse,i=tf(()=>F_(t)),o=v=>{const b=new R9(["shape","payload","ctx"]),E=i.value,T=z=>{const R=zS(z);return`shape[${R}]._zod.run({ value: input[${R}], issues: [] }, ctx)`};b.write("const input = payload.value;");const C=Object.create(null);let j=0;for(const z of E.keys)C[z]=`key_${j++}`;b.write("const newResult = {};");for(const z of E.keys){const R=C[z],L=zS(z),G=v[z]?._zod?.optout==="optional";b.write(`const ${R} = ${T(z)};`),G?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 O=b.compile();return(z,R)=>O(v,z,R)};let u;const l=vl,f=!A_.jitless,h=f&&TL.value,p=t.catchall;let y;e._zod.parse=(v,b)=>{y??(y=i.value);const E=v.value;return l(E)?f&&h&&b?.async===!1&&b.jitless!==!0?(u||(u=o(t.shape)),v=u(v,b),p?q_([],E,v,b,y,e):v):n(v,b):(v.issues.push({expected:"object",code:"invalid_type",input:E,inst:e}),v)}});function TS(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=>!bo(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=>Oi(l,i,Ni())))}),t)}const G_=Q("$ZodUnion",(e,t)=>{vt.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=>jg(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=>TS(d,o,e,u)):TS(f,o,e,u)}}),hU=Q("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,G_.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=tf(()=>{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(!vl(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)}}),mU=Q("$ZodIntersection",(e,t)=>{vt.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])=>CS(n,d,h)):CS(n,u,l)}});function xp(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($o(e)&&$o(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=xp(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=xp(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 CS(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}),bo(e))return e;const l=xp(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 pU=Q("$ZodRecord",(e,t)=>{vt.init(e,t),e._zod.parse=(n,i)=>{const o=n.value;if(!$o(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(...So(h,y.issues)),n.value[h]=y.value})):(p.issues.length&&n.issues.push(...So(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"&&P_.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=>Oi(y,i,Ni())),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(...So(f,y.issues)),n.value[d.value]=y.value})):(p.issues.length&&n.issues.push(...So(f,p.issues)),n.value[d.value]=p.value)}}return u.length?Promise.all(u).then(()=>n):n}}),gU=Q("$ZodEnum",(e,t)=>{vt.init(e,t);const n=j_(t.entries),i=new Set(n);e._zod.values=i,e._zod.pattern=new RegExp(`^(${n.filter(o=>CL.has(typeof o)).map(o=>typeof o=="string"?Lo(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}}),yU=Q("$ZodLiteral",(e,t)=>{if(vt.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"?Lo(i):i?Lo(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}}),xU=Q("$ZodTransform",(e,t)=>{vt.init(e,t),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new C_(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 Ao;return n.value=o,n}});function AS(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const Y_=Q("$ZodOptional",(e,t)=>{vt.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(`^(${jg(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=>AS(u,n.value)):AS(o,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,i)}}),vU=Q("$ZodExactOptional",(e,t)=>{Y_.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)}),bU=Q("$ZodNullable",(e,t)=>{vt.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(`^(${jg(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)}),SU=Q("$ZodDefault",(e,t)=>{vt.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=>jS(u,t)):jS(o,t)}});function jS(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const kU=Q("$ZodPrefault",(e,t)=>{vt.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))}),wU=Q("$ZodNonOptional",(e,t)=>{vt.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=>NS(u,e)):NS(o,e)}});function NS(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 zU=Q("$ZodCatch",(e,t)=>{vt.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=>Oi(l,i,Ni()))},input:n.value}),n.issues=[]),n)):(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(u=>Oi(u,i,Ni()))},input:n.value}),n.issues=[]),n)}}),_U=Q("$ZodPipe",(e,t)=>{vt.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=>cc(l,t.in,i)):cc(u,t.in,i)}const o=t.in._zod.run(n,i);return o instanceof Promise?o.then(u=>cc(u,t.out,i)):cc(o,t.out,i)}});function cc(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const EU=Q("$ZodReadonly",(e,t)=>{vt.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(OS):OS(o)}});function OS(e){return e.value=Object.freeze(e.value),e}const TU=Q("$ZodCustom",(e,t)=>{En.init(e,t),vt.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=>RS(u,n,i,e));RS(o,n,i,e)}});function RS(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(bl(o))}}var MS;let CU=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 AU(){return new CU}(MS=globalThis).__zod_globalRegistry??(MS.__zod_globalRegistry=AU());const tl=globalThis.__zod_globalRegistry;function jU(e,t){return new e({type:"string",...be(t)})}function NU(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...be(t)})}function DS(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...be(t)})}function OU(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...be(t)})}function RU(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...be(t)})}function MU(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...be(t)})}function DU(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...be(t)})}function $U(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...be(t)})}function LU(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...be(t)})}function UU(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...be(t)})}function PU(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...be(t)})}function VU(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...be(t)})}function ZU(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...be(t)})}function BU(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...be(t)})}function IU(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...be(t)})}function HU(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...be(t)})}function FU(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...be(t)})}function qU(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...be(t)})}function GU(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...be(t)})}function YU(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...be(t)})}function XU(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...be(t)})}function KU(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...be(t)})}function JU(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...be(t)})}function QU(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...be(t)})}function WU(e,t){return new e({type:"string",format:"date",check:"string_format",...be(t)})}function eP(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...be(t)})}function tP(e,t){return new e({type:"string",format:"duration",check:"string_format",...be(t)})}function nP(e,t){return new e({type:"number",checks:[],...be(t)})}function rP(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...be(t)})}function iP(e,t){return new e({type:"boolean",...be(t)})}function aP(e){return new e({type:"unknown"})}function oP(e,t){return new e({type:"never",...be(t)})}function $S(e,t){return new Z_({check:"less_than",...be(t),value:e,inclusive:!1})}function gm(e,t){return new Z_({check:"less_than",...be(t),value:e,inclusive:!0})}function LS(e,t){return new B_({check:"greater_than",...be(t),value:e,inclusive:!1})}function ym(e,t){return new B_({check:"greater_than",...be(t),value:e,inclusive:!0})}function US(e,t){return new S9({check:"multiple_of",...be(t),value:e})}function X_(e,t){return new w9({check:"max_length",...be(t),maximum:e})}function Uc(e,t){return new z9({check:"min_length",...be(t),minimum:e})}function K_(e,t){return new _9({check:"length_equals",...be(t),length:e})}function sP(e,t){return new E9({check:"string_format",format:"regex",...be(t),pattern:e})}function lP(e){return new T9({check:"string_format",format:"lowercase",...be(e)})}function uP(e){return new C9({check:"string_format",format:"uppercase",...be(e)})}function cP(e,t){return new A9({check:"string_format",format:"includes",...be(t),includes:e})}function fP(e,t){return new j9({check:"string_format",format:"starts_with",...be(t),prefix:e})}function dP(e,t){return new N9({check:"string_format",format:"ends_with",...be(t),suffix:e})}function Xo(e){return new O9({check:"overwrite",tx:e})}function hP(e){return Xo(t=>t.normalize(e))}function mP(){return Xo(e=>e.trim())}function pP(){return Xo(e=>e.toLowerCase())}function gP(){return Xo(e=>e.toUpperCase())}function yP(){return Xo(e=>EL(e))}function xP(e,t,n){return new e({type:"array",element:t,...be(n)})}function vP(e,t,n){return new e({type:"custom",check:"custom",fn:t,...be(n)})}function bP(e){const t=SP(n=>(n.addIssue=i=>{if(typeof i=="string")n.issues.push(bl(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(bl(o))}},e(n.value,n)));return t}function SP(e,t){const n=new En({check:"custom",...be(t)});return n._zod.check=e,n}function J_(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??tl,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 v=l.schema,b=t.processors[o.type];if(!b)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);b(e,t,v,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 Q_(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,v=e.external.uri??(E=>E);if(y)return{ref:v(y)};const b=l[1].defId??l[1].schema.id??`schema${e.counter++}`;return l[1].defId=b,{defId:b,ref:`${v("__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 W_(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 v=e.seen.get(p),b=v.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 T in d)T==="$ref"||T==="allOf"||T in h||delete d[T];if(b.$ref&&v.def)for(const T in d)T==="$ref"||T==="allOf"||T in v.def&&JSON.stringify(d[T])===JSON.stringify(v.def[T])&&delete d[T]}const y=l._zod.parent;if(y&&y!==p){i(y);const v=e.seen.get(y);if(v?.schema.$ref&&(d.$ref=v.schema.$ref,v.def))for(const b in d)b==="$ref"||b==="allOf"||b in v.def&&JSON.stringify(d[b])===JSON.stringify(v.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:Pc(t,"input",e.processors),output:Pc(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 kP=(e,t={})=>n=>{const i=J_({...n,processors:t});return $t(e,i),Q_(i,e),W_(i,e)},Pc=(e,t,n={})=>i=>{const{libraryOptions:o,target:u}=i??{},l=J_({...o??{},target:u,io:t,processors:n});return $t(e,l),Q_(l,e),W_(l,e)},wP={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},zP=(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=wP[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}))])}},_P=(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)},EP=(e,t,n,i)=>{n.type="boolean"},TP=(e,t,n,i)=>{n.not={}},CP=(e,t,n,i)=>{},AP=(e,t,n,i)=>{const o=e._zod.def,u=j_(o.entries);u.every(l=>typeof l=="number")&&(n.type="number"),u.every(l=>typeof l=="string")&&(n.type="string"),n.enum=u},jP=(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},NP=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},OP=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},RP=(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"]})},MP=(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)},DP=(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},$P=(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},LP=(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)}},UP=(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"}]},PP=(e,t,n,i)=>{const o=e._zod.def;$t(o.innerType,t,i);const u=t.seen.get(e);u.ref=o.innerType},VP=(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))},ZP=(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)))},BP=(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},IP=(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},HP=(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},e2=(e,t,n,i)=>{const o=e._zod.def;$t(o.innerType,t,i);const u=t.seen.get(e);u.ref=o.innerType},FP=Q("ZodISODateTime",(e,t)=>{q9.init(e,t),St.init(e,t)});function qP(e){return QU(FP,e)}const GP=Q("ZodISODate",(e,t)=>{G9.init(e,t),St.init(e,t)});function YP(e){return WU(GP,e)}const XP=Q("ZodISOTime",(e,t)=>{Y9.init(e,t),St.init(e,t)});function KP(e){return eP(XP,e)}const JP=Q("ZodISODuration",(e,t)=>{X9.init(e,t),St.init(e,t)});function QP(e){return tP(JP,e)}const WP=(e,t)=>{M_.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>PL(e,n)},flatten:{value:n=>UL(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,yp,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,yp,2)}},isEmpty:{get(){return e.issues.length===0}}})},ir=Q("ZodError",WP,{Parent:Error}),eV=Og(ir),tV=Rg(ir),nV=nf(ir),rV=rf(ir),iV=BL(ir),aV=IL(ir),oV=HL(ir),sV=FL(ir),lV=qL(ir),uV=GL(ir),cV=YL(ir),fV=XL(ir),bt=Q("ZodType",(e,t)=>(vt.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Pc(e,"input"),output:Pc(e,"output")}}),e.toJSONSchema=kP(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(Di(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)=>$i(e,n,i),e.brand=()=>e,e.register=((n,i)=>(n.add(e,i),e)),e.parse=(n,i)=>eV(e,n,i,{callee:e.parse}),e.safeParse=(n,i)=>nV(e,n,i),e.parseAsync=async(n,i)=>tV(e,n,i,{callee:e.parseAsync}),e.safeParseAsync=async(n,i)=>rV(e,n,i),e.spa=e.safeParseAsync,e.encode=(n,i)=>iV(e,n,i),e.decode=(n,i)=>aV(e,n,i),e.encodeAsync=async(n,i)=>oV(e,n,i),e.decodeAsync=async(n,i)=>sV(e,n,i),e.safeEncode=(n,i)=>lV(e,n,i),e.safeDecode=(n,i)=>uV(e,n,i),e.safeEncodeAsync=async(n,i)=>cV(e,n,i),e.safeDecodeAsync=async(n,i)=>fV(e,n,i),e.refine=(n,i)=>e.check(a8(n,i)),e.superRefine=n=>e.check(o8(n)),e.overwrite=n=>e.check(Xo(n)),e.optional=()=>IS(e),e.exactOptional=()=>qV(e),e.nullable=()=>HS(e),e.nullish=()=>IS(HS(e)),e.nonoptional=n=>QV(e,n),e.array=()=>Sl(e),e.or=n=>i2([e,n]),e.and=n=>VV(e,n),e.transform=n=>FS(e,HV(n)),e.default=n=>XV(e,n),e.prefault=n=>JV(e,n),e.catch=n=>e8(e,n),e.pipe=n=>FS(e,n),e.readonly=()=>r8(e),e.describe=n=>{const i=e.clone();return tl.add(i,{description:n}),i},Object.defineProperty(e,"description",{get(){return tl.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return tl.get(e);const i=e.clone();return tl.add(i,n[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),t2=Q("_ZodString",(e,t)=>{Mg.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(i,o,u)=>zP(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(sP(...i)),e.includes=(...i)=>e.check(cP(...i)),e.startsWith=(...i)=>e.check(fP(...i)),e.endsWith=(...i)=>e.check(dP(...i)),e.min=(...i)=>e.check(Uc(...i)),e.max=(...i)=>e.check(X_(...i)),e.length=(...i)=>e.check(K_(...i)),e.nonempty=(...i)=>e.check(Uc(1,...i)),e.lowercase=i=>e.check(lP(i)),e.uppercase=i=>e.check(uP(i)),e.trim=()=>e.check(mP()),e.normalize=(...i)=>e.check(hP(...i)),e.toLowerCase=()=>e.check(pP()),e.toUpperCase=()=>e.check(gP()),e.slugify=()=>e.check(yP())}),dV=Q("ZodString",(e,t)=>{Mg.init(e,t),t2.init(e,t),e.email=n=>e.check(NU(hV,n)),e.url=n=>e.check($U(mV,n)),e.jwt=n=>e.check(JU(AV,n)),e.emoji=n=>e.check(LU(pV,n)),e.guid=n=>e.check(DS(PS,n)),e.uuid=n=>e.check(OU(fc,n)),e.uuidv4=n=>e.check(RU(fc,n)),e.uuidv6=n=>e.check(MU(fc,n)),e.uuidv7=n=>e.check(DU(fc,n)),e.nanoid=n=>e.check(UU(gV,n)),e.guid=n=>e.check(DS(PS,n)),e.cuid=n=>e.check(PU(yV,n)),e.cuid2=n=>e.check(VU(xV,n)),e.ulid=n=>e.check(ZU(vV,n)),e.base64=n=>e.check(YU(EV,n)),e.base64url=n=>e.check(XU(TV,n)),e.xid=n=>e.check(BU(bV,n)),e.ksuid=n=>e.check(IU(SV,n)),e.ipv4=n=>e.check(HU(kV,n)),e.ipv6=n=>e.check(FU(wV,n)),e.cidrv4=n=>e.check(qU(zV,n)),e.cidrv6=n=>e.check(GU(_V,n)),e.e164=n=>e.check(KU(CV,n)),e.datetime=n=>e.check(qP(n)),e.date=n=>e.check(YP(n)),e.time=n=>e.check(KP(n)),e.duration=n=>e.check(QP(n))});function it(e){return jU(dV,e)}const St=Q("ZodStringFormat",(e,t)=>{gt.init(e,t),t2.init(e,t)}),hV=Q("ZodEmail",(e,t)=>{L9.init(e,t),St.init(e,t)}),PS=Q("ZodGUID",(e,t)=>{D9.init(e,t),St.init(e,t)}),fc=Q("ZodUUID",(e,t)=>{$9.init(e,t),St.init(e,t)}),mV=Q("ZodURL",(e,t)=>{U9.init(e,t),St.init(e,t)}),pV=Q("ZodEmoji",(e,t)=>{P9.init(e,t),St.init(e,t)}),gV=Q("ZodNanoID",(e,t)=>{V9.init(e,t),St.init(e,t)}),yV=Q("ZodCUID",(e,t)=>{Z9.init(e,t),St.init(e,t)}),xV=Q("ZodCUID2",(e,t)=>{B9.init(e,t),St.init(e,t)}),vV=Q("ZodULID",(e,t)=>{I9.init(e,t),St.init(e,t)}),bV=Q("ZodXID",(e,t)=>{H9.init(e,t),St.init(e,t)}),SV=Q("ZodKSUID",(e,t)=>{F9.init(e,t),St.init(e,t)}),kV=Q("ZodIPv4",(e,t)=>{K9.init(e,t),St.init(e,t)}),wV=Q("ZodIPv6",(e,t)=>{J9.init(e,t),St.init(e,t)}),zV=Q("ZodCIDRv4",(e,t)=>{Q9.init(e,t),St.init(e,t)}),_V=Q("ZodCIDRv6",(e,t)=>{W9.init(e,t),St.init(e,t)}),EV=Q("ZodBase64",(e,t)=>{eU.init(e,t),St.init(e,t)}),TV=Q("ZodBase64URL",(e,t)=>{nU.init(e,t),St.init(e,t)}),CV=Q("ZodE164",(e,t)=>{rU.init(e,t),St.init(e,t)}),AV=Q("ZodJWT",(e,t)=>{aU.init(e,t),St.init(e,t)}),n2=Q("ZodNumber",(e,t)=>{H_.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(i,o,u)=>_P(e,i,o),e.gt=(i,o)=>e.check(LS(i,o)),e.gte=(i,o)=>e.check(ym(i,o)),e.min=(i,o)=>e.check(ym(i,o)),e.lt=(i,o)=>e.check($S(i,o)),e.lte=(i,o)=>e.check(gm(i,o)),e.max=(i,o)=>e.check(gm(i,o)),e.int=i=>e.check(VS(i)),e.safe=i=>e.check(VS(i)),e.positive=i=>e.check(LS(0,i)),e.nonnegative=i=>e.check(ym(0,i)),e.negative=i=>e.check($S(0,i)),e.nonpositive=i=>e.check(gm(0,i)),e.multipleOf=(i,o)=>e.check(US(i,o)),e.step=(i,o)=>e.check(US(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 ya(e){return nP(n2,e)}const jV=Q("ZodNumberFormat",(e,t)=>{oU.init(e,t),n2.init(e,t)});function VS(e){return rP(jV,e)}const NV=Q("ZodBoolean",(e,t)=>{sU.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>EP(e,n,i)});function ko(e){return iP(NV,e)}const OV=Q("ZodUnknown",(e,t)=>{lU.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>CP()});function ZS(){return aP(OV)}const RV=Q("ZodNever",(e,t)=>{uU.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>TP(e,n,i)});function MV(e){return oP(RV,e)}const DV=Q("ZodArray",(e,t)=>{cU.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>RP(e,n,i,o),e.element=t.element,e.min=(n,i)=>e.check(Uc(n,i)),e.nonempty=n=>e.check(Uc(1,n)),e.max=(n,i)=>e.check(X_(n,i)),e.length=(n,i)=>e.check(K_(n,i)),e.unwrap=()=>e.element});function Sl(e,t){return xP(DV,e,t)}const $V=Q("ZodObject",(e,t)=>{dU.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>MP(e,n,i,o),qe(e,"shape",()=>t.shape),e.keyof=()=>of(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:ZS()}),e.loose=()=>e.clone({...e._zod.def,catchall:ZS()}),e.strict=()=>e.clone({...e._zod.def,catchall:MV()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>RL(e,n),e.safeExtend=n=>ML(e,n),e.merge=n=>DL(e,n),e.pick=n=>NL(e,n),e.omit=n=>OL(e,n),e.partial=(...n)=>$L(a2,e,n[0]),e.required=(...n)=>LL(o2,e,n[0])});function Wn(e,t){const n={type:"object",shape:e??{},...be(t)};return new $V(n)}const r2=Q("ZodUnion",(e,t)=>{G_.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>DP(e,n,i,o),e.options=t.options});function i2(e,t){return new r2({type:"union",options:e,...be(t)})}const LV=Q("ZodDiscriminatedUnion",(e,t)=>{r2.init(e,t),hU.init(e,t)});function UV(e,t,n){return new LV({type:"union",options:t,discriminator:e,...be(n)})}const PV=Q("ZodIntersection",(e,t)=>{mU.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>$P(e,n,i,o)});function VV(e,t){return new PV({type:"intersection",left:e,right:t})}const ZV=Q("ZodRecord",(e,t)=>{pU.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>LP(e,n,i,o),e.keyType=t.keyType,e.valueType=t.valueType});function wc(e,t,n){return new ZV({type:"record",keyType:e,valueType:t,...be(n)})}const vp=Q("ZodEnum",(e,t)=>{gU.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(i,o,u)=>AP(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 vp({...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 vp({...t,checks:[],...be(o),entries:u})}});function of(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new vp({type:"enum",entries:n,...be(t)})}const BV=Q("ZodLiteral",(e,t)=>{yU.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>jP(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 BS(e,t){return new BV({type:"literal",values:Array.isArray(e)?e:[e],...be(t)})}const IV=Q("ZodTransform",(e,t)=>{xU.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>OP(e,n),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new C_(e.constructor.name);n.addIssue=u=>{if(typeof u=="string")n.issues.push(bl(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(bl(l))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(u=>(n.value=u,n)):(n.value=o,n)}});function HV(e){return new IV({type:"transform",transform:e})}const a2=Q("ZodOptional",(e,t)=>{Y_.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>e2(e,n,i,o),e.unwrap=()=>e._zod.def.innerType});function IS(e){return new a2({type:"optional",innerType:e})}const FV=Q("ZodExactOptional",(e,t)=>{vU.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>e2(e,n,i,o),e.unwrap=()=>e._zod.def.innerType});function qV(e){return new FV({type:"optional",innerType:e})}const GV=Q("ZodNullable",(e,t)=>{bU.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>UP(e,n,i,o),e.unwrap=()=>e._zod.def.innerType});function HS(e){return new GV({type:"nullable",innerType:e})}const YV=Q("ZodDefault",(e,t)=>{SU.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>VP(e,n,i,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function XV(e,t){return new YV({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():O_(t)}})}const KV=Q("ZodPrefault",(e,t)=>{kU.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>ZP(e,n,i,o),e.unwrap=()=>e._zod.def.innerType});function JV(e,t){return new KV({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():O_(t)}})}const o2=Q("ZodNonOptional",(e,t)=>{wU.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>PP(e,n,i,o),e.unwrap=()=>e._zod.def.innerType});function QV(e,t){return new o2({type:"nonoptional",innerType:e,...be(t)})}const WV=Q("ZodCatch",(e,t)=>{zU.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>BP(e,n,i,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function e8(e,t){return new WV({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const t8=Q("ZodPipe",(e,t)=>{_U.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>IP(e,n,i,o),e.in=t.in,e.out=t.out});function FS(e,t){return new t8({type:"pipe",in:e,out:t})}const n8=Q("ZodReadonly",(e,t)=>{EU.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>HP(e,n,i,o),e.unwrap=()=>e._zod.def.innerType});function r8(e){return new n8({type:"readonly",innerType:e})}const i8=Q("ZodCustom",(e,t)=>{TU.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(n,i,o)=>NP(e,n)});function a8(e,t={}){return vP(i8,e,t)}function o8(e){return bP(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}},s8=Wn({provider:of(["google","openai","openrouter","ollama"]).default(ht.audio.provider),model:it().min(1).default(ht.audio.model),enabled:ko().default(ht.audio.enabled),apiKey:it().optional(),base_url:it().optional(),maxDurationSeconds:ya().default(ht.audio.maxDurationSeconds),supportedMimeTypes:Sl(it()).default(ht.audio.supportedMimeTypes)}),s2=Wn({provider:of(["openai","anthropic","openrouter","ollama","gemini"]).default(ht.llm.provider),model:it().min(1).default(ht.llm.model),temperature:ya().min(0).max(1).default(ht.llm.temperature),max_tokens:ya().int().positive().optional(),api_key:it().optional(),base_url:it().optional(),context_window:ya().int().positive().optional()}),l8=s2.extend({memory_limit:ya().int().positive().optional(),enabled_archived_sessions:ko().default(!0)}),u8=Wn({agent:Wn({name:it().default(ht.agent.name),personality:it().default(ht.agent.personality)}).default(ht.agent),llm:s2.default(ht.llm),sati:l8.optional(),audio:s8.default(ht.audio),memory:Wn({limit:ya().int().positive().optional()}).default(ht.memory),channels:Wn({telegram:Wn({enabled:ko().default(!1),token:it().optional(),allowedUsers:Sl(it()).default([])}).default(ht.channels.telegram),discord:Wn({enabled:ko().default(!1),token:it().optional()}).default(ht.channels.discord)}).default(ht.channels),ui:Wn({enabled:ko().default(ht.ui.enabled),port:ya().default(ht.ui.port)}).default(ht.ui),logging:Wn({enabled:ko().default(ht.logging.enabled),level:of(["debug","info","warn","error"]).default(ht.logging.level),retention:it().default(ht.logging.retention)}).default(ht.logging)}),c8=UV("transport",[Wn({transport:BS("stdio"),command:it().min(1,"Command is required for stdio transport"),args:Sl(it()).optional().default([]),env:wc(it(),it()).optional().default({}),_comment:it().optional()}),Wn({transport:BS("http"),url:it().url("Valid URL is required for http transport"),headers:wc(it(),it()).optional().default({}),args:Sl(it()).optional().default([]),env:wc(it(),it()).optional().default({}),_comment:it().optional()})]);wc(it(),i2([c8,it()]));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 v=p[y];v in f||(f[v]=h[v].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 jo extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class l2 extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const u2={};function xa(e){return u2}function c2(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 bp(e,t){return typeof t=="bigint"?t.toString():t}function Dg(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function $g(e){return e==null}function Lg(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const qS=Symbol("evaluating");function Ke(e,t,n){let i;Object.defineProperty(e,t,{get(){if(i!==qS)return i===void 0&&(i=qS,i=n()),i},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function ka(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Li(...e){const t={};for(const n of e){const i=Object.getOwnPropertyDescriptors(n);Object.assign(t,i)}return Object.defineProperties({},t)}function GS(e){return JSON.stringify(e)}function f8(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const f2="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Vc(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const d8=Dg(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function kl(e){if(Vc(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(Vc(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function d2(e){return kl(e)?{...e}:Array.isArray(e)?[...e]:e}const h8=new Set(["string","number","symbol"]);function Uo(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ui(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 m8(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function p8(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=Li(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 ka(this,"shape",l),l},checks:[]});return Ui(e,u)}function g8(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=Li(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 ka(this,"shape",l),l},checks:[]});return Ui(e,u)}function y8(e,t){if(!kl(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=Li(e._zod.def,{get shape(){const u={...e._zod.def.shape,...t};return ka(this,"shape",u),u}});return Ui(e,o)}function x8(e,t){if(!kl(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=Li(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return ka(this,"shape",i),i}});return Ui(e,n)}function v8(e,t){const n=Li(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t._zod.def.shape};return ka(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:[]});return Ui(e,n)}function b8(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=Li(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 ka(this,"shape",d),d},checks:[]});return Ui(t,l)}function S8(e,t,n){const i=Li(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 ka(this,"shape",u),u}});return Ui(t,i)}function wo(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 h2(e,t){return t.map(n=>{var i;return(i=n).path??(i.path=[]),n.path.unshift(e),n})}function dc(e){return typeof e=="string"?e:e?.message}function va(e,t,n){const i={...e,path:e.path??[]};if(!e.message){const o=dc(e.inst?._zod.def?.error?.(e))??dc(t?.error?.(e))??dc(n.customError?.(e))??dc(n.localeError?.(e))??"Invalid input";i.message=o}return delete i.inst,delete i.continue,t?.reportInput||delete i.input,i}function Ug(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function wl(...e){const[t,n,i]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:i}:{...t}}const m2=(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,bp,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},p2=te("$ZodError",m2),g2=te("$ZodError",m2,{Parent:Error});function k8(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 w8(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 Pg=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 jo;if(l.issues.length){const f=new(o?.Err??e)(l.issues.map(d=>va(d,u,xa())));throw f2(f,o?.callee),f}return l.value},Vg=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=>va(d,u,xa())));throw f2(f,o?.callee),f}return l.value},sf=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 jo;return u.issues.length?{success:!1,error:new(e??p2)(u.issues.map(l=>va(l,o,xa())))}:{success:!0,data:u.value}},z8=sf(g2),lf=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=>va(l,o,xa())))}:{success:!0,data:u.value}},_8=lf(g2),E8=e=>(t,n,i)=>{const o=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Pg(e)(t,n,o)},T8=e=>(t,n,i)=>Pg(e)(t,n,i),C8=e=>async(t,n,i)=>{const o=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Vg(e)(t,n,o)},A8=e=>async(t,n,i)=>Vg(e)(t,n,i),j8=e=>(t,n,i)=>{const o=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return sf(e)(t,n,o)},N8=e=>(t,n,i)=>sf(e)(t,n,i),O8=e=>async(t,n,i)=>{const o=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return lf(e)(t,n,o)},R8=e=>async(t,n,i)=>lf(e)(t,n,i),M8=/^[cC][^\s-]{8,}$/,D8=/^[0-9a-z]+$/,$8=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,L8=/^[0-9a-vA-V]{20}$/,U8=/^[A-Za-z0-9]{27}$/,P8=/^[a-zA-Z0-9_-]{21}$/,V8=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Z8=/^([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})$/,YS=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)$/,B8=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,I8="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function H8(){return new RegExp(I8,"u")}const F8=/^(?:(?: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])$/,q8=/^(([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}|:))$/,G8=/^((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])$/,Y8=/^(([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])$/,X8=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,y2=/^[A-Za-z0-9_-]*$/,K8=/^\+[1-9]\d{6,14}$/,x2="(?:(?:\\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])))",J8=new RegExp(`^${x2}$`);function v2(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 Q8(e){return new RegExp(`^${v2(e)}$`)}function W8(e){const t=v2({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(`^${x2}T(?:${i})$`)}const eZ=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},tZ=/^[^A-Z]*$/,nZ=/^[^a-z]*$/,Er=te("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),rZ=te("$ZodCheckMaxLength",(e,t)=>{var n;Er.init(e,t),(n=e._zod.def).when??(n.when=i=>{const o=i.value;return!$g(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=Ug(o);i.issues.push({origin:l,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),iZ=te("$ZodCheckMinLength",(e,t)=>{var n;Er.init(e,t),(n=e._zod.def).when??(n.when=i=>{const o=i.value;return!$g(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=Ug(o);i.issues.push({origin:l,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),aZ=te("$ZodCheckLengthEquals",(e,t)=>{var n;Er.init(e,t),(n=e._zod.def).when??(n.when=i=>{const o=i.value;return!$g(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=Ug(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})}}),uf=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=()=>{})}),oZ=te("$ZodCheckRegex",(e,t)=>{uf.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})}}),sZ=te("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=tZ),uf.init(e,t)}),lZ=te("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=nZ),uf.init(e,t)}),uZ=te("$ZodCheckIncludes",(e,t)=>{Er.init(e,t);const n=Uo(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})}}),cZ=te("$ZodCheckStartsWith",(e,t)=>{Er.init(e,t);const n=new RegExp(`^${Uo(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})}}),fZ=te("$ZodCheckEndsWith",(e,t)=>{Er.init(e,t);const n=new RegExp(`.*${Uo(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})}}),dZ=te("$ZodCheckOverwrite",(e,t)=>{Er.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class hZ{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 mZ={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=mZ;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=wo(l),p;for(const y of f){if(y._zod.def.when){if(!y._zod.def.when(l))continue}else if(h)continue;const v=l.issues.length,b=y._zod.check(l);if(b instanceof Promise&&d?.async===!1)throw new jo;if(p||b instanceof Promise)p=(p??Promise.resolve()).then(async()=>{await b,l.issues.length!==v&&(h||(h=wo(l,v)))});else{if(l.issues.length===v)continue;h||(h=wo(l,v))}}return p?p.then(()=>l):l},u=(l,f,d)=>{if(wo(l))return l.aborted=!0,l;const h=o(f,i,d);if(h instanceof Promise){if(d.async===!1)throw new jo;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 jo;return d.then(h=>o(h,i,f))}return o(d,i,f)}}Ke(e,"~standard",()=>({validate:o=>{try{const u=z8(e,o);return u.success?{value:u.data}:{issues:u.error?.issues}}catch{return _8(e,o).then(l=>l.success?{value:l.data}:{issues:l.error?.issues})}},vendor:"zod",version:1}))}),Zg=te("$ZodString",(e,t)=>{Lt.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??eZ(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}}),yt=te("$ZodStringFormat",(e,t)=>{uf.init(e,t),Zg.init(e,t)}),pZ=te("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Z8),yt.init(e,t)}),gZ=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=YS(i))}else t.pattern??(t.pattern=YS());yt.init(e,t)}),yZ=te("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=B8),yt.init(e,t)}),xZ=te("$ZodURL",(e,t)=>{yt.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})}}}),vZ=te("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=H8()),yt.init(e,t)}),bZ=te("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=P8),yt.init(e,t)}),SZ=te("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=M8),yt.init(e,t)}),kZ=te("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=D8),yt.init(e,t)}),wZ=te("$ZodULID",(e,t)=>{t.pattern??(t.pattern=$8),yt.init(e,t)}),zZ=te("$ZodXID",(e,t)=>{t.pattern??(t.pattern=L8),yt.init(e,t)}),_Z=te("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=U8),yt.init(e,t)}),EZ=te("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=W8(t)),yt.init(e,t)}),TZ=te("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=J8),yt.init(e,t)}),CZ=te("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Q8(t)),yt.init(e,t)}),AZ=te("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=V8),yt.init(e,t)}),jZ=te("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=F8),yt.init(e,t),e._zod.bag.format="ipv4"}),NZ=te("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=q8),yt.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})}}}),OZ=te("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=G8),yt.init(e,t)}),RZ=te("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Y8),yt.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 b2(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const MZ=te("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=X8),yt.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{b2(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function DZ(e){if(!y2.test(e))return!1;const t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return b2(n)}const $Z=te("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=y2),yt.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{DZ(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),LZ=te("$ZodE164",(e,t)=>{t.pattern??(t.pattern=K8),yt.init(e,t)});function UZ(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 PZ=te("$ZodJWT",(e,t)=>{yt.init(e,t),e._zod.check=n=>{UZ(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),VZ=te("$ZodUnknown",(e,t)=>{Lt.init(e,t),e._zod.parse=n=>n}),ZZ=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 XS(e,t,n){e.issues.length&&t.issues.push(...h2(n,e.issues)),t.value[n]=e.value}const BZ=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=>XS(h,n,l))):XS(d,n,l)}return u.length?Promise.all(u).then(()=>n):n}});function Zc(e,t,n,i,o){if(e.issues.length){if(o&&!(n in i))return;t.issues.push(...h2(n,e.issues))}e.value===void 0?n in i&&(t.value[n]=void 0):t.value[n]=e.value}function S2(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=m8(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function k2(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 v=d.run({value:t[y],issues:[]},i);v instanceof Promise?e.push(v.then(b=>Zc(b,n,y,t,p))):Zc(v,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 IZ=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=Dg(()=>S2(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=Vc,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 v of l.keys){const b=y[v],E=b._zod.optout==="optional",T=b._zod.run({value:h[v],issues:[]},d);T instanceof Promise?p.push(T.then(C=>Zc(C,f,v,h,E))):Zc(T,f,v,h,E)}return u?k2(p,h,f,d,i.value,e):p.length?Promise.all(p).then(()=>f):f}}),HZ=te("$ZodObjectJIT",(e,t)=>{IZ.init(e,t);const n=e._zod.parse,i=Dg(()=>S2(t)),o=v=>{const b=new hZ(["shape","payload","ctx"]),E=i.value,T=z=>{const R=GS(z);return`shape[${R}]._zod.run({ value: input[${R}], issues: [] }, ctx)`};b.write("const input = payload.value;");const C=Object.create(null);let j=0;for(const z of E.keys)C[z]=`key_${j++}`;b.write("const newResult = {};");for(const z of E.keys){const R=C[z],L=GS(z),G=v[z]?._zod?.optout==="optional";b.write(`const ${R} = ${T(z)};`),G?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 O=b.compile();return(z,R)=>O(v,z,R)};let u;const l=Vc,f=!u2.jitless,h=f&&d8.value,p=t.catchall;let y;e._zod.parse=(v,b)=>{y??(y=i.value);const E=v.value;return l(E)?f&&h&&b?.async===!1&&b.jitless!==!0?(u||(u=o(t.shape)),v=u(v,b),p?k2([],E,v,b,y,e):v):n(v,b):(v.issues.push({expected:"object",code:"invalid_type",input:E,inst:e}),v)}});function KS(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=>!wo(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=>va(l,i,xa())))}),t)}const FZ=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=>Lg(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=>KS(d,o,e,u)):KS(f,o,e,u)}}),qZ=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])=>JS(n,d,h)):JS(n,u,l)}});function Sp(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(kl(e)&&kl(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=Sp(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=Sp(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 JS(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}),wo(e))return e;const l=Sp(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 GZ=te("$ZodEnum",(e,t)=>{Lt.init(e,t);const n=c2(t.entries),i=new Set(n);e._zod.values=i,e._zod.pattern=new RegExp(`^(${n.filter(o=>h8.has(typeof o)).map(o=>typeof o=="string"?Uo(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}}),YZ=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"?Uo(i):i?Uo(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}}),XZ=te("$ZodTransform",(e,t)=>{Lt.init(e,t),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new l2(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 jo;return n.value=o,n}});function QS(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const w2=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(`^(${Lg(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=>QS(u,n.value)):QS(o,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,i)}}),KZ=te("$ZodExactOptional",(e,t)=>{w2.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)}),JZ=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(`^(${Lg(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)}),QZ=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=>WS(u,t)):WS(o,t)}});function WS(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const WZ=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))}),eB=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=>ek(u,e)):ek(o,e)}});function ek(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 tB=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=>va(l,i,xa()))},input:n.value}),n.issues=[]),n)):(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(u=>va(u,i,xa()))},input:n.value}),n.issues=[]),n)}}),nB=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=>hc(l,t.in,i)):hc(u,t.in,i)}const o=t.in._zod.run(n,i);return o instanceof Promise?o.then(u=>hc(u,t.out,i)):hc(o,t.out,i)}});function hc(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const rB=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(tk):tk(o)}});function tk(e){return e.value=Object.freeze(e.value),e}const iB=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=>nk(u,n,i,e));nk(o,n,i,e)}});function nk(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(wl(o))}}var rk;class aB{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 oB(){return new aB}(rk=globalThis).__zod_globalRegistry??(rk.__zod_globalRegistry=oB());const nl=globalThis.__zod_globalRegistry;function sB(e,t){return new e({type:"string",...Ee(t)})}function lB(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Ee(t)})}function ik(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Ee(t)})}function uB(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Ee(t)})}function cB(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Ee(t)})}function fB(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Ee(t)})}function dB(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Ee(t)})}function hB(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Ee(t)})}function mB(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Ee(t)})}function pB(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Ee(t)})}function gB(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Ee(t)})}function yB(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Ee(t)})}function xB(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Ee(t)})}function vB(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Ee(t)})}function bB(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Ee(t)})}function SB(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Ee(t)})}function kB(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Ee(t)})}function wB(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Ee(t)})}function zB(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Ee(t)})}function _B(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Ee(t)})}function EB(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Ee(t)})}function TB(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Ee(t)})}function CB(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Ee(t)})}function AB(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Ee(t)})}function jB(e,t){return new e({type:"string",format:"date",check:"string_format",...Ee(t)})}function NB(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Ee(t)})}function OB(e,t){return new e({type:"string",format:"duration",check:"string_format",...Ee(t)})}function RB(e){return new e({type:"unknown"})}function MB(e,t){return new e({type:"never",...Ee(t)})}function z2(e,t){return new rZ({check:"max_length",...Ee(t),maximum:e})}function Bc(e,t){return new iZ({check:"min_length",...Ee(t),minimum:e})}function _2(e,t){return new aZ({check:"length_equals",...Ee(t),length:e})}function DB(e,t){return new oZ({check:"string_format",format:"regex",...Ee(t),pattern:e})}function $B(e){return new sZ({check:"string_format",format:"lowercase",...Ee(e)})}function LB(e){return new lZ({check:"string_format",format:"uppercase",...Ee(e)})}function UB(e,t){return new uZ({check:"string_format",format:"includes",...Ee(t),includes:e})}function PB(e,t){return new cZ({check:"string_format",format:"starts_with",...Ee(t),prefix:e})}function VB(e,t){return new fZ({check:"string_format",format:"ends_with",...Ee(t),suffix:e})}function Ko(e){return new dZ({check:"overwrite",tx:e})}function ZB(e){return Ko(t=>t.normalize(e))}function BB(){return Ko(e=>e.trim())}function IB(){return Ko(e=>e.toLowerCase())}function HB(){return Ko(e=>e.toUpperCase())}function FB(){return Ko(e=>f8(e))}function qB(e,t,n){return new e({type:"array",element:t,...Ee(n)})}function GB(e,t,n){return new e({type:"custom",check:"custom",fn:t,...Ee(n)})}function YB(e){const t=XB(n=>(n.addIssue=i=>{if(typeof i=="string")n.issues.push(wl(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(wl(o))}},e(n.value,n)));return t}function XB(e,t){const n=new Er({check:"custom",...Ee(t)});return n._zod.check=e,n}function E2(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??nl,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 v=l.schema,b=t.processors[o.type];if(!b)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);b(e,t,v,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 T2(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,v=e.external.uri??(E=>E);if(y)return{ref:v(y)};const b=l[1].defId??l[1].schema.id??`schema${e.counter++}`;return l[1].defId=b,{defId:b,ref:`${v("__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 C2(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 v=e.seen.get(p),b=v.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 T in d)T==="$ref"||T==="allOf"||T in h||delete d[T];if(b.$ref&&v.def)for(const T in d)T==="$ref"||T==="allOf"||T in v.def&&JSON.stringify(d[T])===JSON.stringify(v.def[T])&&delete d[T]}const y=l._zod.parent;if(y&&y!==p){i(y);const v=e.seen.get(y);if(v?.schema.$ref&&(d.$ref=v.schema.$ref,v.def))for(const b in d)b==="$ref"||b==="allOf"||b in v.def&&JSON.stringify(d[b])===JSON.stringify(v.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:Ic(t,"input",e.processors),output:Ic(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 KB=(e,t={})=>n=>{const i=E2({...n,processors:t});return Wt(e,i),T2(i,e),C2(i,e)},Ic=(e,t,n={})=>i=>{const{libraryOptions:o,target:u}=i??{},l=E2({...o??{},target:u,io:t,processors:n});return Wt(e,l),T2(l,e),C2(l,e)},JB={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},QB=(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=JB[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}))])}},WB=(e,t,n,i)=>{n.not={}},eI=(e,t,n,i)=>{},tI=(e,t,n,i)=>{const o=e._zod.def,u=c2(o.entries);u.every(l=>typeof l=="number")&&(n.type="number"),u.every(l=>typeof l=="string")&&(n.type="string"),n.enum=u},nI=(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},rI=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},iI=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},aI=(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"]})},oI=(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)},sI=(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},lI=(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},uI=(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"}]},cI=(e,t,n,i)=>{const o=e._zod.def;Wt(o.innerType,t,i);const u=t.seen.get(e);u.ref=o.innerType},fI=(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))},dI=(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)))},hI=(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},mI=(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},pI=(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},A2=(e,t,n,i)=>{const o=e._zod.def;Wt(o.innerType,t,i);const u=t.seen.get(e);u.ref=o.innerType},gI=te("ZodISODateTime",(e,t)=>{EZ.init(e,t),kt.init(e,t)});function yI(e){return AB(gI,e)}const xI=te("ZodISODate",(e,t)=>{TZ.init(e,t),kt.init(e,t)});function vI(e){return jB(xI,e)}const bI=te("ZodISOTime",(e,t)=>{CZ.init(e,t),kt.init(e,t)});function SI(e){return NB(bI,e)}const kI=te("ZodISODuration",(e,t)=>{AZ.init(e,t),kt.init(e,t)});function wI(e){return OB(kI,e)}const j2=(e,t)=>{p2.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>w8(e,n)},flatten:{value:n=>k8(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,bp,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,bp,2)}},isEmpty:{get(){return e.issues.length===0}}})},zI=te("ZodError",j2),ar=te("ZodError",j2,{Parent:Error}),_I=Pg(ar),EI=Vg(ar),TI=sf(ar),CI=lf(ar),AI=E8(ar),jI=T8(ar),NI=C8(ar),OI=A8(ar),RI=j8(ar),MI=N8(ar),DI=O8(ar),$I=R8(ar),Ut=te("ZodType",(e,t)=>(Lt.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Ic(e,"input"),output:Ic(e,"output")}}),e.toJSONSchema=KB(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(Li(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)=>Ui(e,n,i),e.brand=()=>e,e.register=((n,i)=>(n.add(e,i),e)),e.parse=(n,i)=>_I(e,n,i,{callee:e.parse}),e.safeParse=(n,i)=>TI(e,n,i),e.parseAsync=async(n,i)=>EI(e,n,i,{callee:e.parseAsync}),e.safeParseAsync=async(n,i)=>CI(e,n,i),e.spa=e.safeParseAsync,e.encode=(n,i)=>AI(e,n,i),e.decode=(n,i)=>jI(e,n,i),e.encodeAsync=async(n,i)=>NI(e,n,i),e.decodeAsync=async(n,i)=>OI(e,n,i),e.safeEncode=(n,i)=>RI(e,n,i),e.safeDecode=(n,i)=>MI(e,n,i),e.safeEncodeAsync=async(n,i)=>DI(e,n,i),e.safeDecodeAsync=async(n,i)=>$I(e,n,i),e.refine=(n,i)=>e.check(A7(n,i)),e.superRefine=n=>e.check(j7(n)),e.overwrite=n=>e.check(Ko(n)),e.optional=()=>lk(e),e.exactOptional=()=>g7(e),e.nullable=()=>uk(e),e.nullish=()=>lk(uk(e)),e.nonoptional=n=>k7(e,n),e.array=()=>a7(e),e.or=n=>O2([e,n]),e.and=n=>c7(e,n),e.transform=n=>ck(e,m7(n)),e.default=n=>v7(e,n),e.prefault=n=>S7(e,n),e.catch=n=>z7(e,n),e.pipe=n=>ck(e,n),e.readonly=()=>T7(e),e.describe=n=>{const i=e.clone();return nl.add(i,{description:n}),i},Object.defineProperty(e,"description",{get(){return nl.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return nl.get(e);const i=e.clone();return nl.add(i,n[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),N2=te("_ZodString",(e,t)=>{Zg.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(i,o,u)=>QB(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(DB(...i)),e.includes=(...i)=>e.check(UB(...i)),e.startsWith=(...i)=>e.check(PB(...i)),e.endsWith=(...i)=>e.check(VB(...i)),e.min=(...i)=>e.check(Bc(...i)),e.max=(...i)=>e.check(z2(...i)),e.length=(...i)=>e.check(_2(...i)),e.nonempty=(...i)=>e.check(Bc(1,...i)),e.lowercase=i=>e.check($B(i)),e.uppercase=i=>e.check(LB(i)),e.trim=()=>e.check(BB()),e.normalize=(...i)=>e.check(ZB(...i)),e.toLowerCase=()=>e.check(IB()),e.toUpperCase=()=>e.check(HB()),e.slugify=()=>e.check(FB())}),LI=te("ZodString",(e,t)=>{Zg.init(e,t),N2.init(e,t),e.email=n=>e.check(lB(UI,n)),e.url=n=>e.check(hB(PI,n)),e.jwt=n=>e.check(CB(e7,n)),e.emoji=n=>e.check(mB(VI,n)),e.guid=n=>e.check(ik(ak,n)),e.uuid=n=>e.check(uB(mc,n)),e.uuidv4=n=>e.check(cB(mc,n)),e.uuidv6=n=>e.check(fB(mc,n)),e.uuidv7=n=>e.check(dB(mc,n)),e.nanoid=n=>e.check(pB(ZI,n)),e.guid=n=>e.check(ik(ak,n)),e.cuid=n=>e.check(gB(BI,n)),e.cuid2=n=>e.check(yB(II,n)),e.ulid=n=>e.check(xB(HI,n)),e.base64=n=>e.check(_B(JI,n)),e.base64url=n=>e.check(EB(QI,n)),e.xid=n=>e.check(vB(FI,n)),e.ksuid=n=>e.check(bB(qI,n)),e.ipv4=n=>e.check(SB(GI,n)),e.ipv6=n=>e.check(kB(YI,n)),e.cidrv4=n=>e.check(wB(XI,n)),e.cidrv6=n=>e.check(zB(KI,n)),e.e164=n=>e.check(TB(WI,n)),e.datetime=n=>e.check(yI(n)),e.date=n=>e.check(vI(n)),e.time=n=>e.check(SI(n)),e.duration=n=>e.check(wI(n))});function xm(e){return sB(LI,e)}const kt=te("ZodStringFormat",(e,t)=>{yt.init(e,t),N2.init(e,t)}),UI=te("ZodEmail",(e,t)=>{yZ.init(e,t),kt.init(e,t)}),ak=te("ZodGUID",(e,t)=>{pZ.init(e,t),kt.init(e,t)}),mc=te("ZodUUID",(e,t)=>{gZ.init(e,t),kt.init(e,t)}),PI=te("ZodURL",(e,t)=>{xZ.init(e,t),kt.init(e,t)}),VI=te("ZodEmoji",(e,t)=>{vZ.init(e,t),kt.init(e,t)}),ZI=te("ZodNanoID",(e,t)=>{bZ.init(e,t),kt.init(e,t)}),BI=te("ZodCUID",(e,t)=>{SZ.init(e,t),kt.init(e,t)}),II=te("ZodCUID2",(e,t)=>{kZ.init(e,t),kt.init(e,t)}),HI=te("ZodULID",(e,t)=>{wZ.init(e,t),kt.init(e,t)}),FI=te("ZodXID",(e,t)=>{zZ.init(e,t),kt.init(e,t)}),qI=te("ZodKSUID",(e,t)=>{_Z.init(e,t),kt.init(e,t)}),GI=te("ZodIPv4",(e,t)=>{jZ.init(e,t),kt.init(e,t)}),YI=te("ZodIPv6",(e,t)=>{NZ.init(e,t),kt.init(e,t)}),XI=te("ZodCIDRv4",(e,t)=>{OZ.init(e,t),kt.init(e,t)}),KI=te("ZodCIDRv6",(e,t)=>{RZ.init(e,t),kt.init(e,t)}),JI=te("ZodBase64",(e,t)=>{MZ.init(e,t),kt.init(e,t)}),QI=te("ZodBase64URL",(e,t)=>{$Z.init(e,t),kt.init(e,t)}),WI=te("ZodE164",(e,t)=>{LZ.init(e,t),kt.init(e,t)}),e7=te("ZodJWT",(e,t)=>{PZ.init(e,t),kt.init(e,t)}),t7=te("ZodUnknown",(e,t)=>{VZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>eI()});function ok(){return RB(t7)}const n7=te("ZodNever",(e,t)=>{ZZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>WB(e,n,i)});function r7(e){return MB(n7,e)}const i7=te("ZodArray",(e,t)=>{BZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>aI(e,n,i,o),e.element=t.element,e.min=(n,i)=>e.check(Bc(n,i)),e.nonempty=n=>e.check(Bc(1,n)),e.max=(n,i)=>e.check(z2(n,i)),e.length=(n,i)=>e.check(_2(n,i)),e.unwrap=()=>e.element});function a7(e,t){return qB(i7,e,t)}const o7=te("ZodObject",(e,t)=>{HZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>oI(e,n,i,o),Ke(e,"shape",()=>t.shape),e.keyof=()=>f7(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:ok()}),e.loose=()=>e.clone({...e._zod.def,catchall:ok()}),e.strict=()=>e.clone({...e._zod.def,catchall:r7()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>y8(e,n),e.safeExtend=n=>x8(e,n),e.merge=n=>v8(e,n),e.pick=n=>p8(e,n),e.omit=n=>g8(e,n),e.partial=(...n)=>b8(R2,e,n[0]),e.required=(...n)=>S8(M2,e,n[0])});function s7(e,t){const n={type:"object",shape:e??{},...Ee(t)};return new o7(n)}const l7=te("ZodUnion",(e,t)=>{FZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>sI(e,n,i,o),e.options=t.options});function O2(e,t){return new l7({type:"union",options:e,...Ee(t)})}const u7=te("ZodIntersection",(e,t)=>{qZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>lI(e,n,i,o)});function c7(e,t){return new u7({type:"intersection",left:e,right:t})}const kp=te("ZodEnum",(e,t)=>{GZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(i,o,u)=>tI(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 kp({...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 kp({...t,checks:[],...Ee(o),entries:u})}});function f7(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new kp({type:"enum",entries:n,...Ee(t)})}const d7=te("ZodLiteral",(e,t)=>{YZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>nI(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 sk(e,t){return new d7({type:"literal",values:Array.isArray(e)?e:[e],...Ee(t)})}const h7=te("ZodTransform",(e,t)=>{XZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>iI(e,n),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new l2(e.constructor.name);n.addIssue=u=>{if(typeof u=="string")n.issues.push(wl(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(wl(l))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(u=>(n.value=u,n)):(n.value=o,n)}});function m7(e){return new h7({type:"transform",transform:e})}const R2=te("ZodOptional",(e,t)=>{w2.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>A2(e,n,i,o),e.unwrap=()=>e._zod.def.innerType});function lk(e){return new R2({type:"optional",innerType:e})}const p7=te("ZodExactOptional",(e,t)=>{KZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>A2(e,n,i,o),e.unwrap=()=>e._zod.def.innerType});function g7(e){return new p7({type:"optional",innerType:e})}const y7=te("ZodNullable",(e,t)=>{JZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>uI(e,n,i,o),e.unwrap=()=>e._zod.def.innerType});function uk(e){return new y7({type:"nullable",innerType:e})}const x7=te("ZodDefault",(e,t)=>{QZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>fI(e,n,i,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function v7(e,t){return new x7({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():d2(t)}})}const b7=te("ZodPrefault",(e,t)=>{WZ.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>dI(e,n,i,o),e.unwrap=()=>e._zod.def.innerType});function S7(e,t){return new b7({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():d2(t)}})}const M2=te("ZodNonOptional",(e,t)=>{eB.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>cI(e,n,i,o),e.unwrap=()=>e._zod.def.innerType});function k7(e,t){return new M2({type:"nonoptional",innerType:e,...Ee(t)})}const w7=te("ZodCatch",(e,t)=>{tB.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>hI(e,n,i,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function z7(e,t){return new w7({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const _7=te("ZodPipe",(e,t)=>{nB.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>mI(e,n,i,o),e.in=t.in,e.out=t.out});function ck(e,t){return new _7({type:"pipe",in:e,out:t})}const E7=te("ZodReadonly",(e,t)=>{rB.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>pI(e,n,i,o),e.unwrap=()=>e._zod.def.innerType});function T7(e){return new E7({type:"readonly",innerType:e})}const C7=te("ZodCustom",(e,t)=>{iB.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(n,i,o)=>rI(e,n)});function A7(e,t={}){return GB(C7,e,t)}function j7(e){return YB(e)}const N7=[{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 O7(){const{data:e,error:t}=Ci("/api/config",lc.fetchConfig),{data:n}=Ci("/api/config/sati",lc.getSatiConfig),[i,o]=_.useState(null),[u,l]=_.useState(null),[f,d]=_.useState("general"),[h,p]=_.useState(!1),[y,v]=_.useState({}),[b,E]=_.useState(null);_.useEffect(()=>{e&&!i&&o(e)},[e]),_.useEffect(()=>{n&&!u&&l(n)},[n]);const T=JSON.stringify(e)!==JSON.stringify(i)||JSON.stringify(n)!==JSON.stringify(u),C=(R,L)=>{if(!i)return;const $=JSON.parse(JSON.stringify(i));let G=$;for(let V=0;V<R.length-1;V++)G=G[R[V]];G[R[R.length-1]]=L,o($);try{u8.parse($),v({})}catch(V){if(V instanceof zI){const K={};V.errors.forEach(ue=>{const re=ue.path.join(".");K[re]=ue.message}),v(K)}}},j=(R,L)=>{u&&l({...u,[R]:L})},O=()=>{!i||!u||l({...u,provider:i.llm.provider,model:i.llm.model,api_key:i.llm.api_key})},z=async()=>{if(i){p(!0),E(null);try{await lc.updateConfig(i),u&&await lc.updateSatiConfig(u),Dm("/api/config"),Dm("/api/config/sati"),E({type:"success",message:"Settings saved successfully. Restart Morpheus daemon for changes to take effect."})}catch(R){if(E({type:"error",message:R.message}),R.details&&Array.isArray(R.details)){const L={};R.details.forEach($=>{const G=$.path.join(".");L[G]=$.message}),v(L)}}finally{p(!1)}}};return t?x.jsx("div",{className:"p-8 text-red-500",children:"Failed to load configuration"}):i?x.jsxs("div",{className:"max-w-4xl mx-auto p-0 md:p-6 space-y-6",children:[x.jsxs("div",{className:"flex justify-between items-center",children:[x.jsx("h1",{className:"text-2xl font-bold text-azure-primary dark:text-matrix-highlight",children:"Zaion Settings"}),x.jsx("button",{onClick:z,disabled:!T||Object.keys(y).length>0||h,className:`px-4 py-2 rounded font-medium transition-colors ${T&&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&&x.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}),x.jsx("div",{className:"overflow-x-auto py-1 hide-scrollbar",children:x.jsx("div",{className:"flex space-x-1 border-b border-azure-border dark:border-matrix-primary pb-px min-w-max",children:N7.map(R=>x.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))})}),x.jsxs("div",{className:"space-y-6",children:[f==="general"&&x.jsxs(oa,{title:"Agent Identity",children:[x.jsx(kn,{label:"Agent Name",value:i.agent.name,onChange:R=>C(["agent","name"],R.target.value),error:y["agent.name"]}),x.jsx(kn,{label:"Personality",value:i.agent.personality,onChange:R=>C(["agent","personality"],R.target.value),error:y["agent.personality"]})]}),f==="llm"&&x.jsxs(x.Fragment,{children:[x.jsxs(oa,{title:"Oracle Agent",children:[x.jsx(sc,{label:"Provider",value:i.llm.provider,onChange:R=>C(["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"]}),x.jsx(kn,{label:"Model Name",value:i.llm.model,onChange:R=>C(["llm","model"],R.target.value),error:y["llm.model"]}),x.jsx(fo,{label:"Temperature",value:i.llm.temperature,onChange:R=>C(["llm","temperature"],parseFloat(R.target.value)),step:.1,min:0,max:1,error:y["llm.temperature"]}),x.jsx(fo,{label:"Max Tokens",value:i.llm.max_tokens??"",onChange:R=>C(["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."}),x.jsx(fo,{label:"Context Window (Messages)",value:i.llm.context_window??100,onChange:R=>C(["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)."}),x.jsx(kn,{label:"API Key",type:"password",value:i.llm.api_key||"",onChange:R=>C(["llm","api_key"],R.target.value),placeholder:"sk-...",helperText:"Stored locally."}),i.llm.provider==="openrouter"&&x.jsx(kn,{label:"Base URL",value:i.llm.base_url||"https://openrouter.ai/api/v1",onChange:R=>C(["llm","base_url"],R.target.value),placeholder:"https://openrouter.ai/api/v1",helperText:"Base URL for OpenRouter API"})]}),x.jsxs(oa,{title:"Sati Agent",children:[x.jsx("p",{className:"text-sm text-azure-text-secondary dark:text-matrix-secondary mb-4",children:"Configure the LLM used for memory consolidation"}),x.jsxs("div",{className:"mb-4",children:[x.jsx("button",{type:"button",onClick:O,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"}),x.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&&x.jsxs(x.Fragment,{children:[x.jsx(sc,{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"}]}),x.jsx(kn,{label:"Model Name",value:u.model,onChange:R=>j("model",R.target.value)}),x.jsx(kn,{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"&&x.jsx(kn,{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"}),x.jsx(fo,{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."}),x.jsx(Qs,{label:"Enable Archived Sessions in Memory Retrieval",checked:u.enabled_archived_sessions??!0,onChange:R=>j("enabled_archived_sessions",R)})]})]})]}),f==="audio"&&x.jsxs(oa,{title:"Audio Transcription",children:[x.jsx(Qs,{label:"Enable Audio",checked:i.audio.enabled,onChange:R=>C(["audio","enabled"],R)}),x.jsx(sc,{label:"Provider",value:i.audio.provider||"google",onChange:R=>C(["audio","provider"],R.target.value),options:[{label:"Google Gemini",value:"google"},{label:"OpenAI (Whisper)",value:"openai"},{label:"OpenRouter (multimodal)",value:"openrouter"},{label:"Ollama (Whisper local)",value:"ollama"}],error:y["audio.provider"]}),x.jsx(kn,{label:"Model",value:i.audio.model,onChange:R=>C(["audio","model"],R.target.value),placeholder:"e.g. whisper-1, gemini-2.5-flash-lite...",helperText:"Model to use for audio transcription.",error:y["audio.model"]}),i.audio.provider==="ollama"&&x.jsx(kn,{label:"Base URL",value:i.audio.base_url||"",onChange:R=>C(["audio","base_url"],R.target.value),placeholder:"http://localhost:11434",helperText:"Ollama base URL. Requires a Whisper model loaded (ollama pull whisper)."}),x.jsx(kn,{label:"API Key",type:"password",value:i.audio.apiKey||"",onChange:R=>C(["audio","apiKey"],R.target.value),placeholder:"If different from LLM key...",helperText:"Leave empty to use LLM API key if using the same provider."}),x.jsx(fo,{label:"Max Duration (Seconds)",value:i.audio.maxDurationSeconds,onChange:R=>C(["audio","maxDurationSeconds"],parseInt(R.target.value)),min:1}),x.jsx(kn,{label:"Supported Mime Types",value:i.audio.supportedMimeTypes.join(", "),onChange:R=>C(["audio","supportedMimeTypes"],R.target.value.split(",").map(L=>L.trim()).filter(Boolean)),helperText:"Comma separated list (e.g. audio/ogg, audio/mp3)"})]}),f==="channels"&&x.jsxs(oa,{title:"Telegram",children:[x.jsx(Qs,{label:"Enable Telegram",checked:i.channels.telegram.enabled,onChange:R=>C(["channels","telegram","enabled"],R)}),i.channels.telegram.enabled&&x.jsxs("div",{className:"space-y-4 mt-4 pl-4 border-l border-matrix-primary",children:[x.jsx(kn,{label:"Bot Token",type:"password",value:i.channels.telegram.token||"",onChange:R=>C(["channels","telegram","token"],R.target.value)}),x.jsx(kn,{label:"Allowed Users (comma separated)",value:i.channels.telegram.allowedUsers.join(", "),onChange:R=>C(["channels","telegram","allowedUsers"],R.target.value.split(",").map(L=>L.trim()).filter(Boolean)),helperText:"User IDs allowed to interact with the bot"})]})]}),f==="ui"&&x.jsxs(oa,{title:"Dashboard",children:[x.jsx(Qs,{label:"Enable Web UI",checked:i.ui.enabled,onChange:R=>C(["ui","enabled"],R)}),x.jsx(fo,{label:"Port",value:i.ui.port,onChange:R=>C(["ui","port"],parseInt(R.target.value)),disabled:!0,helperText:"Requires restart to change."})]}),f==="logging"&&x.jsxs(oa,{title:"Logging",children:[x.jsx(Qs,{label:"Enable Logging",checked:i.logging.enabled,onChange:R=>C(["logging","enabled"],R)}),x.jsx(sc,{label:"Log Level",value:i.logging.level,onChange:R=>C(["logging","level"],R.target.value),options:[{label:"Debug",value:"debug"},{label:"Info",value:"info"},{label:"Warning",value:"warn"},{label:"Error",value:"error"}]})]})]})]}):x.jsx("div",{className:"p-8 text-azure-primary dark:text-matrix-highlight",children:"Loading settings..."})}function R7(){const{data:e}=SN(),[t,n]=_.useState(null),{data:i,mutate:o}=kN(t);return _.useEffect(()=>{!t&&e&&e.length>0&&n(e[0].name)},[e,t]),x.jsxs(fn.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:[x.jsxs("div",{children:[x.jsx("h2",{className:"text-2xl font-bold text-azure-primary dark:text-matrix-highlight",children:"SYSTEM LOGS"}),x.jsx("p",{className:"text-azure-text-secondary dark:text-matrix-secondary opacity-80",children:"View runtime logs."})]}),x.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:[x.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:[x.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=>x.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:[x.jsx(uj,{className:"w-4 h-4 shrink-0"}),x.jsxs("div",{className:"flex flex-col overflow-hidden",children:[x.jsx("span",{className:"truncate font-bold",children:u.name}),x.jsxs("span",{className:"text-xs opacity-70",children:[(u.size/1024).toFixed(1)," KB"]})]})]},u.name))]}),x.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:[x.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:[x.jsx("span",{className:"text-azure-text-primary dark:text-matrix-highlight font-bold font-mono text-sm",children:t}),x.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:x.jsx(Ej,{className:"w-4 h-4"})})]}),x.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 M7(){const[e,t]=_.useState(null),[n,i]=_.useState([]),[o,u]=_.useState(!0),[l,f]=_.useState("");if(_.useEffect(()=>{async function p(){try{const[y,v]=await Promise.all([ap.fetchUsageStats(),ap.fetchGroupedUsageStats()]);t(y),i(v)}catch(y){f("Failed to load usage statistics"),console.error(y)}finally{u(!1)}}p()},[]),o)return x.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 x.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 x.jsxs(fn.div,{variants:d,initial:"hidden",animate:"show",className:"space-y-6",children:[x.jsx("div",{className:"flex items-center justify-between border-b border-azure-border dark:border-matrix-primary pb-4",children:x.jsxs("div",{children:[x.jsxs("h2",{className:"text-2xl font-bold text-azure-primary dark:text-matrix-highlight font-mono flex items-center gap-2",children:[x.jsx(Em,{className:"w-6 h-6"}),"USAGE_ANALYTICS"]}),x.jsx("p",{className:"text-azure-text-muted dark:text-matrix-secondary mt-1 font-mono text-sm",children:"Resource consumption tracking and metrics"})]})}),x.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[x.jsxs(fn.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:[x.jsxs("div",{className:"flex items-center gap-3 mb-2 text-azure-text-muted dark:text-matrix-secondary",children:[x.jsx(fl,{className:"w-5 h-5"}),x.jsx("h3",{className:"font-mono text-sm font-bold uppercase",children:"Total Input Tokens"})]}),x.jsx("p",{className:"text-3xl font-bold text-azure-primary dark:text-matrix-highlight font-mono",children:e?.totalInputTokens.toLocaleString()??0})]}),x.jsxs(fn.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:[x.jsxs("div",{className:"flex items-center gap-3 mb-2 text-azure-text-muted dark:text-matrix-secondary",children:[x.jsx(aj,{className:"w-5 h-5"}),x.jsx("h3",{className:"font-mono text-sm font-bold uppercase",children:"Total Output Tokens"})]}),x.jsx("p",{className:"text-3xl font-bold text-azure-primary dark:text-matrix-highlight font-mono",children:e?.totalOutputTokens.toLocaleString()??0})]}),x.jsxs(fn.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:[x.jsxs("div",{className:"flex items-center gap-3 mb-2 text-azure-text-muted dark:text-matrix-secondary",children:[x.jsx(_c,{className:"w-5 h-5"}),x.jsx("h3",{className:"font-mono text-sm font-bold uppercase",children:"Est. Total Cost"})]}),x.jsx("p",{className:"text-3xl font-bold text-green-600 dark:text-green-400 font-mono",children:e?.totalEstimatedCostUsd!=null?`$${e.totalEstimatedCostUsd.toFixed(4)}`:"—"})]})]}),x.jsxs(fn.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:[x.jsx("div",{className:"p-4 border-b border-azure-border dark:border-matrix-primary bg-azure-bg dark:bg-zinc-900/50",children:x.jsx("h3",{className:"text-lg font-bold text-azure-text-primary dark:text-matrix-highlight font-mono uppercase",children:"Usage Breakdown by Model"})}),x.jsx("div",{className:"overflow-x-auto",children:x.jsxs("table",{className:"w-full text-left font-mono text-sm",children:[x.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:x.jsxs("tr",{children:[x.jsx("th",{className:"p-4",children:"Provider"}),x.jsx("th",{className:"p-4",children:"Model"}),x.jsx("th",{className:"p-4 text-right",children:"Messages"}),x.jsx("th",{className:"p-4 text-right",children:"Input Tokens"}),x.jsx("th",{className:"p-4 text-right",children:"Output Tokens"}),x.jsx("th",{className:"p-4 text-right",children:"Total Tokens"}),x.jsx("th",{className:"p-4 text-right",children:"Audio (s)"}),x.jsx("th",{className:"p-4 text-right",children:"Est. Cost (USD)"})]})}),x.jsx("tbody",{className:"divide-y divide-azure-border dark:divide-matrix-primary/30",children:n.length===0?x.jsx("tr",{children:x.jsx("td",{colSpan:8,className:"p-8 text-center text-azure-text-muted dark:text-matrix-secondary italic",children:"NO_DATA_AVAILABLE"})}):n.map((p,y)=>x.jsxs("tr",{className:"hover:bg-azure-hover dark:hover:bg-matrix-primary/10 transition-colors",children:[x.jsx("td",{className:"p-4 font-bold text-azure-text-primary dark:text-matrix-highlight",children:p.provider}),x.jsx("td",{className:"p-4 text-azure-text-secondary dark:text-matrix-secondary",children:p.model}),x.jsx("td",{className:"p-4 text-right text-azure-text-primary dark:text-gray-300",children:p.messageCount.toLocaleString()}),x.jsx("td",{className:"p-4 text-right text-azure-text-primary dark:text-gray-300",children:p.totalInputTokens.toLocaleString()}),x.jsx("td",{className:"p-4 text-right text-azure-text-primary dark:text-gray-300",children:p.totalOutputTokens.toLocaleString()}),x.jsx("td",{className:"p-4 text-right font-bold text-azure-text-primary dark:text-matrix-highlight",children:p.totalTokens.toLocaleString()}),x.jsx("td",{className:"p-4 text-right text-azure-text-primary dark:text-gray-300",children:p.totalAudioSeconds>0?p.totalAudioSeconds.toLocaleString():"—"}),x.jsx("td",{className:"p-4 text-right font-bold text-green-600 dark:text-green-400",children:p.estimatedCostUsd!=null?`$${p.estimatedCostUsd.toFixed(4)}`:"—"})]},`${p.provider}-${p.model}-${y}`))})]})})]})]})}const D7=()=>{const[e,t]=_.useState(""),[n,i]=_.useState(""),o=Cp(),u=hr(),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 x.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:x.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:[x.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"}),x.jsxs("form",{onSubmit:l,className:"space-y-6",children:[x.jsxs("div",{children:[x.jsx("label",{className:"block text-sm mb-2 opacity-70 text-azure-text-secondary dark:text-green-500",children:"ACCESS_PASS:"}),x.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&&x.jsxs("div",{className:"text-red-500 text-sm animate-pulse",children:["[!] ERROR: ",n]}),x.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"})]}),x.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."})]})})},$7=({children:e})=>{const{isAuthenticated:t}=Mz(),n=hr();return t?x.jsx(x.Fragment,{children:e}):x.jsx(Ak,{to:"/login",state:{from:n},replace:!0})},L7=({className:e,...t})=>x.jsx("div",{className:"relative w-full overflow-auto",children:x.jsx("table",{className:`w-full caption-bottom text-sm ${e}`,...t})}),U7=({...e})=>x.jsx("thead",{...e}),P7=({...e})=>x.jsx("tbody",{...e}),vm=({...e})=>x.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}),ho=({className:e,...t})=>x.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}),la=({className:e,...t})=>x.jsx("td",{className:`p-4 align-middle [&:has([role=checkbox])]:pr-0 ${e}`,...t}),fk=({checked:e,onCheckedChange:t,className:n,...i})=>{const o=u=>{t&&t(u.target.checked),i.onChange&&i.onChange(u)};return x.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})},Hc=({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 x.jsx("div",{className:o,...n})},bm=({className:e,...t})=>x.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}),dk=({className:e,...t})=>x.jsx("div",{className:`flex flex-col space-y-1.5 p-6 ${e||""}`,...t}),V7=({className:e,...t})=>x.jsx("h3",{className:`text-2xl font-semibold leading-none tracking-tight ${e||""}`,...t}),Sm=({className:e,...t})=>x.jsx("div",{className:`p-6 pt-0 ${e||""}`,...t}),Z7=({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 x.jsx("div",{className:o,...n})},B7=({className:e,...t})=>x.jsx("div",{className:`text-sm [&_p]:leading-relaxed ${e||""}`,...t}),D2=({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 x.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[x.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm",onClick:t}),x.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&&x.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-azure-border dark:border-matrix-primary",children:[n&&x.jsx("h3",{className:"text-lg font-semibold text-azure-text-primary dark:text-matrix-secondary",children:n}),t&&x.jsx("button",{onClick:t,className:"text-azure-text-secondary dark:text-matrix-tertiary hover:text-azure-text-primary dark:hover:text-matrix-secondary",children:x.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:x.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})})]}),x.jsx("div",{className:"overflow-y-auto flex-grow p-6",children:i})]})]})},I7=({isOpen:e,onClose:t,memory:n})=>n?x.jsx(D2,{isOpen:e,onClose:t,title:"Memory Details",size:"lg",children:x.jsxs("div",{className:"space-y-6",children:[x.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(Dj,{className:"w-4 h-4 text-azure-text-secondary dark:text-matrix-tertiary"}),x.jsx("span",{className:"text-azure-text-secondary dark:text-matrix-tertiary text-sm",children:"Category"})]}),x.jsx("div",{children:x.jsx(Hc,{variant:"outline",children:n.category})}),x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(Pj,{className:"w-4 h-4 text-azure-text-secondary dark:text-matrix-tertiary"}),x.jsx("span",{className:"text-azure-text-secondary dark:text-matrix-tertiary text-sm",children:"Importance"})]}),x.jsx("div",{children:x.jsx(Hc,{variant:n.importance==="critical"?"destructive":n.importance==="high"?"default":n.importance==="medium"?"secondary":"outline",children:n.importance})}),x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(Dk,{className:"w-4 h-4 text-azure-text-secondary dark:text-matrix-tertiary"}),x.jsx("span",{className:"text-azure-text-secondary dark:text-matrix-tertiary text-sm",children:"Created"})]}),x.jsx("div",{className:"text-azure-text-primary dark:text-matrix-secondary",children:new Date(n.created_at).toLocaleString()}),x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx($k,{className:"w-4 h-4 text-azure-text-secondary dark:text-matrix-tertiary"}),x.jsx("span",{className:"text-azure-text-secondary dark:text-matrix-tertiary text-sm",children:"Updated"})]}),x.jsx("div",{className:"text-azure-text-primary dark:text-matrix-secondary",children:new Date(n.updated_at).toLocaleString()}),x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(Uk,{className:"w-4 h-4 text-azure-text-secondary dark:text-matrix-tertiary"}),x.jsx("span",{className:"text-azure-text-secondary dark:text-matrix-tertiary text-sm",children:"Access Count"})]}),x.jsx("div",{className:"text-azure-text-primary dark:text-matrix-secondary",children:n.access_count}),x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(fj,{className:"w-4 h-4 text-azure-text-secondary dark:text-matrix-tertiary"}),x.jsx("span",{className:"text-azure-text-secondary dark:text-matrix-tertiary text-sm",children:"Hash"})]}),x.jsx("div",{className:"text-azure-text-primary dark:text-matrix-secondary break-all text-sm",children:n.hash}),n.source&&x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(hj,{className:"w-4 h-4 text-azure-text-secondary dark:text-matrix-tertiary"}),x.jsx("span",{className:"text-azure-text-secondary dark:text-matrix-tertiary text-sm",children:"Source"})]}),x.jsx("div",{className:"text-azure-text-primary dark:text-matrix-secondary",children:n.source})]})]}),x.jsxs("div",{children:[x.jsx("h4",{className:"text-azure-text-secondary dark:text-matrix-tertiary text-sm mb-2",children:"Summary"}),x.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&&x.jsxs("div",{children:[x.jsx("h4",{className:"text-azure-text-secondary dark:text-matrix-tertiary text-sm mb-2",children:"Details"}),x.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})]}),x.jsx("div",{className:"flex justify-end pt-4",children:x.jsx(tr,{onClick:t,children:"Close"})})]})}):null,H7=({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"})=>x.jsx(D2,{isOpen:e,onClose:t,title:i,size:"md",children:x.jsxs("div",{className:"space-y-6",children:[x.jsx("p",{className:"text-azure-text-primary dark:text-matrix-secondary",children:o}),x.jsxs("div",{className:"flex justify-end gap-2",children:[x.jsx(tr,{variant:"outline",onClick:t,children:l}),x.jsx(tr,{variant:"destructive",onClick:()=>{n(),t()},children:u})]})]})}),F7=()=>{const[e,t]=_.useState(!1),[n,i]=_.useState(null),o=_.useCallback(d=>(t(!0),i(null),mt.get(d).then(h=>h).catch(h=>{throw i(h.message||"An error occurred"),h}).finally(()=>{t(!1)})),[]),u=_.useCallback((d,h)=>(t(!0),i(null),mt.post(d,h).then(p=>p).catch(p=>{throw i(p.message||"An error occurred"),p}).finally(()=>{t(!1)})),[]),l=_.useCallback((d,h)=>(t(!0),i(null),mt.post(d,h).then(p=>p).catch(p=>{throw i(p.message||"An error occurred"),p}).finally(()=>{t(!1)})),[]),f=_.useCallback(d=>(t(!0),i(null),mt.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}},q7=()=>{const[e,t]=_.useState([]),[n,i]=_.useState(!0),[o,u]=_.useState([]),[l,f]=_.useState(""),[d,h]=_.useState("all"),[p,y]=_.useState("all"),[v,b]=_.useState(null),[E,T]=_.useState(!1),[C,j]=_.useState(null),[O,z]=_.useState(!1),[R,L]=_.useState(null),[$,G]=_.useState(!1),{get:V,del:K,post:ue}=F7();_.useEffect(()=>{re()},[]);const re=async()=>{try{i(!0);const A=await V("/sati/memories");t(A),b(null)}catch(A){b("Failed to load memories. Please try again."),console.error("Error fetching memories:",A)}finally{i(!1)}},oe=()=>{o.length===Z.length?u([]):u(Z.map(A=>A.id))},ke=A=>{o.includes(A)?u(o.filter(q=>q!==A)):u([...o,A])},le=async()=>{if(o.length!==0)try{await ue("/sati/memories/bulk-delete",{ids:o}),await re(),u([]),T(!1)}catch(A){b("Failed to delete memories. Please try again."),console.error("Error deleting memories:",A)}},ne=A=>{L(A),G(!0)},P=async()=>{if(R)try{await K(`/sati/memories/${R}`),await re()}catch(A){b("Failed to delete memory. Please try again."),console.error("Error deleting memory:",A)}finally{L(null),G(!1)}},Y=A=>{j(A),z(!0)},Z=e.filter(A=>{const q=A.summary.toLowerCase().includes(l.toLowerCase())||A.details?.toLowerCase().includes(l.toLowerCase())||A.category.toLowerCase().includes(l.toLowerCase()),w=d==="all"||A.category===d,ie=p==="all"||A.importance===p;return q&&w&&ie&&!A.archived}),ce=Array.from(new Set(e.map(A=>A.category))),N=Array.from(new Set(e.map(A=>A.importance)));return n?x.jsx(bm,{className:"w-full",children:x.jsx(Sm,{className:"flex justify-center items-center h-64",children:x.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-azure-primary dark:border-matrix-highlight"})})}):x.jsxs("div",{className:"space-y-6",children:[x.jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4",children:[x.jsxs("div",{children:[x.jsx("h1",{className:"text-2xl font-bold text-azure-primary dark:text-matrix-highlight",children:"Sati Memories"}),x.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&&x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsxs("span",{className:"text-sm text-azure-text-muted dark:text-matrix-secondary",children:[o.length," selected"]}),x.jsxs(tr,{variant:"destructive",size:"sm",onClick:()=>T(!0),disabled:o.length===0,children:[x.jsx(Ec,{className:"w-4 h-4 mr-1"}),"Delete Selected"]})]})]}),v&&x.jsx(Z7,{variant:"destructive",children:x.jsx(B7,{children:v})}),x.jsxs(bm,{children:[x.jsx(dk,{className:"border-b border-azure-border dark:border-matrix-primary",children:x.jsxs("div",{className:"flex flex-col lg:flex-row gap-4",children:[x.jsxs("div",{className:"flex flex-col relative w-full",children:[x.jsx(Aj,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-azure-text-secondary dark:text-matrix-secondary w-4 h-4"}),x.jsx("input",{type:"text",placeholder:"Search memories...",value:l,onChange:A=>f(A.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"})]}),x.jsxs("div",{className:"flex flex-col sm:flex-row gap-2 w-full",children:[x.jsxs("select",{value:d,onChange:A=>h(A.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:[x.jsx("option",{value:"all",children:"All Categories"}),ce.map(A=>x.jsx("option",{value:A,children:A},A))]}),x.jsxs("select",{value:p,onChange:A=>y(A.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:[x.jsx("option",{value:"all",children:"All Importance"}),N.map(A=>x.jsx("option",{value:A,children:A},A))]})]})]})}),x.jsx(Sm,{className:"p-0",children:x.jsxs(L7,{children:[x.jsx(U7,{children:x.jsxs(vm,{className:"hover:bg-transparent",children:[x.jsx(ho,{className:"w-12",children:x.jsx(fk,{checked:Z.length>0&&o.length===Z.length,onCheckedChange:oe})}),x.jsx(ho,{children:"Summary"}),x.jsx(ho,{children:"Category"}),x.jsx(ho,{children:"Importance"}),x.jsx(ho,{children:"Created"}),x.jsx(ho,{className:"w-32",children:"Actions"})]})}),x.jsx(P7,{children:Z.length===0?x.jsx(vm,{children:x.jsx(la,{colSpan:6,className:"text-center py-8 text-azure-text-secondary dark:text-matrix-secondary",children:n?"Loading memories...":"No memories found"})}):Z.map(A=>x.jsxs(vm,{children:[x.jsx(la,{children:x.jsx(fk,{checked:o.includes(A.id),onCheckedChange:()=>ke(A.id)})}),x.jsx(la,{className:"font-medium max-w-xs truncate",children:A.summary}),x.jsx(la,{children:x.jsx(Hc,{variant:"outline",children:A.category})}),x.jsx(la,{children:x.jsx(Hc,{variant:A.importance==="critical"?"destructive":A.importance==="high"?"default":A.importance==="medium"?"secondary":"outline",children:A.importance})}),x.jsx(la,{children:x.jsxs("div",{className:"flex items-center gap-1 text-azure-text-secondary dark:text-matrix-secondary",children:[x.jsx(Dk,{className:"w-4 h-4"}),new Date(A.created_at).toLocaleDateString()]})}),x.jsx(la,{children:x.jsxs("div",{className:"flex gap-1",children:[x.jsx(tr,{variant:"ghost",size:"sm",onClick:()=>Y(A),className:"text-blue-500 hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300",children:x.jsx(Uk,{className:"w-4 h-4"})}),x.jsx(tr,{variant:"ghost",size:"sm",onClick:()=>ne(A.id),className:"text-red-500 hover:text-red-700 dark:text-red-400 dark:hover:text-red-300",children:x.jsx(Ec,{className:"w-4 h-4"})})]})})]},A.id))})]})})]}),E&&x.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:x.jsxs(bm,{className:"w-full max-w-md mx-4",children:[x.jsx(dk,{children:x.jsx(V7,{children:"Delete Memories"})}),x.jsxs(Sm,{children:[x.jsxs("p",{className:"mb-4",children:["Are you sure you want to delete ",o.length," ","memory(ies)? This action cannot be undone."]}),x.jsxs("div",{className:"flex justify-end gap-2",children:[x.jsx(tr,{variant:"outline",onClick:()=>T(!1),children:"Cancel"}),x.jsx(tr,{variant:"destructive",onClick:le,children:"Delete"})]})]})]})}),x.jsx(I7,{isOpen:O,onClose:()=>z(!1),memory:C}),x.jsx(H7,{isOpen:$,onClose:()=>G(!1),onConfirm:P,title:"Confirm Memory Deletion",message:"Are you sure you want to delete this memory? This action cannot be undone.",confirmButtonText:"Delete Memory",cancelButtonText:"Cancel"})]})},ua=ha.getInstance(),ca={fetchServers:async()=>ua.get("/mcp/servers"),addServer:async(e,t)=>ua.post("/mcp/servers",{name:e,config:t}),updateServer:async(e,t)=>ua.put(`/mcp/servers/${encodeURIComponent(e)}`,{config:t}),deleteServer:async e=>ua.delete(`/mcp/servers/${encodeURIComponent(e)}`),toggleServer:async(e,t)=>ua.patch(`/mcp/servers/${encodeURIComponent(e)}/toggle`,{enabled:t}),reloadTools:async()=>ua.post("/mcp/reload",{}),fetchStatus:async()=>ua.get("/mcp/status")},G7=({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 x.jsxs("div",{className:"space-y-2",children:[x.jsx("div",{className:"text-sm font-semibold text-azure-text-primary dark:text-matrix-highlight",children:e}),o.map((d,h)=>x.jsxs("div",{className:"flex gap-2",children:[x.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)}),x.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}`)),x.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"})]})},hk=({label:e,values:t,onChange:n,keyPlaceholder:i,valuePlaceholder:o})=>{const u=_.useMemo(()=>t.length>0?t:[{key:"",value:""}],[t]),l=(h,p,y)=>{const v=[...u];v[h]={...v[h],[p]:y},n(v.filter(b=>b.key.trim().length>0||b.value.trim().length>0))},f=()=>n([...u,{key:"",value:""}]),d=h=>{const p=u.filter((y,v)=>v!==h);n(p.filter(y=>y.key.trim().length>0||y.value.trim().length>0))};return x.jsxs("div",{className:"space-y-2",children:[x.jsx("div",{className:"text-sm font-semibold text-azure-text-primary dark:text-matrix-highlight",children:e}),u.map((h,p)=>x.jsxs("div",{className:"grid gap-2 md:grid-cols-5",children:[x.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)}),x.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)}),x.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}`)),x.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"})]})},Y7=({transport:e,command:t,url:n,args:i,env:o,headers:u,onCommandChange:l,onUrlChange:f,onArgsChange:d,onEnvChange:h,onHeadersChange:p})=>x.jsxs("div",{className:"space-y-4",children:[e==="stdio"&&x.jsxs(x.Fragment,{children:[x.jsxs("label",{className:"block space-y-2 text-sm text-azure-text-primary dark:text-matrix-highlight",children:["Command",x.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"})]}),x.jsx(G7,{label:"Arguments",values:i,onChange:d,placeholder:"--flag"})]}),e==="http"&&x.jsxs("label",{className:"block space-y-2 text-sm text-azure-text-primary dark:text-matrix-highlight",children:["URL",x.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"})]}),x.jsx(hk,{label:"Environment Variables",values:o,onChange:h,keyPlaceholder:"KEY",valuePlaceholder:"value"}),e==="http"&&x.jsx(hk,{label:"Headers",values:u,onChange:p,keyPlaceholder:"Header",valuePlaceholder:"value"})]}),X7=s7({name:xm().min(1,"Name is required"),transport:O2([sk("stdio"),sk("http")]),command:xm().optional(),url:xm().optional()}),pc=e=>e?Object.entries(e).map(([t,n])=>({key:t,value:n})):[],km=e=>e.reduce((t,n)=>(n.key.trim().length===0||(t[n.key]=n.value),t),{}),K7=({open:e,mode:t,initial:n,onClose:i,onSubmit:o})=>{const[u,l]=_.useState(n?.name??""),[f,d]=_.useState(n?.config.transport??"stdio"),[h,p]=_.useState(n?.config.transport==="stdio"?n.config.command:""),[y,v]=_.useState(n?.config.transport==="http"?n.config.url:""),[b,E]=_.useState(n?.config.args??[]),[T,C]=_.useState(pc(n?.config.env)),[j,O]=_.useState(n?.config.transport==="http"?pc(n.config.headers):[]),[z,R]=_.useState(null);_.useEffect(()=>{e&&(l(n?.name??""),d(n?.config.transport??"stdio"),p(n?.config.transport==="stdio"?n.config.command:""),v(n?.config.transport==="http"?n.config.url:""),E(n?.config.args??[]),C(pc(n?.config.env)),O(n?.config.transport==="http"?pc(n.config.headers):[]),R(null))},[e,n]);const L=t==="create",$=async()=>{const V=X7.safeParse({name:u,transport:f,command:h,url:y});if(!V.success){R(V.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:T.length>0?km(T):void 0}:{transport:"http",url:y.trim(),headers:j.length>0?km(j):void 0,env:T.length>0?km(T):void 0};R(null),await o(u.trim(),K)},G=_.useMemo(()=>t==="create"?"Add MCP Server":"Edit MCP Server",[t]);return x.jsx(Oo,{open:e,onOpenChange:i,children:x.jsxs(Ro,{children:[x.jsx(Mo,{children:x.jsx(Do,{children:G})}),x.jsxs("div",{className:"space-y-4",children:[x.jsxs("label",{className:"block space-y-2 text-sm text-azure-text-primary dark:text-matrix-highlight",children:["Name",x.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:V=>l(V.target.value),placeholder:"coolify",disabled:!L})]}),x.jsxs("label",{className:"block space-y-2 text-sm text-azure-text-primary dark:text-matrix-highlight",children:["Transport",x.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:V=>d(V.target.value),children:[x.jsx("option",{value:"stdio",children:"stdio"}),x.jsx("option",{value:"http",children:"http"})]})]}),x.jsx(Y7,{transport:f,command:h,url:y,args:b,env:T,headers:j,onCommandChange:p,onUrlChange:v,onArgsChange:E,onEnvChange:C,onHeadersChange:O}),z&&x.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:z}),x.jsxs("div",{className:"flex justify-end gap-2",children:[x.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"}),x.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"})]})]})]})})},J7=({server:e,probeResult:t,onEdit:n,onDelete:i,onToggle:o})=>x.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:[x.jsxs("div",{className:"flex items-start justify-between gap-3",children:[x.jsxs("div",{className:"min-w-0 flex-1",children:[x.jsx("div",{className:"text-lg font-semibold text-azure-text-primary break-words dark:text-matrix-highlight",children:e.name}),x.jsx("div",{className:"text-xs uppercase tracking-wide text-azure-text-muted dark:text-matrix-secondary",children:e.config.transport})]}),x.jsxs("div",{className:"flex items-center gap-2",children:[t&&x.jsx("span",{title:t.ok?`${t.toolCount} tools`:t.error,className:`rounded-full px-2 py-0.5 text-xs font-semibold ${t.ok?"bg-green-500/20 text-green-600 dark:bg-green-400/20 dark:text-green-400":"bg-red-500/20 text-red-600 dark:bg-red-400/20 dark:text-red-400"}`,children:t.ok?`✓ ${t.toolCount} tools`:"✗ Failed"}),x.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:()=>o(e,!e.enabled),children:e.enabled?"Enabled":"Disabled"})]})]}),x.jsxs("div",{className:"mt-4 space-y-2 text-sm text-azure-text-secondary dark:text-matrix-secondary",children:[e.config.transport==="stdio"&&x.jsxs("div",{className:"break-all",children:[x.jsx("span",{className:"font-semibold text-azure-text-primary dark:text-matrix-highlight",children:"Command:"})," ",e.config.command]}),e.config.transport==="http"&&x.jsxs("div",{className:"break-all",children:[x.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&&x.jsxs("div",{className:"break-all",children:[x.jsx("span",{className:"font-semibold text-azure-text-primary dark:text-matrix-highlight",children:"Args:"})," ",e.config.args.join(" ")]}),t&&!t.ok&&t.error&&x.jsx("div",{className:"mt-1 break-all rounded border border-red-300 bg-red-50 px-2 py-1 text-xs text-red-600 dark:border-red-900 dark:bg-red-950/30 dark:text-red-400",children:t.error.length>120?t.error.slice(0,120)+"…":t.error})]}),x.jsxs("div",{className:"mt-4 flex gap-2",children:[x.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:()=>n(e),children:"Edit"}),x.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:()=>i(e),children:"Delete"})]})]}),Q7=()=>{const{data:e,error:t,mutate:n,isLoading:i}=Ci("/api/mcp/servers",()=>ca.fetchServers()),[o,u]=_.useState(""),[l,f]=_.useState("all"),[d,h]=_.useState(!1),[p,y]=_.useState(null),[v,b]=_.useState(!1),[E,T]=_.useState(null),[C,j]=_.useState(null),[O,z]=_.useState({}),[R,L]=_.useState(!1),[$,G]=_.useState(!1),V=e?.servers??[],K=_.useMemo(()=>V.filter(Z=>{const ce=Z.name.toLowerCase().includes(o.toLowerCase()),N=l==="all"||Z.config.transport===l;return ce&&N}),[V,o,l]),ue=()=>{y(null),h(!0)},re=Z=>{y(Z),h(!0)},oe=async(Z,ce)=>{try{p?await ca.updateServer(p.name,ce):await ca.addServer(Z,ce),h(!1),y(null),await n(),j({type:"success",message:"MCPs saved successfully. Restart MCPs for changes to take effect."})}catch(N){j({type:"error",message:N.message||"Failed to save MCP server."})}},ke=async Z=>{T(Z),b(!0)},le=async()=>{if(E)try{await ca.deleteServer(E.name),await n(),b(!1),T(null),j({type:"success",message:"MCPs saved successfully. Restart MCPs for changes to take effect."})}catch(Z){j({type:"error",message:Z.message||"Failed to delete MCP server."})}},ne=async()=>{L(!0);try{const Z=await ca.fetchStatus(),ce={};for(const N of Z.servers)ce[N.name]=N;z(ce)}catch(Z){j({type:"error",message:Z.message||"Failed to check MCP status."})}finally{L(!1)}},P=async()=>{G(!0);try{await ca.reloadTools(),j({type:"success",message:"MCP tools reloaded successfully."})}catch(Z){j({type:"error",message:Z.message||"Failed to reload MCP tools."})}finally{G(!1)}},Y=async(Z,ce)=>{try{await ca.toggleServer(Z.name,ce),await n(),j({type:"success",message:"MCPs saved successfully. Restart MCPs for changes to take effect."})}catch(N){j({type:"error",message:N.message||"Failed to toggle MCP server."})}};return x.jsxs("div",{className:"space-y-6",children:[x.jsxs("div",{className:"flex flex-col gap-4 md:flex-row md:items-center md:justify-between",children:[x.jsxs("div",{children:[x.jsx("h1",{className:"text-2xl font-semibold text-azure-primary dark:text-matrix-highlight",children:"MCP Servers"}),x.jsx("p",{className:"text-sm text-azure-text-secondary dark:text-matrix-secondary",children:"Manage MCP servers stored in mcps.json."})]}),x.jsxs("div",{className:"flex gap-2",children:[x.jsx("button",{type:"button",disabled:R,className:"rounded-md border border-azure-border px-4 py-2 text-sm font-semibold text-azure-text-primary shadow hover:border-azure-primary hover:text-azure-primary disabled:opacity-50 dark:border-matrix-primary dark:text-matrix-secondary hover:dark:border-matrix-highlight hover:dark:text-matrix-highlight",onClick:ne,children:R?"Checking…":"Check Status"}),x.jsx("button",{type:"button",disabled:$,className:"rounded-md border border-azure-border px-4 py-2 text-sm font-semibold text-azure-text-primary shadow hover:border-azure-primary hover:text-azure-primary disabled:opacity-50 dark:border-matrix-primary dark:text-matrix-secondary hover:dark:border-matrix-highlight hover:dark:text-matrix-highlight",onClick:P,children:$?"Reloading…":"Reload MCPs"}),x.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:ue,children:"Add Server"})]})]}),C&&x.jsx("div",{className:`p-4 rounded border ${C.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:C.message}),x.jsxs("div",{className:"flex flex-col gap-2 md:flex-row md:items-center",children:[x.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:Z=>u(Z.target.value),placeholder:"Search by name"}),x.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:Z=>f(Z.target.value),children:[x.jsx("option",{value:"all",children:"All"}),x.jsx("option",{value:"stdio",children:"stdio"}),x.jsx("option",{value:"http",children:"http"})]})]}),i&&x.jsx("div",{className:"text-sm text-azure-text-secondary dark:text-matrix-secondary",children:"Loading MCP servers..."}),t&&x.jsx("div",{className:"text-sm text-red-600 dark:text-red-400",children:"Failed to load MCP servers."}),!i&&K.length===0&&x.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."}),x.jsx("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-3",children:K.map(Z=>x.jsx(J7,{server:Z,probeResult:O[Z.name],onEdit:re,onDelete:ke,onToggle:Y},`${Z.name}-${Z.enabled?"on":"off"}`))}),x.jsx(K7,{open:d,mode:p?"edit":"create",initial:p??void 0,onClose:()=>h(!1),onSubmit:oe}),x.jsx(Oo,{open:v,onOpenChange:b,children:x.jsxs(Ro,{children:[x.jsx(Mo,{children:x.jsx(Do,{children:"Confirm Deletion"})}),x.jsxs("div",{className:"space-y-4",children:[x.jsxs("p",{className:"text-sm text-azure-text-secondary dark:text-matrix-secondary",children:["Are you sure you want to delete the MCP server ",x.jsxs("span",{className:"font-semibold text-azure-text-primary dark:text-matrix-highlight",children:['"',E?.name,'"']}),"? This action cannot be undone."]}),x.jsxs("div",{className:"flex justify-end gap-2",children:[x.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"}),x.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:le,children:"Delete"})]})]})]})})]})},wm={list:()=>mt.get("/model-pricing"),upsert:e=>mt.post("/model-pricing",e),update:(e,t,n)=>mt.put(`/model-pricing/${encodeURIComponent(e)}/${encodeURIComponent(t)}`,n),delete:(e,t)=>mt.delete(`/model-pricing/${encodeURIComponent(e)}/${encodeURIComponent(t)}`)},W7={hidden:{opacity:0},show:{opacity:1,transition:{staggerChildren:.05}}},mk={hidden:{opacity:0,y:10},show:{opacity:1,y:0}},eH=["anthropic","openai","google","openrouter","ollama","other"],pk=()=>({provider:"",model:"",input_price_per_1m:0,output_price_per_1m:0}),tH=()=>{const{data:e=[],mutate:t}=Ci("/api/model-pricing",()=>wm.list()),[n,i]=_.useState(!1),[o,u]=_.useState(null),[l,f]=_.useState(pk()),[d,h]=_.useState(null),[p,y]=_.useState(null),[v,b]=_.useState(!1),E=(z,R)=>{y({type:z,message:R}),setTimeout(()=>y(null),3e3)},T=()=>{u(null),f(pk()),i(!0)},C=z=>{u(z),f({...z}),i(!0)},j=async()=>{if(!(!l.provider.trim()||!l.model.trim())){b(!0);try{await wm.upsert(l),await t(),i(!1),E("success",o?"Pricing updated.":"Pricing created.")}catch{E("error","Failed to save pricing entry.")}finally{b(!1)}}},O=async()=>{if(d)try{await wm.delete(d.provider,d.model),await t(),h(null),E("success","Pricing entry deleted.")}catch{E("error","Failed to delete pricing entry.")}};return x.jsxs(fn.div,{variants:W7,initial:"hidden",animate:"show",className:"space-y-6",children:[x.jsxs(fn.div,{variants:mk,className:"flex items-center justify-between",children:[x.jsxs("div",{className:"flex items-center gap-3",children:[x.jsx(_c,{className:"w-6 h-6 text-azure-primary dark:text-matrix-highlight"}),x.jsxs("div",{children:[x.jsx("h1",{className:"text-2xl font-bold text-azure-text-primary dark:text-matrix-highlight",children:"Model Pricing"}),x.jsx("p",{className:"text-sm text-azure-text-secondary dark:text-matrix-dim mt-0.5",children:"Manage per-model pricing to estimate LLM costs in Usage Stats."})]})]}),x.jsxs("button",{onClick:T,className:"flex items-center gap-2 px-4 py-2 rounded-lg bg-azure-primary dark:bg-matrix-primary text-white dark:text-matrix-highlight text-sm font-medium hover:opacity-90 transition-opacity",children:[x.jsx(wj,{className:"w-4 h-4"})," Add Pricing"]})]}),p&&x.jsx(fn.div,{initial:{opacity:0,y:-8},animate:{opacity:1,y:0},className:`px-4 py-3 rounded-lg text-sm font-medium border ${p.type==="success"?"bg-green-50 dark:bg-green-900/20 border-green-300 dark:border-green-700 text-green-800 dark:text-green-400":"bg-red-50 dark:bg-red-900/20 border-red-300 dark:border-red-700 text-red-800 dark:text-red-400"}`,children:p.message}),x.jsx(fn.div,{variants:mk,className:"rounded-lg border border-azure-border dark:border-matrix-primary overflow-hidden",children:x.jsxs("table",{className:"w-full text-sm",children:[x.jsx("thead",{className:"bg-azure-surface dark:bg-zinc-900 border-b border-azure-border dark:border-matrix-primary",children:x.jsx("tr",{children:["Provider","Model","Input ($/1M tokens)","Output ($/1M tokens)","Actions"].map(z=>x.jsx("th",{className:"px-4 py-3 text-left font-semibold text-azure-text-secondary dark:text-matrix-dim",children:z},z))})}),x.jsx("tbody",{children:e.length===0?x.jsx("tr",{children:x.jsx("td",{colSpan:5,className:"px-4 py-8 text-center text-azure-text-secondary dark:text-matrix-dim",children:'No pricing entries. Click "Add Pricing" to get started.'})}):e.map(z=>x.jsxs("tr",{className:"border-b border-azure-border dark:border-matrix-primary/30 hover:bg-azure-surface/50 dark:hover:bg-zinc-800/50 transition-colors",children:[x.jsx("td",{className:"px-4 py-3 text-azure-text-primary dark:text-matrix-text capitalize",children:z.provider}),x.jsx("td",{className:"px-4 py-3 font-mono text-azure-text-primary dark:text-matrix-highlight text-xs",children:z.model}),x.jsxs("td",{className:"px-4 py-3 text-azure-text-primary dark:text-matrix-text",children:["$",z.input_price_per_1m.toFixed(4)]}),x.jsxs("td",{className:"px-4 py-3 text-azure-text-primary dark:text-matrix-text",children:["$",z.output_price_per_1m.toFixed(4)]}),x.jsx("td",{className:"px-4 py-3",children:x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx("button",{onClick:()=>C(z),className:"p-1.5 rounded hover:bg-azure-border dark:hover:bg-matrix-primary/30 text-azure-text-secondary dark:text-matrix-dim hover:text-azure-primary dark:hover:text-matrix-highlight transition-colors",title:"Edit",children:x.jsx(Vk,{className:"w-4 h-4"})}),x.jsx("button",{onClick:()=>h(z),className:"p-1.5 rounded hover:bg-red-50 dark:hover:bg-red-900/20 text-azure-text-secondary dark:text-matrix-dim hover:text-red-600 dark:hover:text-red-400 transition-colors",title:"Delete",children:x.jsx(Ec,{className:"w-4 h-4"})})]})})]},`${z.provider}/${z.model}`))})]})}),x.jsx(Oo,{open:n,onOpenChange:i,children:x.jsxs(Ro,{children:[x.jsx(Mo,{children:x.jsx(Do,{children:o?"Edit Pricing":"Add Pricing"})}),x.jsxs("div",{className:"p-4 space-y-4",children:[x.jsxs("div",{children:[x.jsx("label",{className:"block text-sm font-medium text-azure-text-secondary dark:text-matrix-dim mb-1",children:"Provider"}),o?x.jsx("p",{className:"px-3 py-2 rounded-lg bg-azure-bg dark:bg-zinc-800 text-azure-text-primary dark:text-matrix-text text-sm capitalize",children:l.provider}):x.jsxs("select",{value:l.provider,onChange:z=>f({...l,provider:z.target.value}),className:"w-full px-3 py-2 rounded-lg border border-azure-border dark:border-matrix-primary bg-white dark:bg-zinc-800 text-azure-text-primary dark:text-matrix-text text-sm focus:outline-none focus:ring-1 focus:ring-azure-primary dark:focus:ring-matrix-highlight",children:[x.jsx("option",{value:"",children:"Select provider..."}),eH.map(z=>x.jsx("option",{value:z,children:z},z))]})]}),x.jsxs("div",{children:[x.jsx("label",{className:"block text-sm font-medium text-azure-text-secondary dark:text-matrix-dim mb-1",children:"Model"}),o?x.jsx("p",{className:"px-3 py-2 rounded-lg bg-azure-bg dark:bg-zinc-800 text-azure-text-primary dark:text-matrix-text text-sm font-mono",children:l.model}):x.jsx("input",{type:"text",value:l.model,onChange:z=>f({...l,model:z.target.value}),placeholder:"e.g. gpt-4o",className:"w-full px-3 py-2 rounded-lg border border-azure-border dark:border-matrix-primary bg-white dark:bg-zinc-800 text-azure-text-primary dark:text-matrix-text text-sm focus:outline-none focus:ring-1 focus:ring-azure-primary dark:focus:ring-matrix-highlight"})]}),x.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[x.jsxs("div",{children:[x.jsx("label",{className:"block text-sm font-medium text-azure-text-secondary dark:text-matrix-dim mb-1",children:"Input price / 1M tokens ($)"}),x.jsx("input",{type:"number",min:0,step:.001,value:l.input_price_per_1m,onChange:z=>f({...l,input_price_per_1m:parseFloat(z.target.value)||0}),className:"w-full px-3 py-2 rounded-lg border border-azure-border dark:border-matrix-primary bg-white dark:bg-zinc-800 text-azure-text-primary dark:text-matrix-text text-sm focus:outline-none focus:ring-1 focus:ring-azure-primary dark:focus:ring-matrix-highlight"})]}),x.jsxs("div",{children:[x.jsx("label",{className:"block text-sm font-medium text-azure-text-secondary dark:text-matrix-dim mb-1",children:"Output price / 1M tokens ($)"}),x.jsx("input",{type:"number",min:0,step:.001,value:l.output_price_per_1m,onChange:z=>f({...l,output_price_per_1m:parseFloat(z.target.value)||0}),className:"w-full px-3 py-2 rounded-lg border border-azure-border dark:border-matrix-primary bg-white dark:bg-zinc-800 text-azure-text-primary dark:text-matrix-text text-sm focus:outline-none focus:ring-1 focus:ring-azure-primary dark:focus:ring-matrix-highlight"})]})]}),x.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[x.jsx("button",{onClick:()=>i(!1),className:"px-4 py-2 rounded-lg border border-azure-border dark:border-matrix-primary text-azure-text-secondary dark:text-matrix-dim text-sm hover:bg-azure-surface dark:hover:bg-zinc-800 transition-colors",children:"Cancel"}),x.jsx("button",{onClick:j,disabled:v||!l.provider.trim()||!l.model.trim(),className:"px-4 py-2 rounded-lg bg-azure-primary dark:bg-matrix-primary text-white dark:text-matrix-highlight text-sm font-medium hover:opacity-90 disabled:opacity-50 transition-opacity",children:v?"Saving...":"Save"})]})]})]})}),x.jsx(Oo,{open:!!d,onOpenChange:z=>!z&&h(null),children:x.jsxs(Ro,{children:[x.jsx(Mo,{children:x.jsx(Do,{children:"Delete Pricing Entry"})}),x.jsxs("div",{className:"p-4 space-y-4",children:[x.jsxs("p",{className:"text-sm text-azure-text-primary dark:text-matrix-text",children:["Are you sure you want to delete the pricing for"," ",x.jsxs("span",{className:"font-mono font-semibold text-azure-primary dark:text-matrix-highlight",children:[d?.provider,"/",d?.model]}),"? This cannot be undone."]}),x.jsxs("div",{className:"flex justify-end gap-3",children:[x.jsx("button",{onClick:()=>h(null),className:"px-4 py-2 rounded-lg border border-azure-border dark:border-matrix-primary text-azure-text-secondary dark:text-matrix-dim text-sm hover:bg-azure-surface dark:hover:bg-zinc-800 transition-colors",children:"Cancel"}),x.jsx("button",{onClick:O,className:"px-4 py-2 rounded-lg bg-red-600 text-white text-sm font-medium hover:bg-red-700 transition-colors",children:"Delete"})]})]})]})})]})};function nH(){return x.jsx(_A,{children:x.jsxs(Wb,{children:[x.jsx(Jn,{path:"/login",element:x.jsx(D7,{})}),x.jsx(Jn,{path:"/*",element:x.jsx($7,{children:x.jsx(uD,{children:x.jsxs(Wb,{children:[x.jsx(Jn,{path:"/",element:x.jsx(dD,{})}),x.jsx(Jn,{path:"/chat",element:x.jsx(L6,{})}),x.jsx(Jn,{path:"/zaion",element:x.jsx(O7,{})}),x.jsx(Jn,{path:"/logs",element:x.jsx(R7,{})}),x.jsx(Jn,{path:"/stats",element:x.jsx(M7,{})}),x.jsx(Jn,{path:"/sati-memories",element:x.jsx(q7,{})}),x.jsx(Jn,{path:"/mcp-servers",element:x.jsx(Q7,{})}),x.jsx(Jn,{path:"/model-pricing",element:x.jsx(tH,{})}),x.jsx(Jn,{path:"*",element:x.jsx(Ak,{to:"/",replace:!0})})]})})})})]})})}aC.createRoot(document.getElementById("root")).render(x.jsx(_.StrictMode,{children:x.jsx(nH,{})}));
|