aether-react 0.1.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,119 @@
1
+ var a0=Object.defineProperty;var u0=(e,t,n)=>t in e?a0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Tt=(e,t,n)=>u0(e,typeof t!="symbol"?t+"":t,n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();function c0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var pc={exports:{}},yo={},hc={exports:{}},F={};/**
2
+ * @license React
3
+ * react.production.min.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var Qr=Symbol.for("react.element"),f0=Symbol.for("react.portal"),d0=Symbol.for("react.fragment"),p0=Symbol.for("react.strict_mode"),h0=Symbol.for("react.profiler"),g0=Symbol.for("react.provider"),m0=Symbol.for("react.context"),y0=Symbol.for("react.forward_ref"),x0=Symbol.for("react.suspense"),v0=Symbol.for("react.memo"),w0=Symbol.for("react.lazy"),ja=Symbol.iterator;function S0(e){return e===null||typeof e!="object"?null:(e=ja&&e[ja]||e["@@iterator"],typeof e=="function"?e:null)}var gc={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},mc=Object.assign,yc={};function Kn(e,t,n){this.props=e,this.context=t,this.refs=yc,this.updater=n||gc}Kn.prototype.isReactComponent={};Kn.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Kn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function xc(){}xc.prototype=Kn.prototype;function ys(e,t,n){this.props=e,this.context=t,this.refs=yc,this.updater=n||gc}var xs=ys.prototype=new xc;xs.constructor=ys;mc(xs,Kn.prototype);xs.isPureReactComponent=!0;var Ca=Array.isArray,vc=Object.prototype.hasOwnProperty,vs={current:null},wc={key:!0,ref:!0,__self:!0,__source:!0};function Sc(e,t,n){var r,i={},o=null,l=null;if(t!=null)for(r in t.ref!==void 0&&(l=t.ref),t.key!==void 0&&(o=""+t.key),t)vc.call(t,r)&&!wc.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var u=Array(a),c=0;c<a;c++)u[c]=arguments[c+2];i.children=u}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return{$$typeof:Qr,type:e,key:o,ref:l,props:i,_owner:vs.current}}function k0(e,t){return{$$typeof:Qr,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function ws(e){return typeof e=="object"&&e!==null&&e.$$typeof===Qr}function _0(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Ea=/\/+/g;function bo(e,t){return typeof e=="object"&&e!==null&&e.key!=null?_0(""+e.key):t.toString(36)}function _i(e,t,n,r,i){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var l=!1;if(e===null)l=!0;else switch(o){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case Qr:case f0:l=!0}}if(l)return l=e,i=i(l),e=r===""?"."+bo(l,0):r,Ca(i)?(n="",e!=null&&(n=e.replace(Ea,"$&/")+"/"),_i(i,t,n,"",function(c){return c})):i!=null&&(ws(i)&&(i=k0(i,n+(!i.key||l&&l.key===i.key?"":(""+i.key).replace(Ea,"$&/")+"/")+e)),t.push(i)),1;if(l=0,r=r===""?".":r+":",Ca(e))for(var a=0;a<e.length;a++){o=e[a];var u=r+bo(o,a);l+=_i(o,t,n,u,i)}else if(u=S0(e),typeof u=="function")for(e=u.call(e),a=0;!(o=e.next()).done;)o=o.value,u=r+bo(o,a++),l+=_i(o,t,n,u,i);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function Jr(e,t,n){if(e==null)return e;var r=[],i=0;return _i(e,r,"","",function(o){return t.call(n,o,i++)}),r}function j0(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var je={current:null},ji={transition:null},C0={ReactCurrentDispatcher:je,ReactCurrentBatchConfig:ji,ReactCurrentOwner:vs};function kc(){throw Error("act(...) is not supported in production builds of React.")}F.Children={map:Jr,forEach:function(e,t,n){Jr(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Jr(e,function(){t++}),t},toArray:function(e){return Jr(e,function(t){return t})||[]},only:function(e){if(!ws(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};F.Component=Kn;F.Fragment=d0;F.Profiler=h0;F.PureComponent=ys;F.StrictMode=p0;F.Suspense=x0;F.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=C0;F.act=kc;F.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=mc({},e.props),i=e.key,o=e.ref,l=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,l=vs.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(u in t)vc.call(t,u)&&!wc.hasOwnProperty(u)&&(r[u]=t[u]===void 0&&a!==void 0?a[u]:t[u])}var u=arguments.length-2;if(u===1)r.children=n;else if(1<u){a=Array(u);for(var c=0;c<u;c++)a[c]=arguments[c+2];r.children=a}return{$$typeof:Qr,type:e.type,key:i,ref:o,props:r,_owner:l}};F.createContext=function(e){return e={$$typeof:m0,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:g0,_context:e},e.Consumer=e};F.createElement=Sc;F.createFactory=function(e){var t=Sc.bind(null,e);return t.type=e,t};F.createRef=function(){return{current:null}};F.forwardRef=function(e){return{$$typeof:y0,render:e}};F.isValidElement=ws;F.lazy=function(e){return{$$typeof:w0,_payload:{_status:-1,_result:e},_init:j0}};F.memo=function(e,t){return{$$typeof:v0,type:e,compare:t===void 0?null:t}};F.startTransition=function(e){var t=ji.transition;ji.transition={};try{e()}finally{ji.transition=t}};F.unstable_act=kc;F.useCallback=function(e,t){return je.current.useCallback(e,t)};F.useContext=function(e){return je.current.useContext(e)};F.useDebugValue=function(){};F.useDeferredValue=function(e){return je.current.useDeferredValue(e)};F.useEffect=function(e,t){return je.current.useEffect(e,t)};F.useId=function(){return je.current.useId()};F.useImperativeHandle=function(e,t,n){return je.current.useImperativeHandle(e,t,n)};F.useInsertionEffect=function(e,t){return je.current.useInsertionEffect(e,t)};F.useLayoutEffect=function(e,t){return je.current.useLayoutEffect(e,t)};F.useMemo=function(e,t){return je.current.useMemo(e,t)};F.useReducer=function(e,t,n){return je.current.useReducer(e,t,n)};F.useRef=function(e){return je.current.useRef(e)};F.useState=function(e){return je.current.useState(e)};F.useSyncExternalStore=function(e,t,n){return je.current.useSyncExternalStore(e,t,n)};F.useTransition=function(){return je.current.useTransition()};F.version="18.3.1";hc.exports=F;var M=hc.exports;const Ss=c0(M);/**
10
+ * @license React
11
+ * react-jsx-runtime.production.min.js
12
+ *
13
+ * Copyright (c) Facebook, Inc. and its affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var E0=M,T0=Symbol.for("react.element"),L0=Symbol.for("react.fragment"),I0=Object.prototype.hasOwnProperty,M0=E0.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,z0={key:!0,ref:!0,__self:!0,__source:!0};function _c(e,t,n){var r,i={},o=null,l=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(l=t.ref);for(r in t)I0.call(t,r)&&!z0.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:T0,type:e,key:o,ref:l,props:i,_owner:M0.current}}yo.Fragment=L0;yo.jsx=_c;yo.jsxs=_c;pc.exports=yo;var s=pc.exports,jc={exports:{}},Oe={},Cc={exports:{}},Ec={};/**
18
+ * @license React
19
+ * scheduler.production.min.js
20
+ *
21
+ * Copyright (c) Facebook, Inc. and its affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */(function(e){function t(L,A){var P=L.length;L.push(A);e:for(;0<P;){var O=P-1>>>1,$=L[O];if(0<i($,A))L[O]=A,L[P]=$,P=O;else break e}}function n(L){return L.length===0?null:L[0]}function r(L){if(L.length===0)return null;var A=L[0],P=L.pop();if(P!==A){L[0]=P;e:for(var O=0,$=L.length,ie=$>>>1;O<ie;){var X=2*(O+1)-1,Q=L[X],ae=X+1,fe=L[ae];if(0>i(Q,P))ae<$&&0>i(fe,Q)?(L[O]=fe,L[ae]=P,O=ae):(L[O]=Q,L[X]=P,O=X);else if(ae<$&&0>i(fe,P))L[O]=fe,L[ae]=P,O=ae;else break e}}return A}function i(L,A){var P=L.sortIndex-A.sortIndex;return P!==0?P:L.id-A.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var l=Date,a=l.now();e.unstable_now=function(){return l.now()-a}}var u=[],c=[],d=1,g=null,f=3,y=!1,k=!1,v=!1,w=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(L){for(var A=n(c);A!==null;){if(A.callback===null)r(c);else if(A.startTime<=L)r(c),A.sortIndex=A.expirationTime,t(u,A);else break;A=n(c)}}function m(L){if(v=!1,x(L),!k)if(n(u)!==null)k=!0,T(_);else{var A=n(c);A!==null&&N(m,A.startTime-L)}}function _(L,A){k=!1,v&&(v=!1,p(j),j=-1),y=!0;var P=f;try{for(x(A),g=n(u);g!==null&&(!(g.expirationTime>A)||L&&!H());){var O=g.callback;if(typeof O=="function"){g.callback=null,f=g.priorityLevel;var $=O(g.expirationTime<=A);A=e.unstable_now(),typeof $=="function"?g.callback=$:g===n(u)&&r(u),x(A)}else r(u);g=n(u)}if(g!==null)var ie=!0;else{var X=n(c);X!==null&&N(m,X.startTime-A),ie=!1}return ie}finally{g=null,f=P,y=!1}}var C=!1,E=null,j=-1,D=5,R=-1;function H(){return!(e.unstable_now()-R<D)}function B(){if(E!==null){var L=e.unstable_now();R=L;var A=!0;try{A=E(!0,L)}finally{A?U():(C=!1,E=null)}}else C=!1}var U;if(typeof h=="function")U=function(){h(B)};else if(typeof MessageChannel<"u"){var S=new MessageChannel,I=S.port2;S.port1.onmessage=B,U=function(){I.postMessage(null)}}else U=function(){w(B,0)};function T(L){E=L,C||(C=!0,U())}function N(L,A){j=w(function(){L(e.unstable_now())},A)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(L){L.callback=null},e.unstable_continueExecution=function(){k||y||(k=!0,T(_))},e.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<L?Math.floor(1e3/L):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(L){switch(f){case 1:case 2:case 3:var A=3;break;default:A=f}var P=f;f=A;try{return L()}finally{f=P}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(L,A){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var P=f;f=L;try{return A()}finally{f=P}},e.unstable_scheduleCallback=function(L,A,P){var O=e.unstable_now();switch(typeof P=="object"&&P!==null?(P=P.delay,P=typeof P=="number"&&0<P?O+P:O):P=O,L){case 1:var $=-1;break;case 2:$=250;break;case 5:$=1073741823;break;case 4:$=1e4;break;default:$=5e3}return $=P+$,L={id:d++,callback:A,priorityLevel:L,startTime:P,expirationTime:$,sortIndex:-1},P>O?(L.sortIndex=P,t(c,L),n(u)===null&&L===n(c)&&(v?(p(j),j=-1):v=!0,N(m,P-O))):(L.sortIndex=$,t(u,L),k||y||(k=!0,T(_))),L},e.unstable_shouldYield=H,e.unstable_wrapCallback=function(L){var A=f;return function(){var P=f;f=A;try{return L.apply(this,arguments)}finally{f=P}}}})(Ec);Cc.exports=Ec;var A0=Cc.exports;/**
26
+ * @license React
27
+ * react-dom.production.min.js
28
+ *
29
+ * Copyright (c) Facebook, Inc. and its affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var P0=M,be=A0;function z(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;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."}var Tc=new Set,kr={};function pn(e,t){bn(e,t),bn(e+"Capture",t)}function bn(e,t){for(kr[e]=t,e=0;e<t.length;e++)Tc.add(t[e])}var St=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),gl=Object.prototype.hasOwnProperty,R0=/^[: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]*$/,Ta={},La={};function N0(e){return gl.call(La,e)?!0:gl.call(Ta,e)?!1:R0.test(e)?La[e]=!0:(Ta[e]=!0,!1)}function b0(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function D0(e,t,n,r){if(t===null||typeof t>"u"||b0(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ce(e,t,n,r,i,o,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=l}var me={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){me[e]=new Ce(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];me[t]=new Ce(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){me[e]=new Ce(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){me[e]=new Ce(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){me[e]=new Ce(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){me[e]=new Ce(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){me[e]=new Ce(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){me[e]=new Ce(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){me[e]=new Ce(e,5,!1,e.toLowerCase(),null,!1,!1)});var ks=/[\-:]([a-z])/g;function _s(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(ks,_s);me[t]=new Ce(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(ks,_s);me[t]=new Ce(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(ks,_s);me[t]=new Ce(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){me[e]=new Ce(e,1,!1,e.toLowerCase(),null,!1,!1)});me.xlinkHref=new Ce("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){me[e]=new Ce(e,1,!1,e.toLowerCase(),null,!0,!0)});function js(e,t,n,r){var i=me.hasOwnProperty(t)?me[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(D0(t,n,i,r)&&(n=null),r||i===null?N0(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Et=P0.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ei=Symbol.for("react.element"),mn=Symbol.for("react.portal"),yn=Symbol.for("react.fragment"),Cs=Symbol.for("react.strict_mode"),ml=Symbol.for("react.profiler"),Lc=Symbol.for("react.provider"),Ic=Symbol.for("react.context"),Es=Symbol.for("react.forward_ref"),yl=Symbol.for("react.suspense"),xl=Symbol.for("react.suspense_list"),Ts=Symbol.for("react.memo"),It=Symbol.for("react.lazy"),Mc=Symbol.for("react.offscreen"),Ia=Symbol.iterator;function Gn(e){return e===null||typeof e!="object"?null:(e=Ia&&e[Ia]||e["@@iterator"],typeof e=="function"?e:null)}var re=Object.assign,Do;function sr(e){if(Do===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Do=t&&t[1]||""}return`
34
+ `+Do+e}var Oo=!1;function Ho(e,t){if(!e||Oo)return"";Oo=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var i=c.stack.split(`
35
+ `),o=r.stack.split(`
36
+ `),l=i.length-1,a=o.length-1;1<=l&&0<=a&&i[l]!==o[a];)a--;for(;1<=l&&0<=a;l--,a--)if(i[l]!==o[a]){if(l!==1||a!==1)do if(l--,a--,0>a||i[l]!==o[a]){var u=`
37
+ `+i[l].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=l&&0<=a);break}}}finally{Oo=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?sr(e):""}function O0(e){switch(e.tag){case 5:return sr(e.type);case 16:return sr("Lazy");case 13:return sr("Suspense");case 19:return sr("SuspenseList");case 0:case 2:case 15:return e=Ho(e.type,!1),e;case 11:return e=Ho(e.type.render,!1),e;case 1:return e=Ho(e.type,!0),e;default:return""}}function vl(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case yn:return"Fragment";case mn:return"Portal";case ml:return"Profiler";case Cs:return"StrictMode";case yl:return"Suspense";case xl:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Ic:return(e.displayName||"Context")+".Consumer";case Lc:return(e._context.displayName||"Context")+".Provider";case Es:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ts:return t=e.displayName||null,t!==null?t:vl(e.type)||"Memo";case It:t=e._payload,e=e._init;try{return vl(e(t))}catch{}}return null}function H0(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return vl(t);case 8:return t===Cs?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Kt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function zc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function $0(e){var t=zc(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(l){r=""+l,o.call(this,l)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ti(e){e._valueTracker||(e._valueTracker=$0(e))}function Ac(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=zc(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Hi(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}}function wl(e,t){var n=t.checked;return re({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Ma(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Kt(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Pc(e,t){t=t.checked,t!=null&&js(e,"checked",t,!1)}function Sl(e,t){Pc(e,t);var n=Kt(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?kl(e,t.type,n):t.hasOwnProperty("defaultValue")&&kl(e,t.type,Kt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function za(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function kl(e,t,n){(t!=="number"||Hi(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ar=Array.isArray;function Ln(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Kt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function _l(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(z(91));return re({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Aa(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(z(92));if(ar(n)){if(1<n.length)throw Error(z(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Kt(n)}}function Rc(e,t){var n=Kt(t.value),r=Kt(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Pa(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Nc(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function jl(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Nc(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var ni,bc=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(ni=ni||document.createElement("div"),ni.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ni.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function _r(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var pr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},F0=["Webkit","ms","Moz","O"];Object.keys(pr).forEach(function(e){F0.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),pr[t]=pr[e]})});function Dc(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||pr.hasOwnProperty(e)&&pr[e]?(""+t).trim():t+"px"}function Oc(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Dc(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var W0=re({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Cl(e,t){if(t){if(W0[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(z(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(z(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(z(61))}if(t.style!=null&&typeof t.style!="object")throw Error(z(62))}}function El(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 Tl=null;function Ls(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ll=null,In=null,Mn=null;function Ra(e){if(e=Ur(e)){if(typeof Ll!="function")throw Error(z(280));var t=e.stateNode;t&&(t=ko(t),Ll(e.stateNode,e.type,t))}}function Hc(e){In?Mn?Mn.push(e):Mn=[e]:In=e}function $c(){if(In){var e=In,t=Mn;if(Mn=In=null,Ra(e),t)for(e=0;e<t.length;e++)Ra(t[e])}}function Fc(e,t){return e(t)}function Wc(){}var $o=!1;function Bc(e,t,n){if($o)return e(t,n);$o=!0;try{return Fc(e,t,n)}finally{$o=!1,(In!==null||Mn!==null)&&(Wc(),$c())}}function jr(e,t){var n=e.stateNode;if(n===null)return null;var r=ko(n);if(r===null)return null;n=r[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":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(z(231,t,typeof n));return n}var Il=!1;if(St)try{var qn={};Object.defineProperty(qn,"passive",{get:function(){Il=!0}}),window.addEventListener("test",qn,qn),window.removeEventListener("test",qn,qn)}catch{Il=!1}function B0(e,t,n,r,i,o,l,a,u){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(d){this.onError(d)}}var hr=!1,$i=null,Fi=!1,Ml=null,Q0={onError:function(e){hr=!0,$i=e}};function K0(e,t,n,r,i,o,l,a,u){hr=!1,$i=null,B0.apply(Q0,arguments)}function X0(e,t,n,r,i,o,l,a,u){if(K0.apply(this,arguments),hr){if(hr){var c=$i;hr=!1,$i=null}else throw Error(z(198));Fi||(Fi=!0,Ml=c)}}function hn(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Qc(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 Na(e){if(hn(e)!==e)throw Error(z(188))}function U0(e){var t=e.alternate;if(!t){if(t=hn(e),t===null)throw Error(z(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return Na(i),e;if(o===r)return Na(i),t;o=o.sibling}throw Error(z(188))}if(n.return!==r.return)n=i,r=o;else{for(var l=!1,a=i.child;a;){if(a===n){l=!0,n=i,r=o;break}if(a===r){l=!0,r=i,n=o;break}a=a.sibling}if(!l){for(a=o.child;a;){if(a===n){l=!0,n=o,r=i;break}if(a===r){l=!0,r=o,n=i;break}a=a.sibling}if(!l)throw Error(z(189))}}if(n.alternate!==r)throw Error(z(190))}if(n.tag!==3)throw Error(z(188));return n.stateNode.current===n?e:t}function Kc(e){return e=U0(e),e!==null?Xc(e):null}function Xc(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Xc(e);if(t!==null)return t;e=e.sibling}return null}var Uc=be.unstable_scheduleCallback,ba=be.unstable_cancelCallback,V0=be.unstable_shouldYield,Z0=be.unstable_requestPaint,le=be.unstable_now,Y0=be.unstable_getCurrentPriorityLevel,Is=be.unstable_ImmediatePriority,Vc=be.unstable_UserBlockingPriority,Wi=be.unstable_NormalPriority,G0=be.unstable_LowPriority,Zc=be.unstable_IdlePriority,xo=null,at=null;function q0(e){if(at&&typeof at.onCommitFiberRoot=="function")try{at.onCommitFiberRoot(xo,e,void 0,(e.current.flags&128)===128)}catch{}}var et=Math.clz32?Math.clz32:tp,J0=Math.log,ep=Math.LN2;function tp(e){return e>>>=0,e===0?32:31-(J0(e)/ep|0)|0}var ri=64,ii=4194304;function ur(e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Bi(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,l=n&268435455;if(l!==0){var a=l&~i;a!==0?r=ur(a):(o&=l,o!==0&&(r=ur(o)))}else l=n&~i,l!==0?r=ur(l):o!==0&&(r=ur(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-et(t),i=1<<n,r|=e[n],t&=~i;return r}function np(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64: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:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function rp(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var l=31-et(o),a=1<<l,u=i[l];u===-1?(!(a&n)||a&r)&&(i[l]=np(a,t)):u<=t&&(e.expiredLanes|=a),o&=~a}}function zl(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Yc(){var e=ri;return ri<<=1,!(ri&4194240)&&(ri=64),e}function Fo(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Kr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-et(t),e[t]=n}function ip(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-et(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}function Ms(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-et(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Z=0;function Gc(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var qc,zs,Jc,ef,tf,Al=!1,oi=[],Dt=null,Ot=null,Ht=null,Cr=new Map,Er=new Map,At=[],op="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 submit".split(" ");function Da(e,t){switch(e){case"focusin":case"focusout":Dt=null;break;case"dragenter":case"dragleave":Ot=null;break;case"mouseover":case"mouseout":Ht=null;break;case"pointerover":case"pointerout":Cr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Er.delete(t.pointerId)}}function Jn(e,t,n,r,i,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},t!==null&&(t=Ur(t),t!==null&&zs(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function lp(e,t,n,r,i){switch(t){case"focusin":return Dt=Jn(Dt,e,t,n,r,i),!0;case"dragenter":return Ot=Jn(Ot,e,t,n,r,i),!0;case"mouseover":return Ht=Jn(Ht,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return Cr.set(o,Jn(Cr.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,Er.set(o,Jn(Er.get(o)||null,e,t,n,r,i)),!0}return!1}function nf(e){var t=qt(e.target);if(t!==null){var n=hn(t);if(n!==null){if(t=n.tag,t===13){if(t=Qc(n),t!==null){e.blockedOn=t,tf(e.priority,function(){Jc(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ci(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Pl(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Tl=r,n.target.dispatchEvent(r),Tl=null}else return t=Ur(n),t!==null&&zs(t),e.blockedOn=n,!1;t.shift()}return!0}function Oa(e,t,n){Ci(e)&&n.delete(t)}function sp(){Al=!1,Dt!==null&&Ci(Dt)&&(Dt=null),Ot!==null&&Ci(Ot)&&(Ot=null),Ht!==null&&Ci(Ht)&&(Ht=null),Cr.forEach(Oa),Er.forEach(Oa)}function er(e,t){e.blockedOn===t&&(e.blockedOn=null,Al||(Al=!0,be.unstable_scheduleCallback(be.unstable_NormalPriority,sp)))}function Tr(e){function t(i){return er(i,e)}if(0<oi.length){er(oi[0],e);for(var n=1;n<oi.length;n++){var r=oi[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Dt!==null&&er(Dt,e),Ot!==null&&er(Ot,e),Ht!==null&&er(Ht,e),Cr.forEach(t),Er.forEach(t),n=0;n<At.length;n++)r=At[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<At.length&&(n=At[0],n.blockedOn===null);)nf(n),n.blockedOn===null&&At.shift()}var zn=Et.ReactCurrentBatchConfig,Qi=!0;function ap(e,t,n,r){var i=Z,o=zn.transition;zn.transition=null;try{Z=1,As(e,t,n,r)}finally{Z=i,zn.transition=o}}function up(e,t,n,r){var i=Z,o=zn.transition;zn.transition=null;try{Z=4,As(e,t,n,r)}finally{Z=i,zn.transition=o}}function As(e,t,n,r){if(Qi){var i=Pl(e,t,n,r);if(i===null)Go(e,t,r,Ki,n),Da(e,r);else if(lp(i,e,t,n,r))r.stopPropagation();else if(Da(e,r),t&4&&-1<op.indexOf(e)){for(;i!==null;){var o=Ur(i);if(o!==null&&qc(o),o=Pl(e,t,n,r),o===null&&Go(e,t,r,Ki,n),o===i)break;i=o}i!==null&&r.stopPropagation()}else Go(e,t,r,null,n)}}var Ki=null;function Pl(e,t,n,r){if(Ki=null,e=Ls(r),e=qt(e),e!==null)if(t=hn(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Qc(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 Ki=e,null}function rf(e){switch(e){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Y0()){case Is:return 1;case Vc:return 4;case Wi:case G0:return 16;case Zc:return 536870912;default:return 16}default:return 16}}var Rt=null,Ps=null,Ei=null;function of(){if(Ei)return Ei;var e,t=Ps,n=t.length,r,i="value"in Rt?Rt.value:Rt.textContent,o=i.length;for(e=0;e<n&&t[e]===i[e];e++);var l=n-e;for(r=1;r<=l&&t[n-r]===i[o-r];r++);return Ei=i.slice(e,1<r?1-r:void 0)}function Ti(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 li(){return!0}function Ha(){return!1}function He(e){function t(n,r,i,o,l){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=o,this.target=l,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(o):o[a]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?li:Ha,this.isPropagationStopped=Ha,this}return re(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=li)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=li)},persist:function(){},isPersistent:li}),t}var Xn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Rs=He(Xn),Xr=re({},Xn,{view:0,detail:0}),cp=He(Xr),Wo,Bo,tr,vo=re({},Xr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ns,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!==tr&&(tr&&e.type==="mousemove"?(Wo=e.screenX-tr.screenX,Bo=e.screenY-tr.screenY):Bo=Wo=0,tr=e),Wo)},movementY:function(e){return"movementY"in e?e.movementY:Bo}}),$a=He(vo),fp=re({},vo,{dataTransfer:0}),dp=He(fp),pp=re({},Xr,{relatedTarget:0}),Qo=He(pp),hp=re({},Xn,{animationName:0,elapsedTime:0,pseudoElement:0}),gp=He(hp),mp=re({},Xn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),yp=He(mp),xp=re({},Xn,{data:0}),Fa=He(xp),vp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},wp={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"},Sp={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function kp(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Sp[e])?!!t[e]:!1}function Ns(){return kp}var _p=re({},Xr,{key:function(e){if(e.key){var t=vp[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ti(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?wp[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ns,charCode:function(e){return e.type==="keypress"?Ti(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ti(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),jp=He(_p),Cp=re({},vo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Wa=He(Cp),Ep=re({},Xr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ns}),Tp=He(Ep),Lp=re({},Xn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ip=He(Lp),Mp=re({},vo,{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}),zp=He(Mp),Ap=[9,13,27,32],bs=St&&"CompositionEvent"in window,gr=null;St&&"documentMode"in document&&(gr=document.documentMode);var Pp=St&&"TextEvent"in window&&!gr,lf=St&&(!bs||gr&&8<gr&&11>=gr),Ba=" ",Qa=!1;function sf(e,t){switch(e){case"keyup":return Ap.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function af(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var xn=!1;function Rp(e,t){switch(e){case"compositionend":return af(t);case"keypress":return t.which!==32?null:(Qa=!0,Ba);case"textInput":return e=t.data,e===Ba&&Qa?null:e;default:return null}}function Np(e,t){if(xn)return e==="compositionend"||!bs&&sf(e,t)?(e=of(),Ei=Ps=Rt=null,xn=!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 lf&&t.locale!=="ko"?null:t.data;default:return null}}var bp={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 Ka(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!bp[e.type]:t==="textarea"}function uf(e,t,n,r){Hc(r),t=Xi(t,"onChange"),0<t.length&&(n=new Rs("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var mr=null,Lr=null;function Dp(e){wf(e,0)}function wo(e){var t=Sn(e);if(Ac(t))return e}function Op(e,t){if(e==="change")return t}var cf=!1;if(St){var Ko;if(St){var Xo="oninput"in document;if(!Xo){var Xa=document.createElement("div");Xa.setAttribute("oninput","return;"),Xo=typeof Xa.oninput=="function"}Ko=Xo}else Ko=!1;cf=Ko&&(!document.documentMode||9<document.documentMode)}function Ua(){mr&&(mr.detachEvent("onpropertychange",ff),Lr=mr=null)}function ff(e){if(e.propertyName==="value"&&wo(Lr)){var t=[];uf(t,Lr,e,Ls(e)),Bc(Dp,t)}}function Hp(e,t,n){e==="focusin"?(Ua(),mr=t,Lr=n,mr.attachEvent("onpropertychange",ff)):e==="focusout"&&Ua()}function $p(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return wo(Lr)}function Fp(e,t){if(e==="click")return wo(t)}function Wp(e,t){if(e==="input"||e==="change")return wo(t)}function Bp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var nt=typeof Object.is=="function"?Object.is:Bp;function Ir(e,t){if(nt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!gl.call(t,i)||!nt(e[i],t[i]))return!1}return!0}function Va(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Za(e,t){var n=Va(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Va(n)}}function df(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?df(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function pf(){for(var e=window,t=Hi();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Hi(e.document)}return t}function Ds(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")}function Qp(e){var t=pf(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&df(n.ownerDocument.documentElement,n)){if(r!==null&&Ds(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=Za(n,o);var l=Za(n,r);i&&l&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Kp=St&&"documentMode"in document&&11>=document.documentMode,vn=null,Rl=null,yr=null,Nl=!1;function Ya(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Nl||vn==null||vn!==Hi(r)||(r=vn,"selectionStart"in r&&Ds(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),yr&&Ir(yr,r)||(yr=r,r=Xi(Rl,"onSelect"),0<r.length&&(t=new Rs("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=vn)))}function si(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var wn={animationend:si("Animation","AnimationEnd"),animationiteration:si("Animation","AnimationIteration"),animationstart:si("Animation","AnimationStart"),transitionend:si("Transition","TransitionEnd")},Uo={},hf={};St&&(hf=document.createElement("div").style,"AnimationEvent"in window||(delete wn.animationend.animation,delete wn.animationiteration.animation,delete wn.animationstart.animation),"TransitionEvent"in window||delete wn.transitionend.transition);function So(e){if(Uo[e])return Uo[e];if(!wn[e])return e;var t=wn[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in hf)return Uo[e]=t[n];return e}var gf=So("animationend"),mf=So("animationiteration"),yf=So("animationstart"),xf=So("transitionend"),vf=new Map,Ga="abort auxClick 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(" ");function Ut(e,t){vf.set(e,t),pn(t,[e])}for(var Vo=0;Vo<Ga.length;Vo++){var Zo=Ga[Vo],Xp=Zo.toLowerCase(),Up=Zo[0].toUpperCase()+Zo.slice(1);Ut(Xp,"on"+Up)}Ut(gf,"onAnimationEnd");Ut(mf,"onAnimationIteration");Ut(yf,"onAnimationStart");Ut("dblclick","onDoubleClick");Ut("focusin","onFocus");Ut("focusout","onBlur");Ut(xf,"onTransitionEnd");bn("onMouseEnter",["mouseout","mouseover"]);bn("onMouseLeave",["mouseout","mouseover"]);bn("onPointerEnter",["pointerout","pointerover"]);bn("onPointerLeave",["pointerout","pointerover"]);pn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));pn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));pn("onBeforeInput",["compositionend","keypress","textInput","paste"]);pn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));pn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));pn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var cr="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(" "),Vp=new Set("cancel close invalid load scroll toggle".split(" ").concat(cr));function qa(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,X0(r,t,void 0,e),e.currentTarget=null}function wf(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var l=r.length-1;0<=l;l--){var a=r[l],u=a.instance,c=a.currentTarget;if(a=a.listener,u!==o&&i.isPropagationStopped())break e;qa(i,a,c),o=u}else for(l=0;l<r.length;l++){if(a=r[l],u=a.instance,c=a.currentTarget,a=a.listener,u!==o&&i.isPropagationStopped())break e;qa(i,a,c),o=u}}}if(Fi)throw e=Ml,Fi=!1,Ml=null,e}function G(e,t){var n=t[$l];n===void 0&&(n=t[$l]=new Set);var r=e+"__bubble";n.has(r)||(Sf(t,e,2,!1),n.add(r))}function Yo(e,t,n){var r=0;t&&(r|=4),Sf(n,e,r,t)}var ai="_reactListening"+Math.random().toString(36).slice(2);function Mr(e){if(!e[ai]){e[ai]=!0,Tc.forEach(function(n){n!=="selectionchange"&&(Vp.has(n)||Yo(n,!1,e),Yo(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ai]||(t[ai]=!0,Yo("selectionchange",!1,t))}}function Sf(e,t,n,r){switch(rf(t)){case 1:var i=ap;break;case 4:i=up;break;default:i=As}n=i.bind(null,t,n,e),i=void 0,!Il||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Go(e,t,n,r,i){var o=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var l=r.tag;if(l===3||l===4){var a=r.stateNode.containerInfo;if(a===i||a.nodeType===8&&a.parentNode===i)break;if(l===4)for(l=r.return;l!==null;){var u=l.tag;if((u===3||u===4)&&(u=l.stateNode.containerInfo,u===i||u.nodeType===8&&u.parentNode===i))return;l=l.return}for(;a!==null;){if(l=qt(a),l===null)return;if(u=l.tag,u===5||u===6){r=o=l;continue e}a=a.parentNode}}r=r.return}Bc(function(){var c=o,d=Ls(n),g=[];e:{var f=vf.get(e);if(f!==void 0){var y=Rs,k=e;switch(e){case"keypress":if(Ti(n)===0)break e;case"keydown":case"keyup":y=jp;break;case"focusin":k="focus",y=Qo;break;case"focusout":k="blur",y=Qo;break;case"beforeblur":case"afterblur":y=Qo;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":y=$a;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":y=dp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":y=Tp;break;case gf:case mf:case yf:y=gp;break;case xf:y=Ip;break;case"scroll":y=cp;break;case"wheel":y=zp;break;case"copy":case"cut":case"paste":y=yp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":y=Wa}var v=(t&4)!==0,w=!v&&e==="scroll",p=v?f!==null?f+"Capture":null:f;v=[];for(var h=c,x;h!==null;){x=h;var m=x.stateNode;if(x.tag===5&&m!==null&&(x=m,p!==null&&(m=jr(h,p),m!=null&&v.push(zr(h,m,x)))),w)break;h=h.return}0<v.length&&(f=new y(f,k,null,n,d),g.push({event:f,listeners:v}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",y=e==="mouseout"||e==="pointerout",f&&n!==Tl&&(k=n.relatedTarget||n.fromElement)&&(qt(k)||k[kt]))break e;if((y||f)&&(f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window,y?(k=n.relatedTarget||n.toElement,y=c,k=k?qt(k):null,k!==null&&(w=hn(k),k!==w||k.tag!==5&&k.tag!==6)&&(k=null)):(y=null,k=c),y!==k)){if(v=$a,m="onMouseLeave",p="onMouseEnter",h="mouse",(e==="pointerout"||e==="pointerover")&&(v=Wa,m="onPointerLeave",p="onPointerEnter",h="pointer"),w=y==null?f:Sn(y),x=k==null?f:Sn(k),f=new v(m,h+"leave",y,n,d),f.target=w,f.relatedTarget=x,m=null,qt(d)===c&&(v=new v(p,h+"enter",k,n,d),v.target=x,v.relatedTarget=w,m=v),w=m,y&&k)t:{for(v=y,p=k,h=0,x=v;x;x=gn(x))h++;for(x=0,m=p;m;m=gn(m))x++;for(;0<h-x;)v=gn(v),h--;for(;0<x-h;)p=gn(p),x--;for(;h--;){if(v===p||p!==null&&v===p.alternate)break t;v=gn(v),p=gn(p)}v=null}else v=null;y!==null&&Ja(g,f,y,v,!1),k!==null&&w!==null&&Ja(g,w,k,v,!0)}}e:{if(f=c?Sn(c):window,y=f.nodeName&&f.nodeName.toLowerCase(),y==="select"||y==="input"&&f.type==="file")var _=Op;else if(Ka(f))if(cf)_=Wp;else{_=$p;var C=Hp}else(y=f.nodeName)&&y.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(_=Fp);if(_&&(_=_(e,c))){uf(g,_,n,d);break e}C&&C(e,f,c),e==="focusout"&&(C=f._wrapperState)&&C.controlled&&f.type==="number"&&kl(f,"number",f.value)}switch(C=c?Sn(c):window,e){case"focusin":(Ka(C)||C.contentEditable==="true")&&(vn=C,Rl=c,yr=null);break;case"focusout":yr=Rl=vn=null;break;case"mousedown":Nl=!0;break;case"contextmenu":case"mouseup":case"dragend":Nl=!1,Ya(g,n,d);break;case"selectionchange":if(Kp)break;case"keydown":case"keyup":Ya(g,n,d)}var E;if(bs)e:{switch(e){case"compositionstart":var j="onCompositionStart";break e;case"compositionend":j="onCompositionEnd";break e;case"compositionupdate":j="onCompositionUpdate";break e}j=void 0}else xn?sf(e,n)&&(j="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(j="onCompositionStart");j&&(lf&&n.locale!=="ko"&&(xn||j!=="onCompositionStart"?j==="onCompositionEnd"&&xn&&(E=of()):(Rt=d,Ps="value"in Rt?Rt.value:Rt.textContent,xn=!0)),C=Xi(c,j),0<C.length&&(j=new Fa(j,e,null,n,d),g.push({event:j,listeners:C}),E?j.data=E:(E=af(n),E!==null&&(j.data=E)))),(E=Pp?Rp(e,n):Np(e,n))&&(c=Xi(c,"onBeforeInput"),0<c.length&&(d=new Fa("onBeforeInput","beforeinput",null,n,d),g.push({event:d,listeners:c}),d.data=E))}wf(g,t)})}function zr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Xi(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=jr(e,n),o!=null&&r.unshift(zr(e,o,i)),o=jr(e,t),o!=null&&r.push(zr(e,o,i))),e=e.return}return r}function gn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Ja(e,t,n,r,i){for(var o=t._reactName,l=[];n!==null&&n!==r;){var a=n,u=a.alternate,c=a.stateNode;if(u!==null&&u===r)break;a.tag===5&&c!==null&&(a=c,i?(u=jr(n,o),u!=null&&l.unshift(zr(n,u,a))):i||(u=jr(n,o),u!=null&&l.push(zr(n,u,a)))),n=n.return}l.length!==0&&e.push({event:t,listeners:l})}var Zp=/\r\n?/g,Yp=/\u0000|\uFFFD/g;function eu(e){return(typeof e=="string"?e:""+e).replace(Zp,`
38
+ `).replace(Yp,"")}function ui(e,t,n){if(t=eu(t),eu(e)!==t&&n)throw Error(z(425))}function Ui(){}var bl=null,Dl=null;function Ol(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Hl=typeof setTimeout=="function"?setTimeout:void 0,Gp=typeof clearTimeout=="function"?clearTimeout:void 0,tu=typeof Promise=="function"?Promise:void 0,qp=typeof queueMicrotask=="function"?queueMicrotask:typeof tu<"u"?function(e){return tu.resolve(null).then(e).catch(Jp)}:Hl;function Jp(e){setTimeout(function(){throw e})}function qo(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),Tr(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Tr(t)}function $t(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==="$?")break;if(t==="/$")return null}}return e}function nu(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}var Un=Math.random().toString(36).slice(2),lt="__reactFiber$"+Un,Ar="__reactProps$"+Un,kt="__reactContainer$"+Un,$l="__reactEvents$"+Un,eh="__reactListeners$"+Un,th="__reactHandles$"+Un;function qt(e){var t=e[lt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[kt]||n[lt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=nu(e);e!==null;){if(n=e[lt])return n;e=nu(e)}return t}e=n,n=e.parentNode}return null}function Ur(e){return e=e[lt]||e[kt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Sn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(z(33))}function ko(e){return e[Ar]||null}var Fl=[],kn=-1;function Vt(e){return{current:e}}function q(e){0>kn||(e.current=Fl[kn],Fl[kn]=null,kn--)}function Y(e,t){kn++,Fl[kn]=e.current,e.current=t}var Xt={},we=Vt(Xt),Me=Vt(!1),sn=Xt;function Dn(e,t){var n=e.type.contextTypes;if(!n)return Xt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function ze(e){return e=e.childContextTypes,e!=null}function Vi(){q(Me),q(we)}function ru(e,t,n){if(we.current!==Xt)throw Error(z(168));Y(we,t),Y(Me,n)}function kf(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(z(108,H0(e)||"Unknown",i));return re({},n,r)}function Zi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Xt,sn=we.current,Y(we,e),Y(Me,Me.current),!0}function iu(e,t,n){var r=e.stateNode;if(!r)throw Error(z(169));n?(e=kf(e,t,sn),r.__reactInternalMemoizedMergedChildContext=e,q(Me),q(we),Y(we,e)):q(Me),Y(Me,n)}var mt=null,_o=!1,Jo=!1;function _f(e){mt===null?mt=[e]:mt.push(e)}function nh(e){_o=!0,_f(e)}function Zt(){if(!Jo&&mt!==null){Jo=!0;var e=0,t=Z;try{var n=mt;for(Z=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}mt=null,_o=!1}catch(i){throw mt!==null&&(mt=mt.slice(e+1)),Uc(Is,Zt),i}finally{Z=t,Jo=!1}}return null}var _n=[],jn=0,Yi=null,Gi=0,We=[],Be=0,an=null,yt=1,xt="";function Yt(e,t){_n[jn++]=Gi,_n[jn++]=Yi,Yi=e,Gi=t}function jf(e,t,n){We[Be++]=yt,We[Be++]=xt,We[Be++]=an,an=e;var r=yt;e=xt;var i=32-et(r)-1;r&=~(1<<i),n+=1;var o=32-et(t)+i;if(30<o){var l=i-i%5;o=(r&(1<<l)-1).toString(32),r>>=l,i-=l,yt=1<<32-et(t)+i|n<<i|r,xt=o+e}else yt=1<<o|n<<i|r,xt=e}function Os(e){e.return!==null&&(Yt(e,1),jf(e,1,0))}function Hs(e){for(;e===Yi;)Yi=_n[--jn],_n[jn]=null,Gi=_n[--jn],_n[jn]=null;for(;e===an;)an=We[--Be],We[Be]=null,xt=We[--Be],We[Be]=null,yt=We[--Be],We[Be]=null}var Ne=null,Re=null,J=!1,qe=null;function Cf(e,t){var n=Qe(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function ou(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Ne=e,Re=$t(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ne=e,Re=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=an!==null?{id:yt,overflow:xt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Qe(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ne=e,Re=null,!0):!1;default:return!1}}function Wl(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Bl(e){if(J){var t=Re;if(t){var n=t;if(!ou(e,t)){if(Wl(e))throw Error(z(418));t=$t(n.nextSibling);var r=Ne;t&&ou(e,t)?Cf(r,n):(e.flags=e.flags&-4097|2,J=!1,Ne=e)}}else{if(Wl(e))throw Error(z(418));e.flags=e.flags&-4097|2,J=!1,Ne=e}}}function lu(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ne=e}function ci(e){if(e!==Ne)return!1;if(!J)return lu(e),J=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Ol(e.type,e.memoizedProps)),t&&(t=Re)){if(Wl(e))throw Ef(),Error(z(418));for(;t;)Cf(e,t),t=$t(t.nextSibling)}if(lu(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(z(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Re=$t(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Re=null}}else Re=Ne?$t(e.stateNode.nextSibling):null;return!0}function Ef(){for(var e=Re;e;)e=$t(e.nextSibling)}function On(){Re=Ne=null,J=!1}function $s(e){qe===null?qe=[e]:qe.push(e)}var rh=Et.ReactCurrentBatchConfig;function nr(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(z(309));var r=n.stateNode}if(!r)throw Error(z(147,e));var i=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(l){var a=i.refs;l===null?delete a[o]:a[o]=l},t._stringRef=o,t)}if(typeof e!="string")throw Error(z(284));if(!n._owner)throw Error(z(290,e))}return e}function fi(e,t){throw e=Object.prototype.toString.call(t),Error(z(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function su(e){var t=e._init;return t(e._payload)}function Tf(e){function t(p,h){if(e){var x=p.deletions;x===null?(p.deletions=[h],p.flags|=16):x.push(h)}}function n(p,h){if(!e)return null;for(;h!==null;)t(p,h),h=h.sibling;return null}function r(p,h){for(p=new Map;h!==null;)h.key!==null?p.set(h.key,h):p.set(h.index,h),h=h.sibling;return p}function i(p,h){return p=Qt(p,h),p.index=0,p.sibling=null,p}function o(p,h,x){return p.index=x,e?(x=p.alternate,x!==null?(x=x.index,x<h?(p.flags|=2,h):x):(p.flags|=2,h)):(p.flags|=1048576,h)}function l(p){return e&&p.alternate===null&&(p.flags|=2),p}function a(p,h,x,m){return h===null||h.tag!==6?(h=ll(x,p.mode,m),h.return=p,h):(h=i(h,x),h.return=p,h)}function u(p,h,x,m){var _=x.type;return _===yn?d(p,h,x.props.children,m,x.key):h!==null&&(h.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===It&&su(_)===h.type)?(m=i(h,x.props),m.ref=nr(p,h,x),m.return=p,m):(m=Ri(x.type,x.key,x.props,null,p.mode,m),m.ref=nr(p,h,x),m.return=p,m)}function c(p,h,x,m){return h===null||h.tag!==4||h.stateNode.containerInfo!==x.containerInfo||h.stateNode.implementation!==x.implementation?(h=sl(x,p.mode,m),h.return=p,h):(h=i(h,x.children||[]),h.return=p,h)}function d(p,h,x,m,_){return h===null||h.tag!==7?(h=rn(x,p.mode,m,_),h.return=p,h):(h=i(h,x),h.return=p,h)}function g(p,h,x){if(typeof h=="string"&&h!==""||typeof h=="number")return h=ll(""+h,p.mode,x),h.return=p,h;if(typeof h=="object"&&h!==null){switch(h.$$typeof){case ei:return x=Ri(h.type,h.key,h.props,null,p.mode,x),x.ref=nr(p,null,h),x.return=p,x;case mn:return h=sl(h,p.mode,x),h.return=p,h;case It:var m=h._init;return g(p,m(h._payload),x)}if(ar(h)||Gn(h))return h=rn(h,p.mode,x,null),h.return=p,h;fi(p,h)}return null}function f(p,h,x,m){var _=h!==null?h.key:null;if(typeof x=="string"&&x!==""||typeof x=="number")return _!==null?null:a(p,h,""+x,m);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case ei:return x.key===_?u(p,h,x,m):null;case mn:return x.key===_?c(p,h,x,m):null;case It:return _=x._init,f(p,h,_(x._payload),m)}if(ar(x)||Gn(x))return _!==null?null:d(p,h,x,m,null);fi(p,x)}return null}function y(p,h,x,m,_){if(typeof m=="string"&&m!==""||typeof m=="number")return p=p.get(x)||null,a(h,p,""+m,_);if(typeof m=="object"&&m!==null){switch(m.$$typeof){case ei:return p=p.get(m.key===null?x:m.key)||null,u(h,p,m,_);case mn:return p=p.get(m.key===null?x:m.key)||null,c(h,p,m,_);case It:var C=m._init;return y(p,h,x,C(m._payload),_)}if(ar(m)||Gn(m))return p=p.get(x)||null,d(h,p,m,_,null);fi(h,m)}return null}function k(p,h,x,m){for(var _=null,C=null,E=h,j=h=0,D=null;E!==null&&j<x.length;j++){E.index>j?(D=E,E=null):D=E.sibling;var R=f(p,E,x[j],m);if(R===null){E===null&&(E=D);break}e&&E&&R.alternate===null&&t(p,E),h=o(R,h,j),C===null?_=R:C.sibling=R,C=R,E=D}if(j===x.length)return n(p,E),J&&Yt(p,j),_;if(E===null){for(;j<x.length;j++)E=g(p,x[j],m),E!==null&&(h=o(E,h,j),C===null?_=E:C.sibling=E,C=E);return J&&Yt(p,j),_}for(E=r(p,E);j<x.length;j++)D=y(E,p,j,x[j],m),D!==null&&(e&&D.alternate!==null&&E.delete(D.key===null?j:D.key),h=o(D,h,j),C===null?_=D:C.sibling=D,C=D);return e&&E.forEach(function(H){return t(p,H)}),J&&Yt(p,j),_}function v(p,h,x,m){var _=Gn(x);if(typeof _!="function")throw Error(z(150));if(x=_.call(x),x==null)throw Error(z(151));for(var C=_=null,E=h,j=h=0,D=null,R=x.next();E!==null&&!R.done;j++,R=x.next()){E.index>j?(D=E,E=null):D=E.sibling;var H=f(p,E,R.value,m);if(H===null){E===null&&(E=D);break}e&&E&&H.alternate===null&&t(p,E),h=o(H,h,j),C===null?_=H:C.sibling=H,C=H,E=D}if(R.done)return n(p,E),J&&Yt(p,j),_;if(E===null){for(;!R.done;j++,R=x.next())R=g(p,R.value,m),R!==null&&(h=o(R,h,j),C===null?_=R:C.sibling=R,C=R);return J&&Yt(p,j),_}for(E=r(p,E);!R.done;j++,R=x.next())R=y(E,p,j,R.value,m),R!==null&&(e&&R.alternate!==null&&E.delete(R.key===null?j:R.key),h=o(R,h,j),C===null?_=R:C.sibling=R,C=R);return e&&E.forEach(function(B){return t(p,B)}),J&&Yt(p,j),_}function w(p,h,x,m){if(typeof x=="object"&&x!==null&&x.type===yn&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case ei:e:{for(var _=x.key,C=h;C!==null;){if(C.key===_){if(_=x.type,_===yn){if(C.tag===7){n(p,C.sibling),h=i(C,x.props.children),h.return=p,p=h;break e}}else if(C.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===It&&su(_)===C.type){n(p,C.sibling),h=i(C,x.props),h.ref=nr(p,C,x),h.return=p,p=h;break e}n(p,C);break}else t(p,C);C=C.sibling}x.type===yn?(h=rn(x.props.children,p.mode,m,x.key),h.return=p,p=h):(m=Ri(x.type,x.key,x.props,null,p.mode,m),m.ref=nr(p,h,x),m.return=p,p=m)}return l(p);case mn:e:{for(C=x.key;h!==null;){if(h.key===C)if(h.tag===4&&h.stateNode.containerInfo===x.containerInfo&&h.stateNode.implementation===x.implementation){n(p,h.sibling),h=i(h,x.children||[]),h.return=p,p=h;break e}else{n(p,h);break}else t(p,h);h=h.sibling}h=sl(x,p.mode,m),h.return=p,p=h}return l(p);case It:return C=x._init,w(p,h,C(x._payload),m)}if(ar(x))return k(p,h,x,m);if(Gn(x))return v(p,h,x,m);fi(p,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,h!==null&&h.tag===6?(n(p,h.sibling),h=i(h,x),h.return=p,p=h):(n(p,h),h=ll(x,p.mode,m),h.return=p,p=h),l(p)):n(p,h)}return w}var Hn=Tf(!0),Lf=Tf(!1),qi=Vt(null),Ji=null,Cn=null,Fs=null;function Ws(){Fs=Cn=Ji=null}function Bs(e){var t=qi.current;q(qi),e._currentValue=t}function Ql(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function An(e,t){Ji=e,Fs=Cn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Le=!0),e.firstContext=null)}function Xe(e){var t=e._currentValue;if(Fs!==e)if(e={context:e,memoizedValue:t,next:null},Cn===null){if(Ji===null)throw Error(z(308));Cn=e,Ji.dependencies={lanes:0,firstContext:e}}else Cn=Cn.next=e;return t}var Jt=null;function Qs(e){Jt===null?Jt=[e]:Jt.push(e)}function If(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Qs(t)):(n.next=i.next,i.next=n),t.interleaved=n,_t(e,r)}function _t(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Mt=!1;function Ks(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Mf(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function wt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ft(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,K&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,_t(e,n)}return i=r.interleaved,i===null?(t.next=t,Qs(r)):(t.next=i.next,i.next=t),r.interleaved=t,_t(e,n)}function Li(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ms(e,n)}}function au(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var l={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=l:o=o.next=l,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function eo(e,t,n,r){var i=e.updateQueue;Mt=!1;var o=i.firstBaseUpdate,l=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var u=a,c=u.next;u.next=null,l===null?o=c:l.next=c,l=u;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==l&&(a===null?d.firstBaseUpdate=c:a.next=c,d.lastBaseUpdate=u))}if(o!==null){var g=i.baseState;l=0,d=c=u=null,a=o;do{var f=a.lane,y=a.eventTime;if((r&f)===f){d!==null&&(d=d.next={eventTime:y,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var k=e,v=a;switch(f=t,y=n,v.tag){case 1:if(k=v.payload,typeof k=="function"){g=k.call(y,g,f);break e}g=k;break e;case 3:k.flags=k.flags&-65537|128;case 0:if(k=v.payload,f=typeof k=="function"?k.call(y,g,f):k,f==null)break e;g=re({},g,f);break e;case 2:Mt=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[a]:f.push(a))}else y={eventTime:y,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(c=d=y,u=g):d=d.next=y,l|=f;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;f=a,a=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(d===null&&(u=g),i.baseState=u,i.firstBaseUpdate=c,i.lastBaseUpdate=d,t=i.shared.interleaved,t!==null){i=t;do l|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);cn|=l,e.lanes=l,e.memoizedState=g}}function uu(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(z(191,i));i.call(r)}}}var Vr={},ut=Vt(Vr),Pr=Vt(Vr),Rr=Vt(Vr);function en(e){if(e===Vr)throw Error(z(174));return e}function Xs(e,t){switch(Y(Rr,t),Y(Pr,e),Y(ut,Vr),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:jl(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=jl(t,e)}q(ut),Y(ut,t)}function $n(){q(ut),q(Pr),q(Rr)}function zf(e){en(Rr.current);var t=en(ut.current),n=jl(t,e.type);t!==n&&(Y(Pr,e),Y(ut,n))}function Us(e){Pr.current===e&&(q(ut),q(Pr))}var te=Vt(0);function to(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==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)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}var el=[];function Vs(){for(var e=0;e<el.length;e++)el[e]._workInProgressVersionPrimary=null;el.length=0}var Ii=Et.ReactCurrentDispatcher,tl=Et.ReactCurrentBatchConfig,un=0,ne=null,ue=null,de=null,no=!1,xr=!1,Nr=0,ih=0;function ye(){throw Error(z(321))}function Zs(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!nt(e[n],t[n]))return!1;return!0}function Ys(e,t,n,r,i,o){if(un=o,ne=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ii.current=e===null||e.memoizedState===null?ah:uh,e=n(r,i),xr){o=0;do{if(xr=!1,Nr=0,25<=o)throw Error(z(301));o+=1,de=ue=null,t.updateQueue=null,Ii.current=ch,e=n(r,i)}while(xr)}if(Ii.current=ro,t=ue!==null&&ue.next!==null,un=0,de=ue=ne=null,no=!1,t)throw Error(z(300));return e}function Gs(){var e=Nr!==0;return Nr=0,e}function ot(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return de===null?ne.memoizedState=de=e:de=de.next=e,de}function Ue(){if(ue===null){var e=ne.alternate;e=e!==null?e.memoizedState:null}else e=ue.next;var t=de===null?ne.memoizedState:de.next;if(t!==null)de=t,ue=e;else{if(e===null)throw Error(z(310));ue=e,e={memoizedState:ue.memoizedState,baseState:ue.baseState,baseQueue:ue.baseQueue,queue:ue.queue,next:null},de===null?ne.memoizedState=de=e:de=de.next=e}return de}function br(e,t){return typeof t=="function"?t(e):t}function nl(e){var t=Ue(),n=t.queue;if(n===null)throw Error(z(311));n.lastRenderedReducer=e;var r=ue,i=r.baseQueue,o=n.pending;if(o!==null){if(i!==null){var l=i.next;i.next=o.next,o.next=l}r.baseQueue=i=o,n.pending=null}if(i!==null){o=i.next,r=r.baseState;var a=l=null,u=null,c=o;do{var d=c.lane;if((un&d)===d)u!==null&&(u=u.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var g={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};u===null?(a=u=g,l=r):u=u.next=g,ne.lanes|=d,cn|=d}c=c.next}while(c!==null&&c!==o);u===null?l=r:u.next=a,nt(r,t.memoizedState)||(Le=!0),t.memoizedState=r,t.baseState=l,t.baseQueue=u,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do o=i.lane,ne.lanes|=o,cn|=o,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function rl(e){var t=Ue(),n=t.queue;if(n===null)throw Error(z(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var l=i=i.next;do o=e(o,l.action),l=l.next;while(l!==i);nt(o,t.memoizedState)||(Le=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Af(){}function Pf(e,t){var n=ne,r=Ue(),i=t(),o=!nt(r.memoizedState,i);if(o&&(r.memoizedState=i,Le=!0),r=r.queue,qs(bf.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||de!==null&&de.memoizedState.tag&1){if(n.flags|=2048,Dr(9,Nf.bind(null,n,r,i,t),void 0,null),pe===null)throw Error(z(349));un&30||Rf(n,t,i)}return i}function Rf(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ne.updateQueue,t===null?(t={lastEffect:null,stores:null},ne.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Nf(e,t,n,r){t.value=n,t.getSnapshot=r,Df(t)&&Of(e)}function bf(e,t,n){return n(function(){Df(t)&&Of(e)})}function Df(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!nt(e,n)}catch{return!0}}function Of(e){var t=_t(e,1);t!==null&&tt(t,e,1,-1)}function cu(e){var t=ot();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:br,lastRenderedState:e},t.queue=e,e=e.dispatch=sh.bind(null,ne,e),[t.memoizedState,e]}function Dr(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=ne.updateQueue,t===null?(t={lastEffect:null,stores:null},ne.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Hf(){return Ue().memoizedState}function Mi(e,t,n,r){var i=ot();ne.flags|=e,i.memoizedState=Dr(1|t,n,void 0,r===void 0?null:r)}function jo(e,t,n,r){var i=Ue();r=r===void 0?null:r;var o=void 0;if(ue!==null){var l=ue.memoizedState;if(o=l.destroy,r!==null&&Zs(r,l.deps)){i.memoizedState=Dr(t,n,o,r);return}}ne.flags|=e,i.memoizedState=Dr(1|t,n,o,r)}function fu(e,t){return Mi(8390656,8,e,t)}function qs(e,t){return jo(2048,8,e,t)}function $f(e,t){return jo(4,2,e,t)}function Ff(e,t){return jo(4,4,e,t)}function Wf(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Bf(e,t,n){return n=n!=null?n.concat([e]):null,jo(4,4,Wf.bind(null,t,e),n)}function Js(){}function Qf(e,t){var n=Ue();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Zs(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Kf(e,t){var n=Ue();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Zs(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Xf(e,t,n){return un&21?(nt(n,t)||(n=Yc(),ne.lanes|=n,cn|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Le=!0),e.memoizedState=n)}function oh(e,t){var n=Z;Z=n!==0&&4>n?n:4,e(!0);var r=tl.transition;tl.transition={};try{e(!1),t()}finally{Z=n,tl.transition=r}}function Uf(){return Ue().memoizedState}function lh(e,t,n){var r=Bt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Vf(e))Zf(t,n);else if(n=If(e,t,n,r),n!==null){var i=_e();tt(n,e,r,i),Yf(n,t,r)}}function sh(e,t,n){var r=Bt(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Vf(e))Zf(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var l=t.lastRenderedState,a=o(l,n);if(i.hasEagerState=!0,i.eagerState=a,nt(a,l)){var u=t.interleaved;u===null?(i.next=i,Qs(t)):(i.next=u.next,u.next=i),t.interleaved=i;return}}catch{}finally{}n=If(e,t,i,r),n!==null&&(i=_e(),tt(n,e,r,i),Yf(n,t,r))}}function Vf(e){var t=e.alternate;return e===ne||t!==null&&t===ne}function Zf(e,t){xr=no=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Yf(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ms(e,n)}}var ro={readContext:Xe,useCallback:ye,useContext:ye,useEffect:ye,useImperativeHandle:ye,useInsertionEffect:ye,useLayoutEffect:ye,useMemo:ye,useReducer:ye,useRef:ye,useState:ye,useDebugValue:ye,useDeferredValue:ye,useTransition:ye,useMutableSource:ye,useSyncExternalStore:ye,useId:ye,unstable_isNewReconciler:!1},ah={readContext:Xe,useCallback:function(e,t){return ot().memoizedState=[e,t===void 0?null:t],e},useContext:Xe,useEffect:fu,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Mi(4194308,4,Wf.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Mi(4194308,4,e,t)},useInsertionEffect:function(e,t){return Mi(4,2,e,t)},useMemo:function(e,t){var n=ot();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ot();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=lh.bind(null,ne,e),[r.memoizedState,e]},useRef:function(e){var t=ot();return e={current:e},t.memoizedState=e},useState:cu,useDebugValue:Js,useDeferredValue:function(e){return ot().memoizedState=e},useTransition:function(){var e=cu(!1),t=e[0];return e=oh.bind(null,e[1]),ot().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ne,i=ot();if(J){if(n===void 0)throw Error(z(407));n=n()}else{if(n=t(),pe===null)throw Error(z(349));un&30||Rf(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,fu(bf.bind(null,r,o,e),[e]),r.flags|=2048,Dr(9,Nf.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=ot(),t=pe.identifierPrefix;if(J){var n=xt,r=yt;n=(r&~(1<<32-et(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Nr++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=ih++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},uh={readContext:Xe,useCallback:Qf,useContext:Xe,useEffect:qs,useImperativeHandle:Bf,useInsertionEffect:$f,useLayoutEffect:Ff,useMemo:Kf,useReducer:nl,useRef:Hf,useState:function(){return nl(br)},useDebugValue:Js,useDeferredValue:function(e){var t=Ue();return Xf(t,ue.memoizedState,e)},useTransition:function(){var e=nl(br)[0],t=Ue().memoizedState;return[e,t]},useMutableSource:Af,useSyncExternalStore:Pf,useId:Uf,unstable_isNewReconciler:!1},ch={readContext:Xe,useCallback:Qf,useContext:Xe,useEffect:qs,useImperativeHandle:Bf,useInsertionEffect:$f,useLayoutEffect:Ff,useMemo:Kf,useReducer:rl,useRef:Hf,useState:function(){return rl(br)},useDebugValue:Js,useDeferredValue:function(e){var t=Ue();return ue===null?t.memoizedState=e:Xf(t,ue.memoizedState,e)},useTransition:function(){var e=rl(br)[0],t=Ue().memoizedState;return[e,t]},useMutableSource:Af,useSyncExternalStore:Pf,useId:Uf,unstable_isNewReconciler:!1};function Ye(e,t){if(e&&e.defaultProps){t=re({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Kl(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:re({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Co={isMounted:function(e){return(e=e._reactInternals)?hn(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=_e(),i=Bt(e),o=wt(r,i);o.payload=t,n!=null&&(o.callback=n),t=Ft(e,o,i),t!==null&&(tt(t,e,i,r),Li(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=_e(),i=Bt(e),o=wt(r,i);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=Ft(e,o,i),t!==null&&(tt(t,e,i,r),Li(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=_e(),r=Bt(e),i=wt(n,r);i.tag=2,t!=null&&(i.callback=t),t=Ft(e,i,r),t!==null&&(tt(t,e,r,n),Li(t,e,r))}};function du(e,t,n,r,i,o,l){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,l):t.prototype&&t.prototype.isPureReactComponent?!Ir(n,r)||!Ir(i,o):!0}function Gf(e,t,n){var r=!1,i=Xt,o=t.contextType;return typeof o=="object"&&o!==null?o=Xe(o):(i=ze(t)?sn:we.current,r=t.contextTypes,o=(r=r!=null)?Dn(e,i):Xt),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Co,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function pu(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Co.enqueueReplaceState(t,t.state,null)}function Xl(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Ks(e);var o=t.contextType;typeof o=="object"&&o!==null?i.context=Xe(o):(o=ze(t)?sn:we.current,i.context=Dn(e,o)),i.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(Kl(e,t,o,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&Co.enqueueReplaceState(i,i.state,null),eo(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Fn(e,t){try{var n="",r=t;do n+=O0(r),r=r.return;while(r);var i=n}catch(o){i=`
39
+ Error generating stack: `+o.message+`
40
+ `+o.stack}return{value:e,source:t,stack:i,digest:null}}function il(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Ul(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var fh=typeof WeakMap=="function"?WeakMap:Map;function qf(e,t,n){n=wt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){oo||(oo=!0,rs=r),Ul(e,t)},n}function Jf(e,t,n){n=wt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Ul(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Ul(e,t),typeof r!="function"&&(Wt===null?Wt=new Set([this]):Wt.add(this));var l=t.stack;this.componentDidCatch(t.value,{componentStack:l!==null?l:""})}),n}function hu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new fh;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Ch.bind(null,e,t,n),t.then(e,e))}function gu(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function mu(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=wt(-1,1),t.tag=2,Ft(n,t,1))),n.lanes|=1),e)}var dh=Et.ReactCurrentOwner,Le=!1;function Se(e,t,n,r){t.child=e===null?Lf(t,null,n,r):Hn(t,e.child,n,r)}function yu(e,t,n,r,i){n=n.render;var o=t.ref;return An(t,i),r=Ys(e,t,n,r,o,i),n=Gs(),e!==null&&!Le?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,jt(e,t,i)):(J&&n&&Os(t),t.flags|=1,Se(e,t,r,i),t.child)}function xu(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!sa(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,ed(e,t,o,r,i)):(e=Ri(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var l=o.memoizedProps;if(n=n.compare,n=n!==null?n:Ir,n(l,r)&&e.ref===t.ref)return jt(e,t,i)}return t.flags|=1,e=Qt(o,r),e.ref=t.ref,e.return=t,t.child=e}function ed(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(Ir(o,r)&&e.ref===t.ref)if(Le=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(Le=!0);else return t.lanes=e.lanes,jt(e,t,i)}return Vl(e,t,n,r,i)}function td(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Y(Tn,Pe),Pe|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Y(Tn,Pe),Pe|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,Y(Tn,Pe),Pe|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,Y(Tn,Pe),Pe|=r;return Se(e,t,i,n),t.child}function nd(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Vl(e,t,n,r,i){var o=ze(n)?sn:we.current;return o=Dn(t,o),An(t,i),n=Ys(e,t,n,r,o,i),r=Gs(),e!==null&&!Le?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,jt(e,t,i)):(J&&r&&Os(t),t.flags|=1,Se(e,t,n,i),t.child)}function vu(e,t,n,r,i){if(ze(n)){var o=!0;Zi(t)}else o=!1;if(An(t,i),t.stateNode===null)zi(e,t),Gf(t,n,r),Xl(t,n,r,i),r=!0;else if(e===null){var l=t.stateNode,a=t.memoizedProps;l.props=a;var u=l.context,c=n.contextType;typeof c=="object"&&c!==null?c=Xe(c):(c=ze(n)?sn:we.current,c=Dn(t,c));var d=n.getDerivedStateFromProps,g=typeof d=="function"||typeof l.getSnapshotBeforeUpdate=="function";g||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(a!==r||u!==c)&&pu(t,l,r,c),Mt=!1;var f=t.memoizedState;l.state=f,eo(t,r,l,i),u=t.memoizedState,a!==r||f!==u||Me.current||Mt?(typeof d=="function"&&(Kl(t,n,d,r),u=t.memoizedState),(a=Mt||du(t,n,a,r,f,u,c))?(g||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount()),typeof l.componentDidMount=="function"&&(t.flags|=4194308)):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),l.props=r,l.state=u,l.context=c,r=a):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{l=t.stateNode,Mf(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:Ye(t.type,a),l.props=c,g=t.pendingProps,f=l.context,u=n.contextType,typeof u=="object"&&u!==null?u=Xe(u):(u=ze(n)?sn:we.current,u=Dn(t,u));var y=n.getDerivedStateFromProps;(d=typeof y=="function"||typeof l.getSnapshotBeforeUpdate=="function")||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(a!==g||f!==u)&&pu(t,l,r,u),Mt=!1,f=t.memoizedState,l.state=f,eo(t,r,l,i);var k=t.memoizedState;a!==g||f!==k||Me.current||Mt?(typeof y=="function"&&(Kl(t,n,y,r),k=t.memoizedState),(c=Mt||du(t,n,c,r,f,k,u)||!1)?(d||typeof l.UNSAFE_componentWillUpdate!="function"&&typeof l.componentWillUpdate!="function"||(typeof l.componentWillUpdate=="function"&&l.componentWillUpdate(r,k,u),typeof l.UNSAFE_componentWillUpdate=="function"&&l.UNSAFE_componentWillUpdate(r,k,u)),typeof l.componentDidUpdate=="function"&&(t.flags|=4),typeof l.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof l.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=k),l.props=r,l.state=k,l.context=u,r=c):(typeof l.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Zl(e,t,n,r,o,i)}function Zl(e,t,n,r,i,o){nd(e,t);var l=(t.flags&128)!==0;if(!r&&!l)return i&&iu(t,n,!1),jt(e,t,o);r=t.stateNode,dh.current=t;var a=l&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&l?(t.child=Hn(t,e.child,null,o),t.child=Hn(t,null,a,o)):Se(e,t,a,o),t.memoizedState=r.state,i&&iu(t,n,!0),t.child}function rd(e){var t=e.stateNode;t.pendingContext?ru(e,t.pendingContext,t.pendingContext!==t.context):t.context&&ru(e,t.context,!1),Xs(e,t.containerInfo)}function wu(e,t,n,r,i){return On(),$s(i),t.flags|=256,Se(e,t,n,r),t.child}var Yl={dehydrated:null,treeContext:null,retryLane:0};function Gl(e){return{baseLanes:e,cachePool:null,transitions:null}}function id(e,t,n){var r=t.pendingProps,i=te.current,o=!1,l=(t.flags&128)!==0,a;if((a=l)||(a=e!==null&&e.memoizedState===null?!1:(i&2)!==0),a?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Y(te,i&1),e===null)return Bl(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(l=r.children,e=r.fallback,o?(r=t.mode,o=t.child,l={mode:"hidden",children:l},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=l):o=Lo(l,r,0,null),e=rn(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Gl(n),t.memoizedState=Yl,e):ea(t,l));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return ph(e,t,l,r,a,i,n);if(o){o=r.fallback,l=t.mode,i=e.child,a=i.sibling;var u={mode:"hidden",children:r.children};return!(l&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=Qt(i,u),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?o=Qt(a,o):(o=rn(o,l,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,l=e.child.memoizedState,l=l===null?Gl(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},o.memoizedState=l,o.childLanes=e.childLanes&~n,t.memoizedState=Yl,r}return o=e.child,e=o.sibling,r=Qt(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function ea(e,t){return t=Lo({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function di(e,t,n,r){return r!==null&&$s(r),Hn(t,e.child,null,n),e=ea(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function ph(e,t,n,r,i,o,l){if(n)return t.flags&256?(t.flags&=-257,r=il(Error(z(422))),di(e,t,l,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=Lo({mode:"visible",children:r.children},i,0,null),o=rn(o,i,l,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&Hn(t,e.child,null,l),t.child.memoizedState=Gl(l),t.memoizedState=Yl,o);if(!(t.mode&1))return di(e,t,l,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,o=Error(z(419)),r=il(o,r,void 0),di(e,t,l,r)}if(a=(l&e.childLanes)!==0,Le||a){if(r=pe,r!==null){switch(l&-l){case 4:i=2;break;case 16:i=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|l)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,_t(e,i),tt(r,e,i,-1))}return la(),r=il(Error(z(421))),di(e,t,l,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=Eh.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,Re=$t(i.nextSibling),Ne=t,J=!0,qe=null,e!==null&&(We[Be++]=yt,We[Be++]=xt,We[Be++]=an,yt=e.id,xt=e.overflow,an=t),t=ea(t,r.children),t.flags|=4096,t)}function Su(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ql(e.return,t,n)}function ol(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function od(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Se(e,t,r.children,n),r=te.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Su(e,n,t);else if(e.tag===19)Su(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}r&=1}if(Y(te,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&to(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),ol(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&to(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}ol(t,!0,n,null,o);break;case"together":ol(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function zi(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function jt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),cn|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(z(153));if(t.child!==null){for(e=t.child,n=Qt(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Qt(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function hh(e,t,n){switch(t.tag){case 3:rd(t),On();break;case 5:zf(t);break;case 1:ze(t.type)&&Zi(t);break;case 4:Xs(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Y(qi,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Y(te,te.current&1),t.flags|=128,null):n&t.child.childLanes?id(e,t,n):(Y(te,te.current&1),e=jt(e,t,n),e!==null?e.sibling:null);Y(te,te.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return od(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Y(te,te.current),r)break;return null;case 22:case 23:return t.lanes=0,td(e,t,n)}return jt(e,t,n)}var ld,ql,sd,ad;ld=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};ql=function(){};sd=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,en(ut.current);var o=null;switch(n){case"input":i=wl(e,i),r=wl(e,r),o=[];break;case"select":i=re({},i,{value:void 0}),r=re({},r,{value:void 0}),o=[];break;case"textarea":i=_l(e,i),r=_l(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Ui)}Cl(n,r);var l;n=null;for(c in i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var a=i[c];for(l in a)a.hasOwnProperty(l)&&(n||(n={}),n[l]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(kr.hasOwnProperty(c)?o||(o=[]):(o=o||[]).push(c,null));for(c in r){var u=r[c];if(a=i!=null?i[c]:void 0,r.hasOwnProperty(c)&&u!==a&&(u!=null||a!=null))if(c==="style")if(a){for(l in a)!a.hasOwnProperty(l)||u&&u.hasOwnProperty(l)||(n||(n={}),n[l]="");for(l in u)u.hasOwnProperty(l)&&a[l]!==u[l]&&(n||(n={}),n[l]=u[l])}else n||(o||(o=[]),o.push(c,n)),n=u;else c==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,a=a?a.__html:void 0,u!=null&&a!==u&&(o=o||[]).push(c,u)):c==="children"?typeof u!="string"&&typeof u!="number"||(o=o||[]).push(c,""+u):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(kr.hasOwnProperty(c)?(u!=null&&c==="onScroll"&&G("scroll",e),o||a===u||(o=[])):(o=o||[]).push(c,u))}n&&(o=o||[]).push("style",n);var c=o;(t.updateQueue=c)&&(t.flags|=4)}};ad=function(e,t,n,r){n!==r&&(t.flags|=4)};function rr(e,t){if(!J)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 r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function xe(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function gh(e,t,n){var r=t.pendingProps;switch(Hs(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return xe(t),null;case 1:return ze(t.type)&&Vi(),xe(t),null;case 3:return r=t.stateNode,$n(),q(Me),q(we),Vs(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(ci(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,qe!==null&&(ls(qe),qe=null))),ql(e,t),xe(t),null;case 5:Us(t);var i=en(Rr.current);if(n=t.type,e!==null&&t.stateNode!=null)sd(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(z(166));return xe(t),null}if(e=en(ut.current),ci(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[lt]=t,r[Ar]=o,e=(t.mode&1)!==0,n){case"dialog":G("cancel",r),G("close",r);break;case"iframe":case"object":case"embed":G("load",r);break;case"video":case"audio":for(i=0;i<cr.length;i++)G(cr[i],r);break;case"source":G("error",r);break;case"img":case"image":case"link":G("error",r),G("load",r);break;case"details":G("toggle",r);break;case"input":Ma(r,o),G("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},G("invalid",r);break;case"textarea":Aa(r,o),G("invalid",r)}Cl(n,o),i=null;for(var l in o)if(o.hasOwnProperty(l)){var a=o[l];l==="children"?typeof a=="string"?r.textContent!==a&&(o.suppressHydrationWarning!==!0&&ui(r.textContent,a,e),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(o.suppressHydrationWarning!==!0&&ui(r.textContent,a,e),i=["children",""+a]):kr.hasOwnProperty(l)&&a!=null&&l==="onScroll"&&G("scroll",r)}switch(n){case"input":ti(r),za(r,o,!0);break;case"textarea":ti(r),Pa(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=Ui)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{l=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Nc(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=l.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),n==="select"&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[lt]=t,e[Ar]=r,ld(e,t,!1,!1),t.stateNode=e;e:{switch(l=El(n,r),n){case"dialog":G("cancel",e),G("close",e),i=r;break;case"iframe":case"object":case"embed":G("load",e),i=r;break;case"video":case"audio":for(i=0;i<cr.length;i++)G(cr[i],e);i=r;break;case"source":G("error",e),i=r;break;case"img":case"image":case"link":G("error",e),G("load",e),i=r;break;case"details":G("toggle",e),i=r;break;case"input":Ma(e,r),i=wl(e,r),G("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=re({},r,{value:void 0}),G("invalid",e);break;case"textarea":Aa(e,r),i=_l(e,r),G("invalid",e);break;default:i=r}Cl(n,i),a=i;for(o in a)if(a.hasOwnProperty(o)){var u=a[o];o==="style"?Oc(e,u):o==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&bc(e,u)):o==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&_r(e,u):typeof u=="number"&&_r(e,""+u):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(kr.hasOwnProperty(o)?u!=null&&o==="onScroll"&&G("scroll",e):u!=null&&js(e,o,u,l))}switch(n){case"input":ti(e),za(e,r,!1);break;case"textarea":ti(e),Pa(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Kt(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?Ln(e,!!r.multiple,o,!1):r.defaultValue!=null&&Ln(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Ui)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return xe(t),null;case 6:if(e&&t.stateNode!=null)ad(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(z(166));if(n=en(Rr.current),en(ut.current),ci(t)){if(r=t.stateNode,n=t.memoizedProps,r[lt]=t,(o=r.nodeValue!==n)&&(e=Ne,e!==null))switch(e.tag){case 3:ui(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&ui(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[lt]=t,t.stateNode=r}return xe(t),null;case 13:if(q(te),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(J&&Re!==null&&t.mode&1&&!(t.flags&128))Ef(),On(),t.flags|=98560,o=!1;else if(o=ci(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(z(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(z(317));o[lt]=t}else On(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;xe(t),o=!1}else qe!==null&&(ls(qe),qe=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||te.current&1?ce===0&&(ce=3):la())),t.updateQueue!==null&&(t.flags|=4),xe(t),null);case 4:return $n(),ql(e,t),e===null&&Mr(t.stateNode.containerInfo),xe(t),null;case 10:return Bs(t.type._context),xe(t),null;case 17:return ze(t.type)&&Vi(),xe(t),null;case 19:if(q(te),o=t.memoizedState,o===null)return xe(t),null;if(r=(t.flags&128)!==0,l=o.rendering,l===null)if(r)rr(o,!1);else{if(ce!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(l=to(e),l!==null){for(t.flags|=128,rr(o,!1),r=l.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,l=o.alternate,l===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=l.childLanes,o.lanes=l.lanes,o.child=l.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=l.memoizedProps,o.memoizedState=l.memoizedState,o.updateQueue=l.updateQueue,o.type=l.type,e=l.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Y(te,te.current&1|2),t.child}e=e.sibling}o.tail!==null&&le()>Wn&&(t.flags|=128,r=!0,rr(o,!1),t.lanes=4194304)}else{if(!r)if(e=to(l),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),rr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!l.alternate&&!J)return xe(t),null}else 2*le()-o.renderingStartTime>Wn&&n!==1073741824&&(t.flags|=128,r=!0,rr(o,!1),t.lanes=4194304);o.isBackwards?(l.sibling=t.child,t.child=l):(n=o.last,n!==null?n.sibling=l:t.child=l,o.last=l)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=le(),t.sibling=null,n=te.current,Y(te,r?n&1|2:n&1),t):(xe(t),null);case 22:case 23:return oa(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Pe&1073741824&&(xe(t),t.subtreeFlags&6&&(t.flags|=8192)):xe(t),null;case 24:return null;case 25:return null}throw Error(z(156,t.tag))}function mh(e,t){switch(Hs(t),t.tag){case 1:return ze(t.type)&&Vi(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return $n(),q(Me),q(we),Vs(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Us(t),null;case 13:if(q(te),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(z(340));On()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return q(te),null;case 4:return $n(),null;case 10:return Bs(t.type._context),null;case 22:case 23:return oa(),null;case 24:return null;default:return null}}var pi=!1,ve=!1,yh=typeof WeakSet=="function"?WeakSet:Set,b=null;function En(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){oe(e,t,r)}else n.current=null}function Jl(e,t,n){try{n()}catch(r){oe(e,t,r)}}var ku=!1;function xh(e,t){if(bl=Qi,e=pf(),Ds(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var l=0,a=-1,u=-1,c=0,d=0,g=e,f=null;t:for(;;){for(var y;g!==n||i!==0&&g.nodeType!==3||(a=l+i),g!==o||r!==0&&g.nodeType!==3||(u=l+r),g.nodeType===3&&(l+=g.nodeValue.length),(y=g.firstChild)!==null;)f=g,g=y;for(;;){if(g===e)break t;if(f===n&&++c===i&&(a=l),f===o&&++d===r&&(u=l),(y=g.nextSibling)!==null)break;g=f,f=g.parentNode}g=y}n=a===-1||u===-1?null:{start:a,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Dl={focusedElem:e,selectionRange:n},Qi=!1,b=t;b!==null;)if(t=b,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,b=e;else for(;b!==null;){t=b;try{var k=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(k!==null){var v=k.memoizedProps,w=k.memoizedState,p=t.stateNode,h=p.getSnapshotBeforeUpdate(t.elementType===t.type?v:Ye(t.type,v),w);p.__reactInternalSnapshotBeforeUpdate=h}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(z(163))}}catch(m){oe(t,t.return,m)}if(e=t.sibling,e!==null){e.return=t.return,b=e;break}b=t.return}return k=ku,ku=!1,k}function vr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&Jl(t,n,o)}i=i.next}while(i!==r)}}function Eo(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function es(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function ud(e){var t=e.alternate;t!==null&&(e.alternate=null,ud(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[lt],delete t[Ar],delete t[$l],delete t[eh],delete t[th])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function cd(e){return e.tag===5||e.tag===3||e.tag===4}function _u(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||cd(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.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 ts(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ui));else if(r!==4&&(e=e.child,e!==null))for(ts(e,t,n),e=e.sibling;e!==null;)ts(e,t,n),e=e.sibling}function ns(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(ns(e,t,n),e=e.sibling;e!==null;)ns(e,t,n),e=e.sibling}var he=null,Ge=!1;function Lt(e,t,n){for(n=n.child;n!==null;)fd(e,t,n),n=n.sibling}function fd(e,t,n){if(at&&typeof at.onCommitFiberUnmount=="function")try{at.onCommitFiberUnmount(xo,n)}catch{}switch(n.tag){case 5:ve||En(n,t);case 6:var r=he,i=Ge;he=null,Lt(e,t,n),he=r,Ge=i,he!==null&&(Ge?(e=he,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):he.removeChild(n.stateNode));break;case 18:he!==null&&(Ge?(e=he,n=n.stateNode,e.nodeType===8?qo(e.parentNode,n):e.nodeType===1&&qo(e,n),Tr(e)):qo(he,n.stateNode));break;case 4:r=he,i=Ge,he=n.stateNode.containerInfo,Ge=!0,Lt(e,t,n),he=r,Ge=i;break;case 0:case 11:case 14:case 15:if(!ve&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,l=o.destroy;o=o.tag,l!==void 0&&(o&2||o&4)&&Jl(n,t,l),i=i.next}while(i!==r)}Lt(e,t,n);break;case 1:if(!ve&&(En(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){oe(n,t,a)}Lt(e,t,n);break;case 21:Lt(e,t,n);break;case 22:n.mode&1?(ve=(r=ve)||n.memoizedState!==null,Lt(e,t,n),ve=r):Lt(e,t,n);break;default:Lt(e,t,n)}}function ju(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new yh),t.forEach(function(r){var i=Th.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Ze(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,l=t,a=l;e:for(;a!==null;){switch(a.tag){case 5:he=a.stateNode,Ge=!1;break e;case 3:he=a.stateNode.containerInfo,Ge=!0;break e;case 4:he=a.stateNode.containerInfo,Ge=!0;break e}a=a.return}if(he===null)throw Error(z(160));fd(o,l,i),he=null,Ge=!1;var u=i.alternate;u!==null&&(u.return=null),i.return=null}catch(c){oe(i,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)dd(t,e),t=t.sibling}function dd(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ze(t,e),it(e),r&4){try{vr(3,e,e.return),Eo(3,e)}catch(v){oe(e,e.return,v)}try{vr(5,e,e.return)}catch(v){oe(e,e.return,v)}}break;case 1:Ze(t,e),it(e),r&512&&n!==null&&En(n,n.return);break;case 5:if(Ze(t,e),it(e),r&512&&n!==null&&En(n,n.return),e.flags&32){var i=e.stateNode;try{_r(i,"")}catch(v){oe(e,e.return,v)}}if(r&4&&(i=e.stateNode,i!=null)){var o=e.memoizedProps,l=n!==null?n.memoizedProps:o,a=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{a==="input"&&o.type==="radio"&&o.name!=null&&Pc(i,o),El(a,l);var c=El(a,o);for(l=0;l<u.length;l+=2){var d=u[l],g=u[l+1];d==="style"?Oc(i,g):d==="dangerouslySetInnerHTML"?bc(i,g):d==="children"?_r(i,g):js(i,d,g,c)}switch(a){case"input":Sl(i,o);break;case"textarea":Rc(i,o);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var y=o.value;y!=null?Ln(i,!!o.multiple,y,!1):f!==!!o.multiple&&(o.defaultValue!=null?Ln(i,!!o.multiple,o.defaultValue,!0):Ln(i,!!o.multiple,o.multiple?[]:"",!1))}i[Ar]=o}catch(v){oe(e,e.return,v)}}break;case 6:if(Ze(t,e),it(e),r&4){if(e.stateNode===null)throw Error(z(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(v){oe(e,e.return,v)}}break;case 3:if(Ze(t,e),it(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Tr(t.containerInfo)}catch(v){oe(e,e.return,v)}break;case 4:Ze(t,e),it(e);break;case 13:Ze(t,e),it(e),i=e.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(ra=le())),r&4&&ju(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(ve=(c=ve)||d,Ze(t,e),ve=c):Ze(t,e),it(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!d&&e.mode&1)for(b=e,d=e.child;d!==null;){for(g=b=d;b!==null;){switch(f=b,y=f.child,f.tag){case 0:case 11:case 14:case 15:vr(4,f,f.return);break;case 1:En(f,f.return);var k=f.stateNode;if(typeof k.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,k.props=t.memoizedProps,k.state=t.memoizedState,k.componentWillUnmount()}catch(v){oe(r,n,v)}}break;case 5:En(f,f.return);break;case 22:if(f.memoizedState!==null){Eu(g);continue}}y!==null?(y.return=f,b=y):Eu(g)}d=d.sibling}e:for(d=null,g=e;;){if(g.tag===5){if(d===null){d=g;try{i=g.stateNode,c?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(a=g.stateNode,u=g.memoizedProps.style,l=u!=null&&u.hasOwnProperty("display")?u.display:null,a.style.display=Dc("display",l))}catch(v){oe(e,e.return,v)}}}else if(g.tag===6){if(d===null)try{g.stateNode.nodeValue=c?"":g.memoizedProps}catch(v){oe(e,e.return,v)}}else if((g.tag!==22&&g.tag!==23||g.memoizedState===null||g===e)&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===e)break e;for(;g.sibling===null;){if(g.return===null||g.return===e)break e;d===g&&(d=null),g=g.return}d===g&&(d=null),g.sibling.return=g.return,g=g.sibling}}break;case 19:Ze(t,e),it(e),r&4&&ju(e);break;case 21:break;default:Ze(t,e),it(e)}}function it(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(cd(n)){var r=n;break e}n=n.return}throw Error(z(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(_r(i,""),r.flags&=-33);var o=_u(e);ns(e,o,i);break;case 3:case 4:var l=r.stateNode.containerInfo,a=_u(e);ts(e,a,l);break;default:throw Error(z(161))}}catch(u){oe(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function vh(e,t,n){b=e,pd(e)}function pd(e,t,n){for(var r=(e.mode&1)!==0;b!==null;){var i=b,o=i.child;if(i.tag===22&&r){var l=i.memoizedState!==null||pi;if(!l){var a=i.alternate,u=a!==null&&a.memoizedState!==null||ve;a=pi;var c=ve;if(pi=l,(ve=u)&&!c)for(b=i;b!==null;)l=b,u=l.child,l.tag===22&&l.memoizedState!==null?Tu(i):u!==null?(u.return=l,b=u):Tu(i);for(;o!==null;)b=o,pd(o),o=o.sibling;b=i,pi=a,ve=c}Cu(e)}else i.subtreeFlags&8772&&o!==null?(o.return=i,b=o):Cu(e)}}function Cu(e){for(;b!==null;){var t=b;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:ve||Eo(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!ve)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:Ye(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&uu(t,o,r);break;case 3:var l=t.updateQueue;if(l!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}uu(t,l,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var d=c.memoizedState;if(d!==null){var g=d.dehydrated;g!==null&&Tr(g)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(z(163))}ve||t.flags&512&&es(t)}catch(f){oe(t,t.return,f)}}if(t===e){b=null;break}if(n=t.sibling,n!==null){n.return=t.return,b=n;break}b=t.return}}function Eu(e){for(;b!==null;){var t=b;if(t===e){b=null;break}var n=t.sibling;if(n!==null){n.return=t.return,b=n;break}b=t.return}}function Tu(e){for(;b!==null;){var t=b;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Eo(4,t)}catch(u){oe(t,n,u)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(u){oe(t,i,u)}}var o=t.return;try{es(t)}catch(u){oe(t,o,u)}break;case 5:var l=t.return;try{es(t)}catch(u){oe(t,l,u)}}}catch(u){oe(t,t.return,u)}if(t===e){b=null;break}var a=t.sibling;if(a!==null){a.return=t.return,b=a;break}b=t.return}}var wh=Math.ceil,io=Et.ReactCurrentDispatcher,ta=Et.ReactCurrentOwner,Ke=Et.ReactCurrentBatchConfig,K=0,pe=null,se=null,ge=0,Pe=0,Tn=Vt(0),ce=0,Or=null,cn=0,To=0,na=0,wr=null,Te=null,ra=0,Wn=1/0,ht=null,oo=!1,rs=null,Wt=null,hi=!1,Nt=null,lo=0,Sr=0,is=null,Ai=-1,Pi=0;function _e(){return K&6?le():Ai!==-1?Ai:Ai=le()}function Bt(e){return e.mode&1?K&2&&ge!==0?ge&-ge:rh.transition!==null?(Pi===0&&(Pi=Yc()),Pi):(e=Z,e!==0||(e=window.event,e=e===void 0?16:rf(e.type)),e):1}function tt(e,t,n,r){if(50<Sr)throw Sr=0,is=null,Error(z(185));Kr(e,n,r),(!(K&2)||e!==pe)&&(e===pe&&(!(K&2)&&(To|=n),ce===4&&Pt(e,ge)),Ae(e,r),n===1&&K===0&&!(t.mode&1)&&(Wn=le()+500,_o&&Zt()))}function Ae(e,t){var n=e.callbackNode;rp(e,t);var r=Bi(e,e===pe?ge:0);if(r===0)n!==null&&ba(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&ba(n),t===1)e.tag===0?nh(Lu.bind(null,e)):_f(Lu.bind(null,e)),qp(function(){!(K&6)&&Zt()}),n=null;else{switch(Gc(r)){case 1:n=Is;break;case 4:n=Vc;break;case 16:n=Wi;break;case 536870912:n=Zc;break;default:n=Wi}n=Sd(n,hd.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function hd(e,t){if(Ai=-1,Pi=0,K&6)throw Error(z(327));var n=e.callbackNode;if(Pn()&&e.callbackNode!==n)return null;var r=Bi(e,e===pe?ge:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=so(e,r);else{t=r;var i=K;K|=2;var o=md();(pe!==e||ge!==t)&&(ht=null,Wn=le()+500,nn(e,t));do try{_h();break}catch(a){gd(e,a)}while(!0);Ws(),io.current=o,K=i,se!==null?t=0:(pe=null,ge=0,t=ce)}if(t!==0){if(t===2&&(i=zl(e),i!==0&&(r=i,t=os(e,i))),t===1)throw n=Or,nn(e,0),Pt(e,r),Ae(e,le()),n;if(t===6)Pt(e,r);else{if(i=e.current.alternate,!(r&30)&&!Sh(i)&&(t=so(e,r),t===2&&(o=zl(e),o!==0&&(r=o,t=os(e,o))),t===1))throw n=Or,nn(e,0),Pt(e,r),Ae(e,le()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(z(345));case 2:Gt(e,Te,ht);break;case 3:if(Pt(e,r),(r&130023424)===r&&(t=ra+500-le(),10<t)){if(Bi(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){_e(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Hl(Gt.bind(null,e,Te,ht),t);break}Gt(e,Te,ht);break;case 4:if(Pt(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var l=31-et(r);o=1<<l,l=t[l],l>i&&(i=l),r&=~o}if(r=i,r=le()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*wh(r/1960))-r,10<r){e.timeoutHandle=Hl(Gt.bind(null,e,Te,ht),r);break}Gt(e,Te,ht);break;case 5:Gt(e,Te,ht);break;default:throw Error(z(329))}}}return Ae(e,le()),e.callbackNode===n?hd.bind(null,e):null}function os(e,t){var n=wr;return e.current.memoizedState.isDehydrated&&(nn(e,t).flags|=256),e=so(e,t),e!==2&&(t=Te,Te=n,t!==null&&ls(t)),e}function ls(e){Te===null?Te=e:Te.push.apply(Te,e)}function Sh(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!nt(o(),i))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 Pt(e,t){for(t&=~na,t&=~To,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-et(t),r=1<<n;e[n]=-1,t&=~r}}function Lu(e){if(K&6)throw Error(z(327));Pn();var t=Bi(e,0);if(!(t&1))return Ae(e,le()),null;var n=so(e,t);if(e.tag!==0&&n===2){var r=zl(e);r!==0&&(t=r,n=os(e,r))}if(n===1)throw n=Or,nn(e,0),Pt(e,t),Ae(e,le()),n;if(n===6)throw Error(z(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Gt(e,Te,ht),Ae(e,le()),null}function ia(e,t){var n=K;K|=1;try{return e(t)}finally{K=n,K===0&&(Wn=le()+500,_o&&Zt())}}function fn(e){Nt!==null&&Nt.tag===0&&!(K&6)&&Pn();var t=K;K|=1;var n=Ke.transition,r=Z;try{if(Ke.transition=null,Z=1,e)return e()}finally{Z=r,Ke.transition=n,K=t,!(K&6)&&Zt()}}function oa(){Pe=Tn.current,q(Tn)}function nn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Gp(n)),se!==null)for(n=se.return;n!==null;){var r=n;switch(Hs(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Vi();break;case 3:$n(),q(Me),q(we),Vs();break;case 5:Us(r);break;case 4:$n();break;case 13:q(te);break;case 19:q(te);break;case 10:Bs(r.type._context);break;case 22:case 23:oa()}n=n.return}if(pe=e,se=e=Qt(e.current,null),ge=Pe=t,ce=0,Or=null,na=To=cn=0,Te=wr=null,Jt!==null){for(t=0;t<Jt.length;t++)if(n=Jt[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,o=n.pending;if(o!==null){var l=o.next;o.next=i,r.next=l}n.pending=r}Jt=null}return e}function gd(e,t){do{var n=se;try{if(Ws(),Ii.current=ro,no){for(var r=ne.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}no=!1}if(un=0,de=ue=ne=null,xr=!1,Nr=0,ta.current=null,n===null||n.return===null){ce=1,Or=t,se=null;break}e:{var o=e,l=n.return,a=n,u=t;if(t=ge,a.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var c=u,d=a,g=d.tag;if(!(d.mode&1)&&(g===0||g===11||g===15)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var y=gu(l);if(y!==null){y.flags&=-257,mu(y,l,a,o,t),y.mode&1&&hu(o,c,t),t=y,u=c;var k=t.updateQueue;if(k===null){var v=new Set;v.add(u),t.updateQueue=v}else k.add(u);break e}else{if(!(t&1)){hu(o,c,t),la();break e}u=Error(z(426))}}else if(J&&a.mode&1){var w=gu(l);if(w!==null){!(w.flags&65536)&&(w.flags|=256),mu(w,l,a,o,t),$s(Fn(u,a));break e}}o=u=Fn(u,a),ce!==4&&(ce=2),wr===null?wr=[o]:wr.push(o),o=l;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var p=qf(o,u,t);au(o,p);break e;case 1:a=u;var h=o.type,x=o.stateNode;if(!(o.flags&128)&&(typeof h.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(Wt===null||!Wt.has(x)))){o.flags|=65536,t&=-t,o.lanes|=t;var m=Jf(o,a,t);au(o,m);break e}}o=o.return}while(o!==null)}xd(n)}catch(_){t=_,se===n&&n!==null&&(se=n=n.return);continue}break}while(!0)}function md(){var e=io.current;return io.current=ro,e===null?ro:e}function la(){(ce===0||ce===3||ce===2)&&(ce=4),pe===null||!(cn&268435455)&&!(To&268435455)||Pt(pe,ge)}function so(e,t){var n=K;K|=2;var r=md();(pe!==e||ge!==t)&&(ht=null,nn(e,t));do try{kh();break}catch(i){gd(e,i)}while(!0);if(Ws(),K=n,io.current=r,se!==null)throw Error(z(261));return pe=null,ge=0,ce}function kh(){for(;se!==null;)yd(se)}function _h(){for(;se!==null&&!V0();)yd(se)}function yd(e){var t=wd(e.alternate,e,Pe);e.memoizedProps=e.pendingProps,t===null?xd(e):se=t,ta.current=null}function xd(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=mh(n,t),n!==null){n.flags&=32767,se=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ce=6,se=null;return}}else if(n=gh(n,t,Pe),n!==null){se=n;return}if(t=t.sibling,t!==null){se=t;return}se=t=e}while(t!==null);ce===0&&(ce=5)}function Gt(e,t,n){var r=Z,i=Ke.transition;try{Ke.transition=null,Z=1,jh(e,t,n,r)}finally{Ke.transition=i,Z=r}return null}function jh(e,t,n,r){do Pn();while(Nt!==null);if(K&6)throw Error(z(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(z(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(ip(e,o),e===pe&&(se=pe=null,ge=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||hi||(hi=!0,Sd(Wi,function(){return Pn(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=Ke.transition,Ke.transition=null;var l=Z;Z=1;var a=K;K|=4,ta.current=null,xh(e,n),dd(n,e),Qp(Dl),Qi=!!bl,Dl=bl=null,e.current=n,vh(n),Z0(),K=a,Z=l,Ke.transition=o}else e.current=n;if(hi&&(hi=!1,Nt=e,lo=i),o=e.pendingLanes,o===0&&(Wt=null),q0(n.stateNode),Ae(e,le()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(oo)throw oo=!1,e=rs,rs=null,e;return lo&1&&e.tag!==0&&Pn(),o=e.pendingLanes,o&1?e===is?Sr++:(Sr=0,is=e):Sr=0,Zt(),null}function Pn(){if(Nt!==null){var e=Gc(lo),t=Ke.transition,n=Z;try{if(Ke.transition=null,Z=16>e?16:e,Nt===null)var r=!1;else{if(e=Nt,Nt=null,lo=0,K&6)throw Error(z(331));var i=K;for(K|=4,b=e.current;b!==null;){var o=b,l=o.child;if(b.flags&16){var a=o.deletions;if(a!==null){for(var u=0;u<a.length;u++){var c=a[u];for(b=c;b!==null;){var d=b;switch(d.tag){case 0:case 11:case 15:vr(8,d,o)}var g=d.child;if(g!==null)g.return=d,b=g;else for(;b!==null;){d=b;var f=d.sibling,y=d.return;if(ud(d),d===c){b=null;break}if(f!==null){f.return=y,b=f;break}b=y}}}var k=o.alternate;if(k!==null){var v=k.child;if(v!==null){k.child=null;do{var w=v.sibling;v.sibling=null,v=w}while(v!==null)}}b=o}}if(o.subtreeFlags&2064&&l!==null)l.return=o,b=l;else e:for(;b!==null;){if(o=b,o.flags&2048)switch(o.tag){case 0:case 11:case 15:vr(9,o,o.return)}var p=o.sibling;if(p!==null){p.return=o.return,b=p;break e}b=o.return}}var h=e.current;for(b=h;b!==null;){l=b;var x=l.child;if(l.subtreeFlags&2064&&x!==null)x.return=l,b=x;else e:for(l=h;b!==null;){if(a=b,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Eo(9,a)}}catch(_){oe(a,a.return,_)}if(a===l){b=null;break e}var m=a.sibling;if(m!==null){m.return=a.return,b=m;break e}b=a.return}}if(K=i,Zt(),at&&typeof at.onPostCommitFiberRoot=="function")try{at.onPostCommitFiberRoot(xo,e)}catch{}r=!0}return r}finally{Z=n,Ke.transition=t}}return!1}function Iu(e,t,n){t=Fn(n,t),t=qf(e,t,1),e=Ft(e,t,1),t=_e(),e!==null&&(Kr(e,1,t),Ae(e,t))}function oe(e,t,n){if(e.tag===3)Iu(e,e,n);else for(;t!==null;){if(t.tag===3){Iu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Wt===null||!Wt.has(r))){e=Fn(n,e),e=Jf(t,e,1),t=Ft(t,e,1),e=_e(),t!==null&&(Kr(t,1,e),Ae(t,e));break}}t=t.return}}function Ch(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=_e(),e.pingedLanes|=e.suspendedLanes&n,pe===e&&(ge&n)===n&&(ce===4||ce===3&&(ge&130023424)===ge&&500>le()-ra?nn(e,0):na|=n),Ae(e,t)}function vd(e,t){t===0&&(e.mode&1?(t=ii,ii<<=1,!(ii&130023424)&&(ii=4194304)):t=1);var n=_e();e=_t(e,t),e!==null&&(Kr(e,t,n),Ae(e,n))}function Eh(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),vd(e,n)}function Th(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(z(314))}r!==null&&r.delete(t),vd(e,n)}var wd;wd=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Me.current)Le=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Le=!1,hh(e,t,n);Le=!!(e.flags&131072)}else Le=!1,J&&t.flags&1048576&&jf(t,Gi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;zi(e,t),e=t.pendingProps;var i=Dn(t,we.current);An(t,n),i=Ys(null,t,r,e,i,n);var o=Gs();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ze(r)?(o=!0,Zi(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Ks(t),i.updater=Co,t.stateNode=i,i._reactInternals=t,Xl(t,r,e,n),t=Zl(null,t,r,!0,o,n)):(t.tag=0,J&&o&&Os(t),Se(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(zi(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=Ih(r),e=Ye(r,e),i){case 0:t=Vl(null,t,r,e,n);break e;case 1:t=vu(null,t,r,e,n);break e;case 11:t=yu(null,t,r,e,n);break e;case 14:t=xu(null,t,r,Ye(r.type,e),n);break e}throw Error(z(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ye(r,i),Vl(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ye(r,i),vu(e,t,r,i,n);case 3:e:{if(rd(t),e===null)throw Error(z(387));r=t.pendingProps,o=t.memoizedState,i=o.element,Mf(e,t),eo(t,r,null,n);var l=t.memoizedState;if(r=l.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Fn(Error(z(423)),t),t=wu(e,t,r,n,i);break e}else if(r!==i){i=Fn(Error(z(424)),t),t=wu(e,t,r,n,i);break e}else for(Re=$t(t.stateNode.containerInfo.firstChild),Ne=t,J=!0,qe=null,n=Lf(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(On(),r===i){t=jt(e,t,n);break e}Se(e,t,r,n)}t=t.child}return t;case 5:return zf(t),e===null&&Bl(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,l=i.children,Ol(r,i)?l=null:o!==null&&Ol(r,o)&&(t.flags|=32),nd(e,t),Se(e,t,l,n),t.child;case 6:return e===null&&Bl(t),null;case 13:return id(e,t,n);case 4:return Xs(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Hn(t,null,r,n):Se(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ye(r,i),yu(e,t,r,i,n);case 7:return Se(e,t,t.pendingProps,n),t.child;case 8:return Se(e,t,t.pendingProps.children,n),t.child;case 12:return Se(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,l=i.value,Y(qi,r._currentValue),r._currentValue=l,o!==null)if(nt(o.value,l)){if(o.children===i.children&&!Me.current){t=jt(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){l=o.child;for(var u=a.firstContext;u!==null;){if(u.context===r){if(o.tag===1){u=wt(-1,n&-n),u.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var d=c.pending;d===null?u.next=u:(u.next=d.next,d.next=u),c.pending=u}}o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),Ql(o.return,n,t),a.lanes|=n;break}u=u.next}}else if(o.tag===10)l=o.type===t.type?null:o.child;else if(o.tag===18){if(l=o.return,l===null)throw Error(z(341));l.lanes|=n,a=l.alternate,a!==null&&(a.lanes|=n),Ql(l,n,t),l=o.sibling}else l=o.child;if(l!==null)l.return=o;else for(l=o;l!==null;){if(l===t){l=null;break}if(o=l.sibling,o!==null){o.return=l.return,l=o;break}l=l.return}o=l}Se(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,An(t,n),i=Xe(i),r=r(i),t.flags|=1,Se(e,t,r,n),t.child;case 14:return r=t.type,i=Ye(r,t.pendingProps),i=Ye(r.type,i),xu(e,t,r,i,n);case 15:return ed(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ye(r,i),zi(e,t),t.tag=1,ze(r)?(e=!0,Zi(t)):e=!1,An(t,n),Gf(t,r,i),Xl(t,r,i,n),Zl(null,t,r,!0,e,n);case 19:return od(e,t,n);case 22:return td(e,t,n)}throw Error(z(156,t.tag))};function Sd(e,t){return Uc(e,t)}function Lh(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Qe(e,t,n,r){return new Lh(e,t,n,r)}function sa(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ih(e){if(typeof e=="function")return sa(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Es)return 11;if(e===Ts)return 14}return 2}function Qt(e,t){var n=e.alternate;return n===null?(n=Qe(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&14680064,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}function Ri(e,t,n,r,i,o){var l=2;if(r=e,typeof e=="function")sa(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case yn:return rn(n.children,i,o,t);case Cs:l=8,i|=8;break;case ml:return e=Qe(12,n,t,i|2),e.elementType=ml,e.lanes=o,e;case yl:return e=Qe(13,n,t,i),e.elementType=yl,e.lanes=o,e;case xl:return e=Qe(19,n,t,i),e.elementType=xl,e.lanes=o,e;case Mc:return Lo(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Lc:l=10;break e;case Ic:l=9;break e;case Es:l=11;break e;case Ts:l=14;break e;case It:l=16,r=null;break e}throw Error(z(130,e==null?e:typeof e,""))}return t=Qe(l,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function rn(e,t,n,r){return e=Qe(7,e,r,t),e.lanes=n,e}function Lo(e,t,n,r){return e=Qe(22,e,r,t),e.elementType=Mc,e.lanes=n,e.stateNode={isHidden:!1},e}function ll(e,t,n){return e=Qe(6,e,null,t),e.lanes=n,e}function sl(e,t,n){return t=Qe(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Mh(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Fo(0),this.expirationTimes=Fo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Fo(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function aa(e,t,n,r,i,o,l,a,u){return e=new Mh(e,t,n,a,u),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Qe(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ks(o),e}function zh(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:mn,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function kd(e){if(!e)return Xt;e=e._reactInternals;e:{if(hn(e)!==e||e.tag!==1)throw Error(z(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(ze(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(z(171))}if(e.tag===1){var n=e.type;if(ze(n))return kf(e,n,t)}return t}function _d(e,t,n,r,i,o,l,a,u){return e=aa(n,r,!0,e,i,o,l,a,u),e.context=kd(null),n=e.current,r=_e(),i=Bt(n),o=wt(r,i),o.callback=t??null,Ft(n,o,i),e.current.lanes=i,Kr(e,i,r),Ae(e,r),e}function Io(e,t,n,r){var i=t.current,o=_e(),l=Bt(i);return n=kd(n),t.context===null?t.context=n:t.pendingContext=n,t=wt(o,l),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Ft(i,t,l),e!==null&&(tt(e,i,l,o),Li(e,i,l)),l}function ao(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Mu(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ua(e,t){Mu(e,t),(e=e.alternate)&&Mu(e,t)}function Ah(){return null}var jd=typeof reportError=="function"?reportError:function(e){console.error(e)};function ca(e){this._internalRoot=e}Mo.prototype.render=ca.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(z(409));Io(e,t,null,null)};Mo.prototype.unmount=ca.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;fn(function(){Io(null,e,null,null)}),t[kt]=null}};function Mo(e){this._internalRoot=e}Mo.prototype.unstable_scheduleHydration=function(e){if(e){var t=ef();e={blockedOn:null,target:e,priority:t};for(var n=0;n<At.length&&t!==0&&t<At[n].priority;n++);At.splice(n,0,e),n===0&&nf(e)}};function fa(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function zo(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function zu(){}function Ph(e,t,n,r,i){if(i){if(typeof r=="function"){var o=r;r=function(){var c=ao(l);o.call(c)}}var l=_d(t,r,e,0,null,!1,!1,"",zu);return e._reactRootContainer=l,e[kt]=l.current,Mr(e.nodeType===8?e.parentNode:e),fn(),l}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var c=ao(u);a.call(c)}}var u=aa(e,0,!1,null,null,!1,!1,"",zu);return e._reactRootContainer=u,e[kt]=u.current,Mr(e.nodeType===8?e.parentNode:e),fn(function(){Io(t,u,n,r)}),u}function Ao(e,t,n,r,i){var o=n._reactRootContainer;if(o){var l=o;if(typeof i=="function"){var a=i;i=function(){var u=ao(l);a.call(u)}}Io(t,l,e,i)}else l=Ph(n,t,e,i,r);return ao(l)}qc=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ur(t.pendingLanes);n!==0&&(Ms(t,n|1),Ae(t,le()),!(K&6)&&(Wn=le()+500,Zt()))}break;case 13:fn(function(){var r=_t(e,1);if(r!==null){var i=_e();tt(r,e,1,i)}}),ua(e,1)}};zs=function(e){if(e.tag===13){var t=_t(e,134217728);if(t!==null){var n=_e();tt(t,e,134217728,n)}ua(e,134217728)}};Jc=function(e){if(e.tag===13){var t=Bt(e),n=_t(e,t);if(n!==null){var r=_e();tt(n,e,t,r)}ua(e,t)}};ef=function(){return Z};tf=function(e,t){var n=Z;try{return Z=e,t()}finally{Z=n}};Ll=function(e,t,n){switch(t){case"input":if(Sl(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=ko(r);if(!i)throw Error(z(90));Ac(r),Sl(r,i)}}}break;case"textarea":Rc(e,n);break;case"select":t=n.value,t!=null&&Ln(e,!!n.multiple,t,!1)}};Fc=ia;Wc=fn;var Rh={usingClientEntryPoint:!1,Events:[Ur,Sn,ko,Hc,$c,ia]},ir={findFiberByHostInstance:qt,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Nh={bundleType:ir.bundleType,version:ir.version,rendererPackageName:ir.rendererPackageName,rendererConfig:ir.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Et.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Kc(e),e===null?null:e.stateNode},findFiberByHostInstance:ir.findFiberByHostInstance||Ah,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var gi=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!gi.isDisabled&&gi.supportsFiber)try{xo=gi.inject(Nh),at=gi}catch{}}Oe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Rh;Oe.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!fa(t))throw Error(z(200));return zh(e,t,null,n)};Oe.createRoot=function(e,t){if(!fa(e))throw Error(z(299));var n=!1,r="",i=jd;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=aa(e,1,!1,null,null,n,!1,r,i),e[kt]=t.current,Mr(e.nodeType===8?e.parentNode:e),new ca(t)};Oe.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(z(188)):(e=Object.keys(e).join(","),Error(z(268,e)));return e=Kc(t),e=e===null?null:e.stateNode,e};Oe.flushSync=function(e){return fn(e)};Oe.hydrate=function(e,t,n){if(!zo(t))throw Error(z(200));return Ao(null,e,t,!0,n)};Oe.hydrateRoot=function(e,t,n){if(!fa(e))throw Error(z(405));var r=n!=null&&n.hydratedSources||null,i=!1,o="",l=jd;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(l=n.onRecoverableError)),t=_d(t,null,e,1,n??null,i,!1,o,l),e[kt]=t.current,Mr(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Mo(t)};Oe.render=function(e,t,n){if(!zo(t))throw Error(z(200));return Ao(null,e,t,!1,n)};Oe.unmountComponentAtNode=function(e){if(!zo(e))throw Error(z(40));return e._reactRootContainer?(fn(function(){Ao(null,null,e,!1,function(){e._reactRootContainer=null,e[kt]=null})}),!0):!1};Oe.unstable_batchedUpdates=ia;Oe.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!zo(n))throw Error(z(200));if(e==null||e._reactInternals===void 0)throw Error(z(38));return Ao(e,t,n,!1,r)};Oe.version="18.3.1-next-f1338f8080-20240426";function Cd(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Cd)}catch(e){console.error(e)}}Cd(),jc.exports=Oe;var bh=jc.exports,Ed,Au=bh;Ed=Au.createRoot,Au.hydrateRoot;/**
41
+ * @license lucide-react v0.562.0 - ISC
42
+ *
43
+ * This source code is licensed under the ISC license.
44
+ * See the LICENSE file in the root directory of this source tree.
45
+ */const Dh=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Oh=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Pu=e=>{const t=Oh(e);return t.charAt(0).toUpperCase()+t.slice(1)},Td=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),Hh=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
46
+ * @license lucide-react v0.562.0 - ISC
47
+ *
48
+ * This source code is licensed under the ISC license.
49
+ * See the LICENSE file in the root directory of this source tree.
50
+ */var $h={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"};/**
51
+ * @license lucide-react v0.562.0 - ISC
52
+ *
53
+ * This source code is licensed under the ISC license.
54
+ * See the LICENSE file in the root directory of this source tree.
55
+ */const Fh=M.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:l,...a},u)=>M.createElement("svg",{ref:u,...$h,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Td("lucide",i),...!o&&!Hh(a)&&{"aria-hidden":"true"},...a},[...l.map(([c,d])=>M.createElement(c,d)),...Array.isArray(o)?o:[o]]));/**
56
+ * @license lucide-react v0.562.0 - ISC
57
+ *
58
+ * This source code is licensed under the ISC license.
59
+ * See the LICENSE file in the root directory of this source tree.
60
+ */const ft=(e,t)=>{const n=M.forwardRef(({className:r,...i},o)=>M.createElement(Fh,{ref:o,iconNode:t,className:Td(`lucide-${Dh(Pu(e))}`,`lucide-${e}`,r),...i}));return n.displayName=Pu(e),n};/**
61
+ * @license lucide-react v0.562.0 - ISC
62
+ *
63
+ * This source code is licensed under the ISC license.
64
+ * See the LICENSE file in the root directory of this source tree.
65
+ */const Wh=[["path",{d:"M11 14h1v4",key:"fy54vd"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 2v4",key:"1cmpym"}],["rect",{x:"3",y:"4",width:"18",height:"18",rx:"2",key:"12vinp"}]],Bh=ft("calendar-1",Wh);/**
66
+ * @license lucide-react v0.562.0 - ISC
67
+ *
68
+ * This source code is licensed under the ISC license.
69
+ * See the LICENSE file in the root directory of this source tree.
70
+ */const Qh=[["path",{d:"M12 6v6h4",key:"135r8i"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Kh=ft("clock-3",Qh);/**
71
+ * @license lucide-react v0.562.0 - ISC
72
+ *
73
+ * This source code is licensed under the ISC license.
74
+ * See the LICENSE file in the root directory of this source tree.
75
+ */const Xh=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Uh=ft("external-link",Xh);/**
76
+ * @license lucide-react v0.562.0 - ISC
77
+ *
78
+ * This source code is licensed under the ISC license.
79
+ * See the LICENSE file in the root directory of this source tree.
80
+ */const Vh=[["path",{d:"M7 2h10",key:"nczekb"}],["path",{d:"M5 6h14",key:"u2x4p"}],["rect",{width:"18",height:"12",x:"3",y:"10",rx:"2",key:"l0tzu3"}]],Zh=ft("gallery-vertical-end",Vh);/**
81
+ * @license lucide-react v0.562.0 - ISC
82
+ *
83
+ * This source code is licensed under the ISC license.
84
+ * See the LICENSE file in the root directory of this source tree.
85
+ */const Yh=[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]],da=ft("loader",Yh);/**
86
+ * @license lucide-react v0.562.0 - ISC
87
+ *
88
+ * This source code is licensed under the ISC license.
89
+ * See the LICENSE file in the root directory of this source tree.
90
+ */const Gh=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],qh=ft("search",Gh);/**
91
+ * @license lucide-react v0.562.0 - ISC
92
+ *
93
+ * This source code is licensed under the ISC license.
94
+ * See the LICENSE file in the root directory of this source tree.
95
+ */const Jh=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],e1=ft("server",Jh);/**
96
+ * @license lucide-react v0.562.0 - ISC
97
+ *
98
+ * This source code is licensed under the ISC license.
99
+ * See the LICENSE file in the root directory of this source tree.
100
+ */const t1=[["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"}]],n1=ft("users",t1);/**
101
+ * @license lucide-react v0.562.0 - ISC
102
+ *
103
+ * This source code is licensed under the ISC license.
104
+ * See the LICENSE file in the root directory of this source tree.
105
+ */const r1=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],i1=ft("wifi-off",r1);/**
106
+ * @license lucide-react v0.562.0 - ISC
107
+ *
108
+ * This source code is licensed under the ISC license.
109
+ * See the LICENSE file in the root directory of this source tree.
110
+ */const o1=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]],l1=ft("wifi",o1),s1=()=>s.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:s.jsx("polyline",{points:"6 9 12 15 18 9"})}),a1=()=>s.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:s.jsx("polyline",{points:"18 15 12 9 6 15"})});function u1({onAdd:e,loading:t=!1,defaultActor:n="user",placeholder:r='What happened? (e.g., "User clicked the buy button")',className:i}){const[o,l]=M.useState(""),[a,u]=M.useState(n),[c,d]=M.useState(""),[g,f]=M.useState(!1),[y,k]=M.useState(null),v=M.useCallback(async C=>{if(C.preventDefault(),k(null),!o.trim()){k("Content is required");return}let E;if(c.trim())try{E=JSON.parse(c)}catch{k("Invalid JSON in context field");return}try{await e(o.trim(),a.trim()||"user",E),l(""),d("")}catch(j){k(String(j))}},[o,a,c,e]),w={padding:"16px",borderRadius:"var(--aether-radius, 8px)",border:"1px solid var(--aether-border, #e5e5e5)",backgroundColor:"var(--aether-bg, #fff)"},p={width:"100%",padding:"10px 12px",fontSize:"14px",border:"1px solid var(--aether-border, #e5e5e5)",borderRadius:"var(--aether-radius, 8px)",backgroundColor:"transparent",color:"var(--aether-fg, #1a1a1a)",outline:"none"},h={width:"100%",padding:"10px 16px",fontSize:"14px",fontWeight:500,border:"none",borderRadius:"var(--aether-radius, 8px)",backgroundColor:t||!o.trim()?"var(--aether-muted, #f5f5f5)":"var(--aether-primary, #3b82f6)",color:t||!o.trim()?"var(--aether-muted-fg, #737373)":"var(--aether-primary-fg, #fff)",cursor:t||!o.trim()?"not-allowed":"pointer"},x={display:"flex",alignItems:"center",gap:"4px",padding:"4px 8px",fontSize:"14px",color:"var(--aether-muted-fg, #737373)",background:"transparent",border:"none",cursor:"pointer"},m={display:"block",marginBottom:"4px",fontSize:"14px",fontWeight:500,color:"var(--aether-muted-fg, #737373)"},_={padding:"8px",borderRadius:"var(--aether-radius, 8px)",backgroundColor:"#fee2e2",color:"#b91c1c",fontSize:"14px"};return s.jsx("div",{className:i,style:w,children:s.jsxs("form",{onSubmit:v,children:[s.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:[s.jsx("input",{type:"text",value:o,onChange:C=>l(C.target.value),placeholder:r,disabled:t,style:p}),s.jsx("button",{type:"submit",disabled:t||!o.trim(),style:h,children:t?"Adding...":"Add Memory"})]}),s.jsxs("button",{type:"button",style:x,onClick:()=>f(!g),children:[g?s.jsx(a1,{}):s.jsx(s1,{}),g?"Hide options":"Show options"]}),g&&s.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"12px",paddingTop:"8px"},children:[s.jsxs("div",{children:[s.jsx("label",{style:m,children:"Actor"}),s.jsx("input",{type:"text",value:a,onChange:C=>u(C.target.value),placeholder:"user",style:p})]}),s.jsxs("div",{children:[s.jsx("label",{style:m,children:"Context (JSON)"}),s.jsx("textarea",{value:c,onChange:C=>d(C.target.value),placeholder:'{"key": "value"}',rows:2,style:{...p,resize:"vertical",fontFamily:"monospace"}})]})]}),y&&s.jsx("div",{style:{..._,marginTop:"12px"},children:y})]})})}const c1=()=>s.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("line",{x1:"4",y1:"21",x2:"4",y2:"14"}),s.jsx("line",{x1:"4",y1:"10",x2:"4",y2:"3"}),s.jsx("line",{x1:"12",y1:"21",x2:"12",y2:"12"}),s.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"3"}),s.jsx("line",{x1:"20",y1:"21",x2:"20",y2:"16"}),s.jsx("line",{x1:"20",y1:"12",x2:"20",y2:"3"}),s.jsx("line",{x1:"1",y1:"14",x2:"7",y2:"14"}),s.jsx("line",{x1:"9",y1:"8",x2:"15",y2:"8"}),s.jsx("line",{x1:"17",y1:"16",x2:"23",y2:"16"})]}),f1=[{value:"hybrid",label:"Hybrid"},{value:"semantic",label:"Semantic"},{value:"temporal",label:"Temporal"},{value:"relational",label:"Relational"}];function d1({onSearch:e,loading:t=!1,placeholder:n="Search memories...",className:r}){const[i,o]=M.useState(""),[l,a]=M.useState("hybrid"),[u,c]=M.useState(10),[d,g]=M.useState(""),[f,y]=M.useState(!1),k=M.useCallback(async j=>{j.preventDefault(),i.trim()&&await e(i.trim(),{retrievalType:l,limit:u,actor:d.trim()||void 0})},[i,l,u,d,e]),v={position:"relative",flex:1},w={width:"100%",padding:"10px 12px 10px 40px",fontSize:"14px",border:"1px solid var(--aether-border, #e5e5e5)",borderRadius:"var(--aether-radius, 8px)",backgroundColor:"transparent",color:"var(--aether-fg, #1a1a1a)",outline:"none"},p={position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",color:"var(--aether-muted-fg, #737373)"},h={padding:"10px 16px",fontSize:"14px",fontWeight:500,border:"none",borderRadius:"var(--aether-radius, 8px)",backgroundColor:t||!i.trim()?"var(--aether-muted, #f5f5f5)":"var(--aether-primary, #3b82f6)",color:t||!i.trim()?"var(--aether-muted-fg, #737373)":"var(--aether-primary-fg, #fff)",cursor:t||!i.trim()?"not-allowed":"pointer"},x={display:"flex",alignItems:"center",justifyContent:"center",width:"40px",height:"40px",border:"1px solid var(--aether-border, #e5e5e5)",borderRadius:"var(--aether-radius, 8px)",backgroundColor:f?"var(--aether-muted, #f5f5f5)":"transparent",color:f?"var(--aether-primary, #3b82f6)":"var(--aether-muted-fg, #737373)",cursor:"pointer"},m={display:"flex",flexWrap:"wrap",gap:"16px",padding:"16px",borderRadius:"var(--aether-radius, 8px)",backgroundColor:"var(--aether-muted, #f5f5f5)"},_={padding:"8px 12px",fontSize:"14px",border:"1px solid var(--aether-border, #e5e5e5)",borderRadius:"var(--aether-radius, 8px)",backgroundColor:"var(--aether-bg, #fff)",color:"var(--aether-fg, #1a1a1a)",cursor:"pointer",outline:"none"},C={width:"150px",padding:"8px 12px",fontSize:"14px",border:"1px solid var(--aether-border, #e5e5e5)",borderRadius:"var(--aether-radius, 8px)",backgroundColor:"transparent",color:"var(--aether-fg, #1a1a1a)",outline:"none"},E={display:"block",marginBottom:"4px",fontSize:"12px",fontWeight:500,color:"var(--aether-fg, #1a1a1a)"};return s.jsxs("form",{className:r,onSubmit:k,style:{display:"flex",flexDirection:"column",gap:"12px"},children:[s.jsxs("div",{style:{display:"flex",gap:"8px"},children:[s.jsxs("div",{style:v,children:[s.jsx("span",{style:p,children:s.jsx(qh,{})}),s.jsx("input",{type:"text",value:i,onChange:j=>o(j.target.value),placeholder:n,disabled:t,style:w})]}),s.jsx("button",{type:"button",style:x,onClick:()=>y(!f),children:s.jsx(c1,{})}),s.jsx("button",{type:"submit",disabled:t||!i.trim(),style:h,children:t?"Searching...":"Search"})]}),f&&s.jsxs("div",{style:m,children:[s.jsxs("div",{children:[s.jsx("label",{style:E,children:"Retrieval Type"}),s.jsx("select",{value:l,onChange:j=>a(j.target.value),style:_,children:f1.map(j=>s.jsx("option",{value:j.value,children:j.label},j.value))})]}),s.jsxs("div",{children:[s.jsx("label",{style:E,children:"Max Results"}),s.jsx("select",{value:u,onChange:j=>c(parseInt(j.target.value,10)),style:_,children:[5,10,20,50,100].map(j=>s.jsx("option",{value:j,children:j},j))})]}),s.jsxs("div",{children:[s.jsx("label",{style:E,children:"Actor (optional)"}),s.jsx("input",{type:"text",value:d,onChange:j=>g(j.target.value),placeholder:"Filter by actor",style:C})]})]})]})}function mi({label:e,value:t,icon:n}){const r={display:"flex",alignItems:"center",gap:"12px",padding:"16px",borderRadius:"var(--aether-radius, 8px)",border:"1px solid var(--aether-border, #e5e5e5)",backgroundColor:"var(--aether-bg, #fff)"},i={display:"flex",alignItems:"center",justifyContent:"center",width:"40px",height:"40px",borderRadius:"8px",color:"#2563eb"};return s.jsxs("div",{style:r,children:[s.jsx("div",{style:i,children:n}),s.jsxs("div",{children:[s.jsx("div",{style:{fontSize:"24px",fontWeight:600,color:"var(--aether-fg, #1a1a1a)"},children:t}),s.jsx("div",{style:{fontSize:"14px",color:"var(--aether-muted-fg, #737373)"},children:e})]})]})}function p1({stats:e,loading:t=!1,className:n}){const r={display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(180px, 1fr))",gap:"12px"},i={height:"88px",borderRadius:"var(--aether-radius, 8px)",backgroundColor:"var(--aether-muted, #f5f5f5)",animation:"pulse 2s infinite"};if(t)return s.jsxs("div",{className:n,style:r,children:[s.jsx("style",{children:"@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }"}),[1,2,3,4].map(l=>s.jsx("div",{style:i},l))]});if(!e)return s.jsx("div",{className:n,style:{padding:"24px",textAlign:"center",borderRadius:"var(--aether-radius, 8px)",backgroundColor:"var(--aether-muted, #f5f5f5)",color:"var(--aether-muted-fg, #737373)"},children:"No statistics available"});const o=l=>{if(!l)return"—";const a=new Date(l),c=new Date().getTime()-a.getTime(),d=Math.floor(c/1e3),g=Math.floor(d/60),f=Math.floor(g/60);return c>=0&&c<24*60*60*1e3?d<60?d<=10?"a few seconds ago":`${d} seconds ago`:g<60?g===1?"1 minute ago":`${g} minutes ago`:f===1?"1 hour ago":`${f} hours ago`:a.toLocaleDateString("en-GB",{day:"numeric",month:"short",year:"numeric"})};return s.jsxs("div",{className:n,style:r,children:[s.jsx(mi,{label:"Total Memories",value:e.totalEvents.toLocaleString(),icon:s.jsx(Zh,{className:"w-5 h-5"})}),s.jsx(mi,{label:"Unique Actors",value:e.uniqueActors,icon:s.jsx(n1,{className:"w-5 h-5"})}),s.jsx(mi,{label:"First Event",value:o(e.oldestEvent),icon:s.jsx(Bh,{className:"w-5 h-5"})}),s.jsx(mi,{label:"Latest Event",value:o(e.newestEvent),icon:s.jsx(Kh,{className:"h-5 w-5"})})]})}function h1({actors:e,selectedActor:t,onSelect:n,loading:r=!1,className:i}){const o={display:"flex",flexWrap:"wrap",alignItems:"center",gap:"8px"},l={height:"32px",width:"80px",borderRadius:"9999px",backgroundColor:"var(--aether-muted, #f5f5f5)",animation:"pulse 2s infinite"},a=u=>({padding:"6px 16px",fontSize:"14px",fontWeight:500,borderRadius:"9999px",border:"none",cursor:"pointer",transition:"background-color 0.2s, color 0.2s",backgroundColor:u?"var(--aether-primary, #3b82f6)":"transparent",color:u?"var(--aether-primary-fg, #fff)":"var(--aether-muted-fg, #737373)"});return r?s.jsxs("div",{className:i,style:o,children:[s.jsx("style",{children:"@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }"}),[1,2,3].map(u=>s.jsx("div",{style:l},u))]}):e.length===0?s.jsx("div",{className:i,style:{padding:"12px",textAlign:"center",fontSize:"14px",color:"var(--aether-muted-fg, #737373)"},children:"No actors found"}):s.jsxs("div",{className:i,style:o,children:[s.jsx("span",{style:{marginRight:"4px",fontSize:"14px",color:"var(--aether-muted-fg, #737373)"},children:"Filter by actor:"}),s.jsx("button",{style:a(t===null),onClick:()=>n(null),children:"All"}),e.map(u=>s.jsx("button",{style:a(t===u),onClick:()=>n(u),children:u},u))]})}function pa({event:e,onClick:t,selected:n=!1,showContext:r=!1,className:i}){const o=v=>new Date(v).toLocaleString(),l=()=>{t==null||t(e)},a={marginBottom:"8px",padding:"12px",borderRadius:"var(--aether-radius, 8px)",border:"1px solid var(--aether-border, #e5e5e5)",backgroundColor:"var(--aether-bg, #fff)",cursor:t?"pointer":"default",transition:"box-shadow 0.2s, border-color 0.2s",...n&&{borderColor:"var(--aether-primary, #3b82f6)",boxShadow:"0 0 0 2px var(--aether-primary, #3b82f6)"}},u={display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"8px"},c={fontWeight:600,color:"var(--aether-fg, #1a1a1a)"},d={marginLeft:"8px",padding:"2px 8px",fontSize:"11px",borderRadius:"9999px",backgroundColor:"var(--aether-muted, #f5f5f5)",color:"var(--aether-muted-fg, #737373)"},g={fontSize:"12px",color:"var(--aether-muted-fg, #737373)"},f={fontSize:"14px",lineHeight:1.6,color:"var(--aether-fg, #1a1a1a)",opacity:.8},y={marginTop:"12px",padding:"8px",borderRadius:"4px",backgroundColor:"var(--aether-muted, #f5f5f5)"},k={marginTop:"8px",fontSize:"10px",fontFamily:"monospace",color:"var(--aether-muted-fg, #737373)"};return s.jsxs("div",{className:i,style:a,onClick:l,children:[s.jsxs("div",{style:u,children:[s.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[s.jsx("span",{style:c,children:e.actor}),s.jsx("span",{style:d,children:e.action})]}),s.jsx("span",{style:g,children:o(e.timestamp)})]}),s.jsx("p",{style:f,children:e.content}),r&&Object.keys(e.context).length>0&&s.jsxs(s.Fragment,{children:[s.jsx("hr",{style:{margin:"12px 0",border:"none",borderTop:"1px solid var(--aether-border, #e5e5e5)"}}),s.jsxs("div",{style:y,children:[s.jsx("span",{style:{fontSize:"12px",fontWeight:500,color:"var(--aether-muted-fg, #737373)"},children:"Context:"}),s.jsx("pre",{style:{marginTop:"4px",fontSize:"11px",overflow:"auto",color:"var(--aether-fg, #1a1a1a)",opacity:.7},children:JSON.stringify(e.context,null,2)})]})]}),s.jsxs("div",{style:k,children:[e.id.slice(0,12),"..."]})]})}function g1({events:e,onEventClick:t,selectedEventId:n,showContext:r=!1,groupBy:i="none",maxHeight:o="600px",className:l}){const a=M.useMemo(()=>[...e].sort((d,g)=>new Date(g.timestamp).getTime()-new Date(d.timestamp).getTime()),[e]),u=M.useMemo(()=>{if(i==="none")return[{label:"",events:a}];const d=new Map;for(const g of a){let f;i==="day"?f=new Date(g.timestamp).toLocaleDateString():f=g.actor,d.has(f)||d.set(f,[]),d.get(f).push(g)}return Array.from(d.entries()).map(([g,f])=>({label:g,events:f}))},[a,i]),c={height:"100%",maxHeight:typeof o=="number"?`${o}px`:o,overflow:"auto"};return e.length===0?s.jsx("div",{className:l,style:{padding:"40px",textAlign:"center",color:"var(--aether-muted-fg, #737373)"},children:"No events to display"}):s.jsx("div",{className:l,style:c,children:s.jsx("div",{style:{padding:"16px"},children:u.map((d,g)=>s.jsxs("div",{children:[d.label&&s.jsx("div",{style:{position:"sticky",top:0,zIndex:10,marginBottom:"8px",padding:"8px 0",fontWeight:600,backgroundColor:"var(--aether-bg, #fff)",borderBottom:"1px solid var(--aether-border, #e5e5e5)",color:"var(--aether-fg, #1a1a1a)"},children:d.label}),s.jsx("div",{children:d.events.map(f=>s.jsxs("div",{style:{display:"flex",gap:"12px"},children:[s.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",width:"20px",flexShrink:0},children:[s.jsx("div",{style:{width:"10px",height:"10px",borderRadius:"50%",border:"2px solid var(--aether-bg, #fff)",backgroundColor:f.id===n?"var(--aether-primary, #3b82f6)":"var(--aether-muted-fg, #737373)",boxShadow:f.id===n?"0 0 0 2px var(--aether-primary, #3b82f6)":"none"}}),s.jsx("div",{style:{flex:1,width:"2px",minHeight:"20px",backgroundColor:"var(--aether-border, #e5e5e5)"}})]}),s.jsx("div",{style:{flex:1,paddingBottom:"8px"},children:s.jsx(pa,{event:f,onClick:t,selected:f.id===n,showContext:r})})]},f.id))})]},d.label||g))})})}var m1={value:()=>{}};function Zr(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Ni(n)}function Ni(e){this._=e}function y1(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Ni.prototype=Zr.prototype={constructor:Ni,on:function(e,t){var n=this._,r=y1(e+"",n),i,o=-1,l=r.length;if(arguments.length<2){for(;++o<l;)if((i=(e=r[o]).type)&&(i=x1(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<l;)if(i=(e=r[o]).type)n[i]=Ru(n[i],e.name,t);else if(t==null)for(i in n)n[i]=Ru(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Ni(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],r=0,i=o.length;r<i;++r)o[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,o=r.length;i<o;++i)r[i].value.apply(t,n)}};function x1(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function Ru(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=m1,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var ss="http://www.w3.org/1999/xhtml";const Nu={svg:"http://www.w3.org/2000/svg",xhtml:ss,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Po(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Nu.hasOwnProperty(t)?{space:Nu[t],local:e}:e}function v1(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===ss&&t.documentElement.namespaceURI===ss?t.createElement(e):t.createElementNS(n,e)}}function w1(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Ld(e){var t=Po(e);return(t.local?w1:v1)(t)}function S1(){}function ha(e){return e==null?S1:function(){return this.querySelector(e)}}function k1(e){typeof e!="function"&&(e=ha(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],l=o.length,a=r[i]=new Array(l),u,c,d=0;d<l;++d)(u=o[d])&&(c=e.call(u,u.__data__,d,o))&&("__data__"in u&&(c.__data__=u.__data__),a[d]=c);return new De(r,this._parents)}function _1(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function j1(){return[]}function Id(e){return e==null?j1:function(){return this.querySelectorAll(e)}}function C1(e){return function(){return _1(e.apply(this,arguments))}}function E1(e){typeof e=="function"?e=C1(e):e=Id(e);for(var t=this._groups,n=t.length,r=[],i=[],o=0;o<n;++o)for(var l=t[o],a=l.length,u,c=0;c<a;++c)(u=l[c])&&(r.push(e.call(u,u.__data__,c,l)),i.push(u));return new De(r,i)}function Md(e){return function(){return this.matches(e)}}function zd(e){return function(t){return t.matches(e)}}var T1=Array.prototype.find;function L1(e){return function(){return T1.call(this.children,e)}}function I1(){return this.firstElementChild}function M1(e){return this.select(e==null?I1:L1(typeof e=="function"?e:zd(e)))}var z1=Array.prototype.filter;function A1(){return Array.from(this.children)}function P1(e){return function(){return z1.call(this.children,e)}}function R1(e){return this.selectAll(e==null?A1:P1(typeof e=="function"?e:zd(e)))}function N1(e){typeof e!="function"&&(e=Md(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],l=o.length,a=r[i]=[],u,c=0;c<l;++c)(u=o[c])&&e.call(u,u.__data__,c,o)&&a.push(u);return new De(r,this._parents)}function Ad(e){return new Array(e.length)}function b1(){return new De(this._enter||this._groups.map(Ad),this._parents)}function uo(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}uo.prototype={constructor:uo,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function D1(e){return function(){return e}}function O1(e,t,n,r,i,o){for(var l=0,a,u=t.length,c=o.length;l<c;++l)(a=t[l])?(a.__data__=o[l],r[l]=a):n[l]=new uo(e,o[l]);for(;l<u;++l)(a=t[l])&&(i[l]=a)}function H1(e,t,n,r,i,o,l){var a,u,c=new Map,d=t.length,g=o.length,f=new Array(d),y;for(a=0;a<d;++a)(u=t[a])&&(f[a]=y=l.call(u,u.__data__,a,t)+"",c.has(y)?i[a]=u:c.set(y,u));for(a=0;a<g;++a)y=l.call(e,o[a],a,o)+"",(u=c.get(y))?(r[a]=u,u.__data__=o[a],c.delete(y)):n[a]=new uo(e,o[a]);for(a=0;a<d;++a)(u=t[a])&&c.get(f[a])===u&&(i[a]=u)}function $1(e){return e.__data__}function F1(e,t){if(!arguments.length)return Array.from(this,$1);var n=t?H1:O1,r=this._parents,i=this._groups;typeof e!="function"&&(e=D1(e));for(var o=i.length,l=new Array(o),a=new Array(o),u=new Array(o),c=0;c<o;++c){var d=r[c],g=i[c],f=g.length,y=W1(e.call(d,d&&d.__data__,c,r)),k=y.length,v=a[c]=new Array(k),w=l[c]=new Array(k),p=u[c]=new Array(f);n(d,g,v,w,p,y,t);for(var h=0,x=0,m,_;h<k;++h)if(m=v[h]){for(h>=x&&(x=h+1);!(_=w[x])&&++x<k;);m._next=_||null}}return l=new De(l,r),l._enter=a,l._exit=u,l}function W1(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function B1(){return new De(this._exit||this._groups.map(Ad),this._parents)}function Q1(e,t,n){var r=this.enter(),i=this,o=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function K1(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,o=r.length,l=Math.min(i,o),a=new Array(i),u=0;u<l;++u)for(var c=n[u],d=r[u],g=c.length,f=a[u]=new Array(g),y,k=0;k<g;++k)(y=c[k]||d[k])&&(f[k]=y);for(;u<i;++u)a[u]=n[u];return new De(a,this._parents)}function X1(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,o=r[i],l;--i>=0;)(l=r[i])&&(o&&l.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(l,o),o=l);return this}function U1(e){e||(e=V1);function t(g,f){return g&&f?e(g.__data__,f.__data__):!g-!f}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var l=n[o],a=l.length,u=i[o]=new Array(a),c,d=0;d<a;++d)(c=l[d])&&(u[d]=c);u.sort(t)}return new De(i,this._parents).order()}function V1(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Z1(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Y1(){return Array.from(this)}function G1(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,o=r.length;i<o;++i){var l=r[i];if(l)return l}return null}function q1(){let e=0;for(const t of this)++e;return e}function J1(){return!this.node()}function eg(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],o=0,l=i.length,a;o<l;++o)(a=i[o])&&e.call(a,a.__data__,o,i);return this}function tg(e){return function(){this.removeAttribute(e)}}function ng(e){return function(){this.removeAttributeNS(e.space,e.local)}}function rg(e,t){return function(){this.setAttribute(e,t)}}function ig(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function og(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function lg(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function sg(e,t){var n=Po(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?ng:tg:typeof t=="function"?n.local?lg:og:n.local?ig:rg)(n,t))}function Pd(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function ag(e){return function(){this.style.removeProperty(e)}}function ug(e,t,n){return function(){this.style.setProperty(e,t,n)}}function cg(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function fg(e,t,n){return arguments.length>1?this.each((t==null?ag:typeof t=="function"?cg:ug)(e,t,n??"")):Bn(this.node(),e)}function Bn(e,t){return e.style.getPropertyValue(t)||Pd(e).getComputedStyle(e,null).getPropertyValue(t)}function dg(e){return function(){delete this[e]}}function pg(e,t){return function(){this[e]=t}}function hg(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function gg(e,t){return arguments.length>1?this.each((t==null?dg:typeof t=="function"?hg:pg)(e,t)):this.node()[e]}function Rd(e){return e.trim().split(/^|\s+/)}function ga(e){return e.classList||new Nd(e)}function Nd(e){this._node=e,this._names=Rd(e.getAttribute("class")||"")}Nd.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function bd(e,t){for(var n=ga(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function Dd(e,t){for(var n=ga(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function mg(e){return function(){bd(this,e)}}function yg(e){return function(){Dd(this,e)}}function xg(e,t){return function(){(t.apply(this,arguments)?bd:Dd)(this,e)}}function vg(e,t){var n=Rd(e+"");if(arguments.length<2){for(var r=ga(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?xg:t?mg:yg)(n,t))}function wg(){this.textContent=""}function Sg(e){return function(){this.textContent=e}}function kg(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function _g(e){return arguments.length?this.each(e==null?wg:(typeof e=="function"?kg:Sg)(e)):this.node().textContent}function jg(){this.innerHTML=""}function Cg(e){return function(){this.innerHTML=e}}function Eg(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Tg(e){return arguments.length?this.each(e==null?jg:(typeof e=="function"?Eg:Cg)(e)):this.node().innerHTML}function Lg(){this.nextSibling&&this.parentNode.appendChild(this)}function Ig(){return this.each(Lg)}function Mg(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function zg(){return this.each(Mg)}function Ag(e){var t=typeof e=="function"?e:Ld(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Pg(){return null}function Rg(e,t){var n=typeof e=="function"?e:Ld(e),r=t==null?Pg:typeof t=="function"?t:ha(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function Ng(){var e=this.parentNode;e&&e.removeChild(this)}function bg(){return this.each(Ng)}function Dg(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Og(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Hg(e){return this.select(e?Og:Dg)}function $g(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Fg(e){return function(t){e.call(this,t,this.__data__)}}function Wg(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function Bg(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,o;n<i;++n)o=t[n],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.options):t[++r]=o;++r?t.length=r:delete this.__on}}}function Qg(e,t,n){return function(){var r=this.__on,i,o=Fg(t);if(r){for(var l=0,a=r.length;l<a;++l)if((i=r[l]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=t;return}}this.addEventListener(e.type,o,n),i={type:e.type,name:e.name,value:t,listener:o,options:n},r?r.push(i):this.__on=[i]}}function Kg(e,t,n){var r=Wg(e+""),i,o=r.length,l;if(arguments.length<2){var a=this.node().__on;if(a){for(var u=0,c=a.length,d;u<c;++u)for(i=0,d=a[u];i<o;++i)if((l=r[i]).type===d.type&&l.name===d.name)return d.value}return}for(a=t?Qg:Bg,i=0;i<o;++i)this.each(a(r[i],t,n));return this}function Od(e,t,n){var r=Pd(e),i=r.CustomEvent;typeof i=="function"?i=new i(t,n):(i=r.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function Xg(e,t){return function(){return Od(this,e,t)}}function Ug(e,t){return function(){return Od(this,e,t.apply(this,arguments))}}function Vg(e,t){return this.each((typeof t=="function"?Ug:Xg)(e,t))}function*Zg(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,o=r.length,l;i<o;++i)(l=r[i])&&(yield l)}var Hd=[null];function De(e,t){this._groups=e,this._parents=t}function Yr(){return new De([[document.documentElement]],Hd)}function Yg(){return this}De.prototype=Yr.prototype={constructor:De,select:k1,selectAll:E1,selectChild:M1,selectChildren:R1,filter:N1,data:F1,enter:b1,exit:B1,join:Q1,merge:K1,selection:Yg,order:X1,sort:U1,call:Z1,nodes:Y1,node:G1,size:q1,empty:J1,each:eg,attr:sg,style:fg,property:gg,classed:vg,text:_g,html:Tg,raise:Ig,lower:zg,append:Ag,insert:Rg,remove:bg,clone:Hg,datum:$g,on:Kg,dispatch:Vg,[Symbol.iterator]:Zg};function st(e){return typeof e=="string"?new De([[document.querySelector(e)]],[document.documentElement]):new De([[e]],Hd)}function Gg(e){let t;for(;t=e.sourceEvent;)e=t;return e}function gt(e,t){if(e=Gg(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}const qg={passive:!1},Hr={capture:!0,passive:!1};function al(e){e.stopImmediatePropagation()}function Rn(e){e.preventDefault(),e.stopImmediatePropagation()}function $d(e){var t=e.document.documentElement,n=st(e).on("dragstart.drag",Rn,Hr);"onselectstart"in t?n.on("selectstart.drag",Rn,Hr):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Fd(e,t){var n=e.document.documentElement,r=st(e).on("dragstart.drag",null);t&&(r.on("click.drag",Rn,Hr),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const yi=e=>()=>e;function as(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:o,x:l,y:a,dx:u,dy:c,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:l,enumerable:!0,configurable:!0},y:{value:a,enumerable:!0,configurable:!0},dx:{value:u,enumerable:!0,configurable:!0},dy:{value:c,enumerable:!0,configurable:!0},_:{value:d}})}as.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Jg(e){return!e.ctrlKey&&!e.button}function em(){return this.parentNode}function tm(e,t){return t??{x:e.x,y:e.y}}function nm(){return navigator.maxTouchPoints||"ontouchstart"in this}function rm(){var e=Jg,t=em,n=tm,r=nm,i={},o=Zr("start","drag","end"),l=0,a,u,c,d,g=0;function f(m){m.on("mousedown.drag",y).filter(r).on("touchstart.drag",w).on("touchmove.drag",p,qg).on("touchend.drag touchcancel.drag",h).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function y(m,_){if(!(d||!e.call(this,m,_))){var C=x(this,t.call(this,m,_),m,_,"mouse");C&&(st(m.view).on("mousemove.drag",k,Hr).on("mouseup.drag",v,Hr),$d(m.view),al(m),c=!1,a=m.clientX,u=m.clientY,C("start",m))}}function k(m){if(Rn(m),!c){var _=m.clientX-a,C=m.clientY-u;c=_*_+C*C>g}i.mouse("drag",m)}function v(m){st(m.view).on("mousemove.drag mouseup.drag",null),Fd(m.view,c),Rn(m),i.mouse("end",m)}function w(m,_){if(e.call(this,m,_)){var C=m.changedTouches,E=t.call(this,m,_),j=C.length,D,R;for(D=0;D<j;++D)(R=x(this,E,m,_,C[D].identifier,C[D]))&&(al(m),R("start",m,C[D]))}}function p(m){var _=m.changedTouches,C=_.length,E,j;for(E=0;E<C;++E)(j=i[_[E].identifier])&&(Rn(m),j("drag",m,_[E]))}function h(m){var _=m.changedTouches,C=_.length,E,j;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),E=0;E<C;++E)(j=i[_[E].identifier])&&(al(m),j("end",m,_[E]))}function x(m,_,C,E,j,D){var R=o.copy(),H=gt(D||C,_),B,U,S;if((S=n.call(m,new as("beforestart",{sourceEvent:C,target:f,identifier:j,active:l,x:H[0],y:H[1],dx:0,dy:0,dispatch:R}),E))!=null)return B=S.x-H[0]||0,U=S.y-H[1]||0,function I(T,N,L){var A=H,P;switch(T){case"start":i[j]=I,P=l++;break;case"end":delete i[j],--l;case"drag":H=gt(L||N,_),P=l;break}R.call(T,m,new as(T,{sourceEvent:N,subject:S,target:f,identifier:j,active:P,x:H[0]+B,y:H[1]+U,dx:H[0]-A[0],dy:H[1]-A[1],dispatch:R}),E)}}return f.filter=function(m){return arguments.length?(e=typeof m=="function"?m:yi(!!m),f):e},f.container=function(m){return arguments.length?(t=typeof m=="function"?m:yi(m),f):t},f.subject=function(m){return arguments.length?(n=typeof m=="function"?m:yi(m),f):n},f.touchable=function(m){return arguments.length?(r=typeof m=="function"?m:yi(!!m),f):r},f.on=function(){var m=o.on.apply(o,arguments);return m===o?f:m},f.clickDistance=function(m){return arguments.length?(g=(m=+m)*m,f):Math.sqrt(g)},f}function ma(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Wd(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Gr(){}var $r=.7,co=1/$r,Nn="\\s*([+-]?\\d+)\\s*",Fr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ct="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",im=/^#([0-9a-f]{3,8})$/,om=new RegExp(`^rgb\\(${Nn},${Nn},${Nn}\\)$`),lm=new RegExp(`^rgb\\(${ct},${ct},${ct}\\)$`),sm=new RegExp(`^rgba\\(${Nn},${Nn},${Nn},${Fr}\\)$`),am=new RegExp(`^rgba\\(${ct},${ct},${ct},${Fr}\\)$`),um=new RegExp(`^hsl\\(${Fr},${ct},${ct}\\)$`),cm=new RegExp(`^hsla\\(${Fr},${ct},${ct},${Fr}\\)$`),bu={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};ma(Gr,Wr,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Du,formatHex:Du,formatHex8:fm,formatHsl:dm,formatRgb:Ou,toString:Ou});function Du(){return this.rgb().formatHex()}function fm(){return this.rgb().formatHex8()}function dm(){return Bd(this).formatHsl()}function Ou(){return this.rgb().formatRgb()}function Wr(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=im.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Hu(t):n===3?new Ie(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?xi(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?xi(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=om.exec(e))?new Ie(t[1],t[2],t[3],1):(t=lm.exec(e))?new Ie(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=sm.exec(e))?xi(t[1],t[2],t[3],t[4]):(t=am.exec(e))?xi(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=um.exec(e))?Wu(t[1],t[2]/100,t[3]/100,1):(t=cm.exec(e))?Wu(t[1],t[2]/100,t[3]/100,t[4]):bu.hasOwnProperty(e)?Hu(bu[e]):e==="transparent"?new Ie(NaN,NaN,NaN,0):null}function Hu(e){return new Ie(e>>16&255,e>>8&255,e&255,1)}function xi(e,t,n,r){return r<=0&&(e=t=n=NaN),new Ie(e,t,n,r)}function pm(e){return e instanceof Gr||(e=Wr(e)),e?(e=e.rgb(),new Ie(e.r,e.g,e.b,e.opacity)):new Ie}function us(e,t,n,r){return arguments.length===1?pm(e):new Ie(e,t,n,r??1)}function Ie(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}ma(Ie,us,Wd(Gr,{brighter(e){return e=e==null?co:Math.pow(co,e),new Ie(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?$r:Math.pow($r,e),new Ie(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ie(on(this.r),on(this.g),on(this.b),fo(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:$u,formatHex:$u,formatHex8:hm,formatRgb:Fu,toString:Fu}));function $u(){return`#${tn(this.r)}${tn(this.g)}${tn(this.b)}`}function hm(){return`#${tn(this.r)}${tn(this.g)}${tn(this.b)}${tn((isNaN(this.opacity)?1:this.opacity)*255)}`}function Fu(){const e=fo(this.opacity);return`${e===1?"rgb(":"rgba("}${on(this.r)}, ${on(this.g)}, ${on(this.b)}${e===1?")":`, ${e})`}`}function fo(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function on(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function tn(e){return e=on(e),(e<16?"0":"")+e.toString(16)}function Wu(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Je(e,t,n,r)}function Bd(e){if(e instanceof Je)return new Je(e.h,e.s,e.l,e.opacity);if(e instanceof Gr||(e=Wr(e)),!e)return new Je;if(e instanceof Je)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),l=NaN,a=o-i,u=(o+i)/2;return a?(t===o?l=(n-r)/a+(n<r)*6:n===o?l=(r-t)/a+2:l=(t-n)/a+4,a/=u<.5?o+i:2-o-i,l*=60):a=u>0&&u<1?0:l,new Je(l,a,u,e.opacity)}function gm(e,t,n,r){return arguments.length===1?Bd(e):new Je(e,t,n,r??1)}function Je(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}ma(Je,gm,Wd(Gr,{brighter(e){return e=e==null?co:Math.pow(co,e),new Je(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?$r:Math.pow($r,e),new Je(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Ie(ul(e>=240?e-240:e+120,i,r),ul(e,i,r),ul(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Je(Bu(this.h),vi(this.s),vi(this.l),fo(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=fo(this.opacity);return`${e===1?"hsl(":"hsla("}${Bu(this.h)}, ${vi(this.s)*100}%, ${vi(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Bu(e){return e=(e||0)%360,e<0?e+360:e}function vi(e){return Math.max(0,Math.min(1,e||0))}function ul(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Qd=e=>()=>e;function mm(e,t){return function(n){return e+n*t}}function ym(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function xm(e){return(e=+e)==1?Kd:function(t,n){return n-t?ym(t,n,e):Qd(isNaN(t)?n:t)}}function Kd(e,t){var n=t-e;return n?mm(e,n):Qd(isNaN(e)?t:e)}const Qu=function e(t){var n=xm(t);function r(i,o){var l=n((i=us(i)).r,(o=us(o)).r),a=n(i.g,o.g),u=n(i.b,o.b),c=Kd(i.opacity,o.opacity);return function(d){return i.r=l(d),i.g=a(d),i.b=u(d),i.opacity=c(d),i+""}}return r.gamma=e,r}(1);function zt(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var cs=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,cl=new RegExp(cs.source,"g");function vm(e){return function(){return e}}function wm(e){return function(t){return e(t)+""}}function Sm(e,t){var n=cs.lastIndex=cl.lastIndex=0,r,i,o,l=-1,a=[],u=[];for(e=e+"",t=t+"";(r=cs.exec(e))&&(i=cl.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),a[l]?a[l]+=o:a[++l]=o),(r=r[0])===(i=i[0])?a[l]?a[l]+=i:a[++l]=i:(a[++l]=null,u.push({i:l,x:zt(r,i)})),n=cl.lastIndex;return n<t.length&&(o=t.slice(n),a[l]?a[l]+=o:a[++l]=o),a.length<2?u[0]?wm(u[0].x):vm(t):(t=u.length,function(c){for(var d=0,g;d<t;++d)a[(g=u[d]).i]=g.x(c);return a.join("")})}var Ku=180/Math.PI,fs={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Xd(e,t,n,r,i,o){var l,a,u;return(l=Math.sqrt(e*e+t*t))&&(e/=l,t/=l),(u=e*n+t*r)&&(n-=e*u,r-=t*u),(a=Math.sqrt(n*n+r*r))&&(n/=a,r/=a,u/=a),e*r<t*n&&(e=-e,t=-t,u=-u,l=-l),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*Ku,skewX:Math.atan(u)*Ku,scaleX:l,scaleY:a}}var wi;function km(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?fs:Xd(t.a,t.b,t.c,t.d,t.e,t.f)}function _m(e){return e==null||(wi||(wi=document.createElementNS("http://www.w3.org/2000/svg","g")),wi.setAttribute("transform",e),!(e=wi.transform.baseVal.consolidate()))?fs:(e=e.matrix,Xd(e.a,e.b,e.c,e.d,e.e,e.f))}function Ud(e,t,n,r){function i(c){return c.length?c.pop()+" ":""}function o(c,d,g,f,y,k){if(c!==g||d!==f){var v=y.push("translate(",null,t,null,n);k.push({i:v-4,x:zt(c,g)},{i:v-2,x:zt(d,f)})}else(g||f)&&y.push("translate("+g+t+f+n)}function l(c,d,g,f){c!==d?(c-d>180?d+=360:d-c>180&&(c+=360),f.push({i:g.push(i(g)+"rotate(",null,r)-2,x:zt(c,d)})):d&&g.push(i(g)+"rotate("+d+r)}function a(c,d,g,f){c!==d?f.push({i:g.push(i(g)+"skewX(",null,r)-2,x:zt(c,d)}):d&&g.push(i(g)+"skewX("+d+r)}function u(c,d,g,f,y,k){if(c!==g||d!==f){var v=y.push(i(y)+"scale(",null,",",null,")");k.push({i:v-4,x:zt(c,g)},{i:v-2,x:zt(d,f)})}else(g!==1||f!==1)&&y.push(i(y)+"scale("+g+","+f+")")}return function(c,d){var g=[],f=[];return c=e(c),d=e(d),o(c.translateX,c.translateY,d.translateX,d.translateY,g,f),l(c.rotate,d.rotate,g,f),a(c.skewX,d.skewX,g,f),u(c.scaleX,c.scaleY,d.scaleX,d.scaleY,g,f),c=d=null,function(y){for(var k=-1,v=f.length,w;++k<v;)g[(w=f[k]).i]=w.x(y);return g.join("")}}}var jm=Ud(km,"px, ","px)","deg)"),Cm=Ud(_m,", ",")",")"),Em=1e-12;function Xu(e){return((e=Math.exp(e))+1/e)/2}function Tm(e){return((e=Math.exp(e))-1/e)/2}function Lm(e){return((e=Math.exp(2*e))-1)/(e+1)}const Im=function e(t,n,r){function i(o,l){var a=o[0],u=o[1],c=o[2],d=l[0],g=l[1],f=l[2],y=d-a,k=g-u,v=y*y+k*k,w,p;if(v<Em)p=Math.log(f/c)/t,w=function(E){return[a+E*y,u+E*k,c*Math.exp(t*E*p)]};else{var h=Math.sqrt(v),x=(f*f-c*c+r*v)/(2*c*n*h),m=(f*f-c*c-r*v)/(2*f*n*h),_=Math.log(Math.sqrt(x*x+1)-x),C=Math.log(Math.sqrt(m*m+1)-m);p=(C-_)/t,w=function(E){var j=E*p,D=Xu(_),R=c/(n*h)*(D*Lm(t*j+_)-Tm(_));return[a+R*y,u+R*k,c*D/Xu(t*j+_)]}}return w.duration=p*1e3*t/Math.SQRT2,w}return i.rho=function(o){var l=Math.max(.001,+o),a=l*l,u=a*a;return e(l,a,u)},i}(Math.SQRT2,2,4);var Qn=0,fr=0,or=0,Vd=1e3,po,dr,ho=0,dn=0,Ro=0,Br=typeof performance=="object"&&performance.now?performance:Date,Zd=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function ya(){return dn||(Zd(Mm),dn=Br.now()+Ro)}function Mm(){dn=0}function go(){this._call=this._time=this._next=null}go.prototype=xa.prototype={constructor:go,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?ya():+n)+(t==null?0:+t),!this._next&&dr!==this&&(dr?dr._next=this:po=this,dr=this),this._call=e,this._time=n,ds()},stop:function(){this._call&&(this._call=null,this._time=1/0,ds())}};function xa(e,t,n){var r=new go;return r.restart(e,t,n),r}function zm(){ya(),++Qn;for(var e=po,t;e;)(t=dn-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Qn}function Uu(){dn=(ho=Br.now())+Ro,Qn=fr=0;try{zm()}finally{Qn=0,Pm(),dn=0}}function Am(){var e=Br.now(),t=e-ho;t>Vd&&(Ro-=t,ho=e)}function Pm(){for(var e,t=po,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:po=n);dr=e,ds(r)}function ds(e){if(!Qn){fr&&(fr=clearTimeout(fr));var t=e-dn;t>24?(e<1/0&&(fr=setTimeout(Uu,e-Br.now()-Ro)),or&&(or=clearInterval(or))):(or||(ho=Br.now(),or=setInterval(Am,Vd)),Qn=1,Zd(Uu))}}function Vu(e,t,n){var r=new go;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var Rm=Zr("start","end","cancel","interrupt"),Nm=[],Yd=0,Zu=1,ps=2,bi=3,Yu=4,hs=5,Di=6;function No(e,t,n,r,i,o){var l=e.__transition;if(!l)e.__transition={};else if(n in l)return;bm(e,n,{name:t,index:r,group:i,on:Rm,tween:Nm,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Yd})}function va(e,t){var n=rt(e,t);if(n.state>Yd)throw new Error("too late; already scheduled");return n}function dt(e,t){var n=rt(e,t);if(n.state>bi)throw new Error("too late; already running");return n}function rt(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function bm(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=xa(o,0,n.time);function o(c){n.state=Zu,n.timer.restart(l,n.delay,n.time),n.delay<=c&&l(c-n.delay)}function l(c){var d,g,f,y;if(n.state!==Zu)return u();for(d in r)if(y=r[d],y.name===n.name){if(y.state===bi)return Vu(l);y.state===Yu?(y.state=Di,y.timer.stop(),y.on.call("interrupt",e,e.__data__,y.index,y.group),delete r[d]):+d<t&&(y.state=Di,y.timer.stop(),y.on.call("cancel",e,e.__data__,y.index,y.group),delete r[d])}if(Vu(function(){n.state===bi&&(n.state=Yu,n.timer.restart(a,n.delay,n.time),a(c))}),n.state=ps,n.on.call("start",e,e.__data__,n.index,n.group),n.state===ps){for(n.state=bi,i=new Array(f=n.tween.length),d=0,g=-1;d<f;++d)(y=n.tween[d].value.call(e,e.__data__,n.index,n.group))&&(i[++g]=y);i.length=g+1}}function a(c){for(var d=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(u),n.state=hs,1),g=-1,f=i.length;++g<f;)i[g].call(e,d);n.state===hs&&(n.on.call("end",e,e.__data__,n.index,n.group),u())}function u(){n.state=Di,n.timer.stop(),delete r[t];for(var c in r)return;delete e.__transition}}function Oi(e,t){var n=e.__transition,r,i,o=!0,l;if(n){t=t==null?null:t+"";for(l in n){if((r=n[l]).name!==t){o=!1;continue}i=r.state>ps&&r.state<hs,r.state=Di,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[l]}o&&delete e.__transition}}function Dm(e){return this.each(function(){Oi(this,e)})}function Om(e,t){var n,r;return function(){var i=dt(this,e),o=i.tween;if(o!==n){r=n=o;for(var l=0,a=r.length;l<a;++l)if(r[l].name===t){r=r.slice(),r.splice(l,1);break}}i.tween=r}}function Hm(e,t,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=dt(this,e),l=o.tween;if(l!==r){i=(r=l).slice();for(var a={name:t,value:n},u=0,c=i.length;u<c;++u)if(i[u].name===t){i[u]=a;break}u===c&&i.push(a)}o.tween=i}}function $m(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=rt(this.node(),n).tween,i=0,o=r.length,l;i<o;++i)if((l=r[i]).name===e)return l.value;return null}return this.each((t==null?Om:Hm)(n,e,t))}function wa(e,t,n){var r=e._id;return e.each(function(){var i=dt(this,r);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return rt(i,r).value[t]}}function Gd(e,t){var n;return(typeof t=="number"?zt:t instanceof Wr?Qu:(n=Wr(t))?(t=n,Qu):Sm)(e,t)}function Fm(e){return function(){this.removeAttribute(e)}}function Wm(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Bm(e,t,n){var r,i=n+"",o;return function(){var l=this.getAttribute(e);return l===i?null:l===r?o:o=t(r=l,n)}}function Qm(e,t,n){var r,i=n+"",o;return function(){var l=this.getAttributeNS(e.space,e.local);return l===i?null:l===r?o:o=t(r=l,n)}}function Km(e,t,n){var r,i,o;return function(){var l,a=n(this),u;return a==null?void this.removeAttribute(e):(l=this.getAttribute(e),u=a+"",l===u?null:l===r&&u===i?o:(i=u,o=t(r=l,a)))}}function Xm(e,t,n){var r,i,o;return function(){var l,a=n(this),u;return a==null?void this.removeAttributeNS(e.space,e.local):(l=this.getAttributeNS(e.space,e.local),u=a+"",l===u?null:l===r&&u===i?o:(i=u,o=t(r=l,a)))}}function Um(e,t){var n=Po(e),r=n==="transform"?Cm:Gd;return this.attrTween(e,typeof t=="function"?(n.local?Xm:Km)(n,r,wa(this,"attr."+e,t)):t==null?(n.local?Wm:Fm)(n):(n.local?Qm:Bm)(n,r,t))}function Vm(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Zm(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Ym(e,t){var n,r;function i(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&Zm(e,o)),n}return i._value=t,i}function Gm(e,t){var n,r;function i(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&Vm(e,o)),n}return i._value=t,i}function qm(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=Po(e);return this.tween(n,(r.local?Ym:Gm)(r,t))}function Jm(e,t){return function(){va(this,e).delay=+t.apply(this,arguments)}}function ey(e,t){return t=+t,function(){va(this,e).delay=t}}function ty(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Jm:ey)(t,e)):rt(this.node(),t).delay}function ny(e,t){return function(){dt(this,e).duration=+t.apply(this,arguments)}}function ry(e,t){return t=+t,function(){dt(this,e).duration=t}}function iy(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?ny:ry)(t,e)):rt(this.node(),t).duration}function oy(e,t){if(typeof t!="function")throw new Error;return function(){dt(this,e).ease=t}}function ly(e){var t=this._id;return arguments.length?this.each(oy(t,e)):rt(this.node(),t).ease}function sy(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;dt(this,e).ease=n}}function ay(e){if(typeof e!="function")throw new Error;return this.each(sy(this._id,e))}function uy(e){typeof e!="function"&&(e=Md(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],l=o.length,a=r[i]=[],u,c=0;c<l;++c)(u=o[c])&&e.call(u,u.__data__,c,o)&&a.push(u);return new Ct(r,this._parents,this._name,this._id)}function cy(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,o=Math.min(r,i),l=new Array(r),a=0;a<o;++a)for(var u=t[a],c=n[a],d=u.length,g=l[a]=new Array(d),f,y=0;y<d;++y)(f=u[y]||c[y])&&(g[y]=f);for(;a<r;++a)l[a]=t[a];return new Ct(l,this._parents,this._name,this._id)}function fy(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function dy(e,t,n){var r,i,o=fy(t)?va:dt;return function(){var l=o(this,e),a=l.on;a!==r&&(i=(r=a).copy()).on(t,n),l.on=i}}function py(e,t){var n=this._id;return arguments.length<2?rt(this.node(),n).on.on(e):this.each(dy(n,e,t))}function hy(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function gy(){return this.on("end.remove",hy(this._id))}function my(e){var t=this._name,n=this._id;typeof e!="function"&&(e=ha(e));for(var r=this._groups,i=r.length,o=new Array(i),l=0;l<i;++l)for(var a=r[l],u=a.length,c=o[l]=new Array(u),d,g,f=0;f<u;++f)(d=a[f])&&(g=e.call(d,d.__data__,f,a))&&("__data__"in d&&(g.__data__=d.__data__),c[f]=g,No(c[f],t,n,f,c,rt(d,n)));return new Ct(o,this._parents,t,n)}function yy(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Id(e));for(var r=this._groups,i=r.length,o=[],l=[],a=0;a<i;++a)for(var u=r[a],c=u.length,d,g=0;g<c;++g)if(d=u[g]){for(var f=e.call(d,d.__data__,g,u),y,k=rt(d,n),v=0,w=f.length;v<w;++v)(y=f[v])&&No(y,t,n,v,f,k);o.push(f),l.push(d)}return new Ct(o,l,t,n)}var xy=Yr.prototype.constructor;function vy(){return new xy(this._groups,this._parents)}function wy(e,t){var n,r,i;return function(){var o=Bn(this,e),l=(this.style.removeProperty(e),Bn(this,e));return o===l?null:o===n&&l===r?i:i=t(n=o,r=l)}}function qd(e){return function(){this.style.removeProperty(e)}}function Sy(e,t,n){var r,i=n+"",o;return function(){var l=Bn(this,e);return l===i?null:l===r?o:o=t(r=l,n)}}function ky(e,t,n){var r,i,o;return function(){var l=Bn(this,e),a=n(this),u=a+"";return a==null&&(u=a=(this.style.removeProperty(e),Bn(this,e))),l===u?null:l===r&&u===i?o:(i=u,o=t(r=l,a))}}function _y(e,t){var n,r,i,o="style."+t,l="end."+o,a;return function(){var u=dt(this,e),c=u.on,d=u.value[o]==null?a||(a=qd(t)):void 0;(c!==n||i!==d)&&(r=(n=c).copy()).on(l,i=d),u.on=r}}function jy(e,t,n){var r=(e+="")=="transform"?jm:Gd;return t==null?this.styleTween(e,wy(e,r)).on("end.style."+e,qd(e)):typeof t=="function"?this.styleTween(e,ky(e,r,wa(this,"style."+e,t))).each(_y(this._id,e)):this.styleTween(e,Sy(e,r,t),n).on("end.style."+e,null)}function Cy(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function Ey(e,t,n){var r,i;function o(){var l=t.apply(this,arguments);return l!==i&&(r=(i=l)&&Cy(e,l,n)),r}return o._value=t,o}function Ty(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,Ey(e,t,n??""))}function Ly(e){return function(){this.textContent=e}}function Iy(e){return function(){var t=e(this);this.textContent=t??""}}function My(e){return this.tween("text",typeof e=="function"?Iy(wa(this,"text",e)):Ly(e==null?"":e+""))}function zy(e){return function(t){this.textContent=e.call(this,t)}}function Ay(e){var t,n;function r(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&zy(i)),t}return r._value=e,r}function Py(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,Ay(e))}function Ry(){for(var e=this._name,t=this._id,n=Jd(),r=this._groups,i=r.length,o=0;o<i;++o)for(var l=r[o],a=l.length,u,c=0;c<a;++c)if(u=l[c]){var d=rt(u,t);No(u,e,n,c,l,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new Ct(r,this._parents,e,n)}function Ny(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(o,l){var a={value:l},u={value:function(){--i===0&&o()}};n.each(function(){var c=dt(this,r),d=c.on;d!==e&&(t=(e=d).copy(),t._.cancel.push(a),t._.interrupt.push(a),t._.end.push(u)),c.on=t}),i===0&&o()})}var by=0;function Ct(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function Jd(){return++by}var pt=Yr.prototype;Ct.prototype={constructor:Ct,select:my,selectAll:yy,selectChild:pt.selectChild,selectChildren:pt.selectChildren,filter:uy,merge:cy,selection:vy,transition:Ry,call:pt.call,nodes:pt.nodes,node:pt.node,size:pt.size,empty:pt.empty,each:pt.each,on:py,attr:Um,attrTween:qm,style:jy,styleTween:Ty,text:My,textTween:Py,remove:gy,tween:$m,delay:ty,duration:iy,ease:ly,easeVarying:ay,end:Ny,[Symbol.iterator]:pt[Symbol.iterator]};function Dy(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Oy={time:null,delay:0,duration:250,ease:Dy};function Hy(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function $y(e){var t,n;e instanceof Ct?(t=e._id,e=e._name):(t=Jd(),(n=Oy).time=ya(),e=e==null?null:e+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var l=r[o],a=l.length,u,c=0;c<a;++c)(u=l[c])&&No(u,e,t,c,l,n||Hy(u,t));return new Ct(r,this._parents,e,t)}Yr.prototype.interrupt=Dm;Yr.prototype.transition=$y;function Gu(e,t){var n,r=1;e==null&&(e=0),t==null&&(t=0);function i(){var o,l=n.length,a,u=0,c=0;for(o=0;o<l;++o)a=n[o],u+=a.x,c+=a.y;for(u=(u/l-e)*r,c=(c/l-t)*r,o=0;o<l;++o)a=n[o],a.x-=u,a.y-=c}return i.initialize=function(o){n=o},i.x=function(o){return arguments.length?(e=+o,i):e},i.y=function(o){return arguments.length?(t=+o,i):t},i.strength=function(o){return arguments.length?(r=+o,i):r},i}function Fy(e){const t=+this._x.call(null,e),n=+this._y.call(null,e);return e0(this.cover(t,n),t,n,e)}function e0(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var i,o=e._root,l={data:r},a=e._x0,u=e._y0,c=e._x1,d=e._y1,g,f,y,k,v,w,p,h;if(!o)return e._root=l,e;for(;o.length;)if((v=t>=(g=(a+c)/2))?a=g:c=g,(w=n>=(f=(u+d)/2))?u=f:d=f,i=o,!(o=o[p=w<<1|v]))return i[p]=l,e;if(y=+e._x.call(null,o.data),k=+e._y.call(null,o.data),t===y&&n===k)return l.next=o,i?i[p]=l:e._root=l,e;do i=i?i[p]=new Array(4):e._root=new Array(4),(v=t>=(g=(a+c)/2))?a=g:c=g,(w=n>=(f=(u+d)/2))?u=f:d=f;while((p=w<<1|v)===(h=(k>=f)<<1|y>=g));return i[h]=o,i[p]=l,e}function Wy(e){var t,n,r=e.length,i,o,l=new Array(r),a=new Array(r),u=1/0,c=1/0,d=-1/0,g=-1/0;for(n=0;n<r;++n)isNaN(i=+this._x.call(null,t=e[n]))||isNaN(o=+this._y.call(null,t))||(l[n]=i,a[n]=o,i<u&&(u=i),i>d&&(d=i),o<c&&(c=o),o>g&&(g=o));if(u>d||c>g)return this;for(this.cover(u,c).cover(d,g),n=0;n<r;++n)e0(this,l[n],a[n],e[n]);return this}function By(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(e))+1,o=(r=Math.floor(t))+1;else{for(var l=i-n||1,a=this._root,u,c;n>e||e>=i||r>t||t>=o;)switch(c=(t<r)<<1|e<n,u=new Array(4),u[c]=a,a=u,l*=2,c){case 0:i=n+l,o=r+l;break;case 1:n=i-l,o=r+l;break;case 2:i=n+l,r=o-l;break;case 3:n=i-l,r=o-l;break}this._root&&this._root.length&&(this._root=a)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this}function Qy(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}function Ky(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function ke(e,t,n,r,i){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=i}function Xy(e,t,n){var r,i=this._x0,o=this._y0,l,a,u,c,d=this._x1,g=this._y1,f=[],y=this._root,k,v;for(y&&f.push(new ke(y,i,o,d,g)),n==null?n=1/0:(i=e-n,o=t-n,d=e+n,g=t+n,n*=n);k=f.pop();)if(!(!(y=k.node)||(l=k.x0)>d||(a=k.y0)>g||(u=k.x1)<i||(c=k.y1)<o))if(y.length){var w=(l+u)/2,p=(a+c)/2;f.push(new ke(y[3],w,p,u,c),new ke(y[2],l,p,w,c),new ke(y[1],w,a,u,p),new ke(y[0],l,a,w,p)),(v=(t>=p)<<1|e>=w)&&(k=f[f.length-1],f[f.length-1]=f[f.length-1-v],f[f.length-1-v]=k)}else{var h=e-+this._x.call(null,y.data),x=t-+this._y.call(null,y.data),m=h*h+x*x;if(m<n){var _=Math.sqrt(n=m);i=e-_,o=t-_,d=e+_,g=t+_,r=y.data}}return r}function Uy(e){if(isNaN(d=+this._x.call(null,e))||isNaN(g=+this._y.call(null,e)))return this;var t,n=this._root,r,i,o,l=this._x0,a=this._y0,u=this._x1,c=this._y1,d,g,f,y,k,v,w,p;if(!n)return this;if(n.length)for(;;){if((k=d>=(f=(l+u)/2))?l=f:u=f,(v=g>=(y=(a+c)/2))?a=y:c=y,t=n,!(n=n[w=v<<1|k]))return this;if(!n.length)break;(t[w+1&3]||t[w+2&3]||t[w+3&3])&&(r=t,p=w)}for(;n.data!==e;)if(i=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,i?(o?i.next=o:delete i.next,this):t?(o?t[w]=o:delete t[w],(n=t[0]||t[1]||t[2]||t[3])&&n===(t[3]||t[2]||t[1]||t[0])&&!n.length&&(r?r[p]=n:this._root=n),this):(this._root=o,this)}function Vy(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this}function Zy(){return this._root}function Yy(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}function Gy(e){var t=[],n,r=this._root,i,o,l,a,u;for(r&&t.push(new ke(r,this._x0,this._y0,this._x1,this._y1));n=t.pop();)if(!e(r=n.node,o=n.x0,l=n.y0,a=n.x1,u=n.y1)&&r.length){var c=(o+a)/2,d=(l+u)/2;(i=r[3])&&t.push(new ke(i,c,d,a,u)),(i=r[2])&&t.push(new ke(i,o,d,c,u)),(i=r[1])&&t.push(new ke(i,c,l,a,d)),(i=r[0])&&t.push(new ke(i,o,l,c,d))}return this}function qy(e){var t=[],n=[],r;for(this._root&&t.push(new ke(this._root,this._x0,this._y0,this._x1,this._y1));r=t.pop();){var i=r.node;if(i.length){var o,l=r.x0,a=r.y0,u=r.x1,c=r.y1,d=(l+u)/2,g=(a+c)/2;(o=i[0])&&t.push(new ke(o,l,a,d,g)),(o=i[1])&&t.push(new ke(o,d,a,u,g)),(o=i[2])&&t.push(new ke(o,l,g,d,c)),(o=i[3])&&t.push(new ke(o,d,g,u,c))}n.push(r)}for(;r=n.pop();)e(r.node,r.x0,r.y0,r.x1,r.y1);return this}function Jy(e){return e[0]}function ex(e){return arguments.length?(this._x=e,this):this._x}function tx(e){return e[1]}function nx(e){return arguments.length?(this._y=e,this):this._y}function Sa(e,t,n){var r=new ka(t??Jy,n??tx,NaN,NaN,NaN,NaN);return e==null?r:r.addAll(e)}function ka(e,t,n,r,i,o){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function qu(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var Ee=Sa.prototype=ka.prototype;Ee.copy=function(){var e=new ka(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root,n,r;if(!t)return e;if(!t.length)return e._root=qu(t),e;for(n=[{source:t,target:e._root=new Array(4)}];t=n.pop();)for(var i=0;i<4;++i)(r=t.source[i])&&(r.length?n.push({source:r,target:t.target[i]=new Array(4)}):t.target[i]=qu(r));return e};Ee.add=Fy;Ee.addAll=Wy;Ee.cover=By;Ee.data=Qy;Ee.extent=Ky;Ee.find=Xy;Ee.remove=Uy;Ee.removeAll=Vy;Ee.root=Zy;Ee.size=Yy;Ee.visit=Gy;Ee.visitAfter=qy;Ee.x=ex;Ee.y=nx;function ln(e){return function(){return e}}function bt(e){return(e()-.5)*1e-6}function rx(e){return e.x+e.vx}function ix(e){return e.y+e.vy}function ox(e){var t,n,r,i=1,o=1;typeof e!="function"&&(e=ln(e==null?1:+e));function l(){for(var c,d=t.length,g,f,y,k,v,w,p=0;p<o;++p)for(g=Sa(t,rx,ix).visitAfter(a),c=0;c<d;++c)f=t[c],v=n[f.index],w=v*v,y=f.x+f.vx,k=f.y+f.vy,g.visit(h);function h(x,m,_,C,E){var j=x.data,D=x.r,R=v+D;if(j){if(j.index>f.index){var H=y-j.x-j.vx,B=k-j.y-j.vy,U=H*H+B*B;U<R*R&&(H===0&&(H=bt(r),U+=H*H),B===0&&(B=bt(r),U+=B*B),U=(R-(U=Math.sqrt(U)))/U*i,f.vx+=(H*=U)*(R=(D*=D)/(w+D)),f.vy+=(B*=U)*R,j.vx-=H*(R=1-R),j.vy-=B*R)}return}return m>y+R||C<y-R||_>k+R||E<k-R}}function a(c){if(c.data)return c.r=n[c.data.index];for(var d=c.r=0;d<4;++d)c[d]&&c[d].r>c.r&&(c.r=c[d].r)}function u(){if(t){var c,d=t.length,g;for(n=new Array(d),c=0;c<d;++c)g=t[c],n[g.index]=+e(g,c,t)}}return l.initialize=function(c,d){t=c,r=d,u()},l.iterations=function(c){return arguments.length?(o=+c,l):o},l.strength=function(c){return arguments.length?(i=+c,l):i},l.radius=function(c){return arguments.length?(e=typeof c=="function"?c:ln(+c),u(),l):e},l}function lx(e){return e.index}function Ju(e,t){var n=e.get(t);if(!n)throw new Error("node not found: "+t);return n}function sx(e){var t=lx,n=g,r,i=ln(30),o,l,a,u,c,d=1;e==null&&(e=[]);function g(w){return 1/Math.min(a[w.source.index],a[w.target.index])}function f(w){for(var p=0,h=e.length;p<d;++p)for(var x=0,m,_,C,E,j,D,R;x<h;++x)m=e[x],_=m.source,C=m.target,E=C.x+C.vx-_.x-_.vx||bt(c),j=C.y+C.vy-_.y-_.vy||bt(c),D=Math.sqrt(E*E+j*j),D=(D-o[x])/D*w*r[x],E*=D,j*=D,C.vx-=E*(R=u[x]),C.vy-=j*R,_.vx+=E*(R=1-R),_.vy+=j*R}function y(){if(l){var w,p=l.length,h=e.length,x=new Map(l.map((_,C)=>[t(_,C,l),_])),m;for(w=0,a=new Array(p);w<h;++w)m=e[w],m.index=w,typeof m.source!="object"&&(m.source=Ju(x,m.source)),typeof m.target!="object"&&(m.target=Ju(x,m.target)),a[m.source.index]=(a[m.source.index]||0)+1,a[m.target.index]=(a[m.target.index]||0)+1;for(w=0,u=new Array(h);w<h;++w)m=e[w],u[w]=a[m.source.index]/(a[m.source.index]+a[m.target.index]);r=new Array(h),k(),o=new Array(h),v()}}function k(){if(l)for(var w=0,p=e.length;w<p;++w)r[w]=+n(e[w],w,e)}function v(){if(l)for(var w=0,p=e.length;w<p;++w)o[w]=+i(e[w],w,e)}return f.initialize=function(w,p){l=w,c=p,y()},f.links=function(w){return arguments.length?(e=w,y(),f):e},f.id=function(w){return arguments.length?(t=w,f):t},f.iterations=function(w){return arguments.length?(d=+w,f):d},f.strength=function(w){return arguments.length?(n=typeof w=="function"?w:ln(+w),k(),f):n},f.distance=function(w){return arguments.length?(i=typeof w=="function"?w:ln(+w),v(),f):i},f}const ax=1664525,ux=1013904223,ec=4294967296;function cx(){let e=1;return()=>(e=(ax*e+ux)%ec)/ec}function fx(e){return e.x}function dx(e){return e.y}var px=10,hx=Math.PI*(3-Math.sqrt(5));function gx(e){var t,n=1,r=.001,i=1-Math.pow(r,1/300),o=0,l=.6,a=new Map,u=xa(g),c=Zr("tick","end"),d=cx();e==null&&(e=[]);function g(){f(),c.call("tick",t),n<r&&(u.stop(),c.call("end",t))}function f(v){var w,p=e.length,h;v===void 0&&(v=1);for(var x=0;x<v;++x)for(n+=(o-n)*i,a.forEach(function(m){m(n)}),w=0;w<p;++w)h=e[w],h.fx==null?h.x+=h.vx*=l:(h.x=h.fx,h.vx=0),h.fy==null?h.y+=h.vy*=l:(h.y=h.fy,h.vy=0);return t}function y(){for(var v=0,w=e.length,p;v<w;++v){if(p=e[v],p.index=v,p.fx!=null&&(p.x=p.fx),p.fy!=null&&(p.y=p.fy),isNaN(p.x)||isNaN(p.y)){var h=px*Math.sqrt(.5+v),x=v*hx;p.x=h*Math.cos(x),p.y=h*Math.sin(x)}(isNaN(p.vx)||isNaN(p.vy))&&(p.vx=p.vy=0)}}function k(v){return v.initialize&&v.initialize(e,d),v}return y(),t={tick:f,restart:function(){return u.restart(g),t},stop:function(){return u.stop(),t},nodes:function(v){return arguments.length?(e=v,y(),a.forEach(k),t):e},alpha:function(v){return arguments.length?(n=+v,t):n},alphaMin:function(v){return arguments.length?(r=+v,t):r},alphaDecay:function(v){return arguments.length?(i=+v,t):+i},alphaTarget:function(v){return arguments.length?(o=+v,t):o},velocityDecay:function(v){return arguments.length?(l=1-v,t):1-l},randomSource:function(v){return arguments.length?(d=v,a.forEach(k),t):d},force:function(v,w){return arguments.length>1?(w==null?a.delete(v):a.set(v,k(w)),t):a.get(v)},find:function(v,w,p){var h=0,x=e.length,m,_,C,E,j;for(p==null?p=1/0:p*=p,h=0;h<x;++h)E=e[h],m=v-E.x,_=w-E.y,C=m*m+_*_,C<p&&(j=E,p=C);return j},on:function(v,w){return arguments.length>1?(c.on(v,w),t):c.on(v)}}}function mx(){var e,t,n,r,i=ln(-30),o,l=1,a=1/0,u=.81;function c(y){var k,v=e.length,w=Sa(e,fx,dx).visitAfter(g);for(r=y,k=0;k<v;++k)t=e[k],w.visit(f)}function d(){if(e){var y,k=e.length,v;for(o=new Array(k),y=0;y<k;++y)v=e[y],o[v.index]=+i(v,y,e)}}function g(y){var k=0,v,w,p=0,h,x,m;if(y.length){for(h=x=m=0;m<4;++m)(v=y[m])&&(w=Math.abs(v.value))&&(k+=v.value,p+=w,h+=w*v.x,x+=w*v.y);y.x=h/p,y.y=x/p}else{v=y,v.x=v.data.x,v.y=v.data.y;do k+=o[v.data.index];while(v=v.next)}y.value=k}function f(y,k,v,w){if(!y.value)return!0;var p=y.x-t.x,h=y.y-t.y,x=w-k,m=p*p+h*h;if(x*x/u<m)return m<a&&(p===0&&(p=bt(n),m+=p*p),h===0&&(h=bt(n),m+=h*h),m<l&&(m=Math.sqrt(l*m)),t.vx+=p*y.value*r/m,t.vy+=h*y.value*r/m),!0;if(y.length||m>=a)return;(y.data!==t||y.next)&&(p===0&&(p=bt(n),m+=p*p),h===0&&(h=bt(n),m+=h*h),m<l&&(m=Math.sqrt(l*m)));do y.data!==t&&(x=o[y.data.index]*r/m,t.vx+=p*x,t.vy+=h*x);while(y=y.next)}return c.initialize=function(y,k){e=y,n=k,d()},c.strength=function(y){return arguments.length?(i=typeof y=="function"?y:ln(+y),d(),c):i},c.distanceMin=function(y){return arguments.length?(l=y*y,c):Math.sqrt(l)},c.distanceMax=function(y){return arguments.length?(a=y*y,c):Math.sqrt(a)},c.theta=function(y){return arguments.length?(u=y*y,c):Math.sqrt(u)},c}const Si=e=>()=>e;function yx(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function vt(e,t,n){this.k=e,this.x=t,this.y=n}vt.prototype={constructor:vt,scale:function(e){return e===1?this:new vt(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new vt(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var t0=new vt(1,0,0);vt.prototype;function fl(e){e.stopImmediatePropagation()}function lr(e){e.preventDefault(),e.stopImmediatePropagation()}function xx(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function vx(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function tc(){return this.__zoom||t0}function wx(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Sx(){return navigator.maxTouchPoints||"ontouchstart"in this}function kx(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],o=e.invertY(t[0][1])-n[0][1],l=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),l>o?(o+l)/2:Math.min(0,o)||Math.max(0,l))}function _x(){var e=xx,t=vx,n=kx,r=wx,i=Sx,o=[0,1/0],l=[[-1/0,-1/0],[1/0,1/0]],a=250,u=Im,c=Zr("start","zoom","end"),d,g,f,y=500,k=150,v=0,w=10;function p(S){S.property("__zoom",tc).on("wheel.zoom",j,{passive:!1}).on("mousedown.zoom",D).on("dblclick.zoom",R).filter(i).on("touchstart.zoom",H).on("touchmove.zoom",B).on("touchend.zoom touchcancel.zoom",U).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}p.transform=function(S,I,T,N){var L=S.selection?S.selection():S;L.property("__zoom",tc),S!==L?_(S,I,T,N):L.interrupt().each(function(){C(this,arguments).event(N).start().zoom(null,typeof I=="function"?I.apply(this,arguments):I).end()})},p.scaleBy=function(S,I,T,N){p.scaleTo(S,function(){var L=this.__zoom.k,A=typeof I=="function"?I.apply(this,arguments):I;return L*A},T,N)},p.scaleTo=function(S,I,T,N){p.transform(S,function(){var L=t.apply(this,arguments),A=this.__zoom,P=T==null?m(L):typeof T=="function"?T.apply(this,arguments):T,O=A.invert(P),$=typeof I=="function"?I.apply(this,arguments):I;return n(x(h(A,$),P,O),L,l)},T,N)},p.translateBy=function(S,I,T,N){p.transform(S,function(){return n(this.__zoom.translate(typeof I=="function"?I.apply(this,arguments):I,typeof T=="function"?T.apply(this,arguments):T),t.apply(this,arguments),l)},null,N)},p.translateTo=function(S,I,T,N,L){p.transform(S,function(){var A=t.apply(this,arguments),P=this.__zoom,O=N==null?m(A):typeof N=="function"?N.apply(this,arguments):N;return n(t0.translate(O[0],O[1]).scale(P.k).translate(typeof I=="function"?-I.apply(this,arguments):-I,typeof T=="function"?-T.apply(this,arguments):-T),A,l)},N,L)};function h(S,I){return I=Math.max(o[0],Math.min(o[1],I)),I===S.k?S:new vt(I,S.x,S.y)}function x(S,I,T){var N=I[0]-T[0]*S.k,L=I[1]-T[1]*S.k;return N===S.x&&L===S.y?S:new vt(S.k,N,L)}function m(S){return[(+S[0][0]+ +S[1][0])/2,(+S[0][1]+ +S[1][1])/2]}function _(S,I,T,N){S.on("start.zoom",function(){C(this,arguments).event(N).start()}).on("interrupt.zoom end.zoom",function(){C(this,arguments).event(N).end()}).tween("zoom",function(){var L=this,A=arguments,P=C(L,A).event(N),O=t.apply(L,A),$=T==null?m(O):typeof T=="function"?T.apply(L,A):T,ie=Math.max(O[1][0]-O[0][0],O[1][1]-O[0][1]),X=L.__zoom,Q=typeof I=="function"?I.apply(L,A):I,ae=u(X.invert($).concat(ie/X.k),Q.invert($).concat(ie/Q.k));return function(fe){if(fe===1)fe=Q;else{var Ve=ae(fe),Vn=ie/Ve[2];fe=new vt(Vn,$[0]-Ve[0]*Vn,$[1]-Ve[1]*Vn)}P.zoom(null,fe)}})}function C(S,I,T){return!T&&S.__zooming||new E(S,I)}function E(S,I){this.that=S,this.args=I,this.active=0,this.sourceEvent=null,this.extent=t.apply(S,I),this.taps=0}E.prototype={event:function(S){return S&&(this.sourceEvent=S),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(S,I){return this.mouse&&S!=="mouse"&&(this.mouse[1]=I.invert(this.mouse[0])),this.touch0&&S!=="touch"&&(this.touch0[1]=I.invert(this.touch0[0])),this.touch1&&S!=="touch"&&(this.touch1[1]=I.invert(this.touch1[0])),this.that.__zoom=I,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(S){var I=st(this.that).datum();c.call(S,this.that,new yx(S,{sourceEvent:this.sourceEvent,target:p,transform:this.that.__zoom,dispatch:c}),I)}};function j(S,...I){if(!e.apply(this,arguments))return;var T=C(this,I).event(S),N=this.__zoom,L=Math.max(o[0],Math.min(o[1],N.k*Math.pow(2,r.apply(this,arguments)))),A=gt(S);if(T.wheel)(T.mouse[0][0]!==A[0]||T.mouse[0][1]!==A[1])&&(T.mouse[1]=N.invert(T.mouse[0]=A)),clearTimeout(T.wheel);else{if(N.k===L)return;T.mouse=[A,N.invert(A)],Oi(this),T.start()}lr(S),T.wheel=setTimeout(P,k),T.zoom("mouse",n(x(h(N,L),T.mouse[0],T.mouse[1]),T.extent,l));function P(){T.wheel=null,T.end()}}function D(S,...I){if(f||!e.apply(this,arguments))return;var T=S.currentTarget,N=C(this,I,!0).event(S),L=st(S.view).on("mousemove.zoom",$,!0).on("mouseup.zoom",ie,!0),A=gt(S,T),P=S.clientX,O=S.clientY;$d(S.view),fl(S),N.mouse=[A,this.__zoom.invert(A)],Oi(this),N.start();function $(X){if(lr(X),!N.moved){var Q=X.clientX-P,ae=X.clientY-O;N.moved=Q*Q+ae*ae>v}N.event(X).zoom("mouse",n(x(N.that.__zoom,N.mouse[0]=gt(X,T),N.mouse[1]),N.extent,l))}function ie(X){L.on("mousemove.zoom mouseup.zoom",null),Fd(X.view,N.moved),lr(X),N.event(X).end()}}function R(S,...I){if(e.apply(this,arguments)){var T=this.__zoom,N=gt(S.changedTouches?S.changedTouches[0]:S,this),L=T.invert(N),A=T.k*(S.shiftKey?.5:2),P=n(x(h(T,A),N,L),t.apply(this,I),l);lr(S),a>0?st(this).transition().duration(a).call(_,P,N,S):st(this).call(p.transform,P,N,S)}}function H(S,...I){if(e.apply(this,arguments)){var T=S.touches,N=T.length,L=C(this,I,S.changedTouches.length===N).event(S),A,P,O,$;for(fl(S),P=0;P<N;++P)O=T[P],$=gt(O,this),$=[$,this.__zoom.invert($),O.identifier],L.touch0?!L.touch1&&L.touch0[2]!==$[2]&&(L.touch1=$,L.taps=0):(L.touch0=$,A=!0,L.taps=1+!!d);d&&(d=clearTimeout(d)),A&&(L.taps<2&&(g=$[0],d=setTimeout(function(){d=null},y)),Oi(this),L.start())}}function B(S,...I){if(this.__zooming){var T=C(this,I).event(S),N=S.changedTouches,L=N.length,A,P,O,$;for(lr(S),A=0;A<L;++A)P=N[A],O=gt(P,this),T.touch0&&T.touch0[2]===P.identifier?T.touch0[0]=O:T.touch1&&T.touch1[2]===P.identifier&&(T.touch1[0]=O);if(P=T.that.__zoom,T.touch1){var ie=T.touch0[0],X=T.touch0[1],Q=T.touch1[0],ae=T.touch1[1],fe=(fe=Q[0]-ie[0])*fe+(fe=Q[1]-ie[1])*fe,Ve=(Ve=ae[0]-X[0])*Ve+(Ve=ae[1]-X[1])*Ve;P=h(P,Math.sqrt(fe/Ve)),O=[(ie[0]+Q[0])/2,(ie[1]+Q[1])/2],$=[(X[0]+ae[0])/2,(X[1]+ae[1])/2]}else if(T.touch0)O=T.touch0[0],$=T.touch0[1];else return;T.zoom("touch",n(x(P,O,$),T.extent,l))}}function U(S,...I){if(this.__zooming){var T=C(this,I).event(S),N=S.changedTouches,L=N.length,A,P;for(fl(S),f&&clearTimeout(f),f=setTimeout(function(){f=null},y),A=0;A<L;++A)P=N[A],T.touch0&&T.touch0[2]===P.identifier?delete T.touch0:T.touch1&&T.touch1[2]===P.identifier&&delete T.touch1;if(T.touch1&&!T.touch0&&(T.touch0=T.touch1,delete T.touch1),T.touch0)T.touch0[1]=this.__zoom.invert(T.touch0[0]);else if(T.end(),T.taps===2&&(P=gt(P,this),Math.hypot(g[0]-P[0],g[1]-P[1])<w)){var O=st(this).on("dblclick.zoom");O&&O.apply(this,arguments)}}}return p.wheelDelta=function(S){return arguments.length?(r=typeof S=="function"?S:Si(+S),p):r},p.filter=function(S){return arguments.length?(e=typeof S=="function"?S:Si(!!S),p):e},p.touchable=function(S){return arguments.length?(i=typeof S=="function"?S:Si(!!S),p):i},p.extent=function(S){return arguments.length?(t=typeof S=="function"?S:Si([[+S[0][0],+S[0][1]],[+S[1][0],+S[1][1]]]),p):t},p.scaleExtent=function(S){return arguments.length?(o[0]=+S[0],o[1]=+S[1],p):[o[0],o[1]]},p.translateExtent=function(S){return arguments.length?(l[0][0]=+S[0][0],l[1][0]=+S[1][0],l[0][1]=+S[0][1],l[1][1]=+S[1][1],p):[[l[0][0],l[0][1]],[l[1][0],l[1][1]]]},p.constrain=function(S){return arguments.length?(n=S,p):n},p.duration=function(S){return arguments.length?(a=+S,p):a},p.interpolate=function(S){return arguments.length?(u=S,p):u},p.on=function(){var S=c.on.apply(c,arguments);return S===c?p:S},p.clickDistance=function(S){return arguments.length?(v=(S=+S)*S,p):Math.sqrt(v)},p.tapDistance=function(S){return arguments.length?(w=+S,p):w},p}const jx=()=>s.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),s.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),Cx=e=>{switch(e){case"actor":return"Actor Connection";case"temporal":return"Temporal Sequence";case"relation":return"Relation";default:return"Connection"}},Ex=e=>{switch(e){case"actor":return"Links an actor to their performed events";case"temporal":return"Shows the chronological order of events by the same actor";case"relation":return"Indicates a semantic relationship between events";default:return"A connection between nodes"}},dl=e=>{switch(e){case"actor":return"#a3a3a3";case"temporal":return"#3b82f6";case"relation":return"#f59e0b";default:return"#e5e5e5"}};function Tx({actor:e,events:t}){const n=t.filter(r=>r.actor===e);return s.jsxs("div",{children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",marginBottom:"16px"},children:[s.jsx("div",{style:{width:"40px",height:"40px",borderRadius:"50%",backgroundColor:"#f59e0b",display:"flex",alignItems:"center",justifyContent:"center",color:"#fff",fontWeight:600,fontSize:"16px"},children:e.charAt(0).toUpperCase()}),s.jsxs("div",{children:[s.jsx("div",{style:{fontWeight:600,fontSize:"14px"},children:e}),s.jsxs("div",{style:{fontSize:"12px",color:"var(--aether-muted-fg, #737373)"},children:[n.length," event",n.length!==1?"s":""]})]})]}),s.jsxs("div",{style:{marginBottom:"12px"},children:[s.jsx("div",{style:{fontSize:"12px",fontWeight:500,color:"var(--aether-muted-fg, #737373)",marginBottom:"8px"},children:"Events by this actor"}),s.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:n.map(r=>s.jsxs("div",{style:{padding:"8px 12px",backgroundColor:"var(--aether-muted, #f5f5f5)",borderRadius:"6px",fontSize:"13px"},children:[s.jsx("div",{style:{fontWeight:500},children:r.action}),s.jsx("div",{style:{fontSize:"11px",color:"var(--aether-muted-fg, #737373)",marginTop:"2px"},children:new Date(r.timestamp).toLocaleString()})]},r.id))})]})]})}function Lx({link:e}){const t=typeof e.source=="string"?e.source:e.source.id,n=typeof e.target=="string"?e.target:e.target.id;return s.jsxs("div",{children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"16px"},children:[s.jsx("div",{style:{width:"24px",height:"4px",backgroundColor:dl(e.type),borderRadius:"2px",...e.type==="relation"?{backgroundImage:`repeating-linear-gradient(90deg, ${dl(e.type)}, ${dl(e.type)} 4px, transparent 4px, transparent 8px)`,backgroundColor:"transparent"}:{}}}),s.jsx("span",{style:{fontWeight:600,fontSize:"14px"},children:Cx(e.type)})]}),s.jsxs("div",{style:{padding:"12px",backgroundColor:"var(--aether-muted, #f5f5f5)",borderRadius:"8px",marginBottom:"16px"},children:[s.jsx("div",{style:{fontSize:"12px",color:"var(--aether-muted-fg, #737373)",marginBottom:"4px"},children:"Description"}),s.jsx("div",{style:{fontSize:"13px"},children:Ex(e.type)})]}),s.jsxs("div",{style:{marginBottom:"12px"},children:[s.jsx("div",{style:{fontSize:"12px",fontWeight:500,color:"var(--aether-muted-fg, #737373)",marginBottom:"8px"},children:"Connected Nodes"}),s.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:[s.jsxs("div",{style:{padding:"10px 12px",border:"1px solid var(--aether-border, #e5e5e5)",borderRadius:"6px"},children:[s.jsx("div",{style:{fontSize:"11px",color:"var(--aether-muted-fg, #737373)",marginBottom:"2px"},children:"Source"}),s.jsx("div",{style:{fontSize:"13px",fontWeight:500},children:e.sourceLabel||t}),s.jsx("div",{style:{fontSize:"11px",color:"var(--aether-muted-fg, #737373)"},children:t.startsWith("actor:")?"Actor":"Event"})]}),s.jsx("div",{style:{display:"flex",justifyContent:"center"},children:s.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"var(--aether-muted-fg, #737373)",strokeWidth:"2",children:s.jsx("path",{d:"M12 5v14M19 12l-7 7-7-7"})})}),s.jsxs("div",{style:{padding:"10px 12px",border:"1px solid var(--aether-border, #e5e5e5)",borderRadius:"6px"},children:[s.jsx("div",{style:{fontSize:"11px",color:"var(--aether-muted-fg, #737373)",marginBottom:"2px"},children:"Target"}),s.jsx("div",{style:{fontSize:"13px",fontWeight:500},children:e.targetLabel||n}),s.jsx("div",{style:{fontSize:"11px",color:"var(--aether-muted-fg, #737373)"},children:n.startsWith("actor:")?"Actor":"Event"})]})]})]})]})}function Ix(){return s.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:"16px",padding:"8px 12px",backgroundColor:"var(--aether-bg, #fff)",borderTop:"1px solid var(--aether-border, #e5e5e5)",fontSize:"12px"},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"24px"},children:[s.jsx("span",{style:{fontWeight:500,color:"var(--aether-muted-fg, #737373)"},children:"Nodes:"}),s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[s.jsx("div",{style:{width:"12px",height:"12px",borderRadius:"50%",backgroundColor:"#f59e0b"}}),s.jsx("span",{children:"Actor"})]}),s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[s.jsx("div",{style:{width:"12px",height:"12px",borderRadius:"50%",backgroundColor:"#10b981"}}),s.jsx("span",{children:"Event"})]}),s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[s.jsx("div",{style:{width:"12px",height:"12px",borderRadius:"50%",backgroundColor:"#8b5cf6"}}),s.jsx("span",{children:"Selected"})]})]}),s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"24px"},children:[s.jsx("span",{style:{fontWeight:500,color:"var(--aether-muted-fg, #737373)"},children:"Links:"}),s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[s.jsx("div",{style:{width:"20px",height:"2px",backgroundColor:"#a3a3a3"}}),s.jsx("span",{children:"Actor"})]}),s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[s.jsx("div",{style:{width:"20px",height:"2px",backgroundColor:"#3b82f6"}}),s.jsx("span",{children:"Temporal"})]}),s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[s.jsx("div",{style:{width:"20px",height:"2px",backgroundImage:"repeating-linear-gradient(90deg, #f59e0b, #f59e0b 4px, transparent 4px, transparent 8px)"}}),s.jsx("span",{children:"Relation"})]})]})]})}function Mx({events:e,onNodeClick:t,onSelectionChange:n,selectedEvent:r,selection:i,highlightActor:o,showRelations:l=!0,showLegend:a=!0,className:u}){const c=M.useRef(null),d=M.useRef(null),g=M.useRef(null),[f,y]=M.useState({width:800,height:600}),[k,v]=M.useState(null),w=i!==void 0?i:k,p=M.useCallback(j=>{i===void 0&&v(j),n==null||n(j),(j==null?void 0:j.type)==="event"?t==null||t(j.data):j===null&&(t==null||t(null))},[i,n,t]);M.useEffect(()=>{if(!c.current)return;const j=new ResizeObserver(D=>{for(const R of D){const{width:H,height:B}=R.contentRect;H>0&&B>0&&y({width:H,height:B})}});return j.observe(c.current),()=>j.disconnect()},[]);const{nodes:h,links:x,linksById:m}=M.useMemo(()=>{const j=new Map,D=[],R=new Map;let H=0;const B=new Set(e.map(I=>I.actor));for(const I of B)j.set(`actor:${I}`,{id:`actor:${I}`,type:"actor",label:I});const U=[...e].sort((I,T)=>new Date(I.timestamp).getTime()-new Date(T.timestamp).getTime()),S=new Map;for(const I of U){const T=`event:${I.id}`;j.set(T,{id:T,type:"event",label:I.action,event:I});const N=`link-${H++}`,L={id:N,source:`actor:${I.actor}`,target:T,type:"actor",sourceLabel:I.actor,targetLabel:I.action};D.push(L),R.set(N,L);const A=S.get(I.actor);if(A){const P=j.get(A),O=`link-${H++}`,$={id:O,source:A,target:T,type:"temporal",sourceLabel:(P==null?void 0:P.label)||A,targetLabel:I.action};D.push($),R.set(O,$)}if(S.set(I.actor,T),l&&I.relations)for(const P of I.relations){const O=`event:${P.targetEventId}`;if(j.has(O)){const $=j.get(O),ie=`link-${H++}`,X={id:ie,source:T,target:O,type:"relation",sourceLabel:I.action,targetLabel:($==null?void 0:$.label)||O};D.push(X),R.set(ie,X)}}}return{nodes:Array.from(j.values()),links:D,linksById:R}},[e,l]);M.useEffect(()=>{g.current&&f.width>0&&f.height>0&&g.current.force("center",Gu(f.width/2,f.height/2)).alpha(.3).restart()},[f]),M.useEffect(()=>{if(!d.current||h.length===0)return;const j=st(d.current);j.selectAll("*").remove();const D=j.append("g"),R=_x().scaleExtent([.1,4]).on("zoom",S=>{D.attr("transform",S.transform)});j.call(R);const H=gx(h).force("link",sx(x).id(S=>S.id).distance(S=>S.type==="actor"?100:50)).force("charge",mx().strength(-200)).force("center",Gu(f.width/2,f.height/2)).force("collision",ox().radius(30));g.current=H;const B=D.append("g").selectAll("g").data(x).join("g").attr("cursor","pointer");B.append("line").attr("stroke","transparent").attr("stroke-width",12),B.append("line").attr("stroke",S=>{if((w==null?void 0:w.type)==="link"&&w.data.id===S.id)return"#8b5cf6";switch(S.type){case"actor":return"#a3a3a3";case"temporal":return"#3b82f6";case"relation":return"#f59e0b";default:return"#e5e5e5"}}).attr("stroke-width",S=>(w==null?void 0:w.type)==="link"&&w.data.id===S.id?3:S.type==="temporal"?2:1).attr("stroke-dasharray",S=>S.type==="relation"?"4,4":"none"),B.on("click",(S,I)=>{S.stopPropagation(),p({type:"link",data:I})});const U=D.append("g").selectAll("g").data(h).join("g").attr("cursor","pointer").call(rm().on("start",(S,I)=>{S.active||H.alphaTarget(.3).restart(),I.fx=I.x,I.fy=I.y}).on("drag",(S,I)=>{I.fx=S.x,I.fy=S.y}).on("end",(S,I)=>{S.active||H.alphaTarget(0),I.fx=null,I.fy=null}));return U.append("circle").attr("r",S=>S.type==="actor"?20:12).attr("fill",S=>{const I=(w==null?void 0:w.type)==="actor"&&w.data===S.label,T=(w==null?void 0:w.type)==="event"&&S.event&&w.data.id===S.event.id;return I||T?"#8b5cf6":S.type==="actor"?o===S.label?"#3b82f6":"#f59e0b":"#10b981"}).attr("stroke",S=>{const I=(w==null?void 0:w.type)==="actor"&&w.data===S.label,T=(w==null?void 0:w.type)==="event"&&S.event&&w.data.id===S.event.id;return I||T?"#6d28d9":"#fff"}).attr("stroke-width",S=>{const I=(w==null?void 0:w.type)==="actor"&&w.data===S.label,T=(w==null?void 0:w.type)==="event"&&S.event&&w.data.id===S.event.id;return I||T?3:2}),U.append("text").text(S=>S.label).attr("font-size",S=>S.type==="actor"?12:10).attr("dx",S=>S.type==="actor"?25:16).attr("dy",4).attr("fill","#1a1a1a"),U.on("click",(S,I)=>{S.stopPropagation(),I.type==="actor"?p({type:"actor",data:I.label}):I.event&&p({type:"event",data:I.event})}),j.on("click",()=>{p(null)}),H.on("tick",()=>{B.selectAll("line").attr("x1",S=>S.source.x).attr("y1",S=>S.source.y).attr("x2",S=>S.target.x).attr("y2",S=>S.target.y),U.attr("transform",S=>`translate(${S.x},${S.y})`)}),()=>{H.stop(),g.current=null}},[h,x,f.width,f.height,o,w,p]);const _=M.useCallback(()=>{p(null)},[p]);if(e.length===0)return s.jsx("div",{className:u,style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",borderRadius:"var(--aether-radius, 8px)",backgroundColor:"var(--aether-muted, #f5f5f5)",color:"var(--aether-muted-fg, #737373)"},children:"No events to display"});const C=w!==null,E=(w==null?void 0:w.type)==="event"?"Event Details":(w==null?void 0:w.type)==="actor"?"Actor Details":"Link Details";return s.jsxs("div",{className:u,style:{position:"relative",display:"flex",flexDirection:"column",width:"100%",height:"100%"},children:[s.jsxs("div",{style:{display:"flex",flex:1,minHeight:0},children:[s.jsx("div",{ref:c,style:{height:"100%",width:C?"70%":"100%",transition:"width 0.3s ease-in-out"},children:s.jsx("svg",{ref:d,width:f.width,height:f.height,style:{width:"100%",height:"100%",borderRadius:a?"var(--aether-radius, 8px) var(--aether-radius, 8px) 0 0":"var(--aether-radius, 8px)",backgroundColor:"var(--aether-muted, #f5f5f5)"}})}),s.jsx("div",{style:{position:"absolute",right:0,top:0,height:a?"calc(100% - 42px)":"100%",width:C?"30%":0,overflow:C?"auto":"hidden",opacity:C?1:0,borderLeft:C?"1px solid var(--aether-border, #e5e5e5)":"none",backgroundColor:"var(--aether-bg, #fff)",transition:"width 0.3s ease-in-out, opacity 0.3s ease-in-out"},children:w&&s.jsxs("div",{style:{padding:"16px"},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"16px"},children:[s.jsx("h3",{style:{fontSize:"14px",fontWeight:600},children:E}),s.jsx("button",{onClick:_,style:{display:"flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",border:"none",borderRadius:"4px",backgroundColor:"transparent",cursor:"pointer"},children:s.jsx(jx,{})})]}),w.type==="event"&&s.jsx(pa,{event:w.data,showContext:!0}),w.type==="actor"&&s.jsx(Tx,{actor:w.data,events:e}),w.type==="link"&&s.jsx(Lx,{link:w.data})]})})]}),a&&s.jsx(Ix,{})]})}const zx=()=>s.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("path",{d:"M5 12.55a11 11 0 0 1 14.08 0"}),s.jsx("path",{d:"M1.42 9a16 16 0 0 1 21.16 0"}),s.jsx("path",{d:"M8.53 16.11a6 6 0 0 1 6.95 0"}),s.jsx("line",{x1:"12",y1:"20",x2:"12.01",y2:"20"})]}),Ax=()=>s.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("line",{x1:"1",y1:"1",x2:"23",y2:"23"}),s.jsx("path",{d:"M16.72 11.06A10.94 10.94 0 0 1 19 12.55"}),s.jsx("path",{d:"M5 12.55a10.94 10.94 0 0 1 5.17-2.39"}),s.jsx("path",{d:"M10.71 5.05A16 16 0 0 1 22.58 9"}),s.jsx("path",{d:"M1.42 9a15.91 15.91 0 0 1 4.7-2.88"}),s.jsx("path",{d:"M8.53 16.11a6 6 0 0 1 6.95 0"}),s.jsx("line",{x1:"12",y1:"20",x2:"12.01",y2:"20"})]});function Px({connected:e,error:t,onReconnect:n,className:r}){const i={display:"inline-flex",alignItems:"center",gap:"8px",borderRadius:"9999px",padding:"6px 12px",fontSize:"12px",fontWeight:500,transition:"background-color 0.2s"},o=e?{backgroundColor:"#dcfce7",color:"#15803d"}:t?{backgroundColor:"#fee2e2",color:"#b91c1c"}:{backgroundColor:"#fef3c7",color:"#b45309"},l={marginLeft:"4px",padding:"2px 8px",fontSize:"11px",border:"1px solid currentColor",borderRadius:"4px",background:"transparent",color:"inherit",cursor:"pointer"};return s.jsxs("div",{className:r,style:{...i,...o},children:[s.jsx("style",{children:"@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }"}),e?s.jsx(zx,{}):t?s.jsx(Ax,{}):s.jsx(da,{}),s.jsx("span",{children:e?"Connected":t?"Connection Error":"Connecting..."}),!e&&n&&s.jsx("button",{style:l,onClick:n,children:"Retry"})]})}const Rx=()=>s.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:s.jsx("polyline",{points:"9 18 15 12 9 6"})}),Nx=()=>s.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:s.jsx("polyline",{points:"6 9 12 15 18 9"})}),bx=()=>s.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:s.jsx("polyline",{points:"20 6 9 17 4 12"})}),Dx=()=>s.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),s.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),Ox=()=>s.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:s.jsx("polygon",{points:"5 3 19 12 5 21 5 3"})});function n0(e){return new Date(e).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}function Hx(e,t){const n=new Date(e).getTime(),i=(t?new Date(t).getTime():Date.now())-n;return i<1e3?`${i}ms`:i<6e4?`${(i/1e3).toFixed(1)}s`:i<36e5?`${Math.floor(i/6e4)}m`:`${(i/36e5).toFixed(1)}h`}function $x(e,t){return e==="active"?"#3b82f6":t==="success"?"#22c55e":t==="failure"?"#ef4444":t==="partial"?"#f59e0b":"#737373"}function Fx({outcome:e,status:t}){return t==="active"?s.jsx(Ox,{}):e==="success"?s.jsx(bx,{}):e==="failure"?s.jsx(Dx,{}):null}function Wx(e,t){const n=new Map,r=new Map;for(const o of t){for(const l of o.events)r.set(l,o.id);n.set(o.id,[])}const i=[];for(const o of e){const l=r.get(o.id);l&&n.has(l)?n.get(l).push(o):i.push(o)}return i.length>0&&n.set("_unassigned",i),n}function Bx({events:e,trajectories:t=[],onEventClick:n,onTrajectoryClick:r,selectedEventId:i,selectedTrajectoryId:o,showBoundaries:l=!0,maxHeight:a="100%"}){const[u,c]=M.useState(new Set),d=M.useMemo(()=>Wx(e,t),[e,t]),g=f=>{c(y=>{const k=new Set(y);return k.has(f)?k.delete(f):k.add(f),k})};return t.length===0?s.jsx("div",{style:{maxHeight:a,overflow:"auto",display:"flex",flexDirection:"column",gap:"8px"},children:e.map(f=>s.jsx(pl,{event:f,onClick:()=>n==null?void 0:n(f),selected:f.id===i},f.id))}):s.jsxs("div",{style:{maxHeight:a,overflow:"auto",display:"flex",flexDirection:"column",gap:"12px"},children:[t.map(f=>{const y=d.get(f.id)??[],k=u.has(f.id),v=f.id===o,w=$x(f.status,f.outcome);return s.jsxs("div",{style:{border:`1px solid ${v?w:"var(--aether-border, #e5e5e5)"}`,borderRadius:"var(--aether-radius, 8px)",backgroundColor:"var(--aether-bg, #fff)",overflow:"hidden"},children:[s.jsxs("button",{style:{display:"flex",alignItems:"center",width:"100%",padding:"12px",border:"none",backgroundColor:v?`${w}10`:"transparent",cursor:"pointer",gap:"8px"},onClick:()=>{g(f.id),r==null||r(f)},children:[s.jsx("span",{style:{color:"var(--aether-muted-fg, #737373)"},children:k?s.jsx(Nx,{}):s.jsx(Rx,{})}),s.jsx("span",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"24px",height:"24px",borderRadius:"50%",backgroundColor:w,color:"#fff"},children:s.jsx(Fx,{outcome:f.outcome,status:f.status})}),s.jsxs("div",{style:{flex:1,textAlign:"left"},children:[s.jsx("div",{style:{fontWeight:500,fontSize:"14px"},children:f.actor}),s.jsxs("div",{style:{fontSize:"12px",color:"var(--aether-muted-fg, #737373)"},children:[y.length," events · ",Hx(f.startTime,f.endTime)]})]}),s.jsx("div",{style:{textAlign:"right",fontSize:"12px",color:"var(--aether-muted-fg, #737373)"},children:n0(f.startTime)})]}),k&&y.length>0&&s.jsxs("div",{style:{borderTop:"1px solid var(--aether-border, #e5e5e5)",padding:"8px",display:"flex",flexDirection:"column",gap:"4px",position:"relative"},children:[l&&s.jsx("div",{style:{position:"absolute",left:"24px",top:"20px",bottom:"20px",width:"2px",backgroundColor:`${w}40`}}),y.map((p,h)=>s.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:"8px",paddingLeft:"8px"},children:[l&&s.jsx("div",{style:{width:"8px",height:"8px",marginTop:"6px",borderRadius:"50%",backgroundColor:h===0||h===y.length-1?w:`${w}60`,flexShrink:0,zIndex:1}}),s.jsx(pl,{event:p,onClick:()=>n==null?void 0:n(p),selected:p.id===i,compact:!0})]},p.id))]})]},f.id)}),d.has("_unassigned")&&s.jsxs("div",{children:[s.jsx("h3",{style:{fontSize:"12px",fontWeight:600,color:"var(--aether-muted-fg, #737373)",marginBottom:"8px"},children:"Unassigned Events"}),s.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:d.get("_unassigned").map(f=>s.jsx(pl,{event:f,onClick:()=>n==null?void 0:n(f),selected:f.id===i},f.id))})]})]})}function pl({event:e,onClick:t,selected:n,compact:r=!1}){return s.jsxs("button",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",width:"100%",padding:r?"8px":"12px",border:`1px solid ${n?"var(--aether-primary, #3b82f6)":"var(--aether-border, #e5e5e5)"}`,borderRadius:"var(--aether-radius, 8px)",backgroundColor:n?"var(--aether-primary-bg, #eff6ff)":"var(--aether-bg, #fff)",cursor:"pointer",textAlign:"left"},onClick:t,children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",width:"100%"},children:[s.jsx("span",{style:{padding:"2px 6px",fontSize:"11px",fontWeight:500,backgroundColor:"var(--aether-muted, #f5f5f5)",borderRadius:"4px",color:"var(--aether-primary, #3b82f6)"},children:e.action}),s.jsx("span",{style:{flex:1,fontSize:"12px",color:"var(--aether-muted-fg, #737373)"},children:e.actor}),s.jsx("span",{style:{fontSize:"11px",color:"var(--aether-muted-fg, #737373)"},children:n0(e.timestamp)})]}),s.jsx("p",{style:{marginTop:"4px",fontSize:"13px",lineHeight:"1.4",overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:r?1:2,WebkitBoxOrient:"vertical"},children:e.content})]})}const r0=()=>s.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("polyline",{points:"23 6 13.5 15.5 8.5 10.5 1 18"}),s.jsx("polyline",{points:"17 6 23 6 23 12"})]}),gs=()=>s.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("path",{d:"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}),s.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),s.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),Qx=()=>s.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("rect",{x:"3",y:"3",width:"7",height:"7"}),s.jsx("rect",{x:"14",y:"3",width:"7",height:"7"}),s.jsx("rect",{x:"14",y:"14",width:"7",height:"7"}),s.jsx("rect",{x:"3",y:"14",width:"7",height:"7"})]});function Kx(e){switch(e){case"high":return"#ef4444";case"medium":return"#f59e0b";case"low":return"#3b82f6";default:return"#737373"}}function mo(e){return`${(e*100).toFixed(0)}%`}function Xx({patterns:e=[],anomalies:t=[],transitionMatrix:n,loading:r=!1,onPatternClick:i,onAnomalyClick:o}){const[l,a]=M.useState("patterns"),u=M.useMemo(()=>[...e].sort((g,f)=>f.frequency-g.frequency),[e]),c=M.useMemo(()=>[...t].sort((g,f)=>{const y={high:3,medium:2,low:1};return y[f.severity]-y[g.severity]}),[t]),d=g=>({display:"flex",alignItems:"center",gap:"6px",padding:"8px 12px",fontSize:"14px",fontWeight:500,border:"none",borderRadius:"var(--aether-radius, 8px)",cursor:"pointer",backgroundColor:g?"var(--aether-primary, #3b82f6)":"transparent",color:g?"#fff":"var(--aether-muted-fg, #737373)"});return r?s.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"48px",color:"var(--aether-muted-fg, #737373)"},children:"Loading patterns..."}):s.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px",height:"100%"},children:[s.jsxs("div",{style:{display:"flex",gap:"4px",padding:"4px",backgroundColor:"var(--aether-muted, #f5f5f5)",borderRadius:"var(--aether-radius, 8px)",width:"fit-content"},children:[s.jsxs("button",{style:d(l==="patterns"),onClick:()=>a("patterns"),children:[s.jsx(r0,{}),s.jsxs("span",{children:["Patterns (",e.length,")"]})]}),s.jsxs("button",{style:d(l==="anomalies"),onClick:()=>a("anomalies"),children:[s.jsx(gs,{}),s.jsxs("span",{children:["Anomalies (",t.length,")"]})]}),s.jsxs("button",{style:d(l==="matrix"),onClick:()=>a("matrix"),children:[s.jsx(Qx,{}),s.jsx("span",{children:"Transitions"})]})]}),s.jsxs("div",{style:{flex:1,overflow:"auto"},children:[l==="patterns"&&s.jsx(Ux,{patterns:u,onClick:i}),l==="anomalies"&&s.jsx(Vx,{anomalies:c,onClick:o}),l==="matrix"&&n&&s.jsx(Zx,{matrix:n}),l==="matrix"&&!n&&s.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"48px",color:"var(--aether-muted-fg, #737373)"},children:"No transition data available"})]})]})}function Ux({patterns:e,onClick:t}){return e.length===0?s.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"48px",color:"var(--aether-muted-fg, #737373)"},children:[s.jsx(r0,{}),s.jsx("p",{style:{marginTop:"8px"},children:"No patterns detected yet"})]}):s.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:e.map(n=>s.jsxs("button",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",padding:"12px",border:"1px solid var(--aether-border, #e5e5e5)",borderRadius:"var(--aether-radius, 8px)",backgroundColor:"var(--aether-bg, #fff)",cursor:"pointer",width:"100%",textAlign:"left"},onClick:()=>t==null?void 0:t(n),children:[s.jsx("div",{style:{display:"flex",alignItems:"center",gap:"4px",flexWrap:"wrap",marginBottom:"8px"},children:n.sequence.map((r,i)=>s.jsxs(Ss.Fragment,{children:[s.jsx("span",{style:{padding:"4px 8px",fontSize:"12px",fontWeight:500,backgroundColor:"var(--aether-primary-bg, #eff6ff)",color:"var(--aether-primary, #3b82f6)",borderRadius:"4px"},children:r}),i<n.sequence.length-1&&s.jsx("span",{style:{color:"var(--aether-muted-fg, #737373)"},children:"→"})]},i))}),s.jsxs("div",{style:{display:"flex",gap:"16px",fontSize:"12px",color:"var(--aether-muted-fg, #737373)"},children:[s.jsxs("span",{children:[s.jsx("strong",{style:{color:"var(--aether-fg, #1a1a1a)"},children:n.frequency})," occurrences"]}),s.jsxs("span",{children:[s.jsx("strong",{style:{color:"var(--aether-fg, #1a1a1a)"},children:mo(n.confidence)})," confidence"]}),s.jsxs("span",{children:[s.jsx("strong",{style:{color:"var(--aether-fg, #1a1a1a)"},children:mo(n.support)})," support"]})]})]},n.id))})}function Vx({anomalies:e,onClick:t}){return e.length===0?s.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"48px",color:"var(--aether-muted-fg, #737373)"},children:[s.jsx(gs,{}),s.jsx("p",{style:{marginTop:"8px"},children:"No anomalies detected"})]}):s.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:e.map(n=>{const r=Kx(n.severity);return s.jsxs("button",{style:{display:"flex",alignItems:"flex-start",padding:"12px",border:`1px solid ${r}40`,borderLeft:`4px solid ${r}`,borderRadius:"var(--aether-radius, 8px)",backgroundColor:`${r}08`,cursor:"pointer",width:"100%",textAlign:"left",gap:"12px"},onClick:()=>t==null?void 0:t(n),children:[s.jsx("div",{style:{width:"24px",height:"24px",borderRadius:"50%",backgroundColor:r,color:"#fff",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:s.jsx(gs,{})}),s.jsxs("div",{style:{flex:1,minWidth:0},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"4px"},children:[s.jsx("span",{style:{padding:"2px 6px",fontSize:"10px",fontWeight:600,textTransform:"uppercase",backgroundColor:`${r}20`,color:r,borderRadius:"4px"},children:n.severity}),s.jsx("span",{style:{fontSize:"12px",color:"var(--aether-muted-fg, #737373)"},children:new Date(n.detectedAt).toLocaleTimeString()})]}),s.jsx("p",{style:{fontSize:"13px",margin:0},children:n.reason}),n.expectedAction&&s.jsxs("p",{style:{fontSize:"12px",color:"var(--aether-muted-fg, #737373)",marginTop:"4px"},children:["Expected: ",s.jsx("strong",{children:n.expectedAction})]})]}),s.jsxs("div",{style:{textAlign:"right",flexShrink:0},children:[s.jsx("div",{style:{fontSize:"18px",fontWeight:600,color:r},children:(n.deviationScore*100).toFixed(0)}),s.jsx("div",{style:{fontSize:"10px",color:"var(--aether-muted-fg, #737373)"},children:"deviation"})]})]},n.eventId)})})}function Zx({matrix:e}){const{actions:t,probabilities:n}=e;if(t.length===0)return s.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"48px",color:"var(--aether-muted-fg, #737373)"},children:"No transition data"});const r=i=>i===0?"var(--aether-muted, #f5f5f5)":`rgba(59, 130, 246, ${i})`;return s.jsxs("div",{style:{overflow:"auto"},children:[s.jsxs("div",{style:{display:"grid",gridTemplateColumns:`auto repeat(${t.length}, 1fr)`,gap:"2px",fontSize:"11px",minWidth:`${(t.length+1)*60}px`},children:[s.jsx("div",{style:{padding:"4px"}}),t.map(i=>s.jsx("div",{style:{padding:"4px",fontWeight:600,textAlign:"center",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",transform:"rotate(-45deg)",transformOrigin:"center center",height:"60px",display:"flex",alignItems:"flex-end",justifyContent:"center"},title:i,children:i.length>8?i.slice(0,8)+"...":i},i)),t.map((i,o)=>s.jsxs(Ss.Fragment,{children:[s.jsx("div",{style:{padding:"4px 8px",fontWeight:600,textAlign:"right",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:i,children:i.length>10?i.slice(0,10)+"...":i}),t.map((l,a)=>{var c;const u=((c=n[o])==null?void 0:c[a])??0;return s.jsx("div",{style:{padding:"4px",backgroundColor:r(u),color:u>.5?"#fff":"var(--aether-fg, #1a1a1a)",textAlign:"center",borderRadius:"2px",cursor:"pointer"},title:`${i} → ${l}: ${mo(u)}`,children:u>0?mo(u):""},l)})]},i))]}),s.jsxs("div",{style:{marginTop:"16px",display:"flex",alignItems:"center",gap:"8px",fontSize:"12px"},children:[s.jsx("span",{style:{color:"var(--aether-muted-fg, #737373)"},children:"P(action | previous):"}),s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"2px"},children:[s.jsx("div",{style:{width:"16px",height:"16px",backgroundColor:r(0),borderRadius:"2px"}}),s.jsx("span",{style:{marginLeft:"4px",color:"var(--aether-muted-fg, #737373)"},children:"0%"})]}),s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"2px"},children:[s.jsx("div",{style:{width:"16px",height:"16px",backgroundColor:r(.5),borderRadius:"2px"}}),s.jsx("span",{style:{marginLeft:"4px",color:"var(--aether-muted-fg, #737373)"},children:"50%"})]}),s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"2px"},children:[s.jsx("div",{style:{width:"16px",height:"16px",backgroundColor:r(1),borderRadius:"2px"}}),s.jsx("span",{style:{marginLeft:"4px",color:"var(--aether-muted-fg, #737373)"},children:"100%"})]})]})]})}const Yx=()=>s.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("path",{d:"M9 18h6"}),s.jsx("path",{d:"M10 22h4"}),s.jsx("path",{d:"M12 2a7 7 0 0 0-4 12.9V17a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1v-2.1A7 7 0 0 0 12 2z"})]}),nc=()=>s.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:s.jsx("polygon",{points:"5 3 19 12 5 21 5 3"})}),rc=()=>s.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("path",{d:"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}),s.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),s.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),Gx=()=>s.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),s.jsx("polyline",{points:"22 4 12 14.01 9 11.01"})]}),qx=()=>s.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("circle",{cx:"12",cy:"12",r:"10"}),s.jsx("line",{x1:"15",y1:"9",x2:"9",y2:"15"}),s.jsx("line",{x1:"9",y1:"9",x2:"15",y2:"15"})]}),ic=()=>s.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{animation:"spin 1s linear infinite"},children:[s.jsx("line",{x1:"12",y1:"2",x2:"12",y2:"6"}),s.jsx("line",{x1:"12",y1:"18",x2:"12",y2:"22"}),s.jsx("line",{x1:"4.93",y1:"4.93",x2:"7.76",y2:"7.76"}),s.jsx("line",{x1:"16.24",y1:"16.24",x2:"19.07",y2:"19.07"}),s.jsx("line",{x1:"2",y1:"12",x2:"6",y2:"12"}),s.jsx("line",{x1:"18",y1:"12",x2:"22",y2:"12"}),s.jsx("line",{x1:"4.93",y1:"19.07",x2:"7.76",y2:"16.24"}),s.jsx("line",{x1:"16.24",y1:"7.76",x2:"19.07",y2:"4.93"})]});function ms(e){return`${Math.round(e*100)}%`}function oc(e){switch(e){case"success":return"#22c55e";case"failure":return"#ef4444";case"partial":return"#f59e0b";default:return"#737373"}}function Jx(e){switch(e){case"low":return"#22c55e";case"medium":return"#f59e0b";case"high":return"#ef4444";default:return"#737373"}}function ev({predictions:e,loading:t=!1,error:n,onSimulate:r,onPredictionClick:i,simulationEnabled:o=!0,maxHeight:l="100%"}){const[a,u]=M.useState(""),[c,d]=M.useState(""),[g,f]=M.useState(null),[y,k]=M.useState(!1),[v,w]=M.useState(null),p=M.useCallback(async()=>{if(!(!r||!a.trim())){k(!0),w(null);try{let h;if(c.trim())try{h=JSON.parse(c)}catch{throw new Error("Invalid JSON in context")}const x=await r(a.trim(),h);f(x)}catch(h){w(h instanceof Error?h.message:"Simulation failed")}finally{k(!1)}}},[r,a,c]);return s.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px",maxHeight:l,overflow:"auto"},children:[s.jsxs("section",{children:[s.jsxs("h3",{style:{display:"flex",alignItems:"center",gap:"8px",fontSize:"14px",fontWeight:600,marginBottom:"12px",color:"var(--aether-fg, #171717)"},children:[s.jsx("span",{style:{color:"#f59e0b"},children:s.jsx(Yx,{})}),"Next Action Predictions"]}),t?s.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"24px",color:"var(--aether-muted-fg, #737373)"},children:[s.jsx(ic,{}),s.jsx("span",{style:{marginLeft:"8px"},children:"Loading predictions..."})]}):n?s.jsx("div",{style:{padding:"12px",backgroundColor:"#fef2f2",borderRadius:"var(--aether-radius, 8px)",color:"#dc2626",fontSize:"13px"},children:n}):e.length===0?s.jsx("div",{style:{padding:"24px",textAlign:"center",color:"var(--aether-muted-fg, #737373)",fontSize:"13px"},children:"No predictions available yet"}):s.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:e.map((h,x)=>s.jsxs("button",{onClick:()=>i==null?void 0:i(h),style:{display:"flex",alignItems:"center",gap:"12px",padding:"12px",border:"1px solid var(--aether-border, #e5e5e5)",borderRadius:"var(--aether-radius, 8px)",backgroundColor:"var(--aether-bg, #fff)",cursor:"pointer",textAlign:"left",width:"100%"},children:[s.jsx("div",{style:{width:"40px",height:"40px",borderRadius:"50%",background:`conic-gradient(#3b82f6 ${h.probability*360}deg, #e5e5e5 0deg)`,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:s.jsx("div",{style:{width:"32px",height:"32px",borderRadius:"50%",backgroundColor:"var(--aether-bg, #fff)",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"11px",fontWeight:600},children:ms(h.probability)})}),s.jsxs("div",{style:{flex:1,minWidth:0},children:[s.jsx("div",{style:{fontWeight:500,fontSize:"14px"},children:h.action}),h.suggestedContent&&s.jsx("div",{style:{fontSize:"12px",color:"var(--aether-muted-fg, #737373)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:h.suggestedContent}),h.expectedTimeMs&&s.jsxs("div",{style:{fontSize:"11px",color:"var(--aether-muted-fg, #737373)",marginTop:"2px"},children:["Expected in ~",Math.round(h.expectedTimeMs/1e3),"s"]})]}),s.jsxs("div",{style:{padding:"4px 8px",fontSize:"11px",fontWeight:500,backgroundColor:h.confidence>.7?"#dcfce7":h.confidence>.4?"#fef3c7":"#f5f5f5",color:h.confidence>.7?"#166534":h.confidence>.4?"#92400e":"#525252",borderRadius:"4px"},children:[Math.round(h.confidence*100),"% confident"]})]},`${h.action}-${x}`))})]}),o&&r&&s.jsxs("section",{style:{borderTop:"1px solid var(--aether-border, #e5e5e5)",paddingTop:"16px"},children:[s.jsxs("h3",{style:{display:"flex",alignItems:"center",gap:"8px",fontSize:"14px",fontWeight:600,marginBottom:"12px",color:"var(--aether-fg, #171717)"},children:[s.jsx("span",{style:{color:"#8b5cf6"},children:s.jsx(nc,{})}),"Simulation Sandbox"]}),s.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"12px"},children:[s.jsxs("div",{children:[s.jsx("label",{style:{display:"block",fontSize:"12px",fontWeight:500,marginBottom:"4px"},children:"Proposed Action"}),s.jsx("input",{type:"text",value:a,onChange:h=>u(h.target.value),placeholder:"e.g., checkout, search, submit",style:{width:"100%",padding:"8px 12px",border:"1px solid var(--aether-border, #e5e5e5)",borderRadius:"var(--aether-radius, 8px)",fontSize:"13px"}})]}),s.jsxs("div",{children:[s.jsx("label",{style:{display:"block",fontSize:"12px",fontWeight:500,marginBottom:"4px"},children:"Context (JSON, optional)"}),s.jsx("textarea",{value:c,onChange:h=>d(h.target.value),placeholder:'{"productId": "123", "quantity": 2}',rows:2,style:{width:"100%",padding:"8px 12px",border:"1px solid var(--aether-border, #e5e5e5)",borderRadius:"var(--aether-radius, 8px)",fontSize:"13px",fontFamily:"monospace",resize:"vertical"}})]}),s.jsx("button",{onClick:p,disabled:y||!a.trim(),style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",padding:"10px 16px",backgroundColor:y?"#a78bfa":"#8b5cf6",color:"#fff",border:"none",borderRadius:"var(--aether-radius, 8px)",fontSize:"13px",fontWeight:500,cursor:y||!a.trim()?"not-allowed":"pointer",opacity:a.trim()?1:.5},children:y?s.jsxs(s.Fragment,{children:[s.jsx(ic,{}),"Simulating..."]}):s.jsxs(s.Fragment,{children:[s.jsx(nc,{}),"Run Simulation"]})}),v&&s.jsx("div",{style:{padding:"12px",backgroundColor:"#fef2f2",borderRadius:"var(--aether-radius, 8px)",color:"#dc2626",fontSize:"13px"},children:v}),g&&s.jsx(tv,{result:g})]})]}),s.jsx("style",{children:`
111
+ @keyframes spin {
112
+ from { transform: rotate(0deg); }
113
+ to { transform: rotate(360deg); }
114
+ }
115
+ `})]})}function tv({result:e}){const t=oc(e.likelyOutcome);return s.jsxs("div",{style:{border:"1px solid var(--aether-border, #e5e5e5)",borderRadius:"var(--aether-radius, 8px)",overflow:"hidden"},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",padding:"12px",backgroundColor:"var(--aether-muted, #f5f5f5)",borderBottom:"1px solid var(--aether-border, #e5e5e5)"},children:[s.jsx("span",{style:{color:t},children:e.likelyOutcome==="success"?s.jsx(Gx,{}):e.likelyOutcome==="failure"?s.jsx(qx,{}):s.jsx(rc,{})}),s.jsxs("div",{style:{flex:1},children:[s.jsxs("div",{style:{fontWeight:500,fontSize:"14px"},children:["Likely Outcome:"," ",s.jsx("span",{style:{color:t,textTransform:"capitalize"},children:e.likelyOutcome})]}),s.jsxs("div",{style:{fontSize:"12px",color:"var(--aether-muted-fg, #737373)"},children:[Math.round(e.confidence*100),"% confidence"]})]})]}),e.similarPastCases.length>0&&s.jsxs("div",{style:{padding:"12px",borderBottom:"1px solid var(--aether-border, #e5e5e5)"},children:[s.jsx("h4",{style:{fontSize:"12px",fontWeight:600,marginBottom:"8px",color:"var(--aether-muted-fg, #737373)"},children:"Similar Past Cases"}),s.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"6px"},children:e.similarPastCases.slice(0,3).map((n,r)=>s.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px",backgroundColor:"var(--aether-bg, #fff)",borderRadius:"4px",fontSize:"12px"},children:[s.jsxs("span",{style:{fontFamily:"monospace",color:"var(--aether-muted-fg, #737373)"},children:[n.trajectoryId.slice(0,8),"..."]}),s.jsx("span",{style:{color:oc(n.outcome),fontWeight:500},children:n.outcome}),s.jsxs("span",{style:{color:"var(--aether-muted-fg, #737373)"},children:[Math.round(n.similarity*100),"% similar"]})]},r))})]}),e.predictedFollowUp.length>0&&s.jsxs("div",{style:{padding:"12px",borderBottom:"1px solid var(--aether-border, #e5e5e5)"},children:[s.jsx("h4",{style:{fontSize:"12px",fontWeight:600,marginBottom:"8px",color:"var(--aether-muted-fg, #737373)"},children:"Predicted Follow-up Actions"}),s.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"6px"},children:e.predictedFollowUp.map((n,r)=>s.jsxs("span",{style:{padding:"4px 8px",backgroundColor:"#eff6ff",color:"#1d4ed8",borderRadius:"4px",fontSize:"12px"},children:[n.action," (",ms(n.probability),")"]},r))})]}),e.riskAssessment&&s.jsxs("div",{style:{padding:"12px"},children:[s.jsxs("h4",{style:{display:"flex",alignItems:"center",gap:"6px",fontSize:"12px",fontWeight:600,marginBottom:"8px",color:Jx(e.riskAssessment.level)},children:[s.jsx(rc,{}),"Risk Level: ",e.riskAssessment.level.toUpperCase()]}),e.riskAssessment.risks.length>0&&s.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:e.riskAssessment.risks.map((n,r)=>s.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",fontSize:"12px",color:"var(--aether-muted-fg, #737373)"},children:[s.jsx("span",{children:n.description}),s.jsx("span",{style:{fontWeight:500},children:ms(n.probability)})]},r))})]})]})}const nv=()=>s.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("path",{d:"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}),s.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),s.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),rv=()=>s.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),s.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),iv=()=>s.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:s.jsx("polyline",{points:"6 9 12 15 18 9"})}),ov=()=>s.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:s.jsx("polyline",{points:"18 15 12 9 6 15"})}),lv=()=>s.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("path",{d:"M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"}),s.jsx("path",{d:"M13.73 21a2 2 0 0 1-3.46 0"})]}),lc=["low","medium","high"];function sv(e){switch(e){case"high":return"#ef4444";case"medium":return"#f59e0b";case"low":return"#3b82f6";default:return"#737373"}}function av(e){switch(e){case"high":return"#fef2f2";case"medium":return"#fffbeb";case"low":return"#eff6ff";default:return"#f5f5f5"}}function uv(e){const t=new Date(e),r=new Date().getTime()-t.getTime(),i=Math.floor(r/6e4),o=Math.floor(r/36e5),l=Math.floor(r/864e5);return i<1?"Just now":i<60?`${i}m ago`:o<24?`${o}h ago`:l<7?`${l}d ago`:t.toLocaleDateString()}function cv({anomalies:e,loading:t=!1,error:n,onAnomalyClick:r,onDismiss:i,minSeverity:o="low",maxHeight:l="100%",compact:a=!1}){const[u,c]=M.useState(null),[d,g]=M.useState("all"),f=M.useMemo(()=>{const v=lc.indexOf(o);return e.filter(w=>!(lc.indexOf(w.severity)<v||d!=="all"&&w.severity!==d))},[e,o,d]),y=M.useMemo(()=>{const v={low:0,medium:0,high:0};for(const w of e)v[w.severity]++;return v},[e]),k=v=>{c(u===v?null:v)};return t?s.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"24px",color:"var(--aether-muted-fg, #737373)"},children:"Loading anomalies..."}):n?s.jsx("div",{style:{padding:"12px",backgroundColor:"#fef2f2",borderRadius:"var(--aether-radius, 8px)",color:"#dc2626",fontSize:"13px"},children:n}):s.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"12px",maxHeight:l,overflow:"hidden"},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[s.jsxs("h3",{style:{display:"flex",alignItems:"center",gap:"8px",fontSize:"14px",fontWeight:600,color:"var(--aether-fg, #171717)",margin:0},children:[s.jsx("span",{style:{color:"#ef4444"},children:s.jsx(lv,{})}),"Anomaly Alerts",f.length>0&&s.jsx("span",{style:{padding:"2px 8px",fontSize:"12px",fontWeight:600,backgroundColor:"#ef4444",color:"#fff",borderRadius:"10px"},children:f.length})]}),s.jsxs("div",{style:{display:"flex",gap:"4px"},children:[s.jsx(ki,{active:d==="all",onClick:()=>g("all"),count:e.length,children:"All"}),s.jsx(ki,{active:d==="high",onClick:()=>g("high"),count:y.high,color:"#ef4444",children:"High"}),s.jsx(ki,{active:d==="medium",onClick:()=>g("medium"),count:y.medium,color:"#f59e0b",children:"Med"}),s.jsx(ki,{active:d==="low",onClick:()=>g("low"),count:y.low,color:"#3b82f6",children:"Low"})]})]}),s.jsx("div",{style:{flex:1,overflow:"auto",display:"flex",flexDirection:"column",gap:"8px"},children:f.length===0?s.jsx("div",{style:{padding:"24px",textAlign:"center",color:"var(--aether-muted-fg, #737373)",fontSize:"13px"},children:"No anomalies detected"}):f.map(v=>s.jsx(fv,{anomaly:v,expanded:u===v.eventId,onToggleExpand:()=>k(v.eventId),onClick:()=>r==null?void 0:r(v),onDismiss:i?()=>i(v.eventId):void 0,compact:a},v.eventId))})]})}function ki({active:e,onClick:t,count:n,color:r,children:i}){return s.jsxs("button",{onClick:t,style:{display:"flex",alignItems:"center",gap:"4px",padding:"4px 8px",border:`1px solid ${e?r||"#3b82f6":"var(--aether-border, #e5e5e5)"}`,borderRadius:"4px",backgroundColor:e?`${r||"#3b82f6"}10`:"transparent",color:e?r||"#3b82f6":"var(--aether-muted-fg, #737373)",fontSize:"11px",fontWeight:500,cursor:"pointer"},children:[i,n>0&&s.jsx("span",{style:{padding:"1px 4px",fontSize:"10px",backgroundColor:e?r||"#3b82f6":"var(--aether-muted, #f5f5f5)",color:e?"#fff":"var(--aether-muted-fg, #737373)",borderRadius:"3px"},children:n})]})}function fv({anomaly:e,expanded:t,onToggleExpand:n,onClick:r,onDismiss:i,compact:o}){const l=sv(e.severity),a=av(e.severity);return s.jsxs("div",{style:{border:`1px solid ${l}40`,borderRadius:"var(--aether-radius, 8px)",backgroundColor:a,overflow:"hidden"},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",padding:o?"8px 12px":"12px",cursor:"pointer"},onClick:r,children:[s.jsx("span",{style:{color:l,flexShrink:0},children:s.jsx(nv,{})}),s.jsxs("div",{style:{flex:1,minWidth:0},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[s.jsx("span",{style:{padding:"2px 6px",fontSize:"10px",fontWeight:600,backgroundColor:l,color:"#fff",borderRadius:"3px",textTransform:"uppercase"},children:e.severity}),s.jsx("span",{style:{fontSize:"12px",fontWeight:500,color:"var(--aether-fg, #171717)"},children:e.event.action}),s.jsxs("span",{style:{fontSize:"11px",color:"var(--aether-muted-fg, #737373)"},children:["by ",e.event.actor]})]}),s.jsx("div",{style:{fontSize:"12px",color:"var(--aether-muted-fg, #737373)",marginTop:"4px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:o?"nowrap":"normal"},children:e.reason})]}),s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",flexShrink:0},children:[s.jsx("span",{style:{fontSize:"11px",color:"var(--aether-muted-fg, #737373)"},children:uv(e.detectedAt)}),s.jsx("button",{onClick:u=>{u.stopPropagation(),n()},style:{display:"flex",alignItems:"center",justifyContent:"center",width:"24px",height:"24px",border:"none",backgroundColor:"transparent",color:"var(--aether-muted-fg, #737373)",cursor:"pointer",borderRadius:"4px"},children:t?s.jsx(ov,{}):s.jsx(iv,{})}),i&&s.jsx("button",{onClick:u=>{u.stopPropagation(),i()},style:{display:"flex",alignItems:"center",justifyContent:"center",width:"24px",height:"24px",border:"none",backgroundColor:"transparent",color:"var(--aether-muted-fg, #737373)",cursor:"pointer",borderRadius:"4px"},children:s.jsx(rv,{})})]})]}),t&&s.jsx("div",{style:{padding:"12px",borderTop:`1px solid ${l}20`,backgroundColor:"var(--aether-bg, #fff)"},children:s.jsxs("div",{style:{display:"grid",gap:"12px"},children:[s.jsxs("div",{children:[s.jsx("label",{style:{fontSize:"11px",fontWeight:600,color:"var(--aether-muted-fg, #737373)",textTransform:"uppercase"},children:"Deviation Score"}),s.jsx("div",{style:{marginTop:"4px",height:"8px",backgroundColor:"var(--aether-muted, #f5f5f5)",borderRadius:"4px",overflow:"hidden"},children:s.jsx("div",{style:{width:`${e.deviationScore*100}%`,height:"100%",backgroundColor:l}})}),s.jsxs("span",{style:{fontSize:"12px",color:"var(--aether-muted-fg, #737373)"},children:[Math.round(e.deviationScore*100),"%"]})]}),e.expectedActions&&e.expectedActions.length>0&&s.jsxs("div",{children:[s.jsx("label",{style:{fontSize:"11px",fontWeight:600,color:"var(--aether-muted-fg, #737373)",textTransform:"uppercase"},children:"Expected Actions"}),s.jsx("div",{style:{marginTop:"4px",display:"flex",flexWrap:"wrap",gap:"4px"},children:e.expectedActions.map((u,c)=>s.jsxs("span",{style:{padding:"2px 8px",fontSize:"11px",backgroundColor:"var(--aether-muted, #f5f5f5)",borderRadius:"4px"},children:[u.action," (",Math.round(u.probability*100),"%)"]},c))})]}),e.context&&s.jsxs("div",{children:[s.jsx("label",{style:{fontSize:"11px",fontWeight:600,color:"var(--aether-muted-fg, #737373)",textTransform:"uppercase"},children:"Context"}),s.jsxs("div",{style:{marginTop:"4px",padding:"8px",backgroundColor:"var(--aether-muted, #f5f5f5)",borderRadius:"4px",fontSize:"12px",fontFamily:"monospace"},children:[e.context.patternId&&s.jsxs("div",{children:["Pattern: ",e.context.patternId]}),e.context.patternPosition!==void 0&&s.jsxs("div",{children:["Position in pattern: ",e.context.patternPosition]}),e.context.previousEvents&&e.context.previousEvents.length>0&&s.jsxs("div",{children:["Previous events: ",e.context.previousEvents.length]})]})]}),s.jsxs("div",{children:[s.jsx("label",{style:{fontSize:"11px",fontWeight:600,color:"var(--aether-muted-fg, #737373)",textTransform:"uppercase"},children:"Event Content"}),s.jsx("div",{style:{marginTop:"4px",padding:"8px",backgroundColor:"var(--aether-muted, #f5f5f5)",borderRadius:"4px",fontSize:"12px",lineHeight:1.4},children:e.event.content})]})]})})]})}const dv=()=>s.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),s.jsx("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),s.jsx("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]}),sc=()=>s.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),s.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),pv=()=>s.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),s.jsx("circle",{cx:"12",cy:"12",r:"3"})]}),hv=()=>s.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("path",{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"}),s.jsx("line",{x1:"1",y1:"1",x2:"23",y2:"23"})]}),gv=()=>s.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("line",{x1:"8",y1:"6",x2:"21",y2:"6"}),s.jsx("line",{x1:"8",y1:"12",x2:"21",y2:"12"}),s.jsx("line",{x1:"8",y1:"18",x2:"21",y2:"18"}),s.jsx("line",{x1:"3",y1:"6",x2:"3.01",y2:"6"}),s.jsx("line",{x1:"3",y1:"12",x2:"3.01",y2:"12"}),s.jsx("line",{x1:"3",y1:"18",x2:"3.01",y2:"18"})]}),mv=()=>s.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("circle",{cx:"12",cy:"5",r:"3"}),s.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"16"}),s.jsx("circle",{cx:"6",cy:"19",r:"3"}),s.jsx("circle",{cx:"18",cy:"19",r:"3"}),s.jsx("line",{x1:"9",y1:"17.2",x2:"12",y2:"16"}),s.jsx("line",{x1:"15",y1:"17.2",x2:"12",y2:"16"})]}),yv=()=>s.jsxs("svg",{width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12"}),s.jsx("path",{d:"M5.45 5.11L2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z"})]}),ac=()=>s.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("circle",{cx:"6",cy:"19",r:"3"}),s.jsx("path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15"}),s.jsx("circle",{cx:"18",cy:"5",r:"3"})]}),uc=()=>s.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:s.jsx("polyline",{points:"22 12 18 12 15 21 9 3 6 12 2 12"})}),xv=()=>s.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("path",{d:"M9 18h6"}),s.jsx("path",{d:"M10 22h4"}),s.jsx("path",{d:"M12 2a7 7 0 0 0-4 12.9V17a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1v-2.1A7 7 0 0 0 12 2z"})]});function vv(e=768){const[t,n]=M.useState(typeof window<"u"?window.innerWidth<e:!1);return M.useEffect(()=>{if(typeof window>"u")return;const r=()=>{n(window.innerWidth<e)};return window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)},[e]),t}function i0({aether:e,title:t="Aether Memory Explorer",subtitle:n,className:r,connection:i,previewMode:o=!1,previewMemories:l=[],onPreviewToggle:a,onDisconnect:u}){const[c,d]=M.useState([]),[g,f]=M.useState(null),[y,k]=M.useState(null),[v,w]=M.useState([]),[p,h]=M.useState(null),[x,m]=M.useState(null),[_,C]=M.useState("timeline"),[E,j]=M.useState(!1),[D,R]=M.useState(""),[H,B]=M.useState(!1),[U,S]=M.useState([]),[I,T]=M.useState([]),[N,L]=M.useState([]),[A,P]=M.useState(null),[O,$]=M.useState([]),[ie,X]=M.useState(!1),Q=vv();M.useEffect(()=>{var ee,W;if(o&&l.length>0){d(l);const V=[...new Set(l.map($e=>$e.actor))];w(V),k({totalEvents:l.length,uniqueActors:V.length,oldestEvent:(ee=l[l.length-1])==null?void 0:ee.timestamp,newestEvent:(W=l[0])==null?void 0:W.timestamp,storageAdapter:"preview",embeddingProvider:"preview"});return}},[o,l]),M.useEffect(()=>{if(o)return;(async()=>{j(!0);try{const[W,V]=await Promise.all([e.stats(),e.getAll?e.getAll(100):Promise.resolve([])]);k(W),d(V);const $e=[...new Set(V.map(s0=>s0.actor))];w($e)}catch(W){console.error("Failed to load data:",W)}finally{j(!1)}})()},[e,o]),M.useEffect(()=>o?void 0:e.subscribe(W=>{d(V=>[W,...V]),w(V=>V.includes(W.actor)?V:[...V,W.actor]),k(V=>V?{...V,totalEvents:V.totalEvents+1,newestEvent:W.timestamp}:null)}),[e,o]),M.useEffect(()=>{(async()=>{if(p){X(!0);try{if(_==="trajectories"&&e.getTrajectories){const V=(await e.getTrajectories(p)).map($e=>({id:$e.id,actor:$e.actor,status:$e.status,outcome:$e.outcome,events:$e.events,startTime:$e.startTime,endTime:$e.endTime,metadata:$e.metadata}));S(V)}if(_==="patterns"){const W=[];e.detectPatterns&&W.push(e.detectPatterns(p).then(V=>T(V))),e.findAnomalies&&W.push(e.findAnomalies(p).then(V=>L(V))),e.getTransitionProbabilities&&W.push(e.getTransitionProbabilities(p).then(V=>P(V))),await Promise.all(W)}if(_==="predictions"&&x&&e.predictNext){const W=await e.predictNext(x.id);$(W)}}catch(W){console.error("Failed to load extended data:",W)}finally{X(!1)}}})()},[e,_,p,x]);const ae=M.useCallback(async(ee,W)=>{if(!e.simulate||!p)throw new Error("Simulation not available");return e.simulate(p,ee,W)},[e,p]),fe=M.useCallback(async(ee,W,V)=>{await e.add({content:ee,actor:W,context:V}),Q&&B(!1)},[e,Q]),Ve=M.useCallback(async(ee,W)=>{j(!0),R(ee);try{const V=await e.retrieve(ee,{retrievalType:W.retrievalType,limit:W.limit,actor:W.actor});f(V)}catch(V){console.error("Search failed:",V)}finally{j(!1)}},[e]),Vn=M.useCallback(async ee=>{h(ee),j(!0);try{if(ee){const W=await e.getHistory(ee,50);d(W)}else{const W=e.getAll?await e.getAll(100):[];d(W)}f(null),R("")}catch(W){console.error("Failed to load actor history:",W)}finally{j(!1)}},[e]),l0=M.useCallback(()=>{f(null),R("")},[]),qr=M.useMemo(()=>g||(p?c.filter(ee=>ee.actor===p):c),[c,g,p]),Zn={display:"flex",alignItems:"center",justifyContent:"center",padding:"8px",border:"1px solid var(--aether-border, #e5e5e5)",borderRadius:"var(--aether-radius, 8px)",backgroundColor:"transparent",cursor:"pointer"},Yn=ee=>({display:"flex",alignItems:"center",gap:"6px",padding:"8px 12px",fontSize:"14px",fontWeight:500,border:"none",borderRadius:"var(--aether-radius, 8px)",cursor:"pointer",backgroundColor:ee?"var(--aether-muted, #f5f5f5)":"transparent",color:ee?"var(--aether-fg, #1a1a1a)":"var(--aether-muted-fg, #737373)"}),_a=s.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[s.jsxs("div",{children:[s.jsx("h2",{style:{marginBottom:"12px",fontSize:"14px",fontWeight:600},children:"Add Memory"}),s.jsx(u1,{onAdd:fe,loading:E})]}),s.jsxs("div",{children:[s.jsx("h2",{style:{marginBottom:"12px",fontSize:"14px",fontWeight:600},children:"Statistics"}),s.jsx(p1,{stats:y,loading:E})]}),v.length>0&&s.jsxs("div",{children:[s.jsx("h2",{style:{marginBottom:"12px",fontSize:"14px",fontWeight:600},children:"Actors"}),s.jsx(h1,{actors:v,selectedActor:p,onSelect:Vn})]})]});return s.jsxs("div",{className:r,style:{display:"flex",flexDirection:"column",height:"100%",backgroundColor:"var(--aether-muted, #f5f5f5)",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'},children:[s.jsxs("header",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",justifyContent:"space-between",gap:"12px",padding:"12px 16px",borderBottom:"1px solid var(--aether-border, #e5e5e5)",backgroundColor:"var(--aether-bg, #fff)"},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[Q&&s.jsx("button",{style:Zn,onClick:()=>B(!H),children:s.jsx(dv,{})}),s.jsxs("div",{children:[s.jsx("h1",{style:{fontSize:"18px",fontWeight:600,margin:0},children:t}),n&&s.jsx("p",{style:{fontSize:"12px",color:"var(--aether-muted-fg, #737373)",margin:0,marginTop:"2px"},children:n})]}),u&&s.jsx("button",{style:{...Zn,padding:"6px 12px",fontSize:"12px",color:"var(--aether-muted-fg, #737373)"},onClick:u,children:"Disconnect"})]}),s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[a&&s.jsxs("button",{style:{...Zn,gap:"6px",padding:"6px 12px",backgroundColor:o?"#fef3c7":"transparent",color:o?"#b45309":"var(--aether-muted-fg, #737373)",border:o?"1px solid #fcd34d":"1px solid var(--aether-border, #e5e5e5)"},onClick:()=>a(!o),children:[o?s.jsx(pv,{}):s.jsx(hv,{}),s.jsx("span",{style:{fontSize:"14px"},children:o?"Preview":"Live"})]}),i&&!o&&s.jsx(Px,{connected:i.connected,error:i.error,onReconnect:i.onReconnect}),s.jsxs("div",{style:{display:"flex",gap:"4px",padding:"4px",backgroundColor:"var(--aether-muted, #f5f5f5)",borderRadius:"var(--aether-radius, 8px)",flexWrap:"wrap"},children:[s.jsxs("button",{style:Yn(_==="timeline"),onClick:()=>C("timeline"),children:[s.jsx(gv,{}),!Q&&s.jsx("span",{children:"Timeline"})]}),s.jsxs("button",{style:Yn(_==="graph"),onClick:()=>C("graph"),children:[s.jsx(mv,{}),!Q&&s.jsx("span",{children:"Graph"})]}),s.jsxs("button",{style:Yn(_==="trajectories"),onClick:()=>C("trajectories"),children:[s.jsx(ac,{}),!Q&&s.jsx("span",{children:"Trajectories"})]}),s.jsxs("button",{style:Yn(_==="patterns"),onClick:()=>C("patterns"),children:[s.jsx(uc,{}),!Q&&s.jsx("span",{children:"Patterns"})]}),s.jsxs("button",{style:Yn(_==="predictions"),onClick:()=>C("predictions"),children:[s.jsx(xv,{}),!Q&&s.jsx("span",{children:"Predictions"})]})]})]})]}),s.jsxs("div",{style:{position:"relative",display:"flex",flex:1,overflow:"hidden"},children:[Q&&H&&s.jsxs(s.Fragment,{children:[s.jsx("div",{style:{position:"fixed",inset:0,backgroundColor:"rgba(0, 0, 0, 0.5)",zIndex:40},onClick:()=>B(!1)}),s.jsxs("aside",{style:{position:"fixed",left:0,top:0,bottom:0,width:"300px",maxWidth:"85vw",padding:"16px",backgroundColor:"var(--aether-bg, #fff)",zIndex:50,overflow:"auto"},children:[s.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"16px"},children:[s.jsx("h2",{style:{fontSize:"16px",fontWeight:600},children:"Menu"}),s.jsx("button",{style:{...Zn,padding:"4px"},onClick:()=>B(!1),children:s.jsx(sc,{})})]}),_a]})]}),!Q&&s.jsx("aside",{style:{width:"320px",minWidth:"320px",padding:"16px",borderRight:"1px solid var(--aether-border, #e5e5e5)",backgroundColor:"var(--aether-bg, #fff)",overflow:"auto"},children:_a}),s.jsxs("main",{style:{display:"flex",flex:1,flexDirection:"column",minWidth:0,overflow:"hidden"},children:[s.jsxs("div",{style:{padding:"12px 16px",borderBottom:"1px solid var(--aether-border, #e5e5e5)",backgroundColor:"var(--aether-bg, #fff)"},children:[s.jsx(d1,{onSearch:Ve,loading:E}),D&&s.jsxs("div",{style:{marginTop:"8px",display:"flex",alignItems:"center",gap:"8px"},children:[s.jsxs("span",{style:{fontSize:"14px",color:"var(--aether-muted-fg, #737373)"},children:['Showing results for "',D,'"']}),s.jsx("button",{style:{padding:"4px 8px",fontSize:"14px",color:"var(--aether-primary, #3b82f6)",background:"none",border:"none",cursor:"pointer"},onClick:l0,children:"Clear"})]})]}),s.jsxs("div",{style:{display:"flex",flex:1,overflow:"hidden",flexDirection:Q&&x&&_==="timeline"?"column":"row"},children:[s.jsxs("div",{style:{flex:1,minWidth:0,overflow:"hidden",padding:"12px 16px"},children:[_==="timeline"&&(qr.length===0?s.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%",minHeight:"200px",padding:"20px",textAlign:"center",color:"var(--aether-muted-fg, #737373)"},children:[s.jsx(yv,{}),s.jsx("p",{style:{marginTop:"12px",fontSize:"14px"},children:"No memories yet"}),s.jsx("p",{style:{marginTop:"4px",fontSize:"12px"},children:Q?"Tap the menu to add your first memory":"Add your first memory using the form on the left"})]}):s.jsx(g1,{events:qr,onEventClick:m,selectedEventId:x==null?void 0:x.id,showContext:!0,maxHeight:"100%"})),_==="graph"&&s.jsx("div",{style:{height:"100%",width:"100%"},children:s.jsx(Mx,{events:qr,onNodeClick:m,selectedEvent:x,highlightActor:p??void 0})}),_==="trajectories"&&s.jsx("div",{style:{height:"100%",overflow:"auto"},children:p?s.jsx(Bx,{events:qr,trajectories:U,onEventClick:m,selectedEventId:x==null?void 0:x.id,showBoundaries:!0,maxHeight:"100%"}):s.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%",padding:"20px",textAlign:"center",color:"var(--aether-muted-fg, #737373)"},children:[s.jsx(ac,{}),s.jsx("p",{style:{marginTop:"12px",fontSize:"14px"},children:"Select an actor to view trajectories"})]})}),_==="patterns"&&s.jsx("div",{style:{height:"100%",overflow:"auto"},children:p?s.jsx(Xx,{patterns:I,anomalies:N,transitionMatrix:A??void 0,loading:ie}):s.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%",padding:"20px",textAlign:"center",color:"var(--aether-muted-fg, #737373)"},children:[s.jsx(uc,{}),s.jsx("p",{style:{marginTop:"12px",fontSize:"14px"},children:"Select an actor to view patterns"})]})}),_==="predictions"&&s.jsxs("div",{style:{display:"flex",height:"100%",gap:"16px"},children:[s.jsx("div",{style:{flex:1,overflow:"auto"},children:s.jsx(ev,{predictions:O,loading:ie,onSimulate:e.simulate?ae:void 0,simulationEnabled:!!e.simulate&&!!p,maxHeight:"100%"})}),!Q&&N.length>0&&s.jsx("div",{style:{width:"300px",minWidth:"300px",padding:"16px",borderLeft:"1px solid var(--aether-border, #e5e5e5)",backgroundColor:"var(--aether-bg, #fff)",overflow:"auto"},children:s.jsx(cv,{anomalies:N,loading:ie,onAnomalyClick:ee=>m(ee.event),compact:!0,maxHeight:"100%"})})]})]}),x&&_==="timeline"&&s.jsxs("aside",{style:{width:Q?"100%":"300px",minWidth:Q?void 0:"300px",maxHeight:Q?"40vh":void 0,padding:"16px",borderTop:Q?"1px solid var(--aether-border, #e5e5e5)":"none",borderLeft:Q?"none":"1px solid var(--aether-border, #e5e5e5)",backgroundColor:"var(--aether-bg, #fff)",overflow:"auto"},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"12px"},children:[s.jsx("h3",{style:{fontSize:"14px",fontWeight:600},children:"Event Details"}),s.jsx("button",{style:{...Zn,padding:"4px"},onClick:()=>m(null),children:s.jsx(sc,{})})]}),s.jsx(pa,{event:x,showContext:!0})]})]})]})]})]})}const cc="aether-studio-connection";function wv({onConnect:e,defaultUrl:t,isConnecting:n=!1,error:r}){const[i,o]=M.useState(t||"http://localhost:3456"),[l,a]=M.useState(""),[u,c]=M.useState(!1);M.useEffect(()=>{try{const _=localStorage.getItem(cc);if(_){const{url:C,apiKey:E}=JSON.parse(_);C&&o(C),E&&(a(E),c(!0))}}catch{}},[]);const d=()=>{try{localStorage.setItem(cc,JSON.stringify({url:i,apiKey:l||void 0}))}catch{}e(i,l||void 0)},g={display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"100vh",backgroundColor:"var(--aether-muted, #f5f5f5)",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',padding:"24px"},f={backgroundColor:"var(--aether-bg, #ffffff)",borderRadius:"12px",padding:"32px",maxWidth:"420px",width:"100%",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)"},y={fontSize:"24px",fontWeight:600,color:"var(--aether-fg, #1a1a1a)",marginBottom:"8px",display:"flex",alignItems:"center",gap:"12px"},k={fontSize:"14px",color:"var(--aether-muted-fg, #737373)",marginBottom:"24px"},v={marginBottom:"16px"},w={display:"block",fontSize:"13px",fontWeight:500,color:"var(--aether-fg, #1a1a1a)",marginBottom:"6px"},p={width:"100%",padding:"10px 12px",fontSize:"14px",border:"1px solid var(--aether-border, #e5e5e5)",borderRadius:"8px",backgroundColor:"var(--aether-bg, #ffffff)",color:"var(--aether-fg, #1a1a1a)",outline:"none",boxSizing:"border-box"},h={width:"100%",padding:"12px",fontSize:"14px",fontWeight:500,backgroundColor:"var(--aether-primary, #3b82f6)",color:"var(--aether-primary-fg, #ffffff)",border:"none",borderRadius:"8px",cursor:n?"not-allowed":"pointer",opacity:n?.7:1,display:"flex",alignItems:"center",justifyContent:"center",gap:"8px"};({...h});const x={backgroundColor:"#fee2e2",color:"#b91c1c",padding:"12px",borderRadius:"8px",fontSize:"13px",marginBottom:"16px",display:"flex",alignItems:"center",gap:"8px"},m={color:"var(--aether-primary, #3b82f6)",textDecoration:"none",fontSize:"12px",cursor:"pointer",display:"inline-flex",alignItems:"center",gap:"4px"};return s.jsxs("div",{style:g,children:[s.jsxs("div",{style:f,children:[s.jsxs("h1",{style:y,children:[s.jsx(e1,{size:24,color:"var(--aether-primary, #3b82f6)"}),"Aether Studio"]}),s.jsx("p",{style:k,children:"Connect to an Aether server to explore your memory data."}),r&&s.jsxs("div",{style:x,children:[s.jsx(i1,{size:16}),r]}),s.jsxs("div",{style:v,children:[s.jsx("label",{style:w,children:"Server URL"}),s.jsx("input",{type:"text",value:i,onChange:_=>o(_.target.value),placeholder:"http://localhost:3000",style:p})]}),u?s.jsxs("div",{style:v,children:[s.jsxs("label",{style:w,children:["API Key"," ",s.jsx("span",{style:{color:"var(--aether-muted-fg)",fontWeight:400},children:"(optional)"})]}),s.jsx("input",{type:"password",value:l,onChange:_=>a(_.target.value),placeholder:"Enter API key if required",style:p})]}):s.jsx("div",{style:{marginBottom:"16px"},children:s.jsx("span",{style:m,onClick:()=>c(!0),children:"+ Add API key"})}),s.jsx("button",{style:h,onClick:d,disabled:n||!i,children:n?s.jsxs(s.Fragment,{children:[s.jsx(da,{size:16,style:{animation:"spin 1s linear infinite"}}),"Connecting..."]}):s.jsxs(s.Fragment,{children:[s.jsx(l1,{size:16}),"Connect"]})}),s.jsx("div",{style:{marginTop:"24px",textAlign:"center"},children:s.jsxs("a",{href:"https://github.com/your-org/aether",target:"_blank",rel:"noopener noreferrer",style:{...m,fontSize:"12px"},children:["Need help starting a server? ",s.jsx(Uh,{size:12})]})})]}),s.jsx("style",{children:`
116
+ @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
117
+ input:focus { border-color: var(--aether-primary, #3b82f6); }
118
+ button:hover:not(:disabled) { opacity: 0.9; }
119
+ `})]})}class fc{constructor(t){Tt(this,"config");Tt(this,"ws",null);Tt(this,"listeners",new Set);Tt(this,"connectionListeners",new Set);Tt(this,"connected",!1);Tt(this,"initialized",!1);Tt(this,"reconnectTimer",null);const n=typeof t=="string"?{baseUrl:t}:t,r=n.baseUrl.replace(/\/$/,""),i=r.startsWith("https")?"wss":"ws",o=r.replace(/^https?:\/\//,"");this.config={baseUrl:r,apiKey:n.apiKey??"",wsUrl:n.wsUrl??`${i}://${o}/ws`,autoReconnect:n.autoReconnect??!0,reconnectDelay:n.reconnectDelay??3e3}}async initialize(){this.initialized||(await this.stats(),this.connectWebSocket(),this.initialized=!0)}async add(t,n){const r=typeof t=="string"?{content:t,context:n}:t;return await this.fetch("/api/v1/memory",{method:"POST",body:JSON.stringify(r)})}async addBatch(t){return await this.fetch("/api/v1/memory/batch",{method:"POST",body:JSON.stringify({events:t})})}async retrieve(t,n){const r=new URLSearchParams({q:t});n!=null&&n.retrievalType&&r.set("type",n.retrievalType),n!=null&&n.limit&&r.set("limit",String(n.limit)),n!=null&&n.actor&&r.set("actor",n.actor),n!=null&&n.threshold&&r.set("threshold",String(n.threshold));const i=await this.fetch(`/api/v1/memory?${r}`);return Array.isArray(i)?i:i.events??[]}async getAll(t){const n=new URLSearchParams;t&&n.set("limit",String(t));const r=await this.fetch(`/api/v1/events?${n}`);return Array.isArray(r)?r:r.events??[]}async getHistory(t,n){const r=new URLSearchParams;n&&r.set("limit",String(n));const i=await this.fetch(`/api/v1/history/${encodeURIComponent(t)}?${r}`);return Array.isArray(i)?i:i.events??[]}async get(t){try{return await this.fetch(`/api/v1/memory/${encodeURIComponent(t)}`)}catch{return null}}async delete(t){try{return await this.fetch(`/api/v1/memory/${encodeURIComponent(t)}`,{method:"DELETE"}),!0}catch{return!1}}async stats(){return this.fetch("/api/v1/stats")}subscribe(t){return this.listeners.add(t),()=>{this.listeners.delete(t)}}onConnectionChange(t){return this.connectionListeners.add(t),t(this.connected),()=>{this.connectionListeners.delete(t)}}isConnected(){return this.connected}async close(){this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.ws&&(this.ws.close(),this.ws=null),this.listeners.clear(),this.connectionListeners.clear(),this.initialized=!1}async fetch(t,n={}){const r={"Content-Type":"application/json",...n.headers};this.config.apiKey&&(r.Authorization=`Bearer ${this.config.apiKey}`);const i=await fetch(`${this.config.baseUrl}${t}`,{...n,headers:r});if(!i.ok){const o=await i.json().catch(()=>({error:i.statusText}));throw new Error(o.error||o.message||"Request failed")}return i.json()}connectWebSocket(){try{this.ws=new WebSocket(this.config.wsUrl),this.ws.onopen=()=>{this.connected=!0,this.notifyConnectionListeners(!0)},this.ws.onmessage=t=>{try{const n=JSON.parse(t.data);n.type==="memory:added"&&n.data&&this.notifyListeners(n.data)}catch{}},this.ws.onclose=()=>{this.connected=!1,this.notifyConnectionListeners(!1),this.ws=null,this.config.autoReconnect&&this.initialized&&this.scheduleReconnect()},this.ws.onerror=()=>{}}catch{this.scheduleReconnect()}}scheduleReconnect(){this.reconnectTimer||(this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.initialized&&!this.connected&&this.connectWebSocket()},this.config.reconnectDelay))}notifyListeners(t){for(const n of this.listeners)try{n(t)}catch{}}notifyConnectionListeners(t){for(const n of this.connectionListeners)try{n(t)}catch{}}}const Sv=[{id:"01HQXK0001SAMPLE000000001",timestamp:"2024-01-15T14:32:00Z",actor:"alice",action:"login",content:"Alice logged into the platform from Chrome on MacOS",context:{sessionId:"sess_abc123",device:"desktop",browser:"Chrome",os:"MacOS"}},{id:"01HQXK0002SAMPLE000000002",timestamp:"2024-01-15T14:33:15Z",actor:"alice",action:"search",content:"Alice searched for 'wireless headphones noise cancelling'",context:{sessionId:"sess_abc123",query:"wireless headphones noise cancelling",resultsCount:24}},{id:"01HQXK0003SAMPLE000000003",timestamp:"2024-01-15T14:34:02Z",actor:"alice",action:"view",content:"Alice viewed product: Sony WH-1000XM5 Wireless Headphones",context:{sessionId:"sess_abc123",productId:"prod_sony_wh1000xm5",category:"electronics",price:349.99},relations:[{type:"follows",targetEventId:"01HQXK0002SAMPLE000000002"}]},{id:"01HQXK0004SAMPLE000000004",timestamp:"2024-01-15T14:35:30Z",actor:"alice",action:"view",content:"Alice viewed product: Bose QuietComfort Ultra Headphones",context:{sessionId:"sess_abc123",productId:"prod_bose_qc_ultra",category:"electronics",price:429.99},relations:[{type:"follows",targetEventId:"01HQXK0003SAMPLE000000003"}]},{id:"01HQXK0005SAMPLE000000005",timestamp:"2024-01-15T14:37:45Z",actor:"alice",action:"add_to_cart",content:"Alice added Sony WH-1000XM5 to cart",context:{sessionId:"sess_abc123",productId:"prod_sony_wh1000xm5",cartId:"cart_alice_001",quantity:1},relations:[{type:"references",targetEventId:"01HQXK0003SAMPLE000000003"}]},{id:"01HQXK0006SAMPLE000000006",timestamp:"2024-01-15T14:38:20Z",actor:"alice",action:"search",content:"Alice searched for 'headphone stand'",context:{sessionId:"sess_abc123",query:"headphone stand",resultsCount:18}},{id:"01HQXK0007SAMPLE000000007",timestamp:"2024-01-15T14:39:10Z",actor:"alice",action:"view",content:"Alice viewed product: Wooden Headphone Stand",context:{sessionId:"sess_abc123",productId:"prod_wood_stand",category:"accessories",price:29.99},relations:[{type:"follows",targetEventId:"01HQXK0006SAMPLE000000006"}]},{id:"01HQXK0008SAMPLE000000008",timestamp:"2024-01-15T14:40:05Z",actor:"alice",action:"add_to_cart",content:"Alice added Wooden Headphone Stand to cart",context:{sessionId:"sess_abc123",productId:"prod_wood_stand",cartId:"cart_alice_001",quantity:1},relations:[{type:"references",targetEventId:"01HQXK0007SAMPLE000000007"}]},{id:"01HQXK0009SAMPLE000000009",timestamp:"2024-01-15T14:42:00Z",actor:"alice",action:"purchase",content:"Alice completed purchase for order #ORD-2024-1001",context:{sessionId:"sess_abc123",orderId:"ORD-2024-1001",cartId:"cart_alice_001",total:379.98,items:2,paymentMethod:"credit_card"},relations:[{type:"references",targetEventId:"01HQXK0005SAMPLE000000005"},{type:"references",targetEventId:"01HQXK0008SAMPLE000000008"}]},{id:"01HQXK0010SAMPLE000000010",timestamp:"2024-01-15T14:42:05Z",actor:"system",action:"create",content:"Order #ORD-2024-1001 created and payment confirmed",context:{orderId:"ORD-2024-1001",status:"confirmed",customerId:"alice"},relations:[{type:"follows",targetEventId:"01HQXK0009SAMPLE000000009"}]},{id:"01HQXK0011SAMPLE000000011",timestamp:"2024-01-15T15:00:00Z",actor:"bob",action:"login",content:"Bob logged into the platform from Safari on iPhone",context:{sessionId:"sess_bob456",device:"mobile",browser:"Safari",os:"iOS"}},{id:"01HQXK0012SAMPLE000000012",timestamp:"2024-01-15T15:01:30Z",actor:"bob",action:"view",content:"Bob viewed product: MacBook Pro 14-inch M3",context:{sessionId:"sess_bob456",productId:"prod_mbp_14_m3",category:"computers",price:1999}},{id:"01HQXK0013SAMPLE000000013",timestamp:"2024-01-15T15:03:45Z",actor:"bob",action:"view",content:"Bob viewed product: Apple Magic Keyboard",context:{sessionId:"sess_bob456",productId:"prod_magic_keyboard",category:"accessories",price:99}},{id:"01HQXK0014SAMPLE000000014",timestamp:"2024-01-15T15:05:00Z",actor:"bob",action:"add_to_cart",content:"Bob added MacBook Pro 14-inch M3 to cart",context:{sessionId:"sess_bob456",productId:"prod_mbp_14_m3",cartId:"cart_bob_001",quantity:1},relations:[{type:"references",targetEventId:"01HQXK0012SAMPLE000000012"}]},{id:"01HQXK0015SAMPLE000000015",timestamp:"2024-01-15T15:06:20Z",actor:"bob",action:"add_to_cart",content:"Bob added Apple Magic Keyboard to cart",context:{sessionId:"sess_bob456",productId:"prod_magic_keyboard",cartId:"cart_bob_001",quantity:1},relations:[{type:"references",targetEventId:"01HQXK0013SAMPLE000000013"}]},{id:"01HQXK0016SAMPLE000000016",timestamp:"2024-01-15T16:30:00Z",actor:"system",action:"update",content:"Order #ORD-2024-1001 shipped via FedEx",context:{orderId:"ORD-2024-1001",status:"shipped",carrier:"FedEx",trackingNumber:"FX123456789"},relations:[{type:"follows",targetEventId:"01HQXK0010SAMPLE000000010"}]},{id:"01HQXK0017SAMPLE000000017",timestamp:"2024-01-15T16:30:05Z",actor:"system",action:"message",content:"Shipping notification email sent to alice@example.com",context:{orderId:"ORD-2024-1001",emailType:"shipping_notification",recipient:"alice@example.com"},relations:[{type:"follows",targetEventId:"01HQXK0016SAMPLE000000016"}]},{id:"01HQXK0018SAMPLE000000018",timestamp:"2024-01-15T17:00:00Z",actor:"bob",action:"remove_from_cart",content:"Bob removed Apple Magic Keyboard from cart",context:{sessionId:"sess_bob456",productId:"prod_magic_keyboard",cartId:"cart_bob_001"},relations:[{type:"references",targetEventId:"01HQXK0015SAMPLE000000015"}]},{id:"01HQXK0019SAMPLE000000019",timestamp:"2024-01-15T17:02:00Z",actor:"bob",action:"purchase",content:"Bob completed purchase for order #ORD-2024-1002",context:{sessionId:"sess_bob456",orderId:"ORD-2024-1002",cartId:"cart_bob_001",total:1999,items:1,paymentMethod:"apple_pay"},relations:[{type:"references",targetEventId:"01HQXK0014SAMPLE000000014"}]},{id:"01HQXK0020SAMPLE000000020",timestamp:"2024-01-15T17:02:05Z",actor:"system",action:"create",content:"Order #ORD-2024-1002 created and payment confirmed",context:{orderId:"ORD-2024-1002",status:"confirmed",customerId:"bob"},relations:[{type:"follows",targetEventId:"01HQXK0019SAMPLE000000019"}]},{id:"01HQXK0021SAMPLE000000021",timestamp:"2024-01-16T09:00:00Z",actor:"alice",action:"login",content:"Alice logged into the platform from Chrome on MacOS",context:{sessionId:"sess_abc124",device:"desktop",browser:"Chrome",os:"MacOS"}},{id:"01HQXK0022SAMPLE000000022",timestamp:"2024-01-16T09:01:00Z",actor:"alice",action:"view",content:"Alice viewed order status for #ORD-2024-1001",context:{sessionId:"sess_abc124",orderId:"ORD-2024-1001",page:"order_tracking"},relations:[{type:"references",targetEventId:"01HQXK0009SAMPLE000000009"}]},{id:"01HQXK0023SAMPLE000000023",timestamp:"2024-01-16T10:15:00Z",actor:"system",action:"update",content:"Order #ORD-2024-1001 out for delivery",context:{orderId:"ORD-2024-1001",status:"out_for_delivery",estimatedDelivery:"2024-01-16T14:00:00Z"},relations:[{type:"follows",targetEventId:"01HQXK0016SAMPLE000000016"}]},{id:"01HQXK0024SAMPLE000000024",timestamp:"2024-01-16T13:45:00Z",actor:"system",action:"update",content:"Order #ORD-2024-1001 delivered successfully",context:{orderId:"ORD-2024-1001",status:"delivered",deliveredAt:"2024-01-16T13:45:00Z",signedBy:"A. Smith"},relations:[{type:"follows",targetEventId:"01HQXK0023SAMPLE000000023"}]},{id:"01HQXK0025SAMPLE000000025",timestamp:"2024-01-16T14:00:00Z",actor:"alice",action:"message",content:"Alice opened support ticket: Headphones not working properly",context:{ticketId:"TKT-2024-0001",orderId:"ORD-2024-1001",productId:"prod_sony_wh1000xm5",category:"defective_product",priority:"high"},relations:[{type:"references",targetEventId:"01HQXK0024SAMPLE000000024"}]},{id:"01HQXK0026SAMPLE000000026",timestamp:"2024-01-16T14:05:00Z",actor:"support-agent",action:"message",content:"Support agent Sarah assigned to ticket TKT-2024-0001",context:{ticketId:"TKT-2024-0001",agentId:"agent_sarah",status:"assigned"},relations:[{type:"follows",targetEventId:"01HQXK0025SAMPLE000000025"}]},{id:"01HQXK0027SAMPLE000000027",timestamp:"2024-01-16T14:10:00Z",actor:"support-agent",action:"message",content:"Sarah: Hi Alice, I'm sorry to hear about the issue with your headphones. Can you describe what's happening?",context:{ticketId:"TKT-2024-0001",messageType:"agent_response"},relations:[{type:"follows",targetEventId:"01HQXK0026SAMPLE000000026"}]},{id:"01HQXK0028SAMPLE000000028",timestamp:"2024-01-16T14:15:00Z",actor:"alice",action:"message",content:"Alice: The right earcup doesn't produce any sound, and there's a crackling noise from the left one",context:{ticketId:"TKT-2024-0001",messageType:"customer_response"},relations:[{type:"follows",targetEventId:"01HQXK0027SAMPLE000000027"}]},{id:"01HQXK0029SAMPLE000000029",timestamp:"2024-01-16T14:20:00Z",actor:"support-agent",action:"message",content:"Sarah: I understand. Let me initiate a replacement for you. We'll send a new pair and include a return label for the defective unit.",context:{ticketId:"TKT-2024-0001",messageType:"agent_response",action:"replacement_initiated"},relations:[{type:"follows",targetEventId:"01HQXK0028SAMPLE000000028"}]},{id:"01HQXK0030SAMPLE000000030",timestamp:"2024-01-16T14:21:00Z",actor:"system",action:"create",content:"Replacement order #ORD-2024-1003 created for defective item",context:{orderId:"ORD-2024-1003",originalOrderId:"ORD-2024-1001",ticketId:"TKT-2024-0001",type:"replacement",productId:"prod_sony_wh1000xm5"},relations:[{type:"causes",targetEventId:"01HQXK0029SAMPLE000000029"}]},{id:"01HQXK0031SAMPLE000000031",timestamp:"2024-01-16T14:25:00Z",actor:"alice",action:"message",content:"Alice: Thank you so much for the quick resolution!",context:{ticketId:"TKT-2024-0001",messageType:"customer_response"},relations:[{type:"follows",targetEventId:"01HQXK0029SAMPLE000000029"}]},{id:"01HQXK0032SAMPLE000000032",timestamp:"2024-01-16T14:26:00Z",actor:"support-agent",action:"update",content:"Support ticket TKT-2024-0001 resolved",context:{ticketId:"TKT-2024-0001",status:"resolved",resolution:"replacement_sent",satisfactionScore:5},relations:[{type:"follows",targetEventId:"01HQXK0031SAMPLE000000031"}]},{id:"01HQXK0033SAMPLE000000033",timestamp:"2024-01-16T15:00:00Z",actor:"system",action:"update",content:"Order #ORD-2024-1002 shipped via UPS",context:{orderId:"ORD-2024-1002",status:"shipped",carrier:"UPS",trackingNumber:"1Z999AA10123456784"},relations:[{type:"follows",targetEventId:"01HQXK0020SAMPLE000000020"}]},{id:"01HQXK0034SAMPLE000000034",timestamp:"2024-01-17T10:00:00Z",actor:"charlie",action:"login",content:"Charlie logged into the platform from Firefox on Windows",context:{sessionId:"sess_charlie789",device:"desktop",browser:"Firefox",os:"Windows"}},{id:"01HQXK0035SAMPLE000000035",timestamp:"2024-01-17T10:02:00Z",actor:"charlie",action:"search",content:"Charlie searched for 'gaming monitor 4k 144hz'",context:{sessionId:"sess_charlie789",query:"gaming monitor 4k 144hz",resultsCount:12}},{id:"01HQXK0036SAMPLE000000036",timestamp:"2024-01-17T10:04:00Z",actor:"charlie",action:"view",content:"Charlie viewed product: LG 27GP950-B 4K Gaming Monitor",context:{sessionId:"sess_charlie789",productId:"prod_lg_27gp950",category:"monitors",price:799.99},relations:[{type:"follows",targetEventId:"01HQXK0035SAMPLE000000035"}]},{id:"01HQXK0037SAMPLE000000037",timestamp:"2024-01-17T10:06:00Z",actor:"charlie",action:"view",content:"Charlie viewed product: Samsung Odyssey G7 32-inch",context:{sessionId:"sess_charlie789",productId:"prod_samsung_g7",category:"monitors",price:649.99},relations:[{type:"follows",targetEventId:"01HQXK0036SAMPLE000000036"}]},{id:"01HQXK0038SAMPLE000000038",timestamp:"2024-01-17T10:10:00Z",actor:"charlie",action:"view",content:"Charlie compared products: LG 27GP950-B vs Samsung Odyssey G7",context:{sessionId:"sess_charlie789",productIds:["prod_lg_27gp950","prod_samsung_g7"],page:"comparison"},relations:[{type:"references",targetEventId:"01HQXK0036SAMPLE000000036"},{type:"references",targetEventId:"01HQXK0037SAMPLE000000037"}]},{id:"01HQXK0039SAMPLE000000039",timestamp:"2024-01-17T10:15:00Z",actor:"charlie",action:"add_to_cart",content:"Charlie added LG 27GP950-B to cart",context:{sessionId:"sess_charlie789",productId:"prod_lg_27gp950",cartId:"cart_charlie_001",quantity:1},relations:[{type:"references",targetEventId:"01HQXK0036SAMPLE000000036"}]},{id:"01HQXK0040SAMPLE000000040",timestamp:"2024-01-17T11:30:00Z",actor:"system",action:"update",content:"Replacement order #ORD-2024-1003 shipped via FedEx",context:{orderId:"ORD-2024-1003",status:"shipped",carrier:"FedEx",trackingNumber:"FX987654321"},relations:[{type:"follows",targetEventId:"01HQXK0030SAMPLE000000030"}]},{id:"01HQXK0041SAMPLE000000041",timestamp:"2024-01-17T14:00:00Z",actor:"system",action:"update",content:"Order #ORD-2024-1002 delivered successfully",context:{orderId:"ORD-2024-1002",status:"delivered",deliveredAt:"2024-01-17T14:00:00Z",signedBy:"B. Johnson"},relations:[{type:"follows",targetEventId:"01HQXK0033SAMPLE000000033"}]},{id:"01HQXK0042SAMPLE000000042",timestamp:"2024-01-17T15:00:00Z",actor:"bob",action:"message",content:"Bob left a 5-star review for MacBook Pro 14-inch M3",context:{productId:"prod_mbp_14_m3",orderId:"ORD-2024-1002",rating:5,reviewTitle:"Best laptop I've ever owned!"},relations:[{type:"references",targetEventId:"01HQXK0041SAMPLE000000041"}]},{id:"01HQXK0043SAMPLE000000043",timestamp:"2024-01-17T16:00:00Z",actor:"charlie",action:"logout",content:"Charlie logged out without completing purchase",context:{sessionId:"sess_charlie789",cartId:"cart_charlie_001",cartValue:799.99,abandonedCart:!0}},{id:"01HQXK0044SAMPLE000000044",timestamp:"2024-01-18T09:00:00Z",actor:"system",action:"message",content:"Abandoned cart reminder email sent to charlie@example.com",context:{cartId:"cart_charlie_001",emailType:"abandoned_cart",recipient:"charlie@example.com"},relations:[{type:"follows",targetEventId:"01HQXK0043SAMPLE000000043"}]},{id:"01HQXK0045SAMPLE000000045",timestamp:"2024-01-18T10:30:00Z",actor:"system",action:"update",content:"Replacement order #ORD-2024-1003 delivered successfully",context:{orderId:"ORD-2024-1003",status:"delivered",deliveredAt:"2024-01-18T10:30:00Z"},relations:[{type:"follows",targetEventId:"01HQXK0040SAMPLE000000040"}]},{id:"01HQXK0046SAMPLE000000046",timestamp:"2024-01-18T11:00:00Z",actor:"alice",action:"message",content:"Alice left a 5-star review for Sony WH-1000XM5 (replacement unit)",context:{productId:"prod_sony_wh1000xm5",orderId:"ORD-2024-1003",rating:5,reviewTitle:"Great headphones, excellent customer service!"},relations:[{type:"references",targetEventId:"01HQXK0045SAMPLE000000045"}]},{id:"01HQXK0047SAMPLE000000047",timestamp:"2024-01-18T14:00:00Z",actor:"charlie",action:"login",content:"Charlie returned to complete purchase after email reminder",context:{sessionId:"sess_charlie790",device:"desktop",browser:"Firefox",os:"Windows",source:"email_reminder"},relations:[{type:"follows",targetEventId:"01HQXK0044SAMPLE000000044"}]},{id:"01HQXK0048SAMPLE000000048",timestamp:"2024-01-18T14:05:00Z",actor:"charlie",action:"purchase",content:"Charlie completed purchase for order #ORD-2024-1004",context:{sessionId:"sess_charlie790",orderId:"ORD-2024-1004",cartId:"cart_charlie_001",total:799.99,items:1,paymentMethod:"paypal",couponUsed:"COMEBACK10"},relations:[{type:"references",targetEventId:"01HQXK0039SAMPLE000000039"}]},{id:"01HQXK0049SAMPLE000000049",timestamp:"2024-01-18T14:05:05Z",actor:"system",action:"create",content:"Order #ORD-2024-1004 created and payment confirmed",context:{orderId:"ORD-2024-1004",status:"confirmed",customerId:"charlie",discount:80},relations:[{type:"follows",targetEventId:"01HQXK0048SAMPLE000000048"}]},{id:"01HQXK0050SAMPLE000000050",timestamp:"2024-01-18T15:00:00Z",actor:"system",action:"update",content:"Weekly analytics report generated: 4 orders, $4,178.96 revenue, 3 unique customers",context:{reportType:"weekly_summary",period:"2024-W03",totalOrders:4,totalRevenue:4178.96,uniqueCustomers:3,avgOrderValue:1044.74}}],kv={memories:Sv},_v=kv.memories,Fe=[..._v].sort((e,t)=>new Date(t.timestamp).getTime()-new Date(e.timestamp).getTime()),dc={alice:[{id:"traj_alice_001",actor:"alice",status:"completed",outcome:"success",events:["01HQXK0001SAMPLE000000001","01HQXK0002SAMPLE000000002","01HQXK0003SAMPLE000000003","01HQXK0005SAMPLE000000005","01HQXK0009SAMPLE000000009"],startTime:"2024-01-15T14:32:00Z",endTime:"2024-01-15T14:42:00Z",context:{type:"purchase_flow",value:379.98}},{id:"traj_alice_002",actor:"alice",status:"completed",outcome:"success",events:["01HQXK0025SAMPLE000000025","01HQXK0028SAMPLE000000028","01HQXK0031SAMPLE000000031"],startTime:"2024-01-16T14:00:00Z",endTime:"2024-01-16T14:26:00Z",context:{type:"support_ticket",resolution:"replacement_sent"}}],bob:[{id:"traj_bob_001",actor:"bob",status:"completed",outcome:"success",events:["01HQXK0011SAMPLE000000011","01HQXK0012SAMPLE000000012","01HQXK0014SAMPLE000000014","01HQXK0019SAMPLE000000019"],startTime:"2024-01-15T15:00:00Z",endTime:"2024-01-15T17:02:00Z",context:{type:"purchase_flow",value:1999}}],charlie:[{id:"traj_charlie_001",actor:"charlie",status:"completed",outcome:"partial",events:["01HQXK0034SAMPLE000000034","01HQXK0035SAMPLE000000035","01HQXK0036SAMPLE000000036","01HQXK0039SAMPLE000000039","01HQXK0043SAMPLE000000043"],startTime:"2024-01-17T10:00:00Z",endTime:"2024-01-17T16:00:00Z",context:{type:"abandoned_cart",cartValue:799.99}},{id:"traj_charlie_002",actor:"charlie",status:"completed",outcome:"success",events:["01HQXK0047SAMPLE000000047","01HQXK0048SAMPLE000000048"],startTime:"2024-01-18T14:00:00Z",endTime:"2024-01-18T14:05:00Z",context:{type:"purchase_flow",value:799.99,recovery:!0}}]},jv=[{id:"pat_001",sequence:["login","search","view","add_to_cart","purchase"],frequency:3,confidence:.85,support:.6,examples:["traj_alice_001","traj_bob_001","traj_charlie_002"],avgDurationMs:42e4,firstSeen:"2024-01-15T14:32:00Z",lastSeen:"2024-01-18T14:05:00Z"},{id:"pat_002",sequence:["search","view","view","add_to_cart"],frequency:2,confidence:.7,support:.4,examples:["traj_alice_001","traj_charlie_001"],avgDurationMs:3e5,firstSeen:"2024-01-15T14:33:00Z",lastSeen:"2024-01-17T10:15:00Z"},{id:"pat_003",sequence:["message","message","update"],frequency:2,confidence:.9,support:.4,examples:["traj_alice_002"],avgDurationMs:9e5,firstSeen:"2024-01-16T14:10:00Z",lastSeen:"2024-01-16T14:26:00Z"}],Cv=[{eventId:"01HQXK0043SAMPLE000000043",event:Fe.find(e=>e.id==="01HQXK0043SAMPLE000000043"),reason:"Cart abandoned without completing purchase - unusual for this user pattern",severity:"medium",expectedAction:"purchase",expectedActions:[{action:"purchase",probability:.75},{action:"view",probability:.15}],deviationScore:.65,context:{patternId:"pat_001",patternPosition:4},detectedAt:"2024-01-17T16:00:00Z"},{eventId:"01HQXK0018SAMPLE000000018",event:Fe.find(e=>e.id==="01HQXK0018SAMPLE000000018"),reason:"Item removed from cart after being added - potential hesitation",severity:"low",expectedAction:"purchase",expectedActions:[{action:"purchase",probability:.6},{action:"add_to_cart",probability:.25}],deviationScore:.4,detectedAt:"2024-01-15T17:00:00Z"}],Ev={actions:["login","search","view","add_to_cart","remove_from_cart","purchase","message","logout"],probabilities:[[0,.4,.3,0,0,0,.1,.2],[0,.1,.8,0,0,0,0,.1],[0,.2,.3,.4,0,0,0,.1],[0,.1,.1,.1,.1,.5,0,.1],[0,.1,.2,.3,0,.3,0,.1],[0,0,.1,0,0,0,.4,.5],[0,0,.1,0,0,0,.5,.4],[0,0,0,0,0,0,0,0]],counts:[[0,4,3,0,0,0,1,2],[0,1,8,0,0,0,0,1],[0,2,3,4,0,0,0,1],[0,1,1,1,1,5,0,1],[0,1,2,3,0,3,0,1],[0,0,1,0,0,0,4,5],[0,0,1,0,0,0,5,4],[0,0,0,0,0,0,0,0]],totalTransitions:75,computedAt:new Date().toISOString()},Tv=[{action:"view",probability:.65,suggestedContent:"User likely to view related products",confidence:.8,basedOn:["01HQXK0035SAMPLE000000035","01HQXK0036SAMPLE000000036"],expectedTimeMs:3e4},{action:"add_to_cart",probability:.45,suggestedContent:"High likelihood of adding viewed item to cart",confidence:.7,basedOn:["01HQXK0003SAMPLE000000003","01HQXK0005SAMPLE000000005"],expectedTimeMs:12e4},{action:"purchase",probability:.35,suggestedContent:"May proceed to checkout",confidence:.6,basedOn:["01HQXK0009SAMPLE000000009","01HQXK0019SAMPLE000000019"],expectedTimeMs:3e5}],o0={add:async()=>{throw new Error("Cannot add memories in preview mode")},retrieve:async e=>{const t=e.toLowerCase();return Fe.filter(n=>n.content.toLowerCase().includes(t)||n.action.toLowerCase().includes(t)||n.actor.toLowerCase().includes(t))},getAll:async(e=100)=>Fe.slice(0,e),getHistory:async(e,t=50)=>Fe.filter(n=>n.actor===e).slice(0,t),stats:async()=>{var e,t;return{totalEvents:Fe.length,uniqueActors:[...new Set(Fe.map(n=>n.actor))].length,oldestEvent:(e=Fe[Fe.length-1])==null?void 0:e.timestamp,newestEvent:(t=Fe[0])==null?void 0:t.timestamp,storageAdapter:"preview",embeddingProvider:"preview"}},subscribe:()=>()=>{},getTrajectories:async e=>dc[e]??[],getTrajectory:async e=>{for(const t of Object.values(dc)){const n=t.find(r=>r.id===e);if(n)return n}return null},detectPatterns:async e=>jv,findAnomalies:async e=>Cv,getTransitionProbabilities:async e=>Ev,predictNext:async e=>Tv,simulate:async(e,t,n)=>({proposedAction:t,proposedContext:n,likelyOutcome:t==="purchase"?"success":t==="logout"?"partial":"unknown",confidence:.72,similarPastCases:[{trajectoryId:"traj_alice_001",outcome:"success",similarity:.85,relevantEvents:["01HQXK0009SAMPLE000000009"]},{trajectoryId:"traj_bob_001",outcome:"success",similarity:.78,relevantEvents:["01HQXK0019SAMPLE000000019"]}],predictedFollowUp:[{action:"message",probability:.4,confidence:.6,basedOn:[]},{action:"view",probability:.3,confidence:.5,basedOn:[]}],riskAssessment:{level:"low",risks:[{description:"Cart abandonment risk",probability:.15},{description:"Payment failure risk",probability:.05}]},simulatedAt:new Date().toISOString()})};function Lv(){return s.jsx(i0,{aether:o0,title:"Aether Studio",previewMode:!0,previewMemories:Fe})}const hl="aether-studio-connection";function Iv(){const[e,t]=M.useState(null),[n,r]=M.useState(null),[i,o]=M.useState(!1),[l,a]=M.useState(!1),[u,c]=M.useState(!1),[d,g]=M.useState(null),[f,y]=M.useState(!1),[k,v]=M.useState(!1),w=M.useRef(!1);M.useEffect(()=>{if(w.current)return;w.current=!0,(async()=>{const _=window.location.origin;console.log("[Studio] Auto-connecting to:",_),c(!0);try{console.log("[Studio] Creating RemoteAether client...");const C=new fc({baseUrl:_});console.log("[Studio] Calling initialize()..."),await C.initialize(),console.log("[Studio] Initialize succeeded!"),t(C),r(_),o(!0),a(!0),c(!1),g(null),C.onConnectionChange(E=>{console.log("[Studio] Connection state changed:",E),o(E),g(E?null:"Connection lost")})}catch(C){console.error("[Studio] Auto-connect failed:",C);try{const E=localStorage.getItem(hl);if(E){const{url:j,apiKey:D}=JSON.parse(E);if(j&&j!==_){console.log("[Studio] Trying saved connection:",j),await p(j,D);return}}}catch{}console.log("[Studio] Showing connection screen"),v(!0),c(!1)}})()},[]);const p=M.useCallback(async(m,_)=>{c(!0),g(null),v(!1);const C=new fc({baseUrl:m,apiKey:_});try{await C.initialize(),t(C),r(m),o(!0),a(!0),g(null),C.onConnectionChange(E=>{o(E),g(E?null:"Connection lost")});try{localStorage.setItem(hl,JSON.stringify({url:m,apiKey:_}))}catch{}}catch(E){g(`Failed to connect to ${m}`),v(!0),console.error("Failed to initialize RemoteAether:",E)}finally{c(!1)}},[]),h=M.useCallback(()=>{e&&e.close(),t(null),r(null),o(!1),a(!1),g(null),v(!0);try{localStorage.removeItem(hl)}catch{}},[e]),x=M.useCallback(()=>{n&&e&&(g(null),e.initialize().catch(m=>{g("Failed to reconnect"),console.error("Reconnection failed:",m)}))},[n,e]);return u?s.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100vh",backgroundColor:"#f5f5f5",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'},children:[s.jsx("style",{children:"@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }"}),s.jsx("div",{style:{marginBottom:"24px",color:"#3b82f6"},children:s.jsx(da,{style:{width:48,height:48,animation:"spin 1s linear infinite"}})}),s.jsx("h1",{style:{marginBottom:"8px",fontSize:"24px",fontWeight:600,color:"#1a1a1a"},children:"Aether Studio"}),s.jsxs("p",{style:{fontSize:"14px",color:"#737373"},children:["Connecting to ",n||"server","..."]})]}):k||!e?s.jsx(wv,{onConnect:p,isConnecting:u,error:d}):s.jsx(i0,{aether:f?o0:e,title:"Aether Studio",subtitle:n?`Connected to ${n}`:void 0,previewMode:f,previewMemories:f?Fe:void 0,onPreviewToggle:y,onDisconnect:h,connection:f?void 0:{connected:i,error:d,onReconnect:x}})}const Mv=new URLSearchParams(window.location.search),zv=Mv.get("preview")==="true",Av=Ed(document.getElementById("root"));Av.render(s.jsx(Ss.StrictMode,{children:zv?s.jsx(Lv,{}):s.jsx(Iv,{})}));