function Rb(a,s){for(var i=0;i<s.length;i++){const o=s[i];if(typeof o!="string"&&!Array.isArray(o)){for(const f in o)if(f!=="default"&&!(f in a)){const d=Object.getOwnPropertyDescriptor(o,f);d&&Object.defineProperty(a,f,d.get?d:{enumerable:!0,get:()=>o[f]})}}}return Object.freeze(Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}))}(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))o(f);new MutationObserver(f=>{for(const d of f)if(d.type==="childList")for(const m of d.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&o(m)}).observe(document,{childList:!0,subtree:!0});function i(f){const d={};return f.integrity&&(d.integrity=f.integrity),f.referrerPolicy&&(d.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?d.credentials="include":f.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function o(f){if(f.ep)return;f.ep=!0;const d=i(f);fetch(f.href,d)}})();function bg(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var fu={exports:{}},ks={};/**
 * @license React
 * react-jsx-runtime.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var jp;function Db(){if(jp)return ks;jp=1;var a=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function i(o,f,d){var m=null;if(d!==void 0&&(m=""+d),f.key!==void 0&&(m=""+f.key),"key"in f){d={};for(var p in f)p!=="key"&&(d[p]=f[p])}else d=f;return f=d.ref,{$$typeof:a,type:o,key:m,ref:f!==void 0?f:null,props:d}}return ks.Fragment=s,ks.jsx=i,ks.jsxs=i,ks}var _p;function Ob(){return _p||(_p=1,fu.exports=Db()),fu.exports}var c=Ob(),du={exports:{}},ye={};/**
 * @license React
 * react.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Mp;function kb(){if(Mp)return ye;Mp=1;var a=Symbol.for("react.transitional.element"),s=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),m=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),b=Symbol.iterator;function w(T){return T===null||typeof T!="object"?null:(T=b&&T[b]||T["@@iterator"],typeof T=="function"?T:null)}var N={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},M=Object.assign,E={};function D(T,P,te){this.props=T,this.context=P,this.refs=E,this.updater=te||N}D.prototype.isReactComponent={},D.prototype.setState=function(T,P){if(typeof T!="object"&&typeof T!="function"&&T!=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,T,P,"setState")},D.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};function R(){}R.prototype=D.prototype;function B(T,P,te){this.props=T,this.context=P,this.refs=E,this.updater=te||N}var C=B.prototype=new R;C.constructor=B,M(C,D.prototype),C.isPureReactComponent=!0;var A=Array.isArray,j={H:null,A:null,T:null,S:null,V:null},L=Object.prototype.hasOwnProperty;function q(T,P,te,J,ne,xe){return te=xe.ref,{$$typeof:a,type:T,key:P,ref:te!==void 0?te:null,props:xe}}function X(T,P){return q(T.type,P,void 0,void 0,void 0,T.props)}function F(T){return typeof T=="object"&&T!==null&&T.$$typeof===a}function ee(T){var P={"=":"=0",":":"=2"};return"$"+T.replace(/[=:]/g,function(te){return P[te]})}var I=/\/+/g;function ae(T,P){return typeof T=="object"&&T!==null&&T.key!=null?ee(""+T.key):P.toString(36)}function pe(){}function ge(T){switch(T.status){case"fulfilled":return T.value;case"rejected":throw T.reason;default:switch(typeof T.status=="string"?T.then(pe,pe):(T.status="pending",T.then(function(P){T.status==="pending"&&(T.status="fulfilled",T.value=P)},function(P){T.status==="pending"&&(T.status="rejected",T.reason=P)})),T.status){case"fulfilled":return T.value;case"rejected":throw T.reason}}throw T}function oe(T,P,te,J,ne){var xe=typeof T;(xe==="undefined"||xe==="boolean")&&(T=null);var ce=!1;if(T===null)ce=!0;else switch(xe){case"bigint":case"string":case"number":ce=!0;break;case"object":switch(T.$$typeof){case a:case s:ce=!0;break;case v:return ce=T._init,oe(ce(T._payload),P,te,J,ne)}}if(ce)return ne=ne(T),ce=J===""?"."+ae(T,0):J,A(ne)?(te="",ce!=null&&(te=ce.replace(I,"$&/")+"/"),oe(ne,P,te,"",function(ct){return ct})):ne!=null&&(F(ne)&&(ne=X(ne,te+(ne.key==null||T&&T.key===ne.key?"":(""+ne.key).replace(I,"$&/")+"/")+ce)),P.push(ne)),1;ce=0;var ue=J===""?".":J+":";if(A(T))for(var Me=0;Me<T.length;Me++)J=T[Me],xe=ue+ae(J,Me),ce+=oe(J,P,te,xe,ne);else if(Me=w(T),typeof Me=="function")for(T=Me.call(T),Me=0;!(J=T.next()).done;)J=J.value,xe=ue+ae(J,Me++),ce+=oe(J,P,te,xe,ne);else if(xe==="object"){if(typeof T.then=="function")return oe(ge(T),P,te,J,ne);throw P=String(T),Error("Objects are not valid as a React child (found: "+(P==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":P)+"). If you meant to render a collection of children, use an array instead.")}return ce}function k(T,P,te){if(T==null)return T;var J=[],ne=0;return oe(T,J,"","",function(xe){return P.call(te,xe,ne++)}),J}function K(T){if(T._status===-1){var P=T._result;P=P(),P.then(function(te){(T._status===0||T._status===-1)&&(T._status=1,T._result=te)},function(te){(T._status===0||T._status===-1)&&(T._status=2,T._result=te)}),T._status===-1&&(T._status=0,T._result=P)}if(T._status===1)return T._result.default;throw T._result}var Y=typeof reportError=="function"?reportError:function(T){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var P=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof T=="object"&&T!==null&&typeof T.message=="string"?String(T.message):String(T),error:T});if(!window.dispatchEvent(P))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",T);return}console.error(T)};function W(){}return ye.Children={map:k,forEach:function(T,P,te){k(T,function(){P.apply(this,arguments)},te)},count:function(T){var P=0;return k(T,function(){P++}),P},toArray:function(T){return k(T,function(P){return P})||[]},only:function(T){if(!F(T))throw Error("React.Children.only expected to receive a single React element child.");return T}},ye.Component=D,ye.Fragment=i,ye.Profiler=f,ye.PureComponent=B,ye.StrictMode=o,ye.Suspense=x,ye.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=j,ye.__COMPILER_RUNTIME={__proto__:null,c:function(T){return j.H.useMemoCache(T)}},ye.cache=function(T){return function(){return T.apply(null,arguments)}},ye.cloneElement=function(T,P,te){if(T==null)throw Error("The argument must be a React element, but you passed "+T+".");var J=M({},T.props),ne=T.key,xe=void 0;if(P!=null)for(ce in P.ref!==void 0&&(xe=void 0),P.key!==void 0&&(ne=""+P.key),P)!L.call(P,ce)||ce==="key"||ce==="__self"||ce==="__source"||ce==="ref"&&P.ref===void 0||(J[ce]=P[ce]);var ce=arguments.length-2;if(ce===1)J.children=te;else if(1<ce){for(var ue=Array(ce),Me=0;Me<ce;Me++)ue[Me]=arguments[Me+2];J.children=ue}return q(T.type,ne,void 0,void 0,xe,J)},ye.createContext=function(T){return T={$$typeof:m,_currentValue:T,_currentValue2:T,_threadCount:0,Provider:null,Consumer:null},T.Provider=T,T.Consumer={$$typeof:d,_context:T},T},ye.createElement=function(T,P,te){var J,ne={},xe=null;if(P!=null)for(J in P.key!==void 0&&(xe=""+P.key),P)L.call(P,J)&&J!=="key"&&J!=="__self"&&J!=="__source"&&(ne[J]=P[J]);var ce=arguments.length-2;if(ce===1)ne.children=te;else if(1<ce){for(var ue=Array(ce),Me=0;Me<ce;Me++)ue[Me]=arguments[Me+2];ne.children=ue}if(T&&T.defaultProps)for(J in ce=T.defaultProps,ce)ne[J]===void 0&&(ne[J]=ce[J]);return q(T,xe,void 0,void 0,null,ne)},ye.createRef=function(){return{current:null}},ye.forwardRef=function(T){return{$$typeof:p,render:T}},ye.isValidElement=F,ye.lazy=function(T){return{$$typeof:v,_payload:{_status:-1,_result:T},_init:K}},ye.memo=function(T,P){return{$$typeof:h,type:T,compare:P===void 0?null:P}},ye.startTransition=function(T){var P=j.T,te={};j.T=te;try{var J=T(),ne=j.S;ne!==null&&ne(te,J),typeof J=="object"&&J!==null&&typeof J.then=="function"&&J.then(W,Y)}catch(xe){Y(xe)}finally{j.T=P}},ye.unstable_useCacheRefresh=function(){return j.H.useCacheRefresh()},ye.use=function(T){return j.H.use(T)},ye.useActionState=function(T,P,te){return j.H.useActionState(T,P,te)},ye.useCallback=function(T,P){return j.H.useCallback(T,P)},ye.useContext=function(T){return j.H.useContext(T)},ye.useDebugValue=function(){},ye.useDeferredValue=function(T,P){return j.H.useDeferredValue(T,P)},ye.useEffect=function(T,P,te){var J=j.H;if(typeof te=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return J.useEffect(T,P)},ye.useId=function(){return j.H.useId()},ye.useImperativeHandle=function(T,P,te){return j.H.useImperativeHandle(T,P,te)},ye.useInsertionEffect=function(T,P){return j.H.useInsertionEffect(T,P)},ye.useLayoutEffect=function(T,P){return j.H.useLayoutEffect(T,P)},ye.useMemo=function(T,P){return j.H.useMemo(T,P)},ye.useOptimistic=function(T,P){return j.H.useOptimistic(T,P)},ye.useReducer=function(T,P,te){return j.H.useReducer(T,P,te)},ye.useRef=function(T){return j.H.useRef(T)},ye.useState=function(T){return j.H.useState(T)},ye.useSyncExternalStore=function(T,P,te){return j.H.useSyncExternalStore(T,P,te)},ye.useTransition=function(){return j.H.useTransition()},ye.version="19.1.1",ye}var Tp;function Fu(){return Tp||(Tp=1,du.exports=kb()),du.exports}var y=Fu();const ta=bg(y),Sg=Rb({__proto__:null,default:ta},[y]);var mu={exports:{}},zs={},hu={exports:{}},pu={};/**
 * @license React
 * scheduler.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Ap;function zb(){return Ap||(Ap=1,(function(a){function s(k,K){var Y=k.length;k.push(K);e:for(;0<Y;){var W=Y-1>>>1,T=k[W];if(0<f(T,K))k[W]=K,k[Y]=T,Y=W;else break e}}function i(k){return k.length===0?null:k[0]}function o(k){if(k.length===0)return null;var K=k[0],Y=k.pop();if(Y!==K){k[0]=Y;e:for(var W=0,T=k.length,P=T>>>1;W<P;){var te=2*(W+1)-1,J=k[te],ne=te+1,xe=k[ne];if(0>f(J,Y))ne<T&&0>f(xe,J)?(k[W]=xe,k[ne]=Y,W=ne):(k[W]=J,k[te]=Y,W=te);else if(ne<T&&0>f(xe,Y))k[W]=xe,k[ne]=Y,W=ne;else break e}}return K}function f(k,K){var Y=k.sortIndex-K.sortIndex;return Y!==0?Y:k.id-K.id}if(a.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;a.unstable_now=function(){return d.now()}}else{var m=Date,p=m.now();a.unstable_now=function(){return m.now()-p}}var x=[],h=[],v=1,b=null,w=3,N=!1,M=!1,E=!1,D=!1,R=typeof setTimeout=="function"?setTimeout:null,B=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;function A(k){for(var K=i(h);K!==null;){if(K.callback===null)o(h);else if(K.startTime<=k)o(h),K.sortIndex=K.expirationTime,s(x,K);else break;K=i(h)}}function j(k){if(E=!1,A(k),!M)if(i(x)!==null)M=!0,L||(L=!0,ae());else{var K=i(h);K!==null&&oe(j,K.startTime-k)}}var L=!1,q=-1,X=5,F=-1;function ee(){return D?!0:!(a.unstable_now()-F<X)}function I(){if(D=!1,L){var k=a.unstable_now();F=k;var K=!0;try{e:{M=!1,E&&(E=!1,B(q),q=-1),N=!0;var Y=w;try{t:{for(A(k),b=i(x);b!==null&&!(b.expirationTime>k&&ee());){var W=b.callback;if(typeof W=="function"){b.callback=null,w=b.priorityLevel;var T=W(b.expirationTime<=k);if(k=a.unstable_now(),typeof T=="function"){b.callback=T,A(k),K=!0;break t}b===i(x)&&o(x),A(k)}else o(x);b=i(x)}if(b!==null)K=!0;else{var P=i(h);P!==null&&oe(j,P.startTime-k),K=!1}}break e}finally{b=null,w=Y,N=!1}K=void 0}}finally{K?ae():L=!1}}}var ae;if(typeof C=="function")ae=function(){C(I)};else if(typeof MessageChannel<"u"){var pe=new MessageChannel,ge=pe.port2;pe.port1.onmessage=I,ae=function(){ge.postMessage(null)}}else ae=function(){R(I,0)};function oe(k,K){q=R(function(){k(a.unstable_now())},K)}a.unstable_IdlePriority=5,a.unstable_ImmediatePriority=1,a.unstable_LowPriority=4,a.unstable_NormalPriority=3,a.unstable_Profiling=null,a.unstable_UserBlockingPriority=2,a.unstable_cancelCallback=function(k){k.callback=null},a.unstable_forceFrameRate=function(k){0>k||125<k?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):X=0<k?Math.floor(1e3/k):5},a.unstable_getCurrentPriorityLevel=function(){return w},a.unstable_next=function(k){switch(w){case 1:case 2:case 3:var K=3;break;default:K=w}var Y=w;w=K;try{return k()}finally{w=Y}},a.unstable_requestPaint=function(){D=!0},a.unstable_runWithPriority=function(k,K){switch(k){case 1:case 2:case 3:case 4:case 5:break;default:k=3}var Y=w;w=k;try{return K()}finally{w=Y}},a.unstable_scheduleCallback=function(k,K,Y){var W=a.unstable_now();switch(typeof Y=="object"&&Y!==null?(Y=Y.delay,Y=typeof Y=="number"&&0<Y?W+Y:W):Y=W,k){case 1:var T=-1;break;case 2:T=250;break;case 5:T=1073741823;break;case 4:T=1e4;break;default:T=5e3}return T=Y+T,k={id:v++,callback:K,priorityLevel:k,startTime:Y,expirationTime:T,sortIndex:-1},Y>W?(k.sortIndex=Y,s(h,k),i(x)===null&&k===i(h)&&(E?(B(q),q=-1):E=!0,oe(j,Y-W))):(k.sortIndex=T,s(x,k),M||N||(M=!0,L||(L=!0,ae()))),k},a.unstable_shouldYield=ee,a.unstable_wrapCallback=function(k){var K=w;return function(){var Y=w;w=K;try{return k.apply(this,arguments)}finally{w=Y}}}})(pu)),pu}var Cp;function Ub(){return Cp||(Cp=1,hu.exports=zb()),hu.exports}var gu={exports:{}},ot={};/**
 * @license React
 * react-dom.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Rp;function Lb(){if(Rp)return ot;Rp=1;var a=Fu();function s(x){var h="https://react.dev/errors/"+x;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)h+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+x+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var o={d:{f:i,r:function(){throw Error(s(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},f=Symbol.for("react.portal");function d(x,h,v){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:b==null?null:""+b,children:x,containerInfo:h,implementation:v}}var m=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function p(x,h){if(x==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return ot.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,ot.createPortal=function(x,h){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(s(299));return d(x,h,null,v)},ot.flushSync=function(x){var h=m.T,v=o.p;try{if(m.T=null,o.p=2,x)return x()}finally{m.T=h,o.p=v,o.d.f()}},ot.preconnect=function(x,h){typeof x=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,o.d.C(x,h))},ot.prefetchDNS=function(x){typeof x=="string"&&o.d.D(x)},ot.preinit=function(x,h){if(typeof x=="string"&&h&&typeof h.as=="string"){var v=h.as,b=p(v,h.crossOrigin),w=typeof h.integrity=="string"?h.integrity:void 0,N=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;v==="style"?o.d.S(x,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:b,integrity:w,fetchPriority:N}):v==="script"&&o.d.X(x,{crossOrigin:b,integrity:w,fetchPriority:N,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},ot.preinitModule=function(x,h){if(typeof x=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var v=p(h.as,h.crossOrigin);o.d.M(x,{crossOrigin:v,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&o.d.M(x)},ot.preload=function(x,h){if(typeof x=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var v=h.as,b=p(v,h.crossOrigin);o.d.L(x,v,{crossOrigin:b,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})}},ot.preloadModule=function(x,h){if(typeof x=="string")if(h){var v=p(h.as,h.crossOrigin);o.d.m(x,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:v,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else o.d.m(x)},ot.requestFormReset=function(x){o.d.r(x)},ot.unstable_batchedUpdates=function(x,h){return x(h)},ot.useFormState=function(x,h,v){return m.H.useFormState(x,h,v)},ot.useFormStatus=function(){return m.H.useHostTransitionStatus()},ot.version="19.1.1",ot}var Dp;function wg(){if(Dp)return gu.exports;Dp=1;function a(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(s){console.error(s)}}return a(),gu.exports=Lb(),gu.exports}/**
 * @license React
 * react-dom-client.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Op;function Hb(){if(Op)return zs;Op=1;var a=Ub(),s=Fu(),i=wg();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function f(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function d(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function m(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p(e){if(d(e)!==e)throw Error(o(188))}function x(e){var t=e.alternate;if(!t){if(t=d(e),t===null)throw Error(o(188));return t!==e?null:e}for(var n=e,l=t;;){var r=n.return;if(r===null)break;var u=r.alternate;if(u===null){if(l=r.return,l!==null){n=l;continue}break}if(r.child===u.child){for(u=r.child;u;){if(u===n)return p(r),e;if(u===l)return p(r),t;u=u.sibling}throw Error(o(188))}if(n.return!==l.return)n=r,l=u;else{for(var g=!1,S=r.child;S;){if(S===n){g=!0,n=r,l=u;break}if(S===l){g=!0,l=r,n=u;break}S=S.sibling}if(!g){for(S=u.child;S;){if(S===n){g=!0,n=u,l=r;break}if(S===l){g=!0,l=u,n=r;break}S=S.sibling}if(!g)throw Error(o(189))}}if(n.alternate!==l)throw Error(o(190))}if(n.tag!==3)throw Error(o(188));return n.stateNode.current===n?e:t}function h(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=h(e),t!==null)return t;e=e.sibling}return null}var v=Object.assign,b=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),M=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),D=Symbol.for("react.profiler"),R=Symbol.for("react.provider"),B=Symbol.for("react.consumer"),C=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),j=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),q=Symbol.for("react.memo"),X=Symbol.for("react.lazy"),F=Symbol.for("react.activity"),ee=Symbol.for("react.memo_cache_sentinel"),I=Symbol.iterator;function ae(e){return e===null||typeof e!="object"?null:(e=I&&e[I]||e["@@iterator"],typeof e=="function"?e:null)}var pe=Symbol.for("react.client.reference");function ge(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===pe?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case M:return"Fragment";case D:return"Profiler";case E:return"StrictMode";case j:return"Suspense";case L:return"SuspenseList";case F:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case N:return"Portal";case C:return(e.displayName||"Context")+".Provider";case B:return(e._context.displayName||"Context")+".Consumer";case A:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case q:return t=e.displayName||null,t!==null?t:ge(e.type)||"Memo";case X:t=e._payload,e=e._init;try{return ge(e(t))}catch{}}return null}var oe=Array.isArray,k=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y={pending:!1,data:null,method:null,action:null},W=[],T=-1;function P(e){return{current:e}}function te(e){0>T||(e.current=W[T],W[T]=null,T--)}function J(e,t){T++,W[T]=e.current,e.current=t}var ne=P(null),xe=P(null),ce=P(null),ue=P(null);function Me(e,t){switch(J(ce,t),J(xe,e),J(ne,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Ih(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Ih(t),e=ep(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}te(ne),J(ne,e)}function ct(){te(ne),te(xe),te(ce)}function Qt(e){e.memoizedState!==null&&J(ue,e);var t=ne.current,n=ep(t,e.type);t!==n&&(J(xe,e),J(ne,n))}function Zt(e){xe.current===e&&(te(ne),te(xe)),ue.current===e&&(te(ue),As._currentValue=Y)}var Pt=Object.prototype.hasOwnProperty,An=a.unstable_scheduleCallback,Io=a.unstable_cancelCallback,cy=a.unstable_shouldYield,uy=a.unstable_requestPaint,$t=a.unstable_now,fy=a.unstable_getCurrentPriorityLevel,Of=a.unstable_ImmediatePriority,kf=a.unstable_UserBlockingPriority,Fs=a.unstable_NormalPriority,dy=a.unstable_LowPriority,zf=a.unstable_IdlePriority,my=a.log,hy=a.unstable_setDisableYieldValue,Ll=null,vt=null;function Cn(e){if(typeof my=="function"&&hy(e),vt&&typeof vt.setStrictMode=="function")try{vt.setStrictMode(Ll,e)}catch{}}var xt=Math.clz32?Math.clz32:vy,py=Math.log,gy=Math.LN2;function vy(e){return e>>>=0,e===0?32:31-(py(e)/gy|0)|0}var Js=256,Ws=4194304;function ia(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Is(e,t,n){var l=e.pendingLanes;if(l===0)return 0;var r=0,u=e.suspendedLanes,g=e.pingedLanes;e=e.warmLanes;var S=l&134217727;return S!==0?(l=S&~u,l!==0?r=ia(l):(g&=S,g!==0?r=ia(g):n||(n=S&~e,n!==0&&(r=ia(n))))):(S=l&~u,S!==0?r=ia(S):g!==0?r=ia(g):n||(n=l&~e,n!==0&&(r=ia(n)))),r===0?0:t!==0&&t!==r&&(t&u)===0&&(u=r&-r,n=t&-t,u>=n||u===32&&(n&4194048)!==0)?t:r}function Hl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function xy(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+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 t+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 Uf(){var e=Js;return Js<<=1,(Js&4194048)===0&&(Js=256),e}function Lf(){var e=Ws;return Ws<<=1,(Ws&62914560)===0&&(Ws=4194304),e}function ei(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Bl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function yy(e,t,n,l,r,u){var g=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var S=e.entanglements,_=e.expirationTimes,H=e.hiddenUpdates;for(n=g&~n;0<n;){var Q=31-xt(n),$=1<<Q;S[Q]=0,_[Q]=-1;var G=H[Q];if(G!==null)for(H[Q]=null,Q=0;Q<G.length;Q++){var V=G[Q];V!==null&&(V.lane&=-536870913)}n&=~$}l!==0&&Hf(e,l,0),u!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=u&~(g&~t))}function Hf(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-xt(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|n&4194090}function Bf(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var l=31-xt(n),r=1<<l;r&t|e[l]&t&&(e[l]|=t),n&=~r}}function ti(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function ni(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function qf(){var e=K.p;return e!==0?e:(e=window.event,e===void 0?32:yp(e.type))}function by(e,t){var n=K.p;try{return K.p=e,t()}finally{K.p=n}}var Rn=Math.random().toString(36).slice(2),st="__reactFiber$"+Rn,dt="__reactProps$"+Rn,za="__reactContainer$"+Rn,ai="__reactEvents$"+Rn,Sy="__reactListeners$"+Rn,wy="__reactHandles$"+Rn,Gf="__reactResources$"+Rn,ql="__reactMarker$"+Rn;function li(e){delete e[st],delete e[dt],delete e[ai],delete e[Sy],delete e[wy]}function Ua(e){var t=e[st];if(t)return t;for(var n=e.parentNode;n;){if(t=n[za]||n[st]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=lp(e);e!==null;){if(n=e[st])return n;e=lp(e)}return t}e=n,n=e.parentNode}return null}function La(e){if(e=e[st]||e[za]){var t=e.tag;if(t===5||t===6||t===13||t===26||t===27||t===3)return e}return null}function Gl(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function Ha(e){var t=e[Gf];return t||(t=e[Gf]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function We(e){e[ql]=!0}var Yf=new Set,Vf={};function ca(e,t){Ba(e,t),Ba(e+"Capture",t)}function Ba(e,t){for(Vf[e]=t,e=0;e<t.length;e++)Yf.add(t[e])}var Ny=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]*$"),Xf={},Kf={};function Ey(e){return Pt.call(Kf,e)?!0:Pt.call(Xf,e)?!1:Ny.test(e)?Kf[e]=!0:(Xf[e]=!0,!1)}function er(e,t,n){if(Ey(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function tr(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function cn(e,t,n,l){if(l===null)e.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+l)}}var si,Qf;function qa(e){if(si===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);si=t&&t[1]||"",Qf=-1<n.stack.indexOf(`
    at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
`+si+e+Qf}var ri=!1;function oi(e,t){if(!e||ri)return"";ri=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var $=function(){throw Error()};if(Object.defineProperty($.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct($,[])}catch(V){var G=V}Reflect.construct(e,[],$)}else{try{$.call()}catch(V){G=V}e.call($.prototype)}}else{try{throw Error()}catch(V){G=V}($=e())&&typeof $.catch=="function"&&$.catch(function(){})}}catch(V){if(V&&G&&typeof V.stack=="string")return[V.stack,G.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var r=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");r&&r.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=l.DetermineComponentFrameRoot(),g=u[0],S=u[1];if(g&&S){var _=g.split(`
`),H=S.split(`
`);for(r=l=0;l<_.length&&!_[l].includes("DetermineComponentFrameRoot");)l++;for(;r<H.length&&!H[r].includes("DetermineComponentFrameRoot");)r++;if(l===_.length||r===H.length)for(l=_.length-1,r=H.length-1;1<=l&&0<=r&&_[l]!==H[r];)r--;for(;1<=l&&0<=r;l--,r--)if(_[l]!==H[r]){if(l!==1||r!==1)do if(l--,r--,0>r||_[l]!==H[r]){var Q=`
`+_[l].replace(" at new "," at ");return e.displayName&&Q.includes("<anonymous>")&&(Q=Q.replace("<anonymous>",e.displayName)),Q}while(1<=l&&0<=r);break}}}finally{ri=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?qa(n):""}function jy(e){switch(e.tag){case 26:case 27:case 5:return qa(e.type);case 16:return qa("Lazy");case 13:return qa("Suspense");case 19:return qa("SuspenseList");case 0:case 15:return oi(e.type,!1);case 11:return oi(e.type.render,!1);case 1:return oi(e.type,!0);case 31:return qa("Activity");default:return""}}function Zf(e){try{var t="";do t+=jy(e),e=e.return;while(e);return t}catch(n){return`
Error generating stack: `+n.message+`
`+n.stack}}function At(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Pf(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function _y(e){var t=Pf(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),l=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var r=n.get,u=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(g){l=""+g,u.call(this,g)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return l},setValue:function(g){l=""+g},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function nr(e){e._valueTracker||(e._valueTracker=_y(e))}function $f(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),l="";return e&&(l=Pf(e)?e.checked?"true":"false":e.value),e=l,e!==n?(t.setValue(e),!0):!1}function ar(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var My=/[\n"\\]/g;function Ct(e){return e.replace(My,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function ii(e,t,n,l,r,u,g,S){e.name="",g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"?e.type=g:e.removeAttribute("type"),t!=null?g==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+At(t)):e.value!==""+At(t)&&(e.value=""+At(t)):g!=="submit"&&g!=="reset"||e.removeAttribute("value"),t!=null?ci(e,g,At(t)):n!=null?ci(e,g,At(n)):l!=null&&e.removeAttribute("value"),r==null&&u!=null&&(e.defaultChecked=!!u),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?e.name=""+At(S):e.removeAttribute("name")}function Ff(e,t,n,l,r,u,g,S){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||n!=null){if(!(u!=="submit"&&u!=="reset"||t!=null))return;n=n!=null?""+At(n):"",t=t!=null?""+At(t):n,S||t===e.value||(e.value=t),e.defaultValue=t}l=l??r,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=S?e.checked:!!l,e.defaultChecked=!!l,g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(e.name=g)}function ci(e,t,n){t==="number"&&ar(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Ga(e,t,n,l){if(e=e.options,t){t={};for(var r=0;r<n.length;r++)t["$"+n[r]]=!0;for(n=0;n<e.length;n++)r=t.hasOwnProperty("$"+e[n].value),e[n].selected!==r&&(e[n].selected=r),r&&l&&(e[n].defaultSelected=!0)}else{for(n=""+At(n),t=null,r=0;r<e.length;r++){if(e[r].value===n){e[r].selected=!0,l&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function Jf(e,t,n){if(t!=null&&(t=""+At(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+At(n):""}function Wf(e,t,n,l){if(t==null){if(l!=null){if(n!=null)throw Error(o(92));if(oe(l)){if(1<l.length)throw Error(o(93));l=l[0]}n=l}n==null&&(n=""),t=n}n=At(t),e.defaultValue=n,l=e.textContent,l===n&&l!==""&&l!==null&&(e.value=l)}function Ya(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ty=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 If(e,t,n){var l=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,n):typeof n!="number"||n===0||Ty.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function ed(e,t,n){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,n!=null){for(var l in n)!n.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var r in t)l=t[r],t.hasOwnProperty(r)&&n[r]!==l&&If(e,r,l)}else for(var u in t)t.hasOwnProperty(u)&&If(e,u,t[u])}function ui(e){if(e.indexOf("-")===-1)return!1;switch(e){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 Ay=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"]]),Cy=/^[\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 lr(e){return Cy.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var fi=null;function di(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Va=null,Xa=null;function td(e){var t=La(e);if(t&&(e=t.stateNode)){var n=e[dt]||null;e:switch(e=t.stateNode,t.type){case"input":if(ii(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+Ct(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var l=n[t];if(l!==e&&l.form===e.form){var r=l[dt]||null;if(!r)throw Error(o(90));ii(l,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name)}}for(t=0;t<n.length;t++)l=n[t],l.form===e.form&&$f(l)}break e;case"textarea":Jf(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Ga(e,!!n.multiple,t,!1)}}}var mi=!1;function nd(e,t,n){if(mi)return e(t,n);mi=!0;try{var l=e(t);return l}finally{if(mi=!1,(Va!==null||Xa!==null)&&(Vr(),Va&&(t=Va,e=Xa,Xa=Va=null,td(t),e)))for(t=0;t<e.length;t++)td(e[t])}}function Yl(e,t){var n=e.stateNode;if(n===null)return null;var l=n[dt]||null;if(l===null)return null;n=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(o(231,t,typeof n));return n}var un=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),hi=!1;if(un)try{var Vl={};Object.defineProperty(Vl,"passive",{get:function(){hi=!0}}),window.addEventListener("test",Vl,Vl),window.removeEventListener("test",Vl,Vl)}catch{hi=!1}var Dn=null,pi=null,sr=null;function ad(){if(sr)return sr;var e,t=pi,n=t.length,l,r="value"in Dn?Dn.value:Dn.textContent,u=r.length;for(e=0;e<n&&t[e]===r[e];e++);var g=n-e;for(l=1;l<=g&&t[n-l]===r[u-l];l++);return sr=r.slice(e,1<l?1-l:void 0)}function rr(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function or(){return!0}function ld(){return!1}function mt(e){function t(n,l,r,u,g){this._reactName=n,this._targetInst=r,this.type=l,this.nativeEvent=u,this.target=g,this.currentTarget=null;for(var S in e)e.hasOwnProperty(S)&&(n=e[S],this[S]=n?n(u):u[S]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?or:ld,this.isPropagationStopped=ld,this}return v(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=or)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=or)},persist:function(){},isPersistent:or}),t}var ua={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ir=mt(ua),Xl=v({},ua,{view:0,detail:0}),Ry=mt(Xl),gi,vi,Kl,cr=v({},Xl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:yi,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Kl&&(Kl&&e.type==="mousemove"?(gi=e.screenX-Kl.screenX,vi=e.screenY-Kl.screenY):vi=gi=0,Kl=e),gi)},movementY:function(e){return"movementY"in e?e.movementY:vi}}),sd=mt(cr),Dy=v({},cr,{dataTransfer:0}),Oy=mt(Dy),ky=v({},Xl,{relatedTarget:0}),xi=mt(ky),zy=v({},ua,{animationName:0,elapsedTime:0,pseudoElement:0}),Uy=mt(zy),Ly=v({},ua,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Hy=mt(Ly),By=v({},ua,{data:0}),rd=mt(By),qy={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Gy={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"},Yy={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Vy(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Yy[e])?!!t[e]:!1}function yi(){return Vy}var Xy=v({},Xl,{key:function(e){if(e.key){var t=qy[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=rr(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Gy[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:yi,charCode:function(e){return e.type==="keypress"?rr(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?rr(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Ky=mt(Xy),Qy=v({},cr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),od=mt(Qy),Zy=v({},Xl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:yi}),Py=mt(Zy),$y=v({},ua,{propertyName:0,elapsedTime:0,pseudoElement:0}),Fy=mt($y),Jy=v({},cr,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Wy=mt(Jy),Iy=v({},ua,{newState:0,oldState:0}),e0=mt(Iy),t0=[9,13,27,32],bi=un&&"CompositionEvent"in window,Ql=null;un&&"documentMode"in document&&(Ql=document.documentMode);var n0=un&&"TextEvent"in window&&!Ql,id=un&&(!bi||Ql&&8<Ql&&11>=Ql),cd=" ",ud=!1;function fd(e,t){switch(e){case"keyup":return t0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function dd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ka=!1;function a0(e,t){switch(e){case"compositionend":return dd(t);case"keypress":return t.which!==32?null:(ud=!0,cd);case"textInput":return e=t.data,e===cd&&ud?null:e;default:return null}}function l0(e,t){if(Ka)return e==="compositionend"||!bi&&fd(e,t)?(e=ad(),sr=pi=Dn=null,Ka=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return id&&t.locale!=="ko"?null:t.data;default:return null}}var s0={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 md(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!s0[e.type]:t==="textarea"}function hd(e,t,n,l){Va?Xa?Xa.push(l):Xa=[l]:Va=l,t=$r(t,"onChange"),0<t.length&&(n=new ir("onChange","change",null,n,l),e.push({event:n,listeners:t}))}var Zl=null,Pl=null;function r0(e){Ph(e,0)}function ur(e){var t=Gl(e);if($f(t))return e}function pd(e,t){if(e==="change")return t}var gd=!1;if(un){var Si;if(un){var wi="oninput"in document;if(!wi){var vd=document.createElement("div");vd.setAttribute("oninput","return;"),wi=typeof vd.oninput=="function"}Si=wi}else Si=!1;gd=Si&&(!document.documentMode||9<document.documentMode)}function xd(){Zl&&(Zl.detachEvent("onpropertychange",yd),Pl=Zl=null)}function yd(e){if(e.propertyName==="value"&&ur(Pl)){var t=[];hd(t,Pl,e,di(e)),nd(r0,t)}}function o0(e,t,n){e==="focusin"?(xd(),Zl=t,Pl=n,Zl.attachEvent("onpropertychange",yd)):e==="focusout"&&xd()}function i0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ur(Pl)}function c0(e,t){if(e==="click")return ur(t)}function u0(e,t){if(e==="input"||e==="change")return ur(t)}function f0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var yt=typeof Object.is=="function"?Object.is:f0;function $l(e,t){if(yt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),l=Object.keys(t);if(n.length!==l.length)return!1;for(l=0;l<n.length;l++){var r=n[l];if(!Pt.call(t,r)||!yt(e[r],t[r]))return!1}return!0}function bd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Sd(e,t){var n=bd(e);e=0;for(var l;n;){if(n.nodeType===3){if(l=e+n.textContent.length,e<=t&&l>=t)return{node:n,offset:t-e};e=l}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=bd(n)}}function wd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?wd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Nd(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ar(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ar(e.document)}return t}function Ni(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var d0=un&&"documentMode"in document&&11>=document.documentMode,Qa=null,Ei=null,Fl=null,ji=!1;function Ed(e,t,n){var l=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ji||Qa==null||Qa!==ar(l)||(l=Qa,"selectionStart"in l&&Ni(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Fl&&$l(Fl,l)||(Fl=l,l=$r(Ei,"onSelect"),0<l.length&&(t=new ir("onSelect","select",null,t,n),e.push({event:t,listeners:l}),t.target=Qa)))}function fa(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Za={animationend:fa("Animation","AnimationEnd"),animationiteration:fa("Animation","AnimationIteration"),animationstart:fa("Animation","AnimationStart"),transitionrun:fa("Transition","TransitionRun"),transitionstart:fa("Transition","TransitionStart"),transitioncancel:fa("Transition","TransitionCancel"),transitionend:fa("Transition","TransitionEnd")},_i={},jd={};un&&(jd=document.createElement("div").style,"AnimationEvent"in window||(delete Za.animationend.animation,delete Za.animationiteration.animation,delete Za.animationstart.animation),"TransitionEvent"in window||delete Za.transitionend.transition);function da(e){if(_i[e])return _i[e];if(!Za[e])return e;var t=Za[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in jd)return _i[e]=t[n];return e}var _d=da("animationend"),Md=da("animationiteration"),Td=da("animationstart"),m0=da("transitionrun"),h0=da("transitionstart"),p0=da("transitioncancel"),Ad=da("transitionend"),Cd=new Map,Mi="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(" ");Mi.push("scrollEnd");function Gt(e,t){Cd.set(e,t),ca(t,[e])}var Rd=new WeakMap;function Rt(e,t){if(typeof e=="object"&&e!==null){var n=Rd.get(e);return n!==void 0?n:(t={value:e,source:t,stack:Zf(t)},Rd.set(e,t),t)}return{value:e,source:t,stack:Zf(t)}}var Dt=[],Pa=0,Ti=0;function fr(){for(var e=Pa,t=Ti=Pa=0;t<e;){var n=Dt[t];Dt[t++]=null;var l=Dt[t];Dt[t++]=null;var r=Dt[t];Dt[t++]=null;var u=Dt[t];if(Dt[t++]=null,l!==null&&r!==null){var g=l.pending;g===null?r.next=r:(r.next=g.next,g.next=r),l.pending=r}u!==0&&Dd(n,r,u)}}function dr(e,t,n,l){Dt[Pa++]=e,Dt[Pa++]=t,Dt[Pa++]=n,Dt[Pa++]=l,Ti|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function Ai(e,t,n,l){return dr(e,t,n,l),mr(e)}function $a(e,t){return dr(e,null,null,t),mr(e)}function Dd(e,t,n){e.lanes|=n;var l=e.alternate;l!==null&&(l.lanes|=n);for(var r=!1,u=e.return;u!==null;)u.childLanes|=n,l=u.alternate,l!==null&&(l.childLanes|=n),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(r=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,r&&t!==null&&(r=31-xt(n),e=u.hiddenUpdates,l=e[r],l===null?e[r]=[t]:l.push(t),t.lane=n|536870912),u):null}function mr(e){if(50<Ss)throw Ss=0,zc=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Fa={};function g0(e,t,n,l){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function bt(e,t,n,l){return new g0(e,t,n,l)}function Ci(e){return e=e.prototype,!(!e||!e.isReactComponent)}function fn(e,t){var n=e.alternate;return n===null?(n=bt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Od(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function hr(e,t,n,l,r,u){var g=0;if(l=e,typeof e=="function")Ci(e)&&(g=1);else if(typeof e=="string")g=xb(e,n,ne.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case F:return e=bt(31,n,t,r),e.elementType=F,e.lanes=u,e;case M:return ma(n.children,r,u,t);case E:g=8,r|=24;break;case D:return e=bt(12,n,t,r|2),e.elementType=D,e.lanes=u,e;case j:return e=bt(13,n,t,r),e.elementType=j,e.lanes=u,e;case L:return e=bt(19,n,t,r),e.elementType=L,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case R:case C:g=10;break e;case B:g=9;break e;case A:g=11;break e;case q:g=14;break e;case X:g=16,l=null;break e}g=29,n=Error(o(130,e===null?"null":typeof e,"")),l=null}return t=bt(g,n,t,r),t.elementType=e,t.type=l,t.lanes=u,t}function ma(e,t,n,l){return e=bt(7,e,l,t),e.lanes=n,e}function Ri(e,t,n){return e=bt(6,e,null,t),e.lanes=n,e}function Di(e,t,n){return t=bt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ja=[],Wa=0,pr=null,gr=0,Ot=[],kt=0,ha=null,dn=1,mn="";function pa(e,t){Ja[Wa++]=gr,Ja[Wa++]=pr,pr=e,gr=t}function kd(e,t,n){Ot[kt++]=dn,Ot[kt++]=mn,Ot[kt++]=ha,ha=e;var l=dn;e=mn;var r=32-xt(l)-1;l&=~(1<<r),n+=1;var u=32-xt(t)+r;if(30<u){var g=r-r%5;u=(l&(1<<g)-1).toString(32),l>>=g,r-=g,dn=1<<32-xt(t)+r|n<<r|l,mn=u+e}else dn=1<<u|n<<r|l,mn=e}function Oi(e){e.return!==null&&(pa(e,1),kd(e,1,0))}function ki(e){for(;e===pr;)pr=Ja[--Wa],Ja[Wa]=null,gr=Ja[--Wa],Ja[Wa]=null;for(;e===ha;)ha=Ot[--kt],Ot[kt]=null,mn=Ot[--kt],Ot[kt]=null,dn=Ot[--kt],Ot[kt]=null}var ut=null,Ge=null,Ae=!1,ga=null,Ft=!1,zi=Error(o(519));function va(e){var t=Error(o(418,""));throw Il(Rt(t,e)),zi}function zd(e){var t=e.stateNode,n=e.type,l=e.memoizedProps;switch(t[st]=e,t[dt]=l,n){case"dialog":Ee("cancel",t),Ee("close",t);break;case"iframe":case"object":case"embed":Ee("load",t);break;case"video":case"audio":for(n=0;n<Ns.length;n++)Ee(Ns[n],t);break;case"source":Ee("error",t);break;case"img":case"image":case"link":Ee("error",t),Ee("load",t);break;case"details":Ee("toggle",t);break;case"input":Ee("invalid",t),Ff(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0),nr(t);break;case"select":Ee("invalid",t);break;case"textarea":Ee("invalid",t),Wf(t,l.value,l.defaultValue,l.children),nr(t)}n=l.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||l.suppressHydrationWarning===!0||Wh(t.textContent,n)?(l.popover!=null&&(Ee("beforetoggle",t),Ee("toggle",t)),l.onScroll!=null&&Ee("scroll",t),l.onScrollEnd!=null&&Ee("scrollend",t),l.onClick!=null&&(t.onclick=Fr),t=!0):t=!1,t||va(e)}function Ud(e){for(ut=e.return;ut;)switch(ut.tag){case 5:case 13:Ft=!1;return;case 27:case 3:Ft=!0;return;default:ut=ut.return}}function Jl(e){if(e!==ut)return!1;if(!Ae)return Ud(e),Ae=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||Jc(e.type,e.memoizedProps)),n=!n),n&&Ge&&va(e),Ud(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8)if(n=e.data,n==="/$"){if(t===0){Ge=Vt(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++;e=e.nextSibling}Ge=null}}else t===27?(t=Ge,Pn(e.type)?(e=tu,tu=null,Ge=e):Ge=t):Ge=ut?Vt(e.stateNode.nextSibling):null;return!0}function Wl(){Ge=ut=null,Ae=!1}function Ld(){var e=ga;return e!==null&&(gt===null?gt=e:gt.push.apply(gt,e),ga=null),e}function Il(e){ga===null?ga=[e]:ga.push(e)}var Ui=P(null),xa=null,hn=null;function On(e,t,n){J(Ui,t._currentValue),t._currentValue=n}function pn(e){e._currentValue=Ui.current,te(Ui)}function Li(e,t,n){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===n)break;e=e.return}}function Hi(e,t,n,l){var r=e.child;for(r!==null&&(r.return=e);r!==null;){var u=r.dependencies;if(u!==null){var g=r.child;u=u.firstContext;e:for(;u!==null;){var S=u;u=r;for(var _=0;_<t.length;_++)if(S.context===t[_]){u.lanes|=n,S=u.alternate,S!==null&&(S.lanes|=n),Li(u.return,n,e),l||(g=null);break e}u=S.next}}else if(r.tag===18){if(g=r.return,g===null)throw Error(o(341));g.lanes|=n,u=g.alternate,u!==null&&(u.lanes|=n),Li(g,n,e),g=null}else g=r.child;if(g!==null)g.return=r;else for(g=r;g!==null;){if(g===e){g=null;break}if(r=g.sibling,r!==null){r.return=g.return,g=r;break}g=g.return}r=g}}function es(e,t,n,l){e=null;for(var r=t,u=!1;r!==null;){if(!u){if((r.flags&524288)!==0)u=!0;else if((r.flags&262144)!==0)break}if(r.tag===10){var g=r.alternate;if(g===null)throw Error(o(387));if(g=g.memoizedProps,g!==null){var S=r.type;yt(r.pendingProps.value,g.value)||(e!==null?e.push(S):e=[S])}}else if(r===ue.current){if(g=r.alternate,g===null)throw Error(o(387));g.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(As):e=[As])}r=r.return}e!==null&&Hi(t,e,n,l),t.flags|=262144}function vr(e){for(e=e.firstContext;e!==null;){if(!yt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ya(e){xa=e,hn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function rt(e){return Hd(xa,e)}function xr(e,t){return xa===null&&ya(e),Hd(e,t)}function Hd(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},hn===null){if(e===null)throw Error(o(308));hn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else hn=hn.next=t;return n}var v0=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},x0=a.unstable_scheduleCallback,y0=a.unstable_NormalPriority,$e={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Bi(){return{controller:new v0,data:new Map,refCount:0}}function ts(e){e.refCount--,e.refCount===0&&x0(y0,function(){e.controller.abort()})}var ns=null,qi=0,Ia=0,el=null;function b0(e,t){if(ns===null){var n=ns=[];qi=0,Ia=Yc(),el={status:"pending",value:void 0,then:function(l){n.push(l)}}}return qi++,t.then(Bd,Bd),t}function Bd(){if(--qi===0&&ns!==null){el!==null&&(el.status="fulfilled");var e=ns;ns=null,Ia=0,el=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function S0(e,t){var n=[],l={status:"pending",value:null,reason:null,then:function(r){n.push(r)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var r=0;r<n.length;r++)(0,n[r])(t)},function(r){for(l.status="rejected",l.reason=r,r=0;r<n.length;r++)(0,n[r])(void 0)}),l}var qd=k.S;k.S=function(e,t){typeof t=="object"&&t!==null&&typeof t.then=="function"&&b0(e,t),qd!==null&&qd(e,t)};var ba=P(null);function Gi(){var e=ba.current;return e!==null?e:Le.pooledCache}function yr(e,t){t===null?J(ba,ba.current):J(ba,t.pool)}function Gd(){var e=Gi();return e===null?null:{parent:$e._currentValue,pool:e}}var as=Error(o(460)),Yd=Error(o(474)),br=Error(o(542)),Yi={then:function(){}};function Vd(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Sr(){}function Xd(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Sr,Sr),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Qd(e),e;default:if(typeof t.status=="string")t.then(Sr,Sr);else{if(e=Le,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var r=t;r.status="fulfilled",r.value=l}},function(l){if(t.status==="pending"){var r=t;r.status="rejected",r.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Qd(e),e}throw ls=t,as}}var ls=null;function Kd(){if(ls===null)throw Error(o(459));var e=ls;return ls=null,e}function Qd(e){if(e===as||e===br)throw Error(o(483))}var kn=!1;function Vi(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Xi(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function zn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Un(e,t,n){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Re&2)!==0){var r=l.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),l.pending=t,t=mr(e),Dd(e,null,n),t}return dr(e,l,t,n),mr(e)}function ss(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,Bf(e,n)}}function Ki(e,t){var n=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,n===l)){var r=null,u=null;if(n=n.firstBaseUpdate,n!==null){do{var g={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};u===null?r=u=g:u=u.next=g,n=n.next}while(n!==null);u===null?r=u=t:u=u.next=t}else r=u=t;n={baseState:l.baseState,firstBaseUpdate:r,lastBaseUpdate:u,shared:l.shared,callbacks:l.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Qi=!1;function rs(){if(Qi){var e=el;if(e!==null)throw e}}function os(e,t,n,l){Qi=!1;var r=e.updateQueue;kn=!1;var u=r.firstBaseUpdate,g=r.lastBaseUpdate,S=r.shared.pending;if(S!==null){r.shared.pending=null;var _=S,H=_.next;_.next=null,g===null?u=H:g.next=H,g=_;var Q=e.alternate;Q!==null&&(Q=Q.updateQueue,S=Q.lastBaseUpdate,S!==g&&(S===null?Q.firstBaseUpdate=H:S.next=H,Q.lastBaseUpdate=_))}if(u!==null){var $=r.baseState;g=0,Q=H=_=null,S=u;do{var G=S.lane&-536870913,V=G!==S.lane;if(V?(_e&G)===G:(l&G)===G){G!==0&&G===Ia&&(Qi=!0),Q!==null&&(Q=Q.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var ve=e,fe=S;G=t;var ze=n;switch(fe.tag){case 1:if(ve=fe.payload,typeof ve=="function"){$=ve.call(ze,$,G);break e}$=ve;break e;case 3:ve.flags=ve.flags&-65537|128;case 0:if(ve=fe.payload,G=typeof ve=="function"?ve.call(ze,$,G):ve,G==null)break e;$=v({},$,G);break e;case 2:kn=!0}}G=S.callback,G!==null&&(e.flags|=64,V&&(e.flags|=8192),V=r.callbacks,V===null?r.callbacks=[G]:V.push(G))}else V={lane:G,tag:S.tag,payload:S.payload,callback:S.callback,next:null},Q===null?(H=Q=V,_=$):Q=Q.next=V,g|=G;if(S=S.next,S===null){if(S=r.shared.pending,S===null)break;V=S,S=V.next,V.next=null,r.lastBaseUpdate=V,r.shared.pending=null}}while(!0);Q===null&&(_=$),r.baseState=_,r.firstBaseUpdate=H,r.lastBaseUpdate=Q,u===null&&(r.shared.lanes=0),Xn|=g,e.lanes=g,e.memoizedState=$}}function Zd(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function Pd(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Zd(n[e],t)}var tl=P(null),wr=P(0);function $d(e,t){e=wn,J(wr,e),J(tl,t),wn=e|t.baseLanes}function Zi(){J(wr,wn),J(tl,tl.current)}function Pi(){wn=wr.current,te(tl),te(wr)}var Ln=0,be=null,Oe=null,Ze=null,Nr=!1,nl=!1,Sa=!1,Er=0,is=0,al=null,w0=0;function Ke(){throw Error(o(321))}function $i(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!yt(e[n],t[n]))return!1;return!0}function Fi(e,t,n,l,r,u){return Ln=u,be=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,k.H=e===null||e.memoizedState===null?Dm:Om,Sa=!1,u=n(l,r),Sa=!1,nl&&(u=Jd(t,n,l,r)),Fd(e),u}function Fd(e){k.H=Cr;var t=Oe!==null&&Oe.next!==null;if(Ln=0,Ze=Oe=be=null,Nr=!1,is=0,al=null,t)throw Error(o(300));e===null||Ie||(e=e.dependencies,e!==null&&vr(e)&&(Ie=!0))}function Jd(e,t,n,l){be=e;var r=0;do{if(nl&&(al=null),is=0,nl=!1,25<=r)throw Error(o(301));if(r+=1,Ze=Oe=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}k.H=A0,u=t(n,l)}while(nl);return u}function N0(){var e=k.H,t=e.useState()[0];return t=typeof t.then=="function"?cs(t):t,e=e.useState()[0],(Oe!==null?Oe.memoizedState:null)!==e&&(be.flags|=1024),t}function Ji(){var e=Er!==0;return Er=0,e}function Wi(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Ii(e){if(Nr){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Nr=!1}Ln=0,Ze=Oe=be=null,nl=!1,is=Er=0,al=null}function ht(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ze===null?be.memoizedState=Ze=e:Ze=Ze.next=e,Ze}function Pe(){if(Oe===null){var e=be.alternate;e=e!==null?e.memoizedState:null}else e=Oe.next;var t=Ze===null?be.memoizedState:Ze.next;if(t!==null)Ze=t,Oe=e;else{if(e===null)throw be.alternate===null?Error(o(467)):Error(o(310));Oe=e,e={memoizedState:Oe.memoizedState,baseState:Oe.baseState,baseQueue:Oe.baseQueue,queue:Oe.queue,next:null},Ze===null?be.memoizedState=Ze=e:Ze=Ze.next=e}return Ze}function ec(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function cs(e){var t=is;return is+=1,al===null&&(al=[]),e=Xd(al,e,t),t=be,(Ze===null?t.memoizedState:Ze.next)===null&&(t=t.alternate,k.H=t===null||t.memoizedState===null?Dm:Om),e}function jr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return cs(e);if(e.$$typeof===C)return rt(e)}throw Error(o(438,String(e)))}function tc(e){var t=null,n=be.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var l=be.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(r){return r.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=ec(),be.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),l=0;l<e;l++)n[l]=ee;return t.index++,n}function gn(e,t){return typeof t=="function"?t(e):t}function _r(e){var t=Pe();return nc(t,Oe,e)}function nc(e,t,n){var l=e.queue;if(l===null)throw Error(o(311));l.lastRenderedReducer=n;var r=e.baseQueue,u=l.pending;if(u!==null){if(r!==null){var g=r.next;r.next=u.next,u.next=g}t.baseQueue=r=u,l.pending=null}if(u=e.baseState,r===null)e.memoizedState=u;else{t=r.next;var S=g=null,_=null,H=t,Q=!1;do{var $=H.lane&-536870913;if($!==H.lane?(_e&$)===$:(Ln&$)===$){var G=H.revertLane;if(G===0)_!==null&&(_=_.next={lane:0,revertLane:0,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null}),$===Ia&&(Q=!0);else if((Ln&G)===G){H=H.next,G===Ia&&(Q=!0);continue}else $={lane:0,revertLane:H.revertLane,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null},_===null?(S=_=$,g=u):_=_.next=$,be.lanes|=G,Xn|=G;$=H.action,Sa&&n(u,$),u=H.hasEagerState?H.eagerState:n(u,$)}else G={lane:$,revertLane:H.revertLane,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null},_===null?(S=_=G,g=u):_=_.next=G,be.lanes|=$,Xn|=$;H=H.next}while(H!==null&&H!==t);if(_===null?g=u:_.next=S,!yt(u,e.memoizedState)&&(Ie=!0,Q&&(n=el,n!==null)))throw n;e.memoizedState=u,e.baseState=g,e.baseQueue=_,l.lastRenderedState=u}return r===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function ac(e){var t=Pe(),n=t.queue;if(n===null)throw Error(o(311));n.lastRenderedReducer=e;var l=n.dispatch,r=n.pending,u=t.memoizedState;if(r!==null){n.pending=null;var g=r=r.next;do u=e(u,g.action),g=g.next;while(g!==r);yt(u,t.memoizedState)||(Ie=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),n.lastRenderedState=u}return[u,l]}function Wd(e,t,n){var l=be,r=Pe(),u=Ae;if(u){if(n===void 0)throw Error(o(407));n=n()}else n=t();var g=!yt((Oe||r).memoizedState,n);g&&(r.memoizedState=n,Ie=!0),r=r.queue;var S=tm.bind(null,l,r,e);if(us(2048,8,S,[e]),r.getSnapshot!==t||g||Ze!==null&&Ze.memoizedState.tag&1){if(l.flags|=2048,ll(9,Mr(),em.bind(null,l,r,n,t),null),Le===null)throw Error(o(349));u||(Ln&124)!==0||Id(l,t,n)}return n}function Id(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=be.updateQueue,t===null?(t=ec(),be.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function em(e,t,n,l){t.value=n,t.getSnapshot=l,nm(t)&&am(e)}function tm(e,t,n){return n(function(){nm(t)&&am(e)})}function nm(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!yt(e,n)}catch{return!0}}function am(e){var t=$a(e,2);t!==null&&jt(t,e,2)}function lc(e){var t=ht();if(typeof e=="function"){var n=e;if(e=n(),Sa){Cn(!0);try{n()}finally{Cn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:gn,lastRenderedState:e},t}function lm(e,t,n,l){return e.baseState=n,nc(e,Oe,typeof l=="function"?l:gn)}function E0(e,t,n,l,r){if(Ar(e))throw Error(o(485));if(e=t.action,e!==null){var u={payload:r,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(g){u.listeners.push(g)}};k.T!==null?n(!0):u.isTransition=!1,l(u),n=t.pending,n===null?(u.next=t.pending=u,sm(t,u)):(u.next=n.next,t.pending=n.next=u)}}function sm(e,t){var n=t.action,l=t.payload,r=e.state;if(t.isTransition){var u=k.T,g={};k.T=g;try{var S=n(r,l),_=k.S;_!==null&&_(g,S),rm(e,t,S)}catch(H){sc(e,t,H)}finally{k.T=u}}else try{u=n(r,l),rm(e,t,u)}catch(H){sc(e,t,H)}}function rm(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(l){om(e,t,l)},function(l){return sc(e,t,l)}):om(e,t,n)}function om(e,t,n){t.status="fulfilled",t.value=n,im(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,sm(e,n)))}function sc(e,t,n){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=n,im(t),t=t.next;while(t!==l)}e.action=null}function im(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function cm(e,t){return t}function um(e,t){if(Ae){var n=Le.formState;if(n!==null){e:{var l=be;if(Ae){if(Ge){t:{for(var r=Ge,u=Ft;r.nodeType!==8;){if(!u){r=null;break t}if(r=Vt(r.nextSibling),r===null){r=null;break t}}u=r.data,r=u==="F!"||u==="F"?r:null}if(r){Ge=Vt(r.nextSibling),l=r.data==="F!";break e}}va(l)}l=!1}l&&(t=n[0])}}return n=ht(),n.memoizedState=n.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:cm,lastRenderedState:t},n.queue=l,n=Am.bind(null,be,l),l.dispatch=n,l=lc(!1),u=uc.bind(null,be,!1,l.queue),l=ht(),r={state:t,dispatch:null,action:e,pending:null},l.queue=r,n=E0.bind(null,be,r,u,n),r.dispatch=n,l.memoizedState=e,[t,n,!1]}function fm(e){var t=Pe();return dm(t,Oe,e)}function dm(e,t,n){if(t=nc(e,t,cm)[0],e=_r(gn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=cs(t)}catch(g){throw g===as?br:g}else l=t;t=Pe();var r=t.queue,u=r.dispatch;return n!==t.memoizedState&&(be.flags|=2048,ll(9,Mr(),j0.bind(null,r,n),null)),[l,u,e]}function j0(e,t){e.action=t}function mm(e){var t=Pe(),n=Oe;if(n!==null)return dm(t,n,e);Pe(),t=t.memoizedState,n=Pe();var l=n.queue.dispatch;return n.memoizedState=e,[t,l,!1]}function ll(e,t,n,l){return e={tag:e,create:n,deps:l,inst:t,next:null},t=be.updateQueue,t===null&&(t=ec(),be.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(l=n.next,n.next=e,e.next=l,t.lastEffect=e),e}function Mr(){return{destroy:void 0,resource:void 0}}function hm(){return Pe().memoizedState}function Tr(e,t,n,l){var r=ht();l=l===void 0?null:l,be.flags|=e,r.memoizedState=ll(1|t,Mr(),n,l)}function us(e,t,n,l){var r=Pe();l=l===void 0?null:l;var u=r.memoizedState.inst;Oe!==null&&l!==null&&$i(l,Oe.memoizedState.deps)?r.memoizedState=ll(t,u,n,l):(be.flags|=e,r.memoizedState=ll(1|t,u,n,l))}function pm(e,t){Tr(8390656,8,e,t)}function gm(e,t){us(2048,8,e,t)}function vm(e,t){return us(4,2,e,t)}function xm(e,t){return us(4,4,e,t)}function ym(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function bm(e,t,n){n=n!=null?n.concat([e]):null,us(4,4,ym.bind(null,t,e),n)}function rc(){}function Sm(e,t){var n=Pe();t=t===void 0?null:t;var l=n.memoizedState;return t!==null&&$i(t,l[1])?l[0]:(n.memoizedState=[e,t],e)}function wm(e,t){var n=Pe();t=t===void 0?null:t;var l=n.memoizedState;if(t!==null&&$i(t,l[1]))return l[0];if(l=e(),Sa){Cn(!0);try{e()}finally{Cn(!1)}}return n.memoizedState=[l,t],l}function oc(e,t,n){return n===void 0||(Ln&1073741824)!==0?e.memoizedState=t:(e.memoizedState=n,e=jh(),be.lanes|=e,Xn|=e,n)}function Nm(e,t,n,l){return yt(n,t)?n:tl.current!==null?(e=oc(e,n,l),yt(e,t)||(Ie=!0),e):(Ln&42)===0?(Ie=!0,e.memoizedState=n):(e=jh(),be.lanes|=e,Xn|=e,t)}function Em(e,t,n,l,r){var u=K.p;K.p=u!==0&&8>u?u:8;var g=k.T,S={};k.T=S,uc(e,!1,t,n);try{var _=r(),H=k.S;if(H!==null&&H(S,_),_!==null&&typeof _=="object"&&typeof _.then=="function"){var Q=S0(_,l);fs(e,t,Q,Et(e))}else fs(e,t,l,Et(e))}catch($){fs(e,t,{then:function(){},status:"rejected",reason:$},Et())}finally{K.p=u,k.T=g}}function _0(){}function ic(e,t,n,l){if(e.tag!==5)throw Error(o(476));var r=jm(e).queue;Em(e,r,t,Y,n===null?_0:function(){return _m(e),n(l)})}function jm(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Y,baseState:Y,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:gn,lastRenderedState:Y},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:gn,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function _m(e){var t=jm(e).next.queue;fs(e,t,{},Et())}function cc(){return rt(As)}function Mm(){return Pe().memoizedState}function Tm(){return Pe().memoizedState}function M0(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Et();e=zn(n);var l=Un(t,e,n);l!==null&&(jt(l,t,n),ss(l,t,n)),t={cache:Bi()},e.payload=t;return}t=t.return}}function T0(e,t,n){var l=Et();n={lane:l,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null},Ar(e)?Cm(t,n):(n=Ai(e,t,n,l),n!==null&&(jt(n,e,l),Rm(n,t,l)))}function Am(e,t,n){var l=Et();fs(e,t,n,l)}function fs(e,t,n,l){var r={lane:l,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ar(e))Cm(t,r);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var g=t.lastRenderedState,S=u(g,n);if(r.hasEagerState=!0,r.eagerState=S,yt(S,g))return dr(e,t,r,0),Le===null&&fr(),!1}catch{}finally{}if(n=Ai(e,t,r,l),n!==null)return jt(n,e,l),Rm(n,t,l),!0}return!1}function uc(e,t,n,l){if(l={lane:2,revertLane:Yc(),action:l,hasEagerState:!1,eagerState:null,next:null},Ar(e)){if(t)throw Error(o(479))}else t=Ai(e,n,l,2),t!==null&&jt(t,e,2)}function Ar(e){var t=e.alternate;return e===be||t!==null&&t===be}function Cm(e,t){nl=Nr=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Rm(e,t,n){if((n&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,Bf(e,n)}}var Cr={readContext:rt,use:jr,useCallback:Ke,useContext:Ke,useEffect:Ke,useImperativeHandle:Ke,useLayoutEffect:Ke,useInsertionEffect:Ke,useMemo:Ke,useReducer:Ke,useRef:Ke,useState:Ke,useDebugValue:Ke,useDeferredValue:Ke,useTransition:Ke,useSyncExternalStore:Ke,useId:Ke,useHostTransitionStatus:Ke,useFormState:Ke,useActionState:Ke,useOptimistic:Ke,useMemoCache:Ke,useCacheRefresh:Ke},Dm={readContext:rt,use:jr,useCallback:function(e,t){return ht().memoizedState=[e,t===void 0?null:t],e},useContext:rt,useEffect:pm,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Tr(4194308,4,ym.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Tr(4194308,4,e,t)},useInsertionEffect:function(e,t){Tr(4,2,e,t)},useMemo:function(e,t){var n=ht();t=t===void 0?null:t;var l=e();if(Sa){Cn(!0);try{e()}finally{Cn(!1)}}return n.memoizedState=[l,t],l},useReducer:function(e,t,n){var l=ht();if(n!==void 0){var r=n(t);if(Sa){Cn(!0);try{n(t)}finally{Cn(!1)}}}else r=t;return l.memoizedState=l.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},l.queue=e,e=e.dispatch=T0.bind(null,be,e),[l.memoizedState,e]},useRef:function(e){var t=ht();return e={current:e},t.memoizedState=e},useState:function(e){e=lc(e);var t=e.queue,n=Am.bind(null,be,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:rc,useDeferredValue:function(e,t){var n=ht();return oc(n,e,t)},useTransition:function(){var e=lc(!1);return e=Em.bind(null,be,e.queue,!0,!1),ht().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var l=be,r=ht();if(Ae){if(n===void 0)throw Error(o(407));n=n()}else{if(n=t(),Le===null)throw Error(o(349));(_e&124)!==0||Id(l,t,n)}r.memoizedState=n;var u={value:n,getSnapshot:t};return r.queue=u,pm(tm.bind(null,l,u,e),[e]),l.flags|=2048,ll(9,Mr(),em.bind(null,l,u,n,t),null),n},useId:function(){var e=ht(),t=Le.identifierPrefix;if(Ae){var n=mn,l=dn;n=(l&~(1<<32-xt(l)-1)).toString(32)+n,t="«"+t+"R"+n,n=Er++,0<n&&(t+="H"+n.toString(32)),t+="»"}else n=w0++,t="«"+t+"r"+n.toString(32)+"»";return e.memoizedState=t},useHostTransitionStatus:cc,useFormState:um,useActionState:um,useOptimistic:function(e){var t=ht();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=uc.bind(null,be,!0,n),n.dispatch=t,[e,t]},useMemoCache:tc,useCacheRefresh:function(){return ht().memoizedState=M0.bind(null,be)}},Om={readContext:rt,use:jr,useCallback:Sm,useContext:rt,useEffect:gm,useImperativeHandle:bm,useInsertionEffect:vm,useLayoutEffect:xm,useMemo:wm,useReducer:_r,useRef:hm,useState:function(){return _r(gn)},useDebugValue:rc,useDeferredValue:function(e,t){var n=Pe();return Nm(n,Oe.memoizedState,e,t)},useTransition:function(){var e=_r(gn)[0],t=Pe().memoizedState;return[typeof e=="boolean"?e:cs(e),t]},useSyncExternalStore:Wd,useId:Mm,useHostTransitionStatus:cc,useFormState:fm,useActionState:fm,useOptimistic:function(e,t){var n=Pe();return lm(n,Oe,e,t)},useMemoCache:tc,useCacheRefresh:Tm},A0={readContext:rt,use:jr,useCallback:Sm,useContext:rt,useEffect:gm,useImperativeHandle:bm,useInsertionEffect:vm,useLayoutEffect:xm,useMemo:wm,useReducer:ac,useRef:hm,useState:function(){return ac(gn)},useDebugValue:rc,useDeferredValue:function(e,t){var n=Pe();return Oe===null?oc(n,e,t):Nm(n,Oe.memoizedState,e,t)},useTransition:function(){var e=ac(gn)[0],t=Pe().memoizedState;return[typeof e=="boolean"?e:cs(e),t]},useSyncExternalStore:Wd,useId:Mm,useHostTransitionStatus:cc,useFormState:mm,useActionState:mm,useOptimistic:function(e,t){var n=Pe();return Oe!==null?lm(n,Oe,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:tc,useCacheRefresh:Tm},sl=null,ds=0;function Rr(e){var t=ds;return ds+=1,sl===null&&(sl=[]),Xd(sl,e,t)}function ms(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Dr(e,t){throw t.$$typeof===b?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function km(e){var t=e._init;return t(e._payload)}function zm(e){function t(z,O){if(e){var U=z.deletions;U===null?(z.deletions=[O],z.flags|=16):U.push(O)}}function n(z,O){if(!e)return null;for(;O!==null;)t(z,O),O=O.sibling;return null}function l(z){for(var O=new Map;z!==null;)z.key!==null?O.set(z.key,z):O.set(z.index,z),z=z.sibling;return O}function r(z,O){return z=fn(z,O),z.index=0,z.sibling=null,z}function u(z,O,U){return z.index=U,e?(U=z.alternate,U!==null?(U=U.index,U<O?(z.flags|=67108866,O):U):(z.flags|=67108866,O)):(z.flags|=1048576,O)}function g(z){return e&&z.alternate===null&&(z.flags|=67108866),z}function S(z,O,U,Z){return O===null||O.tag!==6?(O=Ri(U,z.mode,Z),O.return=z,O):(O=r(O,U),O.return=z,O)}function _(z,O,U,Z){var le=U.type;return le===M?Q(z,O,U.props.children,Z,U.key):O!==null&&(O.elementType===le||typeof le=="object"&&le!==null&&le.$$typeof===X&&km(le)===O.type)?(O=r(O,U.props),ms(O,U),O.return=z,O):(O=hr(U.type,U.key,U.props,null,z.mode,Z),ms(O,U),O.return=z,O)}function H(z,O,U,Z){return O===null||O.tag!==4||O.stateNode.containerInfo!==U.containerInfo||O.stateNode.implementation!==U.implementation?(O=Di(U,z.mode,Z),O.return=z,O):(O=r(O,U.children||[]),O.return=z,O)}function Q(z,O,U,Z,le){return O===null||O.tag!==7?(O=ma(U,z.mode,Z,le),O.return=z,O):(O=r(O,U),O.return=z,O)}function $(z,O,U){if(typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint")return O=Ri(""+O,z.mode,U),O.return=z,O;if(typeof O=="object"&&O!==null){switch(O.$$typeof){case w:return U=hr(O.type,O.key,O.props,null,z.mode,U),ms(U,O),U.return=z,U;case N:return O=Di(O,z.mode,U),O.return=z,O;case X:var Z=O._init;return O=Z(O._payload),$(z,O,U)}if(oe(O)||ae(O))return O=ma(O,z.mode,U,null),O.return=z,O;if(typeof O.then=="function")return $(z,Rr(O),U);if(O.$$typeof===C)return $(z,xr(z,O),U);Dr(z,O)}return null}function G(z,O,U,Z){var le=O!==null?O.key:null;if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return le!==null?null:S(z,O,""+U,Z);if(typeof U=="object"&&U!==null){switch(U.$$typeof){case w:return U.key===le?_(z,O,U,Z):null;case N:return U.key===le?H(z,O,U,Z):null;case X:return le=U._init,U=le(U._payload),G(z,O,U,Z)}if(oe(U)||ae(U))return le!==null?null:Q(z,O,U,Z,null);if(typeof U.then=="function")return G(z,O,Rr(U),Z);if(U.$$typeof===C)return G(z,O,xr(z,U),Z);Dr(z,U)}return null}function V(z,O,U,Z,le){if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return z=z.get(U)||null,S(O,z,""+Z,le);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case w:return z=z.get(Z.key===null?U:Z.key)||null,_(O,z,Z,le);case N:return z=z.get(Z.key===null?U:Z.key)||null,H(O,z,Z,le);case X:var we=Z._init;return Z=we(Z._payload),V(z,O,U,Z,le)}if(oe(Z)||ae(Z))return z=z.get(U)||null,Q(O,z,Z,le,null);if(typeof Z.then=="function")return V(z,O,U,Rr(Z),le);if(Z.$$typeof===C)return V(z,O,U,xr(O,Z),le);Dr(O,Z)}return null}function ve(z,O,U,Z){for(var le=null,we=null,ie=O,de=O=0,tt=null;ie!==null&&de<U.length;de++){ie.index>de?(tt=ie,ie=null):tt=ie.sibling;var Te=G(z,ie,U[de],Z);if(Te===null){ie===null&&(ie=tt);break}e&&ie&&Te.alternate===null&&t(z,ie),O=u(Te,O,de),we===null?le=Te:we.sibling=Te,we=Te,ie=tt}if(de===U.length)return n(z,ie),Ae&&pa(z,de),le;if(ie===null){for(;de<U.length;de++)ie=$(z,U[de],Z),ie!==null&&(O=u(ie,O,de),we===null?le=ie:we.sibling=ie,we=ie);return Ae&&pa(z,de),le}for(ie=l(ie);de<U.length;de++)tt=V(ie,z,de,U[de],Z),tt!==null&&(e&&tt.alternate!==null&&ie.delete(tt.key===null?de:tt.key),O=u(tt,O,de),we===null?le=tt:we.sibling=tt,we=tt);return e&&ie.forEach(function(In){return t(z,In)}),Ae&&pa(z,de),le}function fe(z,O,U,Z){if(U==null)throw Error(o(151));for(var le=null,we=null,ie=O,de=O=0,tt=null,Te=U.next();ie!==null&&!Te.done;de++,Te=U.next()){ie.index>de?(tt=ie,ie=null):tt=ie.sibling;var In=G(z,ie,Te.value,Z);if(In===null){ie===null&&(ie=tt);break}e&&ie&&In.alternate===null&&t(z,ie),O=u(In,O,de),we===null?le=In:we.sibling=In,we=In,ie=tt}if(Te.done)return n(z,ie),Ae&&pa(z,de),le;if(ie===null){for(;!Te.done;de++,Te=U.next())Te=$(z,Te.value,Z),Te!==null&&(O=u(Te,O,de),we===null?le=Te:we.sibling=Te,we=Te);return Ae&&pa(z,de),le}for(ie=l(ie);!Te.done;de++,Te=U.next())Te=V(ie,z,de,Te.value,Z),Te!==null&&(e&&Te.alternate!==null&&ie.delete(Te.key===null?de:Te.key),O=u(Te,O,de),we===null?le=Te:we.sibling=Te,we=Te);return e&&ie.forEach(function(Cb){return t(z,Cb)}),Ae&&pa(z,de),le}function ze(z,O,U,Z){if(typeof U=="object"&&U!==null&&U.type===M&&U.key===null&&(U=U.props.children),typeof U=="object"&&U!==null){switch(U.$$typeof){case w:e:{for(var le=U.key;O!==null;){if(O.key===le){if(le=U.type,le===M){if(O.tag===7){n(z,O.sibling),Z=r(O,U.props.children),Z.return=z,z=Z;break e}}else if(O.elementType===le||typeof le=="object"&&le!==null&&le.$$typeof===X&&km(le)===O.type){n(z,O.sibling),Z=r(O,U.props),ms(Z,U),Z.return=z,z=Z;break e}n(z,O);break}else t(z,O);O=O.sibling}U.type===M?(Z=ma(U.props.children,z.mode,Z,U.key),Z.return=z,z=Z):(Z=hr(U.type,U.key,U.props,null,z.mode,Z),ms(Z,U),Z.return=z,z=Z)}return g(z);case N:e:{for(le=U.key;O!==null;){if(O.key===le)if(O.tag===4&&O.stateNode.containerInfo===U.containerInfo&&O.stateNode.implementation===U.implementation){n(z,O.sibling),Z=r(O,U.children||[]),Z.return=z,z=Z;break e}else{n(z,O);break}else t(z,O);O=O.sibling}Z=Di(U,z.mode,Z),Z.return=z,z=Z}return g(z);case X:return le=U._init,U=le(U._payload),ze(z,O,U,Z)}if(oe(U))return ve(z,O,U,Z);if(ae(U)){if(le=ae(U),typeof le!="function")throw Error(o(150));return U=le.call(U),fe(z,O,U,Z)}if(typeof U.then=="function")return ze(z,O,Rr(U),Z);if(U.$$typeof===C)return ze(z,O,xr(z,U),Z);Dr(z,U)}return typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint"?(U=""+U,O!==null&&O.tag===6?(n(z,O.sibling),Z=r(O,U),Z.return=z,z=Z):(n(z,O),Z=Ri(U,z.mode,Z),Z.return=z,z=Z),g(z)):n(z,O)}return function(z,O,U,Z){try{ds=0;var le=ze(z,O,U,Z);return sl=null,le}catch(ie){if(ie===as||ie===br)throw ie;var we=bt(29,ie,null,z.mode);return we.lanes=Z,we.return=z,we}finally{}}}var rl=zm(!0),Um=zm(!1),zt=P(null),Jt=null;function Hn(e){var t=e.alternate;J(Fe,Fe.current&1),J(zt,e),Jt===null&&(t===null||tl.current!==null||t.memoizedState!==null)&&(Jt=e)}function Lm(e){if(e.tag===22){if(J(Fe,Fe.current),J(zt,e),Jt===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(Jt=e)}}else Bn()}function Bn(){J(Fe,Fe.current),J(zt,zt.current)}function vn(e){te(zt),Jt===e&&(Jt=null),te(Fe)}var Fe=P(0);function Or(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||eu(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function fc(e,t,n,l){t=e.memoizedState,n=n(l,t),n=n==null?t:v({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var dc={enqueueSetState:function(e,t,n){e=e._reactInternals;var l=Et(),r=zn(l);r.payload=t,n!=null&&(r.callback=n),t=Un(e,r,l),t!==null&&(jt(t,e,l),ss(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var l=Et(),r=zn(l);r.tag=1,r.payload=t,n!=null&&(r.callback=n),t=Un(e,r,l),t!==null&&(jt(t,e,l),ss(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Et(),l=zn(n);l.tag=2,t!=null&&(l.callback=t),t=Un(e,l,n),t!==null&&(jt(t,e,n),ss(t,e,n))}};function Hm(e,t,n,l,r,u,g){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,u,g):t.prototype&&t.prototype.isPureReactComponent?!$l(n,l)||!$l(r,u):!0}function Bm(e,t,n,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,l),t.state!==e&&dc.enqueueReplaceState(t,t.state,null)}function wa(e,t){var n=t;if("ref"in t){n={};for(var l in t)l!=="ref"&&(n[l]=t[l])}if(e=e.defaultProps){n===t&&(n=v({},n));for(var r in e)n[r]===void 0&&(n[r]=e[r])}return n}var kr=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function qm(e){kr(e)}function Gm(e){console.error(e)}function Ym(e){kr(e)}function zr(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function Vm(e,t,n){try{var l=e.onCaughtError;l(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function mc(e,t,n){return n=zn(n),n.tag=3,n.payload={element:null},n.callback=function(){zr(e,t)},n}function Xm(e){return e=zn(e),e.tag=3,e}function Km(e,t,n,l){var r=n.type.getDerivedStateFromError;if(typeof r=="function"){var u=l.value;e.payload=function(){return r(u)},e.callback=function(){Vm(t,n,l)}}var g=n.stateNode;g!==null&&typeof g.componentDidCatch=="function"&&(e.callback=function(){Vm(t,n,l),typeof r!="function"&&(Kn===null?Kn=new Set([this]):Kn.add(this));var S=l.stack;this.componentDidCatch(l.value,{componentStack:S!==null?S:""})})}function C0(e,t,n,l,r){if(n.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=n.alternate,t!==null&&es(t,n,r,!0),n=zt.current,n!==null){switch(n.tag){case 13:return Jt===null?Lc():n.alternate===null&&Ye===0&&(Ye=3),n.flags&=-257,n.flags|=65536,n.lanes=r,l===Yi?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([l]):t.add(l),Bc(e,l,r)),!1;case 22:return n.flags|=65536,l===Yi?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([l]):n.add(l)),Bc(e,l,r)),!1}throw Error(o(435,n.tag))}return Bc(e,l,r),Lc(),!1}if(Ae)return t=zt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=r,l!==zi&&(e=Error(o(422),{cause:l}),Il(Rt(e,n)))):(l!==zi&&(t=Error(o(423),{cause:l}),Il(Rt(t,n))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,l=Rt(l,n),r=mc(e.stateNode,l,r),Ki(e,r),Ye!==4&&(Ye=2)),!1;var u=Error(o(520),{cause:l});if(u=Rt(u,n),bs===null?bs=[u]:bs.push(u),Ye!==4&&(Ye=2),t===null)return!0;l=Rt(l,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=r&-r,n.lanes|=e,e=mc(n.stateNode,l,e),Ki(n,e),!1;case 1:if(t=n.type,u=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(Kn===null||!Kn.has(u))))return n.flags|=65536,r&=-r,n.lanes|=r,r=Xm(r),Km(r,e,n,l),Ki(n,r),!1}n=n.return}while(n!==null);return!1}var Qm=Error(o(461)),Ie=!1;function nt(e,t,n,l){t.child=e===null?Um(t,null,n,l):rl(t,e.child,n,l)}function Zm(e,t,n,l,r){n=n.render;var u=t.ref;if("ref"in l){var g={};for(var S in l)S!=="ref"&&(g[S]=l[S])}else g=l;return ya(t),l=Fi(e,t,n,g,u,r),S=Ji(),e!==null&&!Ie?(Wi(e,t,r),xn(e,t,r)):(Ae&&S&&Oi(t),t.flags|=1,nt(e,t,l,r),t.child)}function Pm(e,t,n,l,r){if(e===null){var u=n.type;return typeof u=="function"&&!Ci(u)&&u.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=u,$m(e,t,u,l,r)):(e=hr(n.type,null,l,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!Sc(e,r)){var g=u.memoizedProps;if(n=n.compare,n=n!==null?n:$l,n(g,l)&&e.ref===t.ref)return xn(e,t,r)}return t.flags|=1,e=fn(u,l),e.ref=t.ref,e.return=t,t.child=e}function $m(e,t,n,l,r){if(e!==null){var u=e.memoizedProps;if($l(u,l)&&e.ref===t.ref)if(Ie=!1,t.pendingProps=l=u,Sc(e,r))(e.flags&131072)!==0&&(Ie=!0);else return t.lanes=e.lanes,xn(e,t,r)}return hc(e,t,n,l,r)}function Fm(e,t,n){var l=t.pendingProps,r=l.children,u=e!==null?e.memoizedState:null;if(l.mode==="hidden"){if((t.flags&128)!==0){if(l=u!==null?u.baseLanes|n:n,e!==null){for(r=t.child=e.child,u=0;r!==null;)u=u|r.lanes|r.childLanes,r=r.sibling;t.childLanes=u&~l}else t.childLanes=0,t.child=null;return Jm(e,t,l,n)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&yr(t,u!==null?u.cachePool:null),u!==null?$d(t,u):Zi(),Lm(t);else return t.lanes=t.childLanes=536870912,Jm(e,t,u!==null?u.baseLanes|n:n,n)}else u!==null?(yr(t,u.cachePool),$d(t,u),Bn(),t.memoizedState=null):(e!==null&&yr(t,null),Zi(),Bn());return nt(e,t,r,n),t.child}function Jm(e,t,n,l){var r=Gi();return r=r===null?null:{parent:$e._currentValue,pool:r},t.memoizedState={baseLanes:n,cachePool:r},e!==null&&yr(t,null),Zi(),Lm(t),e!==null&&es(e,t,l,!0),null}function Ur(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(o(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function hc(e,t,n,l,r){return ya(t),n=Fi(e,t,n,l,void 0,r),l=Ji(),e!==null&&!Ie?(Wi(e,t,r),xn(e,t,r)):(Ae&&l&&Oi(t),t.flags|=1,nt(e,t,n,r),t.child)}function Wm(e,t,n,l,r,u){return ya(t),t.updateQueue=null,n=Jd(t,l,n,r),Fd(e),l=Ji(),e!==null&&!Ie?(Wi(e,t,u),xn(e,t,u)):(Ae&&l&&Oi(t),t.flags|=1,nt(e,t,n,u),t.child)}function Im(e,t,n,l,r){if(ya(t),t.stateNode===null){var u=Fa,g=n.contextType;typeof g=="object"&&g!==null&&(u=rt(g)),u=new n(l,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=dc,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=l,u.state=t.memoizedState,u.refs={},Vi(t),g=n.contextType,u.context=typeof g=="object"&&g!==null?rt(g):Fa,u.state=t.memoizedState,g=n.getDerivedStateFromProps,typeof g=="function"&&(fc(t,n,g,l),u.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(g=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),g!==u.state&&dc.enqueueReplaceState(u,u.state,null),os(t,l,u,r),rs(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){u=t.stateNode;var S=t.memoizedProps,_=wa(n,S);u.props=_;var H=u.context,Q=n.contextType;g=Fa,typeof Q=="object"&&Q!==null&&(g=rt(Q));var $=n.getDerivedStateFromProps;Q=typeof $=="function"||typeof u.getSnapshotBeforeUpdate=="function",S=t.pendingProps!==S,Q||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(S||H!==g)&&Bm(t,u,l,g),kn=!1;var G=t.memoizedState;u.state=G,os(t,l,u,r),rs(),H=t.memoizedState,S||G!==H||kn?(typeof $=="function"&&(fc(t,n,$,l),H=t.memoizedState),(_=kn||Hm(t,n,_,l,G,H,g))?(Q||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=H),u.props=l,u.state=H,u.context=g,l=_):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{u=t.stateNode,Xi(e,t),g=t.memoizedProps,Q=wa(n,g),u.props=Q,$=t.pendingProps,G=u.context,H=n.contextType,_=Fa,typeof H=="object"&&H!==null&&(_=rt(H)),S=n.getDerivedStateFromProps,(H=typeof S=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(g!==$||G!==_)&&Bm(t,u,l,_),kn=!1,G=t.memoizedState,u.state=G,os(t,l,u,r),rs();var V=t.memoizedState;g!==$||G!==V||kn||e!==null&&e.dependencies!==null&&vr(e.dependencies)?(typeof S=="function"&&(fc(t,n,S,l),V=t.memoizedState),(Q=kn||Hm(t,n,Q,l,G,V,_)||e!==null&&e.dependencies!==null&&vr(e.dependencies))?(H||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(l,V,_),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(l,V,_)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||g===e.memoizedProps&&G===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&G===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=V),u.props=l,u.state=V,u.context=_,l=Q):(typeof u.componentDidUpdate!="function"||g===e.memoizedProps&&G===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&G===e.memoizedState||(t.flags|=1024),l=!1)}return u=l,Ur(e,t),l=(t.flags&128)!==0,u||l?(u=t.stateNode,n=l&&typeof n.getDerivedStateFromError!="function"?null:u.render(),t.flags|=1,e!==null&&l?(t.child=rl(t,e.child,null,r),t.child=rl(t,null,n,r)):nt(e,t,n,r),t.memoizedState=u.state,e=t.child):e=xn(e,t,r),e}function eh(e,t,n,l){return Wl(),t.flags|=256,nt(e,t,n,l),t.child}var pc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function gc(e){return{baseLanes:e,cachePool:Gd()}}function vc(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=Ut),e}function th(e,t,n){var l=t.pendingProps,r=!1,u=(t.flags&128)!==0,g;if((g=u)||(g=e!==null&&e.memoizedState===null?!1:(Fe.current&2)!==0),g&&(r=!0,t.flags&=-129),g=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ae){if(r?Hn(t):Bn(),Ae){var S=Ge,_;if(_=S){e:{for(_=S,S=Ft;_.nodeType!==8;){if(!S){S=null;break e}if(_=Vt(_.nextSibling),_===null){S=null;break e}}S=_}S!==null?(t.memoizedState={dehydrated:S,treeContext:ha!==null?{id:dn,overflow:mn}:null,retryLane:536870912,hydrationErrors:null},_=bt(18,null,null,0),_.stateNode=S,_.return=t,t.child=_,ut=t,Ge=null,_=!0):_=!1}_||va(t)}if(S=t.memoizedState,S!==null&&(S=S.dehydrated,S!==null))return eu(S)?t.lanes=32:t.lanes=536870912,null;vn(t)}return S=l.children,l=l.fallback,r?(Bn(),r=t.mode,S=Lr({mode:"hidden",children:S},r),l=ma(l,r,n,null),S.return=t,l.return=t,S.sibling=l,t.child=S,r=t.child,r.memoizedState=gc(n),r.childLanes=vc(e,g,n),t.memoizedState=pc,l):(Hn(t),xc(t,S))}if(_=e.memoizedState,_!==null&&(S=_.dehydrated,S!==null)){if(u)t.flags&256?(Hn(t),t.flags&=-257,t=yc(e,t,n)):t.memoizedState!==null?(Bn(),t.child=e.child,t.flags|=128,t=null):(Bn(),r=l.fallback,S=t.mode,l=Lr({mode:"visible",children:l.children},S),r=ma(r,S,n,null),r.flags|=2,l.return=t,r.return=t,l.sibling=r,t.child=l,rl(t,e.child,null,n),l=t.child,l.memoizedState=gc(n),l.childLanes=vc(e,g,n),t.memoizedState=pc,t=r);else if(Hn(t),eu(S)){if(g=S.nextSibling&&S.nextSibling.dataset,g)var H=g.dgst;g=H,l=Error(o(419)),l.stack="",l.digest=g,Il({value:l,source:null,stack:null}),t=yc(e,t,n)}else if(Ie||es(e,t,n,!1),g=(n&e.childLanes)!==0,Ie||g){if(g=Le,g!==null&&(l=n&-n,l=(l&42)!==0?1:ti(l),l=(l&(g.suspendedLanes|n))!==0?0:l,l!==0&&l!==_.retryLane))throw _.retryLane=l,$a(e,l),jt(g,e,l),Qm;S.data==="$?"||Lc(),t=yc(e,t,n)}else S.data==="$?"?(t.flags|=192,t.child=e.child,t=null):(e=_.treeContext,Ge=Vt(S.nextSibling),ut=t,Ae=!0,ga=null,Ft=!1,e!==null&&(Ot[kt++]=dn,Ot[kt++]=mn,Ot[kt++]=ha,dn=e.id,mn=e.overflow,ha=t),t=xc(t,l.children),t.flags|=4096);return t}return r?(Bn(),r=l.fallback,S=t.mode,_=e.child,H=_.sibling,l=fn(_,{mode:"hidden",children:l.children}),l.subtreeFlags=_.subtreeFlags&65011712,H!==null?r=fn(H,r):(r=ma(r,S,n,null),r.flags|=2),r.return=t,l.return=t,l.sibling=r,t.child=l,l=r,r=t.child,S=e.child.memoizedState,S===null?S=gc(n):(_=S.cachePool,_!==null?(H=$e._currentValue,_=_.parent!==H?{parent:H,pool:H}:_):_=Gd(),S={baseLanes:S.baseLanes|n,cachePool:_}),r.memoizedState=S,r.childLanes=vc(e,g,n),t.memoizedState=pc,l):(Hn(t),n=e.child,e=n.sibling,n=fn(n,{mode:"visible",children:l.children}),n.return=t,n.sibling=null,e!==null&&(g=t.deletions,g===null?(t.deletions=[e],t.flags|=16):g.push(e)),t.child=n,t.memoizedState=null,n)}function xc(e,t){return t=Lr({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Lr(e,t){return e=bt(22,e,null,t),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function yc(e,t,n){return rl(t,e.child,null,n),e=xc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function nh(e,t,n){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),Li(e.return,t,n)}function bc(e,t,n,l,r){var u=e.memoizedState;u===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:n,tailMode:r}:(u.isBackwards=t,u.rendering=null,u.renderingStartTime=0,u.last=l,u.tail=n,u.tailMode=r)}function ah(e,t,n){var l=t.pendingProps,r=l.revealOrder,u=l.tail;if(nt(e,t,l.children,n),l=Fe.current,(l&2)!==0)l=l&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&nh(e,n,t);else if(e.tag===19)nh(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}l&=1}switch(J(Fe,l),r){case"forwards":for(n=t.child,r=null;n!==null;)e=n.alternate,e!==null&&Or(e)===null&&(r=n),n=n.sibling;n=r,n===null?(r=t.child,t.child=null):(r=n.sibling,n.sibling=null),bc(t,!1,r,n,u);break;case"backwards":for(n=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&Or(e)===null){t.child=r;break}e=r.sibling,r.sibling=n,n=r,r=e}bc(t,!0,n,null,u);break;case"together":bc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function xn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Xn|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(es(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,n=fn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=fn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Sc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&vr(e)))}function R0(e,t,n){switch(t.tag){case 3:Me(t,t.stateNode.containerInfo),On(t,$e,e.memoizedState.cache),Wl();break;case 27:case 5:Qt(t);break;case 4:Me(t,t.stateNode.containerInfo);break;case 10:On(t,t.type,t.memoizedProps.value);break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(Hn(t),t.flags|=128,null):(n&t.child.childLanes)!==0?th(e,t,n):(Hn(t),e=xn(e,t,n),e!==null?e.sibling:null);Hn(t);break;case 19:var r=(e.flags&128)!==0;if(l=(n&t.childLanes)!==0,l||(es(e,t,n,!1),l=(n&t.childLanes)!==0),r){if(l)return ah(e,t,n);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),J(Fe,Fe.current),l)break;return null;case 22:case 23:return t.lanes=0,Fm(e,t,n);case 24:On(t,$e,e.memoizedState.cache)}return xn(e,t,n)}function lh(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ie=!0;else{if(!Sc(e,n)&&(t.flags&128)===0)return Ie=!1,R0(e,t,n);Ie=(e.flags&131072)!==0}else Ie=!1,Ae&&(t.flags&1048576)!==0&&kd(t,gr,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var l=t.elementType,r=l._init;if(l=r(l._payload),t.type=l,typeof l=="function")Ci(l)?(e=wa(l,e),t.tag=1,t=Im(null,t,l,e,n)):(t.tag=0,t=hc(null,t,l,e,n));else{if(l!=null){if(r=l.$$typeof,r===A){t.tag=11,t=Zm(null,t,l,e,n);break e}else if(r===q){t.tag=14,t=Pm(null,t,l,e,n);break e}}throw t=ge(l)||l,Error(o(306,t,""))}}return t;case 0:return hc(e,t,t.type,t.pendingProps,n);case 1:return l=t.type,r=wa(l,t.pendingProps),Im(e,t,l,r,n);case 3:e:{if(Me(t,t.stateNode.containerInfo),e===null)throw Error(o(387));l=t.pendingProps;var u=t.memoizedState;r=u.element,Xi(e,t),os(t,l,null,n);var g=t.memoizedState;if(l=g.cache,On(t,$e,l),l!==u.cache&&Hi(t,[$e],n,!0),rs(),l=g.element,u.isDehydrated)if(u={element:l,isDehydrated:!1,cache:g.cache},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){t=eh(e,t,l,n);break e}else if(l!==r){r=Rt(Error(o(424)),t),Il(r),t=eh(e,t,l,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Ge=Vt(e.firstChild),ut=t,Ae=!0,ga=null,Ft=!0,n=Um(t,null,l,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Wl(),l===r){t=xn(e,t,n);break e}nt(e,t,l,n)}t=t.child}return t;case 26:return Ur(e,t),e===null?(n=ip(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ae||(n=t.type,e=t.pendingProps,l=Jr(ce.current).createElement(n),l[st]=t,l[dt]=e,lt(l,n,e),We(l),t.stateNode=l):t.memoizedState=ip(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Qt(t),e===null&&Ae&&(l=t.stateNode=sp(t.type,t.pendingProps,ce.current),ut=t,Ft=!0,r=Ge,Pn(t.type)?(tu=r,Ge=Vt(l.firstChild)):Ge=r),nt(e,t,t.pendingProps.children,n),Ur(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ae&&((r=l=Ge)&&(l=sb(l,t.type,t.pendingProps,Ft),l!==null?(t.stateNode=l,ut=t,Ge=Vt(l.firstChild),Ft=!1,r=!0):r=!1),r||va(t)),Qt(t),r=t.type,u=t.pendingProps,g=e!==null?e.memoizedProps:null,l=u.children,Jc(r,u)?l=null:g!==null&&Jc(r,g)&&(t.flags|=32),t.memoizedState!==null&&(r=Fi(e,t,N0,null,null,n),As._currentValue=r),Ur(e,t),nt(e,t,l,n),t.child;case 6:return e===null&&Ae&&((e=n=Ge)&&(n=rb(n,t.pendingProps,Ft),n!==null?(t.stateNode=n,ut=t,Ge=null,e=!0):e=!1),e||va(t)),null;case 13:return th(e,t,n);case 4:return Me(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=rl(t,null,l,n):nt(e,t,l,n),t.child;case 11:return Zm(e,t,t.type,t.pendingProps,n);case 7:return nt(e,t,t.pendingProps,n),t.child;case 8:return nt(e,t,t.pendingProps.children,n),t.child;case 12:return nt(e,t,t.pendingProps.children,n),t.child;case 10:return l=t.pendingProps,On(t,t.type,l.value),nt(e,t,l.children,n),t.child;case 9:return r=t.type._context,l=t.pendingProps.children,ya(t),r=rt(r),l=l(r),t.flags|=1,nt(e,t,l,n),t.child;case 14:return Pm(e,t,t.type,t.pendingProps,n);case 15:return $m(e,t,t.type,t.pendingProps,n);case 19:return ah(e,t,n);case 31:return l=t.pendingProps,n=t.mode,l={mode:l.mode,children:l.children},e===null?(n=Lr(l,n),n.ref=t.ref,t.child=n,n.return=t,t=n):(n=fn(e.child,l),n.ref=t.ref,t.child=n,n.return=t,t=n),t;case 22:return Fm(e,t,n);case 24:return ya(t),l=rt($e),e===null?(r=Gi(),r===null&&(r=Le,u=Bi(),r.pooledCache=u,u.refCount++,u!==null&&(r.pooledCacheLanes|=n),r=u),t.memoizedState={parent:l,cache:r},Vi(t),On(t,$e,r)):((e.lanes&n)!==0&&(Xi(e,t),os(t,null,null,n),rs()),r=e.memoizedState,u=t.memoizedState,r.parent!==l?(r={parent:l,cache:l},t.memoizedState=r,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=r),On(t,$e,l)):(l=u.cache,On(t,$e,l),l!==r.cache&&Hi(t,[$e],n,!0))),nt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function yn(e){e.flags|=4}function sh(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!mp(t)){if(t=zt.current,t!==null&&((_e&4194048)===_e?Jt!==null:(_e&62914560)!==_e&&(_e&536870912)===0||t!==Jt))throw ls=Yi,Yd;e.flags|=8192}}function Hr(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Lf():536870912,e.lanes|=t,ul|=t)}function hs(e,t){if(!Ae)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var l=null;n!==null;)n.alternate!==null&&(l=n),n=n.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function qe(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,l=0;if(t)for(var r=e.child;r!==null;)n|=r.lanes|r.childLanes,l|=r.subtreeFlags&65011712,l|=r.flags&65011712,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)n|=r.lanes|r.childLanes,l|=r.subtreeFlags,l|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=l,e.childLanes=n,t}function D0(e,t,n){var l=t.pendingProps;switch(ki(t),t.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qe(t),null;case 1:return qe(t),null;case 3:return n=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),pn($e),ct(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Jl(t)?yn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Ld())),qe(t),null;case 26:return n=t.memoizedState,e===null?(yn(t),n!==null?(qe(t),sh(t,n)):(qe(t),t.flags&=-16777217)):n?n!==e.memoizedState?(yn(t),qe(t),sh(t,n)):(qe(t),t.flags&=-16777217):(e.memoizedProps!==l&&yn(t),qe(t),t.flags&=-16777217),null;case 27:Zt(t),n=ce.current;var r=t.type;if(e!==null&&t.stateNode!=null)e.memoizedProps!==l&&yn(t);else{if(!l){if(t.stateNode===null)throw Error(o(166));return qe(t),null}e=ne.current,Jl(t)?zd(t):(e=sp(r,l,n),t.stateNode=e,yn(t))}return qe(t),null;case 5:if(Zt(t),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&yn(t);else{if(!l){if(t.stateNode===null)throw Error(o(166));return qe(t),null}if(e=ne.current,Jl(t))zd(t);else{switch(r=Jr(ce.current),e){case 1:e=r.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:e=r.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":e=r.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":e=r.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":e=r.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof l.is=="string"?r.createElement("select",{is:l.is}):r.createElement("select"),l.multiple?e.multiple=!0:l.size&&(e.size=l.size);break;default:e=typeof l.is=="string"?r.createElement(n,{is:l.is}):r.createElement(n)}}e[st]=t,e[dt]=l;e:for(r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.tag!==27&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break e;for(;r.sibling===null;){if(r.return===null||r.return===t)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}t.stateNode=e;e:switch(lt(e,n,l),n){case"button":case"input":case"select":case"textarea":e=!!l.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&yn(t)}}return qe(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&yn(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(o(166));if(e=ce.current,Jl(t)){if(e=t.stateNode,n=t.memoizedProps,l=null,r=ut,r!==null)switch(r.tag){case 27:case 5:l=r.memoizedProps}e[st]=t,e=!!(e.nodeValue===n||l!==null&&l.suppressHydrationWarning===!0||Wh(e.nodeValue,n)),e||va(t)}else e=Jr(e).createTextNode(l),e[st]=t,t.stateNode=e}return qe(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=Jl(t),l!==null&&l.dehydrated!==null){if(e===null){if(!r)throw Error(o(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(o(317));r[st]=t}else Wl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;qe(t),r=!1}else r=Ld(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(vn(t),t):(vn(t),null)}if(vn(t),(t.flags&128)!==0)return t.lanes=n,t;if(n=l!==null,e=e!==null&&e.memoizedState!==null,n){l=t.child,r=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(r=l.alternate.memoizedState.cachePool.pool);var u=null;l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(u=l.memoizedState.cachePool.pool),u!==r&&(l.flags|=2048)}return n!==e&&n&&(t.child.flags|=8192),Hr(t,t.updateQueue),qe(t),null;case 4:return ct(),e===null&&Qc(t.stateNode.containerInfo),qe(t),null;case 10:return pn(t.type),qe(t),null;case 19:if(te(Fe),r=t.memoizedState,r===null)return qe(t),null;if(l=(t.flags&128)!==0,u=r.rendering,u===null)if(l)hs(r,!1);else{if(Ye!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=Or(e),u!==null){for(t.flags|=128,hs(r,!1),e=u.updateQueue,t.updateQueue=e,Hr(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Od(n,e),n=n.sibling;return J(Fe,Fe.current&1|2),t.child}e=e.sibling}r.tail!==null&&$t()>Gr&&(t.flags|=128,l=!0,hs(r,!1),t.lanes=4194304)}else{if(!l)if(e=Or(u),e!==null){if(t.flags|=128,l=!0,e=e.updateQueue,t.updateQueue=e,Hr(t,e),hs(r,!0),r.tail===null&&r.tailMode==="hidden"&&!u.alternate&&!Ae)return qe(t),null}else 2*$t()-r.renderingStartTime>Gr&&n!==536870912&&(t.flags|=128,l=!0,hs(r,!1),t.lanes=4194304);r.isBackwards?(u.sibling=t.child,t.child=u):(e=r.last,e!==null?e.sibling=u:t.child=u,r.last=u)}return r.tail!==null?(t=r.tail,r.rendering=t,r.tail=t.sibling,r.renderingStartTime=$t(),t.sibling=null,e=Fe.current,J(Fe,l?e&1|2:e&1),t):(qe(t),null);case 22:case 23:return vn(t),Pi(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(n&536870912)!==0&&(t.flags&128)===0&&(qe(t),t.subtreeFlags&6&&(t.flags|=8192)):qe(t),n=t.updateQueue,n!==null&&Hr(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==n&&(t.flags|=2048),e!==null&&te(ba),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),pn($e),qe(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function O0(e,t){switch(ki(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return pn($e),ct(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Zt(t),null;case 13:if(vn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Wl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return te(Fe),null;case 4:return ct(),null;case 10:return pn(t.type),null;case 22:case 23:return vn(t),Pi(),e!==null&&te(ba),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return pn($e),null;case 25:return null;default:return null}}function rh(e,t){switch(ki(t),t.tag){case 3:pn($e),ct();break;case 26:case 27:case 5:Zt(t);break;case 4:ct();break;case 13:vn(t);break;case 19:te(Fe);break;case 10:pn(t.type);break;case 22:case 23:vn(t),Pi(),e!==null&&te(ba);break;case 24:pn($e)}}function ps(e,t){try{var n=t.updateQueue,l=n!==null?n.lastEffect:null;if(l!==null){var r=l.next;n=r;do{if((n.tag&e)===e){l=void 0;var u=n.create,g=n.inst;l=u(),g.destroy=l}n=n.next}while(n!==r)}}catch(S){Ue(t,t.return,S)}}function qn(e,t,n){try{var l=t.updateQueue,r=l!==null?l.lastEffect:null;if(r!==null){var u=r.next;l=u;do{if((l.tag&e)===e){var g=l.inst,S=g.destroy;if(S!==void 0){g.destroy=void 0,r=t;var _=n,H=S;try{H()}catch(Q){Ue(r,_,Q)}}}l=l.next}while(l!==u)}}catch(Q){Ue(t,t.return,Q)}}function oh(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Pd(t,n)}catch(l){Ue(e,e.return,l)}}}function ih(e,t,n){n.props=wa(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(l){Ue(e,t,l)}}function gs(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof n=="function"?e.refCleanup=n(l):n.current=l}}catch(r){Ue(e,t,r)}}function Wt(e,t){var n=e.ref,l=e.refCleanup;if(n!==null)if(typeof l=="function")try{l()}catch(r){Ue(e,t,r)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(r){Ue(e,t,r)}else n.current=null}function ch(e){var t=e.type,n=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&l.focus();break e;case"img":n.src?l.src=n.src:n.srcSet&&(l.srcset=n.srcSet)}}catch(r){Ue(e,e.return,r)}}function wc(e,t,n){try{var l=e.stateNode;eb(l,e.type,n,t),l[dt]=t}catch(r){Ue(e,e.return,r)}}function uh(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Pn(e.type)||e.tag===4}function Nc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||uh(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Pn(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ec(e,t,n){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Fr));else if(l!==4&&(l===27&&Pn(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Ec(e,t,n),e=e.sibling;e!==null;)Ec(e,t,n),e=e.sibling}function Br(e,t,n){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(l!==4&&(l===27&&Pn(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Br(e,t,n),e=e.sibling;e!==null;)Br(e,t,n),e=e.sibling}function fh(e){var t=e.stateNode,n=e.memoizedProps;try{for(var l=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);lt(t,l,n),t[st]=e,t[dt]=n}catch(u){Ue(e,e.return,u)}}var bn=!1,Qe=!1,jc=!1,dh=typeof WeakSet=="function"?WeakSet:Set,et=null;function k0(e,t){if(e=e.containerInfo,$c=ao,e=Nd(e),Ni(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var l=n.getSelection&&n.getSelection();if(l&&l.rangeCount!==0){n=l.anchorNode;var r=l.anchorOffset,u=l.focusNode;l=l.focusOffset;try{n.nodeType,u.nodeType}catch{n=null;break e}var g=0,S=-1,_=-1,H=0,Q=0,$=e,G=null;t:for(;;){for(var V;$!==n||r!==0&&$.nodeType!==3||(S=g+r),$!==u||l!==0&&$.nodeType!==3||(_=g+l),$.nodeType===3&&(g+=$.nodeValue.length),(V=$.firstChild)!==null;)G=$,$=V;for(;;){if($===e)break t;if(G===n&&++H===r&&(S=g),G===u&&++Q===l&&(_=g),(V=$.nextSibling)!==null)break;$=G,G=$.parentNode}$=V}n=S===-1||_===-1?null:{start:S,end:_}}else n=null}n=n||{start:0,end:0}}else n=null;for(Fc={focusedElem:e,selectionRange:n},ao=!1,et=t;et!==null;)if(t=et,e=t.child,(t.subtreeFlags&1024)!==0&&e!==null)e.return=t,et=e;else for(;et!==null;){switch(t=et,u=t.alternate,e=t.flags,t.tag){case 0:break;case 11:case 15:break;case 1:if((e&1024)!==0&&u!==null){e=void 0,n=t,r=u.memoizedProps,u=u.memoizedState,l=n.stateNode;try{var ve=wa(n.type,r,n.elementType===n.type);e=l.getSnapshotBeforeUpdate(ve,u),l.__reactInternalSnapshotBeforeUpdate=e}catch(fe){Ue(n,n.return,fe)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Ic(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Ic(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(o(163))}if(e=t.sibling,e!==null){e.return=t.return,et=e;break}et=t.return}}function mh(e,t,n){var l=n.flags;switch(n.tag){case 0:case 11:case 15:Gn(e,n),l&4&&ps(5,n);break;case 1:if(Gn(e,n),l&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(g){Ue(n,n.return,g)}else{var r=wa(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(g){Ue(n,n.return,g)}}l&64&&oh(n),l&512&&gs(n,n.return);break;case 3:if(Gn(e,n),l&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Pd(e,t)}catch(g){Ue(n,n.return,g)}}break;case 27:t===null&&l&4&&fh(n);case 26:case 5:Gn(e,n),t===null&&l&4&&ch(n),l&512&&gs(n,n.return);break;case 12:Gn(e,n);break;case 13:Gn(e,n),l&4&&gh(e,n),l&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=V0.bind(null,n),ob(e,n))));break;case 22:if(l=n.memoizedState!==null||bn,!l){t=t!==null&&t.memoizedState!==null||Qe,r=bn;var u=Qe;bn=l,(Qe=t)&&!u?Yn(e,n,(n.subtreeFlags&8772)!==0):Gn(e,n),bn=r,Qe=u}break;case 30:break;default:Gn(e,n)}}function hh(e){var t=e.alternate;t!==null&&(e.alternate=null,hh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&li(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Be=null,pt=!1;function Sn(e,t,n){for(n=n.child;n!==null;)ph(e,t,n),n=n.sibling}function ph(e,t,n){if(vt&&typeof vt.onCommitFiberUnmount=="function")try{vt.onCommitFiberUnmount(Ll,n)}catch{}switch(n.tag){case 26:Qe||Wt(n,t),Sn(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Qe||Wt(n,t);var l=Be,r=pt;Pn(n.type)&&(Be=n.stateNode,pt=!1),Sn(e,t,n),js(n.stateNode),Be=l,pt=r;break;case 5:Qe||Wt(n,t);case 6:if(l=Be,r=pt,Be=null,Sn(e,t,n),Be=l,pt=r,Be!==null)if(pt)try{(Be.nodeType===9?Be.body:Be.nodeName==="HTML"?Be.ownerDocument.body:Be).removeChild(n.stateNode)}catch(u){Ue(n,t,u)}else try{Be.removeChild(n.stateNode)}catch(u){Ue(n,t,u)}break;case 18:Be!==null&&(pt?(e=Be,ap(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Os(e)):ap(Be,n.stateNode));break;case 4:l=Be,r=pt,Be=n.stateNode.containerInfo,pt=!0,Sn(e,t,n),Be=l,pt=r;break;case 0:case 11:case 14:case 15:Qe||qn(2,n,t),Qe||qn(4,n,t),Sn(e,t,n);break;case 1:Qe||(Wt(n,t),l=n.stateNode,typeof l.componentWillUnmount=="function"&&ih(n,t,l)),Sn(e,t,n);break;case 21:Sn(e,t,n);break;case 22:Qe=(l=Qe)||n.memoizedState!==null,Sn(e,t,n),Qe=l;break;default:Sn(e,t,n)}}function gh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Os(e)}catch(n){Ue(t,t.return,n)}}function z0(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new dh),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new dh),t;default:throw Error(o(435,e.tag))}}function _c(e,t){var n=z0(e);t.forEach(function(l){var r=X0.bind(null,e,l);n.has(l)||(n.add(l),l.then(r,r))})}function St(e,t){var n=t.deletions;if(n!==null)for(var l=0;l<n.length;l++){var r=n[l],u=e,g=t,S=g;e:for(;S!==null;){switch(S.tag){case 27:if(Pn(S.type)){Be=S.stateNode,pt=!1;break e}break;case 5:Be=S.stateNode,pt=!1;break e;case 3:case 4:Be=S.stateNode.containerInfo,pt=!0;break e}S=S.return}if(Be===null)throw Error(o(160));ph(u,g,r),Be=null,pt=!1,u=r.alternate,u!==null&&(u.return=null),r.return=null}if(t.subtreeFlags&13878)for(t=t.child;t!==null;)vh(t,e),t=t.sibling}var Yt=null;function vh(e,t){var n=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:St(t,e),wt(e),l&4&&(qn(3,e,e.return),ps(3,e),qn(5,e,e.return));break;case 1:St(t,e),wt(e),l&512&&(Qe||n===null||Wt(n,n.return)),l&64&&bn&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?l:n.concat(l))));break;case 26:var r=Yt;if(St(t,e),wt(e),l&512&&(Qe||n===null||Wt(n,n.return)),l&4){var u=n!==null?n.memoizedState:null;if(l=e.memoizedState,n===null)if(l===null)if(e.stateNode===null){e:{l=e.type,n=e.memoizedProps,r=r.ownerDocument||r;t:switch(l){case"title":u=r.getElementsByTagName("title")[0],(!u||u[ql]||u[st]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=r.createElement(l),r.head.insertBefore(u,r.querySelector("head > title"))),lt(u,l,n),u[st]=e,We(u),l=u;break e;case"link":var g=fp("link","href",r).get(l+(n.href||""));if(g){for(var S=0;S<g.length;S++)if(u=g[S],u.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&u.getAttribute("rel")===(n.rel==null?null:n.rel)&&u.getAttribute("title")===(n.title==null?null:n.title)&&u.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){g.splice(S,1);break t}}u=r.createElement(l),lt(u,l,n),r.head.appendChild(u);break;case"meta":if(g=fp("meta","content",r).get(l+(n.content||""))){for(S=0;S<g.length;S++)if(u=g[S],u.getAttribute("content")===(n.content==null?null:""+n.content)&&u.getAttribute("name")===(n.name==null?null:n.name)&&u.getAttribute("property")===(n.property==null?null:n.property)&&u.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&u.getAttribute("charset")===(n.charSet==null?null:n.charSet)){g.splice(S,1);break t}}u=r.createElement(l),lt(u,l,n),r.head.appendChild(u);break;default:throw Error(o(468,l))}u[st]=e,We(u),l=u}e.stateNode=l}else dp(r,e.type,e.stateNode);else e.stateNode=up(r,l,e.memoizedProps);else u!==l?(u===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):u.count--,l===null?dp(r,e.type,e.stateNode):up(r,l,e.memoizedProps)):l===null&&e.stateNode!==null&&wc(e,e.memoizedProps,n.memoizedProps)}break;case 27:St(t,e),wt(e),l&512&&(Qe||n===null||Wt(n,n.return)),n!==null&&l&4&&wc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(St(t,e),wt(e),l&512&&(Qe||n===null||Wt(n,n.return)),e.flags&32){r=e.stateNode;try{Ya(r,"")}catch(V){Ue(e,e.return,V)}}l&4&&e.stateNode!=null&&(r=e.memoizedProps,wc(e,r,n!==null?n.memoizedProps:r)),l&1024&&(jc=!0);break;case 6:if(St(t,e),wt(e),l&4){if(e.stateNode===null)throw Error(o(162));l=e.memoizedProps,n=e.stateNode;try{n.nodeValue=l}catch(V){Ue(e,e.return,V)}}break;case 3:if(eo=null,r=Yt,Yt=Wr(t.containerInfo),St(t,e),Yt=r,wt(e),l&4&&n!==null&&n.memoizedState.isDehydrated)try{Os(t.containerInfo)}catch(V){Ue(e,e.return,V)}jc&&(jc=!1,xh(e));break;case 4:l=Yt,Yt=Wr(e.stateNode.containerInfo),St(t,e),wt(e),Yt=l;break;case 12:St(t,e),wt(e);break;case 13:St(t,e),wt(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Dc=$t()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,_c(e,l)));break;case 22:r=e.memoizedState!==null;var _=n!==null&&n.memoizedState!==null,H=bn,Q=Qe;if(bn=H||r,Qe=Q||_,St(t,e),Qe=Q,bn=H,wt(e),l&8192)e:for(t=e.stateNode,t._visibility=r?t._visibility&-2:t._visibility|1,r&&(n===null||_||bn||Qe||Na(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){_=n=t;try{if(u=_.stateNode,r)g=u.style,typeof g.setProperty=="function"?g.setProperty("display","none","important"):g.display="none";else{S=_.stateNode;var $=_.memoizedProps.style,G=$!=null&&$.hasOwnProperty("display")?$.display:null;S.style.display=G==null||typeof G=="boolean"?"":(""+G).trim()}}catch(V){Ue(_,_.return,V)}}}else if(t.tag===6){if(n===null){_=t;try{_.stateNode.nodeValue=r?"":_.memoizedProps}catch(V){Ue(_,_.return,V)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(n=l.retryQueue,n!==null&&(l.retryQueue=null,_c(e,n))));break;case 19:St(t,e),wt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,_c(e,l)));break;case 30:break;case 21:break;default:St(t,e),wt(e)}}function wt(e){var t=e.flags;if(t&2){try{for(var n,l=e.return;l!==null;){if(uh(l)){n=l;break}l=l.return}if(n==null)throw Error(o(160));switch(n.tag){case 27:var r=n.stateNode,u=Nc(e);Br(e,u,r);break;case 5:var g=n.stateNode;n.flags&32&&(Ya(g,""),n.flags&=-33);var S=Nc(e);Br(e,S,g);break;case 3:case 4:var _=n.stateNode.containerInfo,H=Nc(e);Ec(e,H,_);break;default:throw Error(o(161))}}catch(Q){Ue(e,e.return,Q)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function xh(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;xh(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Gn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)mh(e,t.alternate,t),t=t.sibling}function Na(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:qn(4,t,t.return),Na(t);break;case 1:Wt(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&ih(t,t.return,n),Na(t);break;case 27:js(t.stateNode);case 26:case 5:Wt(t,t.return),Na(t);break;case 22:t.memoizedState===null&&Na(t);break;case 30:Na(t);break;default:Na(t)}e=e.sibling}}function Yn(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,r=e,u=t,g=u.flags;switch(u.tag){case 0:case 11:case 15:Yn(r,u,n),ps(4,u);break;case 1:if(Yn(r,u,n),l=u,r=l.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(H){Ue(l,l.return,H)}if(l=u,r=l.updateQueue,r!==null){var S=l.stateNode;try{var _=r.shared.hiddenCallbacks;if(_!==null)for(r.shared.hiddenCallbacks=null,r=0;r<_.length;r++)Zd(_[r],S)}catch(H){Ue(l,l.return,H)}}n&&g&64&&oh(u),gs(u,u.return);break;case 27:fh(u);case 26:case 5:Yn(r,u,n),n&&l===null&&g&4&&ch(u),gs(u,u.return);break;case 12:Yn(r,u,n);break;case 13:Yn(r,u,n),n&&g&4&&gh(r,u);break;case 22:u.memoizedState===null&&Yn(r,u,n),gs(u,u.return);break;case 30:break;default:Yn(r,u,n)}t=t.sibling}}function Mc(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ts(n))}function Tc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ts(e))}function It(e,t,n,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)yh(e,t,n,l),t=t.sibling}function yh(e,t,n,l){var r=t.flags;switch(t.tag){case 0:case 11:case 15:It(e,t,n,l),r&2048&&ps(9,t);break;case 1:It(e,t,n,l);break;case 3:It(e,t,n,l),r&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ts(e)));break;case 12:if(r&2048){It(e,t,n,l),e=t.stateNode;try{var u=t.memoizedProps,g=u.id,S=u.onPostCommit;typeof S=="function"&&S(g,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(_){Ue(t,t.return,_)}}else It(e,t,n,l);break;case 13:It(e,t,n,l);break;case 23:break;case 22:u=t.stateNode,g=t.alternate,t.memoizedState!==null?u._visibility&2?It(e,t,n,l):vs(e,t):u._visibility&2?It(e,t,n,l):(u._visibility|=2,ol(e,t,n,l,(t.subtreeFlags&10256)!==0)),r&2048&&Mc(g,t);break;case 24:It(e,t,n,l),r&2048&&Tc(t.alternate,t);break;default:It(e,t,n,l)}}function ol(e,t,n,l,r){for(r=r&&(t.subtreeFlags&10256)!==0,t=t.child;t!==null;){var u=e,g=t,S=n,_=l,H=g.flags;switch(g.tag){case 0:case 11:case 15:ol(u,g,S,_,r),ps(8,g);break;case 23:break;case 22:var Q=g.stateNode;g.memoizedState!==null?Q._visibility&2?ol(u,g,S,_,r):vs(u,g):(Q._visibility|=2,ol(u,g,S,_,r)),r&&H&2048&&Mc(g.alternate,g);break;case 24:ol(u,g,S,_,r),r&&H&2048&&Tc(g.alternate,g);break;default:ol(u,g,S,_,r)}t=t.sibling}}function vs(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,l=t,r=l.flags;switch(l.tag){case 22:vs(n,l),r&2048&&Mc(l.alternate,l);break;case 24:vs(n,l),r&2048&&Tc(l.alternate,l);break;default:vs(n,l)}t=t.sibling}}var xs=8192;function il(e){if(e.subtreeFlags&xs)for(e=e.child;e!==null;)bh(e),e=e.sibling}function bh(e){switch(e.tag){case 26:il(e),e.flags&xs&&e.memoizedState!==null&&bb(Yt,e.memoizedState,e.memoizedProps);break;case 5:il(e);break;case 3:case 4:var t=Yt;Yt=Wr(e.stateNode.containerInfo),il(e),Yt=t;break;case 22:e.memoizedState===null&&(t=e.alternate,t!==null&&t.memoizedState!==null?(t=xs,xs=16777216,il(e),xs=t):il(e));break;default:il(e)}}function Sh(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function ys(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];et=l,Nh(l,e)}Sh(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)wh(e),e=e.sibling}function wh(e){switch(e.tag){case 0:case 11:case 15:ys(e),e.flags&2048&&qn(9,e,e.return);break;case 3:ys(e);break;case 12:ys(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,qr(e)):ys(e);break;default:ys(e)}}function qr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];et=l,Nh(l,e)}Sh(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:qn(8,t,t.return),qr(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,qr(t));break;default:qr(t)}e=e.sibling}}function Nh(e,t){for(;et!==null;){var n=et;switch(n.tag){case 0:case 11:case 15:qn(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var l=n.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:ts(n.memoizedState.cache)}if(l=n.child,l!==null)l.return=n,et=l;else e:for(n=e;et!==null;){l=et;var r=l.sibling,u=l.return;if(hh(l),l===n){et=null;break e}if(r!==null){r.return=u,et=r;break e}et=u}}}var U0={getCacheForType:function(e){var t=rt($e),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n}},L0=typeof WeakMap=="function"?WeakMap:Map,Re=0,Le=null,Ne=null,_e=0,De=0,Nt=null,Vn=!1,cl=!1,Ac=!1,wn=0,Ye=0,Xn=0,Ea=0,Cc=0,Ut=0,ul=0,bs=null,gt=null,Rc=!1,Dc=0,Gr=1/0,Yr=null,Kn=null,at=0,Qn=null,fl=null,dl=0,Oc=0,kc=null,Eh=null,Ss=0,zc=null;function Et(){if((Re&2)!==0&&_e!==0)return _e&-_e;if(k.T!==null){var e=Ia;return e!==0?e:Yc()}return qf()}function jh(){Ut===0&&(Ut=(_e&536870912)===0||Ae?Uf():536870912);var e=zt.current;return e!==null&&(e.flags|=32),Ut}function jt(e,t,n){(e===Le&&(De===2||De===9)||e.cancelPendingCommit!==null)&&(ml(e,0),Zn(e,_e,Ut,!1)),Bl(e,n),((Re&2)===0||e!==Le)&&(e===Le&&((Re&2)===0&&(Ea|=n),Ye===4&&Zn(e,_e,Ut,!1)),en(e))}function _h(e,t,n){if((Re&6)!==0)throw Error(o(327));var l=!n&&(t&124)===0&&(t&e.expiredLanes)===0||Hl(e,t),r=l?q0(e,t):Hc(e,t,!0),u=l;do{if(r===0){cl&&!l&&Zn(e,t,0,!1);break}else{if(n=e.current.alternate,u&&!H0(n)){r=Hc(e,t,!1),u=!1;continue}if(r===2){if(u=t,e.errorRecoveryDisabledLanes&u)var g=0;else g=e.pendingLanes&-536870913,g=g!==0?g:g&536870912?536870912:0;if(g!==0){t=g;e:{var S=e;r=bs;var _=S.current.memoizedState.isDehydrated;if(_&&(ml(S,g).flags|=256),g=Hc(S,g,!1),g!==2){if(Ac&&!_){S.errorRecoveryDisabledLanes|=u,Ea|=u,r=4;break e}u=gt,gt=r,u!==null&&(gt===null?gt=u:gt.push.apply(gt,u))}r=g}if(u=!1,r!==2)continue}}if(r===1){ml(e,0),Zn(e,t,0,!0);break}e:{switch(l=e,u=r,u){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:Zn(l,t,Ut,!Vn);break e;case 2:gt=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(r=Dc+300-$t(),10<r)){if(Zn(l,t,Ut,!Vn),Is(l,0,!0)!==0)break e;l.timeoutHandle=tp(Mh.bind(null,l,n,gt,Yr,Rc,t,Ut,Ea,ul,Vn,u,2,-0,0),r);break e}Mh(l,n,gt,Yr,Rc,t,Ut,Ea,ul,Vn,u,0,-0,0)}}break}while(!0);en(e)}function Mh(e,t,n,l,r,u,g,S,_,H,Q,$,G,V){if(e.timeoutHandle=-1,$=t.subtreeFlags,($&8192||($&16785408)===16785408)&&(Ts={stylesheets:null,count:0,unsuspend:yb},bh(t),$=Sb(),$!==null)){e.cancelPendingCommit=$(kh.bind(null,e,t,u,n,l,r,g,S,_,Q,1,G,V)),Zn(e,u,g,!H);return}kh(e,t,u,n,l,r,g,S,_)}function H0(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var l=0;l<n.length;l++){var r=n[l],u=r.getSnapshot;r=r.value;try{if(!yt(u(),r))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Zn(e,t,n,l){t&=~Cc,t&=~Ea,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var r=t;0<r;){var u=31-xt(r),g=1<<u;l[u]=-1,r&=~g}n!==0&&Hf(e,n,t)}function Vr(){return(Re&6)===0?(ws(0),!1):!0}function Uc(){if(Ne!==null){if(De===0)var e=Ne.return;else e=Ne,hn=xa=null,Ii(e),sl=null,ds=0,e=Ne;for(;e!==null;)rh(e.alternate,e),e=e.return;Ne=null}}function ml(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,nb(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Uc(),Le=e,Ne=n=fn(e.current,null),_e=t,De=0,Nt=null,Vn=!1,cl=Hl(e,t),Ac=!1,ul=Ut=Cc=Ea=Xn=Ye=0,gt=bs=null,Rc=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var r=31-xt(l),u=1<<r;t|=e[r],l&=~u}return wn=t,fr(),n}function Th(e,t){be=null,k.H=Cr,t===as||t===br?(t=Kd(),De=3):t===Yd?(t=Kd(),De=4):De=t===Qm?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Nt=t,Ne===null&&(Ye=1,zr(e,Rt(t,e.current)))}function Ah(){var e=k.H;return k.H=Cr,e===null?Cr:e}function Ch(){var e=k.A;return k.A=U0,e}function Lc(){Ye=4,Vn||(_e&4194048)!==_e&&zt.current!==null||(cl=!0),(Xn&134217727)===0&&(Ea&134217727)===0||Le===null||Zn(Le,_e,Ut,!1)}function Hc(e,t,n){var l=Re;Re|=2;var r=Ah(),u=Ch();(Le!==e||_e!==t)&&(Yr=null,ml(e,t)),t=!1;var g=Ye;e:do try{if(De!==0&&Ne!==null){var S=Ne,_=Nt;switch(De){case 8:Uc(),g=6;break e;case 3:case 2:case 9:case 6:zt.current===null&&(t=!0);var H=De;if(De=0,Nt=null,hl(e,S,_,H),n&&cl){g=0;break e}break;default:H=De,De=0,Nt=null,hl(e,S,_,H)}}B0(),g=Ye;break}catch(Q){Th(e,Q)}while(!0);return t&&e.shellSuspendCounter++,hn=xa=null,Re=l,k.H=r,k.A=u,Ne===null&&(Le=null,_e=0,fr()),g}function B0(){for(;Ne!==null;)Rh(Ne)}function q0(e,t){var n=Re;Re|=2;var l=Ah(),r=Ch();Le!==e||_e!==t?(Yr=null,Gr=$t()+500,ml(e,t)):cl=Hl(e,t);e:do try{if(De!==0&&Ne!==null){t=Ne;var u=Nt;t:switch(De){case 1:De=0,Nt=null,hl(e,t,u,1);break;case 2:case 9:if(Vd(u)){De=0,Nt=null,Dh(t);break}t=function(){De!==2&&De!==9||Le!==e||(De=7),en(e)},u.then(t,t);break e;case 3:De=7;break e;case 4:De=5;break e;case 7:Vd(u)?(De=0,Nt=null,Dh(t)):(De=0,Nt=null,hl(e,t,u,7));break;case 5:var g=null;switch(Ne.tag){case 26:g=Ne.memoizedState;case 5:case 27:var S=Ne;if(!g||mp(g)){De=0,Nt=null;var _=S.sibling;if(_!==null)Ne=_;else{var H=S.return;H!==null?(Ne=H,Xr(H)):Ne=null}break t}}De=0,Nt=null,hl(e,t,u,5);break;case 6:De=0,Nt=null,hl(e,t,u,6);break;case 8:Uc(),Ye=6;break e;default:throw Error(o(462))}}G0();break}catch(Q){Th(e,Q)}while(!0);return hn=xa=null,k.H=l,k.A=r,Re=n,Ne!==null?0:(Le=null,_e=0,fr(),Ye)}function G0(){for(;Ne!==null&&!cy();)Rh(Ne)}function Rh(e){var t=lh(e.alternate,e,wn);e.memoizedProps=e.pendingProps,t===null?Xr(e):Ne=t}function Dh(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Wm(n,t,t.pendingProps,t.type,void 0,_e);break;case 11:t=Wm(n,t,t.pendingProps,t.type.render,t.ref,_e);break;case 5:Ii(t);default:rh(n,t),t=Ne=Od(t,wn),t=lh(n,t,wn)}e.memoizedProps=e.pendingProps,t===null?Xr(e):Ne=t}function hl(e,t,n,l){hn=xa=null,Ii(t),sl=null,ds=0;var r=t.return;try{if(C0(e,r,t,n,_e)){Ye=1,zr(e,Rt(n,e.current)),Ne=null;return}}catch(u){if(r!==null)throw Ne=r,u;Ye=1,zr(e,Rt(n,e.current)),Ne=null;return}t.flags&32768?(Ae||l===1?e=!0:cl||(_e&536870912)!==0?e=!1:(Vn=e=!0,(l===2||l===9||l===3||l===6)&&(l=zt.current,l!==null&&l.tag===13&&(l.flags|=16384))),Oh(t,e)):Xr(t)}function Xr(e){var t=e;do{if((t.flags&32768)!==0){Oh(t,Vn);return}e=t.return;var n=D0(t.alternate,t,wn);if(n!==null){Ne=n;return}if(t=t.sibling,t!==null){Ne=t;return}Ne=t=e}while(t!==null);Ye===0&&(Ye=5)}function Oh(e,t){do{var n=O0(e.alternate,e);if(n!==null){n.flags&=32767,Ne=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Ne=e;return}Ne=e=n}while(e!==null);Ye=6,Ne=null}function kh(e,t,n,l,r,u,g,S,_){e.cancelPendingCommit=null;do Kr();while(at!==0);if((Re&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(u=t.lanes|t.childLanes,u|=Ti,yy(e,n,u,g,S,_),e===Le&&(Ne=Le=null,_e=0),fl=t,Qn=e,dl=n,Oc=u,kc=r,Eh=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,K0(Fs,function(){return Bh(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=k.T,k.T=null,r=K.p,K.p=2,g=Re,Re|=4;try{k0(e,t,n)}finally{Re=g,K.p=r,k.T=l}}at=1,zh(),Uh(),Lh()}}function zh(){if(at===1){at=0;var e=Qn,t=fl,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=k.T,k.T=null;var l=K.p;K.p=2;var r=Re;Re|=4;try{vh(t,e);var u=Fc,g=Nd(e.containerInfo),S=u.focusedElem,_=u.selectionRange;if(g!==S&&S&&S.ownerDocument&&wd(S.ownerDocument.documentElement,S)){if(_!==null&&Ni(S)){var H=_.start,Q=_.end;if(Q===void 0&&(Q=H),"selectionStart"in S)S.selectionStart=H,S.selectionEnd=Math.min(Q,S.value.length);else{var $=S.ownerDocument||document,G=$&&$.defaultView||window;if(G.getSelection){var V=G.getSelection(),ve=S.textContent.length,fe=Math.min(_.start,ve),ze=_.end===void 0?fe:Math.min(_.end,ve);!V.extend&&fe>ze&&(g=ze,ze=fe,fe=g);var z=Sd(S,fe),O=Sd(S,ze);if(z&&O&&(V.rangeCount!==1||V.anchorNode!==z.node||V.anchorOffset!==z.offset||V.focusNode!==O.node||V.focusOffset!==O.offset)){var U=$.createRange();U.setStart(z.node,z.offset),V.removeAllRanges(),fe>ze?(V.addRange(U),V.extend(O.node,O.offset)):(U.setEnd(O.node,O.offset),V.addRange(U))}}}}for($=[],V=S;V=V.parentNode;)V.nodeType===1&&$.push({element:V,left:V.scrollLeft,top:V.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<$.length;S++){var Z=$[S];Z.element.scrollLeft=Z.left,Z.element.scrollTop=Z.top}}ao=!!$c,Fc=$c=null}finally{Re=r,K.p=l,k.T=n}}e.current=t,at=2}}function Uh(){if(at===2){at=0;var e=Qn,t=fl,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=k.T,k.T=null;var l=K.p;K.p=2;var r=Re;Re|=4;try{mh(e,t.alternate,t)}finally{Re=r,K.p=l,k.T=n}}at=3}}function Lh(){if(at===4||at===3){at=0,uy();var e=Qn,t=fl,n=dl,l=Eh;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?at=5:(at=0,fl=Qn=null,Hh(e,e.pendingLanes));var r=e.pendingLanes;if(r===0&&(Kn=null),ni(n),t=t.stateNode,vt&&typeof vt.onCommitFiberRoot=="function")try{vt.onCommitFiberRoot(Ll,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=k.T,r=K.p,K.p=2,k.T=null;try{for(var u=e.onRecoverableError,g=0;g<l.length;g++){var S=l[g];u(S.value,{componentStack:S.stack})}}finally{k.T=t,K.p=r}}(dl&3)!==0&&Kr(),en(e),r=e.pendingLanes,(n&4194090)!==0&&(r&42)!==0?e===zc?Ss++:(Ss=0,zc=e):Ss=0,ws(0)}}function Hh(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ts(t)))}function Kr(e){return zh(),Uh(),Lh(),Bh()}function Bh(){if(at!==5)return!1;var e=Qn,t=Oc;Oc=0;var n=ni(dl),l=k.T,r=K.p;try{K.p=32>n?32:n,k.T=null,n=kc,kc=null;var u=Qn,g=dl;if(at=0,fl=Qn=null,dl=0,(Re&6)!==0)throw Error(o(331));var S=Re;if(Re|=4,wh(u.current),yh(u,u.current,g,n),Re=S,ws(0,!1),vt&&typeof vt.onPostCommitFiberRoot=="function")try{vt.onPostCommitFiberRoot(Ll,u)}catch{}return!0}finally{K.p=r,k.T=l,Hh(e,t)}}function qh(e,t,n){t=Rt(n,t),t=mc(e.stateNode,t,2),e=Un(e,t,2),e!==null&&(Bl(e,2),en(e))}function Ue(e,t,n){if(e.tag===3)qh(e,e,n);else for(;t!==null;){if(t.tag===3){qh(t,e,n);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Kn===null||!Kn.has(l))){e=Rt(n,e),n=Xm(2),l=Un(t,n,2),l!==null&&(Km(n,l,t,e),Bl(l,2),en(l));break}}t=t.return}}function Bc(e,t,n){var l=e.pingCache;if(l===null){l=e.pingCache=new L0;var r=new Set;l.set(t,r)}else r=l.get(t),r===void 0&&(r=new Set,l.set(t,r));r.has(n)||(Ac=!0,r.add(n),e=Y0.bind(null,e,t,n),t.then(e,e))}function Y0(e,t,n){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Le===e&&(_e&n)===n&&(Ye===4||Ye===3&&(_e&62914560)===_e&&300>$t()-Dc?(Re&2)===0&&ml(e,0):Cc|=n,ul===_e&&(ul=0)),en(e)}function Gh(e,t){t===0&&(t=Lf()),e=$a(e,t),e!==null&&(Bl(e,t),en(e))}function V0(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Gh(e,n)}function X0(e,t){var n=0;switch(e.tag){case 13:var l=e.stateNode,r=e.memoizedState;r!==null&&(n=r.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(o(314))}l!==null&&l.delete(t),Gh(e,n)}function K0(e,t){return An(e,t)}var Qr=null,pl=null,qc=!1,Zr=!1,Gc=!1,ja=0;function en(e){e!==pl&&e.next===null&&(pl===null?Qr=pl=e:pl=pl.next=e),Zr=!0,qc||(qc=!0,Z0())}function ws(e,t){if(!Gc&&Zr){Gc=!0;do for(var n=!1,l=Qr;l!==null;){if(e!==0){var r=l.pendingLanes;if(r===0)var u=0;else{var g=l.suspendedLanes,S=l.pingedLanes;u=(1<<31-xt(42|e)+1)-1,u&=r&~(g&~S),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(n=!0,Kh(l,u))}else u=_e,u=Is(l,l===Le?u:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(u&3)===0||Hl(l,u)||(n=!0,Kh(l,u));l=l.next}while(n);Gc=!1}}function Q0(){Yh()}function Yh(){Zr=qc=!1;var e=0;ja!==0&&(tb()&&(e=ja),ja=0);for(var t=$t(),n=null,l=Qr;l!==null;){var r=l.next,u=Vh(l,t);u===0?(l.next=null,n===null?Qr=r:n.next=r,r===null&&(pl=n)):(n=l,(e!==0||(u&3)!==0)&&(Zr=!0)),l=r}ws(e)}function Vh(e,t){for(var n=e.suspendedLanes,l=e.pingedLanes,r=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var g=31-xt(u),S=1<<g,_=r[g];_===-1?((S&n)===0||(S&l)!==0)&&(r[g]=xy(S,t)):_<=t&&(e.expiredLanes|=S),u&=~S}if(t=Le,n=_e,n=Is(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,n===0||e===t&&(De===2||De===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&Io(l),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Hl(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(l!==null&&Io(l),ni(n)){case 2:case 8:n=kf;break;case 32:n=Fs;break;case 268435456:n=zf;break;default:n=Fs}return l=Xh.bind(null,e),n=An(n,l),e.callbackPriority=t,e.callbackNode=n,t}return l!==null&&l!==null&&Io(l),e.callbackPriority=2,e.callbackNode=null,2}function Xh(e,t){if(at!==0&&at!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Kr()&&e.callbackNode!==n)return null;var l=_e;return l=Is(e,e===Le?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(_h(e,l,t),Vh(e,$t()),e.callbackNode!=null&&e.callbackNode===n?Xh.bind(null,e):null)}function Kh(e,t){if(Kr())return null;_h(e,t,!0)}function Z0(){ab(function(){(Re&6)!==0?An(Of,Q0):Yh()})}function Yc(){return ja===0&&(ja=Uf()),ja}function Qh(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:lr(""+e)}function Zh(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function P0(e,t,n,l,r){if(t==="submit"&&n&&n.stateNode===r){var u=Qh((r[dt]||null).action),g=l.submitter;g&&(t=(t=g[dt]||null)?Qh(t.formAction):g.getAttribute("formAction"),t!==null&&(u=t,g=null));var S=new ir("action","action",null,l,r);e.push({event:S,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(ja!==0){var _=g?Zh(r,g):new FormData(r);ic(n,{pending:!0,data:_,method:r.method,action:u},null,_)}}else typeof u=="function"&&(S.preventDefault(),_=g?Zh(r,g):new FormData(r),ic(n,{pending:!0,data:_,method:r.method,action:u},u,_))},currentTarget:r}]})}}for(var Vc=0;Vc<Mi.length;Vc++){var Xc=Mi[Vc],$0=Xc.toLowerCase(),F0=Xc[0].toUpperCase()+Xc.slice(1);Gt($0,"on"+F0)}Gt(_d,"onAnimationEnd"),Gt(Md,"onAnimationIteration"),Gt(Td,"onAnimationStart"),Gt("dblclick","onDoubleClick"),Gt("focusin","onFocus"),Gt("focusout","onBlur"),Gt(m0,"onTransitionRun"),Gt(h0,"onTransitionStart"),Gt(p0,"onTransitionCancel"),Gt(Ad,"onTransitionEnd"),Ba("onMouseEnter",["mouseout","mouseover"]),Ba("onMouseLeave",["mouseout","mouseover"]),Ba("onPointerEnter",["pointerout","pointerover"]),Ba("onPointerLeave",["pointerout","pointerover"]),ca("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ca("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ca("onBeforeInput",["compositionend","keypress","textInput","paste"]),ca("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ca("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ca("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ns="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(" "),J0=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ns));function Ph(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var l=e[n],r=l.event;l=l.listeners;e:{var u=void 0;if(t)for(var g=l.length-1;0<=g;g--){var S=l[g],_=S.instance,H=S.currentTarget;if(S=S.listener,_!==u&&r.isPropagationStopped())break e;u=S,r.currentTarget=H;try{u(r)}catch(Q){kr(Q)}r.currentTarget=null,u=_}else for(g=0;g<l.length;g++){if(S=l[g],_=S.instance,H=S.currentTarget,S=S.listener,_!==u&&r.isPropagationStopped())break e;u=S,r.currentTarget=H;try{u(r)}catch(Q){kr(Q)}r.currentTarget=null,u=_}}}}function Ee(e,t){var n=t[ai];n===void 0&&(n=t[ai]=new Set);var l=e+"__bubble";n.has(l)||($h(t,e,2,!1),n.add(l))}function Kc(e,t,n){var l=0;t&&(l|=4),$h(n,e,l,t)}var Pr="_reactListening"+Math.random().toString(36).slice(2);function Qc(e){if(!e[Pr]){e[Pr]=!0,Yf.forEach(function(n){n!=="selectionchange"&&(J0.has(n)||Kc(n,!1,e),Kc(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Pr]||(t[Pr]=!0,Kc("selectionchange",!1,t))}}function $h(e,t,n,l){switch(yp(t)){case 2:var r=Eb;break;case 8:r=jb;break;default:r=ru}n=r.bind(null,t,n,e),r=void 0,!hi||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),l?r!==void 0?e.addEventListener(t,n,{capture:!0,passive:r}):e.addEventListener(t,n,!0):r!==void 0?e.addEventListener(t,n,{passive:r}):e.addEventListener(t,n,!1)}function Zc(e,t,n,l,r){var u=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var g=l.tag;if(g===3||g===4){var S=l.stateNode.containerInfo;if(S===r)break;if(g===4)for(g=l.return;g!==null;){var _=g.tag;if((_===3||_===4)&&g.stateNode.containerInfo===r)return;g=g.return}for(;S!==null;){if(g=Ua(S),g===null)return;if(_=g.tag,_===5||_===6||_===26||_===27){l=u=g;continue e}S=S.parentNode}}l=l.return}nd(function(){var H=u,Q=di(n),$=[];e:{var G=Cd.get(e);if(G!==void 0){var V=ir,ve=e;switch(e){case"keypress":if(rr(n)===0)break e;case"keydown":case"keyup":V=Ky;break;case"focusin":ve="focus",V=xi;break;case"focusout":ve="blur",V=xi;break;case"beforeblur":case"afterblur":V=xi;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":V=sd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":V=Oy;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":V=Py;break;case _d:case Md:case Td:V=Uy;break;case Ad:V=Fy;break;case"scroll":case"scrollend":V=Ry;break;case"wheel":V=Wy;break;case"copy":case"cut":case"paste":V=Hy;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":V=od;break;case"toggle":case"beforetoggle":V=e0}var fe=(t&4)!==0,ze=!fe&&(e==="scroll"||e==="scrollend"),z=fe?G!==null?G+"Capture":null:G;fe=[];for(var O=H,U;O!==null;){var Z=O;if(U=Z.stateNode,Z=Z.tag,Z!==5&&Z!==26&&Z!==27||U===null||z===null||(Z=Yl(O,z),Z!=null&&fe.push(Es(O,Z,U))),ze)break;O=O.return}0<fe.length&&(G=new V(G,ve,null,n,Q),$.push({event:G,listeners:fe}))}}if((t&7)===0){e:{if(G=e==="mouseover"||e==="pointerover",V=e==="mouseout"||e==="pointerout",G&&n!==fi&&(ve=n.relatedTarget||n.fromElement)&&(Ua(ve)||ve[za]))break e;if((V||G)&&(G=Q.window===Q?Q:(G=Q.ownerDocument)?G.defaultView||G.parentWindow:window,V?(ve=n.relatedTarget||n.toElement,V=H,ve=ve?Ua(ve):null,ve!==null&&(ze=d(ve),fe=ve.tag,ve!==ze||fe!==5&&fe!==27&&fe!==6)&&(ve=null)):(V=null,ve=H),V!==ve)){if(fe=sd,Z="onMouseLeave",z="onMouseEnter",O="mouse",(e==="pointerout"||e==="pointerover")&&(fe=od,Z="onPointerLeave",z="onPointerEnter",O="pointer"),ze=V==null?G:Gl(V),U=ve==null?G:Gl(ve),G=new fe(Z,O+"leave",V,n,Q),G.target=ze,G.relatedTarget=U,Z=null,Ua(Q)===H&&(fe=new fe(z,O+"enter",ve,n,Q),fe.target=U,fe.relatedTarget=ze,Z=fe),ze=Z,V&&ve)t:{for(fe=V,z=ve,O=0,U=fe;U;U=gl(U))O++;for(U=0,Z=z;Z;Z=gl(Z))U++;for(;0<O-U;)fe=gl(fe),O--;for(;0<U-O;)z=gl(z),U--;for(;O--;){if(fe===z||z!==null&&fe===z.alternate)break t;fe=gl(fe),z=gl(z)}fe=null}else fe=null;V!==null&&Fh($,G,V,fe,!1),ve!==null&&ze!==null&&Fh($,ze,ve,fe,!0)}}e:{if(G=H?Gl(H):window,V=G.nodeName&&G.nodeName.toLowerCase(),V==="select"||V==="input"&&G.type==="file")var le=pd;else if(md(G))if(gd)le=u0;else{le=i0;var we=o0}else V=G.nodeName,!V||V.toLowerCase()!=="input"||G.type!=="checkbox"&&G.type!=="radio"?H&&ui(H.elementType)&&(le=pd):le=c0;if(le&&(le=le(e,H))){hd($,le,n,Q);break e}we&&we(e,G,H),e==="focusout"&&H&&G.type==="number"&&H.memoizedProps.value!=null&&ci(G,"number",G.value)}switch(we=H?Gl(H):window,e){case"focusin":(md(we)||we.contentEditable==="true")&&(Qa=we,Ei=H,Fl=null);break;case"focusout":Fl=Ei=Qa=null;break;case"mousedown":ji=!0;break;case"contextmenu":case"mouseup":case"dragend":ji=!1,Ed($,n,Q);break;case"selectionchange":if(d0)break;case"keydown":case"keyup":Ed($,n,Q)}var ie;if(bi)e:{switch(e){case"compositionstart":var de="onCompositionStart";break e;case"compositionend":de="onCompositionEnd";break e;case"compositionupdate":de="onCompositionUpdate";break e}de=void 0}else Ka?fd(e,n)&&(de="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(de="onCompositionStart");de&&(id&&n.locale!=="ko"&&(Ka||de!=="onCompositionStart"?de==="onCompositionEnd"&&Ka&&(ie=ad()):(Dn=Q,pi="value"in Dn?Dn.value:Dn.textContent,Ka=!0)),we=$r(H,de),0<we.length&&(de=new rd(de,e,null,n,Q),$.push({event:de,listeners:we}),ie?de.data=ie:(ie=dd(n),ie!==null&&(de.data=ie)))),(ie=n0?a0(e,n):l0(e,n))&&(de=$r(H,"onBeforeInput"),0<de.length&&(we=new rd("onBeforeInput","beforeinput",null,n,Q),$.push({event:we,listeners:de}),we.data=ie)),P0($,e,H,n,Q)}Ph($,t)})}function Es(e,t,n){return{instance:e,listener:t,currentTarget:n}}function $r(e,t){for(var n=t+"Capture",l=[];e!==null;){var r=e,u=r.stateNode;if(r=r.tag,r!==5&&r!==26&&r!==27||u===null||(r=Yl(e,n),r!=null&&l.unshift(Es(e,r,u)),r=Yl(e,t),r!=null&&l.push(Es(e,r,u))),e.tag===3)return l;e=e.return}return[]}function gl(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Fh(e,t,n,l,r){for(var u=t._reactName,g=[];n!==null&&n!==l;){var S=n,_=S.alternate,H=S.stateNode;if(S=S.tag,_!==null&&_===l)break;S!==5&&S!==26&&S!==27||H===null||(_=H,r?(H=Yl(n,u),H!=null&&g.unshift(Es(n,H,_))):r||(H=Yl(n,u),H!=null&&g.push(Es(n,H,_)))),n=n.return}g.length!==0&&e.push({event:t,listeners:g})}var W0=/\r\n?/g,I0=/\u0000|\uFFFD/g;function Jh(e){return(typeof e=="string"?e:""+e).replace(W0,`
`).replace(I0,"")}function Wh(e,t){return t=Jh(t),Jh(e)===t}function Fr(){}function ke(e,t,n,l,r,u){switch(n){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||Ya(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&Ya(e,""+l);break;case"className":tr(e,"class",l);break;case"tabIndex":tr(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":tr(e,n,l);break;case"style":ed(e,l,u);break;case"data":if(t!=="object"){tr(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=lr(""+l),e.setAttribute(n,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(n,"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 u=="function"&&(n==="formAction"?(t!=="input"&&ke(e,t,"name",r.name,r,null),ke(e,t,"formEncType",r.formEncType,r,null),ke(e,t,"formMethod",r.formMethod,r,null),ke(e,t,"formTarget",r.formTarget,r,null)):(ke(e,t,"encType",r.encType,r,null),ke(e,t,"method",r.method,r,null),ke(e,t,"target",r.target,r,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=lr(""+l),e.setAttribute(n,l);break;case"onClick":l!=null&&(e.onclick=Fr);break;case"onScroll":l!=null&&Ee("scroll",e);break;case"onScrollEnd":l!=null&&Ee("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(o(61));if(n=l.__html,n!=null){if(r.children!=null)throw Error(o(60));e.innerHTML=n}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}n=lr(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,""+l):e.removeAttribute(n);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":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":l===!0?e.setAttribute(n,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,l):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(n,l):e.removeAttribute(n);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(n):e.setAttribute(n,l);break;case"popover":Ee("beforetoggle",e),Ee("toggle",e),er(e,"popover",l);break;case"xlinkActuate":cn(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":cn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":cn(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":cn(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":cn(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":cn(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":cn(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":cn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":cn(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":er(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=Ay.get(n)||n,er(e,n,l))}}function Pc(e,t,n,l,r,u){switch(n){case"style":ed(e,l,u);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(o(61));if(n=l.__html,n!=null){if(r.children!=null)throw Error(o(60));e.innerHTML=n}}break;case"children":typeof l=="string"?Ya(e,l):(typeof l=="number"||typeof l=="bigint")&&Ya(e,""+l);break;case"onScroll":l!=null&&Ee("scroll",e);break;case"onScrollEnd":l!=null&&Ee("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Fr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Vf.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(r=n.endsWith("Capture"),t=n.slice(2,r?n.length-7:void 0),u=e[dt]||null,u=u!=null?u[n]:null,typeof u=="function"&&e.removeEventListener(t,u,r),typeof l=="function")){typeof u!="function"&&u!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,l,r);break e}n in e?e[n]=l:l===!0?e.setAttribute(n,""):er(e,n,l)}}}function lt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ee("error",e),Ee("load",e);var l=!1,r=!1,u;for(u in n)if(n.hasOwnProperty(u)){var g=n[u];if(g!=null)switch(u){case"src":l=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:ke(e,t,u,g,n,null)}}r&&ke(e,t,"srcSet",n.srcSet,n,null),l&&ke(e,t,"src",n.src,n,null);return;case"input":Ee("invalid",e);var S=u=g=r=null,_=null,H=null;for(l in n)if(n.hasOwnProperty(l)){var Q=n[l];if(Q!=null)switch(l){case"name":r=Q;break;case"type":g=Q;break;case"checked":_=Q;break;case"defaultChecked":H=Q;break;case"value":u=Q;break;case"defaultValue":S=Q;break;case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(o(137,t));break;default:ke(e,t,l,Q,n,null)}}Ff(e,u,S,_,H,g,r,!1),nr(e);return;case"select":Ee("invalid",e),l=g=u=null;for(r in n)if(n.hasOwnProperty(r)&&(S=n[r],S!=null))switch(r){case"value":u=S;break;case"defaultValue":g=S;break;case"multiple":l=S;default:ke(e,t,r,S,n,null)}t=u,n=g,e.multiple=!!l,t!=null?Ga(e,!!l,t,!1):n!=null&&Ga(e,!!l,n,!0);return;case"textarea":Ee("invalid",e),u=r=l=null;for(g in n)if(n.hasOwnProperty(g)&&(S=n[g],S!=null))switch(g){case"value":l=S;break;case"defaultValue":r=S;break;case"children":u=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(o(91));break;default:ke(e,t,g,S,n,null)}Wf(e,l,r,u),nr(e);return;case"option":for(_ in n)if(n.hasOwnProperty(_)&&(l=n[_],l!=null))switch(_){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:ke(e,t,_,l,n,null)}return;case"dialog":Ee("beforetoggle",e),Ee("toggle",e),Ee("cancel",e),Ee("close",e);break;case"iframe":case"object":Ee("load",e);break;case"video":case"audio":for(l=0;l<Ns.length;l++)Ee(Ns[l],e);break;case"image":Ee("error",e),Ee("load",e);break;case"details":Ee("toggle",e);break;case"embed":case"source":case"link":Ee("error",e),Ee("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(H in n)if(n.hasOwnProperty(H)&&(l=n[H],l!=null))switch(H){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:ke(e,t,H,l,n,null)}return;default:if(ui(t)){for(Q in n)n.hasOwnProperty(Q)&&(l=n[Q],l!==void 0&&Pc(e,t,Q,l,n,void 0));return}}for(S in n)n.hasOwnProperty(S)&&(l=n[S],l!=null&&ke(e,t,S,l,n,null))}function eb(e,t,n,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var r=null,u=null,g=null,S=null,_=null,H=null,Q=null;for(V in n){var $=n[V];if(n.hasOwnProperty(V)&&$!=null)switch(V){case"checked":break;case"value":break;case"defaultValue":_=$;default:l.hasOwnProperty(V)||ke(e,t,V,null,l,$)}}for(var G in l){var V=l[G];if($=n[G],l.hasOwnProperty(G)&&(V!=null||$!=null))switch(G){case"type":u=V;break;case"name":r=V;break;case"checked":H=V;break;case"defaultChecked":Q=V;break;case"value":g=V;break;case"defaultValue":S=V;break;case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(o(137,t));break;default:V!==$&&ke(e,t,G,V,l,$)}}ii(e,g,S,_,H,Q,u,r);return;case"select":V=g=S=G=null;for(u in n)if(_=n[u],n.hasOwnProperty(u)&&_!=null)switch(u){case"value":break;case"multiple":V=_;default:l.hasOwnProperty(u)||ke(e,t,u,null,l,_)}for(r in l)if(u=l[r],_=n[r],l.hasOwnProperty(r)&&(u!=null||_!=null))switch(r){case"value":G=u;break;case"defaultValue":S=u;break;case"multiple":g=u;default:u!==_&&ke(e,t,r,u,l,_)}t=S,n=g,l=V,G!=null?Ga(e,!!n,G,!1):!!l!=!!n&&(t!=null?Ga(e,!!n,t,!0):Ga(e,!!n,n?[]:"",!1));return;case"textarea":V=G=null;for(S in n)if(r=n[S],n.hasOwnProperty(S)&&r!=null&&!l.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:ke(e,t,S,null,l,r)}for(g in l)if(r=l[g],u=n[g],l.hasOwnProperty(g)&&(r!=null||u!=null))switch(g){case"value":G=r;break;case"defaultValue":V=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(o(91));break;default:r!==u&&ke(e,t,g,r,l,u)}Jf(e,G,V);return;case"option":for(var ve in n)if(G=n[ve],n.hasOwnProperty(ve)&&G!=null&&!l.hasOwnProperty(ve))switch(ve){case"selected":e.selected=!1;break;default:ke(e,t,ve,null,l,G)}for(_ in l)if(G=l[_],V=n[_],l.hasOwnProperty(_)&&G!==V&&(G!=null||V!=null))switch(_){case"selected":e.selected=G&&typeof G!="function"&&typeof G!="symbol";break;default:ke(e,t,_,G,l,V)}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 fe in n)G=n[fe],n.hasOwnProperty(fe)&&G!=null&&!l.hasOwnProperty(fe)&&ke(e,t,fe,null,l,G);for(H in l)if(G=l[H],V=n[H],l.hasOwnProperty(H)&&G!==V&&(G!=null||V!=null))switch(H){case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(o(137,t));break;default:ke(e,t,H,G,l,V)}return;default:if(ui(t)){for(var ze in n)G=n[ze],n.hasOwnProperty(ze)&&G!==void 0&&!l.hasOwnProperty(ze)&&Pc(e,t,ze,void 0,l,G);for(Q in l)G=l[Q],V=n[Q],!l.hasOwnProperty(Q)||G===V||G===void 0&&V===void 0||Pc(e,t,Q,G,l,V);return}}for(var z in n)G=n[z],n.hasOwnProperty(z)&&G!=null&&!l.hasOwnProperty(z)&&ke(e,t,z,null,l,G);for($ in l)G=l[$],V=n[$],!l.hasOwnProperty($)||G===V||G==null&&V==null||ke(e,t,$,G,l,V)}var $c=null,Fc=null;function Jr(e){return e.nodeType===9?e:e.ownerDocument}function Ih(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function ep(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Jc(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Wc=null;function tb(){var e=window.event;return e&&e.type==="popstate"?e===Wc?!1:(Wc=e,!0):(Wc=null,!1)}var tp=typeof setTimeout=="function"?setTimeout:void 0,nb=typeof clearTimeout=="function"?clearTimeout:void 0,np=typeof Promise=="function"?Promise:void 0,ab=typeof queueMicrotask=="function"?queueMicrotask:typeof np<"u"?function(e){return np.resolve(null).then(e).catch(lb)}:tp;function lb(e){setTimeout(function(){throw e})}function Pn(e){return e==="head"}function ap(e,t){var n=t,l=0,r=0;do{var u=n.nextSibling;if(e.removeChild(n),u&&u.nodeType===8)if(n=u.data,n==="/$"){if(0<l&&8>l){n=l;var g=e.ownerDocument;if(n&1&&js(g.documentElement),n&2&&js(g.body),n&4)for(n=g.head,js(n),g=n.firstChild;g;){var S=g.nextSibling,_=g.nodeName;g[ql]||_==="SCRIPT"||_==="STYLE"||_==="LINK"&&g.rel.toLowerCase()==="stylesheet"||n.removeChild(g),g=S}}if(r===0){e.removeChild(u),Os(t);return}r--}else n==="$"||n==="$?"||n==="$!"?r++:l=n.charCodeAt(0)-48;else l=0;n=u}while(n);Os(t)}function Ic(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Ic(n),li(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function sb(e,t,n,l){for(;e.nodeType===1;){var r=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[ql])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==r.rel||e.getAttribute("href")!==(r.href==null||r.href===""?null:r.href)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin)||e.getAttribute("title")!==(r.title==null?null:r.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(r.src==null?null:r.src)||e.getAttribute("type")!==(r.type==null?null:r.type)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=r.name==null?null:""+r.name;if(r.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=Vt(e.nextSibling),e===null)break}return null}function rb(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Vt(e.nextSibling),e===null))return null;return e}function eu(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function ob(e,t){var n=e.ownerDocument;if(e.data!=="$?"||n.readyState==="complete")t();else{var l=function(){t(),n.removeEventListener("DOMContentLoaded",l)};n.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function Vt(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="F!"||t==="F")break;if(t==="/$")return null}}return e}var tu=null;function lp(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}function sp(e,t,n){switch(t=Jr(n),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function js(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);li(e)}var Lt=new Map,rp=new Set;function Wr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Nn=K.d;K.d={f:ib,r:cb,D:ub,C:fb,L:db,m:mb,X:pb,S:hb,M:gb};function ib(){var e=Nn.f(),t=Vr();return e||t}function cb(e){var t=La(e);t!==null&&t.tag===5&&t.type==="form"?_m(t):Nn.r(e)}var vl=typeof document>"u"?null:document;function op(e,t,n){var l=vl;if(l&&typeof t=="string"&&t){var r=Ct(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof n=="string"&&(r+='[crossorigin="'+n+'"]'),rp.has(r)||(rp.add(r),e={rel:e,crossOrigin:n,href:t},l.querySelector(r)===null&&(t=l.createElement("link"),lt(t,"link",e),We(t),l.head.appendChild(t)))}}function ub(e){Nn.D(e),op("dns-prefetch",e,null)}function fb(e,t){Nn.C(e,t),op("preconnect",e,t)}function db(e,t,n){Nn.L(e,t,n);var l=vl;if(l&&e&&t){var r='link[rel="preload"][as="'+Ct(t)+'"]';t==="image"&&n&&n.imageSrcSet?(r+='[imagesrcset="'+Ct(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(r+='[imagesizes="'+Ct(n.imageSizes)+'"]')):r+='[href="'+Ct(e)+'"]';var u=r;switch(t){case"style":u=xl(e);break;case"script":u=yl(e)}Lt.has(u)||(e=v({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Lt.set(u,e),l.querySelector(r)!==null||t==="style"&&l.querySelector(_s(u))||t==="script"&&l.querySelector(Ms(u))||(t=l.createElement("link"),lt(t,"link",e),We(t),l.head.appendChild(t)))}}function mb(e,t){Nn.m(e,t);var n=vl;if(n&&e){var l=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+Ct(l)+'"][href="'+Ct(e)+'"]',u=r;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=yl(e)}if(!Lt.has(u)&&(e=v({rel:"modulepreload",href:e},t),Lt.set(u,e),n.querySelector(r)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Ms(u)))return}l=n.createElement("link"),lt(l,"link",e),We(l),n.head.appendChild(l)}}}function hb(e,t,n){Nn.S(e,t,n);var l=vl;if(l&&e){var r=Ha(l).hoistableStyles,u=xl(e);t=t||"default";var g=r.get(u);if(!g){var S={loading:0,preload:null};if(g=l.querySelector(_s(u)))S.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Lt.get(u))&&nu(e,n);var _=g=l.createElement("link");We(_),lt(_,"link",e),_._p=new Promise(function(H,Q){_.onload=H,_.onerror=Q}),_.addEventListener("load",function(){S.loading|=1}),_.addEventListener("error",function(){S.loading|=2}),S.loading|=4,Ir(g,t,l)}g={type:"stylesheet",instance:g,count:1,state:S},r.set(u,g)}}}function pb(e,t){Nn.X(e,t);var n=vl;if(n&&e){var l=Ha(n).hoistableScripts,r=yl(e),u=l.get(r);u||(u=n.querySelector(Ms(r)),u||(e=v({src:e,async:!0},t),(t=Lt.get(r))&&au(e,t),u=n.createElement("script"),We(u),lt(u,"link",e),n.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},l.set(r,u))}}function gb(e,t){Nn.M(e,t);var n=vl;if(n&&e){var l=Ha(n).hoistableScripts,r=yl(e),u=l.get(r);u||(u=n.querySelector(Ms(r)),u||(e=v({src:e,async:!0,type:"module"},t),(t=Lt.get(r))&&au(e,t),u=n.createElement("script"),We(u),lt(u,"link",e),n.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},l.set(r,u))}}function ip(e,t,n,l){var r=(r=ce.current)?Wr(r):null;if(!r)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=xl(n.href),n=Ha(r).hoistableStyles,l=n.get(t),l||(l={type:"style",instance:null,count:0,state:null},n.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=xl(n.href);var u=Ha(r).hoistableStyles,g=u.get(e);if(g||(r=r.ownerDocument||r,g={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,g),(u=r.querySelector(_s(e)))&&!u._p&&(g.instance=u,g.state.loading=5),Lt.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Lt.set(e,n),u||vb(r,e,n,g.state))),t&&l===null)throw Error(o(528,""));return g}if(t&&l!==null)throw Error(o(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=yl(n),n=Ha(r).hoistableScripts,l=n.get(t),l||(l={type:"script",instance:null,count:0,state:null},n.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function xl(e){return'href="'+Ct(e)+'"'}function _s(e){return'link[rel="stylesheet"]['+e+"]"}function cp(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function vb(e,t,n,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),lt(t,"link",n),We(t),e.head.appendChild(t))}function yl(e){return'[src="'+Ct(e)+'"]'}function Ms(e){return"script[async]"+e}function up(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+Ct(n.href)+'"]');if(l)return t.instance=l,We(l),l;var r=v({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),We(l),lt(l,"style",r),Ir(l,n.precedence,e),t.instance=l;case"stylesheet":r=xl(n.href);var u=e.querySelector(_s(r));if(u)return t.state.loading|=4,t.instance=u,We(u),u;l=cp(n),(r=Lt.get(r))&&nu(l,r),u=(e.ownerDocument||e).createElement("link"),We(u);var g=u;return g._p=new Promise(function(S,_){g.onload=S,g.onerror=_}),lt(u,"link",l),t.state.loading|=4,Ir(u,n.precedence,e),t.instance=u;case"script":return u=yl(n.src),(r=e.querySelector(Ms(u)))?(t.instance=r,We(r),r):(l=n,(r=Lt.get(u))&&(l=v({},n),au(l,r)),e=e.ownerDocument||e,r=e.createElement("script"),We(r),lt(r,"link",l),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,Ir(l,n.precedence,e));return t.instance}function Ir(e,t,n){for(var l=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=l.length?l[l.length-1]:null,u=r,g=0;g<l.length;g++){var S=l[g];if(S.dataset.precedence===t)u=S;else if(u!==r)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function nu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function au(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var eo=null;function fp(e,t,n){if(eo===null){var l=new Map,r=eo=new Map;r.set(n,l)}else r=eo,l=r.get(n),l||(l=new Map,r.set(n,l));if(l.has(e))return l;for(l.set(e,null),n=n.getElementsByTagName(e),r=0;r<n.length;r++){var u=n[r];if(!(u[ql]||u[st]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var g=u.getAttribute(t)||"";g=e+g;var S=l.get(g);S?S.push(u):l.set(g,[u])}}return l}function dp(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function xb(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function mp(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}var Ts=null;function yb(){}function bb(e,t,n){if(Ts===null)throw Error(o(475));var l=Ts;if(t.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(t.state.loading&4)===0){if(t.instance===null){var r=xl(n.href),u=e.querySelector(_s(r));if(u){e=u._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(l.count++,l=to.bind(l),e.then(l,l)),t.state.loading|=4,t.instance=u,We(u);return}u=e.ownerDocument||e,n=cp(n),(r=Lt.get(r))&&nu(n,r),u=u.createElement("link"),We(u);var g=u;g._p=new Promise(function(S,_){g.onload=S,g.onerror=_}),lt(u,"link",n),t.instance=u}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(t,e),(e=t.state.preload)&&(t.state.loading&3)===0&&(l.count++,t=to.bind(l),e.addEventListener("load",t),e.addEventListener("error",t))}}function Sb(){if(Ts===null)throw Error(o(475));var e=Ts;return e.stylesheets&&e.count===0&&lu(e,e.stylesheets),0<e.count?function(t){var n=setTimeout(function(){if(e.stylesheets&&lu(e,e.stylesheets),e.unsuspend){var l=e.unsuspend;e.unsuspend=null,l()}},6e4);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(n)}}:null}function to(){if(this.count--,this.count===0){if(this.stylesheets)lu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var no=null;function lu(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,no=new Map,t.forEach(wb,e),no=null,to.call(e))}function wb(e,t){if(!(t.state.loading&4)){var n=no.get(e);if(n)var l=n.get(null);else{n=new Map,no.set(e,n);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<r.length;u++){var g=r[u];(g.nodeName==="LINK"||g.getAttribute("media")!=="not all")&&(n.set(g.dataset.precedence,g),l=g)}l&&n.set(null,l)}r=t.instance,g=r.getAttribute("data-precedence"),u=n.get(g)||l,u===l&&n.set(null,r),n.set(g,r),this.count++,l=to.bind(this),r.addEventListener("load",l),r.addEventListener("error",l),u?u.parentNode.insertBefore(r,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(r,e.firstChild)),t.state.loading|=4}}var As={$$typeof:C,Provider:null,Consumer:null,_currentValue:Y,_currentValue2:Y,_threadCount:0};function Nb(e,t,n,l,r,u,g,S){this.tag=1,this.containerInfo=e,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=ei(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ei(0),this.hiddenUpdates=ei(null),this.identifierPrefix=l,this.onUncaughtError=r,this.onCaughtError=u,this.onRecoverableError=g,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=S,this.incompleteTransitions=new Map}function hp(e,t,n,l,r,u,g,S,_,H,Q,$){return e=new Nb(e,t,n,g,S,_,H,$),t=1,u===!0&&(t|=24),u=bt(3,null,null,t),e.current=u,u.stateNode=e,t=Bi(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:l,isDehydrated:n,cache:t},Vi(u),e}function pp(e){return e?(e=Fa,e):Fa}function gp(e,t,n,l,r,u){r=pp(r),l.context===null?l.context=r:l.pendingContext=r,l=zn(t),l.payload={element:n},u=u===void 0?null:u,u!==null&&(l.callback=u),n=Un(e,l,t),n!==null&&(jt(n,e,t),ss(n,e,t))}function vp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function su(e,t){vp(e,t),(e=e.alternate)&&vp(e,t)}function xp(e){if(e.tag===13){var t=$a(e,67108864);t!==null&&jt(t,e,67108864),su(e,67108864)}}var ao=!0;function Eb(e,t,n,l){var r=k.T;k.T=null;var u=K.p;try{K.p=2,ru(e,t,n,l)}finally{K.p=u,k.T=r}}function jb(e,t,n,l){var r=k.T;k.T=null;var u=K.p;try{K.p=8,ru(e,t,n,l)}finally{K.p=u,k.T=r}}function ru(e,t,n,l){if(ao){var r=ou(l);if(r===null)Zc(e,t,l,lo,n),bp(e,l);else if(Mb(r,e,t,n,l))l.stopPropagation();else if(bp(e,l),t&4&&-1<_b.indexOf(e)){for(;r!==null;){var u=La(r);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var g=ia(u.pendingLanes);if(g!==0){var S=u;for(S.pendingLanes|=2,S.entangledLanes|=2;g;){var _=1<<31-xt(g);S.entanglements[1]|=_,g&=~_}en(u),(Re&6)===0&&(Gr=$t()+500,ws(0))}}break;case 13:S=$a(u,2),S!==null&&jt(S,u,2),Vr(),su(u,2)}if(u=ou(l),u===null&&Zc(e,t,l,lo,n),u===r)break;r=u}r!==null&&l.stopPropagation()}else Zc(e,t,l,null,n)}}function ou(e){return e=di(e),iu(e)}var lo=null;function iu(e){if(lo=null,e=Ua(e),e!==null){var t=d(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=m(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return lo=e,null}function yp(e){switch(e){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(fy()){case Of:return 2;case kf:return 8;case Fs:case dy:return 32;case zf:return 268435456;default:return 32}default:return 32}}var cu=!1,$n=null,Fn=null,Jn=null,Cs=new Map,Rs=new Map,Wn=[],_b="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 bp(e,t){switch(e){case"focusin":case"focusout":$n=null;break;case"dragenter":case"dragleave":Fn=null;break;case"mouseover":case"mouseout":Jn=null;break;case"pointerover":case"pointerout":Cs.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Rs.delete(t.pointerId)}}function Ds(e,t,n,l,r,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:n,eventSystemFlags:l,nativeEvent:u,targetContainers:[r]},t!==null&&(t=La(t),t!==null&&xp(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function Mb(e,t,n,l,r){switch(t){case"focusin":return $n=Ds($n,e,t,n,l,r),!0;case"dragenter":return Fn=Ds(Fn,e,t,n,l,r),!0;case"mouseover":return Jn=Ds(Jn,e,t,n,l,r),!0;case"pointerover":var u=r.pointerId;return Cs.set(u,Ds(Cs.get(u)||null,e,t,n,l,r)),!0;case"gotpointercapture":return u=r.pointerId,Rs.set(u,Ds(Rs.get(u)||null,e,t,n,l,r)),!0}return!1}function Sp(e){var t=Ua(e.target);if(t!==null){var n=d(t);if(n!==null){if(t=n.tag,t===13){if(t=m(n),t!==null){e.blockedOn=t,by(e.priority,function(){if(n.tag===13){var l=Et();l=ti(l);var r=$a(n,l);r!==null&&jt(r,n,l),su(n,l)}});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function so(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=ou(e.nativeEvent);if(n===null){n=e.nativeEvent;var l=new n.constructor(n.type,n);fi=l,n.target.dispatchEvent(l),fi=null}else return t=La(n),t!==null&&xp(t),e.blockedOn=n,!1;t.shift()}return!0}function wp(e,t,n){so(e)&&n.delete(t)}function Tb(){cu=!1,$n!==null&&so($n)&&($n=null),Fn!==null&&so(Fn)&&(Fn=null),Jn!==null&&so(Jn)&&(Jn=null),Cs.forEach(wp),Rs.forEach(wp)}function ro(e,t){e.blockedOn===t&&(e.blockedOn=null,cu||(cu=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,Tb)))}var oo=null;function Np(e){oo!==e&&(oo=e,a.unstable_scheduleCallback(a.unstable_NormalPriority,function(){oo===e&&(oo=null);for(var t=0;t<e.length;t+=3){var n=e[t],l=e[t+1],r=e[t+2];if(typeof l!="function"){if(iu(l||n)===null)continue;break}var u=La(n);u!==null&&(e.splice(t,3),t-=3,ic(u,{pending:!0,data:r,method:n.method,action:l},l,r))}}))}function Os(e){function t(_){return ro(_,e)}$n!==null&&ro($n,e),Fn!==null&&ro(Fn,e),Jn!==null&&ro(Jn,e),Cs.forEach(t),Rs.forEach(t);for(var n=0;n<Wn.length;n++){var l=Wn[n];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Wn.length&&(n=Wn[0],n.blockedOn===null);)Sp(n),n.blockedOn===null&&Wn.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(l=0;l<n.length;l+=3){var r=n[l],u=n[l+1],g=r[dt]||null;if(typeof u=="function")g||Np(n);else if(g){var S=null;if(u&&u.hasAttribute("formAction")){if(r=u,g=u[dt]||null)S=g.formAction;else if(iu(r)!==null)continue}else S=g.action;typeof S=="function"?n[l+1]=S:(n.splice(l,3),l-=3),Np(n)}}}function uu(e){this._internalRoot=e}io.prototype.render=uu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var n=t.current,l=Et();gp(n,l,e,t,null,null)},io.prototype.unmount=uu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;gp(e.current,2,null,e,null,null),Vr(),t[za]=null}};function io(e){this._internalRoot=e}io.prototype.unstable_scheduleHydration=function(e){if(e){var t=qf();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Wn.length&&t!==0&&t<Wn[n].priority;n++);Wn.splice(n,0,e),n===0&&Sp(e)}};var Ep=s.version;if(Ep!=="19.1.1")throw Error(o(527,Ep,"19.1.1"));K.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=x(t),e=e!==null?h(e):null,e=e===null?null:e.stateNode,e};var Ab={bundleType:0,version:"19.1.1",rendererPackageName:"react-dom",currentDispatcherRef:k,reconcilerVersion:"19.1.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var co=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!co.isDisabled&&co.supportsFiber)try{Ll=co.inject(Ab),vt=co}catch{}}return zs.createRoot=function(e,t){if(!f(e))throw Error(o(299));var n=!1,l="",r=qm,u=Gm,g=Ym,S=null;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(r=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(g=t.onRecoverableError),t.unstable_transitionCallbacks!==void 0&&(S=t.unstable_transitionCallbacks)),t=hp(e,1,!1,null,null,n,l,r,u,g,S,null),e[za]=t.current,Qc(e),new uu(t)},zs.hydrateRoot=function(e,t,n){if(!f(e))throw Error(o(299));var l=!1,r="",u=qm,g=Gm,S=Ym,_=null,H=null;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(r=n.identifierPrefix),n.onUncaughtError!==void 0&&(u=n.onUncaughtError),n.onCaughtError!==void 0&&(g=n.onCaughtError),n.onRecoverableError!==void 0&&(S=n.onRecoverableError),n.unstable_transitionCallbacks!==void 0&&(_=n.unstable_transitionCallbacks),n.formState!==void 0&&(H=n.formState)),t=hp(e,1,!0,t,n??null,l,r,u,g,S,_,H),t.context=pp(null),n=t.current,l=Et(),l=ti(l),r=zn(l),r.callback=null,Un(n,r,l),n=l,t.current.lanes=n,Bl(t,n),en(t),e[za]=t.current,Qc(e),new io(t)},zs.version="19.1.1",zs}var kp;function Bb(){if(kp)return mu.exports;kp=1;function a(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(s){console.error(s)}}return a(),mu.exports=Hb(),mu.exports}var qb=Bb();function zp(a,s){if(typeof a=="function")return a(s);a!=null&&(a.current=s)}function Uo(...a){return s=>{let i=!1;const o=a.map(f=>{const d=zp(f,s);return!i&&typeof d=="function"&&(i=!0),d});if(i)return()=>{for(let f=0;f<o.length;f++){const d=o[f];typeof d=="function"?d():zp(a[f],null)}}}}function He(...a){return y.useCallback(Uo(...a),a)}function Hs(a){const s=Yb(a),i=y.forwardRef((o,f)=>{const{children:d,...m}=o,p=y.Children.toArray(d),x=p.find(Xb);if(x){const h=x.props.children,v=p.map(b=>b===x?y.Children.count(h)>1?y.Children.only(null):y.isValidElement(h)?h.props.children:null:b);return c.jsx(s,{...m,ref:f,children:y.isValidElement(h)?y.cloneElement(h,void 0,v):null})}return c.jsx(s,{...m,ref:f,children:d})});return i.displayName=`${a}.Slot`,i}var Gb=Hs("Slot");function Yb(a){const s=y.forwardRef((i,o)=>{const{children:f,...d}=i;if(y.isValidElement(f)){const m=Qb(f),p=Kb(d,f.props);return f.type!==y.Fragment&&(p.ref=o?Uo(o,m):m),y.cloneElement(f,p)}return y.Children.count(f)>1?y.Children.only(null):null});return s.displayName=`${a}.SlotClone`,s}var Vb=Symbol("radix.slottable");function Xb(a){return y.isValidElement(a)&&typeof a.type=="function"&&"__radixId"in a.type&&a.type.__radixId===Vb}function Kb(a,s){const i={...s};for(const o in s){const f=a[o],d=s[o];/^on[A-Z]/.test(o)?f&&d?i[o]=(...p)=>{const x=d(...p);return f(...p),x}:f&&(i[o]=f):o==="style"?i[o]={...f,...d}:o==="className"&&(i[o]=[f,d].filter(Boolean).join(" "))}return{...a,...i}}function Qb(a){let s=Object.getOwnPropertyDescriptor(a.props,"ref")?.get,i=s&&"isReactWarning"in s&&s.isReactWarning;return i?a.ref:(s=Object.getOwnPropertyDescriptor(a,"ref")?.get,i=s&&"isReactWarning"in s&&s.isReactWarning,i?a.props.ref:a.props.ref||a.ref)}function Ng(a){var s,i,o="";if(typeof a=="string"||typeof a=="number")o+=a;else if(typeof a=="object")if(Array.isArray(a)){var f=a.length;for(s=0;s<f;s++)a[s]&&(i=Ng(a[s]))&&(o&&(o+=" "),o+=i)}else for(i in a)a[i]&&(o&&(o+=" "),o+=i);return o}function Eg(){for(var a,s,i=0,o="",f=arguments.length;i<f;i++)(a=arguments[i])&&(s=Ng(a))&&(o&&(o+=" "),o+=s);return o}const Up=a=>typeof a=="boolean"?`${a}`:a===0?"0":a,Lp=Eg,jg=(a,s)=>i=>{var o;if(s?.variants==null)return Lp(a,i?.class,i?.className);const{variants:f,defaultVariants:d}=s,m=Object.keys(f).map(h=>{const v=i?.[h],b=d?.[h];if(v===null)return null;const w=Up(v)||Up(b);return f[h][w]}),p=i&&Object.entries(i).reduce((h,v)=>{let[b,w]=v;return w===void 0||(h[b]=w),h},{}),x=s==null||(o=s.compoundVariants)===null||o===void 0?void 0:o.reduce((h,v)=>{let{class:b,className:w,...N}=v;return Object.entries(N).every(M=>{let[E,D]=M;return Array.isArray(D)?D.includes({...d,...p}[E]):{...d,...p}[E]===D})?[...h,b,w]:h},[]);return Lp(a,m,x,i?.class,i?.className)},Ju="-",Zb=a=>{const s=$b(a),{conflictingClassGroups:i,conflictingClassGroupModifiers:o}=a;return{getClassGroupId:m=>{const p=m.split(Ju);return p[0]===""&&p.length!==1&&p.shift(),_g(p,s)||Pb(m)},getConflictingClassGroupIds:(m,p)=>{const x=i[m]||[];return p&&o[m]?[...x,...o[m]]:x}}},_g=(a,s)=>{if(a.length===0)return s.classGroupId;const i=a[0],o=s.nextPart.get(i),f=o?_g(a.slice(1),o):void 0;if(f)return f;if(s.validators.length===0)return;const d=a.join(Ju);return s.validators.find(({validator:m})=>m(d))?.classGroupId},Hp=/^\[(.+)\]$/,Pb=a=>{if(Hp.test(a)){const s=Hp.exec(a)[1],i=s?.substring(0,s.indexOf(":"));if(i)return"arbitrary.."+i}},$b=a=>{const{theme:s,classGroups:i}=a,o={nextPart:new Map,validators:[]};for(const f in i)Du(i[f],o,f,s);return o},Du=(a,s,i,o)=>{a.forEach(f=>{if(typeof f=="string"){const d=f===""?s:Bp(s,f);d.classGroupId=i;return}if(typeof f=="function"){if(Fb(f)){Du(f(o),s,i,o);return}s.validators.push({validator:f,classGroupId:i});return}Object.entries(f).forEach(([d,m])=>{Du(m,Bp(s,d),i,o)})})},Bp=(a,s)=>{let i=a;return s.split(Ju).forEach(o=>{i.nextPart.has(o)||i.nextPart.set(o,{nextPart:new Map,validators:[]}),i=i.nextPart.get(o)}),i},Fb=a=>a.isThemeGetter,Jb=a=>{if(a<1)return{get:()=>{},set:()=>{}};let s=0,i=new Map,o=new Map;const f=(d,m)=>{i.set(d,m),s++,s>a&&(s=0,o=i,i=new Map)};return{get(d){let m=i.get(d);if(m!==void 0)return m;if((m=o.get(d))!==void 0)return f(d,m),m},set(d,m){i.has(d)?i.set(d,m):f(d,m)}}},Ou="!",ku=":",Wb=ku.length,Ib=a=>{const{prefix:s,experimentalParseClassName:i}=a;let o=f=>{const d=[];let m=0,p=0,x=0,h;for(let M=0;M<f.length;M++){let E=f[M];if(m===0&&p===0){if(E===ku){d.push(f.slice(x,M)),x=M+Wb;continue}if(E==="/"){h=M;continue}}E==="["?m++:E==="]"?m--:E==="("?p++:E===")"&&p--}const v=d.length===0?f:f.substring(x),b=e1(v),w=b!==v,N=h&&h>x?h-x:void 0;return{modifiers:d,hasImportantModifier:w,baseClassName:b,maybePostfixModifierPosition:N}};if(s){const f=s+ku,d=o;o=m=>m.startsWith(f)?d(m.substring(f.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:m,maybePostfixModifierPosition:void 0}}if(i){const f=o;o=d=>i({className:d,parseClassName:f})}return o},e1=a=>a.endsWith(Ou)?a.substring(0,a.length-1):a.startsWith(Ou)?a.substring(1):a,t1=a=>{const s=Object.fromEntries(a.orderSensitiveModifiers.map(o=>[o,!0]));return o=>{if(o.length<=1)return o;const f=[];let d=[];return o.forEach(m=>{m[0]==="["||s[m]?(f.push(...d.sort(),m),d=[]):d.push(m)}),f.push(...d.sort()),f}},n1=a=>({cache:Jb(a.cacheSize),parseClassName:Ib(a),sortModifiers:t1(a),...Zb(a)}),a1=/\s+/,l1=(a,s)=>{const{parseClassName:i,getClassGroupId:o,getConflictingClassGroupIds:f,sortModifiers:d}=s,m=[],p=a.trim().split(a1);let x="";for(let h=p.length-1;h>=0;h-=1){const v=p[h],{isExternal:b,modifiers:w,hasImportantModifier:N,baseClassName:M,maybePostfixModifierPosition:E}=i(v);if(b){x=v+(x.length>0?" "+x:x);continue}let D=!!E,R=o(D?M.substring(0,E):M);if(!R){if(!D){x=v+(x.length>0?" "+x:x);continue}if(R=o(M),!R){x=v+(x.length>0?" "+x:x);continue}D=!1}const B=d(w).join(":"),C=N?B+Ou:B,A=C+R;if(m.includes(A))continue;m.push(A);const j=f(R,D);for(let L=0;L<j.length;++L){const q=j[L];m.push(C+q)}x=v+(x.length>0?" "+x:x)}return x};function s1(){let a=0,s,i,o="";for(;a<arguments.length;)(s=arguments[a++])&&(i=Mg(s))&&(o&&(o+=" "),o+=i);return o}const Mg=a=>{if(typeof a=="string")return a;let s,i="";for(let o=0;o<a.length;o++)a[o]&&(s=Mg(a[o]))&&(i&&(i+=" "),i+=s);return i};function r1(a,...s){let i,o,f,d=m;function m(x){const h=s.reduce((v,b)=>b(v),a());return i=n1(h),o=i.cache.get,f=i.cache.set,d=p,p(x)}function p(x){const h=o(x);if(h)return h;const v=l1(x,i);return f(x,v),v}return function(){return d(s1.apply(null,arguments))}}const Je=a=>{const s=i=>i[a]||[];return s.isThemeGetter=!0,s},Tg=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ag=/^\((?:(\w[\w-]*):)?(.+)\)$/i,o1=/^\d+\/\d+$/,i1=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,c1=/\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$/,u1=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,f1=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,d1=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,bl=a=>o1.test(a),Se=a=>!!a&&!Number.isNaN(Number(a)),ea=a=>!!a&&Number.isInteger(Number(a)),vu=a=>a.endsWith("%")&&Se(a.slice(0,-1)),En=a=>i1.test(a),m1=()=>!0,h1=a=>c1.test(a)&&!u1.test(a),Cg=()=>!1,p1=a=>f1.test(a),g1=a=>d1.test(a),v1=a=>!se(a)&&!re(a),x1=a=>Dl(a,Og,Cg),se=a=>Tg.test(a),_a=a=>Dl(a,kg,h1),xu=a=>Dl(a,N1,Se),qp=a=>Dl(a,Rg,Cg),y1=a=>Dl(a,Dg,g1),uo=a=>Dl(a,zg,p1),re=a=>Ag.test(a),Us=a=>Ol(a,kg),b1=a=>Ol(a,E1),Gp=a=>Ol(a,Rg),S1=a=>Ol(a,Og),w1=a=>Ol(a,Dg),fo=a=>Ol(a,zg,!0),Dl=(a,s,i)=>{const o=Tg.exec(a);return o?o[1]?s(o[1]):i(o[2]):!1},Ol=(a,s,i=!1)=>{const o=Ag.exec(a);return o?o[1]?s(o[1]):i:!1},Rg=a=>a==="position"||a==="percentage",Dg=a=>a==="image"||a==="url",Og=a=>a==="length"||a==="size"||a==="bg-size",kg=a=>a==="length",N1=a=>a==="number",E1=a=>a==="family-name",zg=a=>a==="shadow",j1=()=>{const a=Je("color"),s=Je("font"),i=Je("text"),o=Je("font-weight"),f=Je("tracking"),d=Je("leading"),m=Je("breakpoint"),p=Je("container"),x=Je("spacing"),h=Je("radius"),v=Je("shadow"),b=Je("inset-shadow"),w=Je("text-shadow"),N=Je("drop-shadow"),M=Je("blur"),E=Je("perspective"),D=Je("aspect"),R=Je("ease"),B=Je("animate"),C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],A=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],j=()=>[...A(),re,se],L=()=>["auto","hidden","clip","visible","scroll"],q=()=>["auto","contain","none"],X=()=>[re,se,x],F=()=>[bl,"full","auto",...X()],ee=()=>[ea,"none","subgrid",re,se],I=()=>["auto",{span:["full",ea,re,se]},ea,re,se],ae=()=>[ea,"auto",re,se],pe=()=>["auto","min","max","fr",re,se],ge=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],oe=()=>["start","end","center","stretch","center-safe","end-safe"],k=()=>["auto",...X()],K=()=>[bl,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...X()],Y=()=>[a,re,se],W=()=>[...A(),Gp,qp,{position:[re,se]}],T=()=>["no-repeat",{repeat:["","x","y","space","round"]}],P=()=>["auto","cover","contain",S1,x1,{size:[re,se]}],te=()=>[vu,Us,_a],J=()=>["","none","full",h,re,se],ne=()=>["",Se,Us,_a],xe=()=>["solid","dashed","dotted","double"],ce=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ue=()=>[Se,vu,Gp,qp],Me=()=>["","none",M,re,se],ct=()=>["none",Se,re,se],Qt=()=>["none",Se,re,se],Zt=()=>[Se,re,se],Pt=()=>[bl,"full",...X()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[En],breakpoint:[En],color:[m1],container:[En],"drop-shadow":[En],ease:["in","out","in-out"],font:[v1],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[En],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[En],shadow:[En],spacing:["px",Se],text:[En],"text-shadow":[En],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",bl,se,re,D]}],container:["container"],columns:[{columns:[Se,se,re,p]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"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:j()}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:q()}],"overscroll-x":[{"overscroll-x":q()}],"overscroll-y":[{"overscroll-y":q()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:F()}],"inset-x":[{"inset-x":F()}],"inset-y":[{"inset-y":F()}],start:[{start:F()}],end:[{end:F()}],top:[{top:F()}],right:[{right:F()}],bottom:[{bottom:F()}],left:[{left:F()}],visibility:["visible","invisible","collapse"],z:[{z:[ea,"auto",re,se]}],basis:[{basis:[bl,"full","auto",p,...X()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Se,bl,"auto","initial","none",se]}],grow:[{grow:["",Se,re,se]}],shrink:[{shrink:["",Se,re,se]}],order:[{order:[ea,"first","last","none",re,se]}],"grid-cols":[{"grid-cols":ee()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":ae()}],"col-end":[{"col-end":ae()}],"grid-rows":[{"grid-rows":ee()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":ae()}],"row-end":[{"row-end":ae()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":pe()}],"auto-rows":[{"auto-rows":pe()}],gap:[{gap:X()}],"gap-x":[{"gap-x":X()}],"gap-y":[{"gap-y":X()}],"justify-content":[{justify:[...ge(),"normal"]}],"justify-items":[{"justify-items":[...oe(),"normal"]}],"justify-self":[{"justify-self":["auto",...oe()]}],"align-content":[{content:["normal",...ge()]}],"align-items":[{items:[...oe(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...oe(),{baseline:["","last"]}]}],"place-content":[{"place-content":ge()}],"place-items":[{"place-items":[...oe(),"baseline"]}],"place-self":[{"place-self":["auto",...oe()]}],p:[{p:X()}],px:[{px:X()}],py:[{py:X()}],ps:[{ps:X()}],pe:[{pe:X()}],pt:[{pt:X()}],pr:[{pr:X()}],pb:[{pb:X()}],pl:[{pl:X()}],m:[{m:k()}],mx:[{mx:k()}],my:[{my:k()}],ms:[{ms:k()}],me:[{me:k()}],mt:[{mt:k()}],mr:[{mr:k()}],mb:[{mb:k()}],ml:[{ml:k()}],"space-x":[{"space-x":X()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":X()}],"space-y-reverse":["space-y-reverse"],size:[{size:K()}],w:[{w:[p,"screen",...K()]}],"min-w":[{"min-w":[p,"screen","none",...K()]}],"max-w":[{"max-w":[p,"screen","none","prose",{screen:[m]},...K()]}],h:[{h:["screen","lh",...K()]}],"min-h":[{"min-h":["screen","lh","none",...K()]}],"max-h":[{"max-h":["screen","lh",...K()]}],"font-size":[{text:["base",i,Us,_a]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,re,xu]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",vu,se]}],"font-family":[{font:[b1,se,s]}],"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:[f,re,se]}],"line-clamp":[{"line-clamp":[Se,"none",re,xu]}],leading:[{leading:[d,...X()]}],"list-image":[{"list-image":["none",re,se]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",re,se]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Y()}],"text-color":[{text:Y()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...xe(),"wavy"]}],"text-decoration-thickness":[{decoration:[Se,"from-font","auto",re,_a]}],"text-decoration-color":[{decoration:Y()}],"underline-offset":[{"underline-offset":[Se,"auto",re,se]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:X()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",re,se]}],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",re,se]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:W()}],"bg-repeat":[{bg:T()}],"bg-size":[{bg:P()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ea,re,se],radial:["",re,se],conic:[ea,re,se]},w1,y1]}],"bg-color":[{bg:Y()}],"gradient-from-pos":[{from:te()}],"gradient-via-pos":[{via:te()}],"gradient-to-pos":[{to:te()}],"gradient-from":[{from:Y()}],"gradient-via":[{via:Y()}],"gradient-to":[{to:Y()}],rounded:[{rounded:J()}],"rounded-s":[{"rounded-s":J()}],"rounded-e":[{"rounded-e":J()}],"rounded-t":[{"rounded-t":J()}],"rounded-r":[{"rounded-r":J()}],"rounded-b":[{"rounded-b":J()}],"rounded-l":[{"rounded-l":J()}],"rounded-ss":[{"rounded-ss":J()}],"rounded-se":[{"rounded-se":J()}],"rounded-ee":[{"rounded-ee":J()}],"rounded-es":[{"rounded-es":J()}],"rounded-tl":[{"rounded-tl":J()}],"rounded-tr":[{"rounded-tr":J()}],"rounded-br":[{"rounded-br":J()}],"rounded-bl":[{"rounded-bl":J()}],"border-w":[{border:ne()}],"border-w-x":[{"border-x":ne()}],"border-w-y":[{"border-y":ne()}],"border-w-s":[{"border-s":ne()}],"border-w-e":[{"border-e":ne()}],"border-w-t":[{"border-t":ne()}],"border-w-r":[{"border-r":ne()}],"border-w-b":[{"border-b":ne()}],"border-w-l":[{"border-l":ne()}],"divide-x":[{"divide-x":ne()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ne()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...xe(),"hidden","none"]}],"divide-style":[{divide:[...xe(),"hidden","none"]}],"border-color":[{border:Y()}],"border-color-x":[{"border-x":Y()}],"border-color-y":[{"border-y":Y()}],"border-color-s":[{"border-s":Y()}],"border-color-e":[{"border-e":Y()}],"border-color-t":[{"border-t":Y()}],"border-color-r":[{"border-r":Y()}],"border-color-b":[{"border-b":Y()}],"border-color-l":[{"border-l":Y()}],"divide-color":[{divide:Y()}],"outline-style":[{outline:[...xe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Se,re,se]}],"outline-w":[{outline:["",Se,Us,_a]}],"outline-color":[{outline:Y()}],shadow:[{shadow:["","none",v,fo,uo]}],"shadow-color":[{shadow:Y()}],"inset-shadow":[{"inset-shadow":["none",b,fo,uo]}],"inset-shadow-color":[{"inset-shadow":Y()}],"ring-w":[{ring:ne()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Y()}],"ring-offset-w":[{"ring-offset":[Se,_a]}],"ring-offset-color":[{"ring-offset":Y()}],"inset-ring-w":[{"inset-ring":ne()}],"inset-ring-color":[{"inset-ring":Y()}],"text-shadow":[{"text-shadow":["none",w,fo,uo]}],"text-shadow-color":[{"text-shadow":Y()}],opacity:[{opacity:[Se,re,se]}],"mix-blend":[{"mix-blend":[...ce(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ce()}],"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":[Se]}],"mask-image-linear-from-pos":[{"mask-linear-from":ue()}],"mask-image-linear-to-pos":[{"mask-linear-to":ue()}],"mask-image-linear-from-color":[{"mask-linear-from":Y()}],"mask-image-linear-to-color":[{"mask-linear-to":Y()}],"mask-image-t-from-pos":[{"mask-t-from":ue()}],"mask-image-t-to-pos":[{"mask-t-to":ue()}],"mask-image-t-from-color":[{"mask-t-from":Y()}],"mask-image-t-to-color":[{"mask-t-to":Y()}],"mask-image-r-from-pos":[{"mask-r-from":ue()}],"mask-image-r-to-pos":[{"mask-r-to":ue()}],"mask-image-r-from-color":[{"mask-r-from":Y()}],"mask-image-r-to-color":[{"mask-r-to":Y()}],"mask-image-b-from-pos":[{"mask-b-from":ue()}],"mask-image-b-to-pos":[{"mask-b-to":ue()}],"mask-image-b-from-color":[{"mask-b-from":Y()}],"mask-image-b-to-color":[{"mask-b-to":Y()}],"mask-image-l-from-pos":[{"mask-l-from":ue()}],"mask-image-l-to-pos":[{"mask-l-to":ue()}],"mask-image-l-from-color":[{"mask-l-from":Y()}],"mask-image-l-to-color":[{"mask-l-to":Y()}],"mask-image-x-from-pos":[{"mask-x-from":ue()}],"mask-image-x-to-pos":[{"mask-x-to":ue()}],"mask-image-x-from-color":[{"mask-x-from":Y()}],"mask-image-x-to-color":[{"mask-x-to":Y()}],"mask-image-y-from-pos":[{"mask-y-from":ue()}],"mask-image-y-to-pos":[{"mask-y-to":ue()}],"mask-image-y-from-color":[{"mask-y-from":Y()}],"mask-image-y-to-color":[{"mask-y-to":Y()}],"mask-image-radial":[{"mask-radial":[re,se]}],"mask-image-radial-from-pos":[{"mask-radial-from":ue()}],"mask-image-radial-to-pos":[{"mask-radial-to":ue()}],"mask-image-radial-from-color":[{"mask-radial-from":Y()}],"mask-image-radial-to-color":[{"mask-radial-to":Y()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":A()}],"mask-image-conic-pos":[{"mask-conic":[Se]}],"mask-image-conic-from-pos":[{"mask-conic-from":ue()}],"mask-image-conic-to-pos":[{"mask-conic-to":ue()}],"mask-image-conic-from-color":[{"mask-conic-from":Y()}],"mask-image-conic-to-color":[{"mask-conic-to":Y()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:W()}],"mask-repeat":[{mask:T()}],"mask-size":[{mask:P()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",re,se]}],filter:[{filter:["","none",re,se]}],blur:[{blur:Me()}],brightness:[{brightness:[Se,re,se]}],contrast:[{contrast:[Se,re,se]}],"drop-shadow":[{"drop-shadow":["","none",N,fo,uo]}],"drop-shadow-color":[{"drop-shadow":Y()}],grayscale:[{grayscale:["",Se,re,se]}],"hue-rotate":[{"hue-rotate":[Se,re,se]}],invert:[{invert:["",Se,re,se]}],saturate:[{saturate:[Se,re,se]}],sepia:[{sepia:["",Se,re,se]}],"backdrop-filter":[{"backdrop-filter":["","none",re,se]}],"backdrop-blur":[{"backdrop-blur":Me()}],"backdrop-brightness":[{"backdrop-brightness":[Se,re,se]}],"backdrop-contrast":[{"backdrop-contrast":[Se,re,se]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Se,re,se]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Se,re,se]}],"backdrop-invert":[{"backdrop-invert":["",Se,re,se]}],"backdrop-opacity":[{"backdrop-opacity":[Se,re,se]}],"backdrop-saturate":[{"backdrop-saturate":[Se,re,se]}],"backdrop-sepia":[{"backdrop-sepia":["",Se,re,se]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":X()}],"border-spacing-x":[{"border-spacing-x":X()}],"border-spacing-y":[{"border-spacing-y":X()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",re,se]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Se,"initial",re,se]}],ease:[{ease:["linear","initial",R,re,se]}],delay:[{delay:[Se,re,se]}],animate:[{animate:["none",B,re,se]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[E,re,se]}],"perspective-origin":[{"perspective-origin":j()}],rotate:[{rotate:ct()}],"rotate-x":[{"rotate-x":ct()}],"rotate-y":[{"rotate-y":ct()}],"rotate-z":[{"rotate-z":ct()}],scale:[{scale:Qt()}],"scale-x":[{"scale-x":Qt()}],"scale-y":[{"scale-y":Qt()}],"scale-z":[{"scale-z":Qt()}],"scale-3d":["scale-3d"],skew:[{skew:Zt()}],"skew-x":[{"skew-x":Zt()}],"skew-y":[{"skew-y":Zt()}],transform:[{transform:[re,se,"","none","gpu","cpu"]}],"transform-origin":[{origin:j()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Pt()}],"translate-x":[{"translate-x":Pt()}],"translate-y":[{"translate-y":Pt()}],"translate-z":[{"translate-z":Pt()}],"translate-none":["translate-none"],accent:[{accent:Y()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Y()}],"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",re,se]}],"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":X()}],"scroll-mx":[{"scroll-mx":X()}],"scroll-my":[{"scroll-my":X()}],"scroll-ms":[{"scroll-ms":X()}],"scroll-me":[{"scroll-me":X()}],"scroll-mt":[{"scroll-mt":X()}],"scroll-mr":[{"scroll-mr":X()}],"scroll-mb":[{"scroll-mb":X()}],"scroll-ml":[{"scroll-ml":X()}],"scroll-p":[{"scroll-p":X()}],"scroll-px":[{"scroll-px":X()}],"scroll-py":[{"scroll-py":X()}],"scroll-ps":[{"scroll-ps":X()}],"scroll-pe":[{"scroll-pe":X()}],"scroll-pt":[{"scroll-pt":X()}],"scroll-pr":[{"scroll-pr":X()}],"scroll-pb":[{"scroll-pb":X()}],"scroll-pl":[{"scroll-pl":X()}],"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",re,se]}],fill:[{fill:["none",...Y()]}],"stroke-w":[{stroke:[Se,Us,_a,xu]}],stroke:[{stroke:["none",...Y()]}],"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"]}},_1=r1(j1);function Xe(...a){return _1(Eg(a))}const M1=jg("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function Ve({className:a,variant:s,size:i,asChild:o=!1,...f}){const d=o?Gb:"button";return c.jsx(d,{"data-slot":"button",className:Xe(M1({variant:s,size:i,className:a})),...f})}function me(a,s,{checkForDefaultPrevented:i=!0}={}){return function(f){if(a?.(f),i===!1||!f.defaultPrevented)return s?.(f)}}function oa(a,s=[]){let i=[];function o(d,m){const p=y.createContext(m),x=i.length;i=[...i,m];const h=b=>{const{scope:w,children:N,...M}=b,E=w?.[a]?.[x]||p,D=y.useMemo(()=>M,Object.values(M));return c.jsx(E.Provider,{value:D,children:N})};h.displayName=d+"Provider";function v(b,w){const N=w?.[a]?.[x]||p,M=y.useContext(N);if(M)return M;if(m!==void 0)return m;throw new Error(`\`${b}\` must be used within \`${d}\``)}return[h,v]}const f=()=>{const d=i.map(m=>y.createContext(m));return function(p){const x=p?.[a]||d;return y.useMemo(()=>({[`__scope${a}`]:{...p,[a]:x}}),[p,x])}};return f.scopeName=a,[o,T1(f,...s)]}function T1(...a){const s=a[0];if(a.length===1)return s;const i=()=>{const o=a.map(f=>({useScope:f(),scopeName:f.scopeName}));return function(d){const m=o.reduce((p,{useScope:x,scopeName:h})=>{const b=x(d)[`__scope${h}`];return{...p,...b}},{});return y.useMemo(()=>({[`__scope${s.scopeName}`]:m}),[m])}};return i.scopeName=s.scopeName,i}var _n=globalThis?.document?y.useLayoutEffect:()=>{},A1=Sg[" useInsertionEffect ".trim().toString()]||_n;function Lo({prop:a,defaultProp:s,onChange:i=()=>{},caller:o}){const[f,d,m]=C1({defaultProp:s,onChange:i}),p=a!==void 0,x=p?a:f;{const v=y.useRef(a!==void 0);y.useEffect(()=>{const b=v.current;b!==p&&console.warn(`${o} is changing from ${b?"controlled":"uncontrolled"} to ${p?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),v.current=p},[p,o])}const h=y.useCallback(v=>{if(p){const b=R1(v)?v(a):v;b!==a&&m.current?.(b)}else d(v)},[p,a,d,m]);return[x,h]}function C1({defaultProp:a,onChange:s}){const[i,o]=y.useState(a),f=y.useRef(i),d=y.useRef(s);return A1(()=>{d.current=s},[s]),y.useEffect(()=>{f.current!==i&&(d.current?.(i),f.current=i)},[i,f]),[i,o,d]}function R1(a){return typeof a=="function"}var Wu=wg();const D1=bg(Wu);var O1=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ce=O1.reduce((a,s)=>{const i=Hs(`Primitive.${s}`),o=y.forwardRef((f,d)=>{const{asChild:m,...p}=f,x=m?i:s;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(x,{...p,ref:d})});return o.displayName=`Primitive.${s}`,{...a,[s]:o}},{});function Ug(a,s){a&&Wu.flushSync(()=>a.dispatchEvent(s))}function Iu(a){const s=a+"CollectionProvider",[i,o]=oa(s),[f,d]=i(s,{collectionRef:{current:null},itemMap:new Map}),m=E=>{const{scope:D,children:R}=E,B=ta.useRef(null),C=ta.useRef(new Map).current;return c.jsx(f,{scope:D,itemMap:C,collectionRef:B,children:R})};m.displayName=s;const p=a+"CollectionSlot",x=Hs(p),h=ta.forwardRef((E,D)=>{const{scope:R,children:B}=E,C=d(p,R),A=He(D,C.collectionRef);return c.jsx(x,{ref:A,children:B})});h.displayName=p;const v=a+"CollectionItemSlot",b="data-radix-collection-item",w=Hs(v),N=ta.forwardRef((E,D)=>{const{scope:R,children:B,...C}=E,A=ta.useRef(null),j=He(D,A),L=d(v,R);return ta.useEffect(()=>(L.itemMap.set(A,{ref:A,...C}),()=>void L.itemMap.delete(A))),c.jsx(w,{[b]:"",ref:j,children:B})});N.displayName=v;function M(E){const D=d(a+"CollectionConsumer",E);return ta.useCallback(()=>{const B=D.collectionRef.current;if(!B)return[];const C=Array.from(B.querySelectorAll(`[${b}]`));return Array.from(D.itemMap.values()).sort((L,q)=>C.indexOf(L.ref.current)-C.indexOf(q.ref.current))},[D.collectionRef,D.itemMap])}return[{Provider:m,Slot:h,ItemSlot:N},M,o]}var k1=y.createContext(void 0);function Ks(a){const s=y.useContext(k1);return a||s||"ltr"}function it(a){const s=y.useRef(a);return y.useEffect(()=>{s.current=a}),y.useMemo(()=>(...i)=>s.current?.(...i),[])}function z1(a,s=globalThis?.document){const i=it(a);y.useEffect(()=>{const o=f=>{f.key==="Escape"&&i(f)};return s.addEventListener("keydown",o,{capture:!0}),()=>s.removeEventListener("keydown",o,{capture:!0})},[i,s])}var U1="DismissableLayer",zu="dismissableLayer.update",L1="dismissableLayer.pointerDownOutside",H1="dismissableLayer.focusOutside",Yp,Lg=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Hg=y.forwardRef((a,s)=>{const{disableOutsidePointerEvents:i=!1,onEscapeKeyDown:o,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:m,onDismiss:p,...x}=a,h=y.useContext(Lg),[v,b]=y.useState(null),w=v?.ownerDocument??globalThis?.document,[,N]=y.useState({}),M=He(s,q=>b(q)),E=Array.from(h.layers),[D]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),R=E.indexOf(D),B=v?E.indexOf(v):-1,C=h.layersWithOutsidePointerEventsDisabled.size>0,A=B>=R,j=G1(q=>{const X=q.target,F=[...h.branches].some(ee=>ee.contains(X));!A||F||(f?.(q),m?.(q),q.defaultPrevented||p?.())},w),L=Y1(q=>{const X=q.target;[...h.branches].some(ee=>ee.contains(X))||(d?.(q),m?.(q),q.defaultPrevented||p?.())},w);return z1(q=>{B===h.layers.size-1&&(o?.(q),!q.defaultPrevented&&p&&(q.preventDefault(),p()))},w),y.useEffect(()=>{if(v)return i&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(Yp=w.body.style.pointerEvents,w.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(v)),h.layers.add(v),Vp(),()=>{i&&h.layersWithOutsidePointerEventsDisabled.size===1&&(w.body.style.pointerEvents=Yp)}},[v,w,i,h]),y.useEffect(()=>()=>{v&&(h.layers.delete(v),h.layersWithOutsidePointerEventsDisabled.delete(v),Vp())},[v,h]),y.useEffect(()=>{const q=()=>N({});return document.addEventListener(zu,q),()=>document.removeEventListener(zu,q)},[]),c.jsx(Ce.div,{...x,ref:M,style:{pointerEvents:C?A?"auto":"none":void 0,...a.style},onFocusCapture:me(a.onFocusCapture,L.onFocusCapture),onBlurCapture:me(a.onBlurCapture,L.onBlurCapture),onPointerDownCapture:me(a.onPointerDownCapture,j.onPointerDownCapture)})});Hg.displayName=U1;var B1="DismissableLayerBranch",q1=y.forwardRef((a,s)=>{const i=y.useContext(Lg),o=y.useRef(null),f=He(s,o);return y.useEffect(()=>{const d=o.current;if(d)return i.branches.add(d),()=>{i.branches.delete(d)}},[i.branches]),c.jsx(Ce.div,{...a,ref:f})});q1.displayName=B1;function G1(a,s=globalThis?.document){const i=it(a),o=y.useRef(!1),f=y.useRef(()=>{});return y.useEffect(()=>{const d=p=>{if(p.target&&!o.current){let x=function(){Bg(L1,i,h,{discrete:!0})};const h={originalEvent:p};p.pointerType==="touch"?(s.removeEventListener("click",f.current),f.current=x,s.addEventListener("click",f.current,{once:!0})):x()}else s.removeEventListener("click",f.current);o.current=!1},m=window.setTimeout(()=>{s.addEventListener("pointerdown",d)},0);return()=>{window.clearTimeout(m),s.removeEventListener("pointerdown",d),s.removeEventListener("click",f.current)}},[s,i]),{onPointerDownCapture:()=>o.current=!0}}function Y1(a,s=globalThis?.document){const i=it(a),o=y.useRef(!1);return y.useEffect(()=>{const f=d=>{d.target&&!o.current&&Bg(H1,i,{originalEvent:d},{discrete:!1})};return s.addEventListener("focusin",f),()=>s.removeEventListener("focusin",f)},[s,i]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Vp(){const a=new CustomEvent(zu);document.dispatchEvent(a)}function Bg(a,s,i,{discrete:o}){const f=i.originalEvent.target,d=new CustomEvent(a,{bubbles:!1,cancelable:!0,detail:i});s&&f.addEventListener(a,s,{once:!0}),o?Ug(f,d):f.dispatchEvent(d)}var yu=0;function V1(){y.useEffect(()=>{const a=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",a[0]??Xp()),document.body.insertAdjacentElement("beforeend",a[1]??Xp()),yu++,()=>{yu===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(s=>s.remove()),yu--}},[])}function Xp(){const a=document.createElement("span");return a.setAttribute("data-radix-focus-guard",""),a.tabIndex=0,a.style.outline="none",a.style.opacity="0",a.style.position="fixed",a.style.pointerEvents="none",a}var bu="focusScope.autoFocusOnMount",Su="focusScope.autoFocusOnUnmount",Kp={bubbles:!1,cancelable:!0},X1="FocusScope",qg=y.forwardRef((a,s)=>{const{loop:i=!1,trapped:o=!1,onMountAutoFocus:f,onUnmountAutoFocus:d,...m}=a,[p,x]=y.useState(null),h=it(f),v=it(d),b=y.useRef(null),w=He(s,E=>x(E)),N=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(o){let E=function(C){if(N.paused||!p)return;const A=C.target;p.contains(A)?b.current=A:na(b.current,{select:!0})},D=function(C){if(N.paused||!p)return;const A=C.relatedTarget;A!==null&&(p.contains(A)||na(b.current,{select:!0}))},R=function(C){if(document.activeElement===document.body)for(const j of C)j.removedNodes.length>0&&na(p)};document.addEventListener("focusin",E),document.addEventListener("focusout",D);const B=new MutationObserver(R);return p&&B.observe(p,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",E),document.removeEventListener("focusout",D),B.disconnect()}}},[o,p,N.paused]),y.useEffect(()=>{if(p){Zp.add(N);const E=document.activeElement;if(!p.contains(E)){const R=new CustomEvent(bu,Kp);p.addEventListener(bu,h),p.dispatchEvent(R),R.defaultPrevented||(K1(F1(Gg(p)),{select:!0}),document.activeElement===E&&na(p))}return()=>{p.removeEventListener(bu,h),setTimeout(()=>{const R=new CustomEvent(Su,Kp);p.addEventListener(Su,v),p.dispatchEvent(R),R.defaultPrevented||na(E??document.body,{select:!0}),p.removeEventListener(Su,v),Zp.remove(N)},0)}}},[p,h,v,N]);const M=y.useCallback(E=>{if(!i&&!o||N.paused)return;const D=E.key==="Tab"&&!E.altKey&&!E.ctrlKey&&!E.metaKey,R=document.activeElement;if(D&&R){const B=E.currentTarget,[C,A]=Q1(B);C&&A?!E.shiftKey&&R===A?(E.preventDefault(),i&&na(C,{select:!0})):E.shiftKey&&R===C&&(E.preventDefault(),i&&na(A,{select:!0})):R===B&&E.preventDefault()}},[i,o,N.paused]);return c.jsx(Ce.div,{tabIndex:-1,...m,ref:w,onKeyDown:M})});qg.displayName=X1;function K1(a,{select:s=!1}={}){const i=document.activeElement;for(const o of a)if(na(o,{select:s}),document.activeElement!==i)return}function Q1(a){const s=Gg(a),i=Qp(s,a),o=Qp(s.reverse(),a);return[i,o]}function Gg(a){const s=[],i=document.createTreeWalker(a,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const f=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||f?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;i.nextNode();)s.push(i.currentNode);return s}function Qp(a,s){for(const i of a)if(!Z1(i,{upTo:s}))return i}function Z1(a,{upTo:s}){if(getComputedStyle(a).visibility==="hidden")return!0;for(;a;){if(s!==void 0&&a===s)return!1;if(getComputedStyle(a).display==="none")return!0;a=a.parentElement}return!1}function P1(a){return a instanceof HTMLInputElement&&"select"in a}function na(a,{select:s=!1}={}){if(a&&a.focus){const i=document.activeElement;a.focus({preventScroll:!0}),a!==i&&P1(a)&&s&&a.select()}}var Zp=$1();function $1(){let a=[];return{add(s){const i=a[0];s!==i&&i?.pause(),a=Pp(a,s),a.unshift(s)},remove(s){a=Pp(a,s),a[0]?.resume()}}}function Pp(a,s){const i=[...a],o=i.indexOf(s);return o!==-1&&i.splice(o,1),i}function F1(a){return a.filter(s=>s.tagName!=="A")}var J1=Sg[" useId ".trim().toString()]||(()=>{}),W1=0;function _o(a){const[s,i]=y.useState(J1());return _n(()=>{i(o=>o??String(W1++))},[a]),s?`radix-${s}`:""}const I1=["top","right","bottom","left"],la=Math.min,_t=Math.max,Mo=Math.round,mo=Math.floor,an=a=>({x:a,y:a}),eS={left:"right",right:"left",bottom:"top",top:"bottom"},tS={start:"end",end:"start"};function Uu(a,s,i){return _t(a,la(s,i))}function Mn(a,s){return typeof a=="function"?a(s):a}function Tn(a){return a.split("-")[0]}function kl(a){return a.split("-")[1]}function ef(a){return a==="x"?"y":"x"}function tf(a){return a==="y"?"height":"width"}const nS=new Set(["top","bottom"]);function nn(a){return nS.has(Tn(a))?"y":"x"}function nf(a){return ef(nn(a))}function aS(a,s,i){i===void 0&&(i=!1);const o=kl(a),f=nf(a),d=tf(f);let m=f==="x"?o===(i?"end":"start")?"right":"left":o==="start"?"bottom":"top";return s.reference[d]>s.floating[d]&&(m=To(m)),[m,To(m)]}function lS(a){const s=To(a);return[Lu(a),s,Lu(s)]}function Lu(a){return a.replace(/start|end/g,s=>tS[s])}const $p=["left","right"],Fp=["right","left"],sS=["top","bottom"],rS=["bottom","top"];function oS(a,s,i){switch(a){case"top":case"bottom":return i?s?Fp:$p:s?$p:Fp;case"left":case"right":return s?sS:rS;default:return[]}}function iS(a,s,i,o){const f=kl(a);let d=oS(Tn(a),i==="start",o);return f&&(d=d.map(m=>m+"-"+f),s&&(d=d.concat(d.map(Lu)))),d}function To(a){return a.replace(/left|right|bottom|top/g,s=>eS[s])}function cS(a){return{top:0,right:0,bottom:0,left:0,...a}}function Yg(a){return typeof a!="number"?cS(a):{top:a,right:a,bottom:a,left:a}}function Ao(a){const{x:s,y:i,width:o,height:f}=a;return{width:o,height:f,top:i,left:s,right:s+o,bottom:i+f,x:s,y:i}}function Jp(a,s,i){let{reference:o,floating:f}=a;const d=nn(s),m=nf(s),p=tf(m),x=Tn(s),h=d==="y",v=o.x+o.width/2-f.width/2,b=o.y+o.height/2-f.height/2,w=o[p]/2-f[p]/2;let N;switch(x){case"top":N={x:v,y:o.y-f.height};break;case"bottom":N={x:v,y:o.y+o.height};break;case"right":N={x:o.x+o.width,y:b};break;case"left":N={x:o.x-f.width,y:b};break;default:N={x:o.x,y:o.y}}switch(kl(s)){case"start":N[m]-=w*(i&&h?-1:1);break;case"end":N[m]+=w*(i&&h?-1:1);break}return N}const uS=async(a,s,i)=>{const{placement:o="bottom",strategy:f="absolute",middleware:d=[],platform:m}=i,p=d.filter(Boolean),x=await(m.isRTL==null?void 0:m.isRTL(s));let h=await m.getElementRects({reference:a,floating:s,strategy:f}),{x:v,y:b}=Jp(h,o,x),w=o,N={},M=0;for(let E=0;E<p.length;E++){const{name:D,fn:R}=p[E],{x:B,y:C,data:A,reset:j}=await R({x:v,y:b,initialPlacement:o,placement:w,strategy:f,middlewareData:N,rects:h,platform:m,elements:{reference:a,floating:s}});v=B??v,b=C??b,N={...N,[D]:{...N[D],...A}},j&&M<=50&&(M++,typeof j=="object"&&(j.placement&&(w=j.placement),j.rects&&(h=j.rects===!0?await m.getElementRects({reference:a,floating:s,strategy:f}):j.rects),{x:v,y:b}=Jp(h,w,x)),E=-1)}return{x:v,y:b,placement:w,strategy:f,middlewareData:N}};async function Bs(a,s){var i;s===void 0&&(s={});const{x:o,y:f,platform:d,rects:m,elements:p,strategy:x}=a,{boundary:h="clippingAncestors",rootBoundary:v="viewport",elementContext:b="floating",altBoundary:w=!1,padding:N=0}=Mn(s,a),M=Yg(N),D=p[w?b==="floating"?"reference":"floating":b],R=Ao(await d.getClippingRect({element:(i=await(d.isElement==null?void 0:d.isElement(D)))==null||i?D:D.contextElement||await(d.getDocumentElement==null?void 0:d.getDocumentElement(p.floating)),boundary:h,rootBoundary:v,strategy:x})),B=b==="floating"?{x:o,y:f,width:m.floating.width,height:m.floating.height}:m.reference,C=await(d.getOffsetParent==null?void 0:d.getOffsetParent(p.floating)),A=await(d.isElement==null?void 0:d.isElement(C))?await(d.getScale==null?void 0:d.getScale(C))||{x:1,y:1}:{x:1,y:1},j=Ao(d.convertOffsetParentRelativeRectToViewportRelativeRect?await d.convertOffsetParentRelativeRectToViewportRelativeRect({elements:p,rect:B,offsetParent:C,strategy:x}):B);return{top:(R.top-j.top+M.top)/A.y,bottom:(j.bottom-R.bottom+M.bottom)/A.y,left:(R.left-j.left+M.left)/A.x,right:(j.right-R.right+M.right)/A.x}}const fS=a=>({name:"arrow",options:a,async fn(s){const{x:i,y:o,placement:f,rects:d,platform:m,elements:p,middlewareData:x}=s,{element:h,padding:v=0}=Mn(a,s)||{};if(h==null)return{};const b=Yg(v),w={x:i,y:o},N=nf(f),M=tf(N),E=await m.getDimensions(h),D=N==="y",R=D?"top":"left",B=D?"bottom":"right",C=D?"clientHeight":"clientWidth",A=d.reference[M]+d.reference[N]-w[N]-d.floating[M],j=w[N]-d.reference[N],L=await(m.getOffsetParent==null?void 0:m.getOffsetParent(h));let q=L?L[C]:0;(!q||!await(m.isElement==null?void 0:m.isElement(L)))&&(q=p.floating[C]||d.floating[M]);const X=A/2-j/2,F=q/2-E[M]/2-1,ee=la(b[R],F),I=la(b[B],F),ae=ee,pe=q-E[M]-I,ge=q/2-E[M]/2+X,oe=Uu(ae,ge,pe),k=!x.arrow&&kl(f)!=null&&ge!==oe&&d.reference[M]/2-(ge<ae?ee:I)-E[M]/2<0,K=k?ge<ae?ge-ae:ge-pe:0;return{[N]:w[N]+K,data:{[N]:oe,centerOffset:ge-oe-K,...k&&{alignmentOffset:K}},reset:k}}}),dS=function(a){return a===void 0&&(a={}),{name:"flip",options:a,async fn(s){var i,o;const{placement:f,middlewareData:d,rects:m,initialPlacement:p,platform:x,elements:h}=s,{mainAxis:v=!0,crossAxis:b=!0,fallbackPlacements:w,fallbackStrategy:N="bestFit",fallbackAxisSideDirection:M="none",flipAlignment:E=!0,...D}=Mn(a,s);if((i=d.arrow)!=null&&i.alignmentOffset)return{};const R=Tn(f),B=nn(p),C=Tn(p)===p,A=await(x.isRTL==null?void 0:x.isRTL(h.floating)),j=w||(C||!E?[To(p)]:lS(p)),L=M!=="none";!w&&L&&j.push(...iS(p,E,M,A));const q=[p,...j],X=await Bs(s,D),F=[];let ee=((o=d.flip)==null?void 0:o.overflows)||[];if(v&&F.push(X[R]),b){const ge=aS(f,m,A);F.push(X[ge[0]],X[ge[1]])}if(ee=[...ee,{placement:f,overflows:F}],!F.every(ge=>ge<=0)){var I,ae;const ge=(((I=d.flip)==null?void 0:I.index)||0)+1,oe=q[ge];if(oe&&(!(b==="alignment"?B!==nn(oe):!1)||ee.every(Y=>nn(Y.placement)===B?Y.overflows[0]>0:!0)))return{data:{index:ge,overflows:ee},reset:{placement:oe}};let k=(ae=ee.filter(K=>K.overflows[0]<=0).sort((K,Y)=>K.overflows[1]-Y.overflows[1])[0])==null?void 0:ae.placement;if(!k)switch(N){case"bestFit":{var pe;const K=(pe=ee.filter(Y=>{if(L){const W=nn(Y.placement);return W===B||W==="y"}return!0}).map(Y=>[Y.placement,Y.overflows.filter(W=>W>0).reduce((W,T)=>W+T,0)]).sort((Y,W)=>Y[1]-W[1])[0])==null?void 0:pe[0];K&&(k=K);break}case"initialPlacement":k=p;break}if(f!==k)return{reset:{placement:k}}}return{}}}};function Wp(a,s){return{top:a.top-s.height,right:a.right-s.width,bottom:a.bottom-s.height,left:a.left-s.width}}function Ip(a){return I1.some(s=>a[s]>=0)}const mS=function(a){return a===void 0&&(a={}),{name:"hide",options:a,async fn(s){const{rects:i}=s,{strategy:o="referenceHidden",...f}=Mn(a,s);switch(o){case"referenceHidden":{const d=await Bs(s,{...f,elementContext:"reference"}),m=Wp(d,i.reference);return{data:{referenceHiddenOffsets:m,referenceHidden:Ip(m)}}}case"escaped":{const d=await Bs(s,{...f,altBoundary:!0}),m=Wp(d,i.floating);return{data:{escapedOffsets:m,escaped:Ip(m)}}}default:return{}}}}},Vg=new Set(["left","top"]);async function hS(a,s){const{placement:i,platform:o,elements:f}=a,d=await(o.isRTL==null?void 0:o.isRTL(f.floating)),m=Tn(i),p=kl(i),x=nn(i)==="y",h=Vg.has(m)?-1:1,v=d&&x?-1:1,b=Mn(s,a);let{mainAxis:w,crossAxis:N,alignmentAxis:M}=typeof b=="number"?{mainAxis:b,crossAxis:0,alignmentAxis:null}:{mainAxis:b.mainAxis||0,crossAxis:b.crossAxis||0,alignmentAxis:b.alignmentAxis};return p&&typeof M=="number"&&(N=p==="end"?M*-1:M),x?{x:N*v,y:w*h}:{x:w*h,y:N*v}}const pS=function(a){return a===void 0&&(a=0),{name:"offset",options:a,async fn(s){var i,o;const{x:f,y:d,placement:m,middlewareData:p}=s,x=await hS(s,a);return m===((i=p.offset)==null?void 0:i.placement)&&(o=p.arrow)!=null&&o.alignmentOffset?{}:{x:f+x.x,y:d+x.y,data:{...x,placement:m}}}}},gS=function(a){return a===void 0&&(a={}),{name:"shift",options:a,async fn(s){const{x:i,y:o,placement:f}=s,{mainAxis:d=!0,crossAxis:m=!1,limiter:p={fn:D=>{let{x:R,y:B}=D;return{x:R,y:B}}},...x}=Mn(a,s),h={x:i,y:o},v=await Bs(s,x),b=nn(Tn(f)),w=ef(b);let N=h[w],M=h[b];if(d){const D=w==="y"?"top":"left",R=w==="y"?"bottom":"right",B=N+v[D],C=N-v[R];N=Uu(B,N,C)}if(m){const D=b==="y"?"top":"left",R=b==="y"?"bottom":"right",B=M+v[D],C=M-v[R];M=Uu(B,M,C)}const E=p.fn({...s,[w]:N,[b]:M});return{...E,data:{x:E.x-i,y:E.y-o,enabled:{[w]:d,[b]:m}}}}}},vS=function(a){return a===void 0&&(a={}),{options:a,fn(s){const{x:i,y:o,placement:f,rects:d,middlewareData:m}=s,{offset:p=0,mainAxis:x=!0,crossAxis:h=!0}=Mn(a,s),v={x:i,y:o},b=nn(f),w=ef(b);let N=v[w],M=v[b];const E=Mn(p,s),D=typeof E=="number"?{mainAxis:E,crossAxis:0}:{mainAxis:0,crossAxis:0,...E};if(x){const C=w==="y"?"height":"width",A=d.reference[w]-d.floating[C]+D.mainAxis,j=d.reference[w]+d.reference[C]-D.mainAxis;N<A?N=A:N>j&&(N=j)}if(h){var R,B;const C=w==="y"?"width":"height",A=Vg.has(Tn(f)),j=d.reference[b]-d.floating[C]+(A&&((R=m.offset)==null?void 0:R[b])||0)+(A?0:D.crossAxis),L=d.reference[b]+d.reference[C]+(A?0:((B=m.offset)==null?void 0:B[b])||0)-(A?D.crossAxis:0);M<j?M=j:M>L&&(M=L)}return{[w]:N,[b]:M}}}},xS=function(a){return a===void 0&&(a={}),{name:"size",options:a,async fn(s){var i,o;const{placement:f,rects:d,platform:m,elements:p}=s,{apply:x=()=>{},...h}=Mn(a,s),v=await Bs(s,h),b=Tn(f),w=kl(f),N=nn(f)==="y",{width:M,height:E}=d.floating;let D,R;b==="top"||b==="bottom"?(D=b,R=w===(await(m.isRTL==null?void 0:m.isRTL(p.floating))?"start":"end")?"left":"right"):(R=b,D=w==="end"?"top":"bottom");const B=E-v.top-v.bottom,C=M-v.left-v.right,A=la(E-v[D],B),j=la(M-v[R],C),L=!s.middlewareData.shift;let q=A,X=j;if((i=s.middlewareData.shift)!=null&&i.enabled.x&&(X=C),(o=s.middlewareData.shift)!=null&&o.enabled.y&&(q=B),L&&!w){const ee=_t(v.left,0),I=_t(v.right,0),ae=_t(v.top,0),pe=_t(v.bottom,0);N?X=M-2*(ee!==0||I!==0?ee+I:_t(v.left,v.right)):q=E-2*(ae!==0||pe!==0?ae+pe:_t(v.top,v.bottom))}await x({...s,availableWidth:X,availableHeight:q});const F=await m.getDimensions(p.floating);return M!==F.width||E!==F.height?{reset:{rects:!0}}:{}}}};function Ho(){return typeof window<"u"}function zl(a){return Xg(a)?(a.nodeName||"").toLowerCase():"#document"}function Tt(a){var s;return(a==null||(s=a.ownerDocument)==null?void 0:s.defaultView)||window}function sn(a){var s;return(s=(Xg(a)?a.ownerDocument:a.document)||window.document)==null?void 0:s.documentElement}function Xg(a){return Ho()?a instanceof Node||a instanceof Tt(a).Node:!1}function Xt(a){return Ho()?a instanceof Element||a instanceof Tt(a).Element:!1}function ln(a){return Ho()?a instanceof HTMLElement||a instanceof Tt(a).HTMLElement:!1}function eg(a){return!Ho()||typeof ShadowRoot>"u"?!1:a instanceof ShadowRoot||a instanceof Tt(a).ShadowRoot}const yS=new Set(["inline","contents"]);function Qs(a){const{overflow:s,overflowX:i,overflowY:o,display:f}=Kt(a);return/auto|scroll|overlay|hidden|clip/.test(s+o+i)&&!yS.has(f)}const bS=new Set(["table","td","th"]);function SS(a){return bS.has(zl(a))}const wS=[":popover-open",":modal"];function Bo(a){return wS.some(s=>{try{return a.matches(s)}catch{return!1}})}const NS=["transform","translate","scale","rotate","perspective"],ES=["transform","translate","scale","rotate","perspective","filter"],jS=["paint","layout","strict","content"];function af(a){const s=lf(),i=Xt(a)?Kt(a):a;return NS.some(o=>i[o]?i[o]!=="none":!1)||(i.containerType?i.containerType!=="normal":!1)||!s&&(i.backdropFilter?i.backdropFilter!=="none":!1)||!s&&(i.filter?i.filter!=="none":!1)||ES.some(o=>(i.willChange||"").includes(o))||jS.some(o=>(i.contain||"").includes(o))}function _S(a){let s=sa(a);for(;ln(s)&&!Tl(s);){if(af(s))return s;if(Bo(s))return null;s=sa(s)}return null}function lf(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const MS=new Set(["html","body","#document"]);function Tl(a){return MS.has(zl(a))}function Kt(a){return Tt(a).getComputedStyle(a)}function qo(a){return Xt(a)?{scrollLeft:a.scrollLeft,scrollTop:a.scrollTop}:{scrollLeft:a.scrollX,scrollTop:a.scrollY}}function sa(a){if(zl(a)==="html")return a;const s=a.assignedSlot||a.parentNode||eg(a)&&a.host||sn(a);return eg(s)?s.host:s}function Kg(a){const s=sa(a);return Tl(s)?a.ownerDocument?a.ownerDocument.body:a.body:ln(s)&&Qs(s)?s:Kg(s)}function qs(a,s,i){var o;s===void 0&&(s=[]),i===void 0&&(i=!0);const f=Kg(a),d=f===((o=a.ownerDocument)==null?void 0:o.body),m=Tt(f);if(d){const p=Hu(m);return s.concat(m,m.visualViewport||[],Qs(f)?f:[],p&&i?qs(p):[])}return s.concat(f,qs(f,[],i))}function Hu(a){return a.parent&&Object.getPrototypeOf(a.parent)?a.frameElement:null}function Qg(a){const s=Kt(a);let i=parseFloat(s.width)||0,o=parseFloat(s.height)||0;const f=ln(a),d=f?a.offsetWidth:i,m=f?a.offsetHeight:o,p=Mo(i)!==d||Mo(o)!==m;return p&&(i=d,o=m),{width:i,height:o,$:p}}function sf(a){return Xt(a)?a:a.contextElement}function El(a){const s=sf(a);if(!ln(s))return an(1);const i=s.getBoundingClientRect(),{width:o,height:f,$:d}=Qg(s);let m=(d?Mo(i.width):i.width)/o,p=(d?Mo(i.height):i.height)/f;return(!m||!Number.isFinite(m))&&(m=1),(!p||!Number.isFinite(p))&&(p=1),{x:m,y:p}}const TS=an(0);function Zg(a){const s=Tt(a);return!lf()||!s.visualViewport?TS:{x:s.visualViewport.offsetLeft,y:s.visualViewport.offsetTop}}function AS(a,s,i){return s===void 0&&(s=!1),!i||s&&i!==Tt(a)?!1:s}function Aa(a,s,i,o){s===void 0&&(s=!1),i===void 0&&(i=!1);const f=a.getBoundingClientRect(),d=sf(a);let m=an(1);s&&(o?Xt(o)&&(m=El(o)):m=El(a));const p=AS(d,i,o)?Zg(d):an(0);let x=(f.left+p.x)/m.x,h=(f.top+p.y)/m.y,v=f.width/m.x,b=f.height/m.y;if(d){const w=Tt(d),N=o&&Xt(o)?Tt(o):o;let M=w,E=Hu(M);for(;E&&o&&N!==M;){const D=El(E),R=E.getBoundingClientRect(),B=Kt(E),C=R.left+(E.clientLeft+parseFloat(B.paddingLeft))*D.x,A=R.top+(E.clientTop+parseFloat(B.paddingTop))*D.y;x*=D.x,h*=D.y,v*=D.x,b*=D.y,x+=C,h+=A,M=Tt(E),E=Hu(M)}}return Ao({width:v,height:b,x,y:h})}function Go(a,s){const i=qo(a).scrollLeft;return s?s.left+i:Aa(sn(a)).left+i}function Pg(a,s){const i=a.getBoundingClientRect(),o=i.left+s.scrollLeft-Go(a,i),f=i.top+s.scrollTop;return{x:o,y:f}}function CS(a){let{elements:s,rect:i,offsetParent:o,strategy:f}=a;const d=f==="fixed",m=sn(o),p=s?Bo(s.floating):!1;if(o===m||p&&d)return i;let x={scrollLeft:0,scrollTop:0},h=an(1);const v=an(0),b=ln(o);if((b||!b&&!d)&&((zl(o)!=="body"||Qs(m))&&(x=qo(o)),ln(o))){const N=Aa(o);h=El(o),v.x=N.x+o.clientLeft,v.y=N.y+o.clientTop}const w=m&&!b&&!d?Pg(m,x):an(0);return{width:i.width*h.x,height:i.height*h.y,x:i.x*h.x-x.scrollLeft*h.x+v.x+w.x,y:i.y*h.y-x.scrollTop*h.y+v.y+w.y}}function RS(a){return Array.from(a.getClientRects())}function DS(a){const s=sn(a),i=qo(a),o=a.ownerDocument.body,f=_t(s.scrollWidth,s.clientWidth,o.scrollWidth,o.clientWidth),d=_t(s.scrollHeight,s.clientHeight,o.scrollHeight,o.clientHeight);let m=-i.scrollLeft+Go(a);const p=-i.scrollTop;return Kt(o).direction==="rtl"&&(m+=_t(s.clientWidth,o.clientWidth)-f),{width:f,height:d,x:m,y:p}}const tg=25;function OS(a,s){const i=Tt(a),o=sn(a),f=i.visualViewport;let d=o.clientWidth,m=o.clientHeight,p=0,x=0;if(f){d=f.width,m=f.height;const v=lf();(!v||v&&s==="fixed")&&(p=f.offsetLeft,x=f.offsetTop)}const h=Go(o);if(h<=0){const v=o.ownerDocument,b=v.body,w=getComputedStyle(b),N=v.compatMode==="CSS1Compat"&&parseFloat(w.marginLeft)+parseFloat(w.marginRight)||0,M=Math.abs(o.clientWidth-b.clientWidth-N);M<=tg&&(d-=M)}else h<=tg&&(d+=h);return{width:d,height:m,x:p,y:x}}const kS=new Set(["absolute","fixed"]);function zS(a,s){const i=Aa(a,!0,s==="fixed"),o=i.top+a.clientTop,f=i.left+a.clientLeft,d=ln(a)?El(a):an(1),m=a.clientWidth*d.x,p=a.clientHeight*d.y,x=f*d.x,h=o*d.y;return{width:m,height:p,x,y:h}}function ng(a,s,i){let o;if(s==="viewport")o=OS(a,i);else if(s==="document")o=DS(sn(a));else if(Xt(s))o=zS(s,i);else{const f=Zg(a);o={x:s.x-f.x,y:s.y-f.y,width:s.width,height:s.height}}return Ao(o)}function $g(a,s){const i=sa(a);return i===s||!Xt(i)||Tl(i)?!1:Kt(i).position==="fixed"||$g(i,s)}function US(a,s){const i=s.get(a);if(i)return i;let o=qs(a,[],!1).filter(p=>Xt(p)&&zl(p)!=="body"),f=null;const d=Kt(a).position==="fixed";let m=d?sa(a):a;for(;Xt(m)&&!Tl(m);){const p=Kt(m),x=af(m);!x&&p.position==="fixed"&&(f=null),(d?!x&&!f:!x&&p.position==="static"&&!!f&&kS.has(f.position)||Qs(m)&&!x&&$g(a,m))?o=o.filter(v=>v!==m):f=p,m=sa(m)}return s.set(a,o),o}function LS(a){let{element:s,boundary:i,rootBoundary:o,strategy:f}=a;const m=[...i==="clippingAncestors"?Bo(s)?[]:US(s,this._c):[].concat(i),o],p=m[0],x=m.reduce((h,v)=>{const b=ng(s,v,f);return h.top=_t(b.top,h.top),h.right=la(b.right,h.right),h.bottom=la(b.bottom,h.bottom),h.left=_t(b.left,h.left),h},ng(s,p,f));return{width:x.right-x.left,height:x.bottom-x.top,x:x.left,y:x.top}}function HS(a){const{width:s,height:i}=Qg(a);return{width:s,height:i}}function BS(a,s,i){const o=ln(s),f=sn(s),d=i==="fixed",m=Aa(a,!0,d,s);let p={scrollLeft:0,scrollTop:0};const x=an(0);function h(){x.x=Go(f)}if(o||!o&&!d)if((zl(s)!=="body"||Qs(f))&&(p=qo(s)),o){const N=Aa(s,!0,d,s);x.x=N.x+s.clientLeft,x.y=N.y+s.clientTop}else f&&h();d&&!o&&f&&h();const v=f&&!o&&!d?Pg(f,p):an(0),b=m.left+p.scrollLeft-x.x-v.x,w=m.top+p.scrollTop-x.y-v.y;return{x:b,y:w,width:m.width,height:m.height}}function wu(a){return Kt(a).position==="static"}function ag(a,s){if(!ln(a)||Kt(a).position==="fixed")return null;if(s)return s(a);let i=a.offsetParent;return sn(a)===i&&(i=i.ownerDocument.body),i}function Fg(a,s){const i=Tt(a);if(Bo(a))return i;if(!ln(a)){let f=sa(a);for(;f&&!Tl(f);){if(Xt(f)&&!wu(f))return f;f=sa(f)}return i}let o=ag(a,s);for(;o&&SS(o)&&wu(o);)o=ag(o,s);return o&&Tl(o)&&wu(o)&&!af(o)?i:o||_S(a)||i}const qS=async function(a){const s=this.getOffsetParent||Fg,i=this.getDimensions,o=await i(a.floating);return{reference:BS(a.reference,await s(a.floating),a.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function GS(a){return Kt(a).direction==="rtl"}const YS={convertOffsetParentRelativeRectToViewportRelativeRect:CS,getDocumentElement:sn,getClippingRect:LS,getOffsetParent:Fg,getElementRects:qS,getClientRects:RS,getDimensions:HS,getScale:El,isElement:Xt,isRTL:GS};function Jg(a,s){return a.x===s.x&&a.y===s.y&&a.width===s.width&&a.height===s.height}function VS(a,s){let i=null,o;const f=sn(a);function d(){var p;clearTimeout(o),(p=i)==null||p.disconnect(),i=null}function m(p,x){p===void 0&&(p=!1),x===void 0&&(x=1),d();const h=a.getBoundingClientRect(),{left:v,top:b,width:w,height:N}=h;if(p||s(),!w||!N)return;const M=mo(b),E=mo(f.clientWidth-(v+w)),D=mo(f.clientHeight-(b+N)),R=mo(v),C={rootMargin:-M+"px "+-E+"px "+-D+"px "+-R+"px",threshold:_t(0,la(1,x))||1};let A=!0;function j(L){const q=L[0].intersectionRatio;if(q!==x){if(!A)return m();q?m(!1,q):o=setTimeout(()=>{m(!1,1e-7)},1e3)}q===1&&!Jg(h,a.getBoundingClientRect())&&m(),A=!1}try{i=new IntersectionObserver(j,{...C,root:f.ownerDocument})}catch{i=new IntersectionObserver(j,C)}i.observe(a)}return m(!0),d}function XS(a,s,i,o){o===void 0&&(o={});const{ancestorScroll:f=!0,ancestorResize:d=!0,elementResize:m=typeof ResizeObserver=="function",layoutShift:p=typeof IntersectionObserver=="function",animationFrame:x=!1}=o,h=sf(a),v=f||d?[...h?qs(h):[],...qs(s)]:[];v.forEach(R=>{f&&R.addEventListener("scroll",i,{passive:!0}),d&&R.addEventListener("resize",i)});const b=h&&p?VS(h,i):null;let w=-1,N=null;m&&(N=new ResizeObserver(R=>{let[B]=R;B&&B.target===h&&N&&(N.unobserve(s),cancelAnimationFrame(w),w=requestAnimationFrame(()=>{var C;(C=N)==null||C.observe(s)})),i()}),h&&!x&&N.observe(h),N.observe(s));let M,E=x?Aa(a):null;x&&D();function D(){const R=Aa(a);E&&!Jg(E,R)&&i(),E=R,M=requestAnimationFrame(D)}return i(),()=>{var R;v.forEach(B=>{f&&B.removeEventListener("scroll",i),d&&B.removeEventListener("resize",i)}),b?.(),(R=N)==null||R.disconnect(),N=null,x&&cancelAnimationFrame(M)}}const KS=pS,QS=gS,ZS=dS,PS=xS,$S=mS,lg=fS,FS=vS,JS=(a,s,i)=>{const o=new Map,f={platform:YS,...i},d={...f.platform,_c:o};return uS(a,s,{...f,platform:d})};var WS=typeof document<"u",IS=function(){},So=WS?y.useLayoutEffect:IS;function Co(a,s){if(a===s)return!0;if(typeof a!=typeof s)return!1;if(typeof a=="function"&&a.toString()===s.toString())return!0;let i,o,f;if(a&&s&&typeof a=="object"){if(Array.isArray(a)){if(i=a.length,i!==s.length)return!1;for(o=i;o--!==0;)if(!Co(a[o],s[o]))return!1;return!0}if(f=Object.keys(a),i=f.length,i!==Object.keys(s).length)return!1;for(o=i;o--!==0;)if(!{}.hasOwnProperty.call(s,f[o]))return!1;for(o=i;o--!==0;){const d=f[o];if(!(d==="_owner"&&a.$$typeof)&&!Co(a[d],s[d]))return!1}return!0}return a!==a&&s!==s}function Wg(a){return typeof window>"u"?1:(a.ownerDocument.defaultView||window).devicePixelRatio||1}function sg(a,s){const i=Wg(a);return Math.round(s*i)/i}function Nu(a){const s=y.useRef(a);return So(()=>{s.current=a}),s}function ew(a){a===void 0&&(a={});const{placement:s="bottom",strategy:i="absolute",middleware:o=[],platform:f,elements:{reference:d,floating:m}={},transform:p=!0,whileElementsMounted:x,open:h}=a,[v,b]=y.useState({x:0,y:0,strategy:i,placement:s,middlewareData:{},isPositioned:!1}),[w,N]=y.useState(o);Co(w,o)||N(o);const[M,E]=y.useState(null),[D,R]=y.useState(null),B=y.useCallback(Y=>{Y!==L.current&&(L.current=Y,E(Y))},[]),C=y.useCallback(Y=>{Y!==q.current&&(q.current=Y,R(Y))},[]),A=d||M,j=m||D,L=y.useRef(null),q=y.useRef(null),X=y.useRef(v),F=x!=null,ee=Nu(x),I=Nu(f),ae=Nu(h),pe=y.useCallback(()=>{if(!L.current||!q.current)return;const Y={placement:s,strategy:i,middleware:w};I.current&&(Y.platform=I.current),JS(L.current,q.current,Y).then(W=>{const T={...W,isPositioned:ae.current!==!1};ge.current&&!Co(X.current,T)&&(X.current=T,Wu.flushSync(()=>{b(T)}))})},[w,s,i,I,ae]);So(()=>{h===!1&&X.current.isPositioned&&(X.current.isPositioned=!1,b(Y=>({...Y,isPositioned:!1})))},[h]);const ge=y.useRef(!1);So(()=>(ge.current=!0,()=>{ge.current=!1}),[]),So(()=>{if(A&&(L.current=A),j&&(q.current=j),A&&j){if(ee.current)return ee.current(A,j,pe);pe()}},[A,j,pe,ee,F]);const oe=y.useMemo(()=>({reference:L,floating:q,setReference:B,setFloating:C}),[B,C]),k=y.useMemo(()=>({reference:A,floating:j}),[A,j]),K=y.useMemo(()=>{const Y={position:i,left:0,top:0};if(!k.floating)return Y;const W=sg(k.floating,v.x),T=sg(k.floating,v.y);return p?{...Y,transform:"translate("+W+"px, "+T+"px)",...Wg(k.floating)>=1.5&&{willChange:"transform"}}:{position:i,left:W,top:T}},[i,p,k.floating,v.x,v.y]);return y.useMemo(()=>({...v,update:pe,refs:oe,elements:k,floatingStyles:K}),[v,pe,oe,k,K])}const tw=a=>{function s(i){return{}.hasOwnProperty.call(i,"current")}return{name:"arrow",options:a,fn(i){const{element:o,padding:f}=typeof a=="function"?a(i):a;return o&&s(o)?o.current!=null?lg({element:o.current,padding:f}).fn(i):{}:o?lg({element:o,padding:f}).fn(i):{}}}},nw=(a,s)=>({...KS(a),options:[a,s]}),aw=(a,s)=>({...QS(a),options:[a,s]}),lw=(a,s)=>({...FS(a),options:[a,s]}),sw=(a,s)=>({...ZS(a),options:[a,s]}),rw=(a,s)=>({...PS(a),options:[a,s]}),ow=(a,s)=>({...$S(a),options:[a,s]}),iw=(a,s)=>({...tw(a),options:[a,s]});var cw="Arrow",Ig=y.forwardRef((a,s)=>{const{children:i,width:o=10,height:f=5,...d}=a;return c.jsx(Ce.svg,{...d,ref:s,width:o,height:f,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:a.asChild?i:c.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ig.displayName=cw;var uw=Ig;function ev(a){const[s,i]=y.useState(void 0);return _n(()=>{if(a){i({width:a.offsetWidth,height:a.offsetHeight});const o=new ResizeObserver(f=>{if(!Array.isArray(f)||!f.length)return;const d=f[0];let m,p;if("borderBoxSize"in d){const x=d.borderBoxSize,h=Array.isArray(x)?x[0]:x;m=h.inlineSize,p=h.blockSize}else m=a.offsetWidth,p=a.offsetHeight;i({width:m,height:p})});return o.observe(a,{box:"border-box"}),()=>o.unobserve(a)}else i(void 0)},[a]),s}var rf="Popper",[tv,nv]=oa(rf),[fw,av]=tv(rf),lv=a=>{const{__scopePopper:s,children:i}=a,[o,f]=y.useState(null);return c.jsx(fw,{scope:s,anchor:o,onAnchorChange:f,children:i})};lv.displayName=rf;var sv="PopperAnchor",rv=y.forwardRef((a,s)=>{const{__scopePopper:i,virtualRef:o,...f}=a,d=av(sv,i),m=y.useRef(null),p=He(s,m),x=y.useRef(null);return y.useEffect(()=>{const h=x.current;x.current=o?.current||m.current,h!==x.current&&d.onAnchorChange(x.current)}),o?null:c.jsx(Ce.div,{...f,ref:p})});rv.displayName=sv;var of="PopperContent",[dw,mw]=tv(of),ov=y.forwardRef((a,s)=>{const{__scopePopper:i,side:o="bottom",sideOffset:f=0,align:d="center",alignOffset:m=0,arrowPadding:p=0,avoidCollisions:x=!0,collisionBoundary:h=[],collisionPadding:v=0,sticky:b="partial",hideWhenDetached:w=!1,updatePositionStrategy:N="optimized",onPlaced:M,...E}=a,D=av(of,i),[R,B]=y.useState(null),C=He(s,ue=>B(ue)),[A,j]=y.useState(null),L=ev(A),q=L?.width??0,X=L?.height??0,F=o+(d!=="center"?"-"+d:""),ee=typeof v=="number"?v:{top:0,right:0,bottom:0,left:0,...v},I=Array.isArray(h)?h:[h],ae=I.length>0,pe={padding:ee,boundary:I.filter(pw),altBoundary:ae},{refs:ge,floatingStyles:oe,placement:k,isPositioned:K,middlewareData:Y}=ew({strategy:"fixed",placement:F,whileElementsMounted:(...ue)=>XS(...ue,{animationFrame:N==="always"}),elements:{reference:D.anchor},middleware:[nw({mainAxis:f+X,alignmentAxis:m}),x&&aw({mainAxis:!0,crossAxis:!1,limiter:b==="partial"?lw():void 0,...pe}),x&&sw({...pe}),rw({...pe,apply:({elements:ue,rects:Me,availableWidth:ct,availableHeight:Qt})=>{const{width:Zt,height:Pt}=Me.reference,An=ue.floating.style;An.setProperty("--radix-popper-available-width",`${ct}px`),An.setProperty("--radix-popper-available-height",`${Qt}px`),An.setProperty("--radix-popper-anchor-width",`${Zt}px`),An.setProperty("--radix-popper-anchor-height",`${Pt}px`)}}),A&&iw({element:A,padding:p}),gw({arrowWidth:q,arrowHeight:X}),w&&ow({strategy:"referenceHidden",...pe})]}),[W,T]=uv(k),P=it(M);_n(()=>{K&&P?.()},[K,P]);const te=Y.arrow?.x,J=Y.arrow?.y,ne=Y.arrow?.centerOffset!==0,[xe,ce]=y.useState();return _n(()=>{R&&ce(window.getComputedStyle(R).zIndex)},[R]),c.jsx("div",{ref:ge.setFloating,"data-radix-popper-content-wrapper":"",style:{...oe,transform:K?oe.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:xe,"--radix-popper-transform-origin":[Y.transformOrigin?.x,Y.transformOrigin?.y].join(" "),...Y.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:a.dir,children:c.jsx(dw,{scope:i,placedSide:W,onArrowChange:j,arrowX:te,arrowY:J,shouldHideArrow:ne,children:c.jsx(Ce.div,{"data-side":W,"data-align":T,...E,ref:C,style:{...E.style,animation:K?void 0:"none"}})})})});ov.displayName=of;var iv="PopperArrow",hw={top:"bottom",right:"left",bottom:"top",left:"right"},cv=y.forwardRef(function(s,i){const{__scopePopper:o,...f}=s,d=mw(iv,o),m=hw[d.placedSide];return c.jsx("span",{ref:d.onArrowChange,style:{position:"absolute",left:d.arrowX,top:d.arrowY,[m]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[d.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[d.placedSide],visibility:d.shouldHideArrow?"hidden":void 0},children:c.jsx(uw,{...f,ref:i,style:{...f.style,display:"block"}})})});cv.displayName=iv;function pw(a){return a!==null}var gw=a=>({name:"transformOrigin",options:a,fn(s){const{placement:i,rects:o,middlewareData:f}=s,m=f.arrow?.centerOffset!==0,p=m?0:a.arrowWidth,x=m?0:a.arrowHeight,[h,v]=uv(i),b={start:"0%",center:"50%",end:"100%"}[v],w=(f.arrow?.x??0)+p/2,N=(f.arrow?.y??0)+x/2;let M="",E="";return h==="bottom"?(M=m?b:`${w}px`,E=`${-x}px`):h==="top"?(M=m?b:`${w}px`,E=`${o.floating.height+x}px`):h==="right"?(M=`${-x}px`,E=m?b:`${N}px`):h==="left"&&(M=`${o.floating.width+x}px`,E=m?b:`${N}px`),{data:{x:M,y:E}}}});function uv(a){const[s,i="center"]=a.split("-");return[s,i]}var vw=lv,xw=rv,yw=ov,bw=cv,Sw="Portal",fv=y.forwardRef((a,s)=>{const{container:i,...o}=a,[f,d]=y.useState(!1);_n(()=>d(!0),[]);const m=i||f&&globalThis?.document?.body;return m?D1.createPortal(c.jsx(Ce.div,{...o,ref:s}),m):null});fv.displayName=Sw;function ww(a,s){return y.useReducer((i,o)=>s[i][o]??i,a)}var rn=a=>{const{present:s,children:i}=a,o=Nw(s),f=typeof i=="function"?i({present:o.isPresent}):y.Children.only(i),d=He(o.ref,Ew(f));return typeof i=="function"||o.isPresent?y.cloneElement(f,{ref:d}):null};rn.displayName="Presence";function Nw(a){const[s,i]=y.useState(),o=y.useRef(null),f=y.useRef(a),d=y.useRef("none"),m=a?"mounted":"unmounted",[p,x]=ww(m,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const h=ho(o.current);d.current=p==="mounted"?h:"none"},[p]),_n(()=>{const h=o.current,v=f.current;if(v!==a){const w=d.current,N=ho(h);a?x("MOUNT"):N==="none"||h?.display==="none"?x("UNMOUNT"):x(v&&w!==N?"ANIMATION_OUT":"UNMOUNT"),f.current=a}},[a,x]),_n(()=>{if(s){let h;const v=s.ownerDocument.defaultView??window,b=N=>{const E=ho(o.current).includes(CSS.escape(N.animationName));if(N.target===s&&E&&(x("ANIMATION_END"),!f.current)){const D=s.style.animationFillMode;s.style.animationFillMode="forwards",h=v.setTimeout(()=>{s.style.animationFillMode==="forwards"&&(s.style.animationFillMode=D)})}},w=N=>{N.target===s&&(d.current=ho(o.current))};return s.addEventListener("animationstart",w),s.addEventListener("animationcancel",b),s.addEventListener("animationend",b),()=>{v.clearTimeout(h),s.removeEventListener("animationstart",w),s.removeEventListener("animationcancel",b),s.removeEventListener("animationend",b)}}else x("ANIMATION_END")},[s,x]),{isPresent:["mounted","unmountSuspended"].includes(p),ref:y.useCallback(h=>{o.current=h?getComputedStyle(h):null,i(h)},[])}}function ho(a){return a?.animationName||"none"}function Ew(a){let s=Object.getOwnPropertyDescriptor(a.props,"ref")?.get,i=s&&"isReactWarning"in s&&s.isReactWarning;return i?a.ref:(s=Object.getOwnPropertyDescriptor(a,"ref")?.get,i=s&&"isReactWarning"in s&&s.isReactWarning,i?a.props.ref:a.props.ref||a.ref)}var Eu="rovingFocusGroup.onEntryFocus",jw={bubbles:!1,cancelable:!0},Zs="RovingFocusGroup",[Bu,dv,_w]=Iu(Zs),[Mw,Yo]=oa(Zs,[_w]),[Tw,Aw]=Mw(Zs),mv=y.forwardRef((a,s)=>c.jsx(Bu.Provider,{scope:a.__scopeRovingFocusGroup,children:c.jsx(Bu.Slot,{scope:a.__scopeRovingFocusGroup,children:c.jsx(Cw,{...a,ref:s})})}));mv.displayName=Zs;var Cw=y.forwardRef((a,s)=>{const{__scopeRovingFocusGroup:i,orientation:o,loop:f=!1,dir:d,currentTabStopId:m,defaultCurrentTabStopId:p,onCurrentTabStopIdChange:x,onEntryFocus:h,preventScrollOnEntryFocus:v=!1,...b}=a,w=y.useRef(null),N=He(s,w),M=Ks(d),[E,D]=Lo({prop:m,defaultProp:p??null,onChange:x,caller:Zs}),[R,B]=y.useState(!1),C=it(h),A=dv(i),j=y.useRef(!1),[L,q]=y.useState(0);return y.useEffect(()=>{const X=w.current;if(X)return X.addEventListener(Eu,C),()=>X.removeEventListener(Eu,C)},[C]),c.jsx(Tw,{scope:i,orientation:o,dir:M,loop:f,currentTabStopId:E,onItemFocus:y.useCallback(X=>D(X),[D]),onItemShiftTab:y.useCallback(()=>B(!0),[]),onFocusableItemAdd:y.useCallback(()=>q(X=>X+1),[]),onFocusableItemRemove:y.useCallback(()=>q(X=>X-1),[]),children:c.jsx(Ce.div,{tabIndex:R||L===0?-1:0,"data-orientation":o,...b,ref:N,style:{outline:"none",...a.style},onMouseDown:me(a.onMouseDown,()=>{j.current=!0}),onFocus:me(a.onFocus,X=>{const F=!j.current;if(X.target===X.currentTarget&&F&&!R){const ee=new CustomEvent(Eu,jw);if(X.currentTarget.dispatchEvent(ee),!ee.defaultPrevented){const I=A().filter(k=>k.focusable),ae=I.find(k=>k.active),pe=I.find(k=>k.id===E),oe=[ae,pe,...I].filter(Boolean).map(k=>k.ref.current);gv(oe,v)}}j.current=!1}),onBlur:me(a.onBlur,()=>B(!1))})})}),hv="RovingFocusGroupItem",pv=y.forwardRef((a,s)=>{const{__scopeRovingFocusGroup:i,focusable:o=!0,active:f=!1,tabStopId:d,children:m,...p}=a,x=_o(),h=d||x,v=Aw(hv,i),b=v.currentTabStopId===h,w=dv(i),{onFocusableItemAdd:N,onFocusableItemRemove:M,currentTabStopId:E}=v;return y.useEffect(()=>{if(o)return N(),()=>M()},[o,N,M]),c.jsx(Bu.ItemSlot,{scope:i,id:h,focusable:o,active:f,children:c.jsx(Ce.span,{tabIndex:b?0:-1,"data-orientation":v.orientation,...p,ref:s,onMouseDown:me(a.onMouseDown,D=>{o?v.onItemFocus(h):D.preventDefault()}),onFocus:me(a.onFocus,()=>v.onItemFocus(h)),onKeyDown:me(a.onKeyDown,D=>{if(D.key==="Tab"&&D.shiftKey){v.onItemShiftTab();return}if(D.target!==D.currentTarget)return;const R=Ow(D,v.orientation,v.dir);if(R!==void 0){if(D.metaKey||D.ctrlKey||D.altKey||D.shiftKey)return;D.preventDefault();let C=w().filter(A=>A.focusable).map(A=>A.ref.current);if(R==="last")C.reverse();else if(R==="prev"||R==="next"){R==="prev"&&C.reverse();const A=C.indexOf(D.currentTarget);C=v.loop?kw(C,A+1):C.slice(A+1)}setTimeout(()=>gv(C))}}),children:typeof m=="function"?m({isCurrentTabStop:b,hasTabStop:E!=null}):m})})});pv.displayName=hv;var Rw={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Dw(a,s){return s!=="rtl"?a:a==="ArrowLeft"?"ArrowRight":a==="ArrowRight"?"ArrowLeft":a}function Ow(a,s,i){const o=Dw(a.key,i);if(!(s==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(s==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return Rw[o]}function gv(a,s=!1){const i=document.activeElement;for(const o of a)if(o===i||(o.focus({preventScroll:s}),document.activeElement!==i))return}function kw(a,s){return a.map((i,o)=>a[(s+o)%a.length])}var vv=mv,xv=pv,zw=function(a){if(typeof document>"u")return null;var s=Array.isArray(a)?a[0]:a;return s.ownerDocument.body},Sl=new WeakMap,po=new WeakMap,go={},ju=0,yv=function(a){return a&&(a.host||yv(a.parentNode))},Uw=function(a,s){return s.map(function(i){if(a.contains(i))return i;var o=yv(i);return o&&a.contains(o)?o:(console.error("aria-hidden",i,"in not contained inside",a,". Doing nothing"),null)}).filter(function(i){return!!i})},Lw=function(a,s,i,o){var f=Uw(s,Array.isArray(a)?a:[a]);go[i]||(go[i]=new WeakMap);var d=go[i],m=[],p=new Set,x=new Set(f),h=function(b){!b||p.has(b)||(p.add(b),h(b.parentNode))};f.forEach(h);var v=function(b){!b||x.has(b)||Array.prototype.forEach.call(b.children,function(w){if(p.has(w))v(w);else try{var N=w.getAttribute(o),M=N!==null&&N!=="false",E=(Sl.get(w)||0)+1,D=(d.get(w)||0)+1;Sl.set(w,E),d.set(w,D),m.push(w),E===1&&M&&po.set(w,!0),D===1&&w.setAttribute(i,"true"),M||w.setAttribute(o,"true")}catch(R){console.error("aria-hidden: cannot operate on ",w,R)}})};return v(s),p.clear(),ju++,function(){m.forEach(function(b){var w=Sl.get(b)-1,N=d.get(b)-1;Sl.set(b,w),d.set(b,N),w||(po.has(b)||b.removeAttribute(o),po.delete(b)),N||b.removeAttribute(i)}),ju--,ju||(Sl=new WeakMap,Sl=new WeakMap,po=new WeakMap,go={})}},Hw=function(a,s,i){i===void 0&&(i="data-aria-hidden");var o=Array.from(Array.isArray(a)?a:[a]),f=zw(a);return f?(o.push.apply(o,Array.from(f.querySelectorAll("[aria-live], script"))),Lw(o,f,i,"aria-hidden")):function(){return null}},tn=function(){return tn=Object.assign||function(s){for(var i,o=1,f=arguments.length;o<f;o++){i=arguments[o];for(var d in i)Object.prototype.hasOwnProperty.call(i,d)&&(s[d]=i[d])}return s},tn.apply(this,arguments)};function bv(a,s){var i={};for(var o in a)Object.prototype.hasOwnProperty.call(a,o)&&s.indexOf(o)<0&&(i[o]=a[o]);if(a!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,o=Object.getOwnPropertySymbols(a);f<o.length;f++)s.indexOf(o[f])<0&&Object.prototype.propertyIsEnumerable.call(a,o[f])&&(i[o[f]]=a[o[f]]);return i}function Bw(a,s,i){if(i||arguments.length===2)for(var o=0,f=s.length,d;o<f;o++)(d||!(o in s))&&(d||(d=Array.prototype.slice.call(s,0,o)),d[o]=s[o]);return a.concat(d||Array.prototype.slice.call(s))}var wo="right-scroll-bar-position",No="width-before-scroll-bar",qw="with-scroll-bars-hidden",Gw="--removed-body-scroll-bar-size";function _u(a,s){return typeof a=="function"?a(s):a&&(a.current=s),a}function Yw(a,s){var i=y.useState(function(){return{value:a,callback:s,facade:{get current(){return i.value},set current(o){var f=i.value;f!==o&&(i.value=o,i.callback(o,f))}}}})[0];return i.callback=s,i.facade}var Vw=typeof window<"u"?y.useLayoutEffect:y.useEffect,rg=new WeakMap;function Xw(a,s){var i=Yw(null,function(o){return a.forEach(function(f){return _u(f,o)})});return Vw(function(){var o=rg.get(i);if(o){var f=new Set(o),d=new Set(a),m=i.current;f.forEach(function(p){d.has(p)||_u(p,null)}),d.forEach(function(p){f.has(p)||_u(p,m)})}rg.set(i,a)},[a]),i}function Kw(a){return a}function Qw(a,s){s===void 0&&(s=Kw);var i=[],o=!1,f={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return i.length?i[i.length-1]:a},useMedium:function(d){var m=s(d,o);return i.push(m),function(){i=i.filter(function(p){return p!==m})}},assignSyncMedium:function(d){for(o=!0;i.length;){var m=i;i=[],m.forEach(d)}i={push:function(p){return d(p)},filter:function(){return i}}},assignMedium:function(d){o=!0;var m=[];if(i.length){var p=i;i=[],p.forEach(d),m=i}var x=function(){var v=m;m=[],v.forEach(d)},h=function(){return Promise.resolve().then(x)};h(),i={push:function(v){m.push(v),h()},filter:function(v){return m=m.filter(v),i}}}};return f}function Zw(a){a===void 0&&(a={});var s=Qw(null);return s.options=tn({async:!0,ssr:!1},a),s}var Sv=function(a){var s=a.sideCar,i=bv(a,["sideCar"]);if(!s)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=s.read();if(!o)throw new Error("Sidecar medium not found");return y.createElement(o,tn({},i))};Sv.isSideCarExport=!0;function Pw(a,s){return a.useMedium(s),Sv}var wv=Zw(),Mu=function(){},Vo=y.forwardRef(function(a,s){var i=y.useRef(null),o=y.useState({onScrollCapture:Mu,onWheelCapture:Mu,onTouchMoveCapture:Mu}),f=o[0],d=o[1],m=a.forwardProps,p=a.children,x=a.className,h=a.removeScrollBar,v=a.enabled,b=a.shards,w=a.sideCar,N=a.noRelative,M=a.noIsolation,E=a.inert,D=a.allowPinchZoom,R=a.as,B=R===void 0?"div":R,C=a.gapMode,A=bv(a,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),j=w,L=Xw([i,s]),q=tn(tn({},A),f);return y.createElement(y.Fragment,null,v&&y.createElement(j,{sideCar:wv,removeScrollBar:h,shards:b,noRelative:N,noIsolation:M,inert:E,setCallbacks:d,allowPinchZoom:!!D,lockRef:i,gapMode:C}),m?y.cloneElement(y.Children.only(p),tn(tn({},q),{ref:L})):y.createElement(B,tn({},q,{className:x,ref:L}),p))});Vo.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Vo.classNames={fullWidth:No,zeroRight:wo};var $w=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Fw(){if(!document)return null;var a=document.createElement("style");a.type="text/css";var s=$w();return s&&a.setAttribute("nonce",s),a}function Jw(a,s){a.styleSheet?a.styleSheet.cssText=s:a.appendChild(document.createTextNode(s))}function Ww(a){var s=document.head||document.getElementsByTagName("head")[0];s.appendChild(a)}var Iw=function(){var a=0,s=null;return{add:function(i){a==0&&(s=Fw())&&(Jw(s,i),Ww(s)),a++},remove:function(){a--,!a&&s&&(s.parentNode&&s.parentNode.removeChild(s),s=null)}}},e2=function(){var a=Iw();return function(s,i){y.useEffect(function(){return a.add(s),function(){a.remove()}},[s&&i])}},Nv=function(){var a=e2(),s=function(i){var o=i.styles,f=i.dynamic;return a(o,f),null};return s},t2={left:0,top:0,right:0,gap:0},Tu=function(a){return parseInt(a||"",10)||0},n2=function(a){var s=window.getComputedStyle(document.body),i=s[a==="padding"?"paddingLeft":"marginLeft"],o=s[a==="padding"?"paddingTop":"marginTop"],f=s[a==="padding"?"paddingRight":"marginRight"];return[Tu(i),Tu(o),Tu(f)]},a2=function(a){if(a===void 0&&(a="margin"),typeof window>"u")return t2;var s=n2(a),i=document.documentElement.clientWidth,o=window.innerWidth;return{left:s[0],top:s[1],right:s[2],gap:Math.max(0,o-i+s[2]-s[0])}},l2=Nv(),jl="data-scroll-locked",s2=function(a,s,i,o){var f=a.left,d=a.top,m=a.right,p=a.gap;return i===void 0&&(i="margin"),`
  .`.concat(qw,` {
   overflow: hidden `).concat(o,`;
   padding-right: `).concat(p,"px ").concat(o,`;
  }
  body[`).concat(jl,`] {
    overflow: hidden `).concat(o,`;
    overscroll-behavior: contain;
    `).concat([s&&"position: relative ".concat(o,";"),i==="margin"&&`
    padding-left: `.concat(f,`px;
    padding-top: `).concat(d,`px;
    padding-right: `).concat(m,`px;
    margin-left:0;
    margin-top:0;
    margin-right: `).concat(p,"px ").concat(o,`;
    `),i==="padding"&&"padding-right: ".concat(p,"px ").concat(o,";")].filter(Boolean).join(""),`
  }
  
  .`).concat(wo,` {
    right: `).concat(p,"px ").concat(o,`;
  }
  
  .`).concat(No,` {
    margin-right: `).concat(p,"px ").concat(o,`;
  }
  
  .`).concat(wo," .").concat(wo,` {
    right: 0 `).concat(o,`;
  }
  
  .`).concat(No," .").concat(No,` {
    margin-right: 0 `).concat(o,`;
  }
  
  body[`).concat(jl,`] {
    `).concat(Gw,": ").concat(p,`px;
  }
`)},og=function(){var a=parseInt(document.body.getAttribute(jl)||"0",10);return isFinite(a)?a:0},r2=function(){y.useEffect(function(){return document.body.setAttribute(jl,(og()+1).toString()),function(){var a=og()-1;a<=0?document.body.removeAttribute(jl):document.body.setAttribute(jl,a.toString())}},[])},o2=function(a){var s=a.noRelative,i=a.noImportant,o=a.gapMode,f=o===void 0?"margin":o;r2();var d=y.useMemo(function(){return a2(f)},[f]);return y.createElement(l2,{styles:s2(d,!s,f,i?"":"!important")})},qu=!1;if(typeof window<"u")try{var vo=Object.defineProperty({},"passive",{get:function(){return qu=!0,!0}});window.addEventListener("test",vo,vo),window.removeEventListener("test",vo,vo)}catch{qu=!1}var wl=qu?{passive:!1}:!1,i2=function(a){return a.tagName==="TEXTAREA"},Ev=function(a,s){if(!(a instanceof Element))return!1;var i=window.getComputedStyle(a);return i[s]!=="hidden"&&!(i.overflowY===i.overflowX&&!i2(a)&&i[s]==="visible")},c2=function(a){return Ev(a,"overflowY")},u2=function(a){return Ev(a,"overflowX")},ig=function(a,s){var i=s.ownerDocument,o=s;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var f=jv(a,o);if(f){var d=_v(a,o),m=d[1],p=d[2];if(m>p)return!0}o=o.parentNode}while(o&&o!==i.body);return!1},f2=function(a){var s=a.scrollTop,i=a.scrollHeight,o=a.clientHeight;return[s,i,o]},d2=function(a){var s=a.scrollLeft,i=a.scrollWidth,o=a.clientWidth;return[s,i,o]},jv=function(a,s){return a==="v"?c2(s):u2(s)},_v=function(a,s){return a==="v"?f2(s):d2(s)},m2=function(a,s){return a==="h"&&s==="rtl"?-1:1},h2=function(a,s,i,o,f){var d=m2(a,window.getComputedStyle(s).direction),m=d*o,p=i.target,x=s.contains(p),h=!1,v=m>0,b=0,w=0;do{if(!p)break;var N=_v(a,p),M=N[0],E=N[1],D=N[2],R=E-D-d*M;(M||R)&&jv(a,p)&&(b+=R,w+=M);var B=p.parentNode;p=B&&B.nodeType===Node.DOCUMENT_FRAGMENT_NODE?B.host:B}while(!x&&p!==document.body||x&&(s.contains(p)||s===p));return(v&&Math.abs(b)<1||!v&&Math.abs(w)<1)&&(h=!0),h},xo=function(a){return"changedTouches"in a?[a.changedTouches[0].clientX,a.changedTouches[0].clientY]:[0,0]},cg=function(a){return[a.deltaX,a.deltaY]},ug=function(a){return a&&"current"in a?a.current:a},p2=function(a,s){return a[0]===s[0]&&a[1]===s[1]},g2=function(a){return`
  .block-interactivity-`.concat(a,` {pointer-events: none;}
  .allow-interactivity-`).concat(a,` {pointer-events: all;}
`)},v2=0,Nl=[];function x2(a){var s=y.useRef([]),i=y.useRef([0,0]),o=y.useRef(),f=y.useState(v2++)[0],d=y.useState(Nv)[0],m=y.useRef(a);y.useEffect(function(){m.current=a},[a]),y.useEffect(function(){if(a.inert){document.body.classList.add("block-interactivity-".concat(f));var E=Bw([a.lockRef.current],(a.shards||[]).map(ug),!0).filter(Boolean);return E.forEach(function(D){return D.classList.add("allow-interactivity-".concat(f))}),function(){document.body.classList.remove("block-interactivity-".concat(f)),E.forEach(function(D){return D.classList.remove("allow-interactivity-".concat(f))})}}},[a.inert,a.lockRef.current,a.shards]);var p=y.useCallback(function(E,D){if("touches"in E&&E.touches.length===2||E.type==="wheel"&&E.ctrlKey)return!m.current.allowPinchZoom;var R=xo(E),B=i.current,C="deltaX"in E?E.deltaX:B[0]-R[0],A="deltaY"in E?E.deltaY:B[1]-R[1],j,L=E.target,q=Math.abs(C)>Math.abs(A)?"h":"v";if("touches"in E&&q==="h"&&L.type==="range")return!1;var X=ig(q,L);if(!X)return!0;if(X?j=q:(j=q==="v"?"h":"v",X=ig(q,L)),!X)return!1;if(!o.current&&"changedTouches"in E&&(C||A)&&(o.current=j),!j)return!0;var F=o.current||j;return h2(F,D,E,F==="h"?C:A)},[]),x=y.useCallback(function(E){var D=E;if(!(!Nl.length||Nl[Nl.length-1]!==d)){var R="deltaY"in D?cg(D):xo(D),B=s.current.filter(function(j){return j.name===D.type&&(j.target===D.target||D.target===j.shadowParent)&&p2(j.delta,R)})[0];if(B&&B.should){D.cancelable&&D.preventDefault();return}if(!B){var C=(m.current.shards||[]).map(ug).filter(Boolean).filter(function(j){return j.contains(D.target)}),A=C.length>0?p(D,C[0]):!m.current.noIsolation;A&&D.cancelable&&D.preventDefault()}}},[]),h=y.useCallback(function(E,D,R,B){var C={name:E,delta:D,target:R,should:B,shadowParent:y2(R)};s.current.push(C),setTimeout(function(){s.current=s.current.filter(function(A){return A!==C})},1)},[]),v=y.useCallback(function(E){i.current=xo(E),o.current=void 0},[]),b=y.useCallback(function(E){h(E.type,cg(E),E.target,p(E,a.lockRef.current))},[]),w=y.useCallback(function(E){h(E.type,xo(E),E.target,p(E,a.lockRef.current))},[]);y.useEffect(function(){return Nl.push(d),a.setCallbacks({onScrollCapture:b,onWheelCapture:b,onTouchMoveCapture:w}),document.addEventListener("wheel",x,wl),document.addEventListener("touchmove",x,wl),document.addEventListener("touchstart",v,wl),function(){Nl=Nl.filter(function(E){return E!==d}),document.removeEventListener("wheel",x,wl),document.removeEventListener("touchmove",x,wl),document.removeEventListener("touchstart",v,wl)}},[]);var N=a.removeScrollBar,M=a.inert;return y.createElement(y.Fragment,null,M?y.createElement(d,{styles:g2(f)}):null,N?y.createElement(o2,{noRelative:a.noRelative,gapMode:a.gapMode}):null)}function y2(a){for(var s=null;a!==null;)a instanceof ShadowRoot&&(s=a.host,a=a.host),a=a.parentNode;return s}const b2=Pw(wv,x2);var Mv=y.forwardRef(function(a,s){return y.createElement(Vo,tn({},a,{ref:s,sideCar:b2}))});Mv.classNames=Vo.classNames;var Gu=["Enter"," "],S2=["ArrowDown","PageUp","Home"],Tv=["ArrowUp","PageDown","End"],w2=[...S2,...Tv],N2={ltr:[...Gu,"ArrowRight"],rtl:[...Gu,"ArrowLeft"]},E2={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ps="Menu",[Gs,j2,_2]=Iu(Ps),[Da,Av]=oa(Ps,[_2,nv,Yo]),Xo=nv(),Cv=Yo(),[M2,Oa]=Da(Ps),[T2,$s]=Da(Ps),Rv=a=>{const{__scopeMenu:s,open:i=!1,children:o,dir:f,onOpenChange:d,modal:m=!0}=a,p=Xo(s),[x,h]=y.useState(null),v=y.useRef(!1),b=it(d),w=Ks(f);return y.useEffect(()=>{const N=()=>{v.current=!0,document.addEventListener("pointerdown",M,{capture:!0,once:!0}),document.addEventListener("pointermove",M,{capture:!0,once:!0})},M=()=>v.current=!1;return document.addEventListener("keydown",N,{capture:!0}),()=>{document.removeEventListener("keydown",N,{capture:!0}),document.removeEventListener("pointerdown",M,{capture:!0}),document.removeEventListener("pointermove",M,{capture:!0})}},[]),c.jsx(vw,{...p,children:c.jsx(M2,{scope:s,open:i,onOpenChange:b,content:x,onContentChange:h,children:c.jsx(T2,{scope:s,onClose:y.useCallback(()=>b(!1),[b]),isUsingKeyboardRef:v,dir:w,modal:m,children:o})})})};Rv.displayName=Ps;var A2="MenuAnchor",cf=y.forwardRef((a,s)=>{const{__scopeMenu:i,...o}=a,f=Xo(i);return c.jsx(xw,{...f,...o,ref:s})});cf.displayName=A2;var uf="MenuPortal",[C2,Dv]=Da(uf,{forceMount:void 0}),Ov=a=>{const{__scopeMenu:s,forceMount:i,children:o,container:f}=a,d=Oa(uf,s);return c.jsx(C2,{scope:s,forceMount:i,children:c.jsx(rn,{present:i||d.open,children:c.jsx(fv,{asChild:!0,container:f,children:o})})})};Ov.displayName=uf;var Ht="MenuContent",[R2,ff]=Da(Ht),kv=y.forwardRef((a,s)=>{const i=Dv(Ht,a.__scopeMenu),{forceMount:o=i.forceMount,...f}=a,d=Oa(Ht,a.__scopeMenu),m=$s(Ht,a.__scopeMenu);return c.jsx(Gs.Provider,{scope:a.__scopeMenu,children:c.jsx(rn,{present:o||d.open,children:c.jsx(Gs.Slot,{scope:a.__scopeMenu,children:m.modal?c.jsx(D2,{...f,ref:s}):c.jsx(O2,{...f,ref:s})})})})}),D2=y.forwardRef((a,s)=>{const i=Oa(Ht,a.__scopeMenu),o=y.useRef(null),f=He(s,o);return y.useEffect(()=>{const d=o.current;if(d)return Hw(d)},[]),c.jsx(df,{...a,ref:f,trapFocus:i.open,disableOutsidePointerEvents:i.open,disableOutsideScroll:!0,onFocusOutside:me(a.onFocusOutside,d=>d.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>i.onOpenChange(!1)})}),O2=y.forwardRef((a,s)=>{const i=Oa(Ht,a.__scopeMenu);return c.jsx(df,{...a,ref:s,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>i.onOpenChange(!1)})}),k2=Hs("MenuContent.ScrollLock"),df=y.forwardRef((a,s)=>{const{__scopeMenu:i,loop:o=!1,trapFocus:f,onOpenAutoFocus:d,onCloseAutoFocus:m,disableOutsidePointerEvents:p,onEntryFocus:x,onEscapeKeyDown:h,onPointerDownOutside:v,onFocusOutside:b,onInteractOutside:w,onDismiss:N,disableOutsideScroll:M,...E}=a,D=Oa(Ht,i),R=$s(Ht,i),B=Xo(i),C=Cv(i),A=j2(i),[j,L]=y.useState(null),q=y.useRef(null),X=He(s,q,D.onContentChange),F=y.useRef(0),ee=y.useRef(""),I=y.useRef(0),ae=y.useRef(null),pe=y.useRef("right"),ge=y.useRef(0),oe=M?Mv:y.Fragment,k=M?{as:k2,allowPinchZoom:!0}:void 0,K=W=>{const T=ee.current+W,P=A().filter(ue=>!ue.disabled),te=document.activeElement,J=P.find(ue=>ue.ref.current===te)?.textValue,ne=P.map(ue=>ue.textValue),xe=Q2(ne,T,J),ce=P.find(ue=>ue.textValue===xe)?.ref.current;(function ue(Me){ee.current=Me,window.clearTimeout(F.current),Me!==""&&(F.current=window.setTimeout(()=>ue(""),1e3))})(T),ce&&setTimeout(()=>ce.focus())};y.useEffect(()=>()=>window.clearTimeout(F.current),[]),V1();const Y=y.useCallback(W=>pe.current===ae.current?.side&&P2(W,ae.current?.area),[]);return c.jsx(R2,{scope:i,searchRef:ee,onItemEnter:y.useCallback(W=>{Y(W)&&W.preventDefault()},[Y]),onItemLeave:y.useCallback(W=>{Y(W)||(q.current?.focus(),L(null))},[Y]),onTriggerLeave:y.useCallback(W=>{Y(W)&&W.preventDefault()},[Y]),pointerGraceTimerRef:I,onPointerGraceIntentChange:y.useCallback(W=>{ae.current=W},[]),children:c.jsx(oe,{...k,children:c.jsx(qg,{asChild:!0,trapped:f,onMountAutoFocus:me(d,W=>{W.preventDefault(),q.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:m,children:c.jsx(Hg,{asChild:!0,disableOutsidePointerEvents:p,onEscapeKeyDown:h,onPointerDownOutside:v,onFocusOutside:b,onInteractOutside:w,onDismiss:N,children:c.jsx(vv,{asChild:!0,...C,dir:R.dir,orientation:"vertical",loop:o,currentTabStopId:j,onCurrentTabStopIdChange:L,onEntryFocus:me(x,W=>{R.isUsingKeyboardRef.current||W.preventDefault()}),preventScrollOnEntryFocus:!0,children:c.jsx(yw,{role:"menu","aria-orientation":"vertical","data-state":Fv(D.open),"data-radix-menu-content":"",dir:R.dir,...B,...E,ref:X,style:{outline:"none",...E.style},onKeyDown:me(E.onKeyDown,W=>{const P=W.target.closest("[data-radix-menu-content]")===W.currentTarget,te=W.ctrlKey||W.altKey||W.metaKey,J=W.key.length===1;P&&(W.key==="Tab"&&W.preventDefault(),!te&&J&&K(W.key));const ne=q.current;if(W.target!==ne||!w2.includes(W.key))return;W.preventDefault();const ce=A().filter(ue=>!ue.disabled).map(ue=>ue.ref.current);Tv.includes(W.key)&&ce.reverse(),X2(ce)}),onBlur:me(a.onBlur,W=>{W.currentTarget.contains(W.target)||(window.clearTimeout(F.current),ee.current="")}),onPointerMove:me(a.onPointerMove,Ys(W=>{const T=W.target,P=ge.current!==W.clientX;if(W.currentTarget.contains(T)&&P){const te=W.clientX>ge.current?"right":"left";pe.current=te,ge.current=W.clientX}}))})})})})})})});kv.displayName=Ht;var z2="MenuGroup",mf=y.forwardRef((a,s)=>{const{__scopeMenu:i,...o}=a;return c.jsx(Ce.div,{role:"group",...o,ref:s})});mf.displayName=z2;var U2="MenuLabel",zv=y.forwardRef((a,s)=>{const{__scopeMenu:i,...o}=a;return c.jsx(Ce.div,{...o,ref:s})});zv.displayName=U2;var Ro="MenuItem",fg="menu.itemSelect",Ko=y.forwardRef((a,s)=>{const{disabled:i=!1,onSelect:o,...f}=a,d=y.useRef(null),m=$s(Ro,a.__scopeMenu),p=ff(Ro,a.__scopeMenu),x=He(s,d),h=y.useRef(!1),v=()=>{const b=d.current;if(!i&&b){const w=new CustomEvent(fg,{bubbles:!0,cancelable:!0});b.addEventListener(fg,N=>o?.(N),{once:!0}),Ug(b,w),w.defaultPrevented?h.current=!1:m.onClose()}};return c.jsx(Uv,{...f,ref:x,disabled:i,onClick:me(a.onClick,v),onPointerDown:b=>{a.onPointerDown?.(b),h.current=!0},onPointerUp:me(a.onPointerUp,b=>{h.current||b.currentTarget?.click()}),onKeyDown:me(a.onKeyDown,b=>{const w=p.searchRef.current!=="";i||w&&b.key===" "||Gu.includes(b.key)&&(b.currentTarget.click(),b.preventDefault())})})});Ko.displayName=Ro;var Uv=y.forwardRef((a,s)=>{const{__scopeMenu:i,disabled:o=!1,textValue:f,...d}=a,m=ff(Ro,i),p=Cv(i),x=y.useRef(null),h=He(s,x),[v,b]=y.useState(!1),[w,N]=y.useState("");return y.useEffect(()=>{const M=x.current;M&&N((M.textContent??"").trim())},[d.children]),c.jsx(Gs.ItemSlot,{scope:i,disabled:o,textValue:f??w,children:c.jsx(xv,{asChild:!0,...p,focusable:!o,children:c.jsx(Ce.div,{role:"menuitem","data-highlighted":v?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...d,ref:h,onPointerMove:me(a.onPointerMove,Ys(M=>{o?m.onItemLeave(M):(m.onItemEnter(M),M.defaultPrevented||M.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:me(a.onPointerLeave,Ys(M=>m.onItemLeave(M))),onFocus:me(a.onFocus,()=>b(!0)),onBlur:me(a.onBlur,()=>b(!1))})})})}),L2="MenuCheckboxItem",Lv=y.forwardRef((a,s)=>{const{checked:i=!1,onCheckedChange:o,...f}=a;return c.jsx(Yv,{scope:a.__scopeMenu,checked:i,children:c.jsx(Ko,{role:"menuitemcheckbox","aria-checked":Do(i)?"mixed":i,...f,ref:s,"data-state":pf(i),onSelect:me(f.onSelect,()=>o?.(Do(i)?!0:!i),{checkForDefaultPrevented:!1})})})});Lv.displayName=L2;var Hv="MenuRadioGroup",[H2,B2]=Da(Hv,{value:void 0,onValueChange:()=>{}}),Bv=y.forwardRef((a,s)=>{const{value:i,onValueChange:o,...f}=a,d=it(o);return c.jsx(H2,{scope:a.__scopeMenu,value:i,onValueChange:d,children:c.jsx(mf,{...f,ref:s})})});Bv.displayName=Hv;var qv="MenuRadioItem",Gv=y.forwardRef((a,s)=>{const{value:i,...o}=a,f=B2(qv,a.__scopeMenu),d=i===f.value;return c.jsx(Yv,{scope:a.__scopeMenu,checked:d,children:c.jsx(Ko,{role:"menuitemradio","aria-checked":d,...o,ref:s,"data-state":pf(d),onSelect:me(o.onSelect,()=>f.onValueChange?.(i),{checkForDefaultPrevented:!1})})})});Gv.displayName=qv;var hf="MenuItemIndicator",[Yv,q2]=Da(hf,{checked:!1}),Vv=y.forwardRef((a,s)=>{const{__scopeMenu:i,forceMount:o,...f}=a,d=q2(hf,i);return c.jsx(rn,{present:o||Do(d.checked)||d.checked===!0,children:c.jsx(Ce.span,{...f,ref:s,"data-state":pf(d.checked)})})});Vv.displayName=hf;var G2="MenuSeparator",Xv=y.forwardRef((a,s)=>{const{__scopeMenu:i,...o}=a;return c.jsx(Ce.div,{role:"separator","aria-orientation":"horizontal",...o,ref:s})});Xv.displayName=G2;var Y2="MenuArrow",Kv=y.forwardRef((a,s)=>{const{__scopeMenu:i,...o}=a,f=Xo(i);return c.jsx(bw,{...f,...o,ref:s})});Kv.displayName=Y2;var V2="MenuSub",[W_,Qv]=Da(V2),Ls="MenuSubTrigger",Zv=y.forwardRef((a,s)=>{const i=Oa(Ls,a.__scopeMenu),o=$s(Ls,a.__scopeMenu),f=Qv(Ls,a.__scopeMenu),d=ff(Ls,a.__scopeMenu),m=y.useRef(null),{pointerGraceTimerRef:p,onPointerGraceIntentChange:x}=d,h={__scopeMenu:a.__scopeMenu},v=y.useCallback(()=>{m.current&&window.clearTimeout(m.current),m.current=null},[]);return y.useEffect(()=>v,[v]),y.useEffect(()=>{const b=p.current;return()=>{window.clearTimeout(b),x(null)}},[p,x]),c.jsx(cf,{asChild:!0,...h,children:c.jsx(Uv,{id:f.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":f.contentId,"data-state":Fv(i.open),...a,ref:Uo(s,f.onTriggerChange),onClick:b=>{a.onClick?.(b),!(a.disabled||b.defaultPrevented)&&(b.currentTarget.focus(),i.open||i.onOpenChange(!0))},onPointerMove:me(a.onPointerMove,Ys(b=>{d.onItemEnter(b),!b.defaultPrevented&&!a.disabled&&!i.open&&!m.current&&(d.onPointerGraceIntentChange(null),m.current=window.setTimeout(()=>{i.onOpenChange(!0),v()},100))})),onPointerLeave:me(a.onPointerLeave,Ys(b=>{v();const w=i.content?.getBoundingClientRect();if(w){const N=i.content?.dataset.side,M=N==="right",E=M?-5:5,D=w[M?"left":"right"],R=w[M?"right":"left"];d.onPointerGraceIntentChange({area:[{x:b.clientX+E,y:b.clientY},{x:D,y:w.top},{x:R,y:w.top},{x:R,y:w.bottom},{x:D,y:w.bottom}],side:N}),window.clearTimeout(p.current),p.current=window.setTimeout(()=>d.onPointerGraceIntentChange(null),300)}else{if(d.onTriggerLeave(b),b.defaultPrevented)return;d.onPointerGraceIntentChange(null)}})),onKeyDown:me(a.onKeyDown,b=>{const w=d.searchRef.current!=="";a.disabled||w&&b.key===" "||N2[o.dir].includes(b.key)&&(i.onOpenChange(!0),i.content?.focus(),b.preventDefault())})})})});Zv.displayName=Ls;var Pv="MenuSubContent",$v=y.forwardRef((a,s)=>{const i=Dv(Ht,a.__scopeMenu),{forceMount:o=i.forceMount,...f}=a,d=Oa(Ht,a.__scopeMenu),m=$s(Ht,a.__scopeMenu),p=Qv(Pv,a.__scopeMenu),x=y.useRef(null),h=He(s,x);return c.jsx(Gs.Provider,{scope:a.__scopeMenu,children:c.jsx(rn,{present:o||d.open,children:c.jsx(Gs.Slot,{scope:a.__scopeMenu,children:c.jsx(df,{id:p.contentId,"aria-labelledby":p.triggerId,...f,ref:h,align:"start",side:m.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:v=>{m.isUsingKeyboardRef.current&&x.current?.focus(),v.preventDefault()},onCloseAutoFocus:v=>v.preventDefault(),onFocusOutside:me(a.onFocusOutside,v=>{v.target!==p.trigger&&d.onOpenChange(!1)}),onEscapeKeyDown:me(a.onEscapeKeyDown,v=>{m.onClose(),v.preventDefault()}),onKeyDown:me(a.onKeyDown,v=>{const b=v.currentTarget.contains(v.target),w=E2[m.dir].includes(v.key);b&&w&&(d.onOpenChange(!1),p.trigger?.focus(),v.preventDefault())})})})})})});$v.displayName=Pv;function Fv(a){return a?"open":"closed"}function Do(a){return a==="indeterminate"}function pf(a){return Do(a)?"indeterminate":a?"checked":"unchecked"}function X2(a){const s=document.activeElement;for(const i of a)if(i===s||(i.focus(),document.activeElement!==s))return}function K2(a,s){return a.map((i,o)=>a[(s+o)%a.length])}function Q2(a,s,i){const f=s.length>1&&Array.from(s).every(h=>h===s[0])?s[0]:s,d=i?a.indexOf(i):-1;let m=K2(a,Math.max(d,0));f.length===1&&(m=m.filter(h=>h!==i));const x=m.find(h=>h.toLowerCase().startsWith(f.toLowerCase()));return x!==i?x:void 0}function Z2(a,s){const{x:i,y:o}=a;let f=!1;for(let d=0,m=s.length-1;d<s.length;m=d++){const p=s[d],x=s[m],h=p.x,v=p.y,b=x.x,w=x.y;v>o!=w>o&&i<(b-h)*(o-v)/(w-v)+h&&(f=!f)}return f}function P2(a,s){if(!s)return!1;const i={x:a.clientX,y:a.clientY};return Z2(i,s)}function Ys(a){return s=>s.pointerType==="mouse"?a(s):void 0}var $2=Rv,F2=cf,J2=Ov,W2=kv,I2=mf,eN=zv,tN=Ko,nN=Lv,aN=Bv,lN=Gv,sN=Vv,rN=Xv,oN=Kv,iN=Zv,cN=$v,Qo="DropdownMenu",[uN,I_]=oa(Qo,[Av]),ft=Av(),[fN,Jv]=uN(Qo),Wv=a=>{const{__scopeDropdownMenu:s,children:i,dir:o,open:f,defaultOpen:d,onOpenChange:m,modal:p=!0}=a,x=ft(s),h=y.useRef(null),[v,b]=Lo({prop:f,defaultProp:d??!1,onChange:m,caller:Qo});return c.jsx(fN,{scope:s,triggerId:_o(),triggerRef:h,contentId:_o(),open:v,onOpenChange:b,onOpenToggle:y.useCallback(()=>b(w=>!w),[b]),modal:p,children:c.jsx($2,{...x,open:v,onOpenChange:b,dir:o,modal:p,children:i})})};Wv.displayName=Qo;var Iv="DropdownMenuTrigger",ex=y.forwardRef((a,s)=>{const{__scopeDropdownMenu:i,disabled:o=!1,...f}=a,d=Jv(Iv,i),m=ft(i);return c.jsx(F2,{asChild:!0,...m,children:c.jsx(Ce.button,{type:"button",id:d.triggerId,"aria-haspopup":"menu","aria-expanded":d.open,"aria-controls":d.open?d.contentId:void 0,"data-state":d.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...f,ref:Uo(s,d.triggerRef),onPointerDown:me(a.onPointerDown,p=>{!o&&p.button===0&&p.ctrlKey===!1&&(d.onOpenToggle(),d.open||p.preventDefault())}),onKeyDown:me(a.onKeyDown,p=>{o||(["Enter"," "].includes(p.key)&&d.onOpenToggle(),p.key==="ArrowDown"&&d.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(p.key)&&p.preventDefault())})})})});ex.displayName=Iv;var dN="DropdownMenuPortal",tx=a=>{const{__scopeDropdownMenu:s,...i}=a,o=ft(s);return c.jsx(J2,{...o,...i})};tx.displayName=dN;var nx="DropdownMenuContent",ax=y.forwardRef((a,s)=>{const{__scopeDropdownMenu:i,...o}=a,f=Jv(nx,i),d=ft(i),m=y.useRef(!1);return c.jsx(W2,{id:f.contentId,"aria-labelledby":f.triggerId,...d,...o,ref:s,onCloseAutoFocus:me(a.onCloseAutoFocus,p=>{m.current||f.triggerRef.current?.focus(),m.current=!1,p.preventDefault()}),onInteractOutside:me(a.onInteractOutside,p=>{const x=p.detail.originalEvent,h=x.button===0&&x.ctrlKey===!0,v=x.button===2||h;(!f.modal||v)&&(m.current=!0)}),style:{...a.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});ax.displayName=nx;var mN="DropdownMenuGroup",hN=y.forwardRef((a,s)=>{const{__scopeDropdownMenu:i,...o}=a,f=ft(i);return c.jsx(I2,{...f,...o,ref:s})});hN.displayName=mN;var pN="DropdownMenuLabel",lx=y.forwardRef((a,s)=>{const{__scopeDropdownMenu:i,...o}=a,f=ft(i);return c.jsx(eN,{...f,...o,ref:s})});lx.displayName=pN;var gN="DropdownMenuItem",sx=y.forwardRef((a,s)=>{const{__scopeDropdownMenu:i,...o}=a,f=ft(i);return c.jsx(tN,{...f,...o,ref:s})});sx.displayName=gN;var vN="DropdownMenuCheckboxItem",xN=y.forwardRef((a,s)=>{const{__scopeDropdownMenu:i,...o}=a,f=ft(i);return c.jsx(nN,{...f,...o,ref:s})});xN.displayName=vN;var yN="DropdownMenuRadioGroup",bN=y.forwardRef((a,s)=>{const{__scopeDropdownMenu:i,...o}=a,f=ft(i);return c.jsx(aN,{...f,...o,ref:s})});bN.displayName=yN;var SN="DropdownMenuRadioItem",wN=y.forwardRef((a,s)=>{const{__scopeDropdownMenu:i,...o}=a,f=ft(i);return c.jsx(lN,{...f,...o,ref:s})});wN.displayName=SN;var NN="DropdownMenuItemIndicator",EN=y.forwardRef((a,s)=>{const{__scopeDropdownMenu:i,...o}=a,f=ft(i);return c.jsx(sN,{...f,...o,ref:s})});EN.displayName=NN;var jN="DropdownMenuSeparator",rx=y.forwardRef((a,s)=>{const{__scopeDropdownMenu:i,...o}=a,f=ft(i);return c.jsx(rN,{...f,...o,ref:s})});rx.displayName=jN;var _N="DropdownMenuArrow",MN=y.forwardRef((a,s)=>{const{__scopeDropdownMenu:i,...o}=a,f=ft(i);return c.jsx(oN,{...f,...o,ref:s})});MN.displayName=_N;var TN="DropdownMenuSubTrigger",AN=y.forwardRef((a,s)=>{const{__scopeDropdownMenu:i,...o}=a,f=ft(i);return c.jsx(iN,{...f,...o,ref:s})});AN.displayName=TN;var CN="DropdownMenuSubContent",RN=y.forwardRef((a,s)=>{const{__scopeDropdownMenu:i,...o}=a,f=ft(i);return c.jsx(cN,{...f,...o,ref:s,style:{...a.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});RN.displayName=CN;var DN=Wv,ON=ex,kN=tx,zN=ax,UN=lx,LN=sx,HN=rx;/**
 * @license lucide-react v0.540.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const BN=a=>a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),qN=a=>a.replace(/^([A-Z])|[\s-_]+(\w)/g,(s,i,o)=>o?o.toUpperCase():i.toLowerCase()),dg=a=>{const s=qN(a);return s.charAt(0).toUpperCase()+s.slice(1)},ox=(...a)=>a.filter((s,i,o)=>!!s&&s.trim()!==""&&o.indexOf(s)===i).join(" ").trim(),GN=a=>{for(const s in a)if(s.startsWith("aria-")||s==="role"||s==="title")return!0};/**
 * @license lucide-react v0.540.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */var YN={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
 * @license lucide-react v0.540.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const VN=y.forwardRef(({color:a="currentColor",size:s=24,strokeWidth:i=2,absoluteStrokeWidth:o,className:f="",children:d,iconNode:m,...p},x)=>y.createElement("svg",{ref:x,...YN,width:s,height:s,stroke:a,strokeWidth:o?Number(i)*24/Number(s):i,className:ox("lucide",f),...!d&&!GN(p)&&{"aria-hidden":"true"},...p},[...m.map(([h,v])=>y.createElement(h,v)),...Array.isArray(d)?d:[d]]));/**
 * @license lucide-react v0.540.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const he=(a,s)=>{const i=y.forwardRef(({className:o,...f},d)=>y.createElement(VN,{ref:d,iconNode:s,className:ox(`lucide-${BN(dg(a))}`,`lucide-${a}`,o),...f}));return i.displayName=dg(a),i};/**
 * @license lucide-react v0.540.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const XN=[["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"}]],Yu=he("activity",XN);/**
 * @license lucide-react v0.540.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const KN=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],gf=he("arrow-down",KN);/**
 * @license lucide-react v0.540.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const QN=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],ZN=he("arrow-right",QN);/**
 * @license lucide-react v0.540.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const PN=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],vf=he("arrow-up",PN);/**
 * @license lucide-react v0.540.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const $N=[["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"}]],Bt=he("bot",$N);/**
 * @license lucide-react v0.540.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const FN=[["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"}]],mg=he("brain",FN);/**
 * @license lucide-react v0.540.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const JN=[["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1",key:"d7y7pr"}],["path",{d:"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6",key:"xs1cw7"}],["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M6.53 9C4.6 8.8 3 7.1 3 5",key:"32zzws"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"M3 21c0-2.1 1.7-3.9 3.8-4",key:"4p0ekp"}],["path",{d:"M20.97 5c0 2.1-1.6 3.8-3.5 4",key:"18gb23"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M17.2 17c2.1.1 3.8 1.9 3.8 4",key:"k3fwyw"}]],hg=he("bug",JN);/**
 * @license lucide-react v0.540.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const WN=[["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"}]],IN=he("chart-column",WN);/**
 * @license lucide-react v0.540.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const eE=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ka=he("chevron-down",eE);/**
 * @license lucide-react v0.540.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const tE=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],nE=he("chevron-left",tE);/**
 * @license lucide-react v0.540.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const aE=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],lE=he("chevron-right",aE);/**
 * @license lucide-react v0.540.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const sE=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Zo=he("chevron-up",sE);/**
 * @license lucide-react v0.540.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const rE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Ca=he("circle-alert",rE);/**
 * @license lucide-react v0.540.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const oE=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Vs=he("circle-check-big",oE);/**
 * @license lucide-react v0.540.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const iE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],cE=he("circle-check",iE);/**
 * @license lucide-react v0.540.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const uE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]],Oo=he("circle-stop",uE);/**
 * @license lucide-react v0.540.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const fE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],dE=he("circle-x",fE);/**
 * @license lucide-react v0.540.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const mE=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Xs=he("clock",mE);/**
 * @license lucide-react v0.540.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const hE=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],ix=he("code",hE);/**
 * @license lucide-react v0.540.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const pE=[["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"}]],Vu=he("database",pE);/**
 * @license lucide-react v0.540.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const gE=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],Xu=he("download",gE);/**
 * @license lucide-react v0.540.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const vE=[["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"}]],xf=he("eye",vE);/**
 * @license lucide-react v0.540.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const xE=[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}]],yE=he("file-code",xE);/**
 * @license lucide-react v0.540.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const bE=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Ku=he("file-text",bE);/**
 * @license lucide-react v0.540.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const SE=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]],wE=he("file",SE);/**
 * @license lucide-react v0.540.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const NE=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],EE=he("folder-open",NE);/**
 * @license lucide-react v0.540.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const jE=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],_E=he("image",jE);/**
 * @license lucide-react v0.540.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ME=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],TE=he("info",ME);/**
 * @license lucide-react v0.540.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const AE=[["path",{d:"m16 6 4 14",key:"ji33uf"}],["path",{d:"M12 6v14",key:"1n7gus"}],["path",{d:"M8 8v12",key:"1gg7y9"}],["path",{d:"M4 4v16",key:"6qkkli"}]],CE=he("library",AE);/**
 * @license lucide-react v0.540.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const RE=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],DE=he("loader-circle",RE);/**
 * @license lucide-react v0.540.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const OE=[["path",{d:"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"}]],Al=he("message-square",OE);/**
 * @license lucide-react v0.540.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const kE=[["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"}]],zE=he("moon",kE);/**
 * @license lucide-react v0.540.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const UE=[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]],LE=he("music",UE);/**
 * @license lucide-react v0.540.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const HE=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],BE=he("pause",HE);/**
 * @license lucide-react v0.540.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const qE=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],yf=he("play",qE);/**
 * @license lucide-react v0.540.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const GE=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],YE=he("plus",GE);/**
 * @license lucide-react v0.540.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const VE=[["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"}]],XE=he("send",VE);/**
 * @license lucide-react v0.540.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const KE=[["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"}]],cx=he("settings",KE);/**
 * @license lucide-react v0.540.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const QE=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],ZE=he("sparkles",QE);/**
 * @license lucide-react v0.540.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const PE=[["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"}]],$E=he("sun",PE);/**
 * @license lucide-react v0.540.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const FE=[["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"}]],Po=he("trash-2",FE);/**
 * @license lucide-react v0.540.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const JE=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],WE=he("upload",JE);/**
 * @license lucide-react v0.540.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const IE=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]],ej=he("user-plus",IE);/**
 * @license lucide-react v0.540.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const tj=[["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"}]],Qu=he("user",tj);/**
 * @license lucide-react v0.540.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const nj=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],Ra=he("users",nj);/**
 * @license lucide-react v0.540.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const aj=[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]],lj=he("video",aj);/**
 * @license lucide-react v0.540.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const sj=[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]],Cl=he("workflow",sj);/**
 * @license lucide-react v0.540.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const rj=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],Ma=he("wrench",rj);/**
 * @license lucide-react v0.540.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const oj=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ij=he("x",oj);function bf({...a}){return c.jsx(DN,{"data-slot":"dropdown-menu",...a})}function Sf({...a}){return c.jsx(ON,{"data-slot":"dropdown-menu-trigger",...a})}function wf({className:a,sideOffset:s=4,...i}){return c.jsx(kN,{children:c.jsx(zN,{"data-slot":"dropdown-menu-content",sideOffset:s,className:Xe("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",a),...i})})}function Ta({className:a,inset:s,variant:i="default",...o}){return c.jsx(LN,{"data-slot":"dropdown-menu-item","data-inset":s,"data-variant":i,className:Xe("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",a),...o})}function Eo({className:a,inset:s,...i}){return c.jsx(UN,{"data-slot":"dropdown-menu-label","data-inset":s,className:Xe("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",a),...i})}function jo({className:a,...s}){return c.jsx(HN,{"data-slot":"dropdown-menu-separator",className:Xe("bg-border -mx-1 my-1 h-px",a),...s})}const cj=jg("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function je({className:a,variant:s,...i}){return c.jsx("div",{className:Xe(cj({variant:s}),a),...i})}function Nf({size:a="md",className:s}){return c.jsx(DE,{className:Xe("animate-spin",{"h-4 w-4":a==="sm","h-6 w-6":a==="md","h-8 w-8":a==="lg"},s)})}const pg=a=>{switch(a){case"agent":return Bt;case"orchestrator":return Ra;case"workflow":return Cl;default:return cx}},uj=a=>a==="directory"?EE:Vu,gg=a=>{switch(a.type){case"agent":const s=a;return{count:s.tools.length,label:"tools",secondaryInfo:s.model?`Model: ${s.model}`:void 0};case"orchestrator":const i=a;return{count:i.agents.length,label:"agents",secondaryInfo:`Type: ${i.orchestrator_type}`};case"workflow":const o=a;return{count:o.steps.length,label:"steps",secondaryInfo:o.start_step?`Start: ${o.start_step}`:void 0};default:return{count:0,label:"items"}}};function fj({entities:a,selectedEntity:s,onSelect:i,isLoading:o=!1,onViewGallery:f,onDeleteEntity:d}){const[m,p]=y.useState(!1),x=a.filter(R=>R.type==="agent"),h=a.filter(R=>R.type==="orchestrator"),v=a.filter(R=>R.type==="workflow"),b=R=>{i(R),p(!1)},w=s?pg(s.type):Bt,N=s?.name||s?.id||"Select...",M=s?gg(s):null,E=(R,B)=>{B.stopPropagation(),d&&d(R)},D=R=>{const B=pg(R.type),C=uj(R.source),A=gg(R),j=R.source==="github"||R.source==="memory";return c.jsx(Ta,{onClick:()=>b(R),className:"cursor-pointer",children:c.jsxs("div",{className:"flex items-center justify-between w-full gap-2",children:[c.jsxs("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[c.jsx(B,{className:"h-4 w-4 flex-shrink-0"}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsx("div",{className:"truncate font-medium",children:R.name||R.id}),R.description&&c.jsx("div",{className:"text-xs text-muted-foreground truncate",children:R.description}),A.secondaryInfo&&c.jsx("div",{className:"text-xs text-muted-foreground truncate",children:A.secondaryInfo})]})]}),c.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[c.jsx(C,{className:"h-3 w-3 opacity-60"}),c.jsx(je,{variant:"outline",className:"text-xs",children:A.count}),j&&d&&c.jsx(Ve,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0 hover:bg-destructive hover:text-destructive-foreground",onClick:L=>E(R,L),children:c.jsx(Po,{className:"h-3 w-3"})})]})]})},R.id)};return c.jsxs(bf,{open:m,onOpenChange:p,children:[c.jsx(Sf,{asChild:!0,children:c.jsx(Ve,{variant:"outline",className:"w-64 justify-between font-mono text-sm",disabled:o,children:o?c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Nf,{size:"sm"}),c.jsx("span",{className:"text-muted-foreground",children:"Loading..."})]}):c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[c.jsx(w,{className:"h-4 w-4 flex-shrink-0"}),c.jsx("span",{className:"truncate",children:N}),s&&M&&c.jsxs(je,{variant:"secondary",className:"ml-auto flex-shrink-0",children:[M.count," ",M.label]})]}),c.jsx(ka,{className:"h-4 w-4 opacity-50"})]})})}),c.jsxs(wf,{className:"w-80 font-mono",children:[x.length>0&&c.jsxs(c.Fragment,{children:[c.jsxs(Eo,{className:"flex items-center gap-2",children:[c.jsx(Bt,{className:"h-4 w-4"}),"Agents (",x.length,")"]}),x.map(D)]}),h.length>0&&c.jsxs(c.Fragment,{children:[x.length>0&&c.jsx(jo,{}),c.jsxs(Eo,{className:"flex items-center gap-2",children:[c.jsx(Ra,{className:"h-4 w-4"}),"Orchestrators (",h.length,")"]}),h.map(D)]}),v.length>0&&c.jsxs(c.Fragment,{children:[(x.length>0||h.length>0)&&c.jsx(jo,{}),c.jsxs(Eo,{className:"flex items-center gap-2",children:[c.jsx(Cl,{className:"h-4 w-4"}),"Workflows (",v.length,")"]}),v.map(D)]}),a.length===0&&!f&&c.jsx(Ta,{disabled:!0,children:c.jsx("div",{className:"text-center text-muted-foreground py-2",children:o?"Loading...":"No agents, orchestrators, or workflows found"})}),f&&c.jsxs(c.Fragment,{children:[c.jsx(jo,{}),c.jsx(Ta,{onClick:()=>{f(),p(!1)},className:"cursor-pointer",children:c.jsxs("div",{className:"flex items-center gap-2 w-full text-primary",children:[c.jsx(CE,{className:"h-4 w-4"}),c.jsx("span",{className:"font-medium",children:"Browse Examples Gallery"})]})})]})]})]})}var dj=(a,s,i,o,f,d,m,p)=>{let x=document.documentElement,h=["light","dark"];function v(N){(Array.isArray(a)?a:[a]).forEach(M=>{let E=M==="class",D=E&&d?f.map(R=>d[R]||R):f;E?(x.classList.remove(...D),x.classList.add(d&&d[N]?d[N]:N)):x.setAttribute(M,N)}),b(N)}function b(N){p&&h.includes(N)&&(x.style.colorScheme=N)}function w(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(o)v(o);else try{let N=localStorage.getItem(s)||i,M=m&&N==="system"?w():N;v(M)}catch{}},vg=["light","dark"],ux="(prefers-color-scheme: dark)",mj=typeof window>"u",Ef=y.createContext(void 0),hj={setTheme:a=>{},themes:[]},pj=()=>{var a;return(a=y.useContext(Ef))!=null?a:hj},gj=a=>y.useContext(Ef)?y.createElement(y.Fragment,null,a.children):y.createElement(xj,{...a}),vj=["light","dark"],xj=({forcedTheme:a,disableTransitionOnChange:s=!1,enableSystem:i=!0,enableColorScheme:o=!0,storageKey:f="theme",themes:d=vj,defaultTheme:m=i?"system":"light",attribute:p="data-theme",value:x,children:h,nonce:v,scriptProps:b})=>{let[w,N]=y.useState(()=>bj(f,m)),[M,E]=y.useState(()=>w==="system"?Au():w),D=x?Object.values(x):d,R=y.useCallback(j=>{let L=j;if(!L)return;j==="system"&&i&&(L=Au());let q=x?x[L]:L,X=s?Sj(v):null,F=document.documentElement,ee=I=>{I==="class"?(F.classList.remove(...D),q&&F.classList.add(q)):I.startsWith("data-")&&(q?F.setAttribute(I,q):F.removeAttribute(I))};if(Array.isArray(p)?p.forEach(ee):ee(p),o){let I=vg.includes(m)?m:null,ae=vg.includes(L)?L:I;F.style.colorScheme=ae}X?.()},[v]),B=y.useCallback(j=>{let L=typeof j=="function"?j(w):j;N(L);try{localStorage.setItem(f,L)}catch{}},[w]),C=y.useCallback(j=>{let L=Au(j);E(L),w==="system"&&i&&!a&&R("system")},[w,a]);y.useEffect(()=>{let j=window.matchMedia(ux);return j.addListener(C),C(j),()=>j.removeListener(C)},[C]),y.useEffect(()=>{let j=L=>{L.key===f&&(L.newValue?N(L.newValue):B(m))};return window.addEventListener("storage",j),()=>window.removeEventListener("storage",j)},[B]),y.useEffect(()=>{R(a??w)},[a,w]);let A=y.useMemo(()=>({theme:w,setTheme:B,forcedTheme:a,resolvedTheme:w==="system"?M:w,themes:i?[...d,"system"]:d,systemTheme:i?M:void 0}),[w,B,a,M,i,d]);return y.createElement(Ef.Provider,{value:A},y.createElement(yj,{forcedTheme:a,storageKey:f,attribute:p,enableSystem:i,enableColorScheme:o,defaultTheme:m,value:x,themes:d,nonce:v,scriptProps:b}),h)},yj=y.memo(({forcedTheme:a,storageKey:s,attribute:i,enableSystem:o,enableColorScheme:f,defaultTheme:d,value:m,themes:p,nonce:x,scriptProps:h})=>{let v=JSON.stringify([i,s,d,a,p,m,o,f]).slice(1,-1);return y.createElement("script",{...h,suppressHydrationWarning:!0,nonce:typeof window>"u"?x:"",dangerouslySetInnerHTML:{__html:`(${dj.toString()})(${v})`}})}),bj=(a,s)=>{if(mj)return;let i;try{i=localStorage.getItem(a)||void 0}catch{}return i||s},Sj=a=>{let s=document.createElement("style");return a&&s.setAttribute("nonce",a),s.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(s),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(s)},1)}},Au=a=>(a||(a=window.matchMedia(ux)),a.matches?"dark":"light");function wj(){const{setTheme:a}=pj();return c.jsxs(bf,{children:[c.jsx(Sf,{asChild:!0,children:c.jsxs(Ve,{variant:"ghost",size:"sm",children:[c.jsx($E,{className:"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),c.jsx(zE,{className:"absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),c.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),c.jsxs(wf,{align:"end",children:[c.jsx(Ta,{onClick:()=>a("light"),children:"Light"}),c.jsx(Ta,{onClick:()=>a("dark"),children:"Dark"}),c.jsx(Ta,{onClick:()=>a("system"),children:"System"})]})]})}function Cu({entities:a,selectedEntity:s,onSelect:i,isLoading:o=!1,onViewGallery:f,onDeleteEntity:d}){return c.jsxs("header",{className:"flex h-14 items-center gap-4 border-b px-4",children:[c.jsx("div",{className:"font-semibold",children:"PicoAgents WebUI"}),c.jsx(fj,{entities:a,selectedEntity:s,onSelect:i,isLoading:o,onViewGallery:f,onDeleteEntity:d}),c.jsxs("div",{className:"flex items-center gap-2 ml-auto",children:[c.jsx(wj,{}),c.jsx(Ve,{variant:"ghost",size:"sm",children:c.jsx(cx,{className:"h-4 w-4"})})]})]})}function jf(a,[s,i]){return Math.min(i,Math.max(s,a))}function Nj(a,s){return y.useReducer((i,o)=>s[i][o]??i,a)}var _f="ScrollArea",[fx,eM]=oa(_f),[Ej,qt]=fx(_f),dx=y.forwardRef((a,s)=>{const{__scopeScrollArea:i,type:o="hover",dir:f,scrollHideDelay:d=600,...m}=a,[p,x]=y.useState(null),[h,v]=y.useState(null),[b,w]=y.useState(null),[N,M]=y.useState(null),[E,D]=y.useState(null),[R,B]=y.useState(0),[C,A]=y.useState(0),[j,L]=y.useState(!1),[q,X]=y.useState(!1),F=He(s,I=>x(I)),ee=Ks(f);return c.jsx(Ej,{scope:i,type:o,dir:ee,scrollHideDelay:d,scrollArea:p,viewport:h,onViewportChange:v,content:b,onContentChange:w,scrollbarX:N,onScrollbarXChange:M,scrollbarXEnabled:j,onScrollbarXEnabledChange:L,scrollbarY:E,onScrollbarYChange:D,scrollbarYEnabled:q,onScrollbarYEnabledChange:X,onCornerWidthChange:B,onCornerHeightChange:A,children:c.jsx(Ce.div,{dir:ee,...m,ref:F,style:{position:"relative","--radix-scroll-area-corner-width":R+"px","--radix-scroll-area-corner-height":C+"px",...a.style}})})});dx.displayName=_f;var mx="ScrollAreaViewport",hx=y.forwardRef((a,s)=>{const{__scopeScrollArea:i,children:o,nonce:f,...d}=a,m=qt(mx,i),p=y.useRef(null),x=He(s,p,m.onViewportChange);return c.jsxs(c.Fragment,{children:[c.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:f}),c.jsx(Ce.div,{"data-radix-scroll-area-viewport":"",...d,ref:x,style:{overflowX:m.scrollbarXEnabled?"scroll":"hidden",overflowY:m.scrollbarYEnabled?"scroll":"hidden",...a.style},children:c.jsx("div",{ref:m.onContentChange,style:{minWidth:"100%",display:"table"},children:o})})]})});hx.displayName=mx;var on="ScrollAreaScrollbar",Mf=y.forwardRef((a,s)=>{const{forceMount:i,...o}=a,f=qt(on,a.__scopeScrollArea),{onScrollbarXEnabledChange:d,onScrollbarYEnabledChange:m}=f,p=a.orientation==="horizontal";return y.useEffect(()=>(p?d(!0):m(!0),()=>{p?d(!1):m(!1)}),[p,d,m]),f.type==="hover"?c.jsx(jj,{...o,ref:s,forceMount:i}):f.type==="scroll"?c.jsx(_j,{...o,ref:s,forceMount:i}):f.type==="auto"?c.jsx(px,{...o,ref:s,forceMount:i}):f.type==="always"?c.jsx(Tf,{...o,ref:s}):null});Mf.displayName=on;var jj=y.forwardRef((a,s)=>{const{forceMount:i,...o}=a,f=qt(on,a.__scopeScrollArea),[d,m]=y.useState(!1);return y.useEffect(()=>{const p=f.scrollArea;let x=0;if(p){const h=()=>{window.clearTimeout(x),m(!0)},v=()=>{x=window.setTimeout(()=>m(!1),f.scrollHideDelay)};return p.addEventListener("pointerenter",h),p.addEventListener("pointerleave",v),()=>{window.clearTimeout(x),p.removeEventListener("pointerenter",h),p.removeEventListener("pointerleave",v)}}},[f.scrollArea,f.scrollHideDelay]),c.jsx(rn,{present:i||d,children:c.jsx(px,{"data-state":d?"visible":"hidden",...o,ref:s})})}),_j=y.forwardRef((a,s)=>{const{forceMount:i,...o}=a,f=qt(on,a.__scopeScrollArea),d=a.orientation==="horizontal",m=Fo(()=>x("SCROLL_END"),100),[p,x]=Nj("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return y.useEffect(()=>{if(p==="idle"){const h=window.setTimeout(()=>x("HIDE"),f.scrollHideDelay);return()=>window.clearTimeout(h)}},[p,f.scrollHideDelay,x]),y.useEffect(()=>{const h=f.viewport,v=d?"scrollLeft":"scrollTop";if(h){let b=h[v];const w=()=>{const N=h[v];b!==N&&(x("SCROLL"),m()),b=N};return h.addEventListener("scroll",w),()=>h.removeEventListener("scroll",w)}},[f.viewport,d,x,m]),c.jsx(rn,{present:i||p!=="hidden",children:c.jsx(Tf,{"data-state":p==="hidden"?"hidden":"visible",...o,ref:s,onPointerEnter:me(a.onPointerEnter,()=>x("POINTER_ENTER")),onPointerLeave:me(a.onPointerLeave,()=>x("POINTER_LEAVE"))})})}),px=y.forwardRef((a,s)=>{const i=qt(on,a.__scopeScrollArea),{forceMount:o,...f}=a,[d,m]=y.useState(!1),p=a.orientation==="horizontal",x=Fo(()=>{if(i.viewport){const h=i.viewport.offsetWidth<i.viewport.scrollWidth,v=i.viewport.offsetHeight<i.viewport.scrollHeight;m(p?h:v)}},10);return Rl(i.viewport,x),Rl(i.content,x),c.jsx(rn,{present:o||d,children:c.jsx(Tf,{"data-state":d?"visible":"hidden",...f,ref:s})})}),Tf=y.forwardRef((a,s)=>{const{orientation:i="vertical",...o}=a,f=qt(on,a.__scopeScrollArea),d=y.useRef(null),m=y.useRef(0),[p,x]=y.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),h=bx(p.viewport,p.content),v={...o,sizes:p,onSizesChange:x,hasThumb:h>0&&h<1,onThumbChange:w=>d.current=w,onThumbPointerUp:()=>m.current=0,onThumbPointerDown:w=>m.current=w};function b(w,N){return Dj(w,m.current,p,N)}return i==="horizontal"?c.jsx(Mj,{...v,ref:s,onThumbPositionChange:()=>{if(f.viewport&&d.current){const w=f.viewport.scrollLeft,N=xg(w,p,f.dir);d.current.style.transform=`translate3d(${N}px, 0, 0)`}},onWheelScroll:w=>{f.viewport&&(f.viewport.scrollLeft=w)},onDragScroll:w=>{f.viewport&&(f.viewport.scrollLeft=b(w,f.dir))}}):i==="vertical"?c.jsx(Tj,{...v,ref:s,onThumbPositionChange:()=>{if(f.viewport&&d.current){const w=f.viewport.scrollTop,N=xg(w,p);d.current.style.transform=`translate3d(0, ${N}px, 0)`}},onWheelScroll:w=>{f.viewport&&(f.viewport.scrollTop=w)},onDragScroll:w=>{f.viewport&&(f.viewport.scrollTop=b(w))}}):null}),Mj=y.forwardRef((a,s)=>{const{sizes:i,onSizesChange:o,...f}=a,d=qt(on,a.__scopeScrollArea),[m,p]=y.useState(),x=y.useRef(null),h=He(s,x,d.onScrollbarXChange);return y.useEffect(()=>{x.current&&p(getComputedStyle(x.current))},[x]),c.jsx(vx,{"data-orientation":"horizontal",...f,ref:h,sizes:i,style:{bottom:0,left:d.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:d.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":$o(i)+"px",...a.style},onThumbPointerDown:v=>a.onThumbPointerDown(v.x),onDragScroll:v=>a.onDragScroll(v.x),onWheelScroll:(v,b)=>{if(d.viewport){const w=d.viewport.scrollLeft+v.deltaX;a.onWheelScroll(w),wx(w,b)&&v.preventDefault()}},onResize:()=>{x.current&&d.viewport&&m&&o({content:d.viewport.scrollWidth,viewport:d.viewport.offsetWidth,scrollbar:{size:x.current.clientWidth,paddingStart:zo(m.paddingLeft),paddingEnd:zo(m.paddingRight)}})}})}),Tj=y.forwardRef((a,s)=>{const{sizes:i,onSizesChange:o,...f}=a,d=qt(on,a.__scopeScrollArea),[m,p]=y.useState(),x=y.useRef(null),h=He(s,x,d.onScrollbarYChange);return y.useEffect(()=>{x.current&&p(getComputedStyle(x.current))},[x]),c.jsx(vx,{"data-orientation":"vertical",...f,ref:h,sizes:i,style:{top:0,right:d.dir==="ltr"?0:void 0,left:d.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":$o(i)+"px",...a.style},onThumbPointerDown:v=>a.onThumbPointerDown(v.y),onDragScroll:v=>a.onDragScroll(v.y),onWheelScroll:(v,b)=>{if(d.viewport){const w=d.viewport.scrollTop+v.deltaY;a.onWheelScroll(w),wx(w,b)&&v.preventDefault()}},onResize:()=>{x.current&&d.viewport&&m&&o({content:d.viewport.scrollHeight,viewport:d.viewport.offsetHeight,scrollbar:{size:x.current.clientHeight,paddingStart:zo(m.paddingTop),paddingEnd:zo(m.paddingBottom)}})}})}),[Aj,gx]=fx(on),vx=y.forwardRef((a,s)=>{const{__scopeScrollArea:i,sizes:o,hasThumb:f,onThumbChange:d,onThumbPointerUp:m,onThumbPointerDown:p,onThumbPositionChange:x,onDragScroll:h,onWheelScroll:v,onResize:b,...w}=a,N=qt(on,i),[M,E]=y.useState(null),D=He(s,F=>E(F)),R=y.useRef(null),B=y.useRef(""),C=N.viewport,A=o.content-o.viewport,j=it(v),L=it(x),q=Fo(b,10);function X(F){if(R.current){const ee=F.clientX-R.current.left,I=F.clientY-R.current.top;h({x:ee,y:I})}}return y.useEffect(()=>{const F=ee=>{const I=ee.target;M?.contains(I)&&j(ee,A)};return document.addEventListener("wheel",F,{passive:!1}),()=>document.removeEventListener("wheel",F,{passive:!1})},[C,M,A,j]),y.useEffect(L,[o,L]),Rl(M,q),Rl(N.content,q),c.jsx(Aj,{scope:i,scrollbar:M,hasThumb:f,onThumbChange:it(d),onThumbPointerUp:it(m),onThumbPositionChange:L,onThumbPointerDown:it(p),children:c.jsx(Ce.div,{...w,ref:D,style:{position:"absolute",...w.style},onPointerDown:me(a.onPointerDown,F=>{F.button===0&&(F.target.setPointerCapture(F.pointerId),R.current=M.getBoundingClientRect(),B.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",N.viewport&&(N.viewport.style.scrollBehavior="auto"),X(F))}),onPointerMove:me(a.onPointerMove,X),onPointerUp:me(a.onPointerUp,F=>{const ee=F.target;ee.hasPointerCapture(F.pointerId)&&ee.releasePointerCapture(F.pointerId),document.body.style.webkitUserSelect=B.current,N.viewport&&(N.viewport.style.scrollBehavior=""),R.current=null})})})}),ko="ScrollAreaThumb",xx=y.forwardRef((a,s)=>{const{forceMount:i,...o}=a,f=gx(ko,a.__scopeScrollArea);return c.jsx(rn,{present:i||f.hasThumb,children:c.jsx(Cj,{ref:s,...o})})}),Cj=y.forwardRef((a,s)=>{const{__scopeScrollArea:i,style:o,...f}=a,d=qt(ko,i),m=gx(ko,i),{onThumbPositionChange:p}=m,x=He(s,b=>m.onThumbChange(b)),h=y.useRef(void 0),v=Fo(()=>{h.current&&(h.current(),h.current=void 0)},100);return y.useEffect(()=>{const b=d.viewport;if(b){const w=()=>{if(v(),!h.current){const N=Oj(b,p);h.current=N,p()}};return p(),b.addEventListener("scroll",w),()=>b.removeEventListener("scroll",w)}},[d.viewport,v,p]),c.jsx(Ce.div,{"data-state":m.hasThumb?"visible":"hidden",...f,ref:x,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...o},onPointerDownCapture:me(a.onPointerDownCapture,b=>{const N=b.target.getBoundingClientRect(),M=b.clientX-N.left,E=b.clientY-N.top;m.onThumbPointerDown({x:M,y:E})}),onPointerUp:me(a.onPointerUp,m.onThumbPointerUp)})});xx.displayName=ko;var Af="ScrollAreaCorner",yx=y.forwardRef((a,s)=>{const i=qt(Af,a.__scopeScrollArea),o=!!(i.scrollbarX&&i.scrollbarY);return i.type!=="scroll"&&o?c.jsx(Rj,{...a,ref:s}):null});yx.displayName=Af;var Rj=y.forwardRef((a,s)=>{const{__scopeScrollArea:i,...o}=a,f=qt(Af,i),[d,m]=y.useState(0),[p,x]=y.useState(0),h=!!(d&&p);return Rl(f.scrollbarX,()=>{const v=f.scrollbarX?.offsetHeight||0;f.onCornerHeightChange(v),x(v)}),Rl(f.scrollbarY,()=>{const v=f.scrollbarY?.offsetWidth||0;f.onCornerWidthChange(v),m(v)}),h?c.jsx(Ce.div,{...o,ref:s,style:{width:d,height:p,position:"absolute",right:f.dir==="ltr"?0:void 0,left:f.dir==="rtl"?0:void 0,bottom:0,...a.style}}):null});function zo(a){return a?parseInt(a,10):0}function bx(a,s){const i=a/s;return isNaN(i)?0:i}function $o(a){const s=bx(a.viewport,a.content),i=a.scrollbar.paddingStart+a.scrollbar.paddingEnd,o=(a.scrollbar.size-i)*s;return Math.max(o,18)}function Dj(a,s,i,o="ltr"){const f=$o(i),d=f/2,m=s||d,p=f-m,x=i.scrollbar.paddingStart+m,h=i.scrollbar.size-i.scrollbar.paddingEnd-p,v=i.content-i.viewport,b=o==="ltr"?[0,v]:[v*-1,0];return Sx([x,h],b)(a)}function xg(a,s,i="ltr"){const o=$o(s),f=s.scrollbar.paddingStart+s.scrollbar.paddingEnd,d=s.scrollbar.size-f,m=s.content-s.viewport,p=d-o,x=i==="ltr"?[0,m]:[m*-1,0],h=jf(a,x);return Sx([0,m],[0,p])(h)}function Sx(a,s){return i=>{if(a[0]===a[1]||s[0]===s[1])return s[0];const o=(s[1]-s[0])/(a[1]-a[0]);return s[0]+o*(i-a[0])}}function wx(a,s){return a>0&&a<s}var Oj=(a,s=()=>{})=>{let i={left:a.scrollLeft,top:a.scrollTop},o=0;return(function f(){const d={left:a.scrollLeft,top:a.scrollTop},m=i.left!==d.left,p=i.top!==d.top;(m||p)&&s(),i=d,o=window.requestAnimationFrame(f)})(),()=>window.cancelAnimationFrame(o)};function Fo(a,s){const i=it(a),o=y.useRef(0);return y.useEffect(()=>()=>window.clearTimeout(o.current),[]),y.useCallback(()=>{window.clearTimeout(o.current),o.current=window.setTimeout(i,s)},[i,s])}function Rl(a,s){const i=it(s);_n(()=>{let o=0;if(a){const f=new ResizeObserver(()=>{cancelAnimationFrame(o),o=window.requestAnimationFrame(i)});return f.observe(a),()=>{window.cancelAnimationFrame(o),f.unobserve(a)}}},[a,i])}var Nx=dx,kj=hx,zj=yx;const ra=y.forwardRef(({className:a,children:s,...i},o)=>c.jsxs(Nx,{ref:o,className:Xe("relative overflow-hidden",a),...i,children:[c.jsx(kj,{className:"h-full w-full rounded-[inherit]",children:s}),c.jsx(Ex,{}),c.jsx(zj,{})]}));ra.displayName=Nx.displayName;const Ex=y.forwardRef(({className:a,orientation:s="vertical",...i},o)=>c.jsx(Mf,{ref:o,orientation:s,className:Xe("flex touch-none select-none transition-colors",s==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",s==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",a),...i,children:c.jsx(xx,{className:"relative flex-1 rounded-full bg-border"})}));Ex.displayName=Mf.displayName;var Jo="Tabs",[Uj,tM]=oa(Jo,[Yo]),jx=Yo(),[Lj,Cf]=Uj(Jo),_x=y.forwardRef((a,s)=>{const{__scopeTabs:i,value:o,onValueChange:f,defaultValue:d,orientation:m="horizontal",dir:p,activationMode:x="automatic",...h}=a,v=Ks(p),[b,w]=Lo({prop:o,onChange:f,defaultProp:d??"",caller:Jo});return c.jsx(Lj,{scope:i,baseId:_o(),value:b,onValueChange:w,orientation:m,dir:v,activationMode:x,children:c.jsx(Ce.div,{dir:v,"data-orientation":m,...h,ref:s})})});_x.displayName=Jo;var Mx="TabsList",Tx=y.forwardRef((a,s)=>{const{__scopeTabs:i,loop:o=!0,...f}=a,d=Cf(Mx,i),m=jx(i);return c.jsx(vv,{asChild:!0,...m,orientation:d.orientation,dir:d.dir,loop:o,children:c.jsx(Ce.div,{role:"tablist","aria-orientation":d.orientation,...f,ref:s})})});Tx.displayName=Mx;var Ax="TabsTrigger",Cx=y.forwardRef((a,s)=>{const{__scopeTabs:i,value:o,disabled:f=!1,...d}=a,m=Cf(Ax,i),p=jx(i),x=Ox(m.baseId,o),h=kx(m.baseId,o),v=o===m.value;return c.jsx(xv,{asChild:!0,...p,focusable:!f,active:v,children:c.jsx(Ce.button,{type:"button",role:"tab","aria-selected":v,"aria-controls":h,"data-state":v?"active":"inactive","data-disabled":f?"":void 0,disabled:f,id:x,...d,ref:s,onMouseDown:me(a.onMouseDown,b=>{!f&&b.button===0&&b.ctrlKey===!1?m.onValueChange(o):b.preventDefault()}),onKeyDown:me(a.onKeyDown,b=>{[" ","Enter"].includes(b.key)&&m.onValueChange(o)}),onFocus:me(a.onFocus,()=>{const b=m.activationMode!=="manual";!v&&!f&&b&&m.onValueChange(o)})})})});Cx.displayName=Ax;var Rx="TabsContent",Dx=y.forwardRef((a,s)=>{const{__scopeTabs:i,value:o,forceMount:f,children:d,...m}=a,p=Cf(Rx,i),x=Ox(p.baseId,o),h=kx(p.baseId,o),v=o===p.value,b=y.useRef(v);return y.useEffect(()=>{const w=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(w)},[]),c.jsx(rn,{present:f||v,children:({present:w})=>c.jsx(Ce.div,{"data-state":v?"active":"inactive","data-orientation":p.orientation,role:"tabpanel","aria-labelledby":x,hidden:!w,id:h,tabIndex:0,...m,ref:s,style:{...a.style,animationDuration:b.current?"0s":void 0},children:w&&d})})});Dx.displayName=Rx;function Ox(a,s){return`${a}-trigger-${s}`}function kx(a,s){return`${a}-content-${s}`}var Hj=_x,zx=Tx,Ux=Cx,Lx=Dx;const Hx=Hj,Rf=y.forwardRef(({className:a,...s},i)=>c.jsx(zx,{ref:i,className:Xe("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",a),...s}));Rf.displayName=zx.displayName;const _l=y.forwardRef(({className:a,...s},i)=>c.jsx(Ux,{ref:i,className:Xe("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",a),...s}));_l.displayName=Ux.displayName;const Ml=y.forwardRef(({className:a,...s},i)=>c.jsx(Lx,{ref:i,className:Xe("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",a),...s}));Ml.displayName=Lx.displayName;const Bx=a=>{switch(a){case"message":return c.jsx(Al,{className:"h-4 w-4"});case"token_chunk":return c.jsx(Al,{className:"h-4 w-4 text-blue-400"});case"tool_call":return c.jsx(Yu,{className:"h-4 w-4"});case"tool_approval":return c.jsx(Ca,{className:"h-4 w-4 text-amber-600"});case"error":return c.jsx(Ca,{className:"h-4 w-4 text-red-500"});case"complete":return c.jsx(Vs,{className:"h-4 w-4 text-green-500"});case"workflow_started":case"workflow_completed":return c.jsx(Yu,{className:"h-4 w-4 text-blue-500"});case"orchestration_start":return c.jsx(Ra,{className:"h-4 w-4 text-purple-500"});case"orchestration_complete":return c.jsx(Vs,{className:"h-4 w-4 text-purple-500"});case"agent_selection":return c.jsx(ej,{className:"h-4 w-4 text-blue-500"});case"agent_execution_start":return c.jsx(yf,{className:"h-4 w-4 text-blue-400"});case"agent_execution_complete":return c.jsx(BE,{className:"h-4 w-4 text-blue-400"});default:return c.jsx(TE,{className:"h-4 w-4"})}},Bj=a=>{switch(a){case"error":return"destructive";case"tool_approval":return"default";case"complete":case"workflow_completed":case"orchestration_complete":case"agent_execution_complete":return"default";case"message":case"token_chunk":case"tool_call":return"secondary";case"orchestration_start":case"agent_selection":case"agent_execution_start":return"outline";default:return"outline"}},qj=a=>{const s=a.data;switch(a.type){case"orchestration_start":return s?.pattern?`Pattern: ${s.pattern}`:null;case"agent_selection":return s?.selected_agent?`Selected: ${s.selected_agent}${s.selection_reason?` (${s.selection_reason})`:""}`:null;case"agent_execution_start":return s?.executing_agent?`${s.executing_agent}${s.context_size?` - ${s.context_size} messages`:""}`:null;case"agent_execution_complete":return s?.executing_agent?`${s.executing_agent}${s.message_count?` - added ${s.message_count} messages`:""}`:null;case"orchestration_complete":return s?.stop_reason?`Reason: ${s.stop_reason}`:null;default:return null}};function Gj({event:a}){const[s,i]=y.useState(!1),o=qj(a);return c.jsxs("div",{className:"bg-card border border-muted rounded p-2 shadow-sm",children:[c.jsxs("div",{className:"flex items-center justify-between mb-1",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[Bx(a.type),c.jsx("span",{className:"text-sm font-medium",children:a.type}),c.jsx(je,{variant:Bj(a.type),className:"text-xs px-1.5 py-0.5 h-5",children:a.type})]}),c.jsxs("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[c.jsx(Xs,{className:"h-3 w-3"}),new Date(a.timestamp).toLocaleTimeString()]})]}),o&&c.jsx("div",{className:"text-xs text-foreground font-medium mt-1",children:o}),a.data&&c.jsxs("div",{className:"mt-1",children:[c.jsxs("button",{onClick:()=>i(!s),className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground",children:[s?c.jsx(ka,{className:"h-3 w-3"}):c.jsx(lE,{className:"h-3 w-3"}),s?"Hide":"Show"," data"]}),s&&c.jsxs("div",{className:"mt-1 space-y-2",children:[a.session_id&&c.jsxs("div",{className:"text-xs text-muted-foreground",children:["Session: ",a.session_id]}),c.jsx(ra,{className:"h-20",children:c.jsx("pre",{className:"text-xs bg-muted p-2 rounded overflow-auto",children:JSON.stringify(a.data,null,2)})})]})]})]})}function Yj({events:a}){const s=a.reduce((i,o)=>(i[o.type]=(i[o.type]||0)+1,i),{});return c.jsx("div",{className:"grid grid-cols-2 gap-2 mb-4",children:Object.entries(s).map(([i,o])=>c.jsx("div",{className:"bg-card border border-muted rounded p-2 shadow-sm",children:c.jsxs("div",{className:"flex items-center gap-2",children:[Bx(i),c.jsxs("div",{children:[c.jsx("div",{className:"text-sm font-medium",children:o}),c.jsx("div",{className:"text-xs text-muted-foreground",children:i})]})]})},i))})}function Vj({events:a,isStreaming:s}){const i=a.slice(-50);return c.jsxs("div",{className:"h-full flex flex-col border-l bg-background",children:[c.jsxs("div",{className:"p-4 border-b",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(hg,{className:"h-5 w-5"}),c.jsx("h3",{className:"font-semibold",children:"Debug Panel"}),s&&c.jsxs(je,{variant:"secondary",className:"gap-1",children:[c.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"}),"Live"]})]}),c.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:[a.length," events total"]})]}),c.jsx("div",{className:"flex-1 min-h-0 overflow-hidden flex flex-col px-4",children:c.jsxs(Hx,{defaultValue:"events",className:"flex-1 flex flex-col min-h-0",children:[c.jsxs(Rf,{className:"grid w-full grid-cols-2 mt-4 mb-2 flex-shrink-0",children:[c.jsx(_l,{value:"events",children:"Events"}),c.jsx(_l,{value:"summary",children:"Summary"})]}),c.jsx(Ml,{value:"events",className:"flex-1 min-h-0 mb-4 overflow-hidden data-[state=active]:flex data-[state=inactive]:hidden",children:c.jsx(ra,{className:"h-full w-full",children:i.length===0?c.jsxs("div",{className:"flex flex-col items-center justify-center h-32 text-center",children:[c.jsx(hg,{className:"h-8 w-8 text-muted-foreground mb-2"}),c.jsx("div",{className:"text-sm text-muted-foreground",children:"No debug events yet"}),c.jsx("div",{className:"text-xs text-muted-foreground",children:"Events will appear here during execution"})]}):c.jsx("div",{className:"space-y-1",children:i.map((o,f)=>c.jsx(Gj,{event:o},f))})})}),c.jsx(Ml,{value:"summary",className:"flex-1 min-h-0 mb-4 overflow-hidden data-[state=active]:flex data-[state=inactive]:hidden",children:c.jsx(ra,{className:"h-full w-full",children:a.length===0?c.jsxs("div",{className:"flex flex-col items-center justify-center h-32 text-center",children:[c.jsx(Yu,{className:"h-8 w-8 text-muted-foreground mb-2"}),c.jsx("div",{className:"text-sm text-muted-foreground",children:"No events to summarize"})]}):c.jsx(Yj,{events:a})})})]})})]})}function Xj({onFilesSelected:a,accept:s="image/*,.pdf,.txt,.json,.csv,.md",multiple:i=!0,maxSize:o=50*1024*1024,disabled:f=!1,className:d=""}){const m=y.useRef(null),p=w=>{if(!w||w.length===0)return;const N=[],M=[];Array.from(w).forEach(E=>{if(E.size>o){M.push(`${E.name} is too large (max ${Kj(o)})`);return}if(s&&!Qj(E,s)){M.push(`${E.name} is not an accepted file type`);return}N.push(E)}),M.length>0&&console.warn("File upload errors:",M),N.length>0&&a(N)},x=()=>{m.current&&m.current.click()},h=w=>{p(w.target.files),w.target.value=""},v=w=>{if(w.preventDefault(),w.stopPropagation(),f)return;const N=w.dataTransfer.files;p(N)},b=w=>{w.preventDefault(),w.stopPropagation()};return c.jsxs("div",{className:d,children:[c.jsx("input",{ref:m,type:"file",accept:s,multiple:i,onChange:h,className:"hidden",disabled:f}),c.jsx(Ve,{type:"button",variant:"outline",size:"icon",onClick:x,disabled:f,onDrop:v,onDragOver:b,className:"shrink-0 h-[40px] transition-colors hover:bg-muted",title:"Upload files (images, PDFs, text files)",children:c.jsx(WE,{className:"h-4 w-4"})})]})}function Kj(a){if(a===0)return"0 Bytes";const s=1024,i=["Bytes","KB","MB","GB"],o=Math.floor(Math.log(a)/Math.log(s));return parseFloat((a/Math.pow(s,o)).toFixed(2))+" "+i[o]}function Qj(a,s){return s.split(",").map(o=>o.trim()).some(o=>{if(o.startsWith("."))return a.name.toLowerCase().endsWith(o.toLowerCase());if(o.includes("/*")){const[f]=o.split("/");return a.type.startsWith(f+"/")}else return a.type===o})}function Zj({attachments:a,onRemoveAttachment:s,className:i=""}){return a.length===0?null:c.jsx("div",{className:`flex flex-wrap gap-2 p-2 bg-muted rounded-lg ${i}`,children:a.map(o=>c.jsx(Pj,{attachment:o,onRemove:()=>s(o.id)},o.id))})}function Pj({attachment:a,onRemove:s}){const[i,o]=y.useState(!1),f=()=>{switch(a.type){case"image":return a.preview?c.jsx("img",{src:a.preview,alt:a.file.name,className:"w-full h-full object-cover"}):c.jsx("div",{className:"flex items-center justify-center w-full h-full bg-gray-200",children:c.jsx(_E,{className:"h-6 w-6 text-gray-400"})});case"pdf":return c.jsxs("div",{className:"flex flex-col items-center justify-center w-full h-full bg-red-50",children:[c.jsx(Ku,{className:"h-6 w-6 text-red-500 mb-1"}),c.jsx("span",{className:"text-xs text-red-600",children:"PDF"})]});case"audio":return c.jsxs("div",{className:"flex flex-col items-center justify-center w-full h-full bg-green-50",children:[c.jsx(LE,{className:"h-6 w-6 text-green-500 mb-1"}),c.jsx("span",{className:"text-xs text-green-600",children:"AUDIO"})]});case"video":return c.jsxs("div",{className:"flex flex-col items-center justify-center w-full h-full bg-blue-50",children:[c.jsx(lj,{className:"h-6 w-6 text-blue-500 mb-1"}),c.jsx("span",{className:"text-xs text-blue-600",children:"VIDEO"})]});case"text":return c.jsxs("div",{className:"flex flex-col items-center justify-center w-full h-full bg-yellow-50",children:[c.jsx(Ku,{className:"h-6 w-6 text-yellow-600 mb-1"}),c.jsx("span",{className:"text-xs text-yellow-700",children:"TEXT"})]});default:return c.jsxs("div",{className:"flex flex-col items-center justify-center w-full h-full bg-gray-100",children:[c.jsx(wE,{className:"h-6 w-6 text-gray-500 mb-1"}),c.jsx("span",{className:"text-xs text-gray-600",children:"FILE"})]})}};return c.jsxs("div",{className:"relative w-16 h-16 rounded border overflow-hidden group cursor-pointer",onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),title:a.file.name,children:[f(),c.jsx("div",{className:`absolute inset-0 bg-black/60 flex items-center justify-center transition-all duration-200 ease-in-out ${i?"opacity-100 backdrop-blur-sm":"opacity-0 pointer-events-none"}`,onClick:s,children:c.jsx("div",{className:`transition-all duration-200 ease-in-out ${i?"scale-100 opacity-100":"scale-75 opacity-0"}`,children:c.jsx(Po,{className:"h-5 w-5 text-white drop-shadow-lg"})})}),c.jsx("div",{className:"absolute bottom-0 left-0 right-0 bg-black bg-opacity-75 text-white text-xs p-1 truncate opacity-0 group-hover:opacity-100 transition-opacity duration-200",children:a.file.name})]})}function $j(a){const s=a.type.toLowerCase();return s.startsWith("image/")?"image":s==="application/pdf"?"pdf":s.startsWith("audio/")?"audio":s.startsWith("video/")?"video":s.startsWith("text/")||s==="application/json"||a.name.endsWith(".md")||a.name.endsWith(".txt")||a.name.endsWith(".csv")?"text":"other"}function Fj(a){return new Promise((s,i)=>{const o=new FileReader;o.onload=()=>s(o.result),o.onerror=i,o.readAsDataURL(a)})}const qx=y.forwardRef(({className:a,...s},i)=>c.jsx("textarea",{className:Xe("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",a),ref:i,...s}));qx.displayName="Textarea";function Jj({onSendMessage:a,disabled:s=!1,placeholder:i="Type a message... (Enter to send, Shift+Enter for new line)",className:o=""}){const[f,d]=y.useState(""),[m,p]=y.useState([]),[x,h]=y.useState(!1),[v,b]=y.useState(null),w=y.useRef(null),N=async A=>{const j=[];for(const L of A){const q=`${Date.now()}-${Math.random().toString(36).substr(2,9)}`,X=$j(L);let F;if(X==="image")try{F=await Fj(L)}catch(ee){console.error("Failed to read image preview:",ee)}j.push({id:q,file:L,preview:F,type:X})}p(L=>[...L,...j])},M=A=>{p(j=>j.filter(L=>L.id!==A))},E=async A=>{const j=Array.from(A.clipboardData.items),L=[];let q=!1;const X=8e3;for(const F of j)if(F.type.startsWith("image/")){A.preventDefault();const ee=F.getAsFile();if(ee){const I=Date.now();L.push(new File([ee],`screenshot-${I}.png`,{type:ee.type}))}}else if(F.type==="text/plain"&&!q){const ee=await new Promise(I=>{F.getAsString(I)});if(ee.length>X){A.preventDefault(),q=!0;const I=D(ee),pe=`pasted-text-${Date.now()}.${I}`,ge=new Blob([ee],{type:"text/plain"});L.push(new File([ge],pe,{type:"text/plain"})),d("")}}if(L.length>0){await N(L);const F=L.length===1?L[0].name.includes("screenshot")?"Screenshot added as attachment":"Large text converted to file":`${L.length} files added`;b(F),setTimeout(()=>b(null),3e3)}},D=A=>{const j=A.trim(),L=j.split(`
`);if(j.startsWith("{")&&j.endsWith("}")||j.startsWith("[")&&j.endsWith("]"))try{return JSON.parse(j),"json"}catch{}return L.length>1&&L[0].includes(",")&&L.slice(0,3).every(q=>q.split(",").length===L[0].split(",").length)?"csv":j.includes("# ")||j.includes("## ")||j.includes("```")?"md":"txt"},R=async A=>{if(A.preventDefault(),!(!f.trim()&&m.length===0||x||s)){h(!0);try{await a(f.trim(),m),d(""),p([])}catch(j){console.error("Failed to send message:",j)}finally{h(!1)}}},B=A=>{A.key==="Enter"&&!A.shiftKey&&(A.preventDefault(),R(A))},C=(f.trim()||m.length>0)&&!x&&!s;return c.jsx("div",{className:`border-t flex-shrink-0 ${o}`,children:c.jsxs("div",{className:"p-4",children:[v&&c.jsx("div",{className:"mb-2 p-2 bg-green-100 text-green-800 text-sm rounded-md",children:v}),m.length>0&&c.jsx("div",{className:"mb-3",children:c.jsx(Zj,{attachments:m,onRemoveAttachment:M})}),c.jsxs("form",{onSubmit:R,className:"flex gap-2",children:[c.jsx("div",{className:"flex-1",children:c.jsx(qx,{ref:w,value:f,onChange:A=>d(A.target.value),onKeyDown:B,onPaste:E,placeholder:i,disabled:x||s,className:"min-h-[40px] max-h-32 resize-none",rows:1})}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx(Xj,{onFilesSelected:N,disabled:x||s,className:"shrink-0"}),c.jsx(Ve,{type:"submit",size:"icon",disabled:!C,className:"shrink-0 h-[40px]",children:c.jsx(XE,{className:"h-4 w-4"})})]})]})]})})}function Wj(a){return a.role==="assistant"&&!("mime_type"in a)}function Ij(a){return a.role==="tool"}function e_(a){return"mime_type"in a&&(a.role==="user"||a.role==="assistant")}function yg({message:a,isStreaming:s,className:i}){const[o,f]=y.useState(!1),d=a.content,m=1600,p=d.length>m&&!s,x=p&&!o?d.slice(0,m)+"...":d;return c.jsxs("div",{className:`whitespace-pre-wrap break-words ${i||""}`,children:[c.jsx("div",{className:o&&p?"max-h-96 overflow-y-auto":"",children:x}),s&&c.jsx("span",{className:"ml-1 inline-block h-2 w-2 animate-pulse rounded-full bg-current"}),p&&c.jsx("div",{className:"flex justify-end mt-1",children:c.jsx("button",{onClick:()=>f(!o),className:`inline-flex items-center gap-1 text-xs
                       bg-background/80 hover:bg-background border border-border/50 hover:border-border
                       text-muted-foreground hover:text-foreground
                       transition-colors cursor-pointer px-2 py-1 rounded`,children:o?c.jsxs(c.Fragment,{children:["less ",c.jsx(Zo,{className:"h-3 w-3"})]}):c.jsxs(c.Fragment,{children:[(d.length-m).toLocaleString()," more"," ",c.jsx(ka,{className:"h-3 w-3"})]})})})]})}function t_({message:a,className:s}){const[i,o]=y.useState(!1),[f,d]=y.useState(!1),m=a.mime_type.startsWith("image/"),p=a.mime_type==="application/pdf",x=a.mime_type.startsWith("audio/"),h=a.mime_type.startsWith("video/"),v=a.data?`data:${a.mime_type};base64,${a.data}`:a.media_url,b=a.metadata?.filename||"attachment";return m&&v&&!i?c.jsxs("div",{className:`my-2 ${s||""}`,children:[c.jsx("img",{src:v,alt:b,className:`rounded-lg border max-w-full transition-all cursor-pointer ${f?"max-h-none":"max-h-64"}`,onClick:()=>d(!f),onError:()=>o(!0)}),c.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:[a.mime_type," • ",b," • Click to ",f?"collapse":"expand"]}),a.content&&c.jsx("div",{className:"mt-2 text-sm",children:a.content})]}):c.jsxs("div",{className:`my-2 p-3 border rounded-lg bg-muted ${s||""}`,children:[c.jsxs("div",{className:"flex items-center gap-2",children:[p?c.jsx(Ku,{className:"h-4 w-4 text-red-500"}):x?c.jsx("div",{className:"h-4 w-4 rounded-full bg-green-500"}):h?c.jsx("div",{className:"h-4 w-4 rounded-sm bg-blue-500"}):c.jsx(Xu,{className:"h-4 w-4"}),c.jsx("span",{className:"text-sm font-medium",children:p?"PDF Document":x?"Audio File":h?"Video File":"File Attachment"}),c.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",a.mime_type,")"]})]}),a.content&&c.jsx("div",{className:"mt-2 text-sm",children:a.content}),v&&c.jsxs(Ve,{variant:"outline",size:"sm",className:"mt-2",onClick:()=>{const w=document.createElement("a");w.href=v,w.download=b,w.click()},children:[c.jsx(Xu,{className:"h-3 w-3 mr-1"}),"Download ",b]})]})}function n_({message:a}){const[s,i]=y.useState(!1);return!a.tool_calls||a.tool_calls.length===0?null:c.jsx("div",{className:"my-2 space-y-2",children:a.tool_calls.map((o,f)=>{let d;try{d=typeof o.parameters=="string"?JSON.parse(o.parameters):o.parameters}catch{d=o.parameters}return c.jsxs("div",{className:"p-3 border rounded-lg bg-blue-50",children:[c.jsxs("div",{className:"flex items-center gap-2 cursor-pointer",onClick:()=>i(!s),children:[c.jsx(ix,{className:"h-4 w-4 text-blue-600"}),c.jsxs("span",{className:"text-sm font-medium text-blue-800",children:["Tool Call: ",o.tool_name]}),c.jsx("span",{className:"text-xs text-blue-600",children:s?"▼":"▶"})]}),s&&c.jsxs("div",{className:"mt-2 text-xs font-mono bg-white p-2 rounded border",children:[c.jsx("div",{className:"text-blue-600 mb-1",children:"Parameters:"}),c.jsx("pre",{className:"whitespace-pre-wrap",children:JSON.stringify(d,null,2)})]})]},f)})})}function a_({message:a,className:s}){const[i,o]=y.useState(!1);return c.jsxs("div",{className:`my-2 p-3 border rounded-lg ${a.success?"bg-green-50":"bg-red-50"} ${s||""}`,children:[c.jsxs("div",{className:"flex items-center gap-2 cursor-pointer",onClick:()=>o(!i),children:[a.success?c.jsx(ix,{className:"h-4 w-4 text-green-600"}):c.jsx(Ca,{className:"h-4 w-4 text-red-600"}),c.jsxs("span",{className:`text-sm font-medium ${a.success?"text-green-800":"text-red-800"}`,children:["Tool Result: ",a.tool_name," ",a.success?"✓":"✗"]}),c.jsx("span",{className:`text-xs ${a.success?"text-green-600":"text-red-600"}`,children:i?"▼":"▶"})]}),i&&c.jsx("div",{className:"mt-2 text-xs font-mono bg-white p-2 rounded border",children:a.error?c.jsxs("div",{className:"text-red-700",children:["Error: ",a.error]}):c.jsx("pre",{className:"whitespace-pre-wrap",children:a.content})})]})}function l_({message:a,isStreaming:s,className:i}){return e_(a)?c.jsx("div",{children:c.jsx(t_,{message:a,isStreaming:s,className:i})}):Wj(a)&&a.tool_calls?c.jsxs("div",{children:[a.content&&c.jsx(yg,{message:a,isStreaming:s,className:i}),c.jsx(n_,{message:a,className:i})]}):Ij(a)?c.jsx(a_,{message:a,className:i}):c.jsx(yg,{message:a,isStreaming:s,className:i})}function s_({message:a,isStreaming:s=!1,className:i}){return c.jsx(l_,{message:a,isStreaming:s,className:i})}async function r_(a){return new Promise((s,i)=>{const o=new FileReader;o.onload=()=>{const d=o.result.split(",")[1];s(d)},o.onerror=i,o.readAsDataURL(a)})}async function o_(a,s,i="user"){const o=await r_(s);return{role:"user",content:a||`Uploaded ${s.type} file: ${s.name}`,source:i,mime_type:s.type||"application/octet-stream",data:o,metadata:{filename:s.name,size:s.size,lastModified:s.lastModified}}}function i_({message:a,isStreaming:s,usage:i}){const o=a.role==="user",f=o?Qu:Bt,d=!o&&a.source&&a.source!=="user";return c.jsxs("div",{className:`flex gap-3 ${o?"flex-row-reverse":""}`,children:[c.jsx("div",{className:`flex h-8 w-8 shrink-0 select-none items-center justify-center rounded-md border ${o?"bg-primary text-primary-foreground":"bg-muted"}`,children:c.jsx(f,{className:"h-4 w-4"})}),c.jsxs("div",{className:`flex flex-col space-y-1 ${o?"items-end":"items-start"} max-w-[80%]`,children:[d&&c.jsx("div",{className:"text-xs font-medium text-muted-foreground px-1",children:a.source}),c.jsx("div",{className:`rounded px-3 py-2 text-sm ${o?"bg-primary text-primary-foreground":"bg-muted"}`,children:c.jsx(s_,{message:a,isStreaming:s})}),!o&&i&&c.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground px-1",children:[c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx(vf,{className:"h-3 w-3"}),c.jsx("span",{children:i.tokens_input.toLocaleString()})]}),c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx(gf,{className:"h-3 w-3"}),c.jsx("span",{children:i.tokens_output.toLocaleString()})]})]})]})]})}function c_(){return c.jsxs("div",{className:"flex gap-3",children:[c.jsx("div",{className:"flex h-8 w-8 shrink-0 select-none items-center justify-center rounded-md border bg-muted",children:c.jsx(Bt,{className:"h-4 w-4"})}),c.jsx("div",{className:"flex items-center space-x-1 rounded bg-muted px-3 py-2",children:c.jsxs("div",{className:"flex space-x-1",children:[c.jsx("div",{className:"h-2 w-2 animate-bounce rounded-full bg-current [animation-delay:-0.3s]"}),c.jsx("div",{className:"h-2 w-2 animate-bounce rounded-full bg-current [animation-delay:-0.15s]"}),c.jsx("div",{className:"h-2 w-2 animate-bounce rounded-full bg-current"})]})})]})}function Gx({messages:a,onSendMessage:s,onClearMessages:i,onStop:o,isStreaming:f,placeholder:d="Type a message...",emptyStateTitle:m="Start a conversation",emptyStateDescription:p="Type a message below to begin",emptyStateCustom:x,beforeInput:h,messageUsage:v,sessionTotalUsage:b}){const[w,N]=y.useState(!1),M=y.useRef(null),E=y.useRef(null);y.useEffect(()=>{E.current?.scrollIntoView({behavior:"smooth"})},[a,f]);const D=async(R,B)=>{if(!(!R.trim()&&B.length===0||w||f)){N(!0);try{const C=[];if(B.length>0)for(const A of B){const j=await o_(R||`Uploaded ${A.file.name}`,A.file,"user");C.push(j)}else if(R.trim()){const A={role:"user",content:R.trim(),source:"user"};C.push(A)}await s(C)}catch(C){console.error("Failed to send message:",C)}finally{N(!1)}}};return c.jsxs("div",{className:"flex h-full flex-col",children:[c.jsx(ra,{className:"flex-1 min-h-0 p-4 overflow-auto",ref:M,children:c.jsxs("div",{className:"space-y-4",children:[a.length===0?x||c.jsxs("div",{className:"flex flex-col items-center justify-center h-32 text-center",children:[c.jsx("div",{className:"text-muted-foreground text-sm",children:m}),c.jsx("div",{className:"text-xs text-muted-foreground mt-1",children:p})]}):c.jsxs(c.Fragment,{children:[a.map((R,B)=>{const C=B===a.length-1,A=f&&C&&R.role==="assistant",j=R.usage||v?.get(B);return c.jsx(i_,{message:R,isStreaming:A,usage:j},B)}),f&&c.jsx(c_,{})]}),c.jsx("div",{ref:E})]})}),(a.length>0||f)&&c.jsxs("div",{className:"px-4 py-2 border-t flex gap-2",children:[f&&o&&c.jsxs(Ve,{variant:"destructive",size:"sm",onClick:o,className:"gap-1",children:[c.jsx(Oo,{className:"h-3 w-3"}),"Stop"]}),a.length>0&&c.jsxs(Ve,{variant:"outline",size:"sm",onClick:i,disabled:f,className:"gap-1",children:[c.jsx(Po,{className:"h-3 w-3"}),"Clear Chat"]})]}),h,c.jsx(Jj,{onSendMessage:D,disabled:w||f,placeholder:d})]})}const u_="";class f_{baseUrl;constructor(s=u_){this.baseUrl=s}async request(s,i={}){const o=`${this.baseUrl}${s}`,f=await fetch(o,{headers:{"Content-Type":"application/json",...i.headers},...i});if(!f.ok)throw new Error(`API request failed: ${f.status} ${f.statusText}`);return f.json()}async getHealth(){return this.request("/api/health")}async getEntities(){return this.request("/api/entities")}async getEntity(s){return this.request(`/api/entities/${s}`)}async deleteEntity(s){return this.request(`/api/entities/${s}`,{method:"DELETE"})}async addExample(s){return this.request("/api/entities/add",{method:"POST",body:JSON.stringify(s)})}async getAgents(){return(await this.getEntities()).filter(i=>i.type==="agent")}async getOrchestrators(){return(await this.getEntities()).filter(i=>i.type==="orchestrator")}async getWorkflows(){return(await this.getEntities()).filter(i=>i.type==="workflow")}async getSessions(s){const i=s?`?entity_id=${encodeURIComponent(s)}`:"";return this.request(`/api/sessions${i}`)}async getOrCreateSession(s,i="agent"){const o=await this.getSessions(s);return o.length>0?o[0]:this.createSession(s,i)}async createSession(s,i="agent"){return this.request("/api/sessions",{method:"POST",body:JSON.stringify({entity_id:s,entity_type:i})})}async getSession(s){return this.request(`/api/sessions/${s}`)}async getSessionMessages(s){return this.request(`/api/sessions/${s}/messages`)}async deleteSession(s){return this.request(`/api/sessions/${s}`,{method:"DELETE"})}async*streamEntityExecution(s,i,o){const f=`/api/entities/${s}/run/stream`,d=await fetch(`${this.baseUrl}${f}`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream"},body:JSON.stringify(i),signal:o});if(!d.ok)throw new Error(`Streaming request failed: ${d.status}`);const m=d.body?.getReader();if(!m)throw new Error("Response body is not readable");const p=new TextDecoder;let x="";try{for(;;){const{done:h,value:v}=await m.read();if(h)break;x+=p.decode(v,{stream:!0});const b=x.split(`
`);x=b.pop()||"";for(const w of b)if(w.startsWith("data: "))try{const N=JSON.parse(w.slice(6)),M=N.event;let E;M.role?E={type:"message",data:M,session_id:N.session_id,timestamp:N.timestamp}:M.content!==void 0&&M.is_complete!==void 0?E={type:"token_chunk",data:M,session_id:N.session_id,timestamp:N.timestamp}:M.event_type?E={type:M.event_type,data:M,session_id:N.session_id,timestamp:N.timestamp}:M.messages&&M.usage?E={type:"complete",data:M,session_id:N.session_id,timestamp:N.timestamp}:E={type:"unknown",data:M,session_id:N.session_id,timestamp:N.timestamp},yield E}catch(N){console.error("Failed to parse SSE event:",N)}}}finally{m.releaseLock()}}async runEntity(s,i){return this.request(`/api/entities/${s}/run`,{method:"POST",body:JSON.stringify(i)})}async clearCache(){return this.request("/api/cache/clear",{method:"POST"})}async getStats(){return this.request("/api/stats")}}const Mt=new f_;function Yx({entityId:a,currentSessionId:s,onSessionChange:i}){const[o,f]=y.useState([]),[d,m]=y.useState(!1),[p,x]=y.useState(!1),h=async()=>{m(!0);try{const E=await Mt.getSessions(a);f(E)}catch(E){console.error("Failed to load sessions:",E)}finally{m(!1)}};y.useEffect(()=>{(p||s)&&h()},[p,a,s]);const v=async()=>{try{const E=await Mt.createSession(a,"agent");await h(),i(E.id),x(!1)}catch(E){console.error("Failed to create new session:",E),i(void 0),x(!1)}},b=E=>{i(E),x(!1)},w=async(E,D)=>{D.stopPropagation();try{await Mt.deleteSession(E),f(o.filter(R=>R.id!==E)),s===E&&i(void 0)}catch(R){console.error("Failed to delete session:",R)}},N=E=>{const D=new Date(E),B=new Date().getTime()-D.getTime(),C=Math.floor(B/6e4);return C<1?"Just now":C<60?`${C}m ago`:C<1440?`${Math.floor(C/60)}h ago`:D.toLocaleDateString()},M=o.find(E=>E.id===s);return c.jsxs(bf,{open:p,onOpenChange:x,children:[c.jsx(Sf,{asChild:!0,children:c.jsxs(Ve,{variant:"outline",className:"gap-2",children:[c.jsx(Al,{className:"h-4 w-4"}),M?c.jsxs("span",{className:"max-w-[150px] truncate",children:["Session (",M.message_count," msgs)"]}):c.jsx("span",{children:"New Session"}),c.jsx(ka,{className:"h-4 w-4 opacity-50"})]})}),c.jsxs(wf,{align:"end",className:"w-80",children:[c.jsxs(Eo,{className:"flex items-center justify-between",children:[c.jsx("span",{children:"Conversation Sessions"}),c.jsxs(Ve,{variant:"ghost",size:"sm",onClick:v,className:"h-7 gap-1",children:[c.jsx(YE,{className:"h-3 w-3"}),"New"]})]}),c.jsx(jo,{}),d?c.jsx("div",{className:"px-2 py-8 text-center text-sm text-muted-foreground",children:"Loading sessions..."}):o.length===0?c.jsxs("div",{className:"px-2 py-8 text-center",children:[c.jsx(Al,{className:"h-8 w-8 mx-auto mb-2 text-muted-foreground"}),c.jsx("div",{className:"text-sm text-muted-foreground",children:"No sessions yet"}),c.jsx("div",{className:"text-xs text-muted-foreground mt-1",children:"Start a conversation to create one"})]}):c.jsx(ra,{className:"max-h-[300px]",children:o.map(E=>c.jsx(Ta,{onClick:()=>b(E.id),className:`px-3 py-2 cursor-pointer ${s===E.id?"bg-accent":""}`,children:c.jsxs("div",{className:"flex items-start justify-between w-full gap-2",children:[c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsxs(je,{variant:"outline",className:"text-xs px-1.5 py-0",children:[E.message_count," msgs"]}),s===E.id&&c.jsx(je,{variant:"default",className:"text-xs px-1.5 py-0",children:"Active"})]}),c.jsxs("div",{className:"flex items-center gap-1 mt-1 text-xs text-muted-foreground",children:[c.jsx(Xs,{className:"h-3 w-3"}),N(E.last_activity)]}),c.jsxs("div",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:[E.id.slice(0,8),"..."]})]}),c.jsx(Ve,{variant:"ghost",size:"sm",onClick:D=>w(E.id,D),className:"h-7 w-7 p-0 hover:bg-destructive hover:text-destructive-foreground",children:c.jsx(Po,{className:"h-3 w-3"})})]})},E.id))})]})]})}function d_({request:a,onApprove:s,onReject:i}){const[o,f]=y.useState(""),[d,m]=y.useState(!1);if(!a)return null;const p=h=>{h.preventDefault();const v={request_id:a.request_id,tool_call_id:a.tool_call_id,approved:!0,reason:o||void 0};console.log("✅ Approval response created:",v),s(v),f(""),m(!1)},x=h=>{h.preventDefault(),i({request_id:a.request_id,tool_call_id:a.tool_call_id,approved:!1,reason:o||"User rejected"}),f(""),m(!1)};return c.jsx("div",{className:"border-t border-amber-200 bg-amber-50 dark:bg-amber-950 dark:border-amber-800 animate-in slide-in-from-bottom-4 duration-300",children:c.jsxs("div",{className:"p-3 space-y-3",children:[c.jsxs("div",{className:"flex items-start justify-between gap-3",children:[c.jsxs("div",{className:"flex items-start gap-2 flex-1 min-w-0",children:[c.jsx(Ca,{className:"h-5 w-5 text-amber-600 dark:text-amber-500 shrink-0 mt-0.5"}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[c.jsx("span",{className:"font-medium text-sm",children:"Approval Required:"}),c.jsxs(je,{variant:"secondary",className:"text-xs",children:[c.jsx(Ma,{className:"h-3 w-3 mr-1"}),a.tool_name]})]}),a.reason&&c.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:a.reason})]})]}),c.jsxs("div",{className:"flex gap-2 shrink-0",children:[c.jsxs(Ve,{size:"sm",variant:"default",onClick:p,className:"gap-1.5",children:[c.jsx(Vs,{className:"h-3.5 w-3.5"}),"Approve"]}),c.jsxs(Ve,{size:"sm",variant:"destructive",onClick:x,className:"gap-1.5",children:[c.jsx(dE,{className:"h-3.5 w-3.5"}),"Reject"]})]})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsxs("button",{onClick:()=>m(!d),className:"flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[d?c.jsx(Zo,{className:"h-3.5 w-3.5"}):c.jsx(ka,{className:"h-3.5 w-3.5"}),d?"Hide":"Show"," parameters"]}),d&&c.jsxs("div",{className:"space-y-2",children:[c.jsxs("div",{className:"bg-background rounded-md p-2 border",children:[c.jsx("div",{className:"text-xs font-medium mb-1.5",children:"Parameters:"}),c.jsx("pre",{className:"text-xs font-mono overflow-x-auto",children:JSON.stringify(a.parameters,null,2)})]}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("label",{className:"text-xs font-medium",children:"Note (optional):"}),c.jsx("textarea",{className:"w-full min-h-[50px] px-2 py-1.5 text-xs border rounded-md resize-none focus:outline-none focus:ring-2 focus:ring-ring",placeholder:"Add a note about your decision...",value:o,onChange:h=>f(h.target.value)})]})]})]})]})})}function jn({className:a,...s}){return c.jsx("div",{"data-slot":"card",className:Xe("bg-card text-card-foreground flex flex-col gap-6 rounded border py-6 shadow-sm",a),...s})}function yo({className:a,...s}){return c.jsx("div",{"data-slot":"card-header",className:Xe("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",a),...s})}function bo({className:a,...s}){return c.jsx("div",{"data-slot":"card-title",className:Xe("leading-none font-semibold",a),...s})}function aa({className:a,...s}){return c.jsx("div",{"data-slot":"card-content",className:Xe("px-6",a),...s})}const Vx=({tasks:a,onTaskClick:s,entityName:i})=>!a||a.length===0?null:c.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[c.jsx(ZE,{className:"w-12 h-12 mb-4 text-primary"}),c.jsx("h3",{className:"text-xl font-semibold mb-2",children:"Try these example tasks"}),c.jsxs("p",{className:"text-muted-foreground mb-6 text-center",children:["Click any example to get started with ",i]}),c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 max-w-3xl w-full",children:a.map((o,f)=>c.jsx(jn,{className:"cursor-pointer hover:border-primary hover:shadow-lg transition-all",onClick:()=>s(o),children:c.jsx(aa,{className:"p-4",children:c.jsx("p",{className:"text-sm",children:o})})},f))})]});function m_({open:a,onOpenChange:s,children:i}){return a?c.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",onClick:()=>s(!1),children:[c.jsx("div",{className:"absolute inset-0 bg-black/70 backdrop-blur-sm"}),c.jsx("div",{className:"relative z-10 bg-card rounded-lg shadow-2xl border-2 border-border max-h-[90vh] overflow-hidden",onClick:o=>o.stopPropagation(),children:i})]}):null}function h_({children:a,className:s}){return c.jsx("div",{className:s||"overflow-auto max-h-[90vh]",children:a})}function p_({children:a,onClose:s,className:i}){return c.jsxs("div",{className:i||"sticky top-0 bg-background border-b px-6 py-4 flex items-center justify-between z-10",children:[a,s&&c.jsx(Ve,{variant:"ghost",size:"sm",onClick:s,children:c.jsx(ij,{className:"h-4 w-4"})})]})}function g_({children:a,className:s}){return c.jsx("h2",{className:s||"text-lg font-semibold",children:a})}function v_(a){const s=y.useRef({value:a,previous:a});return y.useMemo(()=>(s.current.value!==a&&(s.current.previous=s.current.value,s.current.value=a),s.current.previous),[a])}var Xx=["PageUp","PageDown"],Kx=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Qx={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Ul="Slider",[Zu,x_,y_]=Iu(Ul),[Zx,nM]=oa(Ul,[y_]),[b_,Wo]=Zx(Ul),Px=y.forwardRef((a,s)=>{const{name:i,min:o=0,max:f=100,step:d=1,orientation:m="horizontal",disabled:p=!1,minStepsBetweenThumbs:x=0,defaultValue:h=[o],value:v,onValueChange:b=()=>{},onValueCommit:w=()=>{},inverted:N=!1,form:M,...E}=a,D=y.useRef(new Set),R=y.useRef(0),C=m==="horizontal"?S_:w_,[A=[],j]=Lo({prop:v,defaultProp:h,onChange:I=>{[...D.current][R.current]?.focus(),b(I)}}),L=y.useRef(A);function q(I){const ae=M_(A,I);ee(I,ae)}function X(I){ee(I,R.current)}function F(){const I=L.current[R.current];A[R.current]!==I&&w(A)}function ee(I,ae,{commit:pe}={commit:!1}){const ge=R_(d),oe=D_(Math.round((I-o)/d)*d+o,ge),k=jf(oe,[o,f]);j((K=[])=>{const Y=j_(K,k,ae);if(C_(Y,x*d)){R.current=Y.indexOf(k);const W=String(Y)!==String(K);return W&&pe&&w(Y),W?Y:K}else return K})}return c.jsx(b_,{scope:a.__scopeSlider,name:i,disabled:p,min:o,max:f,valueIndexToChangeRef:R,thumbs:D.current,values:A,orientation:m,form:M,children:c.jsx(Zu.Provider,{scope:a.__scopeSlider,children:c.jsx(Zu.Slot,{scope:a.__scopeSlider,children:c.jsx(C,{"aria-disabled":p,"data-disabled":p?"":void 0,...E,ref:s,onPointerDown:me(E.onPointerDown,()=>{p||(L.current=A)}),min:o,max:f,inverted:N,onSlideStart:p?void 0:q,onSlideMove:p?void 0:X,onSlideEnd:p?void 0:F,onHomeKeyDown:()=>!p&&ee(o,0,{commit:!0}),onEndKeyDown:()=>!p&&ee(f,A.length-1,{commit:!0}),onStepKeyDown:({event:I,direction:ae})=>{if(!p){const oe=Xx.includes(I.key)||I.shiftKey&&Kx.includes(I.key)?10:1,k=R.current,K=A[k],Y=d*oe*ae;ee(K+Y,k,{commit:!0})}}})})})})});Px.displayName=Ul;var[$x,Fx]=Zx(Ul,{startEdge:"left",endEdge:"right",size:"width",direction:1}),S_=y.forwardRef((a,s)=>{const{min:i,max:o,dir:f,inverted:d,onSlideStart:m,onSlideMove:p,onSlideEnd:x,onStepKeyDown:h,...v}=a,[b,w]=y.useState(null),N=He(s,C=>w(C)),M=y.useRef(void 0),E=Ks(f),D=E==="ltr",R=D&&!d||!D&&d;function B(C){const A=M.current||b.getBoundingClientRect(),j=[0,A.width],q=Df(j,R?[i,o]:[o,i]);return M.current=A,q(C-A.left)}return c.jsx($x,{scope:a.__scopeSlider,startEdge:R?"left":"right",endEdge:R?"right":"left",direction:R?1:-1,size:"width",children:c.jsx(Jx,{dir:E,"data-orientation":"horizontal",...v,ref:N,style:{...v.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:C=>{const A=B(C.clientX);m?.(A)},onSlideMove:C=>{const A=B(C.clientX);p?.(A)},onSlideEnd:()=>{M.current=void 0,x?.()},onStepKeyDown:C=>{const j=Qx[R?"from-left":"from-right"].includes(C.key);h?.({event:C,direction:j?-1:1})}})})}),w_=y.forwardRef((a,s)=>{const{min:i,max:o,inverted:f,onSlideStart:d,onSlideMove:m,onSlideEnd:p,onStepKeyDown:x,...h}=a,v=y.useRef(null),b=He(s,v),w=y.useRef(void 0),N=!f;function M(E){const D=w.current||v.current.getBoundingClientRect(),R=[0,D.height],C=Df(R,N?[o,i]:[i,o]);return w.current=D,C(E-D.top)}return c.jsx($x,{scope:a.__scopeSlider,startEdge:N?"bottom":"top",endEdge:N?"top":"bottom",size:"height",direction:N?1:-1,children:c.jsx(Jx,{"data-orientation":"vertical",...h,ref:b,style:{...h.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:E=>{const D=M(E.clientY);d?.(D)},onSlideMove:E=>{const D=M(E.clientY);m?.(D)},onSlideEnd:()=>{w.current=void 0,p?.()},onStepKeyDown:E=>{const R=Qx[N?"from-bottom":"from-top"].includes(E.key);x?.({event:E,direction:R?-1:1})}})})}),Jx=y.forwardRef((a,s)=>{const{__scopeSlider:i,onSlideStart:o,onSlideMove:f,onSlideEnd:d,onHomeKeyDown:m,onEndKeyDown:p,onStepKeyDown:x,...h}=a,v=Wo(Ul,i);return c.jsx(Ce.span,{...h,ref:s,onKeyDown:me(a.onKeyDown,b=>{b.key==="Home"?(m(b),b.preventDefault()):b.key==="End"?(p(b),b.preventDefault()):Xx.concat(Kx).includes(b.key)&&(x(b),b.preventDefault())}),onPointerDown:me(a.onPointerDown,b=>{const w=b.target;w.setPointerCapture(b.pointerId),b.preventDefault(),v.thumbs.has(w)?w.focus():o(b)}),onPointerMove:me(a.onPointerMove,b=>{b.target.hasPointerCapture(b.pointerId)&&f(b)}),onPointerUp:me(a.onPointerUp,b=>{const w=b.target;w.hasPointerCapture(b.pointerId)&&(w.releasePointerCapture(b.pointerId),d(b))})})}),Wx="SliderTrack",Ix=y.forwardRef((a,s)=>{const{__scopeSlider:i,...o}=a,f=Wo(Wx,i);return c.jsx(Ce.span,{"data-disabled":f.disabled?"":void 0,"data-orientation":f.orientation,...o,ref:s})});Ix.displayName=Wx;var Pu="SliderRange",ey=y.forwardRef((a,s)=>{const{__scopeSlider:i,...o}=a,f=Wo(Pu,i),d=Fx(Pu,i),m=y.useRef(null),p=He(s,m),x=f.values.length,h=f.values.map(w=>ay(w,f.min,f.max)),v=x>1?Math.min(...h):0,b=100-Math.max(...h);return c.jsx(Ce.span,{"data-orientation":f.orientation,"data-disabled":f.disabled?"":void 0,...o,ref:p,style:{...a.style,[d.startEdge]:v+"%",[d.endEdge]:b+"%"}})});ey.displayName=Pu;var $u="SliderThumb",ty=y.forwardRef((a,s)=>{const i=x_(a.__scopeSlider),[o,f]=y.useState(null),d=He(s,p=>f(p)),m=y.useMemo(()=>o?i().findIndex(p=>p.ref.current===o):-1,[i,o]);return c.jsx(N_,{...a,ref:d,index:m})}),N_=y.forwardRef((a,s)=>{const{__scopeSlider:i,index:o,name:f,...d}=a,m=Wo($u,i),p=Fx($u,i),[x,h]=y.useState(null),v=He(s,B=>h(B)),b=x?m.form||!!x.closest("form"):!0,w=ev(x),N=m.values[o],M=N===void 0?0:ay(N,m.min,m.max),E=__(o,m.values.length),D=w?.[p.size],R=D?T_(D,M,p.direction):0;return y.useEffect(()=>{if(x)return m.thumbs.add(x),()=>{m.thumbs.delete(x)}},[x,m.thumbs]),c.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[p.startEdge]:`calc(${M}% + ${R}px)`},children:[c.jsx(Zu.ItemSlot,{scope:a.__scopeSlider,children:c.jsx(Ce.span,{role:"slider","aria-label":a["aria-label"]||E,"aria-valuemin":m.min,"aria-valuenow":N,"aria-valuemax":m.max,"aria-orientation":m.orientation,"data-orientation":m.orientation,"data-disabled":m.disabled?"":void 0,tabIndex:m.disabled?void 0:0,...d,ref:v,style:N===void 0?{display:"none"}:a.style,onFocus:me(a.onFocus,()=>{m.valueIndexToChangeRef.current=o})})}),b&&c.jsx(ny,{name:f??(m.name?m.name+(m.values.length>1?"[]":""):void 0),form:m.form,value:N},o)]})});ty.displayName=$u;var E_="RadioBubbleInput",ny=y.forwardRef(({__scopeSlider:a,value:s,...i},o)=>{const f=y.useRef(null),d=He(f,o),m=v_(s);return y.useEffect(()=>{const p=f.current;if(!p)return;const x=window.HTMLInputElement.prototype,v=Object.getOwnPropertyDescriptor(x,"value").set;if(m!==s&&v){const b=new Event("input",{bubbles:!0});v.call(p,s),p.dispatchEvent(b)}},[m,s]),c.jsx(Ce.input,{style:{display:"none"},...i,ref:d,defaultValue:s})});ny.displayName=E_;function j_(a=[],s,i){const o=[...a];return o[i]=s,o.sort((f,d)=>f-d)}function ay(a,s,i){const d=100/(i-s)*(a-s);return jf(d,[0,100])}function __(a,s){return s>2?`Value ${a+1} of ${s}`:s===2?["Minimum","Maximum"][a]:void 0}function M_(a,s){if(a.length===1)return 0;const i=a.map(f=>Math.abs(f-s)),o=Math.min(...i);return i.indexOf(o)}function T_(a,s,i){const o=a/2,d=Df([0,50],[0,o]);return(o-d(s)*i)*i}function A_(a){return a.slice(0,-1).map((s,i)=>a[i+1]-s)}function C_(a,s){if(s>0){const i=A_(a);return Math.min(...i)>=s}return!0}function Df(a,s){return i=>{if(a[0]===a[1]||s[0]===s[1])return s[0];const o=(s[1]-s[0])/(a[1]-a[0]);return s[0]+o*(i-a[0])}}function R_(a){return(String(a).split(".")[1]||"").length}function D_(a,s){const i=Math.pow(10,s);return Math.round(a*i)/i}var ly=Px,O_=Ix,k_=ey,z_=ty;const sy=y.forwardRef(({className:a,...s},i)=>c.jsxs(ly,{ref:i,className:Xe("relative flex w-full touch-none select-none items-center",a),...s,children:[c.jsx(O_,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:c.jsx(k_,{className:"absolute h-full bg-primary"})}),c.jsx(z_,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})]}));sy.displayName=ly.displayName;const U_=a=>Math.ceil(a.length/4);function ry({messages:a,isOpen:s,onClose:i}){const[o,f]=y.useState(a.length-1),d=y.useMemo(()=>{let h=0;return a.map(v=>{let b=0;if(v.content&&(b+=U_(v.content)),v.role==="assistant"&&v.tool_calls){const w=v.tool_calls;b+=w.length*50}return h+=b,{...v,estimatedTokens:b,cumulativeTokens:h}})},[a]),m=y.useMemo(()=>{const h=d.filter(C=>C.role==="user"),v=d.filter(C=>C.role==="assistant"),b=d.filter(C=>C.role==="tool"),w=h.reduce((C,A)=>C+(A.estimatedTokens||0),0),N=v.reduce((C,A)=>C+(A.estimatedTokens||0),0),M=b.reduce((C,A)=>C+(A.estimatedTokens||0),0),E=v.reduce((C,A)=>{const j=A.usage;return C+(j?.tokens_input||0)},0),D=v.reduce((C,A)=>{const j=A.usage;return C+(j?.tokens_output||0)},0),R=v.reduce((C,A)=>{const j=A.tool_calls;return C+(j?.length||0)},0),B=w+N+M;return{totalMessages:d.length,userMessages:h.length,assistantMessages:v.length,toolMessages:b.length,userTokens:w,assistantTokens:N,toolTokens:M,totalEstimated:B,actualTokensInput:E,actualTokensOutput:D,toolCalls:R}},[d]),p=y.useMemo(()=>d.slice(0,o+1),[d,o]),x=y.useMemo(()=>p.reduce((h,v)=>h+(v.estimatedTokens||0),0),[p]);return c.jsx(m_,{open:s,onOpenChange:i,children:c.jsxs(h_,{className:"max-w-6xl max-h-[90vh] p-0",children:[c.jsxs(p_,{className:"p-6 pb-4",onClose:i,children:[c.jsxs(g_,{className:"flex items-center gap-2",children:[c.jsx(xf,{className:"h-5 w-5"}),"Context Inspector"]}),c.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:"Understand what goes into your agent's context window and how tokens are distributed"})]}),c.jsxs(Hx,{defaultValue:"timeline",className:"flex-1",children:[c.jsx("div",{className:"px-6",children:c.jsxs(Rf,{className:"grid w-full grid-cols-3",children:[c.jsxs(_l,{value:"timeline",className:"gap-2",children:[c.jsx(Al,{className:"h-4 w-4"}),"Timeline"]}),c.jsxs(_l,{value:"stats",className:"gap-2",children:[c.jsx(IN,{className:"h-4 w-4"}),"Statistics"]}),c.jsxs(_l,{value:"turn-by-turn",className:"gap-2",children:[c.jsx(yf,{className:"h-4 w-4"}),"Turn-by-Turn"]})]})}),c.jsxs(ra,{className:"h-[60vh] mt-4",children:[c.jsx(Ml,{value:"timeline",className:"px-6 pb-6 mt-0",children:c.jsx("div",{className:"space-y-3",children:d.map((h,v)=>{const b=h.usage;return c.jsx("div",{className:`border rounded-lg p-4 ${h.role==="user"?"bg-blue-50 dark:bg-blue-950/20 border-blue-200 dark:border-blue-900":h.role==="assistant"?"bg-green-50 dark:bg-green-950/20 border-green-200 dark:border-green-900":h.role==="tool"?"bg-orange-50 dark:bg-orange-950/20 border-orange-200 dark:border-orange-900":"bg-gray-50 dark:bg-gray-950/20 border-gray-200 dark:border-gray-900"}`,children:c.jsxs("div",{className:"flex items-start justify-between gap-4",children:[c.jsxs("div",{className:"flex items-start gap-3 flex-1 min-w-0",children:[c.jsxs("div",{className:"mt-1",children:[h.role==="user"&&c.jsx(Qu,{className:"h-4 w-4 text-blue-600"}),h.role==="assistant"&&c.jsx(Bt,{className:"h-4 w-4 text-green-600"}),h.role==="tool"&&c.jsx(Ma,{className:"h-4 w-4 text-orange-600"})]}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[c.jsx(je,{variant:"outline",className:"text-xs",children:h.role}),h.role==="tool"&&h.tool_name&&c.jsx(je,{variant:"secondary",className:"text-xs",children:h.tool_name}),c.jsxs("span",{className:"text-xs text-muted-foreground",children:["#",v+1]})]}),c.jsxs("p",{className:"text-sm break-words whitespace-pre-wrap",children:[h.content.slice(0,200),h.content.length>200&&"..."]}),h.role==="assistant"&&h.tool_calls&&c.jsx("div",{className:"mt-2 flex flex-wrap gap-1",children:h.tool_calls.map((w,N)=>c.jsxs(je,{variant:"outline",className:"text-xs",children:[c.jsx(Ma,{className:"h-3 w-3 mr-1"}),w.tool_name]},N))})]})]}),c.jsxs("div",{className:"flex flex-col items-end gap-1 text-xs",children:[c.jsxs(je,{variant:"secondary",className:"font-mono",children:["~",h.estimatedTokens," tokens"]}),b&&c.jsxs(c.Fragment,{children:[c.jsxs(je,{className:"font-mono bg-blue-600",children:["In: ",b.tokens_input]}),c.jsxs(je,{className:"font-mono bg-green-600",children:["Out: ",b.tokens_output]})]}),c.jsxs("span",{className:"text-muted-foreground",children:["Σ ",h.cumulativeTokens]})]})]})},v)})})}),c.jsx(Ml,{value:"stats",className:"px-6 pb-6 mt-0",children:c.jsxs("div",{className:"grid grid-cols-2 gap-6",children:[c.jsxs("div",{className:"space-y-4",children:[c.jsx("h3",{className:"font-semibold text-sm",children:"Message Distribution"}),c.jsxs("div",{className:"space-y-3",children:[c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center justify-between mb-1",children:[c.jsxs("span",{className:"text-sm flex items-center gap-2",children:[c.jsx(Qu,{className:"h-4 w-4 text-blue-600"}),"User Messages"]}),c.jsx("span",{className:"text-sm font-mono",children:m.userMessages})]}),c.jsx("div",{className:"h-2 bg-gray-200 dark:bg-gray-800 rounded-full overflow-hidden",children:c.jsx("div",{className:"h-full bg-blue-600",style:{width:`${m.userMessages/m.totalMessages*100}%`}})})]}),c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center justify-between mb-1",children:[c.jsxs("span",{className:"text-sm flex items-center gap-2",children:[c.jsx(Bt,{className:"h-4 w-4 text-green-600"}),"Assistant Messages"]}),c.jsx("span",{className:"text-sm font-mono",children:m.assistantMessages})]}),c.jsx("div",{className:"h-2 bg-gray-200 dark:bg-gray-800 rounded-full overflow-hidden",children:c.jsx("div",{className:"h-full bg-green-600",style:{width:`${m.assistantMessages/m.totalMessages*100}%`}})})]}),c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center justify-between mb-1",children:[c.jsxs("span",{className:"text-sm flex items-center gap-2",children:[c.jsx(Ma,{className:"h-4 w-4 text-orange-600"}),"Tool Results"]}),c.jsx("span",{className:"text-sm font-mono",children:m.toolMessages})]}),c.jsx("div",{className:"h-2 bg-gray-200 dark:bg-gray-800 rounded-full overflow-hidden",children:c.jsx("div",{className:"h-full bg-orange-600",style:{width:`${m.toolMessages/m.totalMessages*100}%`}})})]})]})]}),c.jsxs("div",{className:"space-y-4",children:[c.jsx("h3",{className:"font-semibold text-sm",children:"Estimated Token Distribution"}),c.jsxs("div",{className:"space-y-3",children:[c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center justify-between mb-1",children:[c.jsx("span",{className:"text-sm",children:"User Content"}),c.jsxs("span",{className:"text-sm font-mono",children:["~",m.userTokens]})]}),c.jsx("div",{className:"h-2 bg-gray-200 dark:bg-gray-800 rounded-full overflow-hidden",children:c.jsx("div",{className:"h-full bg-blue-600",style:{width:`${m.userTokens/m.totalEstimated*100}%`}})})]}),c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center justify-between mb-1",children:[c.jsx("span",{className:"text-sm",children:"Assistant Content"}),c.jsxs("span",{className:"text-sm font-mono",children:["~",m.assistantTokens]})]}),c.jsx("div",{className:"h-2 bg-gray-200 dark:bg-gray-800 rounded-full overflow-hidden",children:c.jsx("div",{className:"h-full bg-green-600",style:{width:`${m.assistantTokens/m.totalEstimated*100}%`}})})]}),c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center justify-between mb-1",children:[c.jsx("span",{className:"text-sm",children:"Tool Results"}),c.jsxs("span",{className:"text-sm font-mono",children:["~",m.toolTokens]})]}),c.jsx("div",{className:"h-2 bg-gray-200 dark:bg-gray-800 rounded-full overflow-hidden",children:c.jsx("div",{className:"h-full bg-orange-600",style:{width:`${m.toolTokens/m.totalEstimated*100}%`}})})]})]})]}),c.jsxs("div",{className:"col-span-2 border rounded-lg p-4 bg-muted/50",children:[c.jsx("h3",{className:"font-semibold text-sm mb-3",children:"Actual LLM Token Usage"}),c.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[c.jsxs("div",{className:"text-center",children:[c.jsx("div",{className:"text-2xl font-bold text-blue-600",children:m.actualTokensInput.toLocaleString()}),c.jsx("div",{className:"text-xs text-muted-foreground mt-1",children:"Input Tokens"}),c.jsx("div",{className:"text-xs text-muted-foreground",children:"(Context sent to LLM)"})]}),c.jsxs("div",{className:"text-center",children:[c.jsx("div",{className:"text-2xl font-bold text-green-600",children:m.actualTokensOutput.toLocaleString()}),c.jsx("div",{className:"text-xs text-muted-foreground mt-1",children:"Output Tokens"}),c.jsx("div",{className:"text-xs text-muted-foreground",children:"(Generated by LLM)"})]}),c.jsxs("div",{className:"text-center",children:[c.jsx("div",{className:"text-2xl font-bold text-orange-600",children:m.toolCalls}),c.jsx("div",{className:"text-xs text-muted-foreground mt-1",children:"Tool Calls"}),c.jsx("div",{className:"text-xs text-muted-foreground",children:"(Functions invoked)"})]})]})]})]})}),c.jsx(Ml,{value:"turn-by-turn",className:"px-6 pb-6 mt-0",children:c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"space-y-3",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("h3",{className:"font-semibold text-sm",children:"Replay Conversation"}),c.jsxs(je,{variant:"secondary",children:["Turn ",o+1," of ",d.length]})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(sy,{value:[o],onValueChange:h=>f(h[0]),max:d.length-1,min:0,step:1,className:"w-full"}),c.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground",children:[c.jsx("span",{children:"Start"}),c.jsxs("span",{className:"font-mono",children:["Context: ",x.toLocaleString()," estimated tokens"]}),c.jsx("span",{children:"End"})]})]})]}),c.jsxs("div",{className:"border rounded-lg p-4 bg-muted/30",children:[c.jsxs("h4",{className:"font-semibold text-sm mb-3 flex items-center gap-2",children:[c.jsx(Xs,{className:"h-4 w-4"}),"Context at Turn ",o+1]}),c.jsx("div",{className:"space-y-2 max-h-[400px] overflow-y-auto",children:p.map((h,v)=>c.jsxs("div",{className:`text-xs p-2 rounded ${v===o?"ring-2 ring-primary":""} ${h.role==="user"?"bg-blue-100 dark:bg-blue-950/40":h.role==="assistant"?"bg-green-100 dark:bg-green-950/40":"bg-orange-100 dark:bg-orange-950/40"}`,children:[c.jsxs("div",{className:"font-mono font-semibold mb-1",children:[h.role.toUpperCase()," | ~",h.estimatedTokens," tokens"]}),c.jsxs("div",{className:"text-xs opacity-80",children:[h.content.slice(0,100),h.content.length>100&&"..."]})]},v))})]}),c.jsxs("div",{className:"grid grid-cols-2 gap-4 text-sm",children:[c.jsxs("div",{className:"border rounded-lg p-3",children:[c.jsx("div",{className:"text-muted-foreground mb-1",children:"Messages in Context"}),c.jsx("div",{className:"text-2xl font-bold",children:p.length})]}),c.jsxs("div",{className:"border rounded-lg p-3",children:[c.jsx("div",{className:"text-muted-foreground mb-1",children:"Estimated Tokens"}),c.jsx("div",{className:"text-2xl font-bold font-mono",children:x})]})]})]})})]})]})]})})}function oy(a){const{entityId:s,entityType:i,entityName:o,currentSession:f,onDebugEvent:d,onSessionChange:m,messageHandler:p,supportsToolApproval:x=!1,supportsTokenStreaming:h=!1}=a,[v,b]=y.useState([]),[w,N]=y.useState(!1),[M,E]=y.useState({tokens_input:0,tokens_output:0}),[D,R]=y.useState(null),[B,C]=y.useState([]),[A,j]=y.useState(null),L=y.useRef(null);y.useEffect(()=>{(async()=>{if(f)try{const pe=await Mt.getSessionMessages(f.id);b(pe.messages);const ge=pe.messages.reduce((oe,k)=>{if(k.role==="assistant"&&k.usage){const K=k.usage;return{tokens_input:oe.tokens_input+(K.tokens_input||0),tokens_output:oe.tokens_output+(K.tokens_output||0)}}return oe},{tokens_input:0,tokens_output:0});E(ge)}catch(pe){console.error("Failed to load session messages:",pe),b([]),E({tokens_input:0,tokens_output:0})}else b([]),E({tokens_input:0,tokens_output:0});R(null),C([])})()},[f?.id]);const q=y.useCallback(async(ae,pe)=>{b(oe=>[...oe,...ae]),N(!0),j(null),L.current=new AbortController;const ge=pe||(B.length>0?B:void 0);try{const oe={messages:ae,session_id:f?.id,stream_tokens:h,approval_responses:ge};ge&&C([]),p.reset();for await(const k of Mt.streamEntityExecution(s,oe,L.current.signal)){if(d(k),!f&&k.session_id&&m){const K={id:k.session_id,entity_id:s,entity_type:i,created_at:new Date().toISOString(),last_activity:new Date().toISOString(),message_count:0};m(K)}if(k.type==="agent_selection"&&k.data?.selected_agent?j(k.data.selected_agent):k.type==="agent_execution_complete"&&j(null),x&&k.type==="tool_approval"&&k.data?.approval_request&&R(k.data.approval_request),b(K=>p.handleEvent(k,K,o)),k.type==="complete"&&k.data?.usage){const K=k.data.usage;E(Y=>({tokens_input:Y.tokens_input+(K.tokens_input||0),tokens_output:Y.tokens_output+(K.tokens_output||0)}));break}}}catch(oe){if(console.error("Failed to send message:",oe),oe instanceof Error&&oe.name==="AbortError"){const k={role:"assistant",content:"Cancelled by user",source:"system"};b(K=>[...K.slice(0,-1),k])}else{const k={role:"assistant",content:`Error: ${oe instanceof Error?oe.message:"Unknown error"}`,source:"system"};b(K=>[...K.slice(0,-1),k])}}finally{N(!1),j(null),L.current=null}},[s,i,o,f,B,d,m,p,x,h]),X=y.useCallback(()=>{L.current&&(console.log(`🛑 Stopping ${i} execution`),L.current.abort())},[i]),F=y.useCallback(()=>{b([]),E({tokens_input:0,tokens_output:0}),j(null)},[]),ee=y.useCallback(ae=>{console.log("📝 handleApprove called with:",ae),R(null),q([],[ae])},[q]),I=y.useCallback(ae=>{console.log("📝 handleReject called with:",ae),R(null),q([],[ae])},[q]);return{messages:v,isStreaming:w,sessionTotalUsage:M,pendingApproval:D,currentAgentSpeaking:A,handleSendMessage:q,handleStop:X,handleClearMessages:F,handleApprove:ee,handleReject:I}}class L_{currentMessage=null;handleEvent(s,i,o){switch(s.type){case"token_chunk":if(s.data?.content)return this.currentMessage?(this.currentMessage={...this.currentMessage,content:this.currentMessage.content+s.data.content},[...i.slice(0,-1),this.currentMessage]):(this.currentMessage={role:"assistant",content:"",source:o},[...i,this.currentMessage]);break;case"message":if(s.data?.role==="assistant"&&s.data?.content)return this.currentMessage={role:"assistant",content:s.data.content,source:s.data.source||o},[...i.slice(0,-1),this.currentMessage];break;case"complete":if(s.data?.messages){const f=s.data.messages[s.data.messages.length-1];if(f?.role==="assistant")return this.currentMessage={role:"assistant",content:f.content,source:f.source||o},s.data?.usage&&(this.currentMessage.usage={tokens_input:s.data.usage.tokens_input||0,tokens_output:s.data.usage.tokens_output||0,duration_ms:s.data.usage.duration_ms||0,llm_calls:s.data.usage.llm_calls||0,tool_calls:s.data.usage.tool_calls||0,memory_operations:s.data.usage.memory_operations||0,cost_estimate:s.data.usage.cost_estimate}),[...i.slice(0,-1),this.currentMessage]}break}return i}reset(){this.currentMessage=null}}class H_{agentMessages=new Map;messageOrder=[];handleEvent(s,i,o){if(s.type==="message"&&s.data){const f=s.data;if(f.role==="assistant"&&f.source&&f.content!==void 0){const d=f.source,m=f.content;let p=this.agentMessages.get(d);p||(p={role:"assistant",content:"",source:d},this.agentMessages.set(d,p),this.messageOrder.push(d)),p.content=m,f.usage&&(p.usage=f.usage);const x=[];for(const h of i)(h.role!=="assistant"||!this.agentMessages.has(h.source))&&x.push(h);for(const h of this.messageOrder){const v=this.agentMessages.get(h);v&&v.content&&x.push(v)}return x}}if(s.type==="complete"&&s.data?.usage&&this.messageOrder.length>0){const f=this.messageOrder[this.messageOrder.length-1],d=this.agentMessages.get(f);if(d&&!d.usage){d.usage=s.data.usage;const m=[];for(const p of i)(p.role!=="assistant"||!this.agentMessages.has(p.source))&&m.push(p);for(const p of this.messageOrder){const x=this.agentMessages.get(p);x&&x.content&&m.push(x)}return m}}return i}reset(){this.agentMessages.clear(),this.messageOrder=[]}}function B_({selectedAgent:a,currentSession:s,onSessionChange:i,onDebugEvent:o}){const[f,d]=y.useState(!1),[m,p]=y.useState(!1),x=y.useMemo(()=>new L_,[]),{messages:h,isStreaming:v,sessionTotalUsage:b,pendingApproval:w,handleSendMessage:N,handleStop:M,handleClearMessages:E,handleApprove:D,handleReject:R}=oy({entityId:a.id,entityType:"agent",entityName:a.name||a.id,currentSession:s,onDebugEvent:o,onSessionChange:i,messageHandler:x,supportsToolApproval:!0,supportsTokenStreaming:!0}),B=y.useCallback(async C=>{if(C)try{const j=(await Mt.getSessions(a.id)).find(L=>L.id===C);j&&i(j)}catch(A){console.error("Failed to load session:",A)}},[a.id,i]);return c.jsxs("div",{className:"flex flex-col h-full",children:[c.jsxs("div",{className:"border-b",children:[c.jsxs("div",{className:"p-4 space-y-3",children:[c.jsx("div",{className:"flex items-center justify-between",children:c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx(Bt,{className:"h-6 w-6 text-blue-600"}),c.jsxs("div",{className:"flex-1",children:[c.jsx("h2",{className:"text-lg font-semibold",children:a.name||a.id}),a.description&&c.jsx("p",{className:"text-sm text-muted-foreground",children:a.description})]})]})}),c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx(Yx,{entityId:a.id,currentSessionId:s?.id,onSessionChange:B}),c.jsx("div",{className:"h-4 w-px bg-border"}),c.jsxs("div",{className:"flex flex-wrap gap-2",children:[a.model&&c.jsxs(je,{variant:"secondary",className:"text-xs",children:[c.jsx(mg,{className:"h-3 w-3 mr-1"}),a.model]}),c.jsxs(je,{variant:"secondary",className:"text-xs",children:[c.jsx(Ma,{className:"h-3 w-3 mr-1"}),a.tools.length," tools"]}),a.memory_type&&c.jsxs(je,{variant:"secondary",className:"text-xs",children:[c.jsx(Vu,{className:"h-3 w-3 mr-1"}),a.memory_type]}),c.jsx(je,{variant:"secondary",className:"text-xs",children:a.source}),(b.tokens_input>0||b.tokens_output>0)&&c.jsxs(c.Fragment,{children:[c.jsxs(je,{variant:"outline",className:"text-xs gap-1",children:[c.jsx(vf,{className:"h-3 w-3"}),b.tokens_input.toLocaleString(),c.jsx(gf,{className:"h-3 w-3"}),b.tokens_output.toLocaleString()]}),c.jsxs(Ve,{variant:"ghost",size:"sm",onClick:()=>p(!0),className:"h-7 px-2 text-xs gap-1",title:"Inspect context window",children:[c.jsx(xf,{className:"h-3 w-3"}),"Inspect"]})]})]})]}),c.jsx("button",{onClick:()=>d(!f),className:"p-1 hover:bg-accent rounded-md transition-colors","aria-label":f?"Hide details":"Show details",children:f?c.jsx(Zo,{className:"h-4 w-4"}):c.jsx(ka,{className:"h-4 w-4"})})]})]}),f&&c.jsxs("div",{className:"px-4 pb-3 space-y-2 border-t bg-muted/50",children:[c.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-2 pt-2",children:[a.model&&c.jsx("div",{className:"bg-card border border-muted rounded p-2 shadow-sm",children:c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(mg,{className:"h-4 w-4 text-purple-600 shrink-0"}),c.jsxs("div",{className:"min-w-0",children:[c.jsx("div",{className:"text-xs text-muted-foreground",children:"Model"}),c.jsx("div",{className:"text-sm font-medium truncate",children:a.model})]})]})}),c.jsx("div",{className:"bg-card border border-muted rounded p-2 shadow-sm",children:c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Ma,{className:"h-4 w-4 text-orange-600 shrink-0"}),c.jsxs("div",{className:"min-w-0",children:[c.jsx("div",{className:"text-xs text-muted-foreground",children:"Tools"}),c.jsxs("div",{className:"text-sm font-medium",children:[a.tools.length," available"]})]})]})}),a.memory_type&&c.jsx("div",{className:"bg-card border border-muted rounded p-2 shadow-sm",children:c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Vu,{className:"h-4 w-4 text-green-600 shrink-0"}),c.jsxs("div",{className:"min-w-0",children:[c.jsx("div",{className:"text-xs text-muted-foreground",children:"Memory"}),c.jsx("div",{className:"text-sm font-medium truncate",children:a.memory_type})]})]})}),c.jsx("div",{className:"bg-card border border-muted rounded p-2 shadow-sm",children:c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("div",{className:"h-4 w-4 rounded-full bg-gray-600 shrink-0"}),c.jsxs("div",{className:"min-w-0",children:[c.jsx("div",{className:"text-xs text-muted-foreground",children:"Source"}),c.jsx("div",{className:"text-sm font-medium truncate",children:a.source})]})]})})]}),a.tools.length>0&&c.jsxs("div",{className:"space-y-2",children:[c.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[c.jsx(Ma,{className:"h-4 w-4"}),c.jsxs("span",{children:["Available Tools (",a.tools.length,")"]})]}),c.jsx("div",{className:"flex flex-wrap gap-2",children:a.tools.map(C=>c.jsx(je,{variant:"outline",children:C},C))})]})]})]}),c.jsxs("div",{className:"flex-1 min-h-0",children:[c.jsx(Gx,{messages:h,onSendMessage:N,onClearMessages:E,onStop:M,isStreaming:v,sessionTotalUsage:b,placeholder:`Chat with ${a.name||a.id}...`,emptyStateTitle:"Agent Chat",emptyStateDescription:`Start a conversation with this agent. It has access to ${a.tools.length} tools and can help you with various tasks.`,emptyStateCustom:a.example_tasks&&a.example_tasks.length>0?c.jsx(Vx,{tasks:a.example_tasks,entityName:a.name||a.id,onTaskClick:C=>{N([{role:"user",content:C,source:"user"}])}}):null,beforeInput:c.jsx(d_,{request:w,onApprove:D,onReject:R})}),c.jsx(ry,{messages:h,isOpen:m,onClose:()=>p(!1)})]})]})}function q_({selectedOrchestrator:a,currentSession:s,onSessionChange:i,onDebugEvent:o}){const[f,d]=y.useState(!1),[m,p]=y.useState(!1),x=y.useMemo(()=>new H_,[]),{messages:h,isStreaming:v,sessionTotalUsage:b,currentAgentSpeaking:w,handleSendMessage:N,handleStop:M,handleClearMessages:E}=oy({entityId:a.id,entityType:"orchestrator",entityName:a.name||a.id,currentSession:s,onDebugEvent:o,onSessionChange:i,messageHandler:x,supportsToolApproval:!1,supportsTokenStreaming:!1}),D=y.useCallback(async B=>{if(B)try{const A=(await Mt.getSessions(a.id)).find(j=>j.id===B);A&&i(A)}catch(C){console.error("Failed to load session:",C)}},[a.id,i]),R=B=>{switch(B.toLowerCase()){case"round_robin":case"roundrobinorchestrator":return"bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-300";case"ai":case"aiorchestrator":return"bg-purple-100 text-purple-800 dark:bg-purple-900 dark:text-purple-300";case"plan":case"planorchestrator":return"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-300";case"handoff":case"handofforchestrator":return"bg-orange-100 text-orange-800 dark:bg-orange-900 dark:text-orange-300";default:return"bg-gray-100 text-gray-800 dark:bg-gray-900 dark:text-gray-300"}};return c.jsxs("div",{className:"flex flex-col h-full",children:[c.jsxs("div",{className:"border-b",children:[c.jsxs("div",{className:"p-4 space-y-3",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx(Ra,{className:"h-6 w-6 text-blue-600"}),c.jsxs("div",{className:"flex-1",children:[c.jsx("h2",{className:"text-lg font-semibold",children:a.name||a.id}),a.description&&c.jsx("p",{className:"text-sm text-muted-foreground",children:a.description})]})]}),c.jsx(je,{className:R(a.orchestrator_type),children:a.orchestrator_type})]}),c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx(Yx,{entityId:a.id,currentSessionId:s?.id,onSessionChange:D}),c.jsx("div",{className:"h-4 w-px bg-border"}),c.jsxs("div",{className:"flex flex-wrap gap-2",children:[c.jsxs(je,{variant:"secondary",className:"text-xs",children:[c.jsx(Ra,{className:"h-3 w-3 mr-1"}),a.agents.length," agents"]}),a.termination_conditions.length>0&&c.jsxs(je,{variant:"secondary",className:"text-xs",children:[c.jsx(Oo,{className:"h-3 w-3 mr-1"}),a.termination_conditions.length," conditions"]}),(b.tokens_input>0||b.tokens_output>0)&&c.jsxs(c.Fragment,{children:[c.jsxs(je,{variant:"outline",className:"text-xs gap-1",children:[c.jsx(vf,{className:"h-3 w-3"}),b.tokens_input.toLocaleString(),c.jsx(gf,{className:"h-3 w-3"}),b.tokens_output.toLocaleString()]}),c.jsxs(Ve,{variant:"ghost",size:"sm",onClick:()=>d(!0),className:"h-7 px-2 text-xs gap-1",title:"Inspect context window",children:[c.jsx(xf,{className:"h-3 w-3"}),"Inspect"]})]})]})]}),c.jsx("button",{onClick:()=>p(!m),className:"p-1 hover:bg-accent rounded-md transition-colors","aria-label":m?"Hide details":"Show details",children:m?c.jsx(Zo,{className:"h-4 w-4"}):c.jsx(ka,{className:"h-4 w-4"})})]})]}),m&&c.jsxs("div",{className:"px-4 pb-3 space-y-2 border-t bg-muted/50",children:[c.jsxs("div",{className:"space-y-2 pt-2",children:[c.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[c.jsx(Bt,{className:"h-4 w-4"}),c.jsxs("span",{children:["Participating Agents (",a.agents.length,")"]})]}),c.jsx("div",{className:"flex flex-wrap gap-2",children:a.agents.map(B=>c.jsxs(je,{variant:w===B?"default":"outline",className:w===B?"animate-pulse":"",children:[B,w===B&&c.jsx(Al,{className:"h-3 w-3 ml-1"})]},B))})]}),a.termination_conditions.length>0&&c.jsxs("div",{className:"space-y-2",children:[c.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[c.jsx(Oo,{className:"h-4 w-4"}),c.jsx("span",{children:"Termination Conditions"})]}),c.jsx("div",{className:"flex flex-wrap gap-2",children:a.termination_conditions.map(B=>c.jsx(je,{variant:"secondary",children:B},B))})]}),w&&c.jsx(jn,{className:"bg-blue-50 dark:bg-blue-950 border-blue-200 dark:border-blue-800",children:c.jsx(aa,{className:"p-3",children:c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("div",{className:"h-2 w-2 bg-blue-600 rounded-full animate-pulse"}),c.jsxs("span",{className:"text-sm font-medium",children:[w," is responding..."]})]})})})]})]}),c.jsxs("div",{className:"flex-1 min-h-0",children:[c.jsx(Gx,{messages:h,onSendMessage:N,onClearMessages:E,onStop:M,isStreaming:v,sessionTotalUsage:b,placeholder:`Start a conversation with ${a.agents.length} agents via ${a.orchestrator_type} orchestration...`,emptyStateTitle:"Multi-Agent Orchestration",emptyStateDescription:`This orchestrator will coordinate conversations between ${a.agents.join(", ")} using ${a.orchestrator_type} pattern.`,emptyStateCustom:a.example_tasks&&a.example_tasks.length>0?c.jsx(Vx,{tasks:a.example_tasks,entityName:a.name||a.id,onTaskClick:B=>{N([{role:"user",content:B,source:"user"}])}}):null}),c.jsx(ry,{messages:h,isOpen:f,onClose:()=>d(!1)})]})]})}function G_({className:a,type:s,...i}){return c.jsx("input",{type:s,"data-slot":"input",className:Xe("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",a),...i})}var Y_="Label",iy=y.forwardRef((a,s)=>c.jsx(Ce.label,{...a,ref:s,onMouseDown:i=>{i.target.closest("button, input, select, textarea")||(a.onMouseDown?.(i),!i.defaultPrevented&&i.detail>1&&i.preventDefault())}}));iy.displayName=Y_;var V_=iy;function X_({className:a,...s}){return c.jsx(V_,{"data-slot":"label",className:Xe("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",a),...s})}function K_({selectedWorkflow:a,onDebugEvent:s}){const[i,o]=y.useState({}),[f,d]=y.useState(!1),[m,p]=y.useState({status:"pending",steps_completed:[]}),[x,h]=y.useState(null),[v,b]=y.useState(null),w=y.useRef(null),N=(C,A)=>{o(j=>({...j,[C]:A}))},M=y.useCallback(async()=>{d(!0),b(null),h(null),p({status:"running",steps_completed:[]}),w.current=new AbortController;try{const C={input_data:i};for await(const A of Mt.streamEntityExecution(a.id,C,w.current.signal)){s(A);const j=A.data,L=A.type;if(L==="workflow_started")p(q=>({...q,status:"running"}));else if(L==="step_started")p(q=>({...q,current_step:j?.step_id||"unknown"}));else if(L==="step_completed")p(q=>({...q,steps_completed:[...q.steps_completed,j?.step_id||"unknown"],current_step:void 0}));else if(L==="step_failed")p(q=>({...q,status:"failed",error:j?.error||"Step execution failed"})),b(j?.error||"Step execution failed");else if(L==="workflow_completed"){p(F=>({...F,status:"completed",current_step:void 0}));const q=j?.execution,X=q?.step_executions?.[q?.step_executions?.length-1]?.output;h(X||j)}else L==="workflow_failed"?(p(q=>({...q,status:"failed",error:j?.error||"Workflow execution failed"})),b(j?.error||"Workflow execution failed")):L==="workflow_cancelled"&&(p(q=>({...q,status:"failed",error:j?.reason||"Workflow was cancelled"})),b(j?.reason||"Workflow was cancelled"))}}catch(C){console.error("Workflow execution error:",C),C instanceof Error&&C.name==="AbortError"?(b("Cancelled by user"),p(A=>({...A,status:"failed",error:"Cancelled by user"}))):(b(C instanceof Error?C.message:"Execution failed"),p(A=>({...A,status:"failed",error:C instanceof Error?C.message:"Unknown error"})))}finally{d(!1),w.current=null}},[a.id,i,s]),E=y.useCallback(()=>{w.current&&(console.log("🛑 Stopping workflow execution"),w.current.abort())},[]),D=C=>m.steps_completed.includes(C)?"completed":m.current_step===C?"running":"pending",R=C=>{switch(C){case"completed":return c.jsx(Vs,{className:"h-4 w-4 text-green-600"});case"running":return c.jsx(Xs,{className:"h-4 w-4 text-blue-600 animate-spin"});case"failed":return c.jsx(Ca,{className:"h-4 w-4 text-red-600"});default:return c.jsx("div",{className:"h-4 w-4 rounded-full border-2 border-gray-300"})}},B=()=>{if(!a.input_schema)return c.jsx(jn,{children:c.jsx(aa,{className:"p-4",children:c.jsx("p",{className:"text-sm text-muted-foreground",children:"No input schema defined for this workflow."})})});const C=a.input_schema,A=C.properties||{};return c.jsxs(jn,{children:[c.jsx(yo,{children:c.jsx(bo,{className:"text-sm",children:"Workflow Input"})}),c.jsx(aa,{className:"space-y-4",children:Object.entries(A).map(([j,L])=>{const q=L;return c.jsxs("div",{className:"space-y-2",children:[c.jsxs(X_,{htmlFor:j,className:"text-sm font-medium",children:[j,C.required?.includes(j)&&c.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),c.jsx(G_,{id:j,type:q.type==="number"?"number":"text",placeholder:q.description||`Enter ${j}`,value:i[j]||"",onChange:X=>N(j,X.target.value),disabled:f}),q.description&&c.jsx("p",{className:"text-xs text-muted-foreground",children:q.description})]},j)})})]})};return c.jsxs("div",{className:"flex flex-col h-full",children:[c.jsxs("div",{className:"border-b p-4 space-y-4",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx(Cl,{className:"h-6 w-6 text-green-600"}),c.jsxs("div",{children:[c.jsx("h2",{className:"text-lg font-semibold",children:a.name||a.id}),a.description&&c.jsx("p",{className:"text-sm text-muted-foreground",children:a.description})]})]}),c.jsxs(je,{variant:"outline",className:"gap-1",children:[c.jsx(yE,{className:"h-3 w-3"}),a.steps.length," steps"]})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[c.jsx(Cl,{className:"h-4 w-4"}),c.jsx("span",{children:"Workflow Steps"})]}),c.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:a.steps.map((C,A)=>c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsxs(je,{variant:D(C)==="completed"?"default":D(C)==="running"?"secondary":"outline",className:"gap-1",children:[R(D(C)),C]}),A<a.steps.length-1&&c.jsx(ZN,{className:"h-3 w-3 text-muted-foreground"})]},C))})]}),a.start_step&&c.jsxs("div",{className:"text-sm",children:[c.jsx("span",{className:"text-muted-foreground",children:"Entry point: "}),c.jsx(je,{variant:"outline",children:a.start_step})]})]}),c.jsxs("div",{className:"flex-1 p-4 space-y-4 overflow-auto",children:[B(),c.jsx(jn,{children:c.jsx(aa,{className:"p-4",children:c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsx("h3",{className:"font-medium",children:"Execute Workflow"}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Run the workflow with the provided input"})]}),c.jsxs("div",{className:"flex gap-2",children:[f&&c.jsxs(Ve,{variant:"destructive",onClick:E,className:"gap-2",children:[c.jsx(Oo,{className:"h-4 w-4"}),"Stop"]}),c.jsxs(Ve,{onClick:M,disabled:f,className:"gap-2",children:[f?c.jsx(Xs,{className:"h-4 w-4 animate-spin"}):c.jsx(yf,{className:"h-4 w-4"}),f?"Executing...":"Execute"]})]})]})})}),m.status!=="pending"&&c.jsxs(jn,{children:[c.jsx(yo,{children:c.jsxs(bo,{className:"text-sm flex items-center gap-2",children:[R(m.status),"Execution Status"]})}),c.jsxs(aa,{className:"space-y-2",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"text-sm font-medium",children:"Status:"}),c.jsx(je,{variant:m.status==="completed"?"default":m.status==="running"?"secondary":"destructive",children:m.status})]}),c.jsxs("div",{className:"text-sm",children:[c.jsx("span",{className:"font-medium",children:"Steps completed:"})," ",m.steps_completed.length," of ",a.steps.length]}),m.current_step&&c.jsxs("div",{className:"text-sm",children:[c.jsx("span",{className:"font-medium",children:"Current step:"})," ",c.jsx(je,{variant:"outline",children:m.current_step})]})]})]}),x&&c.jsxs(jn,{children:[c.jsx(yo,{children:c.jsxs(bo,{className:"text-sm flex items-center gap-2",children:[c.jsx(Vs,{className:"h-4 w-4 text-green-600"}),"Execution Result"]})}),c.jsx(aa,{children:c.jsx(ra,{className:"h-32",children:c.jsx("pre",{className:"text-xs bg-muted p-2 rounded overflow-auto",children:JSON.stringify(x,null,2)})})})]}),v&&c.jsxs(jn,{className:"border-destructive",children:[c.jsx(yo,{children:c.jsxs(bo,{className:"text-sm flex items-center gap-2 text-destructive",children:[c.jsx(Ca,{className:"h-4 w-4"}),"Execution Error"]})}),c.jsx(aa,{children:c.jsx("p",{className:"text-sm text-destructive",children:v})})]})]})]})}function Q_({message:a="Loading...",description:s,size:i="md",className:o,fullPage:f=!1}){const d=c.jsxs("div",{className:Xe("flex flex-col items-center justify-center gap-3",f?"min-h-[50vh]":"py-8",o),children:[c.jsx(Nf,{size:i,className:"text-muted-foreground"}),c.jsxs("div",{className:"text-center space-y-1",children:[c.jsx("p",{className:Xe("font-medium text-muted-foreground",i==="sm"&&"text-sm",i==="lg"&&"text-lg"),children:a}),s&&c.jsx("p",{className:"text-sm text-muted-foreground/80",children:s})]})]});return f?c.jsx("div",{className:"flex items-center justify-center min-h-screen bg-background",children:d}):d}const Ru=[{id:"basic-agent",title:"Basic Agent",description:"Start here: Simple agent with weather and calculator tools",category:"agent",githubPath:"examples/agents/basic-agent.py",difficulty:"beginner"},{id:"agent-as-tool",title:"Agent as Tool",description:"Coordinator agent using specialist agents as tools",category:"agent",githubPath:"examples/agents/agent_as_tool.py",difficulty:"intermediate"},{id:"sequential",title:"Sequential Workflow",description:"Linear pipeline: double → square → add_ten",category:"workflow",githubPath:"examples/workflows/sequential.py",difficulty:"beginner"},{id:"general",title:"General Workflow",description:"Flexible workflow with branching and parallel steps",category:"workflow",githubPath:"examples/workflows/general.py",difficulty:"intermediate"},{id:"round-robin",title:"Round-Robin",description:"Poet and critic taking turns to refine haiku",category:"orchestrator",githubPath:"examples/orchestration/round-robin.py",difficulty:"beginner"},{id:"ai-driven",title:"AI-Driven",description:"LLM dynamically selects which agent speaks next",category:"orchestrator",githubPath:"examples/orchestration/ai-driven.py",difficulty:"intermediate"},{id:"plan-based",title:"Plan-Based",description:"Orchestrator creates plans and executes them strategically",category:"orchestrator",githubPath:"examples/orchestration/plan-based.py",difficulty:"advanced"}],Z_=a=>{switch(a){case"agent":return Bt;case"orchestrator":return Ra;case"workflow":return Cl;default:return Bt}},P_=a=>{switch(a){case"beginner":return"bg-green-500/10 text-green-500 border-green-500/20";case"intermediate":return"bg-yellow-500/10 text-yellow-500 border-yellow-500/20";case"advanced":return"bg-red-500/10 text-red-500 border-red-500/20";default:return"bg-muted text-muted-foreground"}};function $_({onExampleLoaded:a}){const[s,i]=y.useState(new Set),[o,f]=y.useState(new Set),[d,m]=y.useState(new Map),p=async v=>{i(b=>new Set([...b,v.id])),m(b=>{const w=new Map(b);return w.delete(v.id),w});try{const b=await Mt.addExample({example_id:v.id,github_path:v.githubPath,category:v.category});f(w=>new Set([...w,v.id])),a(b)}catch(b){console.error(`Failed to load example ${v.id}:`,b),m(w=>{const N=new Map(w);return N.set(v.id,b instanceof Error?b.message:"Failed to load example"),N})}finally{i(b=>{const w=new Set(b);return w.delete(v.id),w})}},x={agent:Ru.filter(v=>v.category==="agent"),workflow:Ru.filter(v=>v.category==="workflow"),orchestrator:Ru.filter(v=>v.category==="orchestrator")},h=v=>{const b=Z_(v.category),w=s.has(v.id),N=o.has(v.id),M=d.get(v.id);return c.jsx(jn,{className:"p-4 hover:shadow-md transition-shadow",children:c.jsxs("div",{className:"flex flex-col gap-3",children:[c.jsxs("div",{className:"flex items-start justify-between",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(b,{className:"h-5 w-5 flex-shrink-0"}),c.jsx("h3",{className:"font-semibold text-sm",children:v.title})]}),c.jsx(je,{variant:"outline",className:`text-xs ${P_(v.difficulty)}`,children:v.difficulty})]}),c.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:v.description}),M&&c.jsxs("div",{className:"flex items-start gap-2 text-xs text-destructive bg-destructive/10 p-2 rounded",children:[c.jsx(Ca,{className:"h-3 w-3 mt-0.5 flex-shrink-0"}),c.jsx("span",{children:M})]}),c.jsxs(Ve,{size:"sm",variant:N?"outline":"default",onClick:()=>p(v),disabled:w||N,className:"w-full",children:[w&&c.jsx(Nf,{size:"sm",className:"mr-2"}),N&&c.jsx(cE,{className:"h-4 w-4 mr-2"}),!w&&!N&&c.jsx(Xu,{className:"h-4 w-4 mr-2"}),w?"Loading...":N?"Loaded":"Try Example"]})]})},v.id)};return c.jsxs("div",{className:"w-full max-w-6xl mx-auto p-8",children:[c.jsxs("div",{className:"text-center mb-8",children:[c.jsx("h2",{className:"text-2xl font-bold mb-2",children:"Try Example Agents, Workflows & Orchestrators"}),c.jsx("p",{className:"text-muted-foreground",children:"Get started by loading an example from the repository"})]}),c.jsxs("div",{className:"space-y-8",children:[c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[c.jsx(Bt,{className:"h-5 w-5"}),c.jsx("h3",{className:"text-lg font-semibold",children:"Agents"}),c.jsx(je,{variant:"secondary",children:x.agent.length})]}),c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:x.agent.map(h)})]}),x.workflow.length>0&&c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[c.jsx(Cl,{className:"h-5 w-5"}),c.jsx("h3",{className:"text-lg font-semibold",children:"Workflows"}),c.jsx(je,{variant:"secondary",children:x.workflow.length})]}),c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:x.workflow.map(h)})]}),x.orchestrator.length>0&&c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[c.jsx(Ra,{className:"h-5 w-5"}),c.jsx("h3",{className:"text-lg font-semibold",children:"Orchestrators"}),c.jsx(je,{variant:"secondary",children:x.orchestrator.length})]}),c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:x.orchestrator.map(h)})]})]})]})}function F_(){const[a,s]=y.useState({entities:[],agents:[],orchestrators:[],workflows:[],isLoading:!0}),[i,o]=y.useState({}),[f,d]=y.useState([]),[m,p]=y.useState(!0),[x,h]=y.useState(()=>{const A=localStorage.getItem("debugPanelWidth");return A?parseInt(A,10):320}),[v,b]=y.useState(!1);y.useEffect(()=>{(async()=>{try{const j=await Mt.getEntities(),L=j.filter(F=>F.type==="agent"),q=j.filter(F=>F.type==="orchestrator"),X=j.filter(F=>F.type==="workflow");s(F=>({...F,entities:j,agents:L,orchestrators:q,workflows:X,selectedEntity:j.length>0?j[0]:void 0,isLoading:!1}))}catch(j){console.error("Failed to load entities:",j),s(L=>({...L,error:j instanceof Error?j.message:"Failed to load entities",isLoading:!1}))}})()},[]),y.useEffect(()=>{(async()=>{if(a.selectedEntity&&!a.currentSession){const j=i[a.selectedEntity.id];if(j)s(L=>({...L,currentSession:j}));else try{const L=await Mt.getOrCreateSession(a.selectedEntity.id,a.selectedEntity.type);o(q=>({...q,[a.selectedEntity.id]:L})),s(q=>({...q,currentSession:L}))}catch(L){console.error("Failed to load initial session:",L)}}})()},[a.selectedEntity,a.currentSession,i]),y.useEffect(()=>{localStorage.setItem("debugPanelWidth",x.toString())},[x]);const w=y.useCallback(A=>{A.preventDefault(),b(!0);const j=A.clientX,L=x,q=F=>{const ee=j-F.clientX,I=Math.max(200,Math.min(window.innerWidth*.5,L+ee));h(I)},X=()=>{b(!1),document.removeEventListener("mousemove",q),document.removeEventListener("mouseup",X)};document.addEventListener("mousemove",q),document.addEventListener("mouseup",X)},[x]),N=y.useCallback(()=>{p(!1)},[]),M=y.useCallback(async A=>{const j=i[A.id];if(j)s(L=>({...L,selectedEntity:A,currentSession:j}));else try{const L=await Mt.getOrCreateSession(A.id,A.type);o(q=>({...q,[A.id]:L})),s(q=>({...q,selectedEntity:A,currentSession:L}))}catch(L){console.error("Failed to get/create session:",L),s(q=>({...q,selectedEntity:A,currentSession:void 0}))}d([])},[i]),E=y.useCallback(A=>{s(j=>({...j,currentSession:A})),a.selectedEntity&&o(j=>({...j,[a.selectedEntity.id]:A}))},[a.selectedEntity]),D=y.useCallback(A=>{d(j=>[...j,A])},[]),R=y.useCallback(A=>{s(j=>{const q=j.entities.some(I=>I.id===A.id)?j.entities:[...j.entities,A],X=q.filter(I=>I.type==="agent"),F=q.filter(I=>I.type==="orchestrator"),ee=q.filter(I=>I.type==="workflow");return{...j,entities:q,agents:X,orchestrators:F,workflows:ee,selectedEntity:A}}),d([])},[]),B=y.useCallback(async A=>{try{await Mt.deleteEntity(A.id),s(j=>{const L=j.entities.filter(I=>I.id!==A.id),q=L.filter(I=>I.type==="agent"),X=L.filter(I=>I.type==="orchestrator"),F=L.filter(I=>I.type==="workflow"),ee=j.selectedEntity?.id===A.id?L.length>0?L[0]:void 0:j.selectedEntity;return{...j,entities:L,agents:q,orchestrators:X,workflows:F,selectedEntity:ee}}),a.selectedEntity?.id===A.id&&d([])}catch(j){console.error("Failed to delete entity:",j),s(L=>({...L,error:j instanceof Error?j.message:"Failed to delete entity"}))}},[a.selectedEntity]);if(a.isLoading)return c.jsxs("div",{className:"h-screen flex flex-col bg-background",children:[c.jsxs("header",{className:"flex h-14 items-center gap-4 border-b px-4",children:[c.jsx("div",{className:"w-64 h-9 bg-muted animate-pulse rounded-md"}),c.jsxs("div",{className:"flex items-center gap-2 ml-auto",children:[c.jsx("div",{className:"w-8 h-8 bg-muted animate-pulse rounded-md"}),c.jsx("div",{className:"w-8 h-8 bg-muted animate-pulse rounded-md"})]})]}),c.jsx(Q_,{message:"Initializing PicoAgents WebUI...",description:"Discovering agents, orchestrators, and workflows",fullPage:!0})]});if(a.error)return c.jsxs("div",{className:"h-screen flex flex-col bg-background",children:[c.jsx(Cu,{entities:[],selectedEntity:void 0,onSelect:()=>{},isLoading:!1}),c.jsx("div",{className:"flex-1 flex items-center justify-center",children:c.jsxs("div",{className:"text-center space-y-4 max-w-md",children:[c.jsx("div",{className:"text-destructive text-lg font-medium",children:"Failed to load agents, orchestrators, and workflows"}),c.jsx("p",{className:"text-muted-foreground text-sm",children:a.error}),c.jsx(Ve,{onClick:()=>window.location.reload(),variant:"outline",children:"Retry"})]})})]});if(!a.isLoading&&a.entities.length===0)return c.jsxs("div",{className:"h-screen flex flex-col bg-background",children:[c.jsx(Cu,{entities:[],selectedEntity:void 0,onSelect:()=>{},isLoading:!1}),c.jsxs("div",{className:"flex-1 overflow-auto",children:[c.jsx("div",{className:"max-w-6xl mx-auto px-8 pt-8 pb-4",children:c.jsxs("div",{className:"bg-muted/50 border border-border rounded-lg p-6 text-center",children:[c.jsx("h2",{className:"text-xl font-semibold mb-2",children:"No agents, orchestrators, or workflows found"}),c.jsx("p",{className:"text-muted-foreground",children:"We didn't discover any components in your directory. Try one from our sample gallery below to get started!"})]})}),c.jsx($_,{onExampleLoaded:R})]})]});const C=()=>{if(!a.selectedEntity)return c.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:"Select an agent, orchestrator, or workflow to get started."});switch(a.selectedEntity.type){case"agent":return c.jsx(B_,{selectedAgent:a.selectedEntity,currentSession:a.currentSession,onSessionChange:E,onDebugEvent:D});case"orchestrator":return c.jsx(q_,{selectedOrchestrator:a.selectedEntity,currentSession:a.currentSession,onSessionChange:E,onDebugEvent:D});case"workflow":return c.jsx(K_,{selectedWorkflow:a.selectedEntity,onDebugEvent:D});default:return c.jsxs("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:["Unknown type: ",a.selectedEntity.type]})}};return c.jsxs("div",{className:"h-screen flex flex-col bg-background",children:[c.jsx(Cu,{entities:a.entities,selectedEntity:a.selectedEntity,onSelect:M,isLoading:a.isLoading,onDeleteEntity:B}),c.jsxs("div",{className:"flex overflow-hidden",style:{height:"calc(100vh - 56px)"},children:[c.jsx("div",{className:"flex-1 min-w-0 overflow-hidden",children:C()}),m&&c.jsx("div",{className:`w-1 bg-border hover:bg-accent cursor-col-resize flex-shrink-0 relative group ${v?"bg-accent":""}`,onMouseDown:w,onDoubleClick:N,children:c.jsx("div",{className:"absolute inset-y-0 -left-1 -right-1 flex items-center justify-center",children:c.jsx("div",{className:"h-12 rounded-lg bg-primary w-2"})})}),!m&&c.jsx("div",{className:"flex-shrink-0",children:c.jsx(Ve,{variant:"ghost",size:"sm",onClick:()=>p(!0),className:"rounded-none border-l",style:{height:"calc(100vh - 56px)"},children:c.jsx(nE,{className:"h-4 w-4"})})}),m&&c.jsx("div",{className:"flex-shrink-0",style:{width:`${x}px`,height:"100%"},children:c.jsx(Vj,{events:f,isStreaming:!1})})]})]})}function J_({children:a,attribute:s="class",defaultTheme:i="system",enableSystem:o=!0,disableTransitionOnChange:f=!0,...d}){return c.jsx(gj,{attribute:s,defaultTheme:i,enableSystem:o,disableTransitionOnChange:f,...d,children:a})}qb.createRoot(document.getElementById("root")).render(c.jsx(y.StrictMode,{children:c.jsx(J_,{attribute:"class",defaultTheme:"system",enableSystem:!0,disableTransitionOnChange:!0,children:c.jsx(F_,{})})}));
