@lydia-agent/cli 0.1.1 → 0.1.3
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,255 @@
|
|
|
1
|
+
var iu=e=>{throw TypeError(e)};var di=(e,t,r)=>t.has(e)||iu("Cannot "+r);var h=(e,t,r)=>(di(e,t,"read from private field"),r?r.call(e):t.get(e)),A=(e,t,r)=>t.has(e)?iu("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),R=(e,t,r,n)=>(di(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),B=(e,t,r)=>(di(e,t,"access private method"),r);var Qs=(e,t,r,n)=>({set _(s){R(e,t,s,r)},get _(){return h(e,t,n)}});(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const l of s)if(l.type==="childList")for(const a of l.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function r(s){const l={};return s.integrity&&(l.integrity=s.integrity),s.referrerPolicy&&(l.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?l.credentials="include":s.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function n(s){if(s.ep)return;s.ep=!0;const l=r(s);fetch(s.href,l)}})();function kh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ac={exports:{}},ql={},$c={exports:{}},K={};/**
|
|
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 Is=Symbol.for("react.element"),jh=Symbol.for("react.portal"),Sh=Symbol.for("react.fragment"),Nh=Symbol.for("react.strict_mode"),Ch=Symbol.for("react.profiler"),Eh=Symbol.for("react.provider"),bh=Symbol.for("react.context"),Ph=Symbol.for("react.forward_ref"),Th=Symbol.for("react.suspense"),Mh=Symbol.for("react.memo"),_h=Symbol.for("react.lazy"),au=Symbol.iterator;function Rh(e){return e===null||typeof e!="object"?null:(e=au&&e[au]||e["@@iterator"],typeof e=="function"?e:null)}var Uc={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Qc=Object.assign,Bc={};function Un(e,t,r){this.props=e,this.context=t,this.refs=Bc,this.updater=r||Uc}Un.prototype.isReactComponent={};Un.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")};Un.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Hc(){}Hc.prototype=Un.prototype;function Ja(e,t,r){this.props=e,this.context=t,this.refs=Bc,this.updater=r||Uc}var Za=Ja.prototype=new Hc;Za.constructor=Ja;Qc(Za,Un.prototype);Za.isPureReactComponent=!0;var ou=Array.isArray,Kc=Object.prototype.hasOwnProperty,eo={current:null},Vc={key:!0,ref:!0,__self:!0,__source:!0};function Wc(e,t,r){var n,s={},l=null,a=null;if(t!=null)for(n in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(l=""+t.key),t)Kc.call(t,n)&&!Vc.hasOwnProperty(n)&&(s[n]=t[n]);var o=arguments.length-2;if(o===1)s.children=r;else if(1<o){for(var u=Array(o),d=0;d<o;d++)u[d]=arguments[d+2];s.children=u}if(e&&e.defaultProps)for(n in o=e.defaultProps,o)s[n]===void 0&&(s[n]=o[n]);return{$$typeof:Is,type:e,key:l,ref:a,props:s,_owner:eo.current}}function Oh(e,t){return{$$typeof:Is,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function to(e){return typeof e=="object"&&e!==null&&e.$$typeof===Is}function zh(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var uu=/\/+/g;function fi(e,t){return typeof e=="object"&&e!==null&&e.key!=null?zh(""+e.key):t.toString(36)}function al(e,t,r,n,s){var l=typeof e;(l==="undefined"||l==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(l){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case Is:case jh:a=!0}}if(a)return a=e,s=s(a),e=n===""?"."+fi(a,0):n,ou(s)?(r="",e!=null&&(r=e.replace(uu,"$&/")+"/"),al(s,t,r,"",function(d){return d})):s!=null&&(to(s)&&(s=Oh(s,r+(!s.key||a&&a.key===s.key?"":(""+s.key).replace(uu,"$&/")+"/")+e)),t.push(s)),1;if(a=0,n=n===""?".":n+":",ou(e))for(var o=0;o<e.length;o++){l=e[o];var u=n+fi(l,o);a+=al(l,t,r,u,s)}else if(u=Rh(e),typeof u=="function")for(e=u.call(e),o=0;!(l=e.next()).done;)l=l.value,u=n+fi(l,o++),a+=al(l,t,r,u,s);else if(l==="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 a}function Bs(e,t,r){if(e==null)return e;var n=[],s=0;return al(e,n,"","",function(l){return t.call(r,l,s++)}),n}function Fh(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var De={current:null},ol={transition:null},Lh={ReactCurrentDispatcher:De,ReactCurrentBatchConfig:ol,ReactCurrentOwner:eo};function qc(){throw Error("act(...) is not supported in production builds of React.")}K.Children={map:Bs,forEach:function(e,t,r){Bs(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return Bs(e,function(){t++}),t},toArray:function(e){return Bs(e,function(t){return t})||[]},only:function(e){if(!to(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};K.Component=Un;K.Fragment=Sh;K.Profiler=Ch;K.PureComponent=Ja;K.StrictMode=Nh;K.Suspense=Th;K.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Lh;K.act=qc;K.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=Qc({},e.props),s=e.key,l=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(l=t.ref,a=eo.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var o=e.type.defaultProps;for(u in t)Kc.call(t,u)&&!Vc.hasOwnProperty(u)&&(n[u]=t[u]===void 0&&o!==void 0?o[u]:t[u])}var u=arguments.length-2;if(u===1)n.children=r;else if(1<u){o=Array(u);for(var d=0;d<u;d++)o[d]=arguments[d+2];n.children=o}return{$$typeof:Is,type:e.type,key:s,ref:l,props:n,_owner:a}};K.createContext=function(e){return e={$$typeof:bh,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Eh,_context:e},e.Consumer=e};K.createElement=Wc;K.createFactory=function(e){var t=Wc.bind(null,e);return t.type=e,t};K.createRef=function(){return{current:null}};K.forwardRef=function(e){return{$$typeof:Ph,render:e}};K.isValidElement=to;K.lazy=function(e){return{$$typeof:_h,_payload:{_status:-1,_result:e},_init:Fh}};K.memo=function(e,t){return{$$typeof:Mh,type:e,compare:t===void 0?null:t}};K.startTransition=function(e){var t=ol.transition;ol.transition={};try{e()}finally{ol.transition=t}};K.unstable_act=qc;K.useCallback=function(e,t){return De.current.useCallback(e,t)};K.useContext=function(e){return De.current.useContext(e)};K.useDebugValue=function(){};K.useDeferredValue=function(e){return De.current.useDeferredValue(e)};K.useEffect=function(e,t){return De.current.useEffect(e,t)};K.useId=function(){return De.current.useId()};K.useImperativeHandle=function(e,t,r){return De.current.useImperativeHandle(e,t,r)};K.useInsertionEffect=function(e,t){return De.current.useInsertionEffect(e,t)};K.useLayoutEffect=function(e,t){return De.current.useLayoutEffect(e,t)};K.useMemo=function(e,t){return De.current.useMemo(e,t)};K.useReducer=function(e,t,r){return De.current.useReducer(e,t,r)};K.useRef=function(e){return De.current.useRef(e)};K.useState=function(e){return De.current.useState(e)};K.useSyncExternalStore=function(e,t,r){return De.current.useSyncExternalStore(e,t,r)};K.useTransition=function(){return De.current.useTransition()};K.version="18.3.1";$c.exports=K;var j=$c.exports;const Ih=kh(j);/**
|
|
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 Dh=j,Ah=Symbol.for("react.element"),$h=Symbol.for("react.fragment"),Uh=Object.prototype.hasOwnProperty,Qh=Dh.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Bh={key:!0,ref:!0,__self:!0,__source:!0};function Gc(e,t,r){var n,s={},l=null,a=null;r!==void 0&&(l=""+r),t.key!==void 0&&(l=""+t.key),t.ref!==void 0&&(a=t.ref);for(n in t)Uh.call(t,n)&&!Bh.hasOwnProperty(n)&&(s[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)s[n]===void 0&&(s[n]=t[n]);return{$$typeof:Ah,type:e,key:l,ref:a,props:s,_owner:Qh.current}}ql.Fragment=$h;ql.jsx=Gc;ql.jsxs=Gc;Ac.exports=ql;var i=Ac.exports,$i={},Xc={exports:{}},tt={},Yc={exports:{}},Jc={};/**
|
|
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(M,L){var D=M.length;M.push(L);e:for(;0<D;){var H=D-1>>>1,E=M[H];if(0<s(E,L))M[H]=L,M[D]=E,D=H;else break e}}function r(M){return M.length===0?null:M[0]}function n(M){if(M.length===0)return null;var L=M[0],D=M.pop();if(D!==L){M[0]=D;e:for(var H=0,E=M.length,$=E>>>1;H<$;){var Q=2*(H+1)-1,Pe=M[Q],pe=Q+1,ye=M[pe];if(0>s(Pe,D))pe<E&&0>s(ye,Pe)?(M[H]=ye,M[pe]=D,H=pe):(M[H]=Pe,M[Q]=D,H=Q);else if(pe<E&&0>s(ye,D))M[H]=ye,M[pe]=D,H=pe;else break e}}return L}function s(M,L){var D=M.sortIndex-L.sortIndex;return D!==0?D:M.id-L.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var a=Date,o=a.now();e.unstable_now=function(){return a.now()-o}}var u=[],d=[],y=1,m=null,x=3,k=!1,v=!1,w=!1,T=typeof setTimeout=="function"?setTimeout:null,c=typeof clearTimeout=="function"?clearTimeout:null,f=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function p(M){for(var L=r(d);L!==null;){if(L.callback===null)n(d);else if(L.startTime<=M)n(d),L.sortIndex=L.expirationTime,t(u,L);else break;L=r(d)}}function g(M){if(w=!1,p(M),!v)if(r(u)!==null)v=!0,_(b);else{var L=r(d);L!==null&&U(g,L.startTime-M)}}function b(M,L){v=!1,w&&(w=!1,c(C),C=-1),k=!0;var D=x;try{for(p(L),m=r(u);m!==null&&(!(m.expirationTime>L)||M&&!G());){var H=m.callback;if(typeof H=="function"){m.callback=null,x=m.priorityLevel;var E=H(m.expirationTime<=L);L=e.unstable_now(),typeof E=="function"?m.callback=E:m===r(u)&&n(u),p(L)}else n(u);m=r(u)}if(m!==null)var $=!0;else{var Q=r(d);Q!==null&&U(g,Q.startTime-L),$=!1}return $}finally{m=null,x=D,k=!1}}var S=!1,N=null,C=-1,z=5,O=-1;function G(){return!(e.unstable_now()-O<z)}function Y(){if(N!==null){var M=e.unstable_now();O=M;var L=!0;try{L=N(!0,M)}finally{L?te():(S=!1,N=null)}}else S=!1}var te;if(typeof f=="function")te=function(){f(Y)};else if(typeof MessageChannel<"u"){var q=new MessageChannel,re=q.port2;q.port1.onmessage=Y,te=function(){re.postMessage(null)}}else te=function(){T(Y,0)};function _(M){N=M,S||(S=!0,te())}function U(M,L){C=T(function(){M(e.unstable_now())},L)}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(M){M.callback=null},e.unstable_continueExecution=function(){v||k||(v=!0,_(b))},e.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):z=0<M?Math.floor(1e3/M):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_getFirstCallbackNode=function(){return r(u)},e.unstable_next=function(M){switch(x){case 1:case 2:case 3:var L=3;break;default:L=x}var D=x;x=L;try{return M()}finally{x=D}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(M,L){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var D=x;x=M;try{return L()}finally{x=D}},e.unstable_scheduleCallback=function(M,L,D){var H=e.unstable_now();switch(typeof D=="object"&&D!==null?(D=D.delay,D=typeof D=="number"&&0<D?H+D:H):D=H,M){case 1:var E=-1;break;case 2:E=250;break;case 5:E=1073741823;break;case 4:E=1e4;break;default:E=5e3}return E=D+E,M={id:y++,callback:L,priorityLevel:M,startTime:D,expirationTime:E,sortIndex:-1},D>H?(M.sortIndex=D,t(d,M),r(u)===null&&M===r(d)&&(w?(c(C),C=-1):w=!0,U(g,D-H))):(M.sortIndex=E,t(u,M),v||k||(v=!0,_(b))),M},e.unstable_shouldYield=G,e.unstable_wrapCallback=function(M){var L=x;return function(){var D=x;x=L;try{return M.apply(this,arguments)}finally{x=D}}}})(Jc);Yc.exports=Jc;var Hh=Yc.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 Kh=j,et=Hh;function P(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);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 Zc=new Set,hs={};function en(e,t){zn(e,t),zn(e+"Capture",t)}function zn(e,t){for(hs[e]=t,e=0;e<t.length;e++)Zc.add(t[e])}var Qt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ui=Object.prototype.hasOwnProperty,Vh=/^[: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]*$/,cu={},du={};function Wh(e){return Ui.call(du,e)?!0:Ui.call(cu,e)?!1:Vh.test(e)?du[e]=!0:(cu[e]=!0,!1)}function qh(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Gh(e,t,r,n){if(t===null||typeof t>"u"||qh(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.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 Ae(e,t,r,n,s,l,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=s,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=l,this.removeEmptyString=a}var be={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){be[e]=new Ae(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];be[t]=new Ae(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){be[e]=new Ae(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){be[e]=new Ae(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){be[e]=new Ae(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){be[e]=new Ae(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){be[e]=new Ae(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){be[e]=new Ae(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){be[e]=new Ae(e,5,!1,e.toLowerCase(),null,!1,!1)});var ro=/[\-:]([a-z])/g;function no(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(ro,no);be[t]=new Ae(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(ro,no);be[t]=new Ae(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(ro,no);be[t]=new Ae(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){be[e]=new Ae(e,1,!1,e.toLowerCase(),null,!1,!1)});be.xlinkHref=new Ae("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){be[e]=new Ae(e,1,!1,e.toLowerCase(),null,!0,!0)});function so(e,t,r,n){var s=be.hasOwnProperty(t)?be[t]:null;(s!==null?s.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Gh(t,r,s,n)&&(r=null),n||s===null?Wh(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):s.mustUseProperty?e[s.propertyName]=r===null?s.type===3?!1:"":r:(t=s.attributeName,n=s.attributeNamespace,r===null?e.removeAttribute(t):(s=s.type,r=s===3||s===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var Vt=Kh.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Hs=Symbol.for("react.element"),nn=Symbol.for("react.portal"),sn=Symbol.for("react.fragment"),lo=Symbol.for("react.strict_mode"),Qi=Symbol.for("react.profiler"),ed=Symbol.for("react.provider"),td=Symbol.for("react.context"),io=Symbol.for("react.forward_ref"),Bi=Symbol.for("react.suspense"),Hi=Symbol.for("react.suspense_list"),ao=Symbol.for("react.memo"),Gt=Symbol.for("react.lazy"),rd=Symbol.for("react.offscreen"),fu=Symbol.iterator;function Kn(e){return e===null||typeof e!="object"?null:(e=fu&&e[fu]||e["@@iterator"],typeof e=="function"?e:null)}var ce=Object.assign,hi;function Zn(e){if(hi===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);hi=t&&t[1]||""}return`
|
|
34
|
+
`+hi+e}var pi=!1;function mi(e,t){if(!e||pi)return"";pi=!0;var r=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(d){var n=d}Reflect.construct(e,[],t)}else{try{t.call()}catch(d){n=d}e.call(t.prototype)}else{try{throw Error()}catch(d){n=d}e()}}catch(d){if(d&&n&&typeof d.stack=="string"){for(var s=d.stack.split(`
|
|
35
|
+
`),l=n.stack.split(`
|
|
36
|
+
`),a=s.length-1,o=l.length-1;1<=a&&0<=o&&s[a]!==l[o];)o--;for(;1<=a&&0<=o;a--,o--)if(s[a]!==l[o]){if(a!==1||o!==1)do if(a--,o--,0>o||s[a]!==l[o]){var u=`
|
|
37
|
+
`+s[a].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=a&&0<=o);break}}}finally{pi=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Zn(e):""}function Xh(e){switch(e.tag){case 5:return Zn(e.type);case 16:return Zn("Lazy");case 13:return Zn("Suspense");case 19:return Zn("SuspenseList");case 0:case 2:case 15:return e=mi(e.type,!1),e;case 11:return e=mi(e.type.render,!1),e;case 1:return e=mi(e.type,!0),e;default:return""}}function Ki(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 sn:return"Fragment";case nn:return"Portal";case Qi:return"Profiler";case lo:return"StrictMode";case Bi:return"Suspense";case Hi:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case td:return(e.displayName||"Context")+".Consumer";case ed:return(e._context.displayName||"Context")+".Provider";case io:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ao:return t=e.displayName||null,t!==null?t:Ki(e.type)||"Memo";case Gt:t=e._payload,e=e._init;try{return Ki(e(t))}catch{}}return null}function Yh(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 Ki(t);case 8:return t===lo?"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 gr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function nd(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Jh(e){var t=nd(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var s=r.get,l=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(a){n=""+a,l.call(this,a)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(a){n=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ks(e){e._valueTracker||(e._valueTracker=Jh(e))}function sd(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=nd(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function kl(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 Vi(e,t){var r=t.checked;return ce({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function hu(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=gr(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function ld(e,t){t=t.checked,t!=null&&so(e,"checked",t,!1)}function Wi(e,t){ld(e,t);var r=gr(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?qi(e,t.type,r):t.hasOwnProperty("defaultValue")&&qi(e,t.type,gr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function pu(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function qi(e,t,r){(t!=="number"||kl(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var es=Array.isArray;function yn(e,t,r,n){if(e=e.options,t){t={};for(var s=0;s<r.length;s++)t["$"+r[s]]=!0;for(r=0;r<e.length;r++)s=t.hasOwnProperty("$"+e[r].value),e[r].selected!==s&&(e[r].selected=s),s&&n&&(e[r].defaultSelected=!0)}else{for(r=""+gr(r),t=null,s=0;s<e.length;s++){if(e[s].value===r){e[s].selected=!0,n&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function Gi(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(P(91));return ce({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function mu(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(P(92));if(es(r)){if(1<r.length)throw Error(P(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:gr(r)}}function id(e,t){var r=gr(t.value),n=gr(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function yu(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function ad(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 Xi(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?ad(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Vs,od=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,s){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Vs=Vs||document.createElement("div"),Vs.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Vs.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ps(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var ss={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},Zh=["Webkit","ms","Moz","O"];Object.keys(ss).forEach(function(e){Zh.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ss[t]=ss[e]})});function ud(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||ss.hasOwnProperty(e)&&ss[e]?(""+t).trim():t+"px"}function cd(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=ud(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,s):e[r]=s}}var ep=ce({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 Yi(e,t){if(t){if(ep[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(P(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(P(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(P(61))}if(t.style!=null&&typeof t.style!="object")throw Error(P(62))}}function Ji(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 Zi=null;function oo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ea=null,xn=null,vn=null;function xu(e){if(e=$s(e)){if(typeof ea!="function")throw Error(P(280));var t=e.stateNode;t&&(t=Zl(t),ea(e.stateNode,e.type,t))}}function dd(e){xn?vn?vn.push(e):vn=[e]:xn=e}function fd(){if(xn){var e=xn,t=vn;if(vn=xn=null,xu(e),t)for(e=0;e<t.length;e++)xu(t[e])}}function hd(e,t){return e(t)}function pd(){}var yi=!1;function md(e,t,r){if(yi)return e(t,r);yi=!0;try{return hd(e,t,r)}finally{yi=!1,(xn!==null||vn!==null)&&(pd(),fd())}}function ms(e,t){var r=e.stateNode;if(r===null)return null;var n=Zl(r);if(n===null)return null;r=n[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":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(P(231,t,typeof r));return r}var ta=!1;if(Qt)try{var Vn={};Object.defineProperty(Vn,"passive",{get:function(){ta=!0}}),window.addEventListener("test",Vn,Vn),window.removeEventListener("test",Vn,Vn)}catch{ta=!1}function tp(e,t,r,n,s,l,a,o,u){var d=Array.prototype.slice.call(arguments,3);try{t.apply(r,d)}catch(y){this.onError(y)}}var ls=!1,jl=null,Sl=!1,ra=null,rp={onError:function(e){ls=!0,jl=e}};function np(e,t,r,n,s,l,a,o,u){ls=!1,jl=null,tp.apply(rp,arguments)}function sp(e,t,r,n,s,l,a,o,u){if(np.apply(this,arguments),ls){if(ls){var d=jl;ls=!1,jl=null}else throw Error(P(198));Sl||(Sl=!0,ra=d)}}function tn(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function yd(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 vu(e){if(tn(e)!==e)throw Error(P(188))}function lp(e){var t=e.alternate;if(!t){if(t=tn(e),t===null)throw Error(P(188));return t!==e?null:e}for(var r=e,n=t;;){var s=r.return;if(s===null)break;var l=s.alternate;if(l===null){if(n=s.return,n!==null){r=n;continue}break}if(s.child===l.child){for(l=s.child;l;){if(l===r)return vu(s),e;if(l===n)return vu(s),t;l=l.sibling}throw Error(P(188))}if(r.return!==n.return)r=s,n=l;else{for(var a=!1,o=s.child;o;){if(o===r){a=!0,r=s,n=l;break}if(o===n){a=!0,n=s,r=l;break}o=o.sibling}if(!a){for(o=l.child;o;){if(o===r){a=!0,r=l,n=s;break}if(o===n){a=!0,n=l,r=s;break}o=o.sibling}if(!a)throw Error(P(189))}}if(r.alternate!==n)throw Error(P(190))}if(r.tag!==3)throw Error(P(188));return r.stateNode.current===r?e:t}function xd(e){return e=lp(e),e!==null?vd(e):null}function vd(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=vd(e);if(t!==null)return t;e=e.sibling}return null}var gd=et.unstable_scheduleCallback,gu=et.unstable_cancelCallback,ip=et.unstable_shouldYield,ap=et.unstable_requestPaint,me=et.unstable_now,op=et.unstable_getCurrentPriorityLevel,uo=et.unstable_ImmediatePriority,wd=et.unstable_UserBlockingPriority,Nl=et.unstable_NormalPriority,up=et.unstable_LowPriority,kd=et.unstable_IdlePriority,Gl=null,bt=null;function cp(e){if(bt&&typeof bt.onCommitFiberRoot=="function")try{bt.onCommitFiberRoot(Gl,e,void 0,(e.current.flags&128)===128)}catch{}}var vt=Math.clz32?Math.clz32:hp,dp=Math.log,fp=Math.LN2;function hp(e){return e>>>=0,e===0?32:31-(dp(e)/fp|0)|0}var Ws=64,qs=4194304;function ts(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 Cl(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,s=e.suspendedLanes,l=e.pingedLanes,a=r&268435455;if(a!==0){var o=a&~s;o!==0?n=ts(o):(l&=a,l!==0&&(n=ts(l)))}else a=r&~s,a!==0?n=ts(a):l!==0&&(n=ts(l));if(n===0)return 0;if(t!==0&&t!==n&&!(t&s)&&(s=n&-n,l=t&-t,s>=l||s===16&&(l&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-vt(t),s=1<<r,n|=e[r],t&=~s;return n}function pp(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 mp(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,s=e.expirationTimes,l=e.pendingLanes;0<l;){var a=31-vt(l),o=1<<a,u=s[a];u===-1?(!(o&r)||o&n)&&(s[a]=pp(o,t)):u<=t&&(e.expiredLanes|=o),l&=~o}}function na(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function jd(){var e=Ws;return Ws<<=1,!(Ws&4194240)&&(Ws=64),e}function xi(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function Ds(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-vt(t),e[t]=r}function yp(e,t){var r=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 n=e.eventTimes;for(e=e.expirationTimes;0<r;){var s=31-vt(r),l=1<<s;t[s]=0,n[s]=-1,e[s]=-1,r&=~l}}function co(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-vt(r),s=1<<n;s&t|e[n]&t&&(e[n]|=t),r&=~s}}var ee=0;function Sd(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Nd,fo,Cd,Ed,bd,sa=!1,Gs=[],cr=null,dr=null,fr=null,ys=new Map,xs=new Map,Yt=[],xp="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 wu(e,t){switch(e){case"focusin":case"focusout":cr=null;break;case"dragenter":case"dragleave":dr=null;break;case"mouseover":case"mouseout":fr=null;break;case"pointerover":case"pointerout":ys.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":xs.delete(t.pointerId)}}function Wn(e,t,r,n,s,l){return e===null||e.nativeEvent!==l?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:l,targetContainers:[s]},t!==null&&(t=$s(t),t!==null&&fo(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function vp(e,t,r,n,s){switch(t){case"focusin":return cr=Wn(cr,e,t,r,n,s),!0;case"dragenter":return dr=Wn(dr,e,t,r,n,s),!0;case"mouseover":return fr=Wn(fr,e,t,r,n,s),!0;case"pointerover":var l=s.pointerId;return ys.set(l,Wn(ys.get(l)||null,e,t,r,n,s)),!0;case"gotpointercapture":return l=s.pointerId,xs.set(l,Wn(xs.get(l)||null,e,t,r,n,s)),!0}return!1}function Pd(e){var t=_r(e.target);if(t!==null){var r=tn(t);if(r!==null){if(t=r.tag,t===13){if(t=yd(r),t!==null){e.blockedOn=t,bd(e.priority,function(){Cd(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ul(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=la(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);Zi=n,r.target.dispatchEvent(n),Zi=null}else return t=$s(r),t!==null&&fo(t),e.blockedOn=r,!1;t.shift()}return!0}function ku(e,t,r){ul(e)&&r.delete(t)}function gp(){sa=!1,cr!==null&&ul(cr)&&(cr=null),dr!==null&&ul(dr)&&(dr=null),fr!==null&&ul(fr)&&(fr=null),ys.forEach(ku),xs.forEach(ku)}function qn(e,t){e.blockedOn===t&&(e.blockedOn=null,sa||(sa=!0,et.unstable_scheduleCallback(et.unstable_NormalPriority,gp)))}function vs(e){function t(s){return qn(s,e)}if(0<Gs.length){qn(Gs[0],e);for(var r=1;r<Gs.length;r++){var n=Gs[r];n.blockedOn===e&&(n.blockedOn=null)}}for(cr!==null&&qn(cr,e),dr!==null&&qn(dr,e),fr!==null&&qn(fr,e),ys.forEach(t),xs.forEach(t),r=0;r<Yt.length;r++)n=Yt[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<Yt.length&&(r=Yt[0],r.blockedOn===null);)Pd(r),r.blockedOn===null&&Yt.shift()}var gn=Vt.ReactCurrentBatchConfig,El=!0;function wp(e,t,r,n){var s=ee,l=gn.transition;gn.transition=null;try{ee=1,ho(e,t,r,n)}finally{ee=s,gn.transition=l}}function kp(e,t,r,n){var s=ee,l=gn.transition;gn.transition=null;try{ee=4,ho(e,t,r,n)}finally{ee=s,gn.transition=l}}function ho(e,t,r,n){if(El){var s=la(e,t,r,n);if(s===null)bi(e,t,n,bl,r),wu(e,n);else if(vp(s,e,t,r,n))n.stopPropagation();else if(wu(e,n),t&4&&-1<xp.indexOf(e)){for(;s!==null;){var l=$s(s);if(l!==null&&Nd(l),l=la(e,t,r,n),l===null&&bi(e,t,n,bl,r),l===s)break;s=l}s!==null&&n.stopPropagation()}else bi(e,t,n,null,r)}}var bl=null;function la(e,t,r,n){if(bl=null,e=oo(n),e=_r(e),e!==null)if(t=tn(e),t===null)e=null;else if(r=t.tag,r===13){if(e=yd(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return bl=e,null}function Td(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(op()){case uo:return 1;case wd:return 4;case Nl:case up:return 16;case kd:return 536870912;default:return 16}default:return 16}}var or=null,po=null,cl=null;function Md(){if(cl)return cl;var e,t=po,r=t.length,n,s="value"in or?or.value:or.textContent,l=s.length;for(e=0;e<r&&t[e]===s[e];e++);var a=r-e;for(n=1;n<=a&&t[r-n]===s[l-n];n++);return cl=s.slice(e,1<n?1-n:void 0)}function dl(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 Xs(){return!0}function ju(){return!1}function rt(e){function t(r,n,s,l,a){this._reactName=r,this._targetInst=s,this.type=n,this.nativeEvent=l,this.target=a,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(r=e[o],this[o]=r?r(l):l[o]);return this.isDefaultPrevented=(l.defaultPrevented!=null?l.defaultPrevented:l.returnValue===!1)?Xs:ju,this.isPropagationStopped=ju,this}return ce(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Xs)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Xs)},persist:function(){},isPersistent:Xs}),t}var Qn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},mo=rt(Qn),As=ce({},Qn,{view:0,detail:0}),jp=rt(As),vi,gi,Gn,Xl=ce({},As,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:yo,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!==Gn&&(Gn&&e.type==="mousemove"?(vi=e.screenX-Gn.screenX,gi=e.screenY-Gn.screenY):gi=vi=0,Gn=e),vi)},movementY:function(e){return"movementY"in e?e.movementY:gi}}),Su=rt(Xl),Sp=ce({},Xl,{dataTransfer:0}),Np=rt(Sp),Cp=ce({},As,{relatedTarget:0}),wi=rt(Cp),Ep=ce({},Qn,{animationName:0,elapsedTime:0,pseudoElement:0}),bp=rt(Ep),Pp=ce({},Qn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Tp=rt(Pp),Mp=ce({},Qn,{data:0}),Nu=rt(Mp),_p={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Rp={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"},Op={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function zp(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Op[e])?!!t[e]:!1}function yo(){return zp}var Fp=ce({},As,{key:function(e){if(e.key){var t=_p[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=dl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Rp[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:yo,charCode:function(e){return e.type==="keypress"?dl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?dl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Lp=rt(Fp),Ip=ce({},Xl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Cu=rt(Ip),Dp=ce({},As,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:yo}),Ap=rt(Dp),$p=ce({},Qn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Up=rt($p),Qp=ce({},Xl,{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}),Bp=rt(Qp),Hp=[9,13,27,32],xo=Qt&&"CompositionEvent"in window,is=null;Qt&&"documentMode"in document&&(is=document.documentMode);var Kp=Qt&&"TextEvent"in window&&!is,_d=Qt&&(!xo||is&&8<is&&11>=is),Eu=" ",bu=!1;function Rd(e,t){switch(e){case"keyup":return Hp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Od(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ln=!1;function Vp(e,t){switch(e){case"compositionend":return Od(t);case"keypress":return t.which!==32?null:(bu=!0,Eu);case"textInput":return e=t.data,e===Eu&&bu?null:e;default:return null}}function Wp(e,t){if(ln)return e==="compositionend"||!xo&&Rd(e,t)?(e=Md(),cl=po=or=null,ln=!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 _d&&t.locale!=="ko"?null:t.data;default:return null}}var qp={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 Pu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!qp[e.type]:t==="textarea"}function zd(e,t,r,n){dd(n),t=Pl(t,"onChange"),0<t.length&&(r=new mo("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var as=null,gs=null;function Gp(e){Kd(e,0)}function Yl(e){var t=un(e);if(sd(t))return e}function Xp(e,t){if(e==="change")return t}var Fd=!1;if(Qt){var ki;if(Qt){var ji="oninput"in document;if(!ji){var Tu=document.createElement("div");Tu.setAttribute("oninput","return;"),ji=typeof Tu.oninput=="function"}ki=ji}else ki=!1;Fd=ki&&(!document.documentMode||9<document.documentMode)}function Mu(){as&&(as.detachEvent("onpropertychange",Ld),gs=as=null)}function Ld(e){if(e.propertyName==="value"&&Yl(gs)){var t=[];zd(t,gs,e,oo(e)),md(Gp,t)}}function Yp(e,t,r){e==="focusin"?(Mu(),as=t,gs=r,as.attachEvent("onpropertychange",Ld)):e==="focusout"&&Mu()}function Jp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Yl(gs)}function Zp(e,t){if(e==="click")return Yl(t)}function em(e,t){if(e==="input"||e==="change")return Yl(t)}function tm(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var wt=typeof Object.is=="function"?Object.is:tm;function ws(e,t){if(wt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var s=r[n];if(!Ui.call(t,s)||!wt(e[s],t[s]))return!1}return!0}function _u(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ru(e,t){var r=_u(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=_u(r)}}function Id(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Id(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Dd(){for(var e=window,t=kl();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=kl(e.document)}return t}function vo(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 rm(e){var t=Dd(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&Id(r.ownerDocument.documentElement,r)){if(n!==null&&vo(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=r.textContent.length,l=Math.min(n.start,s);n=n.end===void 0?l:Math.min(n.end,s),!e.extend&&l>n&&(s=n,n=l,l=s),s=Ru(r,l);var a=Ru(r,n);s&&a&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),l>n?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var nm=Qt&&"documentMode"in document&&11>=document.documentMode,an=null,ia=null,os=null,aa=!1;function Ou(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;aa||an==null||an!==kl(n)||(n=an,"selectionStart"in n&&vo(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),os&&ws(os,n)||(os=n,n=Pl(ia,"onSelect"),0<n.length&&(t=new mo("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=an)))}function Ys(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var on={animationend:Ys("Animation","AnimationEnd"),animationiteration:Ys("Animation","AnimationIteration"),animationstart:Ys("Animation","AnimationStart"),transitionend:Ys("Transition","TransitionEnd")},Si={},Ad={};Qt&&(Ad=document.createElement("div").style,"AnimationEvent"in window||(delete on.animationend.animation,delete on.animationiteration.animation,delete on.animationstart.animation),"TransitionEvent"in window||delete on.transitionend.transition);function Jl(e){if(Si[e])return Si[e];if(!on[e])return e;var t=on[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in Ad)return Si[e]=t[r];return e}var $d=Jl("animationend"),Ud=Jl("animationiteration"),Qd=Jl("animationstart"),Bd=Jl("transitionend"),Hd=new Map,zu="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 kr(e,t){Hd.set(e,t),en(t,[e])}for(var Ni=0;Ni<zu.length;Ni++){var Ci=zu[Ni],sm=Ci.toLowerCase(),lm=Ci[0].toUpperCase()+Ci.slice(1);kr(sm,"on"+lm)}kr($d,"onAnimationEnd");kr(Ud,"onAnimationIteration");kr(Qd,"onAnimationStart");kr("dblclick","onDoubleClick");kr("focusin","onFocus");kr("focusout","onBlur");kr(Bd,"onTransitionEnd");zn("onMouseEnter",["mouseout","mouseover"]);zn("onMouseLeave",["mouseout","mouseover"]);zn("onPointerEnter",["pointerout","pointerover"]);zn("onPointerLeave",["pointerout","pointerover"]);en("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));en("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));en("onBeforeInput",["compositionend","keypress","textInput","paste"]);en("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));en("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));en("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var rs="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),im=new Set("cancel close invalid load scroll toggle".split(" ").concat(rs));function Fu(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,sp(n,t,void 0,e),e.currentTarget=null}function Kd(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],s=n.event;n=n.listeners;e:{var l=void 0;if(t)for(var a=n.length-1;0<=a;a--){var o=n[a],u=o.instance,d=o.currentTarget;if(o=o.listener,u!==l&&s.isPropagationStopped())break e;Fu(s,o,d),l=u}else for(a=0;a<n.length;a++){if(o=n[a],u=o.instance,d=o.currentTarget,o=o.listener,u!==l&&s.isPropagationStopped())break e;Fu(s,o,d),l=u}}}if(Sl)throw e=ra,Sl=!1,ra=null,e}function le(e,t){var r=t[fa];r===void 0&&(r=t[fa]=new Set);var n=e+"__bubble";r.has(n)||(Vd(t,e,2,!1),r.add(n))}function Ei(e,t,r){var n=0;t&&(n|=4),Vd(r,e,n,t)}var Js="_reactListening"+Math.random().toString(36).slice(2);function ks(e){if(!e[Js]){e[Js]=!0,Zc.forEach(function(r){r!=="selectionchange"&&(im.has(r)||Ei(r,!1,e),Ei(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Js]||(t[Js]=!0,Ei("selectionchange",!1,t))}}function Vd(e,t,r,n){switch(Td(t)){case 1:var s=wp;break;case 4:s=kp;break;default:s=ho}r=s.bind(null,t,r,e),s=void 0,!ta||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),n?s!==void 0?e.addEventListener(t,r,{capture:!0,passive:s}):e.addEventListener(t,r,!0):s!==void 0?e.addEventListener(t,r,{passive:s}):e.addEventListener(t,r,!1)}function bi(e,t,r,n,s){var l=n;if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var a=n.tag;if(a===3||a===4){var o=n.stateNode.containerInfo;if(o===s||o.nodeType===8&&o.parentNode===s)break;if(a===4)for(a=n.return;a!==null;){var u=a.tag;if((u===3||u===4)&&(u=a.stateNode.containerInfo,u===s||u.nodeType===8&&u.parentNode===s))return;a=a.return}for(;o!==null;){if(a=_r(o),a===null)return;if(u=a.tag,u===5||u===6){n=l=a;continue e}o=o.parentNode}}n=n.return}md(function(){var d=l,y=oo(r),m=[];e:{var x=Hd.get(e);if(x!==void 0){var k=mo,v=e;switch(e){case"keypress":if(dl(r)===0)break e;case"keydown":case"keyup":k=Lp;break;case"focusin":v="focus",k=wi;break;case"focusout":v="blur",k=wi;break;case"beforeblur":case"afterblur":k=wi;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":k=Su;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":k=Np;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":k=Ap;break;case $d:case Ud:case Qd:k=bp;break;case Bd:k=Up;break;case"scroll":k=jp;break;case"wheel":k=Bp;break;case"copy":case"cut":case"paste":k=Tp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":k=Cu}var w=(t&4)!==0,T=!w&&e==="scroll",c=w?x!==null?x+"Capture":null:x;w=[];for(var f=d,p;f!==null;){p=f;var g=p.stateNode;if(p.tag===5&&g!==null&&(p=g,c!==null&&(g=ms(f,c),g!=null&&w.push(js(f,g,p)))),T)break;f=f.return}0<w.length&&(x=new k(x,v,null,r,y),m.push({event:x,listeners:w}))}}if(!(t&7)){e:{if(x=e==="mouseover"||e==="pointerover",k=e==="mouseout"||e==="pointerout",x&&r!==Zi&&(v=r.relatedTarget||r.fromElement)&&(_r(v)||v[Bt]))break e;if((k||x)&&(x=y.window===y?y:(x=y.ownerDocument)?x.defaultView||x.parentWindow:window,k?(v=r.relatedTarget||r.toElement,k=d,v=v?_r(v):null,v!==null&&(T=tn(v),v!==T||v.tag!==5&&v.tag!==6)&&(v=null)):(k=null,v=d),k!==v)){if(w=Su,g="onMouseLeave",c="onMouseEnter",f="mouse",(e==="pointerout"||e==="pointerover")&&(w=Cu,g="onPointerLeave",c="onPointerEnter",f="pointer"),T=k==null?x:un(k),p=v==null?x:un(v),x=new w(g,f+"leave",k,r,y),x.target=T,x.relatedTarget=p,g=null,_r(y)===d&&(w=new w(c,f+"enter",v,r,y),w.target=p,w.relatedTarget=T,g=w),T=g,k&&v)t:{for(w=k,c=v,f=0,p=w;p;p=rn(p))f++;for(p=0,g=c;g;g=rn(g))p++;for(;0<f-p;)w=rn(w),f--;for(;0<p-f;)c=rn(c),p--;for(;f--;){if(w===c||c!==null&&w===c.alternate)break t;w=rn(w),c=rn(c)}w=null}else w=null;k!==null&&Lu(m,x,k,w,!1),v!==null&&T!==null&&Lu(m,T,v,w,!0)}}e:{if(x=d?un(d):window,k=x.nodeName&&x.nodeName.toLowerCase(),k==="select"||k==="input"&&x.type==="file")var b=Xp;else if(Pu(x))if(Fd)b=em;else{b=Jp;var S=Yp}else(k=x.nodeName)&&k.toLowerCase()==="input"&&(x.type==="checkbox"||x.type==="radio")&&(b=Zp);if(b&&(b=b(e,d))){zd(m,b,r,y);break e}S&&S(e,x,d),e==="focusout"&&(S=x._wrapperState)&&S.controlled&&x.type==="number"&&qi(x,"number",x.value)}switch(S=d?un(d):window,e){case"focusin":(Pu(S)||S.contentEditable==="true")&&(an=S,ia=d,os=null);break;case"focusout":os=ia=an=null;break;case"mousedown":aa=!0;break;case"contextmenu":case"mouseup":case"dragend":aa=!1,Ou(m,r,y);break;case"selectionchange":if(nm)break;case"keydown":case"keyup":Ou(m,r,y)}var N;if(xo)e:{switch(e){case"compositionstart":var C="onCompositionStart";break e;case"compositionend":C="onCompositionEnd";break e;case"compositionupdate":C="onCompositionUpdate";break e}C=void 0}else ln?Rd(e,r)&&(C="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(C="onCompositionStart");C&&(_d&&r.locale!=="ko"&&(ln||C!=="onCompositionStart"?C==="onCompositionEnd"&&ln&&(N=Md()):(or=y,po="value"in or?or.value:or.textContent,ln=!0)),S=Pl(d,C),0<S.length&&(C=new Nu(C,e,null,r,y),m.push({event:C,listeners:S}),N?C.data=N:(N=Od(r),N!==null&&(C.data=N)))),(N=Kp?Vp(e,r):Wp(e,r))&&(d=Pl(d,"onBeforeInput"),0<d.length&&(y=new Nu("onBeforeInput","beforeinput",null,r,y),m.push({event:y,listeners:d}),y.data=N))}Kd(m,t)})}function js(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Pl(e,t){for(var r=t+"Capture",n=[];e!==null;){var s=e,l=s.stateNode;s.tag===5&&l!==null&&(s=l,l=ms(e,r),l!=null&&n.unshift(js(e,l,s)),l=ms(e,t),l!=null&&n.push(js(e,l,s))),e=e.return}return n}function rn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Lu(e,t,r,n,s){for(var l=t._reactName,a=[];r!==null&&r!==n;){var o=r,u=o.alternate,d=o.stateNode;if(u!==null&&u===n)break;o.tag===5&&d!==null&&(o=d,s?(u=ms(r,l),u!=null&&a.unshift(js(r,u,o))):s||(u=ms(r,l),u!=null&&a.push(js(r,u,o)))),r=r.return}a.length!==0&&e.push({event:t,listeners:a})}var am=/\r\n?/g,om=/\u0000|\uFFFD/g;function Iu(e){return(typeof e=="string"?e:""+e).replace(am,`
|
|
38
|
+
`).replace(om,"")}function Zs(e,t,r){if(t=Iu(t),Iu(e)!==t&&r)throw Error(P(425))}function Tl(){}var oa=null,ua=null;function ca(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 da=typeof setTimeout=="function"?setTimeout:void 0,um=typeof clearTimeout=="function"?clearTimeout:void 0,Du=typeof Promise=="function"?Promise:void 0,cm=typeof queueMicrotask=="function"?queueMicrotask:typeof Du<"u"?function(e){return Du.resolve(null).then(e).catch(dm)}:da;function dm(e){setTimeout(function(){throw e})}function Pi(e,t){var r=t,n=0;do{var s=r.nextSibling;if(e.removeChild(r),s&&s.nodeType===8)if(r=s.data,r==="/$"){if(n===0){e.removeChild(s),vs(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=s}while(r);vs(t)}function hr(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 Au(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var Bn=Math.random().toString(36).slice(2),Et="__reactFiber$"+Bn,Ss="__reactProps$"+Bn,Bt="__reactContainer$"+Bn,fa="__reactEvents$"+Bn,fm="__reactListeners$"+Bn,hm="__reactHandles$"+Bn;function _r(e){var t=e[Et];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Bt]||r[Et]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=Au(e);e!==null;){if(r=e[Et])return r;e=Au(e)}return t}e=r,r=e.parentNode}return null}function $s(e){return e=e[Et]||e[Bt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function un(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(P(33))}function Zl(e){return e[Ss]||null}var ha=[],cn=-1;function jr(e){return{current:e}}function ie(e){0>cn||(e.current=ha[cn],ha[cn]=null,cn--)}function ne(e,t){cn++,ha[cn]=e.current,e.current=t}var wr={},Oe=jr(wr),Ke=jr(!1),Vr=wr;function Fn(e,t){var r=e.type.contextTypes;if(!r)return wr;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var s={},l;for(l in r)s[l]=t[l];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function Ve(e){return e=e.childContextTypes,e!=null}function Ml(){ie(Ke),ie(Oe)}function $u(e,t,r){if(Oe.current!==wr)throw Error(P(168));ne(Oe,t),ne(Ke,r)}function Wd(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var s in n)if(!(s in t))throw Error(P(108,Yh(e)||"Unknown",s));return ce({},r,n)}function _l(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||wr,Vr=Oe.current,ne(Oe,e),ne(Ke,Ke.current),!0}function Uu(e,t,r){var n=e.stateNode;if(!n)throw Error(P(169));r?(e=Wd(e,t,Vr),n.__reactInternalMemoizedMergedChildContext=e,ie(Ke),ie(Oe),ne(Oe,e)):ie(Ke),ne(Ke,r)}var Ot=null,ei=!1,Ti=!1;function qd(e){Ot===null?Ot=[e]:Ot.push(e)}function pm(e){ei=!0,qd(e)}function Sr(){if(!Ti&&Ot!==null){Ti=!0;var e=0,t=ee;try{var r=Ot;for(ee=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}Ot=null,ei=!1}catch(s){throw Ot!==null&&(Ot=Ot.slice(e+1)),gd(uo,Sr),s}finally{ee=t,Ti=!1}}return null}var dn=[],fn=0,Rl=null,Ol=0,lt=[],it=0,Wr=null,Dt=1,At="";function Tr(e,t){dn[fn++]=Ol,dn[fn++]=Rl,Rl=e,Ol=t}function Gd(e,t,r){lt[it++]=Dt,lt[it++]=At,lt[it++]=Wr,Wr=e;var n=Dt;e=At;var s=32-vt(n)-1;n&=~(1<<s),r+=1;var l=32-vt(t)+s;if(30<l){var a=s-s%5;l=(n&(1<<a)-1).toString(32),n>>=a,s-=a,Dt=1<<32-vt(t)+s|r<<s|n,At=l+e}else Dt=1<<l|r<<s|n,At=e}function go(e){e.return!==null&&(Tr(e,1),Gd(e,1,0))}function wo(e){for(;e===Rl;)Rl=dn[--fn],dn[fn]=null,Ol=dn[--fn],dn[fn]=null;for(;e===Wr;)Wr=lt[--it],lt[it]=null,At=lt[--it],lt[it]=null,Dt=lt[--it],lt[it]=null}var Ze=null,Je=null,ae=!1,xt=null;function Xd(e,t){var r=at(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function Qu(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Ze=e,Je=hr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ze=e,Je=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Wr!==null?{id:Dt,overflow:At}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=at(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,Ze=e,Je=null,!0):!1;default:return!1}}function pa(e){return(e.mode&1)!==0&&(e.flags&128)===0}function ma(e){if(ae){var t=Je;if(t){var r=t;if(!Qu(e,t)){if(pa(e))throw Error(P(418));t=hr(r.nextSibling);var n=Ze;t&&Qu(e,t)?Xd(n,r):(e.flags=e.flags&-4097|2,ae=!1,Ze=e)}}else{if(pa(e))throw Error(P(418));e.flags=e.flags&-4097|2,ae=!1,Ze=e}}}function Bu(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ze=e}function el(e){if(e!==Ze)return!1;if(!ae)return Bu(e),ae=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!ca(e.type,e.memoizedProps)),t&&(t=Je)){if(pa(e))throw Yd(),Error(P(418));for(;t;)Xd(e,t),t=hr(t.nextSibling)}if(Bu(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(P(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){Je=hr(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}Je=null}}else Je=Ze?hr(e.stateNode.nextSibling):null;return!0}function Yd(){for(var e=Je;e;)e=hr(e.nextSibling)}function Ln(){Je=Ze=null,ae=!1}function ko(e){xt===null?xt=[e]:xt.push(e)}var mm=Vt.ReactCurrentBatchConfig;function Xn(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(P(309));var n=r.stateNode}if(!n)throw Error(P(147,e));var s=n,l=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===l?t.ref:(t=function(a){var o=s.refs;a===null?delete o[l]:o[l]=a},t._stringRef=l,t)}if(typeof e!="string")throw Error(P(284));if(!r._owner)throw Error(P(290,e))}return e}function tl(e,t){throw e=Object.prototype.toString.call(t),Error(P(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Hu(e){var t=e._init;return t(e._payload)}function Jd(e){function t(c,f){if(e){var p=c.deletions;p===null?(c.deletions=[f],c.flags|=16):p.push(f)}}function r(c,f){if(!e)return null;for(;f!==null;)t(c,f),f=f.sibling;return null}function n(c,f){for(c=new Map;f!==null;)f.key!==null?c.set(f.key,f):c.set(f.index,f),f=f.sibling;return c}function s(c,f){return c=xr(c,f),c.index=0,c.sibling=null,c}function l(c,f,p){return c.index=p,e?(p=c.alternate,p!==null?(p=p.index,p<f?(c.flags|=2,f):p):(c.flags|=2,f)):(c.flags|=1048576,f)}function a(c){return e&&c.alternate===null&&(c.flags|=2),c}function o(c,f,p,g){return f===null||f.tag!==6?(f=Li(p,c.mode,g),f.return=c,f):(f=s(f,p),f.return=c,f)}function u(c,f,p,g){var b=p.type;return b===sn?y(c,f,p.props.children,g,p.key):f!==null&&(f.elementType===b||typeof b=="object"&&b!==null&&b.$$typeof===Gt&&Hu(b)===f.type)?(g=s(f,p.props),g.ref=Xn(c,f,p),g.return=c,g):(g=vl(p.type,p.key,p.props,null,c.mode,g),g.ref=Xn(c,f,p),g.return=c,g)}function d(c,f,p,g){return f===null||f.tag!==4||f.stateNode.containerInfo!==p.containerInfo||f.stateNode.implementation!==p.implementation?(f=Ii(p,c.mode,g),f.return=c,f):(f=s(f,p.children||[]),f.return=c,f)}function y(c,f,p,g,b){return f===null||f.tag!==7?(f=Kr(p,c.mode,g,b),f.return=c,f):(f=s(f,p),f.return=c,f)}function m(c,f,p){if(typeof f=="string"&&f!==""||typeof f=="number")return f=Li(""+f,c.mode,p),f.return=c,f;if(typeof f=="object"&&f!==null){switch(f.$$typeof){case Hs:return p=vl(f.type,f.key,f.props,null,c.mode,p),p.ref=Xn(c,null,f),p.return=c,p;case nn:return f=Ii(f,c.mode,p),f.return=c,f;case Gt:var g=f._init;return m(c,g(f._payload),p)}if(es(f)||Kn(f))return f=Kr(f,c.mode,p,null),f.return=c,f;tl(c,f)}return null}function x(c,f,p,g){var b=f!==null?f.key:null;if(typeof p=="string"&&p!==""||typeof p=="number")return b!==null?null:o(c,f,""+p,g);if(typeof p=="object"&&p!==null){switch(p.$$typeof){case Hs:return p.key===b?u(c,f,p,g):null;case nn:return p.key===b?d(c,f,p,g):null;case Gt:return b=p._init,x(c,f,b(p._payload),g)}if(es(p)||Kn(p))return b!==null?null:y(c,f,p,g,null);tl(c,p)}return null}function k(c,f,p,g,b){if(typeof g=="string"&&g!==""||typeof g=="number")return c=c.get(p)||null,o(f,c,""+g,b);if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Hs:return c=c.get(g.key===null?p:g.key)||null,u(f,c,g,b);case nn:return c=c.get(g.key===null?p:g.key)||null,d(f,c,g,b);case Gt:var S=g._init;return k(c,f,p,S(g._payload),b)}if(es(g)||Kn(g))return c=c.get(p)||null,y(f,c,g,b,null);tl(f,g)}return null}function v(c,f,p,g){for(var b=null,S=null,N=f,C=f=0,z=null;N!==null&&C<p.length;C++){N.index>C?(z=N,N=null):z=N.sibling;var O=x(c,N,p[C],g);if(O===null){N===null&&(N=z);break}e&&N&&O.alternate===null&&t(c,N),f=l(O,f,C),S===null?b=O:S.sibling=O,S=O,N=z}if(C===p.length)return r(c,N),ae&&Tr(c,C),b;if(N===null){for(;C<p.length;C++)N=m(c,p[C],g),N!==null&&(f=l(N,f,C),S===null?b=N:S.sibling=N,S=N);return ae&&Tr(c,C),b}for(N=n(c,N);C<p.length;C++)z=k(N,c,C,p[C],g),z!==null&&(e&&z.alternate!==null&&N.delete(z.key===null?C:z.key),f=l(z,f,C),S===null?b=z:S.sibling=z,S=z);return e&&N.forEach(function(G){return t(c,G)}),ae&&Tr(c,C),b}function w(c,f,p,g){var b=Kn(p);if(typeof b!="function")throw Error(P(150));if(p=b.call(p),p==null)throw Error(P(151));for(var S=b=null,N=f,C=f=0,z=null,O=p.next();N!==null&&!O.done;C++,O=p.next()){N.index>C?(z=N,N=null):z=N.sibling;var G=x(c,N,O.value,g);if(G===null){N===null&&(N=z);break}e&&N&&G.alternate===null&&t(c,N),f=l(G,f,C),S===null?b=G:S.sibling=G,S=G,N=z}if(O.done)return r(c,N),ae&&Tr(c,C),b;if(N===null){for(;!O.done;C++,O=p.next())O=m(c,O.value,g),O!==null&&(f=l(O,f,C),S===null?b=O:S.sibling=O,S=O);return ae&&Tr(c,C),b}for(N=n(c,N);!O.done;C++,O=p.next())O=k(N,c,C,O.value,g),O!==null&&(e&&O.alternate!==null&&N.delete(O.key===null?C:O.key),f=l(O,f,C),S===null?b=O:S.sibling=O,S=O);return e&&N.forEach(function(Y){return t(c,Y)}),ae&&Tr(c,C),b}function T(c,f,p,g){if(typeof p=="object"&&p!==null&&p.type===sn&&p.key===null&&(p=p.props.children),typeof p=="object"&&p!==null){switch(p.$$typeof){case Hs:e:{for(var b=p.key,S=f;S!==null;){if(S.key===b){if(b=p.type,b===sn){if(S.tag===7){r(c,S.sibling),f=s(S,p.props.children),f.return=c,c=f;break e}}else if(S.elementType===b||typeof b=="object"&&b!==null&&b.$$typeof===Gt&&Hu(b)===S.type){r(c,S.sibling),f=s(S,p.props),f.ref=Xn(c,S,p),f.return=c,c=f;break e}r(c,S);break}else t(c,S);S=S.sibling}p.type===sn?(f=Kr(p.props.children,c.mode,g,p.key),f.return=c,c=f):(g=vl(p.type,p.key,p.props,null,c.mode,g),g.ref=Xn(c,f,p),g.return=c,c=g)}return a(c);case nn:e:{for(S=p.key;f!==null;){if(f.key===S)if(f.tag===4&&f.stateNode.containerInfo===p.containerInfo&&f.stateNode.implementation===p.implementation){r(c,f.sibling),f=s(f,p.children||[]),f.return=c,c=f;break e}else{r(c,f);break}else t(c,f);f=f.sibling}f=Ii(p,c.mode,g),f.return=c,c=f}return a(c);case Gt:return S=p._init,T(c,f,S(p._payload),g)}if(es(p))return v(c,f,p,g);if(Kn(p))return w(c,f,p,g);tl(c,p)}return typeof p=="string"&&p!==""||typeof p=="number"?(p=""+p,f!==null&&f.tag===6?(r(c,f.sibling),f=s(f,p),f.return=c,c=f):(r(c,f),f=Li(p,c.mode,g),f.return=c,c=f),a(c)):r(c,f)}return T}var In=Jd(!0),Zd=Jd(!1),zl=jr(null),Fl=null,hn=null,jo=null;function So(){jo=hn=Fl=null}function No(e){var t=zl.current;ie(zl),e._currentValue=t}function ya(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function wn(e,t){Fl=e,jo=hn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(He=!0),e.firstContext=null)}function ut(e){var t=e._currentValue;if(jo!==e)if(e={context:e,memoizedValue:t,next:null},hn===null){if(Fl===null)throw Error(P(308));hn=e,Fl.dependencies={lanes:0,firstContext:e}}else hn=hn.next=e;return t}var Rr=null;function Co(e){Rr===null?Rr=[e]:Rr.push(e)}function ef(e,t,r,n){var s=t.interleaved;return s===null?(r.next=r,Co(t)):(r.next=s.next,s.next=r),t.interleaved=r,Ht(e,n)}function Ht(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Xt=!1;function Eo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function tf(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 $t(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function pr(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,X&2){var s=n.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),n.pending=t,Ht(e,r)}return s=n.interleaved,s===null?(t.next=t,Co(n)):(t.next=s.next,s.next=t),n.interleaved=t,Ht(e,r)}function fl(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,co(e,r)}}function Ku(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var s=null,l=null;if(r=r.firstBaseUpdate,r!==null){do{var a={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};l===null?s=l=a:l=l.next=a,r=r.next}while(r!==null);l===null?s=l=t:l=l.next=t}else s=l=t;r={baseState:n.baseState,firstBaseUpdate:s,lastBaseUpdate:l,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Ll(e,t,r,n){var s=e.updateQueue;Xt=!1;var l=s.firstBaseUpdate,a=s.lastBaseUpdate,o=s.shared.pending;if(o!==null){s.shared.pending=null;var u=o,d=u.next;u.next=null,a===null?l=d:a.next=d,a=u;var y=e.alternate;y!==null&&(y=y.updateQueue,o=y.lastBaseUpdate,o!==a&&(o===null?y.firstBaseUpdate=d:o.next=d,y.lastBaseUpdate=u))}if(l!==null){var m=s.baseState;a=0,y=d=u=null,o=l;do{var x=o.lane,k=o.eventTime;if((n&x)===x){y!==null&&(y=y.next={eventTime:k,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var v=e,w=o;switch(x=t,k=r,w.tag){case 1:if(v=w.payload,typeof v=="function"){m=v.call(k,m,x);break e}m=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=w.payload,x=typeof v=="function"?v.call(k,m,x):v,x==null)break e;m=ce({},m,x);break e;case 2:Xt=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,x=s.effects,x===null?s.effects=[o]:x.push(o))}else k={eventTime:k,lane:x,tag:o.tag,payload:o.payload,callback:o.callback,next:null},y===null?(d=y=k,u=m):y=y.next=k,a|=x;if(o=o.next,o===null){if(o=s.shared.pending,o===null)break;x=o,o=x.next,x.next=null,s.lastBaseUpdate=x,s.shared.pending=null}}while(!0);if(y===null&&(u=m),s.baseState=u,s.firstBaseUpdate=d,s.lastBaseUpdate=y,t=s.shared.interleaved,t!==null){s=t;do a|=s.lane,s=s.next;while(s!==t)}else l===null&&(s.shared.lanes=0);Gr|=a,e.lanes=a,e.memoizedState=m}}function Vu(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],s=n.callback;if(s!==null){if(n.callback=null,n=r,typeof s!="function")throw Error(P(191,s));s.call(n)}}}var Us={},Pt=jr(Us),Ns=jr(Us),Cs=jr(Us);function Or(e){if(e===Us)throw Error(P(174));return e}function bo(e,t){switch(ne(Cs,t),ne(Ns,e),ne(Pt,Us),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Xi(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Xi(t,e)}ie(Pt),ne(Pt,t)}function Dn(){ie(Pt),ie(Ns),ie(Cs)}function rf(e){Or(Cs.current);var t=Or(Pt.current),r=Xi(t,e.type);t!==r&&(ne(Ns,e),ne(Pt,r))}function Po(e){Ns.current===e&&(ie(Pt),ie(Ns))}var oe=jr(0);function Il(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.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 Mi=[];function To(){for(var e=0;e<Mi.length;e++)Mi[e]._workInProgressVersionPrimary=null;Mi.length=0}var hl=Vt.ReactCurrentDispatcher,_i=Vt.ReactCurrentBatchConfig,qr=0,ue=null,ve=null,je=null,Dl=!1,us=!1,Es=0,ym=0;function Te(){throw Error(P(321))}function Mo(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!wt(e[r],t[r]))return!1;return!0}function _o(e,t,r,n,s,l){if(qr=l,ue=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,hl.current=e===null||e.memoizedState===null?wm:km,e=r(n,s),us){l=0;do{if(us=!1,Es=0,25<=l)throw Error(P(301));l+=1,je=ve=null,t.updateQueue=null,hl.current=jm,e=r(n,s)}while(us)}if(hl.current=Al,t=ve!==null&&ve.next!==null,qr=0,je=ve=ue=null,Dl=!1,t)throw Error(P(300));return e}function Ro(){var e=Es!==0;return Es=0,e}function jt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return je===null?ue.memoizedState=je=e:je=je.next=e,je}function ct(){if(ve===null){var e=ue.alternate;e=e!==null?e.memoizedState:null}else e=ve.next;var t=je===null?ue.memoizedState:je.next;if(t!==null)je=t,ve=e;else{if(e===null)throw Error(P(310));ve=e,e={memoizedState:ve.memoizedState,baseState:ve.baseState,baseQueue:ve.baseQueue,queue:ve.queue,next:null},je===null?ue.memoizedState=je=e:je=je.next=e}return je}function bs(e,t){return typeof t=="function"?t(e):t}function Ri(e){var t=ct(),r=t.queue;if(r===null)throw Error(P(311));r.lastRenderedReducer=e;var n=ve,s=n.baseQueue,l=r.pending;if(l!==null){if(s!==null){var a=s.next;s.next=l.next,l.next=a}n.baseQueue=s=l,r.pending=null}if(s!==null){l=s.next,n=n.baseState;var o=a=null,u=null,d=l;do{var y=d.lane;if((qr&y)===y)u!==null&&(u=u.next={lane:0,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null}),n=d.hasEagerState?d.eagerState:e(n,d.action);else{var m={lane:y,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null};u===null?(o=u=m,a=n):u=u.next=m,ue.lanes|=y,Gr|=y}d=d.next}while(d!==null&&d!==l);u===null?a=n:u.next=o,wt(n,t.memoizedState)||(He=!0),t.memoizedState=n,t.baseState=a,t.baseQueue=u,r.lastRenderedState=n}if(e=r.interleaved,e!==null){s=e;do l=s.lane,ue.lanes|=l,Gr|=l,s=s.next;while(s!==e)}else s===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function Oi(e){var t=ct(),r=t.queue;if(r===null)throw Error(P(311));r.lastRenderedReducer=e;var n=r.dispatch,s=r.pending,l=t.memoizedState;if(s!==null){r.pending=null;var a=s=s.next;do l=e(l,a.action),a=a.next;while(a!==s);wt(l,t.memoizedState)||(He=!0),t.memoizedState=l,t.baseQueue===null&&(t.baseState=l),r.lastRenderedState=l}return[l,n]}function nf(){}function sf(e,t){var r=ue,n=ct(),s=t(),l=!wt(n.memoizedState,s);if(l&&(n.memoizedState=s,He=!0),n=n.queue,Oo(of.bind(null,r,n,e),[e]),n.getSnapshot!==t||l||je!==null&&je.memoizedState.tag&1){if(r.flags|=2048,Ps(9,af.bind(null,r,n,s,t),void 0,null),Se===null)throw Error(P(349));qr&30||lf(r,t,s)}return s}function lf(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=ue.updateQueue,t===null?(t={lastEffect:null,stores:null},ue.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function af(e,t,r,n){t.value=r,t.getSnapshot=n,uf(t)&&cf(e)}function of(e,t,r){return r(function(){uf(t)&&cf(e)})}function uf(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!wt(e,r)}catch{return!0}}function cf(e){var t=Ht(e,1);t!==null&>(t,e,1,-1)}function Wu(e){var t=jt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:bs,lastRenderedState:e},t.queue=e,e=e.dispatch=gm.bind(null,ue,e),[t.memoizedState,e]}function Ps(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=ue.updateQueue,t===null?(t={lastEffect:null,stores:null},ue.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function df(){return ct().memoizedState}function pl(e,t,r,n){var s=jt();ue.flags|=e,s.memoizedState=Ps(1|t,r,void 0,n===void 0?null:n)}function ti(e,t,r,n){var s=ct();n=n===void 0?null:n;var l=void 0;if(ve!==null){var a=ve.memoizedState;if(l=a.destroy,n!==null&&Mo(n,a.deps)){s.memoizedState=Ps(t,r,l,n);return}}ue.flags|=e,s.memoizedState=Ps(1|t,r,l,n)}function qu(e,t){return pl(8390656,8,e,t)}function Oo(e,t){return ti(2048,8,e,t)}function ff(e,t){return ti(4,2,e,t)}function hf(e,t){return ti(4,4,e,t)}function pf(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 mf(e,t,r){return r=r!=null?r.concat([e]):null,ti(4,4,pf.bind(null,t,e),r)}function zo(){}function yf(e,t){var r=ct();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Mo(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function xf(e,t){var r=ct();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Mo(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function vf(e,t,r){return qr&21?(wt(r,t)||(r=jd(),ue.lanes|=r,Gr|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,He=!0),e.memoizedState=r)}function xm(e,t){var r=ee;ee=r!==0&&4>r?r:4,e(!0);var n=_i.transition;_i.transition={};try{e(!1),t()}finally{ee=r,_i.transition=n}}function gf(){return ct().memoizedState}function vm(e,t,r){var n=yr(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},wf(e))kf(t,r);else if(r=ef(e,t,r,n),r!==null){var s=Ie();gt(r,e,n,s),jf(r,t,n)}}function gm(e,t,r){var n=yr(e),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(wf(e))kf(t,s);else{var l=e.alternate;if(e.lanes===0&&(l===null||l.lanes===0)&&(l=t.lastRenderedReducer,l!==null))try{var a=t.lastRenderedState,o=l(a,r);if(s.hasEagerState=!0,s.eagerState=o,wt(o,a)){var u=t.interleaved;u===null?(s.next=s,Co(t)):(s.next=u.next,u.next=s),t.interleaved=s;return}}catch{}finally{}r=ef(e,t,s,n),r!==null&&(s=Ie(),gt(r,e,n,s),jf(r,t,n))}}function wf(e){var t=e.alternate;return e===ue||t!==null&&t===ue}function kf(e,t){us=Dl=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function jf(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,co(e,r)}}var Al={readContext:ut,useCallback:Te,useContext:Te,useEffect:Te,useImperativeHandle:Te,useInsertionEffect:Te,useLayoutEffect:Te,useMemo:Te,useReducer:Te,useRef:Te,useState:Te,useDebugValue:Te,useDeferredValue:Te,useTransition:Te,useMutableSource:Te,useSyncExternalStore:Te,useId:Te,unstable_isNewReconciler:!1},wm={readContext:ut,useCallback:function(e,t){return jt().memoizedState=[e,t===void 0?null:t],e},useContext:ut,useEffect:qu,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,pl(4194308,4,pf.bind(null,t,e),r)},useLayoutEffect:function(e,t){return pl(4194308,4,e,t)},useInsertionEffect:function(e,t){return pl(4,2,e,t)},useMemo:function(e,t){var r=jt();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=jt();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=vm.bind(null,ue,e),[n.memoizedState,e]},useRef:function(e){var t=jt();return e={current:e},t.memoizedState=e},useState:Wu,useDebugValue:zo,useDeferredValue:function(e){return jt().memoizedState=e},useTransition:function(){var e=Wu(!1),t=e[0];return e=xm.bind(null,e[1]),jt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=ue,s=jt();if(ae){if(r===void 0)throw Error(P(407));r=r()}else{if(r=t(),Se===null)throw Error(P(349));qr&30||lf(n,t,r)}s.memoizedState=r;var l={value:r,getSnapshot:t};return s.queue=l,qu(of.bind(null,n,l,e),[e]),n.flags|=2048,Ps(9,af.bind(null,n,l,r,t),void 0,null),r},useId:function(){var e=jt(),t=Se.identifierPrefix;if(ae){var r=At,n=Dt;r=(n&~(1<<32-vt(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Es++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=ym++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},km={readContext:ut,useCallback:yf,useContext:ut,useEffect:Oo,useImperativeHandle:mf,useInsertionEffect:ff,useLayoutEffect:hf,useMemo:xf,useReducer:Ri,useRef:df,useState:function(){return Ri(bs)},useDebugValue:zo,useDeferredValue:function(e){var t=ct();return vf(t,ve.memoizedState,e)},useTransition:function(){var e=Ri(bs)[0],t=ct().memoizedState;return[e,t]},useMutableSource:nf,useSyncExternalStore:sf,useId:gf,unstable_isNewReconciler:!1},jm={readContext:ut,useCallback:yf,useContext:ut,useEffect:Oo,useImperativeHandle:mf,useInsertionEffect:ff,useLayoutEffect:hf,useMemo:xf,useReducer:Oi,useRef:df,useState:function(){return Oi(bs)},useDebugValue:zo,useDeferredValue:function(e){var t=ct();return ve===null?t.memoizedState=e:vf(t,ve.memoizedState,e)},useTransition:function(){var e=Oi(bs)[0],t=ct().memoizedState;return[e,t]},useMutableSource:nf,useSyncExternalStore:sf,useId:gf,unstable_isNewReconciler:!1};function ht(e,t){if(e&&e.defaultProps){t=ce({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function xa(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:ce({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var ri={isMounted:function(e){return(e=e._reactInternals)?tn(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=Ie(),s=yr(e),l=$t(n,s);l.payload=t,r!=null&&(l.callback=r),t=pr(e,l,s),t!==null&&(gt(t,e,s,n),fl(t,e,s))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=Ie(),s=yr(e),l=$t(n,s);l.tag=1,l.payload=t,r!=null&&(l.callback=r),t=pr(e,l,s),t!==null&&(gt(t,e,s,n),fl(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Ie(),n=yr(e),s=$t(r,n);s.tag=2,t!=null&&(s.callback=t),t=pr(e,s,n),t!==null&&(gt(t,e,n,r),fl(t,e,n))}};function Gu(e,t,r,n,s,l,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,l,a):t.prototype&&t.prototype.isPureReactComponent?!ws(r,n)||!ws(s,l):!0}function Sf(e,t,r){var n=!1,s=wr,l=t.contextType;return typeof l=="object"&&l!==null?l=ut(l):(s=Ve(t)?Vr:Oe.current,n=t.contextTypes,l=(n=n!=null)?Fn(e,s):wr),t=new t(r,l),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=ri,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=l),t}function Xu(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&ri.enqueueReplaceState(t,t.state,null)}function va(e,t,r,n){var s=e.stateNode;s.props=r,s.state=e.memoizedState,s.refs={},Eo(e);var l=t.contextType;typeof l=="object"&&l!==null?s.context=ut(l):(l=Ve(t)?Vr:Oe.current,s.context=Fn(e,l)),s.state=e.memoizedState,l=t.getDerivedStateFromProps,typeof l=="function"&&(xa(e,t,l,r),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&ri.enqueueReplaceState(s,s.state,null),Ll(e,r,s,n),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function An(e,t){try{var r="",n=t;do r+=Xh(n),n=n.return;while(n);var s=r}catch(l){s=`
|
|
39
|
+
Error generating stack: `+l.message+`
|
|
40
|
+
`+l.stack}return{value:e,source:t,stack:s,digest:null}}function zi(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function ga(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var Sm=typeof WeakMap=="function"?WeakMap:Map;function Nf(e,t,r){r=$t(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){Ul||(Ul=!0,Ta=n),ga(e,t)},r}function Cf(e,t,r){r=$t(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var s=t.value;r.payload=function(){return n(s)},r.callback=function(){ga(e,t)}}var l=e.stateNode;return l!==null&&typeof l.componentDidCatch=="function"&&(r.callback=function(){ga(e,t),typeof n!="function"&&(mr===null?mr=new Set([this]):mr.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),r}function Yu(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new Sm;var s=new Set;n.set(t,s)}else s=n.get(t),s===void 0&&(s=new Set,n.set(t,s));s.has(r)||(s.add(r),e=Im.bind(null,e,t,r),t.then(e,e))}function Ju(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 Zu(e,t,r,n,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=$t(-1,1),t.tag=2,pr(r,t,1))),r.lanes|=1),e)}var Nm=Vt.ReactCurrentOwner,He=!1;function Fe(e,t,r,n){t.child=e===null?Zd(t,null,r,n):In(t,e.child,r,n)}function ec(e,t,r,n,s){r=r.render;var l=t.ref;return wn(t,s),n=_o(e,t,r,n,l,s),r=Ro(),e!==null&&!He?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Kt(e,t,s)):(ae&&r&&go(t),t.flags|=1,Fe(e,t,n,s),t.child)}function tc(e,t,r,n,s){if(e===null){var l=r.type;return typeof l=="function"&&!Qo(l)&&l.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=l,Ef(e,t,l,n,s)):(e=vl(r.type,null,n,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(l=e.child,!(e.lanes&s)){var a=l.memoizedProps;if(r=r.compare,r=r!==null?r:ws,r(a,n)&&e.ref===t.ref)return Kt(e,t,s)}return t.flags|=1,e=xr(l,n),e.ref=t.ref,e.return=t,t.child=e}function Ef(e,t,r,n,s){if(e!==null){var l=e.memoizedProps;if(ws(l,n)&&e.ref===t.ref)if(He=!1,t.pendingProps=n=l,(e.lanes&s)!==0)e.flags&131072&&(He=!0);else return t.lanes=e.lanes,Kt(e,t,s)}return wa(e,t,r,n,s)}function bf(e,t,r){var n=t.pendingProps,s=n.children,l=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ne(mn,Xe),Xe|=r;else{if(!(r&1073741824))return e=l!==null?l.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ne(mn,Xe),Xe|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=l!==null?l.baseLanes:r,ne(mn,Xe),Xe|=n}else l!==null?(n=l.baseLanes|r,t.memoizedState=null):n=r,ne(mn,Xe),Xe|=n;return Fe(e,t,s,r),t.child}function Pf(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function wa(e,t,r,n,s){var l=Ve(r)?Vr:Oe.current;return l=Fn(t,l),wn(t,s),r=_o(e,t,r,n,l,s),n=Ro(),e!==null&&!He?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Kt(e,t,s)):(ae&&n&&go(t),t.flags|=1,Fe(e,t,r,s),t.child)}function rc(e,t,r,n,s){if(Ve(r)){var l=!0;_l(t)}else l=!1;if(wn(t,s),t.stateNode===null)ml(e,t),Sf(t,r,n),va(t,r,n,s),n=!0;else if(e===null){var a=t.stateNode,o=t.memoizedProps;a.props=o;var u=a.context,d=r.contextType;typeof d=="object"&&d!==null?d=ut(d):(d=Ve(r)?Vr:Oe.current,d=Fn(t,d));var y=r.getDerivedStateFromProps,m=typeof y=="function"||typeof a.getSnapshotBeforeUpdate=="function";m||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==n||u!==d)&&Xu(t,a,n,d),Xt=!1;var x=t.memoizedState;a.state=x,Ll(t,n,a,s),u=t.memoizedState,o!==n||x!==u||Ke.current||Xt?(typeof y=="function"&&(xa(t,r,y,n),u=t.memoizedState),(o=Xt||Gu(t,r,o,n,x,u,d))?(m||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=u),a.props=n,a.state=u,a.context=d,n=o):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{a=t.stateNode,tf(e,t),o=t.memoizedProps,d=t.type===t.elementType?o:ht(t.type,o),a.props=d,m=t.pendingProps,x=a.context,u=r.contextType,typeof u=="object"&&u!==null?u=ut(u):(u=Ve(r)?Vr:Oe.current,u=Fn(t,u));var k=r.getDerivedStateFromProps;(y=typeof k=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==m||x!==u)&&Xu(t,a,n,u),Xt=!1,x=t.memoizedState,a.state=x,Ll(t,n,a,s);var v=t.memoizedState;o!==m||x!==v||Ke.current||Xt?(typeof k=="function"&&(xa(t,r,k,n),v=t.memoizedState),(d=Xt||Gu(t,r,d,n,x,v,u)||!1)?(y||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(n,v,u),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(n,v,u)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||o===e.memoizedProps&&x===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&x===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=v),a.props=n,a.state=v,a.context=u,n=d):(typeof a.componentDidUpdate!="function"||o===e.memoizedProps&&x===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&x===e.memoizedState||(t.flags|=1024),n=!1)}return ka(e,t,r,n,l,s)}function ka(e,t,r,n,s,l){Pf(e,t);var a=(t.flags&128)!==0;if(!n&&!a)return s&&Uu(t,r,!1),Kt(e,t,l);n=t.stateNode,Nm.current=t;var o=a&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&a?(t.child=In(t,e.child,null,l),t.child=In(t,null,o,l)):Fe(e,t,o,l),t.memoizedState=n.state,s&&Uu(t,r,!0),t.child}function Tf(e){var t=e.stateNode;t.pendingContext?$u(e,t.pendingContext,t.pendingContext!==t.context):t.context&&$u(e,t.context,!1),bo(e,t.containerInfo)}function nc(e,t,r,n,s){return Ln(),ko(s),t.flags|=256,Fe(e,t,r,n),t.child}var ja={dehydrated:null,treeContext:null,retryLane:0};function Sa(e){return{baseLanes:e,cachePool:null,transitions:null}}function Mf(e,t,r){var n=t.pendingProps,s=oe.current,l=!1,a=(t.flags&128)!==0,o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:(s&2)!==0),o?(l=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),ne(oe,s&1),e===null)return ma(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):(a=n.children,e=n.fallback,l?(n=t.mode,l=t.child,a={mode:"hidden",children:a},!(n&1)&&l!==null?(l.childLanes=0,l.pendingProps=a):l=li(a,n,0,null),e=Kr(e,n,r,null),l.return=t,e.return=t,l.sibling=e,t.child=l,t.child.memoizedState=Sa(r),t.memoizedState=ja,e):Fo(t,a));if(s=e.memoizedState,s!==null&&(o=s.dehydrated,o!==null))return Cm(e,t,a,n,o,s,r);if(l){l=n.fallback,a=t.mode,s=e.child,o=s.sibling;var u={mode:"hidden",children:n.children};return!(a&1)&&t.child!==s?(n=t.child,n.childLanes=0,n.pendingProps=u,t.deletions=null):(n=xr(s,u),n.subtreeFlags=s.subtreeFlags&14680064),o!==null?l=xr(o,l):(l=Kr(l,a,r,null),l.flags|=2),l.return=t,n.return=t,n.sibling=l,t.child=n,n=l,l=t.child,a=e.child.memoizedState,a=a===null?Sa(r):{baseLanes:a.baseLanes|r,cachePool:null,transitions:a.transitions},l.memoizedState=a,l.childLanes=e.childLanes&~r,t.memoizedState=ja,n}return l=e.child,e=l.sibling,n=xr(l,{mode:"visible",children:n.children}),!(t.mode&1)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function Fo(e,t){return t=li({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function rl(e,t,r,n){return n!==null&&ko(n),In(t,e.child,null,r),e=Fo(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Cm(e,t,r,n,s,l,a){if(r)return t.flags&256?(t.flags&=-257,n=zi(Error(P(422))),rl(e,t,a,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(l=n.fallback,s=t.mode,n=li({mode:"visible",children:n.children},s,0,null),l=Kr(l,s,a,null),l.flags|=2,n.return=t,l.return=t,n.sibling=l,t.child=n,t.mode&1&&In(t,e.child,null,a),t.child.memoizedState=Sa(a),t.memoizedState=ja,l);if(!(t.mode&1))return rl(e,t,a,null);if(s.data==="$!"){if(n=s.nextSibling&&s.nextSibling.dataset,n)var o=n.dgst;return n=o,l=Error(P(419)),n=zi(l,n,void 0),rl(e,t,a,n)}if(o=(a&e.childLanes)!==0,He||o){if(n=Se,n!==null){switch(a&-a){case 4:s=2;break;case 16:s=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:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(n.suspendedLanes|a)?0:s,s!==0&&s!==l.retryLane&&(l.retryLane=s,Ht(e,s),gt(n,e,s,-1))}return Uo(),n=zi(Error(P(421))),rl(e,t,a,n)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=Dm.bind(null,e),s._reactRetry=t,null):(e=l.treeContext,Je=hr(s.nextSibling),Ze=t,ae=!0,xt=null,e!==null&&(lt[it++]=Dt,lt[it++]=At,lt[it++]=Wr,Dt=e.id,At=e.overflow,Wr=t),t=Fo(t,n.children),t.flags|=4096,t)}function sc(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),ya(e.return,t,r)}function Fi(e,t,r,n,s){var l=e.memoizedState;l===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:s}:(l.isBackwards=t,l.rendering=null,l.renderingStartTime=0,l.last=n,l.tail=r,l.tailMode=s)}function _f(e,t,r){var n=t.pendingProps,s=n.revealOrder,l=n.tail;if(Fe(e,t,n.children,r),n=oe.current,n&2)n=n&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&&sc(e,r,t);else if(e.tag===19)sc(e,r,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}n&=1}if(ne(oe,n),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(r=t.child,s=null;r!==null;)e=r.alternate,e!==null&&Il(e)===null&&(s=r),r=r.sibling;r=s,r===null?(s=t.child,t.child=null):(s=r.sibling,r.sibling=null),Fi(t,!1,s,r,l);break;case"backwards":for(r=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Il(e)===null){t.child=s;break}e=s.sibling,s.sibling=r,r=s,s=e}Fi(t,!0,r,null,l);break;case"together":Fi(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ml(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Kt(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Gr|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(P(153));if(t.child!==null){for(e=t.child,r=xr(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=xr(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function Em(e,t,r){switch(t.tag){case 3:Tf(t),Ln();break;case 5:rf(t);break;case 1:Ve(t.type)&&_l(t);break;case 4:bo(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,s=t.memoizedProps.value;ne(zl,n._currentValue),n._currentValue=s;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(ne(oe,oe.current&1),t.flags|=128,null):r&t.child.childLanes?Mf(e,t,r):(ne(oe,oe.current&1),e=Kt(e,t,r),e!==null?e.sibling:null);ne(oe,oe.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return _f(e,t,r);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),ne(oe,oe.current),n)break;return null;case 22:case 23:return t.lanes=0,bf(e,t,r)}return Kt(e,t,r)}var Rf,Na,Of,zf;Rf=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};Na=function(){};Of=function(e,t,r,n){var s=e.memoizedProps;if(s!==n){e=t.stateNode,Or(Pt.current);var l=null;switch(r){case"input":s=Vi(e,s),n=Vi(e,n),l=[];break;case"select":s=ce({},s,{value:void 0}),n=ce({},n,{value:void 0}),l=[];break;case"textarea":s=Gi(e,s),n=Gi(e,n),l=[];break;default:typeof s.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=Tl)}Yi(r,n);var a;r=null;for(d in s)if(!n.hasOwnProperty(d)&&s.hasOwnProperty(d)&&s[d]!=null)if(d==="style"){var o=s[d];for(a in o)o.hasOwnProperty(a)&&(r||(r={}),r[a]="")}else d!=="dangerouslySetInnerHTML"&&d!=="children"&&d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&d!=="autoFocus"&&(hs.hasOwnProperty(d)?l||(l=[]):(l=l||[]).push(d,null));for(d in n){var u=n[d];if(o=s!=null?s[d]:void 0,n.hasOwnProperty(d)&&u!==o&&(u!=null||o!=null))if(d==="style")if(o){for(a in o)!o.hasOwnProperty(a)||u&&u.hasOwnProperty(a)||(r||(r={}),r[a]="");for(a in u)u.hasOwnProperty(a)&&o[a]!==u[a]&&(r||(r={}),r[a]=u[a])}else r||(l||(l=[]),l.push(d,r)),r=u;else d==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,o=o?o.__html:void 0,u!=null&&o!==u&&(l=l||[]).push(d,u)):d==="children"?typeof u!="string"&&typeof u!="number"||(l=l||[]).push(d,""+u):d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&(hs.hasOwnProperty(d)?(u!=null&&d==="onScroll"&&le("scroll",e),l||o===u||(l=[])):(l=l||[]).push(d,u))}r&&(l=l||[]).push("style",r);var d=l;(t.updateQueue=d)&&(t.flags|=4)}};zf=function(e,t,r,n){r!==n&&(t.flags|=4)};function Yn(e,t){if(!ae)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function Me(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var s=e.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags&14680064,n|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags,n|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function bm(e,t,r){var n=t.pendingProps;switch(wo(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Me(t),null;case 1:return Ve(t.type)&&Ml(),Me(t),null;case 3:return n=t.stateNode,Dn(),ie(Ke),ie(Oe),To(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(el(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,xt!==null&&(Ra(xt),xt=null))),Na(e,t),Me(t),null;case 5:Po(t);var s=Or(Cs.current);if(r=t.type,e!==null&&t.stateNode!=null)Of(e,t,r,n,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(P(166));return Me(t),null}if(e=Or(Pt.current),el(t)){n=t.stateNode,r=t.type;var l=t.memoizedProps;switch(n[Et]=t,n[Ss]=l,e=(t.mode&1)!==0,r){case"dialog":le("cancel",n),le("close",n);break;case"iframe":case"object":case"embed":le("load",n);break;case"video":case"audio":for(s=0;s<rs.length;s++)le(rs[s],n);break;case"source":le("error",n);break;case"img":case"image":case"link":le("error",n),le("load",n);break;case"details":le("toggle",n);break;case"input":hu(n,l),le("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!l.multiple},le("invalid",n);break;case"textarea":mu(n,l),le("invalid",n)}Yi(r,l),s=null;for(var a in l)if(l.hasOwnProperty(a)){var o=l[a];a==="children"?typeof o=="string"?n.textContent!==o&&(l.suppressHydrationWarning!==!0&&Zs(n.textContent,o,e),s=["children",o]):typeof o=="number"&&n.textContent!==""+o&&(l.suppressHydrationWarning!==!0&&Zs(n.textContent,o,e),s=["children",""+o]):hs.hasOwnProperty(a)&&o!=null&&a==="onScroll"&&le("scroll",n)}switch(r){case"input":Ks(n),pu(n,l,!0);break;case"textarea":Ks(n),yu(n);break;case"select":case"option":break;default:typeof l.onClick=="function"&&(n.onclick=Tl)}n=s,t.updateQueue=n,n!==null&&(t.flags|=4)}else{a=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=ad(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=a.createElement(r,{is:n.is}):(e=a.createElement(r),r==="select"&&(a=e,n.multiple?a.multiple=!0:n.size&&(a.size=n.size))):e=a.createElementNS(e,r),e[Et]=t,e[Ss]=n,Rf(e,t,!1,!1),t.stateNode=e;e:{switch(a=Ji(r,n),r){case"dialog":le("cancel",e),le("close",e),s=n;break;case"iframe":case"object":case"embed":le("load",e),s=n;break;case"video":case"audio":for(s=0;s<rs.length;s++)le(rs[s],e);s=n;break;case"source":le("error",e),s=n;break;case"img":case"image":case"link":le("error",e),le("load",e),s=n;break;case"details":le("toggle",e),s=n;break;case"input":hu(e,n),s=Vi(e,n),le("invalid",e);break;case"option":s=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},s=ce({},n,{value:void 0}),le("invalid",e);break;case"textarea":mu(e,n),s=Gi(e,n),le("invalid",e);break;default:s=n}Yi(r,s),o=s;for(l in o)if(o.hasOwnProperty(l)){var u=o[l];l==="style"?cd(e,u):l==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&od(e,u)):l==="children"?typeof u=="string"?(r!=="textarea"||u!=="")&&ps(e,u):typeof u=="number"&&ps(e,""+u):l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&l!=="autoFocus"&&(hs.hasOwnProperty(l)?u!=null&&l==="onScroll"&&le("scroll",e):u!=null&&so(e,l,u,a))}switch(r){case"input":Ks(e),pu(e,n,!1);break;case"textarea":Ks(e),yu(e);break;case"option":n.value!=null&&e.setAttribute("value",""+gr(n.value));break;case"select":e.multiple=!!n.multiple,l=n.value,l!=null?yn(e,!!n.multiple,l,!1):n.defaultValue!=null&&yn(e,!!n.multiple,n.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Tl)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Me(t),null;case 6:if(e&&t.stateNode!=null)zf(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(P(166));if(r=Or(Cs.current),Or(Pt.current),el(t)){if(n=t.stateNode,r=t.memoizedProps,n[Et]=t,(l=n.nodeValue!==r)&&(e=Ze,e!==null))switch(e.tag){case 3:Zs(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Zs(n.nodeValue,r,(e.mode&1)!==0)}l&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[Et]=t,t.stateNode=n}return Me(t),null;case 13:if(ie(oe),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ae&&Je!==null&&t.mode&1&&!(t.flags&128))Yd(),Ln(),t.flags|=98560,l=!1;else if(l=el(t),n!==null&&n.dehydrated!==null){if(e===null){if(!l)throw Error(P(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(P(317));l[Et]=t}else Ln(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Me(t),l=!1}else xt!==null&&(Ra(xt),xt=null),l=!0;if(!l)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,t.mode&1&&(e===null||oe.current&1?we===0&&(we=3):Uo())),t.updateQueue!==null&&(t.flags|=4),Me(t),null);case 4:return Dn(),Na(e,t),e===null&&ks(t.stateNode.containerInfo),Me(t),null;case 10:return No(t.type._context),Me(t),null;case 17:return Ve(t.type)&&Ml(),Me(t),null;case 19:if(ie(oe),l=t.memoizedState,l===null)return Me(t),null;if(n=(t.flags&128)!==0,a=l.rendering,a===null)if(n)Yn(l,!1);else{if(we!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=Il(e),a!==null){for(t.flags|=128,Yn(l,!1),n=a.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)l=r,e=n,l.flags&=14680066,a=l.alternate,a===null?(l.childLanes=0,l.lanes=e,l.child=null,l.subtreeFlags=0,l.memoizedProps=null,l.memoizedState=null,l.updateQueue=null,l.dependencies=null,l.stateNode=null):(l.childLanes=a.childLanes,l.lanes=a.lanes,l.child=a.child,l.subtreeFlags=0,l.deletions=null,l.memoizedProps=a.memoizedProps,l.memoizedState=a.memoizedState,l.updateQueue=a.updateQueue,l.type=a.type,e=a.dependencies,l.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return ne(oe,oe.current&1|2),t.child}e=e.sibling}l.tail!==null&&me()>$n&&(t.flags|=128,n=!0,Yn(l,!1),t.lanes=4194304)}else{if(!n)if(e=Il(a),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Yn(l,!0),l.tail===null&&l.tailMode==="hidden"&&!a.alternate&&!ae)return Me(t),null}else 2*me()-l.renderingStartTime>$n&&r!==1073741824&&(t.flags|=128,n=!0,Yn(l,!1),t.lanes=4194304);l.isBackwards?(a.sibling=t.child,t.child=a):(r=l.last,r!==null?r.sibling=a:t.child=a,l.last=a)}return l.tail!==null?(t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=me(),t.sibling=null,r=oe.current,ne(oe,n?r&1|2:r&1),t):(Me(t),null);case 22:case 23:return $o(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?Xe&1073741824&&(Me(t),t.subtreeFlags&6&&(t.flags|=8192)):Me(t),null;case 24:return null;case 25:return null}throw Error(P(156,t.tag))}function Pm(e,t){switch(wo(t),t.tag){case 1:return Ve(t.type)&&Ml(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Dn(),ie(Ke),ie(Oe),To(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Po(t),null;case 13:if(ie(oe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(P(340));Ln()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ie(oe),null;case 4:return Dn(),null;case 10:return No(t.type._context),null;case 22:case 23:return $o(),null;case 24:return null;default:return null}}var nl=!1,Re=!1,Tm=typeof WeakSet=="function"?WeakSet:Set,F=null;function pn(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){he(e,t,n)}else r.current=null}function Ca(e,t,r){try{r()}catch(n){he(e,t,n)}}var lc=!1;function Mm(e,t){if(oa=El,e=Dd(),vo(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var s=n.anchorOffset,l=n.focusNode;n=n.focusOffset;try{r.nodeType,l.nodeType}catch{r=null;break e}var a=0,o=-1,u=-1,d=0,y=0,m=e,x=null;t:for(;;){for(var k;m!==r||s!==0&&m.nodeType!==3||(o=a+s),m!==l||n!==0&&m.nodeType!==3||(u=a+n),m.nodeType===3&&(a+=m.nodeValue.length),(k=m.firstChild)!==null;)x=m,m=k;for(;;){if(m===e)break t;if(x===r&&++d===s&&(o=a),x===l&&++y===n&&(u=a),(k=m.nextSibling)!==null)break;m=x,x=m.parentNode}m=k}r=o===-1||u===-1?null:{start:o,end:u}}else r=null}r=r||{start:0,end:0}}else r=null;for(ua={focusedElem:e,selectionRange:r},El=!1,F=t;F!==null;)if(t=F,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,F=e;else for(;F!==null;){t=F;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var w=v.memoizedProps,T=v.memoizedState,c=t.stateNode,f=c.getSnapshotBeforeUpdate(t.elementType===t.type?w:ht(t.type,w),T);c.__reactInternalSnapshotBeforeUpdate=f}break;case 3:var p=t.stateNode.containerInfo;p.nodeType===1?p.textContent="":p.nodeType===9&&p.documentElement&&p.removeChild(p.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(P(163))}}catch(g){he(t,t.return,g)}if(e=t.sibling,e!==null){e.return=t.return,F=e;break}F=t.return}return v=lc,lc=!1,v}function cs(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var s=n=n.next;do{if((s.tag&e)===e){var l=s.destroy;s.destroy=void 0,l!==void 0&&Ca(t,r,l)}s=s.next}while(s!==n)}}function ni(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function Ea(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function Ff(e){var t=e.alternate;t!==null&&(e.alternate=null,Ff(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Et],delete t[Ss],delete t[fa],delete t[fm],delete t[hm])),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 Lf(e){return e.tag===5||e.tag===3||e.tag===4}function ic(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Lf(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 ba(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Tl));else if(n!==4&&(e=e.child,e!==null))for(ba(e,t,r),e=e.sibling;e!==null;)ba(e,t,r),e=e.sibling}function Pa(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(Pa(e,t,r),e=e.sibling;e!==null;)Pa(e,t,r),e=e.sibling}var Ce=null,yt=!1;function Wt(e,t,r){for(r=r.child;r!==null;)If(e,t,r),r=r.sibling}function If(e,t,r){if(bt&&typeof bt.onCommitFiberUnmount=="function")try{bt.onCommitFiberUnmount(Gl,r)}catch{}switch(r.tag){case 5:Re||pn(r,t);case 6:var n=Ce,s=yt;Ce=null,Wt(e,t,r),Ce=n,yt=s,Ce!==null&&(yt?(e=Ce,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Ce.removeChild(r.stateNode));break;case 18:Ce!==null&&(yt?(e=Ce,r=r.stateNode,e.nodeType===8?Pi(e.parentNode,r):e.nodeType===1&&Pi(e,r),vs(e)):Pi(Ce,r.stateNode));break;case 4:n=Ce,s=yt,Ce=r.stateNode.containerInfo,yt=!0,Wt(e,t,r),Ce=n,yt=s;break;case 0:case 11:case 14:case 15:if(!Re&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){s=n=n.next;do{var l=s,a=l.destroy;l=l.tag,a!==void 0&&(l&2||l&4)&&Ca(r,t,a),s=s.next}while(s!==n)}Wt(e,t,r);break;case 1:if(!Re&&(pn(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(o){he(r,t,o)}Wt(e,t,r);break;case 21:Wt(e,t,r);break;case 22:r.mode&1?(Re=(n=Re)||r.memoizedState!==null,Wt(e,t,r),Re=n):Wt(e,t,r);break;default:Wt(e,t,r)}}function ac(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new Tm),t.forEach(function(n){var s=Am.bind(null,e,n);r.has(n)||(r.add(n),n.then(s,s))})}}function ft(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var s=r[n];try{var l=e,a=t,o=a;e:for(;o!==null;){switch(o.tag){case 5:Ce=o.stateNode,yt=!1;break e;case 3:Ce=o.stateNode.containerInfo,yt=!0;break e;case 4:Ce=o.stateNode.containerInfo,yt=!0;break e}o=o.return}if(Ce===null)throw Error(P(160));If(l,a,s),Ce=null,yt=!1;var u=s.alternate;u!==null&&(u.return=null),s.return=null}catch(d){he(s,t,d)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Df(t,e),t=t.sibling}function Df(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ft(t,e),kt(e),n&4){try{cs(3,e,e.return),ni(3,e)}catch(w){he(e,e.return,w)}try{cs(5,e,e.return)}catch(w){he(e,e.return,w)}}break;case 1:ft(t,e),kt(e),n&512&&r!==null&&pn(r,r.return);break;case 5:if(ft(t,e),kt(e),n&512&&r!==null&&pn(r,r.return),e.flags&32){var s=e.stateNode;try{ps(s,"")}catch(w){he(e,e.return,w)}}if(n&4&&(s=e.stateNode,s!=null)){var l=e.memoizedProps,a=r!==null?r.memoizedProps:l,o=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{o==="input"&&l.type==="radio"&&l.name!=null&&ld(s,l),Ji(o,a);var d=Ji(o,l);for(a=0;a<u.length;a+=2){var y=u[a],m=u[a+1];y==="style"?cd(s,m):y==="dangerouslySetInnerHTML"?od(s,m):y==="children"?ps(s,m):so(s,y,m,d)}switch(o){case"input":Wi(s,l);break;case"textarea":id(s,l);break;case"select":var x=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!l.multiple;var k=l.value;k!=null?yn(s,!!l.multiple,k,!1):x!==!!l.multiple&&(l.defaultValue!=null?yn(s,!!l.multiple,l.defaultValue,!0):yn(s,!!l.multiple,l.multiple?[]:"",!1))}s[Ss]=l}catch(w){he(e,e.return,w)}}break;case 6:if(ft(t,e),kt(e),n&4){if(e.stateNode===null)throw Error(P(162));s=e.stateNode,l=e.memoizedProps;try{s.nodeValue=l}catch(w){he(e,e.return,w)}}break;case 3:if(ft(t,e),kt(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{vs(t.containerInfo)}catch(w){he(e,e.return,w)}break;case 4:ft(t,e),kt(e);break;case 13:ft(t,e),kt(e),s=e.child,s.flags&8192&&(l=s.memoizedState!==null,s.stateNode.isHidden=l,!l||s.alternate!==null&&s.alternate.memoizedState!==null||(Do=me())),n&4&&ac(e);break;case 22:if(y=r!==null&&r.memoizedState!==null,e.mode&1?(Re=(d=Re)||y,ft(t,e),Re=d):ft(t,e),kt(e),n&8192){if(d=e.memoizedState!==null,(e.stateNode.isHidden=d)&&!y&&e.mode&1)for(F=e,y=e.child;y!==null;){for(m=F=y;F!==null;){switch(x=F,k=x.child,x.tag){case 0:case 11:case 14:case 15:cs(4,x,x.return);break;case 1:pn(x,x.return);var v=x.stateNode;if(typeof v.componentWillUnmount=="function"){n=x,r=x.return;try{t=n,v.props=t.memoizedProps,v.state=t.memoizedState,v.componentWillUnmount()}catch(w){he(n,r,w)}}break;case 5:pn(x,x.return);break;case 22:if(x.memoizedState!==null){uc(m);continue}}k!==null?(k.return=x,F=k):uc(m)}y=y.sibling}e:for(y=null,m=e;;){if(m.tag===5){if(y===null){y=m;try{s=m.stateNode,d?(l=s.style,typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none"):(o=m.stateNode,u=m.memoizedProps.style,a=u!=null&&u.hasOwnProperty("display")?u.display:null,o.style.display=ud("display",a))}catch(w){he(e,e.return,w)}}}else if(m.tag===6){if(y===null)try{m.stateNode.nodeValue=d?"":m.memoizedProps}catch(w){he(e,e.return,w)}}else if((m.tag!==22&&m.tag!==23||m.memoizedState===null||m===e)&&m.child!==null){m.child.return=m,m=m.child;continue}if(m===e)break e;for(;m.sibling===null;){if(m.return===null||m.return===e)break e;y===m&&(y=null),m=m.return}y===m&&(y=null),m.sibling.return=m.return,m=m.sibling}}break;case 19:ft(t,e),kt(e),n&4&&ac(e);break;case 21:break;default:ft(t,e),kt(e)}}function kt(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(Lf(r)){var n=r;break e}r=r.return}throw Error(P(160))}switch(n.tag){case 5:var s=n.stateNode;n.flags&32&&(ps(s,""),n.flags&=-33);var l=ic(e);Pa(e,l,s);break;case 3:case 4:var a=n.stateNode.containerInfo,o=ic(e);ba(e,o,a);break;default:throw Error(P(161))}}catch(u){he(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function _m(e,t,r){F=e,Af(e)}function Af(e,t,r){for(var n=(e.mode&1)!==0;F!==null;){var s=F,l=s.child;if(s.tag===22&&n){var a=s.memoizedState!==null||nl;if(!a){var o=s.alternate,u=o!==null&&o.memoizedState!==null||Re;o=nl;var d=Re;if(nl=a,(Re=u)&&!d)for(F=s;F!==null;)a=F,u=a.child,a.tag===22&&a.memoizedState!==null?cc(s):u!==null?(u.return=a,F=u):cc(s);for(;l!==null;)F=l,Af(l),l=l.sibling;F=s,nl=o,Re=d}oc(e)}else s.subtreeFlags&8772&&l!==null?(l.return=s,F=l):oc(e)}}function oc(e){for(;F!==null;){var t=F;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Re||ni(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!Re)if(r===null)n.componentDidMount();else{var s=t.elementType===t.type?r.memoizedProps:ht(t.type,r.memoizedProps);n.componentDidUpdate(s,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var l=t.updateQueue;l!==null&&Vu(t,l,n);break;case 3:var a=t.updateQueue;if(a!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}Vu(t,a,r)}break;case 5:var o=t.stateNode;if(r===null&&t.flags&4){r=o;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&r.focus();break;case"img":u.src&&(r.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var d=t.alternate;if(d!==null){var y=d.memoizedState;if(y!==null){var m=y.dehydrated;m!==null&&vs(m)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(P(163))}Re||t.flags&512&&Ea(t)}catch(x){he(t,t.return,x)}}if(t===e){F=null;break}if(r=t.sibling,r!==null){r.return=t.return,F=r;break}F=t.return}}function uc(e){for(;F!==null;){var t=F;if(t===e){F=null;break}var r=t.sibling;if(r!==null){r.return=t.return,F=r;break}F=t.return}}function cc(e){for(;F!==null;){var t=F;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{ni(4,t)}catch(u){he(t,r,u)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var s=t.return;try{n.componentDidMount()}catch(u){he(t,s,u)}}var l=t.return;try{Ea(t)}catch(u){he(t,l,u)}break;case 5:var a=t.return;try{Ea(t)}catch(u){he(t,a,u)}}}catch(u){he(t,t.return,u)}if(t===e){F=null;break}var o=t.sibling;if(o!==null){o.return=t.return,F=o;break}F=t.return}}var Rm=Math.ceil,$l=Vt.ReactCurrentDispatcher,Lo=Vt.ReactCurrentOwner,ot=Vt.ReactCurrentBatchConfig,X=0,Se=null,xe=null,Ee=0,Xe=0,mn=jr(0),we=0,Ts=null,Gr=0,si=0,Io=0,ds=null,Be=null,Do=0,$n=1/0,Rt=null,Ul=!1,Ta=null,mr=null,sl=!1,ur=null,Ql=0,fs=0,Ma=null,yl=-1,xl=0;function Ie(){return X&6?me():yl!==-1?yl:yl=me()}function yr(e){return e.mode&1?X&2&&Ee!==0?Ee&-Ee:mm.transition!==null?(xl===0&&(xl=jd()),xl):(e=ee,e!==0||(e=window.event,e=e===void 0?16:Td(e.type)),e):1}function gt(e,t,r,n){if(50<fs)throw fs=0,Ma=null,Error(P(185));Ds(e,r,n),(!(X&2)||e!==Se)&&(e===Se&&(!(X&2)&&(si|=r),we===4&&Jt(e,Ee)),We(e,n),r===1&&X===0&&!(t.mode&1)&&($n=me()+500,ei&&Sr()))}function We(e,t){var r=e.callbackNode;mp(e,t);var n=Cl(e,e===Se?Ee:0);if(n===0)r!==null&&gu(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&gu(r),t===1)e.tag===0?pm(dc.bind(null,e)):qd(dc.bind(null,e)),cm(function(){!(X&6)&&Sr()}),r=null;else{switch(Sd(n)){case 1:r=uo;break;case 4:r=wd;break;case 16:r=Nl;break;case 536870912:r=kd;break;default:r=Nl}r=Wf(r,$f.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function $f(e,t){if(yl=-1,xl=0,X&6)throw Error(P(327));var r=e.callbackNode;if(kn()&&e.callbackNode!==r)return null;var n=Cl(e,e===Se?Ee:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=Bl(e,n);else{t=n;var s=X;X|=2;var l=Qf();(Se!==e||Ee!==t)&&(Rt=null,$n=me()+500,Hr(e,t));do try{Fm();break}catch(o){Uf(e,o)}while(!0);So(),$l.current=l,X=s,xe!==null?t=0:(Se=null,Ee=0,t=we)}if(t!==0){if(t===2&&(s=na(e),s!==0&&(n=s,t=_a(e,s))),t===1)throw r=Ts,Hr(e,0),Jt(e,n),We(e,me()),r;if(t===6)Jt(e,n);else{if(s=e.current.alternate,!(n&30)&&!Om(s)&&(t=Bl(e,n),t===2&&(l=na(e),l!==0&&(n=l,t=_a(e,l))),t===1))throw r=Ts,Hr(e,0),Jt(e,n),We(e,me()),r;switch(e.finishedWork=s,e.finishedLanes=n,t){case 0:case 1:throw Error(P(345));case 2:Mr(e,Be,Rt);break;case 3:if(Jt(e,n),(n&130023424)===n&&(t=Do+500-me(),10<t)){if(Cl(e,0)!==0)break;if(s=e.suspendedLanes,(s&n)!==n){Ie(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=da(Mr.bind(null,e,Be,Rt),t);break}Mr(e,Be,Rt);break;case 4:if(Jt(e,n),(n&4194240)===n)break;for(t=e.eventTimes,s=-1;0<n;){var a=31-vt(n);l=1<<a,a=t[a],a>s&&(s=a),n&=~l}if(n=s,n=me()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Rm(n/1960))-n,10<n){e.timeoutHandle=da(Mr.bind(null,e,Be,Rt),n);break}Mr(e,Be,Rt);break;case 5:Mr(e,Be,Rt);break;default:throw Error(P(329))}}}return We(e,me()),e.callbackNode===r?$f.bind(null,e):null}function _a(e,t){var r=ds;return e.current.memoizedState.isDehydrated&&(Hr(e,t).flags|=256),e=Bl(e,t),e!==2&&(t=Be,Be=r,t!==null&&Ra(t)),e}function Ra(e){Be===null?Be=e:Be.push.apply(Be,e)}function Om(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var s=r[n],l=s.getSnapshot;s=s.value;try{if(!wt(l(),s))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;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 Jt(e,t){for(t&=~Io,t&=~si,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-vt(t),n=1<<r;e[r]=-1,t&=~n}}function dc(e){if(X&6)throw Error(P(327));kn();var t=Cl(e,0);if(!(t&1))return We(e,me()),null;var r=Bl(e,t);if(e.tag!==0&&r===2){var n=na(e);n!==0&&(t=n,r=_a(e,n))}if(r===1)throw r=Ts,Hr(e,0),Jt(e,t),We(e,me()),r;if(r===6)throw Error(P(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Mr(e,Be,Rt),We(e,me()),null}function Ao(e,t){var r=X;X|=1;try{return e(t)}finally{X=r,X===0&&($n=me()+500,ei&&Sr())}}function Xr(e){ur!==null&&ur.tag===0&&!(X&6)&&kn();var t=X;X|=1;var r=ot.transition,n=ee;try{if(ot.transition=null,ee=1,e)return e()}finally{ee=n,ot.transition=r,X=t,!(X&6)&&Sr()}}function $o(){Xe=mn.current,ie(mn)}function Hr(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,um(r)),xe!==null)for(r=xe.return;r!==null;){var n=r;switch(wo(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&Ml();break;case 3:Dn(),ie(Ke),ie(Oe),To();break;case 5:Po(n);break;case 4:Dn();break;case 13:ie(oe);break;case 19:ie(oe);break;case 10:No(n.type._context);break;case 22:case 23:$o()}r=r.return}if(Se=e,xe=e=xr(e.current,null),Ee=Xe=t,we=0,Ts=null,Io=si=Gr=0,Be=ds=null,Rr!==null){for(t=0;t<Rr.length;t++)if(r=Rr[t],n=r.interleaved,n!==null){r.interleaved=null;var s=n.next,l=r.pending;if(l!==null){var a=l.next;l.next=s,n.next=a}r.pending=n}Rr=null}return e}function Uf(e,t){do{var r=xe;try{if(So(),hl.current=Al,Dl){for(var n=ue.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}Dl=!1}if(qr=0,je=ve=ue=null,us=!1,Es=0,Lo.current=null,r===null||r.return===null){we=1,Ts=t,xe=null;break}e:{var l=e,a=r.return,o=r,u=t;if(t=Ee,o.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var d=u,y=o,m=y.tag;if(!(y.mode&1)&&(m===0||m===11||m===15)){var x=y.alternate;x?(y.updateQueue=x.updateQueue,y.memoizedState=x.memoizedState,y.lanes=x.lanes):(y.updateQueue=null,y.memoizedState=null)}var k=Ju(a);if(k!==null){k.flags&=-257,Zu(k,a,o,l,t),k.mode&1&&Yu(l,d,t),t=k,u=d;var v=t.updateQueue;if(v===null){var w=new Set;w.add(u),t.updateQueue=w}else v.add(u);break e}else{if(!(t&1)){Yu(l,d,t),Uo();break e}u=Error(P(426))}}else if(ae&&o.mode&1){var T=Ju(a);if(T!==null){!(T.flags&65536)&&(T.flags|=256),Zu(T,a,o,l,t),ko(An(u,o));break e}}l=u=An(u,o),we!==4&&(we=2),ds===null?ds=[l]:ds.push(l),l=a;do{switch(l.tag){case 3:l.flags|=65536,t&=-t,l.lanes|=t;var c=Nf(l,u,t);Ku(l,c);break e;case 1:o=u;var f=l.type,p=l.stateNode;if(!(l.flags&128)&&(typeof f.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(mr===null||!mr.has(p)))){l.flags|=65536,t&=-t,l.lanes|=t;var g=Cf(l,o,t);Ku(l,g);break e}}l=l.return}while(l!==null)}Hf(r)}catch(b){t=b,xe===r&&r!==null&&(xe=r=r.return);continue}break}while(!0)}function Qf(){var e=$l.current;return $l.current=Al,e===null?Al:e}function Uo(){(we===0||we===3||we===2)&&(we=4),Se===null||!(Gr&268435455)&&!(si&268435455)||Jt(Se,Ee)}function Bl(e,t){var r=X;X|=2;var n=Qf();(Se!==e||Ee!==t)&&(Rt=null,Hr(e,t));do try{zm();break}catch(s){Uf(e,s)}while(!0);if(So(),X=r,$l.current=n,xe!==null)throw Error(P(261));return Se=null,Ee=0,we}function zm(){for(;xe!==null;)Bf(xe)}function Fm(){for(;xe!==null&&!ip();)Bf(xe)}function Bf(e){var t=Vf(e.alternate,e,Xe);e.memoizedProps=e.pendingProps,t===null?Hf(e):xe=t,Lo.current=null}function Hf(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=Pm(r,t),r!==null){r.flags&=32767,xe=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{we=6,xe=null;return}}else if(r=bm(r,t,Xe),r!==null){xe=r;return}if(t=t.sibling,t!==null){xe=t;return}xe=t=e}while(t!==null);we===0&&(we=5)}function Mr(e,t,r){var n=ee,s=ot.transition;try{ot.transition=null,ee=1,Lm(e,t,r,n)}finally{ot.transition=s,ee=n}return null}function Lm(e,t,r,n){do kn();while(ur!==null);if(X&6)throw Error(P(327));r=e.finishedWork;var s=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(P(177));e.callbackNode=null,e.callbackPriority=0;var l=r.lanes|r.childLanes;if(yp(e,l),e===Se&&(xe=Se=null,Ee=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||sl||(sl=!0,Wf(Nl,function(){return kn(),null})),l=(r.flags&15990)!==0,r.subtreeFlags&15990||l){l=ot.transition,ot.transition=null;var a=ee;ee=1;var o=X;X|=4,Lo.current=null,Mm(e,r),Df(r,e),rm(ua),El=!!oa,ua=oa=null,e.current=r,_m(r),ap(),X=o,ee=a,ot.transition=l}else e.current=r;if(sl&&(sl=!1,ur=e,Ql=s),l=e.pendingLanes,l===0&&(mr=null),cp(r.stateNode),We(e,me()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)s=t[r],n(s.value,{componentStack:s.stack,digest:s.digest});if(Ul)throw Ul=!1,e=Ta,Ta=null,e;return Ql&1&&e.tag!==0&&kn(),l=e.pendingLanes,l&1?e===Ma?fs++:(fs=0,Ma=e):fs=0,Sr(),null}function kn(){if(ur!==null){var e=Sd(Ql),t=ot.transition,r=ee;try{if(ot.transition=null,ee=16>e?16:e,ur===null)var n=!1;else{if(e=ur,ur=null,Ql=0,X&6)throw Error(P(331));var s=X;for(X|=4,F=e.current;F!==null;){var l=F,a=l.child;if(F.flags&16){var o=l.deletions;if(o!==null){for(var u=0;u<o.length;u++){var d=o[u];for(F=d;F!==null;){var y=F;switch(y.tag){case 0:case 11:case 15:cs(8,y,l)}var m=y.child;if(m!==null)m.return=y,F=m;else for(;F!==null;){y=F;var x=y.sibling,k=y.return;if(Ff(y),y===d){F=null;break}if(x!==null){x.return=k,F=x;break}F=k}}}var v=l.alternate;if(v!==null){var w=v.child;if(w!==null){v.child=null;do{var T=w.sibling;w.sibling=null,w=T}while(w!==null)}}F=l}}if(l.subtreeFlags&2064&&a!==null)a.return=l,F=a;else e:for(;F!==null;){if(l=F,l.flags&2048)switch(l.tag){case 0:case 11:case 15:cs(9,l,l.return)}var c=l.sibling;if(c!==null){c.return=l.return,F=c;break e}F=l.return}}var f=e.current;for(F=f;F!==null;){a=F;var p=a.child;if(a.subtreeFlags&2064&&p!==null)p.return=a,F=p;else e:for(a=f;F!==null;){if(o=F,o.flags&2048)try{switch(o.tag){case 0:case 11:case 15:ni(9,o)}}catch(b){he(o,o.return,b)}if(o===a){F=null;break e}var g=o.sibling;if(g!==null){g.return=o.return,F=g;break e}F=o.return}}if(X=s,Sr(),bt&&typeof bt.onPostCommitFiberRoot=="function")try{bt.onPostCommitFiberRoot(Gl,e)}catch{}n=!0}return n}finally{ee=r,ot.transition=t}}return!1}function fc(e,t,r){t=An(r,t),t=Nf(e,t,1),e=pr(e,t,1),t=Ie(),e!==null&&(Ds(e,1,t),We(e,t))}function he(e,t,r){if(e.tag===3)fc(e,e,r);else for(;t!==null;){if(t.tag===3){fc(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(mr===null||!mr.has(n))){e=An(r,e),e=Cf(t,e,1),t=pr(t,e,1),e=Ie(),t!==null&&(Ds(t,1,e),We(t,e));break}}t=t.return}}function Im(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=Ie(),e.pingedLanes|=e.suspendedLanes&r,Se===e&&(Ee&r)===r&&(we===4||we===3&&(Ee&130023424)===Ee&&500>me()-Do?Hr(e,0):Io|=r),We(e,t)}function Kf(e,t){t===0&&(e.mode&1?(t=qs,qs<<=1,!(qs&130023424)&&(qs=4194304)):t=1);var r=Ie();e=Ht(e,t),e!==null&&(Ds(e,t,r),We(e,r))}function Dm(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Kf(e,r)}function Am(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,s=e.memoizedState;s!==null&&(r=s.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(P(314))}n!==null&&n.delete(t),Kf(e,r)}var Vf;Vf=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ke.current)He=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return He=!1,Em(e,t,r);He=!!(e.flags&131072)}else He=!1,ae&&t.flags&1048576&&Gd(t,Ol,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;ml(e,t),e=t.pendingProps;var s=Fn(t,Oe.current);wn(t,r),s=_o(null,t,n,e,s,r);var l=Ro();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ve(n)?(l=!0,_l(t)):l=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Eo(t),s.updater=ri,t.stateNode=s,s._reactInternals=t,va(t,n,e,r),t=ka(null,t,n,!0,l,r)):(t.tag=0,ae&&l&&go(t),Fe(null,t,s,r),t=t.child),t;case 16:n=t.elementType;e:{switch(ml(e,t),e=t.pendingProps,s=n._init,n=s(n._payload),t.type=n,s=t.tag=Um(n),e=ht(n,e),s){case 0:t=wa(null,t,n,e,r);break e;case 1:t=rc(null,t,n,e,r);break e;case 11:t=ec(null,t,n,e,r);break e;case 14:t=tc(null,t,n,ht(n.type,e),r);break e}throw Error(P(306,n,""))}return t;case 0:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:ht(n,s),wa(e,t,n,s,r);case 1:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:ht(n,s),rc(e,t,n,s,r);case 3:e:{if(Tf(t),e===null)throw Error(P(387));n=t.pendingProps,l=t.memoizedState,s=l.element,tf(e,t),Ll(t,n,null,r);var a=t.memoizedState;if(n=a.element,l.isDehydrated)if(l={element:n,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=l,t.memoizedState=l,t.flags&256){s=An(Error(P(423)),t),t=nc(e,t,n,r,s);break e}else if(n!==s){s=An(Error(P(424)),t),t=nc(e,t,n,r,s);break e}else for(Je=hr(t.stateNode.containerInfo.firstChild),Ze=t,ae=!0,xt=null,r=Zd(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Ln(),n===s){t=Kt(e,t,r);break e}Fe(e,t,n,r)}t=t.child}return t;case 5:return rf(t),e===null&&ma(t),n=t.type,s=t.pendingProps,l=e!==null?e.memoizedProps:null,a=s.children,ca(n,s)?a=null:l!==null&&ca(n,l)&&(t.flags|=32),Pf(e,t),Fe(e,t,a,r),t.child;case 6:return e===null&&ma(t),null;case 13:return Mf(e,t,r);case 4:return bo(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=In(t,null,n,r):Fe(e,t,n,r),t.child;case 11:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:ht(n,s),ec(e,t,n,s,r);case 7:return Fe(e,t,t.pendingProps,r),t.child;case 8:return Fe(e,t,t.pendingProps.children,r),t.child;case 12:return Fe(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,s=t.pendingProps,l=t.memoizedProps,a=s.value,ne(zl,n._currentValue),n._currentValue=a,l!==null)if(wt(l.value,a)){if(l.children===s.children&&!Ke.current){t=Kt(e,t,r);break e}}else for(l=t.child,l!==null&&(l.return=t);l!==null;){var o=l.dependencies;if(o!==null){a=l.child;for(var u=o.firstContext;u!==null;){if(u.context===n){if(l.tag===1){u=$t(-1,r&-r),u.tag=2;var d=l.updateQueue;if(d!==null){d=d.shared;var y=d.pending;y===null?u.next=u:(u.next=y.next,y.next=u),d.pending=u}}l.lanes|=r,u=l.alternate,u!==null&&(u.lanes|=r),ya(l.return,r,t),o.lanes|=r;break}u=u.next}}else if(l.tag===10)a=l.type===t.type?null:l.child;else if(l.tag===18){if(a=l.return,a===null)throw Error(P(341));a.lanes|=r,o=a.alternate,o!==null&&(o.lanes|=r),ya(a,r,t),a=l.sibling}else a=l.child;if(a!==null)a.return=l;else for(a=l;a!==null;){if(a===t){a=null;break}if(l=a.sibling,l!==null){l.return=a.return,a=l;break}a=a.return}l=a}Fe(e,t,s.children,r),t=t.child}return t;case 9:return s=t.type,n=t.pendingProps.children,wn(t,r),s=ut(s),n=n(s),t.flags|=1,Fe(e,t,n,r),t.child;case 14:return n=t.type,s=ht(n,t.pendingProps),s=ht(n.type,s),tc(e,t,n,s,r);case 15:return Ef(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:ht(n,s),ml(e,t),t.tag=1,Ve(n)?(e=!0,_l(t)):e=!1,wn(t,r),Sf(t,n,s),va(t,n,s,r),ka(null,t,n,!0,e,r);case 19:return _f(e,t,r);case 22:return bf(e,t,r)}throw Error(P(156,t.tag))};function Wf(e,t){return gd(e,t)}function $m(e,t,r,n){this.tag=e,this.key=r,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=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function at(e,t,r,n){return new $m(e,t,r,n)}function Qo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Um(e){if(typeof e=="function")return Qo(e)?1:0;if(e!=null){if(e=e.$$typeof,e===io)return 11;if(e===ao)return 14}return 2}function xr(e,t){var r=e.alternate;return r===null?(r=at(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function vl(e,t,r,n,s,l){var a=2;if(n=e,typeof e=="function")Qo(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case sn:return Kr(r.children,s,l,t);case lo:a=8,s|=8;break;case Qi:return e=at(12,r,t,s|2),e.elementType=Qi,e.lanes=l,e;case Bi:return e=at(13,r,t,s),e.elementType=Bi,e.lanes=l,e;case Hi:return e=at(19,r,t,s),e.elementType=Hi,e.lanes=l,e;case rd:return li(r,s,l,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ed:a=10;break e;case td:a=9;break e;case io:a=11;break e;case ao:a=14;break e;case Gt:a=16,n=null;break e}throw Error(P(130,e==null?e:typeof e,""))}return t=at(a,r,t,s),t.elementType=e,t.type=n,t.lanes=l,t}function Kr(e,t,r,n){return e=at(7,e,n,t),e.lanes=r,e}function li(e,t,r,n){return e=at(22,e,n,t),e.elementType=rd,e.lanes=r,e.stateNode={isHidden:!1},e}function Li(e,t,r){return e=at(6,e,null,t),e.lanes=r,e}function Ii(e,t,r){return t=at(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Qm(e,t,r,n,s){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=xi(0),this.expirationTimes=xi(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=xi(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Bo(e,t,r,n,s,l,a,o,u){return e=new Qm(e,t,r,o,u),t===1?(t=1,l===!0&&(t|=8)):t=0,l=at(3,null,null,t),e.current=l,l.stateNode=e,l.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Eo(l),e}function Bm(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:nn,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function qf(e){if(!e)return wr;e=e._reactInternals;e:{if(tn(e)!==e||e.tag!==1)throw Error(P(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ve(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(P(171))}if(e.tag===1){var r=e.type;if(Ve(r))return Wd(e,r,t)}return t}function Gf(e,t,r,n,s,l,a,o,u){return e=Bo(r,n,!0,e,s,l,a,o,u),e.context=qf(null),r=e.current,n=Ie(),s=yr(r),l=$t(n,s),l.callback=t??null,pr(r,l,s),e.current.lanes=s,Ds(e,s,n),We(e,n),e}function ii(e,t,r,n){var s=t.current,l=Ie(),a=yr(s);return r=qf(r),t.context===null?t.context=r:t.pendingContext=r,t=$t(l,a),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=pr(s,t,a),e!==null&&(gt(e,s,a,l),fl(e,s,a)),a}function Hl(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 hc(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function Ho(e,t){hc(e,t),(e=e.alternate)&&hc(e,t)}function Hm(){return null}var Xf=typeof reportError=="function"?reportError:function(e){console.error(e)};function Ko(e){this._internalRoot=e}ai.prototype.render=Ko.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(P(409));ii(e,t,null,null)};ai.prototype.unmount=Ko.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Xr(function(){ii(null,e,null,null)}),t[Bt]=null}};function ai(e){this._internalRoot=e}ai.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ed();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Yt.length&&t!==0&&t<Yt[r].priority;r++);Yt.splice(r,0,e),r===0&&Pd(e)}};function Vo(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function oi(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function pc(){}function Km(e,t,r,n,s){if(s){if(typeof n=="function"){var l=n;n=function(){var d=Hl(a);l.call(d)}}var a=Gf(t,n,e,0,null,!1,!1,"",pc);return e._reactRootContainer=a,e[Bt]=a.current,ks(e.nodeType===8?e.parentNode:e),Xr(),a}for(;s=e.lastChild;)e.removeChild(s);if(typeof n=="function"){var o=n;n=function(){var d=Hl(u);o.call(d)}}var u=Bo(e,0,!1,null,null,!1,!1,"",pc);return e._reactRootContainer=u,e[Bt]=u.current,ks(e.nodeType===8?e.parentNode:e),Xr(function(){ii(t,u,r,n)}),u}function ui(e,t,r,n,s){var l=r._reactRootContainer;if(l){var a=l;if(typeof s=="function"){var o=s;s=function(){var u=Hl(a);o.call(u)}}ii(t,a,e,s)}else a=Km(r,t,e,s,n);return Hl(a)}Nd=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=ts(t.pendingLanes);r!==0&&(co(t,r|1),We(t,me()),!(X&6)&&($n=me()+500,Sr()))}break;case 13:Xr(function(){var n=Ht(e,1);if(n!==null){var s=Ie();gt(n,e,1,s)}}),Ho(e,1)}};fo=function(e){if(e.tag===13){var t=Ht(e,134217728);if(t!==null){var r=Ie();gt(t,e,134217728,r)}Ho(e,134217728)}};Cd=function(e){if(e.tag===13){var t=yr(e),r=Ht(e,t);if(r!==null){var n=Ie();gt(r,e,t,n)}Ho(e,t)}};Ed=function(){return ee};bd=function(e,t){var r=ee;try{return ee=e,t()}finally{ee=r}};ea=function(e,t,r){switch(t){case"input":if(Wi(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var s=Zl(n);if(!s)throw Error(P(90));sd(n),Wi(n,s)}}}break;case"textarea":id(e,r);break;case"select":t=r.value,t!=null&&yn(e,!!r.multiple,t,!1)}};hd=Ao;pd=Xr;var Vm={usingClientEntryPoint:!1,Events:[$s,un,Zl,dd,fd,Ao]},Jn={findFiberByHostInstance:_r,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Wm={bundleType:Jn.bundleType,version:Jn.version,rendererPackageName:Jn.rendererPackageName,rendererConfig:Jn.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Vt.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=xd(e),e===null?null:e.stateNode},findFiberByHostInstance:Jn.findFiberByHostInstance||Hm,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 ll=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ll.isDisabled&&ll.supportsFiber)try{Gl=ll.inject(Wm),bt=ll}catch{}}tt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Vm;tt.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Vo(t))throw Error(P(200));return Bm(e,t,null,r)};tt.createRoot=function(e,t){if(!Vo(e))throw Error(P(299));var r=!1,n="",s=Xf;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=Bo(e,1,!1,null,null,r,!1,n,s),e[Bt]=t.current,ks(e.nodeType===8?e.parentNode:e),new Ko(t)};tt.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(P(188)):(e=Object.keys(e).join(","),Error(P(268,e)));return e=xd(t),e=e===null?null:e.stateNode,e};tt.flushSync=function(e){return Xr(e)};tt.hydrate=function(e,t,r){if(!oi(t))throw Error(P(200));return ui(null,e,t,!0,r)};tt.hydrateRoot=function(e,t,r){if(!Vo(e))throw Error(P(405));var n=r!=null&&r.hydratedSources||null,s=!1,l="",a=Xf;if(r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(l=r.identifierPrefix),r.onRecoverableError!==void 0&&(a=r.onRecoverableError)),t=Gf(t,null,e,1,r??null,s,!1,l,a),e[Bt]=t.current,ks(e),n)for(e=0;e<n.length;e++)r=n[e],s=r._getVersion,s=s(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,s]:t.mutableSourceEagerHydrationData.push(r,s);return new ai(t)};tt.render=function(e,t,r){if(!oi(t))throw Error(P(200));return ui(null,e,t,!1,r)};tt.unmountComponentAtNode=function(e){if(!oi(e))throw Error(P(40));return e._reactRootContainer?(Xr(function(){ui(null,null,e,!1,function(){e._reactRootContainer=null,e[Bt]=null})}),!0):!1};tt.unstable_batchedUpdates=Ao;tt.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!oi(r))throw Error(P(200));if(e==null||e._reactInternals===void 0)throw Error(P(38));return ui(e,t,r,!1,n)};tt.version="18.3.1-next-f1338f8080-20240426";function Yf(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Yf)}catch(e){console.error(e)}}Yf(),Xc.exports=tt;var qm=Xc.exports,mc=qm;$i.createRoot=mc.createRoot,$i.hydrateRoot=mc.hydrateRoot;var Hn=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Gm={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Zt,Ya,Pc,Xm=(Pc=class{constructor(){A(this,Zt,Gm);A(this,Ya,!1)}setTimeoutProvider(e){R(this,Zt,e)}setTimeout(e,t){return h(this,Zt).setTimeout(e,t)}clearTimeout(e){h(this,Zt).clearTimeout(e)}setInterval(e,t){return h(this,Zt).setInterval(e,t)}clearInterval(e){h(this,Zt).clearInterval(e)}},Zt=new WeakMap,Ya=new WeakMap,Pc),zr=new Xm;function Ym(e){setTimeout(e,0)}var Yr=typeof window>"u"||"Deno"in globalThis;function Le(){}function Jm(e,t){return typeof e=="function"?e(t):e}function Oa(e){return typeof e=="number"&&e>=0&&e!==1/0}function Jf(e,t){return Math.max(e+(t||0)-Date.now(),0)}function vr(e,t){return typeof e=="function"?e(t):e}function st(e,t){return typeof e=="function"?e(t):e}function yc(e,t){const{type:r="all",exact:n,fetchStatus:s,predicate:l,queryKey:a,stale:o}=e;if(a){if(n){if(t.queryHash!==Wo(a,t.options))return!1}else if(!Ms(t.queryKey,a))return!1}if(r!=="all"){const u=t.isActive();if(r==="active"&&!u||r==="inactive"&&u)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||s&&s!==t.state.fetchStatus||l&&!l(t))}function xc(e,t){const{exact:r,status:n,predicate:s,mutationKey:l}=e;if(l){if(!t.options.mutationKey)return!1;if(r){if(Jr(t.options.mutationKey)!==Jr(l))return!1}else if(!Ms(t.options.mutationKey,l))return!1}return!(n&&t.state.status!==n||s&&!s(t))}function Wo(e,t){return((t==null?void 0:t.queryKeyHashFn)||Jr)(e)}function Jr(e){return JSON.stringify(e,(t,r)=>za(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}function Ms(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Ms(e[r],t[r])):!1}var Zm=Object.prototype.hasOwnProperty;function Zf(e,t,r=0){if(e===t)return e;if(r>500)return t;const n=vc(e)&&vc(t);if(!n&&!(za(e)&&za(t)))return t;const l=(n?e:Object.keys(e)).length,a=n?t:Object.keys(t),o=a.length,u=n?new Array(o):{};let d=0;for(let y=0;y<o;y++){const m=n?y:a[y],x=e[m],k=t[m];if(x===k){u[m]=x,(n?y<l:Zm.call(e,m))&&d++;continue}if(x===null||k===null||typeof x!="object"||typeof k!="object"){u[m]=k;continue}const v=Zf(x,k,r+1);u[m]=v,v===x&&d++}return l===o&&d===l?e:u}function Kl(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function vc(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function za(e){if(!gc(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!gc(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function gc(e){return Object.prototype.toString.call(e)==="[object Object]"}function ey(e){return new Promise(t=>{zr.setTimeout(t,e)})}function Fa(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?Zf(e,t):t}function ty(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function ry(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var qo=Symbol();function eh(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===qo?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Go(e,t){return typeof e=="function"?e(...t):!!e}function ny(e,t,r){let n=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??(s=t()),n||(n=!0,s.aborted?r():s.addEventListener("abort",r,{once:!0})),s)}),e}var Fr,er,jn,Tc,sy=(Tc=class extends Hn{constructor(){super();A(this,Fr);A(this,er);A(this,jn);R(this,jn,t=>{if(!Yr&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){h(this,er)||this.setEventListener(h(this,jn))}onUnsubscribe(){var t;this.hasListeners()||((t=h(this,er))==null||t.call(this),R(this,er,void 0))}setEventListener(t){var r;R(this,jn,t),(r=h(this,er))==null||r.call(this),R(this,er,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){h(this,Fr)!==t&&(R(this,Fr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof h(this,Fr)=="boolean"?h(this,Fr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Fr=new WeakMap,er=new WeakMap,jn=new WeakMap,Tc),Xo=new sy;function La(){let e,t;const r=new Promise((s,l)=>{e=s,t=l});r.status="pending",r.catch(()=>{});function n(s){Object.assign(r,s),delete r.resolve,delete r.reject}return r.resolve=s=>{n({status:"fulfilled",value:s}),e(s)},r.reject=s=>{n({status:"rejected",reason:s}),t(s)},r}var ly=Ym;function iy(){let e=[],t=0,r=o=>{o()},n=o=>{o()},s=ly;const l=o=>{t?e.push(o):s(()=>{r(o)})},a=()=>{const o=e;e=[],o.length&&s(()=>{n(()=>{o.forEach(u=>{r(u)})})})};return{batch:o=>{let u;t++;try{u=o()}finally{t--,t||a()}return u},batchCalls:o=>(...u)=>{l(()=>{o(...u)})},schedule:l,setNotifyFunction:o=>{r=o},setBatchNotifyFunction:o=>{n=o},setScheduler:o=>{s=o}}}var ge=iy(),Sn,tr,Nn,Mc,ay=(Mc=class extends Hn{constructor(){super();A(this,Sn,!0);A(this,tr);A(this,Nn);R(this,Nn,t=>{if(!Yr&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){h(this,tr)||this.setEventListener(h(this,Nn))}onUnsubscribe(){var t;this.hasListeners()||((t=h(this,tr))==null||t.call(this),R(this,tr,void 0))}setEventListener(t){var r;R(this,Nn,t),(r=h(this,tr))==null||r.call(this),R(this,tr,t(this.setOnline.bind(this)))}setOnline(t){h(this,Sn)!==t&&(R(this,Sn,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return h(this,Sn)}},Sn=new WeakMap,tr=new WeakMap,Nn=new WeakMap,Mc),Vl=new ay;function oy(e){return Math.min(1e3*2**e,3e4)}function th(e){return(e??"online")==="online"?Vl.isOnline():!0}var Ia=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function rh(e){let t=!1,r=0,n;const s=La(),l=()=>s.status!=="pending",a=w=>{var T;if(!l()){const c=new Ia(w);x(c),(T=e.onCancel)==null||T.call(e,c)}},o=()=>{t=!0},u=()=>{t=!1},d=()=>Xo.isFocused()&&(e.networkMode==="always"||Vl.isOnline())&&e.canRun(),y=()=>th(e.networkMode)&&e.canRun(),m=w=>{l()||(n==null||n(),s.resolve(w))},x=w=>{l()||(n==null||n(),s.reject(w))},k=()=>new Promise(w=>{var T;n=c=>{(l()||d())&&w(c)},(T=e.onPause)==null||T.call(e)}).then(()=>{var w;n=void 0,l()||(w=e.onContinue)==null||w.call(e)}),v=()=>{if(l())return;let w;const T=r===0?e.initialPromise:void 0;try{w=T??e.fn()}catch(c){w=Promise.reject(c)}Promise.resolve(w).then(m).catch(c=>{var S;if(l())return;const f=e.retry??(Yr?0:3),p=e.retryDelay??oy,g=typeof p=="function"?p(r,c):p,b=f===!0||typeof f=="number"&&r<f||typeof f=="function"&&f(r,c);if(t||!b){x(c);return}r++,(S=e.onFail)==null||S.call(e,r,c),ey(g).then(()=>d()?void 0:k()).then(()=>{t?x(c):v()})})};return{promise:s,status:()=>s.status,cancel:a,continue:()=>(n==null||n(),s),cancelRetry:o,continueRetry:u,canStart:y,start:()=>(y()?v():k().then(v),s)}}var Lr,_c,nh=(_c=class{constructor(){A(this,Lr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Oa(this.gcTime)&&R(this,Lr,zr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Yr?1/0:5*60*1e3))}clearGcTimeout(){h(this,Lr)&&(zr.clearTimeout(h(this,Lr)),R(this,Lr,void 0))}},Lr=new WeakMap,_c),Ir,Cn,nt,Dr,ke,Rs,Ar,pt,_t,Rc,uy=(Rc=class extends nh{constructor(t){super();A(this,pt);A(this,Ir);A(this,Cn);A(this,nt);A(this,Dr);A(this,ke);A(this,Rs);A(this,Ar);R(this,Ar,!1),R(this,Rs,t.defaultOptions),this.setOptions(t.options),this.observers=[],R(this,Dr,t.client),R(this,nt,h(this,Dr).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,R(this,Ir,kc(this.options)),this.state=t.state??h(this,Ir),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=h(this,ke))==null?void 0:t.promise}setOptions(t){if(this.options={...h(this,Rs),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=kc(this.options);r.data!==void 0&&(this.setState(wc(r.data,r.dataUpdatedAt)),R(this,Ir,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&h(this,nt).remove(this)}setData(t,r){const n=Fa(this.state.data,t,this.options);return B(this,pt,_t).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){B(this,pt,_t).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,s;const r=(n=h(this,ke))==null?void 0:n.promise;return(s=h(this,ke))==null||s.cancel(t),r?r.then(Le).catch(Le):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(h(this,Ir))}isActive(){return this.observers.some(t=>st(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===qo||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>vr(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Jf(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=h(this,ke))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=h(this,ke))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),h(this,nt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(h(this,ke)&&(h(this,Ar)?h(this,ke).cancel({revert:!0}):h(this,ke).cancelRetry()),this.scheduleGc()),h(this,nt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||B(this,pt,_t).call(this,{type:"invalidate"})}async fetch(t,r){var u,d,y,m,x,k,v,w,T,c,f,p;if(this.state.fetchStatus!=="idle"&&((u=h(this,ke))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(h(this,ke))return h(this,ke).continueRetry(),h(this,ke).promise}if(t&&this.setOptions(t),!this.options.queryFn){const g=this.observers.find(b=>b.options.queryFn);g&&this.setOptions(g.options)}const n=new AbortController,s=g=>{Object.defineProperty(g,"signal",{enumerable:!0,get:()=>(R(this,Ar,!0),n.signal)})},l=()=>{const g=eh(this.options,r),S=(()=>{const N={client:h(this,Dr),queryKey:this.queryKey,meta:this.meta};return s(N),N})();return R(this,Ar,!1),this.options.persister?this.options.persister(g,S,this):g(S)},o=(()=>{const g={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:h(this,Dr),state:this.state,fetchFn:l};return s(g),g})();(d=this.options.behavior)==null||d.onFetch(o,this),R(this,Cn,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((y=o.fetchOptions)==null?void 0:y.meta))&&B(this,pt,_t).call(this,{type:"fetch",meta:(m=o.fetchOptions)==null?void 0:m.meta}),R(this,ke,rh({initialPromise:r==null?void 0:r.initialPromise,fn:o.fetchFn,onCancel:g=>{g instanceof Ia&&g.revert&&this.setState({...h(this,Cn),fetchStatus:"idle"}),n.abort()},onFail:(g,b)=>{B(this,pt,_t).call(this,{type:"failed",failureCount:g,error:b})},onPause:()=>{B(this,pt,_t).call(this,{type:"pause"})},onContinue:()=>{B(this,pt,_t).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}));try{const g=await h(this,ke).start();if(g===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(g),(k=(x=h(this,nt).config).onSuccess)==null||k.call(x,g,this),(w=(v=h(this,nt).config).onSettled)==null||w.call(v,g,this.state.error,this),g}catch(g){if(g instanceof Ia){if(g.silent)return h(this,ke).promise;if(g.revert){if(this.state.data===void 0)throw g;return this.state.data}}throw B(this,pt,_t).call(this,{type:"error",error:g}),(c=(T=h(this,nt).config).onError)==null||c.call(T,g,this),(p=(f=h(this,nt).config).onSettled)==null||p.call(f,this.state.data,g,this),g}finally{this.scheduleGc()}}},Ir=new WeakMap,Cn=new WeakMap,nt=new WeakMap,Dr=new WeakMap,ke=new WeakMap,Rs=new WeakMap,Ar=new WeakMap,pt=new WeakSet,_t=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...sh(n.data,this.options),fetchMeta:t.meta??null};case"success":const s={...n,...wc(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return R(this,Cn,t.manual?s:void 0),s;case"error":const l=t.error;return{...n,error:l,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:l,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),ge.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),h(this,nt).notify({query:this,type:"updated",action:t})})},Rc);function sh(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:th(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function wc(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function kc(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Ue,W,Os,ze,$r,En,zt,rr,zs,bn,Pn,Ur,Qr,nr,Tn,J,ns,Da,Aa,$a,Ua,Qa,Ba,Ha,lh,Oc,cy=(Oc=class extends Hn{constructor(t,r){super();A(this,J);A(this,Ue);A(this,W);A(this,Os);A(this,ze);A(this,$r);A(this,En);A(this,zt);A(this,rr);A(this,zs);A(this,bn);A(this,Pn);A(this,Ur);A(this,Qr);A(this,nr);A(this,Tn,new Set);this.options=r,R(this,Ue,t),R(this,rr,null),R(this,zt,La()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(h(this,W).addObserver(this),jc(h(this,W),this.options)?B(this,J,ns).call(this):this.updateResult(),B(this,J,Ua).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ka(h(this,W),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ka(h(this,W),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,B(this,J,Qa).call(this),B(this,J,Ba).call(this),h(this,W).removeObserver(this)}setOptions(t){const r=this.options,n=h(this,W);if(this.options=h(this,Ue).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof st(this.options.enabled,h(this,W))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");B(this,J,Ha).call(this),h(this,W).setOptions(this.options),r._defaulted&&!Kl(this.options,r)&&h(this,Ue).getQueryCache().notify({type:"observerOptionsUpdated",query:h(this,W),observer:this});const s=this.hasListeners();s&&Sc(h(this,W),n,this.options,r)&&B(this,J,ns).call(this),this.updateResult(),s&&(h(this,W)!==n||st(this.options.enabled,h(this,W))!==st(r.enabled,h(this,W))||vr(this.options.staleTime,h(this,W))!==vr(r.staleTime,h(this,W)))&&B(this,J,Da).call(this);const l=B(this,J,Aa).call(this);s&&(h(this,W)!==n||st(this.options.enabled,h(this,W))!==st(r.enabled,h(this,W))||l!==h(this,nr))&&B(this,J,$a).call(this,l)}getOptimisticResult(t){const r=h(this,Ue).getQueryCache().build(h(this,Ue),t),n=this.createResult(r,t);return fy(this,n)&&(R(this,ze,n),R(this,En,this.options),R(this,$r,h(this,W).state)),n}getCurrentResult(){return h(this,ze)}trackResult(t,r){return new Proxy(t,{get:(n,s)=>(this.trackProp(s),r==null||r(s),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&h(this,zt).status==="pending"&&h(this,zt).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,s))})}trackProp(t){h(this,Tn).add(t)}getCurrentQuery(){return h(this,W)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=h(this,Ue).defaultQueryOptions(t),n=h(this,Ue).getQueryCache().build(h(this,Ue),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return B(this,J,ns).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),h(this,ze)))}createResult(t,r){var z;const n=h(this,W),s=this.options,l=h(this,ze),a=h(this,$r),o=h(this,En),d=t!==n?t.state:h(this,Os),{state:y}=t;let m={...y},x=!1,k;if(r._optimisticResults){const O=this.hasListeners(),G=!O&&jc(t,r),Y=O&&Sc(t,n,r,s);(G||Y)&&(m={...m,...sh(y.data,t.options)}),r._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:v,errorUpdatedAt:w,status:T}=m;k=m.data;let c=!1;if(r.placeholderData!==void 0&&k===void 0&&T==="pending"){let O;l!=null&&l.isPlaceholderData&&r.placeholderData===(o==null?void 0:o.placeholderData)?(O=l.data,c=!0):O=typeof r.placeholderData=="function"?r.placeholderData((z=h(this,Pn))==null?void 0:z.state.data,h(this,Pn)):r.placeholderData,O!==void 0&&(T="success",k=Fa(l==null?void 0:l.data,O,r),x=!0)}if(r.select&&k!==void 0&&!c)if(l&&k===(a==null?void 0:a.data)&&r.select===h(this,zs))k=h(this,bn);else try{R(this,zs,r.select),k=r.select(k),k=Fa(l==null?void 0:l.data,k,r),R(this,bn,k),R(this,rr,null)}catch(O){R(this,rr,O)}h(this,rr)&&(v=h(this,rr),k=h(this,bn),w=Date.now(),T="error");const f=m.fetchStatus==="fetching",p=T==="pending",g=T==="error",b=p&&f,S=k!==void 0,C={status:T,fetchStatus:m.fetchStatus,isPending:p,isSuccess:T==="success",isError:g,isInitialLoading:b,isLoading:b,data:k,dataUpdatedAt:m.dataUpdatedAt,error:v,errorUpdatedAt:w,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>d.dataUpdateCount||m.errorUpdateCount>d.errorUpdateCount,isFetching:f,isRefetching:f&&!p,isLoadingError:g&&!S,isPaused:m.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:g&&S,isStale:Yo(t,r),refetch:this.refetch,promise:h(this,zt),isEnabled:st(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const O=C.data!==void 0,G=C.status==="error"&&!O,Y=re=>{G?re.reject(C.error):O&&re.resolve(C.data)},te=()=>{const re=R(this,zt,C.promise=La());Y(re)},q=h(this,zt);switch(q.status){case"pending":t.queryHash===n.queryHash&&Y(q);break;case"fulfilled":(G||C.data!==q.value)&&te();break;case"rejected":(!G||C.error!==q.reason)&&te();break}}return C}updateResult(){const t=h(this,ze),r=this.createResult(h(this,W),this.options);if(R(this,$r,h(this,W).state),R(this,En,this.options),h(this,$r).data!==void 0&&R(this,Pn,h(this,W)),Kl(r,t))return;R(this,ze,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,l=typeof s=="function"?s():s;if(l==="all"||!l&&!h(this,Tn).size)return!0;const a=new Set(l??h(this,Tn));return this.options.throwOnError&&a.add("error"),Object.keys(h(this,ze)).some(o=>{const u=o;return h(this,ze)[u]!==t[u]&&a.has(u)})};B(this,J,lh).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&B(this,J,Ua).call(this)}},Ue=new WeakMap,W=new WeakMap,Os=new WeakMap,ze=new WeakMap,$r=new WeakMap,En=new WeakMap,zt=new WeakMap,rr=new WeakMap,zs=new WeakMap,bn=new WeakMap,Pn=new WeakMap,Ur=new WeakMap,Qr=new WeakMap,nr=new WeakMap,Tn=new WeakMap,J=new WeakSet,ns=function(t){B(this,J,Ha).call(this);let r=h(this,W).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Le)),r},Da=function(){B(this,J,Qa).call(this);const t=vr(this.options.staleTime,h(this,W));if(Yr||h(this,ze).isStale||!Oa(t))return;const n=Jf(h(this,ze).dataUpdatedAt,t)+1;R(this,Ur,zr.setTimeout(()=>{h(this,ze).isStale||this.updateResult()},n))},Aa=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(h(this,W)):this.options.refetchInterval)??!1},$a=function(t){B(this,J,Ba).call(this),R(this,nr,t),!(Yr||st(this.options.enabled,h(this,W))===!1||!Oa(h(this,nr))||h(this,nr)===0)&&R(this,Qr,zr.setInterval(()=>{(this.options.refetchIntervalInBackground||Xo.isFocused())&&B(this,J,ns).call(this)},h(this,nr)))},Ua=function(){B(this,J,Da).call(this),B(this,J,$a).call(this,B(this,J,Aa).call(this))},Qa=function(){h(this,Ur)&&(zr.clearTimeout(h(this,Ur)),R(this,Ur,void 0))},Ba=function(){h(this,Qr)&&(zr.clearInterval(h(this,Qr)),R(this,Qr,void 0))},Ha=function(){const t=h(this,Ue).getQueryCache().build(h(this,Ue),this.options);if(t===h(this,W))return;const r=h(this,W);R(this,W,t),R(this,Os,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},lh=function(t){ge.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(h(this,ze))}),h(this,Ue).getQueryCache().notify({query:h(this,W),type:"observerResultsUpdated"})})},Oc);function dy(e,t){return st(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function jc(e,t){return dy(e,t)||e.state.data!==void 0&&Ka(e,t,t.refetchOnMount)}function Ka(e,t,r){if(st(t.enabled,e)!==!1&&vr(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&Yo(e,t)}return!1}function Sc(e,t,r,n){return(e!==t||st(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Yo(e,r)}function Yo(e,t){return st(t.enabled,e)!==!1&&e.isStaleByTime(vr(t.staleTime,e))}function fy(e,t){return!Kl(e.getCurrentResult(),t)}function Nc(e){return{onFetch:(t,r)=>{var y,m,x,k,v;const n=t.options,s=(x=(m=(y=t.fetchOptions)==null?void 0:y.meta)==null?void 0:m.fetchMore)==null?void 0:x.direction,l=((k=t.state.data)==null?void 0:k.pages)||[],a=((v=t.state.data)==null?void 0:v.pageParams)||[];let o={pages:[],pageParams:[]},u=0;const d=async()=>{let w=!1;const T=p=>{ny(p,()=>t.signal,()=>w=!0)},c=eh(t.options,t.fetchOptions),f=async(p,g,b)=>{if(w)return Promise.reject();if(g==null&&p.pages.length)return Promise.resolve(p);const N=(()=>{const G={client:t.client,queryKey:t.queryKey,pageParam:g,direction:b?"backward":"forward",meta:t.options.meta};return T(G),G})(),C=await c(N),{maxPages:z}=t.options,O=b?ry:ty;return{pages:O(p.pages,C,z),pageParams:O(p.pageParams,g,z)}};if(s&&l.length){const p=s==="backward",g=p?hy:Cc,b={pages:l,pageParams:a},S=g(n,b);o=await f(b,S,p)}else{const p=e??l.length;do{const g=u===0?a[0]??n.initialPageParam:Cc(n,o);if(u>0&&g==null)break;o=await f(o,g),u++}while(u<p)}return o};t.options.persister?t.fetchFn=()=>{var w,T;return(T=(w=t.options).persister)==null?void 0:T.call(w,d,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=d}}}function Cc(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function hy(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var Fs,St,_e,Br,Nt,qt,zc,py=(zc=class extends nh{constructor(t){super();A(this,Nt);A(this,Fs);A(this,St);A(this,_e);A(this,Br);R(this,Fs,t.client),this.mutationId=t.mutationId,R(this,_e,t.mutationCache),R(this,St,[]),this.state=t.state||ih(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){h(this,St).includes(t)||(h(this,St).push(t),this.clearGcTimeout(),h(this,_e).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){R(this,St,h(this,St).filter(r=>r!==t)),this.scheduleGc(),h(this,_e).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){h(this,St).length||(this.state.status==="pending"?this.scheduleGc():h(this,_e).remove(this))}continue(){var t;return((t=h(this,Br))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var a,o,u,d,y,m,x,k,v,w,T,c,f,p,g,b,S,N;const r=()=>{B(this,Nt,qt).call(this,{type:"continue"})},n={client:h(this,Fs),meta:this.options.meta,mutationKey:this.options.mutationKey};R(this,Br,rh({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(C,z)=>{B(this,Nt,qt).call(this,{type:"failed",failureCount:C,error:z})},onPause:()=>{B(this,Nt,qt).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>h(this,_e).canRun(this)}));const s=this.state.status==="pending",l=!h(this,Br).canStart();try{if(s)r();else{B(this,Nt,qt).call(this,{type:"pending",variables:t,isPaused:l}),h(this,_e).config.onMutate&&await h(this,_e).config.onMutate(t,this,n);const z=await((o=(a=this.options).onMutate)==null?void 0:o.call(a,t,n));z!==this.state.context&&B(this,Nt,qt).call(this,{type:"pending",context:z,variables:t,isPaused:l})}const C=await h(this,Br).start();return await((d=(u=h(this,_e).config).onSuccess)==null?void 0:d.call(u,C,t,this.state.context,this,n)),await((m=(y=this.options).onSuccess)==null?void 0:m.call(y,C,t,this.state.context,n)),await((k=(x=h(this,_e).config).onSettled)==null?void 0:k.call(x,C,null,this.state.variables,this.state.context,this,n)),await((w=(v=this.options).onSettled)==null?void 0:w.call(v,C,null,t,this.state.context,n)),B(this,Nt,qt).call(this,{type:"success",data:C}),C}catch(C){try{await((c=(T=h(this,_e).config).onError)==null?void 0:c.call(T,C,t,this.state.context,this,n))}catch(z){Promise.reject(z)}try{await((p=(f=this.options).onError)==null?void 0:p.call(f,C,t,this.state.context,n))}catch(z){Promise.reject(z)}try{await((b=(g=h(this,_e).config).onSettled)==null?void 0:b.call(g,void 0,C,this.state.variables,this.state.context,this,n))}catch(z){Promise.reject(z)}try{await((N=(S=this.options).onSettled)==null?void 0:N.call(S,void 0,C,t,this.state.context,n))}catch(z){Promise.reject(z)}throw B(this,Nt,qt).call(this,{type:"error",error:C}),C}finally{h(this,_e).runNext(this)}}},Fs=new WeakMap,St=new WeakMap,_e=new WeakMap,Br=new WeakMap,Nt=new WeakSet,qt=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),ge.batch(()=>{h(this,St).forEach(n=>{n.onMutationUpdate(t)}),h(this,_e).notify({mutation:this,type:"updated",action:t})})},zc);function ih(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ft,mt,Ls,Fc,my=(Fc=class extends Hn{constructor(t={}){super();A(this,Ft);A(this,mt);A(this,Ls);this.config=t,R(this,Ft,new Set),R(this,mt,new Map),R(this,Ls,0)}build(t,r,n){const s=new py({client:t,mutationCache:this,mutationId:++Qs(this,Ls)._,options:t.defaultMutationOptions(r),state:n});return this.add(s),s}add(t){h(this,Ft).add(t);const r=il(t);if(typeof r=="string"){const n=h(this,mt).get(r);n?n.push(t):h(this,mt).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(h(this,Ft).delete(t)){const r=il(t);if(typeof r=="string"){const n=h(this,mt).get(r);if(n)if(n.length>1){const s=n.indexOf(t);s!==-1&&n.splice(s,1)}else n[0]===t&&h(this,mt).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=il(t);if(typeof r=="string"){const n=h(this,mt).get(r),s=n==null?void 0:n.find(l=>l.state.status==="pending");return!s||s===t}else return!0}runNext(t){var n;const r=il(t);if(typeof r=="string"){const s=(n=h(this,mt).get(r))==null?void 0:n.find(l=>l!==t&&l.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){ge.batch(()=>{h(this,Ft).forEach(t=>{this.notify({type:"removed",mutation:t})}),h(this,Ft).clear(),h(this,mt).clear()})}getAll(){return Array.from(h(this,Ft))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>xc(r,n))}findAll(t={}){return this.getAll().filter(r=>xc(t,r))}notify(t){ge.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return ge.batch(()=>Promise.all(t.map(r=>r.continue().catch(Le))))}},Ft=new WeakMap,mt=new WeakMap,Ls=new WeakMap,Fc);function il(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Lt,sr,Qe,It,Ut,gl,Va,Lc,yy=(Lc=class extends Hn{constructor(r,n){super();A(this,Ut);A(this,Lt);A(this,sr);A(this,Qe);A(this,It);R(this,Lt,r),this.setOptions(n),this.bindMethods(),B(this,Ut,gl).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(r){var s;const n=this.options;this.options=h(this,Lt).defaultMutationOptions(r),Kl(this.options,n)||h(this,Lt).getMutationCache().notify({type:"observerOptionsUpdated",mutation:h(this,Qe),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Jr(n.mutationKey)!==Jr(this.options.mutationKey)?this.reset():((s=h(this,Qe))==null?void 0:s.state.status)==="pending"&&h(this,Qe).setOptions(this.options)}onUnsubscribe(){var r;this.hasListeners()||(r=h(this,Qe))==null||r.removeObserver(this)}onMutationUpdate(r){B(this,Ut,gl).call(this),B(this,Ut,Va).call(this,r)}getCurrentResult(){return h(this,sr)}reset(){var r;(r=h(this,Qe))==null||r.removeObserver(this),R(this,Qe,void 0),B(this,Ut,gl).call(this),B(this,Ut,Va).call(this)}mutate(r,n){var s;return R(this,It,n),(s=h(this,Qe))==null||s.removeObserver(this),R(this,Qe,h(this,Lt).getMutationCache().build(h(this,Lt),this.options)),h(this,Qe).addObserver(this),h(this,Qe).execute(r)}},Lt=new WeakMap,sr=new WeakMap,Qe=new WeakMap,It=new WeakMap,Ut=new WeakSet,gl=function(){var n;const r=((n=h(this,Qe))==null?void 0:n.state)??ih();R(this,sr,{...r,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset})},Va=function(r){ge.batch(()=>{var n,s,l,a,o,u,d,y;if(h(this,It)&&this.hasListeners()){const m=h(this,sr).variables,x=h(this,sr).context,k={client:h(this,Lt),meta:this.options.meta,mutationKey:this.options.mutationKey};if((r==null?void 0:r.type)==="success"){try{(s=(n=h(this,It)).onSuccess)==null||s.call(n,r.data,m,x,k)}catch(v){Promise.reject(v)}try{(a=(l=h(this,It)).onSettled)==null||a.call(l,r.data,null,m,x,k)}catch(v){Promise.reject(v)}}else if((r==null?void 0:r.type)==="error"){try{(u=(o=h(this,It)).onError)==null||u.call(o,r.error,m,x,k)}catch(v){Promise.reject(v)}try{(y=(d=h(this,It)).onSettled)==null||y.call(d,void 0,r.error,m,x,k)}catch(v){Promise.reject(v)}}}this.listeners.forEach(m=>{m(h(this,sr))})})},Lc),Ct,Ic,xy=(Ic=class extends Hn{constructor(t={}){super();A(this,Ct);this.config=t,R(this,Ct,new Map)}build(t,r,n){const s=r.queryKey,l=r.queryHash??Wo(s,r);let a=this.get(l);return a||(a=new uy({client:t,queryKey:s,queryHash:l,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(s)}),this.add(a)),a}add(t){h(this,Ct).has(t.queryHash)||(h(this,Ct).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=h(this,Ct).get(t.queryHash);r&&(t.destroy(),r===t&&h(this,Ct).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){ge.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return h(this,Ct).get(t)}getAll(){return[...h(this,Ct).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>yc(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>yc(t,n)):r}notify(t){ge.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){ge.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){ge.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Ct=new WeakMap,Ic),fe,lr,ir,Mn,_n,ar,Rn,On,Dc,vy=(Dc=class{constructor(e={}){A(this,fe);A(this,lr);A(this,ir);A(this,Mn);A(this,_n);A(this,ar);A(this,Rn);A(this,On);R(this,fe,e.queryCache||new xy),R(this,lr,e.mutationCache||new my),R(this,ir,e.defaultOptions||{}),R(this,Mn,new Map),R(this,_n,new Map),R(this,ar,0)}mount(){Qs(this,ar)._++,h(this,ar)===1&&(R(this,Rn,Xo.subscribe(async e=>{e&&(await this.resumePausedMutations(),h(this,fe).onFocus())})),R(this,On,Vl.subscribe(async e=>{e&&(await this.resumePausedMutations(),h(this,fe).onOnline())})))}unmount(){var e,t;Qs(this,ar)._--,h(this,ar)===0&&((e=h(this,Rn))==null||e.call(this),R(this,Rn,void 0),(t=h(this,On))==null||t.call(this),R(this,On,void 0))}isFetching(e){return h(this,fe).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return h(this,lr).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=h(this,fe).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=h(this,fe).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(vr(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return h(this,fe).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),s=h(this,fe).get(n.queryHash),l=s==null?void 0:s.state.data,a=Jm(t,l);if(a!==void 0)return h(this,fe).build(this,n).setData(a,{...r,manual:!0})}setQueriesData(e,t,r){return ge.batch(()=>h(this,fe).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=h(this,fe).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=h(this,fe);ge.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=h(this,fe);return ge.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=ge.batch(()=>h(this,fe).findAll(e).map(s=>s.cancel(r)));return Promise.all(n).then(Le).catch(Le)}invalidateQueries(e,t={}){return ge.batch(()=>(h(this,fe).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=ge.batch(()=>h(this,fe).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let l=s.fetch(void 0,r);return r.throwOnError||(l=l.catch(Le)),s.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(n).then(Le)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=h(this,fe).build(this,t);return r.isStaleByTime(vr(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Le).catch(Le)}fetchInfiniteQuery(e){return e.behavior=Nc(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Le).catch(Le)}ensureInfiniteQueryData(e){return e.behavior=Nc(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Vl.isOnline()?h(this,lr).resumePausedMutations():Promise.resolve()}getQueryCache(){return h(this,fe)}getMutationCache(){return h(this,lr)}getDefaultOptions(){return h(this,ir)}setDefaultOptions(e){R(this,ir,e)}setQueryDefaults(e,t){h(this,Mn).set(Jr(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...h(this,Mn).values()],r={};return t.forEach(n=>{Ms(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){h(this,_n).set(Jr(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...h(this,_n).values()],r={};return t.forEach(n=>{Ms(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...h(this,ir).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Wo(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===qo&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...h(this,ir).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){h(this,fe).clear(),h(this,lr).clear()}},fe=new WeakMap,lr=new WeakMap,ir=new WeakMap,Mn=new WeakMap,_n=new WeakMap,ar=new WeakMap,Rn=new WeakMap,On=new WeakMap,Dc),ah=j.createContext(void 0),ci=e=>{const t=j.useContext(ah);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},gy=({client:e,children:t})=>(j.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),i.jsx(ah.Provider,{value:e,children:t})),oh=j.createContext(!1),wy=()=>j.useContext(oh);oh.Provider;function ky(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var jy=j.createContext(ky()),Sy=()=>j.useContext(jy),Ny=(e,t,r)=>{const n=r!=null&&r.state.error&&typeof e.throwOnError=="function"?Go(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))},Cy=e=>{j.useEffect(()=>{e.clearReset()},[e])},Ey=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(s&&e.data===void 0||Go(r,[e.error,n])),by=e=>{if(e.suspense){const r=s=>s==="static"?s:Math.max(s??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...s)=>r(n(...s)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Py=(e,t)=>e.isLoading&&e.isFetching&&!t,Ty=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Ec=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function My(e,t,r){var x,k,v,w;const n=wy(),s=Sy(),l=ci(),a=l.defaultQueryOptions(e);(k=(x=l.getDefaultOptions().queries)==null?void 0:x._experimental_beforeQuery)==null||k.call(x,a);const o=l.getQueryCache().get(a.queryHash);a._optimisticResults=n?"isRestoring":"optimistic",by(a),Ny(a,s,o),Cy(s);const u=!l.getQueryCache().get(a.queryHash),[d]=j.useState(()=>new t(l,a)),y=d.getOptimisticResult(a),m=!n&&e.subscribed!==!1;if(j.useSyncExternalStore(j.useCallback(T=>{const c=m?d.subscribe(ge.batchCalls(T)):Le;return d.updateResult(),c},[d,m]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),j.useEffect(()=>{d.setOptions(a)},[a,d]),Ty(a,y))throw Ec(a,d,s);if(Ey({result:y,errorResetBoundary:s,throwOnError:a.throwOnError,query:o,suspense:a.suspense}))throw y.error;if((w=(v=l.getDefaultOptions().queries)==null?void 0:v._experimental_afterQuery)==null||w.call(v,a,y),a.experimental_prefetchInRender&&!Yr&&Py(y,n)){const T=u?Ec(a,d,s):o==null?void 0:o.promise;T==null||T.catch(Le).finally(()=>{d.updateResult()})}return a.notifyOnChangeProps?y:d.trackResult(y)}function Ne(e,t){return My(e,cy)}function Di(e,t){const r=ci(),[n]=j.useState(()=>new yy(r,e));j.useEffect(()=>{n.setOptions(e)},[n,e]);const s=j.useSyncExternalStore(j.useCallback(a=>n.subscribe(ge.batchCalls(a)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),l=j.useCallback((a,o)=>{n.mutate(a,o).catch(Le)},[n]);if(s.error&&Go(n.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:l,mutateAsync:s.mutate}}/**
|
|
41
|
+
* @license lucide-react v0.344.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
|
+
*/var _y={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"};/**
|
|
46
|
+
* @license lucide-react v0.344.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
|
+
*/const Ry=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),V=(e,t)=>{const r=j.forwardRef(({color:n="currentColor",size:s=24,strokeWidth:l=2,absoluteStrokeWidth:a,className:o="",children:u,...d},y)=>j.createElement("svg",{ref:y,..._y,width:s,height:s,stroke:n,strokeWidth:a?Number(l)*24/Number(s):l,className:["lucide",`lucide-${Ry(e)}`,o].join(" "),...d},[...t.map(([m,x])=>j.createElement(m,x)),...Array.isArray(u)?u:[u]]));return r.displayName=`${e}`,r};/**
|
|
51
|
+
* @license lucide-react v0.344.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 Wa=V("AlertCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
|
|
56
|
+
* @license lucide-react v0.344.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 uh=V("AlertTriangle",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z",key:"c3ski4"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
61
|
+
* @license lucide-react v0.344.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 Oy=V("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
|
|
66
|
+
* @license lucide-react v0.344.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 zy=V("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/**
|
|
71
|
+
* @license lucide-react v0.344.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 Fy=V("Briefcase",[["rect",{width:"20",height:"14",x:"2",y:"7",rx:"2",ry:"2",key:"eto64e"}],["path",{d:"M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"zwj3tp"}]]);/**
|
|
76
|
+
* @license lucide-react v0.344.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 _s=V("CheckCircle2",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
81
|
+
* @license lucide-react v0.344.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 ch=V("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
86
|
+
* @license lucide-react v0.344.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 dh=V("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
91
|
+
* @license lucide-react v0.344.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 Ly=V("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
96
|
+
* @license lucide-react v0.344.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 Iy=V("CircleDot",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]]);/**
|
|
101
|
+
* @license lucide-react v0.344.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 Jo=V("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
|
|
106
|
+
* @license lucide-react v0.344.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 Dy=V("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
|
|
111
|
+
* @license lucide-react v0.344.0 - ISC
|
|
112
|
+
*
|
|
113
|
+
* This source code is licensed under the ISC license.
|
|
114
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
115
|
+
*/const Zo=V("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
|
|
116
|
+
* @license lucide-react v0.344.0 - ISC
|
|
117
|
+
*
|
|
118
|
+
* This source code is licensed under the ISC license.
|
|
119
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
120
|
+
*/const qa=V("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
|
|
121
|
+
* @license lucide-react v0.344.0 - ISC
|
|
122
|
+
*
|
|
123
|
+
* This source code is licensed under the ISC license.
|
|
124
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
125
|
+
*/const Ay=V("Gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);/**
|
|
126
|
+
* @license lucide-react v0.344.0 - ISC
|
|
127
|
+
*
|
|
128
|
+
* This source code is licensed under the ISC license.
|
|
129
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
130
|
+
*/const $y=V("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);/**
|
|
131
|
+
* @license lucide-react v0.344.0 - ISC
|
|
132
|
+
*
|
|
133
|
+
* This source code is licensed under the ISC license.
|
|
134
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
135
|
+
*/const Uy=V("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
|
|
136
|
+
* @license lucide-react v0.344.0 - ISC
|
|
137
|
+
*
|
|
138
|
+
* This source code is licensed under the ISC license.
|
|
139
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
140
|
+
*/const fh=V("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/**
|
|
141
|
+
* @license lucide-react v0.344.0 - ISC
|
|
142
|
+
*
|
|
143
|
+
* This source code is licensed under the ISC license.
|
|
144
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
145
|
+
*/const Qy=V("KeyRound",[["path",{d:"M2 18v3c0 .6.4 1 1 1h4v-3h3v-3h2l1.4-1.4a6.5 6.5 0 1 0-4-4Z",key:"167ctg"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/**
|
|
146
|
+
* @license lucide-react v0.344.0 - ISC
|
|
147
|
+
*
|
|
148
|
+
* This source code is licensed under the ISC license.
|
|
149
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
150
|
+
*/const eu=V("Loader2",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
151
|
+
* @license lucide-react v0.344.0 - ISC
|
|
152
|
+
*
|
|
153
|
+
* This source code is licensed under the ISC license.
|
|
154
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
155
|
+
*/const By=V("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
|
|
156
|
+
* @license lucide-react v0.344.0 - ISC
|
|
157
|
+
*
|
|
158
|
+
* This source code is licensed under the ISC license.
|
|
159
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
160
|
+
*/const hh=V("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
|
|
161
|
+
* @license lucide-react v0.344.0 - ISC
|
|
162
|
+
*
|
|
163
|
+
* This source code is licensed under the ISC license.
|
|
164
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
165
|
+
*/const Hy=V("Plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]]);/**
|
|
166
|
+
* @license lucide-react v0.344.0 - ISC
|
|
167
|
+
*
|
|
168
|
+
* This source code is licensed under the ISC license.
|
|
169
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
170
|
+
*/const ph=V("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
171
|
+
* @license lucide-react v0.344.0 - ISC
|
|
172
|
+
*
|
|
173
|
+
* This source code is licensed under the ISC license.
|
|
174
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
175
|
+
*/const Ky=V("Rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]);/**
|
|
176
|
+
* @license lucide-react v0.344.0 - ISC
|
|
177
|
+
*
|
|
178
|
+
* This source code is licensed under the ISC license.
|
|
179
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
180
|
+
*/const Ga=V("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
|
|
181
|
+
* @license lucide-react v0.344.0 - ISC
|
|
182
|
+
*
|
|
183
|
+
* This source code is licensed under the ISC license.
|
|
184
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
185
|
+
*/const Vy=V("SearchX",[["path",{d:"m13.5 8.5-5 5",key:"1cs55j"}],["path",{d:"m8.5 8.5 5 5",key:"a8mexj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
186
|
+
* @license lucide-react v0.344.0 - ISC
|
|
187
|
+
*
|
|
188
|
+
* This source code is licensed under the ISC license.
|
|
189
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
190
|
+
*/const Wy=V("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
191
|
+
* @license lucide-react v0.344.0 - ISC
|
|
192
|
+
*
|
|
193
|
+
* This source code is licensed under the ISC license.
|
|
194
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
195
|
+
*/const qy=V("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]);/**
|
|
196
|
+
* @license lucide-react v0.344.0 - ISC
|
|
197
|
+
*
|
|
198
|
+
* This source code is licensed under the ISC license.
|
|
199
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
200
|
+
*/const Gy=V("Server",[["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"}]]);/**
|
|
201
|
+
* @license lucide-react v0.344.0 - ISC
|
|
202
|
+
*
|
|
203
|
+
* This source code is licensed under the ISC license.
|
|
204
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
205
|
+
*/const mh=V("Settings2",[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);/**
|
|
206
|
+
* @license lucide-react v0.344.0 - ISC
|
|
207
|
+
*
|
|
208
|
+
* This source code is licensed under the ISC license.
|
|
209
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
210
|
+
*/const bc=V("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
211
|
+
* @license lucide-react v0.344.0 - ISC
|
|
212
|
+
*
|
|
213
|
+
* This source code is licensed under the ISC license.
|
|
214
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
215
|
+
*/const yh=V("Sparkles",[["path",{d:"m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z",key:"17u4zn"}],["path",{d:"M5 3v4",key:"bklmnn"}],["path",{d:"M19 17v4",key:"iiml17"}],["path",{d:"M3 5h4",key:"nem4j1"}],["path",{d:"M17 19h4",key:"lbex7p"}]]);/**
|
|
216
|
+
* @license lucide-react v0.344.0 - ISC
|
|
217
|
+
*
|
|
218
|
+
* This source code is licensed under the ISC license.
|
|
219
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
220
|
+
*/const tu=V("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/**
|
|
221
|
+
* @license lucide-react v0.344.0 - ISC
|
|
222
|
+
*
|
|
223
|
+
* This source code is licensed under the ISC license.
|
|
224
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
225
|
+
*/const Wl=V("XCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
|
|
226
|
+
* @license lucide-react v0.344.0 - ISC
|
|
227
|
+
*
|
|
228
|
+
* This source code is licensed under the ISC license.
|
|
229
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
230
|
+
*/const xh=V("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),se="",Z={async getSoul(){const e=await fetch(`${se}/api/soul`);if(!e.ok)throw new Error("Failed to fetch soul profile");return e.json()},async getSetupStatus(){const e=await fetch(`${se}/api/setup`);if(!e.ok)throw new Error("Failed to fetch setup status");return e.json()},async initializeSetup(){const e=await fetch(`${se}/api/setup/init`,{method:"POST"});if(!e.ok){const t=await e.json().catch(()=>({}));throw new Error(t.error||"Failed to initialize setup")}return e.json()},async getSetupConfig(){const e=await fetch(`${se}/api/setup/config`);if(!e.ok)throw new Error("Failed to fetch setup config");return e.json()},async updateSetupConfig(e){const t=await fetch(`${se}/api/setup/config`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok){const r=await t.json().catch(()=>({}));throw new Error(r.error||"Failed to update setup config")}return t.json()},async testLLM(e=!1,t){const r=await fetch(`${se}/api/setup/test-llm`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({probe:e,...t||{}})}),n=await r.json().catch(()=>({}));if(!r.ok||(n==null?void 0:n.ok)===!1)throw new Error(n.error||"LLM test failed");return n},async getTaskHistory(e){const t=new URLSearchParams;e!=null&&e.limit&&t.set("limit",String(e.limit)),e!=null&&e.offset&&t.set("offset",String(e.offset)),e!=null&&e.status&&t.set("status",e.status),e!=null&&e.search&&t.set("search",e.search);const r=t.toString(),n=await fetch(`${se}/api/tasks${r?`?${r}`:""}`);if(!n.ok)throw new Error("Failed to fetch task history");return n.json()},async getTaskDetail(e){const t=await fetch(`${se}/api/tasks/${encodeURIComponent(e)}/detail`);if(!t.ok){const r=await t.json().catch(()=>({}));throw new Error(r.error||"Failed to fetch task detail")}return t.json()},async getTaskStatus(e){const t=await fetch(`${se}/api/tasks/${e}/status`);if(!t.ok){const r=await t.json().catch(()=>({}));throw new Error(r.error||"Failed to fetch task status")}return t.json()},async runTask(e){const t=await fetch(`${se}/api/tasks/run`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({input:e})});if(!t.ok){const r=await t.json().catch(()=>({}));throw new Error(r.error||"Failed to run task")}return t.json()},async respondToTask(e,t){const r=await fetch(`${se}/api/tasks/${e}/respond`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({response:t})});if(!r.ok){const n=await r.json().catch(()=>({}));throw new Error(n.error||"Failed to send response")}},async getResumableTasks(){const e=await fetch(`${se}/api/tasks/resumable`);if(!e.ok)throw new Error("Failed to fetch resumable tasks");return e.json()},async resumeTask(e){const t=await fetch(`${se}/api/tasks/${encodeURIComponent(e)}/resume`,{method:"POST"});if(!t.ok){const r=await t.json().catch(()=>({}));throw new Error(r.error||"Failed to resume task")}return t.json()},async getTaskReports(e=50){const t=await fetch(`${se}/api/reports?limit=${e}`);if(!t.ok)throw new Error("Failed to fetch task reports");return t.json()},async getFacts(e=100){const t=await fetch(`${se}/api/memory/facts?limit=${e}`);if(!t.ok)throw new Error("Failed to fetch memory facts");return t.json()},async getEpisodes(e=50){const t=await fetch(`${se}/api/replay?limit=${e}`);if(!t.ok)throw new Error("Failed to fetch replay episodes");return t.json()},async getProposals(e=50){const t=await fetch(`${se}/api/strategy/proposals?limit=${e}`);if(!t.ok)throw new Error("Failed to fetch proposals");return t.json()},async approveProposal(e){const t=await fetch(`${se}/api/strategy/proposals/${e}/approve`,{method:"POST"});if(!t.ok){const r=await t.json();throw new Error(r.error||"Failed to approve")}},async rejectProposal(e,t){const r=await fetch(`${se}/api/strategy/proposals/${e}/reject`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({reason:t})});if(!r.ok){const n=await r.json();throw new Error(n.error||"Failed to reject")}},async getStrategyContent(e){const t=await fetch(`${se}/api/strategy/content?path=${encodeURIComponent(e)}`);if(!t.ok)throw new Error("Failed to fetch strategy content");return(await t.json()).content},async getActiveStrategy(){const e=await fetch(`${se}/api/strategy/active`);if(!e.ok){const t=await e.json();throw new Error(t.error||"Failed to fetch active strategy")}return e.json()},async getStatus(){return(await fetch(`${se}/api/status`)).json()},async getMcpHealth(e){const t=new URLSearchParams;e!=null&&e.server&&t.set("server",e.server),(e==null?void 0:e.timeoutMs)!==void 0&&t.set("timeoutMs",String(e.timeoutMs)),(e==null?void 0:e.retries)!==void 0&&t.set("retries",String(e.retries));const r=t.toString(),n=await fetch(`${se}/api/mcp/check${r?`?${r}`:""}`);if(!n.ok){const s=await n.json().catch(()=>({}));throw new Error(s.error||"Failed to check MCP health")}return n.json()},async startChatSession(){const e=await fetch(`${se}/api/chat/start`,{method:"POST"});if(!e.ok)throw new Error("Failed to start chat session");return e.json()},async sendChatMessage(e,t){const r=await fetch(`${se}/api/chat/${encodeURIComponent(e)}/message`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:t})});if(!r.ok){const n=await r.json().catch(()=>({}));throw new Error(n.error||"Failed to send chat message")}return r.json()}};function vh(e={}){const{autoReconnect:t=!0,reconnectDelay:r=2e3,maxReconnectAttempts:n=10,onMessage:s}=e,[l,a]=j.useState("disconnected"),[o,u]=j.useState(null),d=j.useRef(null),y=j.useRef(0),m=j.useRef(null),x=j.useRef(s);x.current=s;const k=j.useCallback(()=>e.url?e.url:`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`,[e.url]),v=j.useCallback(()=>{var f;if(((f=d.current)==null?void 0:f.readyState)===WebSocket.OPEN)return;const c=k();a("connecting");try{const p=new WebSocket(c);d.current=p,p.onopen=()=>{a("connected"),y.current=0},p.onmessage=g=>{var b;try{const S=JSON.parse(g.data);u(S),(b=x.current)==null||b.call(x,S)}catch{}},p.onclose=()=>{if(a("disconnected"),d.current=null,t&&y.current<n){y.current++;const g=r*Math.min(y.current,5);m.current=setTimeout(v,g)}},p.onerror=()=>{a("error")}}catch{a("error")}},[k,t,r,n]),w=j.useCallback(()=>{var c;m.current&&(clearTimeout(m.current),m.current=null),y.current=n,(c=d.current)==null||c.close(),d.current=null,a("disconnected")},[n]),T=j.useCallback(c=>{var f;((f=d.current)==null?void 0:f.readyState)===WebSocket.OPEN&&d.current.send(JSON.stringify(c))},[]);return j.useEffect(()=>(v(),()=>{var c;m.current&&clearTimeout(m.current),(c=d.current)==null||c.close()}),[v]),{status:l,lastMessage:o,connect:v,disconnect:w,send:T}}function Zr({type:e,title:t,message:r}){const n=e==="loading"?i.jsx(eu,{size:18,className:"animate-spin text-[color:var(--accent)]"}):e==="error"?i.jsx(uh,{size:18,className:"text-[color:var(--danger)]"}):i.jsx(Vy,{size:18,className:"text-[color:var(--text-muted)]"});return i.jsxs("div",{className:"rounded-xl border border-dashed border-[color:var(--line)] px-4 py-6 text-center bg-[color:var(--surface-subtle)]",children:[i.jsx("div",{className:"flex justify-center mb-2",children:n}),i.jsx("div",{className:"text-sm font-medium text-[color:var(--text-strong)]",children:t}),r&&i.jsx("p",{className:"text-xs text-[color:var(--text-muted)] mt-1",children:r})]})}const Xy={running:"bg-[color:var(--info-soft)] text-[color:var(--info)]",success:"bg-[color:var(--success-soft)] text-[color:var(--success)]",danger:"bg-[color:var(--danger-soft)] text-[color:var(--danger)]",warning:"bg-[color:var(--warning-soft)] text-[color:var(--warning)]",neutral:"bg-[color:var(--surface-subtle)] text-[color:var(--text-muted)]"};function Yy({tone:e,label:t}){return i.jsx("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-[11px] font-semibold ${Xy[e]}`,children:t})}function Jy({selectedId:e,onSelect:t,activeRunId:r}){const[n,s]=j.useState(""),[l,a]=j.useState(""),{data:o,isLoading:u}=Ne({queryKey:["task-history",n,l],queryFn:()=>Z.getTaskHistory({limit:50,search:n||void 0,status:l||void 0}),placeholderData:m=>m,refetchInterval:!1,refetchOnWindowFocus:!1,refetchOnReconnect:!1}),d=(o==null?void 0:o.items)??[],y=(o==null?void 0:o.activeRunId)??r;return i.jsxs("div",{className:"flex flex-col h-full",children:[i.jsxs("button",{onClick:()=>t(null),className:`flex items-center gap-2 w-full px-3 py-2.5 mb-3 rounded-lg text-sm font-medium transition-colors ${e===null?"bg-blue-600 text-white shadow-sm":"bg-gray-50 text-gray-700 hover:bg-gray-100 border border-gray-200"}`,children:[i.jsx(ph,{size:16}),"New Task"]}),i.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[i.jsxs("div",{className:"relative flex-1",children:[i.jsx(Wy,{size:14,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-gray-400"}),i.jsx("input",{value:n,onChange:m=>s(m.target.value),className:"w-full pl-8 pr-3 py-1.5 text-xs border border-gray-200 rounded-md bg-white focus:outline-none focus:ring-2 focus:ring-blue-200",placeholder:"Search tasks..."})]}),i.jsxs("select",{value:l,onChange:m=>a(m.target.value),className:"text-xs border border-gray-200 rounded-md px-2 py-1.5 bg-white text-gray-600 focus:outline-none focus:ring-2 focus:ring-blue-200",children:[i.jsx("option",{value:"",children:"All"}),i.jsx("option",{value:"running",children:"Running"}),i.jsx("option",{value:"completed",children:"Completed"}),i.jsx("option",{value:"failed",children:"Failed"})]})]}),i.jsxs("div",{className:"flex-1 overflow-y-auto -mx-1 px-1 space-y-1",style:{scrollbarGutter:"stable"},children:[u&&d.length===0&&i.jsx(Zr,{type:"loading",title:"Loading tasks..."}),!u&&d.length===0&&i.jsx(Zr,{type:"empty",title:"No tasks yet",message:"Create a new task to get started."}),d.map(m=>i.jsx(Zy,{item:m,isSelected:e===m.id,isActive:m.id===y,onClick:()=>t(m.id)},m.id))]})]})}function Zy({item:e,isSelected:t,isActive:r,onClick:n}){return i.jsx("button",{onClick:n,className:`w-full text-left rounded-lg p-2.5 transition-colors ${t?"bg-blue-50 border border-blue-200":"hover:bg-gray-50 border border-transparent"}`,children:i.jsxs("div",{className:"flex items-start gap-2",children:[i.jsx(ex,{status:e.status,isActive:r}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsx("div",{className:"text-sm font-medium text-gray-800 truncate leading-tight",children:e.input||e.summary||"Untitled Task"}),e.summary&&e.summary!==e.input&&i.jsx("div",{className:"text-xs text-gray-500 truncate mt-0.5",children:e.summary}),i.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[i.jsx(Yy,{tone:e.status==="running"||r?"running":e.status==="completed"?"success":"danger",label:e.status==="running"||r?"running":e.status}),i.jsx("span",{className:"text-[10px] text-gray-400",children:tx(e.createdAt)}),e.duration!=null&&i.jsxs("span",{className:"flex items-center gap-0.5 text-[10px] text-gray-400",children:[i.jsx(Jo,{size:10}),rx(e.duration)]})]})]})]})})}function ex({status:e,isActive:t}){return e==="running"||t?i.jsx("div",{className:"mt-0.5 shrink-0",children:i.jsx(eu,{size:14,className:"text-blue-500 animate-spin"})}):e==="completed"?i.jsx("div",{className:"mt-0.5 shrink-0",children:i.jsx(_s,{size:14,className:"text-green-500"})}):i.jsx("div",{className:"mt-0.5 shrink-0",children:i.jsx(Wl,{size:14,className:"text-red-400"})})}function tx(e){const r=Date.now()-e;return r<6e4?"just now":r<36e5?`${Math.floor(r/6e4)}m ago`:r<864e5?`${Math.floor(r/36e5)}h ago`:r<6048e5?`${Math.floor(r/864e5)}d ago`:new Date(e).toLocaleDateString()}function rx(e){if(e<1e3)return"<1s";const t=Math.floor(e/1e3);return t<60?`${t}s`:`${Math.floor(t/60)}m`}function nx({onSubmit:e,isRunning:t}){const[r,n]=j.useState(""),[s,l]=j.useState(!1),[a,o]=j.useState(""),[u,d]=j.useState(""),[y,m]=j.useState(""),x=j.useMemo(()=>[{label:"Summarize Repo",text:"Summarize the current repository structure and key files."},{label:"Run Tests",text:"Run the test suite and report any failures."},{label:"Explain Changes",text:"Explain the recent changes in this repo."},{label:"Plan Tasks",text:"Create a step-by-step plan to complete this task."}],[]),k=()=>{const c=[];a.trim()&&c.push(`Goal: ${a.trim()}`);const f=u.split(/\n|;/).map(g=>g.trim()).filter(Boolean);f.length>0&&c.push(`Constraints:
|
|
231
|
+
- ${f.join(`
|
|
232
|
+
- `)}`);const p=y.split(/\n|;/).map(g=>g.trim()).filter(Boolean);return p.length>0&&c.push(`Success Criteria:
|
|
233
|
+
- ${p.join(`
|
|
234
|
+
- `)}`),c.join(`
|
|
235
|
+
`)},v=()=>{const c=k();c&&(n(f=>{if(!f.trim())return c;const g=f.endsWith(`
|
|
236
|
+
`)?`
|
|
237
|
+
`:`
|
|
238
|
+
|
|
239
|
+
`;return`${f}${g}${c}`}),l(!1))},w=()=>{const c=r.trim();!c||t||(e(c),n(""),o(""),d(""),m(""))},T=c=>{c.key==="Enter"&&(c.metaKey||c.ctrlKey)&&(c.preventDefault(),w())};return i.jsxs("div",{className:"flex flex-col h-full",children:[i.jsxs("div",{className:"flex items-center justify-between mb-4",children:[i.jsxs("div",{children:[i.jsx("h2",{className:"text-lg font-semibold text-gray-900",children:"New Task"}),i.jsx("p",{className:"text-xs text-gray-500 mt-0.5",children:"Use Tasks for tracked execution. Use Chat for exploratory discussion."})]}),i.jsxs("button",{onClick:()=>l(!s),className:"flex items-center gap-1.5 px-3 py-1.5 text-xs rounded-md border border-gray-200 text-gray-600 hover:bg-gray-50 transition-colors",children:[i.jsx(yh,{size:14}),"Structured Prompt"]})]}),i.jsx("div",{className:"flex flex-wrap gap-2 mb-3",children:x.map(c=>i.jsx("button",{onClick:()=>n(c.text),className:"px-3 py-1 rounded-full text-xs border border-gray-200 bg-gray-50 hover:bg-gray-100 text-gray-600 transition-colors",children:c.label},c.label))}),s&&i.jsxs("div",{className:"bg-gray-50 rounded-lg border border-gray-200 p-4 mb-3",children:[i.jsxs("div",{className:"flex items-center justify-between mb-3",children:[i.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Structured Prompt"}),i.jsx("button",{onClick:()=>l(!1),className:"text-gray-400 hover:text-gray-600",children:i.jsx(xh,{size:14})})]}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:[i.jsxs("div",{children:[i.jsx("label",{className:"text-xs text-gray-500 mb-1 block",children:"Goal"}),i.jsx("input",{value:a,onChange:c=>o(c.target.value),className:"w-full border border-gray-200 rounded-md p-2 text-sm bg-white focus:outline-none focus:ring-2 focus:ring-blue-200",placeholder:"What should be achieved?"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"text-xs text-gray-500 mb-1 block",children:"Constraints"}),i.jsx("textarea",{value:u,onChange:c=>d(c.target.value),rows:2,className:"w-full border border-gray-200 rounded-md p-2 text-sm bg-white focus:outline-none focus:ring-2 focus:ring-blue-200",placeholder:"One per line or semicolons"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"text-xs text-gray-500 mb-1 block",children:"Success Criteria"}),i.jsx("textarea",{value:y,onChange:c=>m(c.target.value),rows:2,className:"w-full border border-gray-200 rounded-md p-2 text-sm bg-white focus:outline-none focus:ring-2 focus:ring-blue-200",placeholder:"What does success look like?"})]})]}),i.jsx("button",{onClick:v,className:"mt-3 px-3 py-1.5 rounded text-xs text-white bg-blue-600 hover:bg-blue-700 transition-colors",children:"Apply to Input"})]}),i.jsxs("div",{className:"flex-1 flex flex-col",children:[i.jsx("textarea",{value:r,onChange:c=>n(c.target.value),onKeyDown:T,rows:6,className:"flex-1 min-h-[120px] w-full border border-gray-200 rounded-lg p-3 text-sm focus:outline-none focus:ring-2 focus:ring-blue-200 resize-none",placeholder:"Describe what you want Lydia to do..."}),i.jsxs("div",{className:"flex items-center justify-between mt-3",children:[i.jsxs("span",{className:"text-xs text-gray-400",children:[navigator.platform.includes("Mac")?"Cmd":"Ctrl","+Enter to submit"]}),i.jsxs("button",{onClick:w,disabled:t||!r.trim(),className:`flex items-center gap-2 px-4 py-2 rounded-lg text-white text-sm font-medium transition-colors ${t||!r.trim()?"bg-gray-300 cursor-not-allowed":"bg-blue-600 hover:bg-blue-700 shadow-sm"}`,children:[i.jsx(ph,{size:16}),t?"Running...":"Run Task"]})]})]})]})}function sx({runId:e,input:t,startedAt:r,streamText:n,agentEvents:s,activeTools:l,isRunning:a,wsStatus:o,pendingPrompt:u,promptResponse:d,onPromptResponseChange:y,onPromptSubmit:m,lastResult:x,error:k,onContinueInChat:v}){const w=j.useRef(null),T=ix(r,a);return j.useEffect(()=>{w.current&&(w.current.scrollTop=w.current.scrollHeight)},[n,s.length]),i.jsxs("div",{className:"flex flex-col h-full",children:[i.jsxs("div",{className:"flex items-center justify-between pb-3 mb-3 border-b border-gray-100",children:[i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsx("h2",{className:"text-sm font-semibold text-gray-900 truncate",children:t}),i.jsxs("div",{className:"flex items-center gap-3 mt-1",children:[i.jsx("span",{className:`inline-flex items-center gap-1.5 text-xs font-medium ${a?"text-blue-600":k?"text-red-600":"text-green-600"}`,children:a?i.jsxs(i.Fragment,{children:[i.jsx(eu,{size:12,className:"animate-spin"}),u?"Waiting for input":"Running"]}):k?i.jsxs(i.Fragment,{children:[i.jsx(Wa,{size:12}),"Failed"]}):"Completed"}),i.jsxs("span",{className:"flex items-center gap-1 text-xs text-gray-400",children:[i.jsx(Jo,{size:12}),lx(T)]}),l.length>0&&i.jsxs("span",{className:"flex items-center gap-1 text-xs text-blue-500",children:[i.jsx(tu,{size:12}),l[0]]})]})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[o==="connected"&&i.jsxs("span",{className:"flex items-center gap-1 text-xs text-green-500",children:[i.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500 animate-pulse"}),"Live"]}),v&&i.jsx("button",{onClick:()=>v(`Continue helping with task "${t}". Current status: ${a?"running":k?"failed":"completed"}.${n?` Latest output:
|
|
240
|
+
${n.slice(-1200)}`:""}${k?`
|
|
241
|
+
Error: ${k}`:""}`),className:"px-2 py-1 rounded-md border border-gray-200 text-xs text-gray-600 hover:bg-gray-50",children:"Continue In Chat"})]})]}),(n||x)&&i.jsxs("div",{ref:w,className:"flex-1 min-h-0 bg-gray-50 rounded-lg p-3 mb-3 text-sm whitespace-pre-wrap font-mono overflow-y-auto leading-relaxed",children:[n||x,a&&!u&&i.jsx("span",{className:"animate-pulse text-blue-500",children:"..."})]}),k&&i.jsxs("div",{className:"bg-red-50 border border-red-200 rounded-lg p-3 mb-3 text-sm text-red-700",children:[i.jsxs("div",{className:"flex items-center gap-2 font-medium mb-1",children:[i.jsx(Wa,{size:14}),"Task Failed"]}),k]}),u&&i.jsxs("div",{className:"bg-amber-50 border border-amber-200 rounded-lg p-4 mb-3",children:[i.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium text-amber-800 mb-2",children:[i.jsx(hh,{size:14}),"Confirmation Required"]}),i.jsx("p",{className:"text-sm text-amber-700 whitespace-pre-wrap mb-3",children:u.prompt}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("input",{value:d,onChange:c=>y(c.target.value),onKeyDown:c=>{c.key==="Enter"&&(c.preventDefault(),m())},className:"flex-1 border border-amber-200 rounded-md p-2 text-sm bg-white focus:outline-none focus:ring-2 focus:ring-amber-300",placeholder:"Type your response (yes/no/always)...",autoFocus:!0}),i.jsx("button",{onClick:m,className:"px-4 py-2 rounded-md text-white text-sm bg-amber-600 hover:bg-amber-700 transition-colors",children:"Send"})]})]}),s.length>0&&i.jsxs("div",{className:"border-t border-gray-100 pt-3",children:[i.jsx("div",{className:"text-xs font-medium text-gray-500 mb-2",children:"Event Log"}),i.jsx("div",{className:"space-y-0.5 max-h-40 overflow-y-auto",children:s.slice(-30).map((c,f)=>{var p,g,b,S,N,C,z,O,G,Y,te,q,re,_,U,M,L,D,H,E,$,Q,Pe,pe,ye,qe,dt,Tt,Nr,Mt,$e,Cr,Er,br,de;return i.jsxs("div",{className:"flex items-start gap-2 text-xs text-gray-500 py-0.5",children:[i.jsx("span",{className:"text-gray-300 shrink-0 tabular-nums",children:new Date(c.timestamp).toLocaleTimeString()}),c.type==="tool:start"&&i.jsxs("span",{className:"text-blue-600",children:["⚙ ",(p=c.data)==null?void 0:p.name]}),c.type==="tool:complete"&&i.jsxs("span",{className:"text-green-600",children:["✓ ",(g=c.data)==null?void 0:g.name," (",(b=c.data)==null?void 0:b.duration,"ms)"]}),c.type==="tool:error"&&i.jsxs("span",{className:"text-red-600",children:["✗ ",(S=c.data)==null?void 0:S.name,": ",(N=c.data)==null?void 0:N.error]}),c.type==="message"&&i.jsx("span",{className:"text-gray-600 truncate",children:(z=(C=c.data)==null?void 0:C.text)==null?void 0:z.substring(0,80)}),c.type==="thinking"&&i.jsx("span",{className:"text-gray-400 italic",children:"thinking..."}),c.type==="retry"&&i.jsxs("span",{className:"text-yellow-600",children:["↻ Retry ",(O=c.data)==null?void 0:O.attempt,"/",(G=c.data)==null?void 0:G.maxRetries]}),c.type==="task:error"&&i.jsxs("span",{className:"text-red-600",children:["task failed: ",((Y=c.data)==null?void 0:Y.error)||"unknown error"]}),c.type==="task:resume"&&i.jsxs("span",{className:"text-blue-600",children:["resumed from iteration ",((te=c.data)==null?void 0:te.fromIteration)??"?"]}),c.type==="checkpoint:saved"&&i.jsxs("span",{className:"text-gray-600",children:["checkpoint saved (iteration ",((q=c.data)==null?void 0:q.iteration)??"?",")"]}),c.type==="checkpoint:error"&&i.jsxs("span",{className:"text-red-600",children:["checkpoint error: ",((re=c.data)==null?void 0:re.error)||"unknown error"]}),c.type==="phase:start"&&i.jsxs("span",{className:"text-sky-600",children:["phase started: ",((_=c.data)==null?void 0:_.phase)||"unknown"]}),c.type==="phase:end"&&i.jsxs("span",{className:"text-sky-600",children:["phase ended: ",((U=c.data)==null?void 0:U.phase)||"unknown"]}),c.type==="intent"&&i.jsxs("span",{className:"text-cyan-700",children:["intent: ",((L=(M=c.data)==null?void 0:M.intent)==null?void 0:L.summary)||((H=(D=c.data)==null?void 0:D.intent)==null?void 0:H.goal)||"analyzed"]}),c.type==="plan"&&i.jsxs("span",{className:"text-cyan-700",children:["plan generated (",Array.isArray((E=c.data)==null?void 0:E.steps)?c.data.steps.length:0," step(s))"]}),c.type==="plan:error"&&i.jsxs("span",{className:"text-red-600",children:["plan error: ",(($=c.data)==null?void 0:$.error)||"unknown error"]}),c.type==="max_iterations"&&i.jsxs("span",{className:"text-orange-600",children:["max iterations reached (",((Q=c.data)==null?void 0:Q.iterations)??"?",")"]}),c.type==="skill:error"&&i.jsxs("span",{className:"text-red-600",children:["skill error: ",((Pe=c.data)==null?void 0:Pe.error)||"unknown error"]}),c.type==="computer-use:session.start"&&i.jsxs("span",{className:"text-indigo-600",children:["computer-use session started (",(pe=c.data)==null?void 0:pe.sessionId,")"]}),c.type==="computer-use:action.dispatch"&&i.jsxs("span",{className:"text-indigo-600",children:["action ",(ye=c.data)==null?void 0:ye.actionId,": ",(qe=c.data)==null?void 0:qe.canonicalAction," [",(dt=c.data)==null?void 0:dt.riskLevel,"]"]}),c.type==="computer-use:observation.collect"&&i.jsxs("span",{className:"text-indigo-600",children:["frame ",(Tt=c.data)==null?void 0:Tt.frameId," collected (",(Nr=c.data)==null?void 0:Nr.blocks," block(s))"]}),c.type==="computer-use:checkpoint.save"&&i.jsxs("span",{className:"text-indigo-600",children:["checkpoint saved (failures: ",((Mt=c.data)==null?void 0:Mt.verificationFailures)??0,")"]}),c.type==="computer-use:verification"&&i.jsxs("span",{className:($e=c.data)!=null&&$e.ok?"text-green-600":"text-red-600",children:["verification: ",(Cr=c.data)!=null&&Cr.ok?"ok":"failed",(Er=c.data)!=null&&Er.code?` (${c.data.code})`:""]}),c.type==="computer-use:session.end"&&i.jsxs("span",{className:"text-indigo-600",children:["session ended (",(br=c.data)==null?void 0:br.sessionId,") with ",((de=c.data)==null?void 0:de.verificationFailures)??0," verification failure(s)"]})]},f)})})]})]})}function lx(e){if(e<1e3)return`${e}ms`;const t=Math.floor(e/1e3);if(t<60)return`${t}s`;const r=Math.floor(t/60),n=t%60;return`${r}m ${n}s`}function ix(e,t){const[r,n]=j.useState(Date.now()-e);return j.useEffect(()=>{if(!t){n(Date.now()-e);return}const s=setInterval(()=>{n(Date.now()-e)},1e3);return()=>clearInterval(s)},[e,t]),r}const ax={default:"bg-white border border-[color:var(--line)] shadow-[var(--shadow-soft)]",subtle:"bg-[color:var(--surface-subtle)] border border-[color:var(--line)]",accent:"bg-[color:var(--surface-accent)] border border-[color:var(--line-strong)] shadow-[var(--shadow-soft)]"};function Ye({title:e,subtitle:t,actions:r,children:n,tone:s="default",className:l="",contentClassName:a=""}){return i.jsxs("section",{className:`rounded-2xl ${ax[s]} ${l}`,children:[(e||t||r)&&i.jsxs("header",{className:"flex items-start justify-between gap-4 p-4 border-b border-[color:var(--line)]",children:[i.jsxs("div",{children:[e&&i.jsx("h3",{className:"text-sm font-semibold text-[color:var(--text-strong)]",children:e}),t&&i.jsx("p",{className:"text-xs text-[color:var(--text-muted)] mt-1",children:t})]}),r&&i.jsx("div",{children:r})]}),i.jsx("div",{className:`p-4 ${a}`.trim(),children:n})]})}function ox({taskId:e,onResumeTask:t,onContinueInChat:r}){var x,k;const{data:n,isLoading:s,error:l}=Ne({queryKey:["task-detail",e],queryFn:()=>Z.getTaskDetail(e),retry:1}),{data:a}=Ne({queryKey:["resumable-tasks"],queryFn:()=>Z.getResumableTasks(),staleTime:5e3}),o=(x=a==null?void 0:a.items)==null?void 0:x.some(v=>v.taskId===e),u=(k=a==null?void 0:a.items)==null?void 0:k.find(v=>v.taskId===e);if(s)return i.jsx("div",{className:"max-w-3xl",children:i.jsx(Zr,{type:"loading",title:"Loading task details..."})});if(l||!n)return o&&u?i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[i.jsx(Wa,{size:20,className:"text-amber-500"}),i.jsx("h2",{className:"text-lg font-semibold text-gray-800",children:"Interrupted Task"})]}),i.jsxs("div",{className:"bg-amber-50 border border-amber-200 rounded-lg p-4",children:[i.jsx("p",{className:"text-sm text-amber-800 font-medium mb-1",children:"This task was interrupted and can be resumed."}),i.jsxs("p",{className:"text-xs text-amber-600",children:["Stopped at iteration ",u.iteration," · Last checkpoint: ",new Date(u.updatedAt).toLocaleString()]}),i.jsx("p",{className:"text-sm text-gray-700 mt-2",children:u.input})]}),t&&i.jsxs("button",{onClick:()=>t(e),className:"flex items-center gap-2 px-4 py-2 bg-blue-600 text-white rounded-lg text-sm font-medium hover:bg-blue-700 transition-colors",children:[i.jsx(Ga,{size:14}),"Resume Task"]})]}):i.jsx("div",{className:"max-w-3xl",children:i.jsx(Zr,{type:"error",title:"Task detail unavailable",message:l?String(l.message||l):"Task not found"})});const d=n.status==="completed",y=n.report,m=fx(n.evidence||[]);return i.jsxs("div",{className:"space-y-5 max-w-3xl",children:[i.jsxs("div",{className:"flex items-start justify-between gap-3",children:[i.jsxs("div",{className:"flex items-start gap-3",children:[d?i.jsx(_s,{size:20,className:"text-green-500 mt-0.5 shrink-0"}):i.jsx(Wl,{size:20,className:"text-red-400 mt-0.5 shrink-0"}),i.jsxs("div",{children:[i.jsx("h2",{className:"text-lg font-semibold text-gray-800 leading-tight",children:(y==null?void 0:y.intentSummary)||n.input||"Task"}),i.jsxs("div",{className:"flex items-center gap-3 mt-1 text-xs text-gray-400",children:[i.jsx("span",{className:d?"text-green-600":"text-red-500",children:d?"Completed":"Failed"}),i.jsx("span",{children:"·"}),i.jsx("span",{children:new Date(n.createdAt).toLocaleString()}),n.duration!=null&&i.jsxs(i.Fragment,{children:[i.jsx("span",{children:"·"}),i.jsxs("span",{className:"flex items-center gap-1",children:[i.jsx(Jo,{size:10}),hx(n.duration)]})]})]})]})]}),i.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[r&&i.jsx("button",{onClick:()=>{var v;return r(`Continue helping with task "${(y==null?void 0:y.intentSummary)||n.input}".
|
|
242
|
+
Status: ${n.status}.${y!=null&&y.summary?`
|
|
243
|
+
Summary: ${y.summary}`:""}${(v=y==null?void 0:y.followUps)!=null&&v.length?`
|
|
244
|
+
Follow-ups:
|
|
245
|
+
- ${y.followUps.join(`
|
|
246
|
+
- `)}`:""}`)},className:"flex items-center gap-1.5 px-3 py-1.5 border border-gray-200 text-gray-600 rounded-md text-xs font-medium hover:bg-gray-50 transition-colors",children:"Continue In Chat"}),o&&t&&i.jsxs("button",{onClick:()=>t(e),className:"flex items-center gap-1.5 px-3 py-1.5 bg-blue-600 text-white rounded-md text-xs font-medium hover:bg-blue-700 transition-colors",children:[i.jsx(Ga,{size:12}),"Resume"]})]})]}),(y==null?void 0:y.summary)&&i.jsx(Ye,{tone:"subtle",children:i.jsx("p",{className:"text-sm text-gray-700",children:y.summary})}),(y==null?void 0:y.outputs)&&y.outputs.length>0&&i.jsxs("div",{children:[i.jsx("h3",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wider mb-2",children:"Outputs"}),i.jsx("ul",{className:"space-y-1.5",children:y.outputs.map((v,w)=>i.jsxs("li",{className:"flex items-start gap-2 text-sm text-gray-700",children:[i.jsx("span",{className:"text-gray-400 mt-0.5",children:"→"}),i.jsx("span",{children:v})]},w))})]}),(y==null?void 0:y.steps)&&y.steps.length>0&&i.jsxs("div",{children:[i.jsx("h3",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wider mb-2",children:"Steps"}),i.jsx("div",{className:"space-y-1",children:y.steps.map((v,w)=>i.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[v.status==="completed"?i.jsx(_s,{size:12,className:"text-green-500 shrink-0"}):i.jsx(Wl,{size:12,className:"text-red-400 shrink-0"}),i.jsx("span",{className:"text-gray-700",children:v.stepId}),i.jsxs("span",{className:"text-gray-400 text-xs",children:["(",v.status,")"]})]},w))})]}),(y==null?void 0:y.followUps)&&y.followUps.length>0&&i.jsxs("div",{children:[i.jsx("h3",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wider mb-2",children:"Follow-ups"}),i.jsx("ul",{className:"space-y-1",children:y.followUps.map((v,w)=>i.jsxs("li",{className:"flex items-start gap-2 text-sm text-gray-600",children:[i.jsx("span",{className:"text-gray-400",children:"•"}),i.jsx("span",{children:v})]},w))})]}),n.traces&&n.traces.length>0&&i.jsxs("div",{children:[i.jsxs("h3",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wider mb-2",children:["Tool Traces (",n.traces.length,")"]}),i.jsx("div",{className:"space-y-1",children:n.traces.map((v,w)=>i.jsx(ux,{trace:v},w))})]}),n.evidence&&n.evidence.length>0&&i.jsxs("div",{children:[i.jsxs("h3",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wider mb-2",children:["Evidence Timeline (",n.evidence.length,")"]}),i.jsx("div",{className:"space-y-3",children:m.map(v=>i.jsxs(Ye,{tone:"subtle",title:v.sessionId,subtitle:`${v.frames.length} frame(s) · ${v.actions.length} action(s)`,children:[i.jsx("div",{className:"flex flex-wrap gap-2 mb-3",children:v.actions.map(w=>i.jsx("span",{className:"rounded-full border border-[color:var(--line-strong)] bg-white px-2 py-1 text-[10px] font-semibold tracking-[0.18em] text-[color:var(--accent)]",children:w},w))}),i.jsx("div",{className:"space-y-2",children:v.frames.slice(0,20).map((w,T)=>{const c=Array.isArray(w.blocks)?w.blocks.map(f=>f.type).join(", "):"unknown";return i.jsxs("div",{className:"rounded-xl border border-[color:var(--line)] bg-white px-3 py-3 text-xs space-y-2",children:[i.jsxs("div",{className:"flex items-center justify-between gap-2",children:[i.jsxs("div",{children:[i.jsx("div",{className:"font-semibold text-[color:var(--text-strong)]",children:w.actionId}),i.jsx("div",{className:"text-[color:var(--text-muted)]",children:w.frameId})]}),i.jsxs("div",{className:"text-right text-[color:var(--text-muted)]",children:[i.jsx("div",{children:new Date(w.createdAt).toLocaleTimeString()}),i.jsx("div",{children:c})]})]}),i.jsx("div",{className:"space-y-2",children:(Array.isArray(w.blocks)?w.blocks:[]).map((f,p)=>i.jsx("div",{className:"rounded-lg border border-[color:var(--line)] bg-[color:var(--surface-subtle)] px-3 py-2 text-[color:var(--text-strong)]",children:dx(f)},p))})]},T)})})]},v.sessionId))})]})]})}function ux({trace:e}){const[t,r]=j.useState(!1),n=e.status==="success";return i.jsxs("div",{className:"border border-gray-100 rounded-md",children:[i.jsxs("button",{onClick:()=>r(!t),className:"flex items-center gap-2 w-full px-3 py-1.5 text-left text-sm hover:bg-gray-50 transition-colors",children:[t?i.jsx(dh,{size:12}):i.jsx(Ly,{size:12}),n?i.jsx(_s,{size:12,className:"text-green-500"}):i.jsx(Wl,{size:12,className:"text-red-400"}),i.jsx("span",{className:"font-medium text-gray-700",children:e.tool_name}),i.jsxs("span",{className:"text-xs text-gray-400 ml-auto",children:[e.duration,"ms"]})]}),t&&i.jsxs("div",{className:"px-3 pb-2 space-y-1",children:[e.tool_args&&i.jsxs("div",{children:[i.jsx("span",{className:"text-[10px] font-semibold text-gray-400 uppercase",children:"Args"}),i.jsx("pre",{className:"text-xs text-gray-600 bg-gray-50 rounded p-2 overflow-x-auto max-h-32",children:cx(e.tool_args)})]}),e.tool_output&&i.jsxs("div",{children:[i.jsx("span",{className:"text-[10px] font-semibold text-gray-400 uppercase",children:"Output"}),i.jsx("pre",{className:"text-xs text-gray-600 bg-gray-50 rounded p-2 overflow-x-auto max-h-40",children:wl(typeof e.tool_output=="string"?e.tool_output:JSON.stringify(e.tool_output,null,2),2e3)})]})]})]})}function cx(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}function wl(e,t){return e.length<=t?e:e.substring(0,t)+`
|
|
247
|
+
... (${e.length-t} more chars)`}function dx(e){if(!e||typeof e!="object")return"unknown block";if(e.type==="text")return`text: ${wl(String(e.text||""),220)}`;if(e.type==="image"){const t=String(e.dataRef||"");return t.startsWith("data:image/")?i.jsxs("div",{className:"space-y-1",children:[i.jsx("div",{children:`image: ${e.mediaType||"unknown"} (inline preview)`}),i.jsx("img",{src:t,alt:"evidence preview",className:"max-h-40 rounded border border-gray-200"})]}):`image: ${e.mediaType||"unknown"} (${t||"no-ref"})`}if(e.type==="artifact_ref")return`artifact (${e.kind||"unknown"}): ${e.path||"unknown path"}`;if(e.type==="structured_json"){const t=e.payload&&typeof e.payload=="object"?JSON.stringify(e.payload):String(e.payload||"");return`json: ${wl(t,220)}`}return`${e.type}: ${wl(JSON.stringify(e),220)}`}function fx(e){const t=new Map;for(const r of e){const n=(r==null?void 0:r.sessionId)||"unknown-session",s=t.get(n)||{sessionId:n,frames:[],actions:[]};s.frames.push(r),r!=null&&r.actionId&&!s.actions.includes(r.actionId)&&s.actions.push(r.actionId),t.set(n,s)}return Array.from(t.values())}function hx(e){if(e<1e3)return`${e}ms`;const t=Math.floor(e/1e3);if(t<60)return`${t}s`;const r=Math.floor(t/60),n=t%60;return`${r}m ${n}s`}function px({selectedId:e,isRunning:t,onSubmitTask:r,onResumeTask:n,onContinueInChat:s,activeRunId:l,activeInput:a,activeStartedAt:o,streamText:u,agentEvents:d,activeTools:y,wsStatus:m,pendingPrompt:x,promptResponse:k,onPromptResponseChange:v,onPromptSubmit:w,lastResult:T,liveError:c}){return e===null?i.jsx("div",{className:"h-full",children:i.jsx(nx,{onSubmit:r,isRunning:!!l})}):e===l&&l?i.jsx("div",{className:"h-full",children:i.jsx(sx,{runId:l,input:a,startedAt:o,streamText:u,agentEvents:d,activeTools:y,isRunning:t,wsStatus:m,pendingPrompt:x,promptResponse:k,onPromptResponseChange:v,onPromptSubmit:w,lastResult:T,error:c,onContinueInChat:s})}):i.jsx("div",{className:"h-full overflow-auto",children:i.jsx(ox,{taskId:e,onResumeTask:n,onContinueInChat:s})})}function mx({onContinueInChat:e}){const[t,r]=j.useState(null),n=ci(),[s,l]=j.useState(null),[a,o]=j.useState(""),[u,d]=j.useState(0),[y,m]=j.useState(!1),[x,k]=j.useState(null),[v,w]=j.useState(null),[T,c]=j.useState(null),[f,p]=j.useState(""),[g,b]=j.useState(""),[S,N]=j.useState([]),[C,z]=j.useState({}),O=j.useRef(""),G=j.useMemo(()=>Object.entries(C).filter(([,E])=>E>0).map(([E])=>E),[C]),Y=j.useCallback((E,$)=>{z(Q=>{const Pe={...Q},pe=Pe[E]||0,ye=Math.max(0,pe+$);return ye===0?delete Pe[E]:Pe[E]=ye,Pe})},[]),te=j.useCallback(()=>{n.invalidateQueries({queryKey:["task-history"]}),n.invalidateQueries({queryKey:["task-detail"]}),n.invalidateQueries({queryKey:["resumable-tasks"]}),n.invalidateQueries({queryKey:["memory-reports-summary"]})},[n]),q=j.useCallback(E=>{const $=(E==null?void 0:E.trim())||"Task failed.",Q=O.current.trim();return Q?`${Q}
|
|
248
|
+
|
|
249
|
+
Execution failed.
|
|
250
|
+
Reason: ${$}`:`Execution failed.
|
|
251
|
+
Reason: ${$}`},[]),re=j.useCallback(E=>{var $,Q,Pe,pe,ye,qe,dt,Tt,Nr,Mt,$e,Cr,Er,br;switch(E.type){case"connected":l((($=E.data)==null?void 0:$.activeRunId)||null),m(!!((Q=E.data)!=null&&Q.activeRunId));break;case"task:start":l(((Pe=E.data)==null?void 0:Pe.runId)||null),o(((pe=E.data)==null?void 0:pe.description)||a),m(!0);break;case"task:resume":l(((ye=E.data)==null?void 0:ye.runId)||null),m(!0),N(de=>[...de,{type:"task:resume",data:E.data,timestamp:E.timestamp}]);break;case"stream:text":O.current+=((qe=E.data)==null?void 0:qe.text)||"",b(O.current);break;case"stream:thinking":case"thinking":N(de=>[...de,{type:"thinking",data:E.data,timestamp:E.timestamp}]);break;case"message":N(de=>[...de,{type:"message",data:E.data,timestamp:E.timestamp}]);break;case"tool:start":{const de=((dt=E.data)==null?void 0:dt.name)||"unknown";Y(de,1),N(Pr=>[...Pr,{type:"tool:start",data:E.data,timestamp:E.timestamp}]);break}case"tool:complete":{const de=((Tt=E.data)==null?void 0:Tt.name)||"unknown";Y(de,-1),N(Pr=>[...Pr,{type:"tool:complete",data:E.data,timestamp:E.timestamp}]);break}case"tool:error":{const de=((Nr=E.data)==null?void 0:Nr.name)||"unknown";Y(de,-1),N(Pr=>[...Pr,{type:"tool:error",data:E.data,timestamp:E.timestamp}]);break}case"task:complete":w(((Mt=E.data)==null?void 0:Mt.result)||"Task completed."),l(null),m(!1),te();break;case"task:error":k((($e=E.data)==null?void 0:$e.error)||"Task failed."),w(q(((Cr=E.data)==null?void 0:Cr.error)||"Task failed.")),N(de=>[...de,{type:"task:error",data:E.data,timestamp:E.timestamp}]),l(null),m(!1),te();break;case"interaction_request":c({id:(Er=E.data)==null?void 0:Er.id,prompt:(br=E.data)==null?void 0:br.prompt});break;case"retry":N(de=>[...de,{type:"retry",data:E.data,timestamp:E.timestamp}]);break;case"checkpoint:saved":case"checkpoint:error":case"phase:start":case"phase:end":case"intent":case"plan":case"plan:error":case"max_iterations":case"skill:error":case"computer-use:session.start":case"computer-use:action.dispatch":case"computer-use:observation.collect":case"computer-use:checkpoint.save":case"computer-use:verification":case"computer-use:session.end":N(de=>[...de,{type:E.type,data:E.data,timestamp:E.timestamp}]);break}},[a,Y,te]),{status:_}=vh({onMessage:re}),U=j.useCallback(()=>{k(null),w(null),b(""),O.current="",N([]),z({}),c(null),p("")},[]),M=j.useCallback(async E=>{U(),o(E),d(Date.now());try{const $=await Z.runTask(E);l($.runId),m(!0),r($.runId)}catch($){const Q=$.message||"Failed to run task.";k(Q),w(q(Q)),m(!1)}},[q,U]),L=j.useCallback(async E=>{U(),o("(resumed)"),d(Date.now());try{const $=await Z.resumeTask(E);l($.runId),m(!0),r($.runId),o(`Resumed from iteration ${$.fromIteration}`)}catch($){const Q=$.message||"Failed to resume task.";k(Q),w(q(Q)),m(!1)}},[q,U]),D=j.useCallback(async()=>{if(!(!s||!T))try{await Z.respondToTask(s,f||"yes"),c(null),p("")}catch(E){k(E.message||"Failed to send response.")}},[s,T,f]),H=j.useCallback(E=>{r(E)},[]);return i.jsx("div",{className:"h-full p-6",children:i.jsxs("div",{className:"h-full grid grid-cols-12 gap-4",children:[i.jsx("div",{className:"col-span-12 lg:col-span-4 xl:col-span-3 min-h-0",children:i.jsx(Ye,{title:"Task Queue",subtitle:"Create, run, and inspect tracked tasks.",className:"h-full flex flex-col",children:i.jsx("div",{className:"h-[calc(100vh-210px)]",children:i.jsx(Jy,{selectedId:t,onSelect:H,activeRunId:s})})})}),i.jsx("div",{className:"col-span-12 lg:col-span-8 xl:col-span-9 min-h-0",children:i.jsx(Ye,{title:t?"Task Detail":"Task Composer",subtitle:t?"Structured execution, report, and resume flow.":"Define what Lydia should execute.",className:"h-full flex flex-col",children:i.jsx("div",{className:"h-[calc(100vh-210px)]",children:i.jsx(px,{selectedId:t,isRunning:y&&t===s,onSubmitTask:M,onResumeTask:L,onContinueInChat:e,activeRunId:s,activeInput:a,activeStartedAt:u,streamText:g,agentEvents:S,activeTools:G,wsStatus:_,pendingPrompt:T,promptResponse:f,onPromptResponseChange:p,onPromptSubmit:D,lastResult:v,liveError:x})})})})]})})}const gh="lydia.dashboard.chat.workspace";function Xa(e){return`${e}-${Date.now()}-${Math.random().toString(36).slice(2,8)}`}function yx(e){return e instanceof Error&&e.message.trim().toLowerCase()==="session not found"}function xx(e){return/[\u3400-\u9fff]/.test(e)}function vx(e){const t=new Date(e);return Number.isNaN(t.getTime())?"":new Intl.DateTimeFormat("zh-CN",{hour:"2-digit",minute:"2-digit"}).format(t)}function gx(e,t){const r=e.trim(),n=t.trim();return r?r.includes(n)?r:`${r}
|
|
252
|
+
|
|
253
|
+
执行失败:${n}`:`执行失败:${n}`}function wx(){if(typeof window>"u")return{sessionId:null,input:"",messages:[]};try{const e=window.localStorage.getItem(gh);if(!e)return{sessionId:null,input:"",messages:[]};const t=JSON.parse(e);return{sessionId:typeof t.sessionId=="string"?t.sessionId:null,input:typeof t.input=="string"?t.input:"",messages:Array.isArray(t.messages)?t.messages.map(r=>({id:typeof(r==null?void 0:r.id)=="string"?r.id:Xa("msg"),role:(r==null?void 0:r.role)==="assistant"?"assistant":"user",content:typeof(r==null?void 0:r.content)=="string"?r.content:"",createdAt:typeof(r==null?void 0:r.createdAt)=="string"&&r.createdAt?r.createdAt:new Date().toISOString(),thinking:typeof(r==null?void 0:r.thinking)=="string"?r.thinking:void 0,thinkingCollapsed:typeof(r==null?void 0:r.thinkingCollapsed)=="boolean"?r.thinkingCollapsed:!0,status:(r==null?void 0:r.status)==="streaming"||(r==null?void 0:r.status)==="error"?r.status:"complete"})):[]}}catch{return{sessionId:null,input:"",messages:[]}}}function kx({seedMessage:e,seedToken:t}){const r=j.useMemo(()=>wx(),[]),[n,s]=j.useState(r.sessionId),[l,a]=j.useState(r.input),[o,u]=j.useState(r.messages),[d,y]=j.useState(!1),[m,x]=j.useState(null),[k,v]=j.useState(null),[w,T]=j.useState(null),[c,f]=j.useState(null),p=j.useRef(null),g=j.useRef(null),b=j.useRef(r.sessionId);j.useEffect(()=>{g.current=k},[k]),j.useEffect(()=>{b.current=n},[n]),j.useEffect(()=>{typeof window>"u"||window.localStorage.setItem(gh,JSON.stringify({sessionId:n,input:l,messages:o}))},[l,o,n]),j.useEffect(()=>{!e||!t||a(e)},[e,t]),j.useEffect(()=>{Z.getSoul().then(T).catch(()=>{})},[]),j.useEffect(()=>{p.current&&(p.current.scrollTop=p.current.scrollHeight)},[o,d]),j.useEffect(()=>{if(!c)return;const _=window.setTimeout(()=>f(null),1800);return()=>window.clearTimeout(_)},[c]);const S=j.useCallback((_,U)=>{u(M=>M.map(L=>L.id===_?U(L):L))},[]),N=j.useCallback(async()=>{if(n)return n;const _=await Z.startChatSession();return b.current=_.sessionId,s(_.sessionId),_.sessionId},[n]),C=j.useCallback(()=>{b.current=null,s(null)},[]),z=j.useCallback(_=>{var L,D,H;const U=(L=_.data)==null?void 0:L.sessionId,M=g.current;if(!(!M||!U||U!==b.current)){if(_.type==="chat:stream:text"){S(M,E=>{var $;return{...E,content:`${E.content}${(($=_.data)==null?void 0:$.text)||""}`,status:"streaming"}});return}if(_.type==="chat:stream:thinking"||_.type==="chat:thinking"){const E=typeof((D=_.data)==null?void 0:D.thinking)=="string"?_.data.thinking:"";if(!E)return;S(M,$=>({...$,thinking:`${$.thinking||""}${E}`,thinkingCollapsed:$.thinkingCollapsed??!0,status:$.status??"streaming"}));return}if(_.type==="chat:message"){const E=typeof((H=_.data)==null?void 0:H.text)=="string"?_.data.text:"";if(!E)return;S(M,$=>({...$,content:$.content||E,status:"streaming"}))}}},[S]),{status:O}=vh({onMessage:z}),G=j.useCallback(_=>{S(_,U=>({...U,thinkingCollapsed:!(U.thinkingCollapsed??!0)}))},[S]),Y=j.useCallback(async _=>{const U=_.content.trim();if(U)try{await navigator.clipboard.writeText(U),f(_.id)}catch{f(null)}},[]),te=j.useCallback(()=>{C(),u([]),x(null),a("")},[C]),q=j.useCallback(async()=>{const _=l.trim();if(!_||d)return;const U=new Date().toISOString(),M={id:Xa("user"),role:"user",content:_,createdAt:U,status:"complete"},L={id:Xa("assistant"),role:"assistant",content:"",createdAt:U,thinking:"",thinkingCollapsed:!0,status:"streaming"};x(null),y(!0),a(""),v(L.id),u(D=>[...D,M,L]);try{let D=await N(),H;try{H=await Z.sendChatMessage(D,_)}catch(E){if(!yx(E))throw E;C(),D=await Z.startChatSession().then($=>(b.current=$.sessionId,s($.sessionId),$.sessionId)),H=await Z.sendChatMessage(D,_)}S(L.id,E=>({...E,content:E.content||H.response||"",status:"complete"}))}catch(D){const H=D instanceof Error?D.message:"Failed to send chat message";x(H),S(L.id,E=>({...E,content:gx(E.content,H),status:"error"}))}finally{Z.getSoul().then(T).catch(()=>{}),y(!1),v(null)}},[N,l,d,C,S]),re=j.useCallback(_=>_.role==="assistant"?(w==null?void 0:w.assistantDisplayName)||"Lydia":(w==null?void 0:w.userDisplayName)||(xx(_.content)?"老板":"Boss"),[w]);return i.jsx("div",{className:"h-full px-7 py-5 overflow-hidden",children:i.jsxs(Ye,{title:"聊天",subtitle:"用于快速干预的直接对话窗口。名字、会话和思考过程会在这里持续保留。",className:"h-full flex flex-col",contentClassName:"flex-1 flex flex-col min-h-0",actions:i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("div",{className:"rounded-2xl border border-[color:var(--line)] bg-white px-3 py-2 text-xs text-[color:var(--text-strong)]",children:"Main Session"}),i.jsx("button",{type:"button",onClick:te,className:"h-10 w-10 rounded-xl border border-[color:var(--line)] bg-white text-[color:var(--text-muted)] grid place-items-center hover:border-[color:var(--line-strong)]",title:"Start fresh",children:i.jsx(Ga,{size:15})}),i.jsx("div",{className:"rounded-2xl border border-[color:var(--line)] bg-white px-3 py-2 text-xs text-[color:var(--text-muted)]",children:O==="connected"?"Live":"Offline"})]}),children:[i.jsx("div",{ref:p,className:"flex-1 min-h-0 overflow-y-auto pr-2",style:{scrollbarGutter:"stable"},children:o.length===0?i.jsx("div",{className:"mx-auto max-w-5xl py-8",children:i.jsx(Zr,{type:"empty",title:"No messages yet",message:"Start with a short request. Lydia will create a new live session automatically."})}):i.jsx("div",{className:"mx-auto max-w-5xl space-y-5 pb-6",children:o.map(_=>{const U=_.content.trim().length>0,M=c===_.id;return i.jsx("div",{className:`flex ${_.role==="user"?"justify-end":"justify-start"}`,children:i.jsxs("div",{tabIndex:0,className:`group relative w-full max-w-[78%] rounded-[28px] border px-5 py-4 text-sm leading-relaxed shadow-[0_10px_30px_rgba(15,23,42,0.04)] focus:outline-none focus:ring-2 focus:ring-[color:var(--ring)] ${_.role==="user"?"bg-[#f4f7ff] border-[#cfdcff]":"bg-white border-[color:var(--line)]"}`,children:[i.jsxs("button",{type:"button",onClick:()=>void Y(_),disabled:!U,className:`absolute top-4 ${_.role==="user"?"left-4":"right-4"} inline-flex h-8 items-center gap-1 rounded-full border border-[color:var(--line)] bg-white/95 px-2.5 text-[11px] font-medium text-[color:var(--text-muted)] shadow-sm transition-opacity hover:border-[color:var(--line-strong)] hover:text-[color:var(--text-strong)] focus:opacity-100 focus:outline-none focus:ring-2 focus:ring-[color:var(--ring)] disabled:cursor-not-allowed disabled:opacity-0 ${U?"opacity-0 group-hover:opacity-100 group-focus-within:opacity-100":"opacity-0"}`,title:"Copy message",children:[M?i.jsx(ch,{size:13}):i.jsx(Dy,{size:13}),i.jsx("span",{children:M?"Copied":"Copy"})]}),i.jsxs("div",{className:`mb-3 flex items-center gap-3 text-[11px] text-[color:var(--text-muted)] ${_.role==="user"?"justify-end pr-14":"justify-between pr-14"}`,children:[i.jsx("span",{className:"font-semibold uppercase tracking-[0.14em]",children:re(_)}),i.jsx("span",{children:vx(_.createdAt)})]}),_.thinking&&i.jsxs("div",{className:"mb-3 rounded-2xl border border-[color:var(--line)] bg-[color:var(--surface-subtle)]",children:[i.jsxs("button",{type:"button",onClick:()=>G(_.id),className:"w-full px-4 py-3 flex items-center justify-between text-left text-xs text-[color:var(--text-muted)]",children:[i.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[i.jsx(zy,{size:12}),"Thought Process"]}),i.jsx(dh,{size:14,className:`transition-transform ${_.thinkingCollapsed?"":"rotate-180"}`})]}),!_.thinkingCollapsed&&i.jsx("div",{className:"px-4 pb-4 text-xs leading-6 text-[color:var(--text-muted)] whitespace-pre-wrap border-t border-[color:var(--line)]",children:_.thinking})]}),i.jsxs("div",{className:"text-[color:var(--text-strong)] whitespace-pre-wrap min-h-[1.25rem]",children:[_.content,_.status==="streaming"&&i.jsx("span",{className:"animate-pulse text-[color:var(--accent)]",children:"..."})]}),_.status==="error"&&i.jsx("div",{className:"mt-3 text-xs font-medium text-red-600",children:"Failed"})]})},_.id)})})}),m&&i.jsx("div",{className:"mt-4 mx-auto w-full max-w-5xl",children:i.jsx(Zr,{type:"error",title:"Chat request failed",message:m})}),i.jsx("div",{className:"pt-5 mt-5 border-t border-[color:var(--line)] shrink-0",children:i.jsxs("div",{className:"mx-auto max-w-5xl flex items-end gap-3",children:[i.jsxs("div",{className:"relative flex-1",children:[i.jsx(hh,{size:14,className:"absolute left-4 top-4 text-[color:var(--text-muted)]"}),i.jsx("textarea",{value:l,onChange:_=>a(_.target.value),rows:3,onKeyDown:_=>{_.key==="Enter"&&!_.shiftKey&&(_.preventDefault(),q())},className:"w-full rounded-[26px] border border-[color:var(--line)] bg-white pl-10 pr-4 py-4 text-sm focus:outline-none focus:ring-2 focus:ring-[color:var(--ring)] resize-none shadow-[0_16px_40px_rgba(15,23,42,0.06)]",placeholder:"Message Lydia here..."}),i.jsx("div",{className:"mt-2 pl-1 text-[11px] text-[color:var(--text-muted)]",children:"Enter to send, Shift+Enter for line breaks"})]}),i.jsx("button",{onClick:q,disabled:d||!l.trim(),className:"h-12 px-6 rounded-2xl bg-[#df3b31] text-white text-sm font-semibold hover:brightness-95 disabled:opacity-50 disabled:cursor-not-allowed shadow-[0_16px_30px_rgba(223,59,49,0.24)]",children:i.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[i.jsx(qy,{size:14}),"Send"]})})]})})]})})}function jx(){const[e,t]=j.useState([]),[r,n]=j.useState(null),[s,l]=j.useState(null),[a,o]=j.useState(null),[u,d]=j.useState(null),[y,m]=j.useState(!1),[x,k]=j.useState(null),v=(S,N)=>{const C=S.split(`
|
|
254
|
+
`),z=N.split(`
|
|
255
|
+
`),O=C.length+1,G=z.length+1,Y=Array.from({length:O},()=>Array(G).fill(0));for(let _=O-2;_>=0;_--)for(let U=G-2;U>=0;U--)C[_]===z[U]?Y[_][U]=Y[_+1][U+1]+1:Y[_][U]=Math.max(Y[_+1][U],Y[_][U+1]);const te=[];let q=0,re=0;for(;q<C.length&&re<z.length;)C[q]===z[re]?(te.push({type:"same",text:C[q]}),q+=1,re+=1):Y[q+1][re]>=Y[q][re+1]?(te.push({type:"del",text:C[q]}),q+=1):(te.push({type:"add",text:z[re]}),re+=1);for(;q<C.length;)te.push({type:"del",text:C[q]}),q+=1;for(;re<z.length;)te.push({type:"add",text:z[re]}),re+=1;return te},w=S=>{if(!S)return null;try{return JSON.parse(S)}catch{return null}};j.useEffect(()=>{T()},[]),j.useEffect(()=>{r?(c(r),f()):(l(null),o(null),d(null))},[r]);const T=async()=>{try{m(!0);const S=await Z.getProposals();t(S)}catch(S){k(S.message)}finally{m(!1)}},c=async S=>{const N=e.find(C=>C.id===S);if(N)try{const C=await Z.getStrategyContent(N.strategy_path);l(C)}catch(C){console.error(C),l("Failed to load content: "+C.message)}},f=async()=>{try{const S=await Z.getActiveStrategy();o(S.content),d(S.path)}catch(S){console.error(S),o(null),d(null)}},p=j.useMemo(()=>!a||!s?null:v(a,s),[a,s]),g=async S=>{if(confirm("Are you sure you want to approve this strategy?"))try{await Z.approveProposal(S),T(),n(null)}catch(N){alert("Error: "+N.message)}},b=async S=>{const N=prompt("Enter rejection reason:");if(N!==null)try{await Z.rejectProposal(S,N),T(),n(null)}catch(C){alert("Error: "+C.message)}};return i.jsxs("div",{className:"flex h-full",children:[i.jsxs("div",{className:"w-1/3 border-r border-gray-200 p-4 overflow-y-auto",children:[i.jsx("h2",{className:"text-lg font-bold mb-4",children:"Strategy Proposals"}),y&&i.jsx("div",{children:"Loading..."}),x&&i.jsx("div",{className:"text-red-500",children:x}),e.length===0&&!y&&i.jsx("div",{className:"text-gray-500",children:"No proposals found."}),i.jsx("div",{className:"space-y-2",children:e.map(S=>i.jsxs("div",{onClick:()=>n(S.id),className:`p-3 rounded cursor-pointer border ${r===S.id?"bg-blue-50 border-blue-500":"bg-white border-gray-200 hover:bg-gray-50"}`,children:[i.jsxs("div",{className:"flex justify-between items-start",children:[i.jsxs("span",{className:"font-semibold",children:["#",S.id]}),i.jsx("span",{className:`text-xs px-2 py-1 rounded ${S.status==="pending_human"?"bg-yellow-100 text-yellow-800":S.status==="approved"?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:S.status})]}),i.jsx("div",{className:"text-xs text-gray-500 mt-1 truncate",title:S.strategy_path,children:S.strategy_path.split(/[\\/]/).pop()}),i.jsx("div",{className:"text-xs text-gray-400 mt-1",children:new Date(S.created_at).toLocaleString()})]},S.id))})]}),i.jsx("div",{className:"w-2/3 p-4 overflow-y-auto bg-gray-50",children:r?i.jsx("div",{children:(()=>{var C;const S=e.find(z=>z.id===r),N=w(S==null?void 0:S.evaluation_json);return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"flex justify-between items-center mb-4",children:[i.jsx("h2",{className:"text-lg font-bold",children:"Proposal Details"}),i.jsxs("div",{className:"space-x-2",children:[i.jsxs("button",{onClick:()=>g(r),className:"px-4 py-2 bg-green-600 text-white rounded hover:bg-green-700 flex items-center gap-2",children:[i.jsx(ch,{size:16})," Approve"]}),i.jsxs("button",{onClick:()=>b(r),className:"px-4 py-2 bg-red-600 text-white rounded hover:bg-red-700 flex items-center gap-2",children:[i.jsx(xh,{size:16})," Reject"]})]})]}),i.jsxs("div",{className:"bg-white p-4 rounded shadow",children:[i.jsxs("h3",{className:"font-semibold mb-2 flex items-center gap-2",children:[i.jsx(qa,{size:16})," Strategy Content"]}),i.jsx("pre",{className:"bg-gray-900 text-gray-100 p-4 rounded overflow-x-auto text-sm font-mono",children:s||"Loading content..."})]}),i.jsxs("div",{className:"mt-4 bg-white p-4 rounded shadow",children:[i.jsxs("h3",{className:"font-semibold mb-2 flex items-center gap-2",children:[i.jsx(qa,{size:16})," Diff (Active vs Proposal)"]}),u&&i.jsxs("div",{className:"text-xs text-gray-500 mb-2",children:["Active: ",u.split(/[\\/]/).pop()]}),!p&&i.jsx("p",{className:"text-gray-500",children:"Select a proposal to compare with the active strategy."}),p&&i.jsx("pre",{className:"bg-gray-900 text-gray-100 p-4 rounded overflow-x-auto text-xs font-mono space-y-1",children:p.map((z,O)=>i.jsxs("div",{className:z.type==="add"?"text-green-400":z.type==="del"?"text-red-400":"text-gray-300",children:[z.type==="add"?"+ ":z.type==="del"?"- ":" ",z.text]},`${z.type}-${O}`))})]}),i.jsxs("div",{className:"mt-4 bg-white p-4 rounded shadow",children:[i.jsxs("h3",{className:"font-semibold mb-2 flex items-center gap-2",children:[i.jsx(uh,{size:16})," Evaluation Metrics"]}),!S&&i.jsx("p",{className:"text-gray-500",children:"No proposal selected."}),S&&!N&&i.jsx("p",{className:"text-gray-500",children:"No evaluation data available."}),S&&N&&i.jsxs("div",{className:"text-sm text-gray-700 space-y-2",children:[N.validation&&i.jsxs("div",{children:[i.jsx("div",{className:"font-semibold",children:"Validation"}),i.jsxs("div",{children:["Status: ",N.validation.status]}),N.validation.reason&&i.jsxs("div",{children:["Reason: ",N.validation.reason]})]}),N.analysis&&i.jsxs("div",{children:[i.jsx("div",{className:"font-semibold",children:"Analysis"}),i.jsx("div",{children:N.analysis})]}),N.description&&i.jsxs("div",{children:[i.jsx("div",{className:"font-semibold",children:"Change"}),i.jsx("div",{children:N.description})]}),((C=N.review)==null?void 0:C.findings)&&i.jsxs("div",{children:[i.jsx("div",{className:"font-semibold",children:"Review Findings"}),i.jsxs("div",{children:["Findings: ",N.review.findings.length]}),i.jsxs("div",{children:["Suggested confirmations: ",(N.review.suggestedConfirmations||[]).join(", ")||"None"]})]}),N.replay&&i.jsxs("div",{children:[i.jsx("div",{className:"font-semibold",children:"Replay"}),i.jsxs("div",{children:["Episodes: ",N.replay.episodes]}),i.jsxs("div",{children:["Drift episodes: ",N.replay.drift_episodes]}),i.jsxs("div",{children:["Drift steps: ",N.replay.drift_steps]})]}),N.delta&&i.jsxs("div",{children:[i.jsx("div",{className:"font-semibold",children:"Delta"}),i.jsxs("div",{children:["Success rate: ",N.delta.success_rate]}),i.jsxs("div",{children:["Confirm required: ",N.delta.confirm_required]}),i.jsxs("div",{children:["Avg duration ms: ",N.delta.avg_duration_ms]})]})]})]})]})})()}):i.jsx("div",{className:"flex items-center justify-center h-full text-gray-400",children:"Select a proposal to view details"})})]})}const Sx={pending_human:"bg-yellow-100 text-yellow-800",approved:"bg-green-100 text-green-800",rejected:"bg-red-100 text-red-800",invalid:"bg-gray-100 text-gray-600"};function Nx(){const{data:e,isLoading:t,error:r}=Ne({queryKey:["strategy-proposals"],queryFn:()=>Z.getProposals(200)}),n=l=>{if(!l)return null;try{return JSON.parse(l)}catch{return null}},s=(e||[]).slice().sort((l,a)=>a.created_at-l.created_at);return i.jsxs("div",{className:"max-w-5xl mx-auto",children:[i.jsx("h2",{className:"text-2xl font-bold mb-6",children:"Evolution History"}),t&&i.jsx("div",{className:"text-gray-500",children:"Loading..."}),r&&i.jsx("div",{className:"text-red-500",children:"Failed to load history."}),!t&&s.length===0&&i.jsx("div",{className:"text-gray-500",children:"No strategy proposals yet."}),i.jsx("div",{className:"space-y-4",children:s.map(l=>{const a=n(l.evaluation_json),o=l.strategy_path.split(/[\\/]/).pop(),u=Sx[l.status]||"bg-gray-100 text-gray-600";return i.jsxs("div",{className:"bg-white border border-gray-200 rounded-lg p-4 shadow-sm",children:[i.jsxs("div",{className:"flex items-start justify-between",children:[i.jsxs("div",{children:[i.jsxs("div",{className:"text-sm text-gray-500",children:["Proposal #",l.id]}),i.jsx("div",{className:"text-lg font-semibold",children:o})]}),i.jsx("span",{className:`text-xs px-2 py-1 rounded ${u}`,children:l.status})]}),i.jsxs("div",{className:"mt-2 text-xs text-gray-500",children:["Created: ",new Date(l.created_at).toLocaleString(),l.decided_at&&i.jsxs("span",{children:[" | Decided: ",new Date(l.decided_at).toLocaleString()]})]}),(a==null?void 0:a.description)&&i.jsxs("div",{className:"mt-3 text-sm",children:[i.jsx("span",{className:"font-semibold",children:"Change:"})," ",a.description]}),(a==null?void 0:a.analysis)&&i.jsxs("div",{className:"mt-2 text-sm text-gray-700",children:[i.jsx("span",{className:"font-semibold",children:"Analysis:"})," ",a.analysis]}),(a==null?void 0:a.validation)&&i.jsxs("div",{className:"mt-2 text-sm text-gray-600",children:["Validation: ",a.validation.status,a.validation.reason?` — ${a.validation.reason}`:""]})]},l.id)})})]})}function wh({mode:e="all"}){const t=e==="memory"?"memory":"system",[r,n]=j.useState(t),l=[{key:"system",label:"System",icon:i.jsx(mh,{size:16})},{key:"memory",label:"Memory Bank",icon:i.jsx(Zo,{size:16})},{key:"strategy",label:"Strategy",icon:i.jsx(bc,{size:16})},{key:"evolution",label:"Evolution",icon:i.jsx($y,{size:16})},{key:"replay",label:"Replay Studio",icon:i.jsx(fh,{size:16})},{key:"approvals",label:"Approvals",icon:i.jsx(bc,{size:16})},{key:"mcp",label:"MCP Health",icon:i.jsx(Hy,{size:16})}].filter(a=>e==="memory"?a.key==="memory"||a.key==="replay":e==="control"?a.key!=="memory"&&a.key!=="replay":!0);return i.jsxs("div",{className:"flex h-full",children:[i.jsxs("div",{className:"w-56 shrink-0 border-r border-gray-200 p-3",children:[i.jsx("div",{className:"text-xs font-medium text-gray-400 uppercase tracking-wide px-3 py-2",children:"Settings & Extensions"}),i.jsx("nav",{className:"space-y-0.5",children:l.map(a=>i.jsxs("button",{onClick:()=>n(a.key),className:`w-full flex items-center gap-2.5 px-3 py-2 rounded-md text-sm transition-colors ${r===a.key?"bg-gray-100 text-gray-900 font-medium":"text-gray-600 hover:bg-gray-50 hover:text-gray-800"}`,children:[a.icon,a.label]},a.key))})]}),i.jsxs("div",{className:"flex-1 overflow-auto p-6",children:[r==="system"&&i.jsx(Cx,{}),r==="memory"&&i.jsx(Ex,{}),r==="strategy"&&i.jsx(jx,{}),r==="evolution"&&i.jsx(Nx,{}),r==="replay"&&i.jsx(bx,{}),r==="approvals"&&i.jsx(Px,{}),r==="mcp"&&i.jsx(Tx,{})]})]})}function Cx(){const{data:e}=Ne({queryKey:["status"],queryFn:()=>fetch("/api/status").then(r=>r.json())}),{data:t}=Ne({queryKey:["setup"],queryFn:()=>fetch("/api/setup").then(r=>r.json())});return i.jsxs("div",{className:"max-w-3xl",children:[i.jsx("h2",{className:"text-xl font-bold mb-6",children:"System Overview"}),t&&!t.ready&&i.jsxs("div",{className:"mb-6 text-sm text-yellow-700 bg-yellow-50 border border-yellow-200 rounded-lg px-4 py-3",children:["Setup incomplete: run ",i.jsx("code",{className:"bg-yellow-100 px-1 rounded",children:"lydia init"})]}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 mb-6",children:[i.jsxs("div",{className:"bg-white p-4 rounded-lg border border-gray-200",children:[i.jsx("div",{className:"text-xs text-gray-500 mb-1",children:"Memory DB"}),i.jsx("div",{className:"text-lg font-bold text-gray-900",children:"Connected"})]}),i.jsxs("div",{className:"bg-white p-4 rounded-lg border border-gray-200",children:[i.jsx("div",{className:"text-xs text-gray-500 mb-1",children:"Agent Status"}),i.jsx("div",{className:"text-lg font-bold text-gray-900",children:"Idle"})]}),i.jsxs("div",{className:"bg-white p-4 rounded-lg border border-gray-200",children:[i.jsx("div",{className:"text-xs text-gray-500 mb-1",children:"Version"}),i.jsxs("div",{className:"text-lg font-bold text-gray-900",children:["v",(e==null?void 0:e.version)||"0.0.0"]})]})]}),i.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:[i.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Configuration"}),i.jsx("pre",{className:"bg-gray-50 p-3 rounded text-xs overflow-x-auto",children:JSON.stringify(e,null,2)})]})]})}function Ex(){const{data:e}=Ne({queryKey:["facts"],queryFn:()=>fetch("/api/memory/facts").then(t=>t.json())});return i.jsxs("div",{className:"max-w-3xl",children:[i.jsx("h2",{className:"text-xl font-bold mb-6",children:"Memory Bank"}),i.jsx("div",{className:"bg-white rounded-lg border border-gray-200 overflow-hidden",children:i.jsxs("table",{className:"w-full text-left",children:[i.jsx("thead",{className:"bg-gray-50 border-b border-gray-200 text-xs uppercase text-gray-500 font-medium",children:i.jsxs("tr",{children:[i.jsx("th",{className:"px-4 py-3",children:"Content"}),i.jsx("th",{className:"px-4 py-3 w-32",children:"Tags"}),i.jsx("th",{className:"px-4 py-3 w-36",children:"Created"})]})}),i.jsxs("tbody",{className:"divide-y divide-gray-100",children:[e==null?void 0:e.map(t=>{var r;return i.jsxs("tr",{className:"hover:bg-gray-50",children:[i.jsx("td",{className:"px-4 py-3 text-sm",children:t.content}),i.jsx("td",{className:"px-4 py-3",children:i.jsx("div",{className:"flex gap-1 flex-wrap",children:(r=t.tags)==null?void 0:r.map(n=>i.jsx("span",{className:"px-1.5 py-0.5 bg-blue-100 text-blue-700 rounded-full text-[10px]",children:n},n))})}),i.jsx("td",{className:"px-4 py-3 text-xs text-gray-500",children:new Date(t.created_at).toLocaleDateString()})]},t.id)}),!(e!=null&&e.length)&&i.jsx("tr",{children:i.jsx("td",{colSpan:3,className:"px-4 py-8 text-center text-gray-400 text-sm",children:"No memories found yet."})})]})]})})]})}function bx(){const[e,t]=j.useState(null),[r,n]=j.useState(null),{data:s}=Ne({queryKey:["episodes"],queryFn:()=>fetch("/api/replay?limit=50").then(o=>o.json())}),{data:l}=Ne({queryKey:["episode",e],queryFn:()=>fetch(`/api/replay/${e}`).then(o=>o.json()),enabled:e!==null}),a=o=>{if(!o)return"—";try{return JSON.stringify(o,null,2)}catch{return String(o)}};return i.jsxs("div",{className:"max-w-4xl",children:[i.jsx("h2",{className:"text-xl font-bold mb-6",children:"Replay Studio"}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[i.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 overflow-hidden",children:[i.jsx("div",{className:"px-4 py-3 border-b border-gray-100 font-semibold text-sm",children:"Episodes"}),i.jsxs("ul",{className:"divide-y divide-gray-100 max-h-96 overflow-y-auto",children:[s==null?void 0:s.map(o=>i.jsx("li",{children:i.jsxs("button",{onClick:()=>t(o.id),className:`w-full text-left px-4 py-3 hover:bg-gray-50 ${e===o.id?"bg-blue-50":""}`,children:[i.jsx("div",{className:"text-sm font-medium truncate",children:o.input}),i.jsxs("div",{className:"text-xs text-gray-500",children:["#",o.id," · ",new Date(o.created_at).toLocaleString()]})]})},o.id)),!(s!=null&&s.length)&&i.jsx("li",{className:"px-4 py-6 text-center text-gray-400 text-sm",children:"No episodes yet."})]})]}),i.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 p-4",children:[i.jsx("div",{className:"font-semibold text-sm mb-3",children:"Details"}),!l&&i.jsx("div",{className:"text-gray-400 text-sm",children:"Select an episode to view traces."}),(l==null?void 0:l.episode)&&i.jsxs("div",{className:"space-y-3",children:[i.jsxs("div",{children:[i.jsx("div",{className:"text-xs text-gray-500",children:"Input"}),i.jsx("div",{className:"text-sm font-medium",children:l.episode.input})]}),i.jsxs("div",{children:[i.jsx("div",{className:"text-xs text-gray-500",children:"Result"}),i.jsx("div",{className:"text-sm",children:l.episode.result||"—"})]}),l.summary&&i.jsxs("div",{className:"flex gap-2 text-xs",children:[i.jsxs("span",{className:"px-2 py-1 rounded bg-green-100 text-green-700",children:["success: ",l.summary.success]}),i.jsxs("span",{className:"px-2 py-1 rounded bg-red-100 text-red-700",children:["failed: ",l.summary.failed]})]}),i.jsx("div",{className:"space-y-2",children:(l.traces||[]).map((o,u)=>i.jsxs("div",{className:"border border-gray-100 rounded p-2 text-xs",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{className:"font-semibold",children:["Step ",o.step_index+1]}),i.jsx("span",{className:`px-1.5 py-0.5 rounded text-[10px] ${o.status==="success"?"bg-green-100 text-green-700":"bg-red-100 text-red-700"}`,children:o.status})]}),i.jsxs("div",{className:"mt-1 text-gray-500",children:["Tool: ",i.jsx("span",{className:"font-mono",children:o.tool_name})]}),i.jsx("button",{onClick:()=>n(r===u?null:u),className:"mt-1 text-blue-500 hover:underline",children:r===u?"Hide":"Show details"}),r===u&&i.jsxs("div",{className:"mt-2 space-y-1",children:[i.jsx("div",{className:"text-gray-400",children:"Args"}),i.jsx("pre",{className:"bg-gray-50 p-2 rounded overflow-auto max-h-24",children:a(o.args)}),i.jsx("div",{className:"text-gray-400",children:"Output"}),i.jsx("pre",{className:"bg-gray-50 p-2 rounded overflow-auto max-h-24",children:a(o.output)})]})]},o.id||u))})]})]})]})]})}function Px(){const{data:e}=Ne({queryKey:["approvals"],queryFn:()=>fetch("/api/memory/approvals?limit=100").then(r=>r.json())}),t=r=>{const n={};return(r||[]).forEach(s=>{const l=s.split(":");l.length>=2&&(n[l[0]]=l.slice(1).join(":"))}),n};return i.jsxs("div",{className:"max-w-3xl",children:[i.jsx("h2",{className:"text-xl font-bold mb-6",children:"Risk Approvals"}),i.jsx("div",{className:"bg-white rounded-lg border border-gray-200 overflow-hidden",children:i.jsxs("table",{className:"w-full text-left",children:[i.jsx("thead",{className:"bg-gray-50 border-b border-gray-200 text-xs uppercase text-gray-500 font-medium",children:i.jsxs("tr",{children:[i.jsx("th",{className:"px-4 py-3",children:"Content"}),i.jsx("th",{className:"px-4 py-3 w-32",children:"Scope"}),i.jsx("th",{className:"px-4 py-3 w-36",children:"Created"})]})}),i.jsxs("tbody",{className:"divide-y divide-gray-100",children:[e==null?void 0:e.map(r=>i.jsxs("tr",{className:"hover:bg-gray-50",children:[i.jsxs("td",{className:"px-4 py-3",children:[i.jsx("div",{className:"text-sm font-medium",children:r.content}),i.jsx("div",{className:"text-xs text-gray-400 mt-0.5",children:(()=>{const n=t(r.tags);return[n.tool&&`tool: ${n.tool}`,n.reason&&`reason: ${n.reason}`].filter(Boolean).join(" · ")})()})]}),i.jsx("td",{className:"px-4 py-3 text-xs text-gray-500",children:t(r.tags).scope||"unknown"}),i.jsx("td",{className:"px-4 py-3 text-xs text-gray-500",children:new Date(r.created_at).toLocaleDateString()})]},r.id)),!(e!=null&&e.length)&&i.jsx("tr",{children:i.jsx("td",{colSpan:3,className:"px-4 py-8 text-center text-gray-400 text-sm",children:"No approvals recorded yet."})})]})]})})]})}function Tx(){var l;const{data:e,isLoading:t,error:r,refetch:n,isFetching:s}=Ne({queryKey:["mcp-health"],queryFn:()=>Z.getMcpHealth({timeoutMs:15e3,retries:0})});return i.jsxs("div",{className:"max-w-4xl",children:[i.jsxs("div",{className:"flex items-center justify-between mb-6",children:[i.jsx("h2",{className:"text-xl font-bold",children:"MCP Health"}),i.jsx("button",{onClick:()=>n(),disabled:s,className:"px-3 py-1.5 text-sm rounded-md border border-gray-300 bg-white hover:bg-gray-50 disabled:opacity-50",children:s?"Checking...":"Re-check"})]}),t&&i.jsx("div",{className:"text-sm text-gray-500",children:"Checking MCP servers..."}),r&&i.jsx("div",{className:"text-sm text-red-700 bg-red-50 border border-red-200 rounded px-3 py-2",children:r.message}),!t&&!r&&i.jsxs("div",{className:"space-y-3",children:[i.jsx("div",{className:`text-sm px-3 py-2 rounded border ${e!=null&&e.ok?"text-green-700 bg-green-50 border-green-200":"text-red-700 bg-red-50 border-red-200"}`,children:e!=null&&e.ok?"All configured MCP servers are reachable.":"Some MCP servers failed health check."}),i.jsx("div",{className:"bg-white rounded-lg border border-gray-200 overflow-hidden",children:i.jsxs("table",{className:"w-full text-left",children:[i.jsx("thead",{className:"bg-gray-50 border-b border-gray-200 text-xs uppercase text-gray-500 font-medium",children:i.jsxs("tr",{children:[i.jsx("th",{className:"px-4 py-3",children:"Server"}),i.jsx("th",{className:"px-4 py-3 w-24",children:"Status"}),i.jsx("th",{className:"px-4 py-3 w-28",children:"Attempts"}),i.jsx("th",{className:"px-4 py-3 w-28",children:"Duration"}),i.jsx("th",{className:"px-4 py-3",children:"Tools / Error"})]})}),i.jsxs("tbody",{className:"divide-y divide-gray-100",children:[((e==null?void 0:e.results)||[]).map(a=>{var o;return i.jsxs("tr",{children:[i.jsx("td",{className:"px-4 py-3 text-sm font-mono",children:a.id}),i.jsx("td",{className:"px-4 py-3 text-xs",children:i.jsx("span",{className:`px-2 py-0.5 rounded ${a.ok?"bg-green-100 text-green-700":"bg-red-100 text-red-700"}`,children:a.ok?"ok":"failed"})}),i.jsx("td",{className:"px-4 py-3 text-xs text-gray-600",children:a.attempts}),i.jsxs("td",{className:"px-4 py-3 text-xs text-gray-600",children:[a.durationMs,"ms"]}),i.jsx("td",{className:"px-4 py-3 text-xs text-gray-600",children:a.ok?(o=a.tools)!=null&&o.length?a.tools.join(", "):"(no tools)":a.error||"unknown error"})]},a.id)}),!((l=e==null?void 0:e.results)!=null&&l.length)&&i.jsx("tr",{children:i.jsx("td",{colSpan:5,className:"px-4 py-8 text-center text-gray-400 text-sm",children:"No configured external MCP servers."})})]})]})})]})]})}function Mx(){const{data:e}=Ne({queryKey:["memory-facts-summary"],queryFn:()=>Z.getFacts(200)}),{data:t}=Ne({queryKey:["memory-episodes-summary"],queryFn:()=>Z.getEpisodes(200)}),{data:r}=Ne({queryKey:["memory-reports-summary"],queryFn:()=>Z.getTaskReports(200)});return i.jsxs("div",{className:"h-full p-6 space-y-4 overflow-auto",children:[i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:[i.jsx(Ai,{title:"Facts",value:(e==null?void 0:e.length)??0,icon:i.jsx(Zo,{size:14})}),i.jsx(Ai,{title:"Episodes",value:(t==null?void 0:t.length)??0,icon:i.jsx(fh,{size:14})}),i.jsx(Ai,{title:"Reports",value:(r==null?void 0:r.length)??0,icon:i.jsx(qa,{size:14})})]}),i.jsx(Ye,{title:"Memory Explorer",subtitle:"Inspect facts and replay history in one place.",children:i.jsx("div",{className:"h-[calc(100vh-240px)]",children:i.jsx(wh,{mode:"memory"})})})]})}function Ai({title:e,value:t,icon:r}){return i.jsxs("div",{className:"rounded-2xl border border-[color:var(--line)] bg-white px-4 py-3 shadow-[var(--shadow-soft)]",children:[i.jsxs("div",{className:"flex items-center justify-between text-[11px] uppercase tracking-wide text-[color:var(--text-muted)]",children:[i.jsx("span",{children:e}),r]}),i.jsx("div",{className:"mt-2 text-xl font-bold text-[color:var(--text-strong)] tabular-nums",children:t})]})}function _x(){return i.jsx("div",{className:"h-full p-6",children:i.jsx(Ye,{title:"Control Center",subtitle:"Strategy governance, approvals, MCP health, and system configuration.",className:"h-full flex flex-col",children:i.jsx("div",{className:"h-[calc(100vh-220px)]",children:i.jsx(wh,{mode:"control"})})})})}function Rx({onSetupCompleted:e}){var ru,nu,su,lu;const t=ci(),[r,n]=j.useState("auto"),[s,l]=j.useState(""),[a,o]=j.useState(["ollama","openai","anthropic"]),[u,d]=j.useState(""),[y,m]=j.useState(""),[x,k]=j.useState(""),[v,w]=j.useState(""),[T,c]=j.useState(""),[f,p]=j.useState(!0),[g,b]=j.useState("auto"),[S,N]=j.useState("9222"),[C,z]=j.useState(""),[O,G]=j.useState(""),[Y,te]=j.useState(""),[q,re]=j.useState(!1),[_,U]=j.useState("30000"),[M,L]=j.useState("10000"),[D,H]=j.useState(!1),{data:E,isLoading:$}=Ne({queryKey:["setup"],queryFn:()=>Z.getSetupStatus()}),{data:Q,isLoading:Pe}=Ne({queryKey:["setup-config"],queryFn:()=>Z.getSetupConfig()});j.useEffect(()=>{if(!Q||D)return;const I=Q.llm||{},Ge=Q.browser||{};n(I.provider||"auto"),l(I.defaultModel||""),o(Array.isArray(I.fallbackOrder)&&I.fallbackOrder.length>0?I.fallbackOrder:["ollama","openai","anthropic"]),k(I.openaiBaseUrl||""),w(I.anthropicBaseUrl||""),c(I.ollamaBaseUrl||""),p(Ge.enabled!==!1),b(Ge.mode||"auto"),N(String(Ge.cdpPort||9222)),z(Ge.remoteUrl||""),G(Ge.chromePath||""),te(Ge.downloadDir||""),re(!!Ge.launchHostBrowser),U(String(Ge.navigationTimeoutMs||3e4)),L(String(Ge.actionTimeoutMs||1e4)),H(!0)},[Q,D]);const pe=Di({mutationFn:()=>Z.initializeSetup(),onSuccess:async()=>{await t.invalidateQueries({queryKey:["setup"]}),await t.invalidateQueries({queryKey:["setup-config"]})}}),ye=Di({mutationFn:async()=>{const I={llm:{provider:r,defaultModel:s,fallbackOrder:a,openaiBaseUrl:x,anthropicBaseUrl:v,ollamaBaseUrl:T},browser:{enabled:f,mode:g,cdpPort:Number(S)||9222,remoteUrl:C,chromePath:O,launchHostBrowser:q,navigationTimeoutMs:Number(_)||3e4,actionTimeoutMs:Number(M)||1e4,downloadDir:Y}};return u.trim()&&(I.llm.openaiApiKey=u.trim()),y.trim()&&(I.llm.anthropicApiKey=y.trim()),Z.updateSetupConfig(I)},onSuccess:async()=>{d(""),m(""),await t.invalidateQueries({queryKey:["setup"]}),await t.invalidateQueries({queryKey:["setup-config"]})}}),qe=Di({mutationFn:()=>Z.testLLM(!0,{llm:{provider:r,defaultModel:s,fallbackOrder:a,openaiApiKey:u.trim(),anthropicApiKey:y.trim(),openaiBaseUrl:x,anthropicBaseUrl:v,ollamaBaseUrl:T}})}),dt=!!(E!=null&&E.ready),Tt=!!(E!=null&&E.llmConfigured),Nr=((ru=Q==null?void 0:Q.llm)==null?void 0:ru.provider)||(E==null?void 0:E.provider)||"auto",Mt=dt&&Tt,$e=r==="auto",Cr=r==="openai",Er=r==="anthropic",br=r==="ollama",de=r==="mock",Pr=j.useMemo(()=>[{id:"workspace",title:"Initialize Workspace",done:dt},{id:"provider",title:"Configure LLM Provider",done:Tt},{id:"ready",title:"Ready To Run Tasks",done:Mt}],[dt,Tt,Mt]);return $||Pe?i.jsx("div",{className:"h-full p-6",children:i.jsx(Zr,{type:"loading",title:"Loading setup status..."})}):i.jsxs("div",{className:"h-full p-6 overflow-auto space-y-4",children:[i.jsx(Ye,{title:"Setup Wizard",subtitle:"Complete setup once, then run Lydia fully from the dashboard.",tone:"accent",children:i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:Pr.map((I,Ge)=>i.jsxs("div",{className:"rounded-xl border border-[color:var(--line)] bg-white p-3",children:[i.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold",children:[I.done?i.jsx(_s,{size:14,className:"text-[color:var(--success)]"}):i.jsx(Iy,{size:14,className:"text-[color:var(--text-muted)]"}),i.jsxs("span",{children:["Step ",Ge+1]})]}),i.jsx("div",{className:"mt-1 text-sm text-[color:var(--text-strong)]",children:I.title})]},I.id))})}),i.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-3 gap-4",children:[i.jsx(Ye,{title:"Step 1: Workspace",subtitle:"Create local config, strategy, and skill folders.",actions:i.jsx("button",{onClick:()=>pe.mutate(),disabled:pe.isPending,className:"px-3 py-1.5 rounded-md text-xs text-white bg-[color:var(--accent)] disabled:opacity-60",children:dt?"Re-check":pe.isPending?"Initializing...":"Initialize"}),children:i.jsxs("div",{className:"text-sm text-[color:var(--text-muted)] space-y-1",children:[i.jsxs("div",{children:[i.jsx("strong",{children:"Status:"})," ",dt?"Ready":"Not initialized"]}),i.jsxs("div",{children:[i.jsx("strong",{children:"Config:"})," ",i.jsx("span",{className:"font-mono",children:E==null?void 0:E.configPath})]}),i.jsxs("div",{children:[i.jsx("strong",{children:"Strategy:"})," ",i.jsx("span",{className:"font-mono",children:E==null?void 0:E.strategyPath})]}),pe.isError&&i.jsx("div",{className:"text-[color:var(--danger)] text-xs",children:pe.error.message})]})}),i.jsx(Ye,{title:"Step 2: LLM Provider",subtitle:"Configure provider, model, API keys, and endpoints.",className:"xl:col-span-2",children:i.jsxs("div",{className:"space-y-3",children:[i.jsx("div",{className:"grid grid-cols-2 md:grid-cols-5 gap-2",children:["auto","openai","anthropic","ollama","mock"].map(I=>i.jsx("button",{onClick:()=>n(I),className:`px-2 py-2 rounded-md border text-xs ${r===I?"border-[color:var(--line-strong)] bg-[color:var(--surface-accent)] text-[color:var(--accent)]":"border-[color:var(--line)] bg-white text-[color:var(--text-muted)]"}`,children:I},I))}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2",children:[i.jsxs("label",{className:"text-xs text-[color:var(--text-muted)]",children:["Default Model",i.jsx("input",{value:s,onChange:I=>l(I.target.value),placeholder:"Optional model override",className:"mt-1 w-full border border-[color:var(--line)] rounded-md px-2 py-1.5 text-sm"})]}),i.jsxs("label",{className:"text-xs text-[color:var(--text-muted)]",children:[$e?"Fallback Order (auto mode)":"Selected Provider",i.jsx("input",{value:$e?a.join(","):r,onChange:I=>{$e&&o(I.target.value.split(",").map(Ge=>Ge.trim()).filter(Boolean))},readOnly:!$e,placeholder:$e?"ollama,openai,anthropic":r,className:"mt-1 w-full border border-[color:var(--line)] rounded-md px-2 py-1.5 text-sm"})]})]}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2",children:[($e||Cr)&&i.jsxs(i.Fragment,{children:[i.jsxs("label",{className:"text-xs text-[color:var(--text-muted)]",children:["OpenAI API Key",i.jsx("input",{type:"password",value:u,onChange:I=>d(I.target.value),placeholder:(nu=Q==null?void 0:Q.llm)!=null&&nu.openaiApiKeyMasked?`Saved: ${Q.llm.openaiApiKeyMasked}`:"sk-...",className:"mt-1 w-full border border-[color:var(--line)] rounded-md px-2 py-1.5 text-sm"})]}),i.jsxs("label",{className:"text-xs text-[color:var(--text-muted)]",children:["OpenAI Base URL",i.jsx("input",{value:x,onChange:I=>k(I.target.value),placeholder:"Optional",className:"mt-1 w-full border border-[color:var(--line)] rounded-md px-2 py-1.5 text-sm"})]})]}),($e||Er)&&i.jsxs(i.Fragment,{children:[i.jsxs("label",{className:"text-xs text-[color:var(--text-muted)]",children:["Anthropic API Key",i.jsx("input",{type:"password",value:y,onChange:I=>m(I.target.value),placeholder:(su=Q==null?void 0:Q.llm)!=null&&su.anthropicApiKeyMasked?`Saved: ${Q.llm.anthropicApiKeyMasked}`:"sk-ant-...",className:"mt-1 w-full border border-[color:var(--line)] rounded-md px-2 py-1.5 text-sm"})]}),i.jsxs("label",{className:"text-xs text-[color:var(--text-muted)]",children:["Anthropic Base URL",i.jsx("input",{value:v,onChange:I=>w(I.target.value),placeholder:"Optional",className:"mt-1 w-full border border-[color:var(--line)] rounded-md px-2 py-1.5 text-sm"})]})]}),($e||br)&&i.jsxs("label",{className:"text-xs text-[color:var(--text-muted)] md:col-span-2",children:["Ollama Base URL",i.jsx("input",{value:T,onChange:I=>c(I.target.value),placeholder:"http://localhost:11434/api",className:"mt-1 w-full border border-[color:var(--line)] rounded-md px-2 py-1.5 text-sm"})]}),de&&i.jsx("div",{className:"md:col-span-2 text-xs text-[color:var(--text-muted)] rounded-md border border-[color:var(--line)] bg-[color:var(--surface-subtle)] px-3 py-2",children:"Mock provider does not require API keys or base URLs."})]}),i.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[i.jsx("button",{onClick:()=>ye.mutate(),disabled:ye.isPending,className:"px-3 py-1.5 rounded-md text-xs text-white bg-[color:var(--accent)] disabled:opacity-60",children:ye.isPending?"Saving...":"Save Provider Config"}),i.jsx("button",{onClick:()=>qe.mutate(),disabled:qe.isPending,className:"px-3 py-1.5 rounded-md text-xs text-white bg-[color:var(--info)] disabled:opacity-60",children:qe.isPending?"Testing...":"Test LLM Connection"}),Mt&&i.jsx("button",{onClick:e,className:"px-3 py-1.5 rounded-md text-xs border border-[color:var(--line)] text-[color:var(--text-strong)]",children:"Continue To Tasks"})]}),ye.isSuccess&&i.jsx("div",{className:"text-xs text-[color:var(--success)]",children:"Configuration saved."}),ye.isError&&i.jsx("div",{className:"text-xs text-[color:var(--danger)]",children:ye.error.message}),qe.isSuccess&&i.jsxs("div",{className:"text-xs text-[color:var(--success)]",children:["LLM check passed with provider ",i.jsx("strong",{children:(lu=qe.data)==null?void 0:lu.provider}),"."]}),qe.isError&&i.jsx("div",{className:"text-xs text-[color:var(--danger)]",children:qe.error.message}),i.jsxs("div",{className:"text-xs text-[color:var(--text-muted)]",children:["Draft provider: ",i.jsx("strong",{children:r})," · Saved provider: ",i.jsx("strong",{children:Nr})]})]})})]}),i.jsx(Ye,{title:"Step 3: Browser Runtime",subtitle:"Native Lydia browser automation shares the same task runtime, evidence store, and resume flow as the rest of the platform.",children:i.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-[220px_minmax(0,1fr)] gap-4",children:[i.jsxs("div",{className:"rounded-2xl border border-[color:var(--line-strong)] bg-[color:var(--surface-accent)] p-4",children:[i.jsxs("div",{className:"inline-flex items-center gap-2 text-sm font-semibold text-[color:var(--accent)]",children:[i.jsx(Uy,{size:15}),"Browser Mode"]}),i.jsx("div",{className:"mt-3 space-y-2",children:["auto","cdp","headless","remote"].map(I=>i.jsxs("button",{onClick:()=>b(I),className:`w-full rounded-xl border px-3 py-2 text-left text-xs transition-colors ${g===I?"border-[color:var(--line-strong)] bg-white text-[color:var(--accent)]":"border-[color:var(--line)] bg-[color:var(--surface-subtle)] text-[color:var(--text-muted)]"}`,children:[i.jsx("div",{className:"font-semibold uppercase tracking-[0.18em]",children:I}),i.jsxs("div",{className:"mt-1 normal-case tracking-normal",children:[I==="auto"&&"Prefer CDP, then remote if configured, then local headless.",I==="cdp"&&"Attach to a local Chrome session and preserve its login state.",I==="headless"&&"Run isolated Playwright Chromium for stable automation.",I==="remote"&&"Force a remote CDP endpoint for managed browser infrastructure."]})]},I))})]}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[i.jsxs("label",{className:"text-xs text-[color:var(--text-muted)]",children:["Browser Capability",i.jsxs("select",{value:f?"enabled":"disabled",onChange:I=>p(I.target.value==="enabled"),className:"mt-1 w-full border border-[color:var(--line)] rounded-md px-2 py-1.5 text-sm bg-white",children:[i.jsx("option",{value:"enabled",children:"Enabled"}),i.jsx("option",{value:"disabled",children:"Disabled"})]})]}),i.jsxs("label",{className:"text-xs text-[color:var(--text-muted)]",children:["CDP Port",i.jsx("input",{value:S,onChange:I=>N(I.target.value),placeholder:"9222",className:"mt-1 w-full border border-[color:var(--line)] rounded-md px-2 py-1.5 text-sm"})]}),i.jsxs("label",{className:"text-xs text-[color:var(--text-muted)] md:col-span-2",children:["Remote Browser URL",i.jsx("input",{value:C,onChange:I=>z(I.target.value),placeholder:"Optional CDP endpoint for Browserbase / Steel / managed Chromium",className:"mt-1 w-full border border-[color:var(--line)] rounded-md px-2 py-1.5 text-sm"})]}),i.jsxs("label",{className:"text-xs text-[color:var(--text-muted)] md:col-span-2",children:["Chrome Path",i.jsx("input",{value:O,onChange:I=>G(I.target.value),placeholder:"Optional executable override for CDP launch",className:"mt-1 w-full border border-[color:var(--line)] rounded-md px-2 py-1.5 text-sm"})]}),i.jsxs("label",{className:"text-xs text-[color:var(--text-muted)] md:col-span-2",children:["Download Directory",i.jsx("input",{value:Y,onChange:I=>te(I.target.value),placeholder:"Optional artifact directory override",className:"mt-1 w-full border border-[color:var(--line)] rounded-md px-2 py-1.5 text-sm"})]}),i.jsxs("label",{className:"text-xs text-[color:var(--text-muted)]",children:["Navigation Timeout (ms)",i.jsx("input",{value:_,onChange:I=>U(I.target.value),placeholder:"30000",className:"mt-1 w-full border border-[color:var(--line)] rounded-md px-2 py-1.5 text-sm"})]}),i.jsxs("label",{className:"text-xs text-[color:var(--text-muted)]",children:["Action Timeout (ms)",i.jsx("input",{value:M,onChange:I=>L(I.target.value),placeholder:"10000",className:"mt-1 w-full border border-[color:var(--line)] rounded-md px-2 py-1.5 text-sm"})]})]}),i.jsxs("label",{className:"flex items-center gap-2 text-sm text-[color:var(--text-strong)]",children:[i.jsx("input",{type:"checkbox",checked:q,onChange:I=>re(I.target.checked),className:"rounded border-[color:var(--line)] text-[color:var(--accent)] focus:ring-[color:var(--ring)]"}),"Auto-launch host Chrome if CDP is unavailable"]}),i.jsxs("div",{className:"rounded-xl border border-[color:var(--line)] bg-[color:var(--surface-subtle)] px-3 py-3 text-xs text-[color:var(--text-muted)] space-y-1",children:[i.jsx("div",{children:"We keep browser automation inside Lydia's native MCP and computer-use contracts, so navigation, interaction, screenshots, downloads, and resume all share one evidence timeline."}),i.jsx("div",{children:"That means the browser page persists across actions in the same task session instead of opening a fresh page for each tool call."})]})]})]})}),i.jsx(Ye,{title:"Workspace Responsibilities",subtitle:"Defines the boundary between Tasks, Chat, and system panels.",children:i.jsx("div",{className:"overflow-auto",children:i.jsxs("table",{className:"w-full text-left border-collapse",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"text-xs text-[color:var(--text-muted)]",children:[i.jsx("th",{className:"py-2 border-b border-[color:var(--line)]",children:"Workspace"}),i.jsx("th",{className:"py-2 border-b border-[color:var(--line)]",children:"Primary Job"}),i.jsx("th",{className:"py-2 border-b border-[color:var(--line)]",children:"Key Actions"})]})}),i.jsxs("tbody",{className:"text-sm",children:[i.jsxs("tr",{children:[i.jsx("td",{className:"py-2 border-b border-[color:var(--line)]",children:i.jsxs("span",{className:"inline-flex items-center gap-1",children:[i.jsx(Ky,{size:12})," Tasks"]})}),i.jsx("td",{className:"py-2 border-b border-[color:var(--line)]",children:"Execute tracked tasks end-to-end."}),i.jsx("td",{className:"py-2 border-b border-[color:var(--line)]",children:"Run, monitor, resume, inspect reports."})]}),i.jsxs("tr",{children:[i.jsx("td",{className:"py-2 border-b border-[color:var(--line)]",children:i.jsxs("span",{className:"inline-flex items-center gap-1",children:[i.jsx(Gy,{size:12})," Chat"]})}),i.jsx("td",{className:"py-2 border-b border-[color:var(--line)]",children:"Explore and iterate conversationally."}),i.jsx("td",{className:"py-2 border-b border-[color:var(--line)]",children:"Multi-turn Q&A, follow-up guidance."})]}),i.jsxs("tr",{children:[i.jsx("td",{className:"py-2 border-b border-[color:var(--line)]",children:i.jsxs("span",{className:"inline-flex items-center gap-1",children:[i.jsx(Qy,{size:12})," Setup"]})}),i.jsx("td",{className:"py-2 border-b border-[color:var(--line)]",children:"Bootstrap and configure runtime."}),i.jsx("td",{className:"py-2 border-b border-[color:var(--line)]",children:"Initialize workspace, set provider and browser runtime."})]}),i.jsxs("tr",{children:[i.jsx("td",{className:"py-2",children:i.jsxs("span",{className:"inline-flex items-center gap-1",children:[i.jsx(tu,{size:12})," Control"]})}),i.jsx("td",{className:"py-2",children:"Govern strategy and platform health."}),i.jsx("td",{className:"py-2",children:"Review proposals, approvals, MCP status."})]})]})]})})}),i.jsx(Ye,{title:"Advanced CLI Paths",subtitle:"Dashboard now covers first-run and daily operation. Use CLI for automation-heavy workflows.",children:i.jsxs("ul",{className:"text-sm text-[color:var(--text-muted)] space-y-2",children:[i.jsxs("li",{children:[i.jsx("span",{className:"font-mono",children:'lydia run "..."'})," for scripted terminal execution."]}),i.jsxs("li",{children:[i.jsx("span",{className:"font-mono",children:"lydia tasks list/show/resume"})," for batch-friendly task operations."]}),i.jsxs("li",{children:[i.jsx("span",{className:"font-mono",children:"lydia skills install/remove"})," for GitHub/local skill packaging flows."]}),i.jsxs("li",{children:[i.jsx("span",{className:"font-mono",children:"lydia mcp check"})," for diagnostic checks in CI pipelines."]}),i.jsxs("li",{children:[i.jsx("span",{className:"font-mono",children:"lydia computer-use task-evidence <task-id>"})," for browser session evidence inspection."]})]})})]})}function Ox(){const[e,t]=j.useState("chat"),[r,n]=j.useState(null),[s,l]=j.useState(!1),{data:a}=Ne({queryKey:["status"],queryFn:()=>Z.getStatus(),staleTime:6e4,refetchOnWindowFocus:!1,refetchOnReconnect:!1}),{data:o}=Ne({queryKey:["setup"],queryFn:()=>Z.getSetupStatus(),staleTime:6e4,refetchOnWindowFocus:!1,refetchOnReconnect:!1}),u=!!(o!=null&&o.ready),d=[{key:"chat",label:"Chat",icon:i.jsx(Oy,{size:16}),group:"chat"},{key:"tasks",label:"Tasks",icon:i.jsx(Fy,{size:16}),group:"workspace",disabledWhenUnready:!0},{key:"memory",label:"Memory",icon:i.jsx(Zo,{size:16}),group:"workspace"},{key:"control",label:"Control",icon:i.jsx(mh,{size:16}),group:"system"},{key:"setup",label:"Setup",icon:i.jsx(tu,{size:16}),group:"system"}],y=j.useMemo(()=>[{id:"chat",title:"Chat",items:d.filter(v=>v.group==="chat")},{id:"workspace",title:"Workspace",items:d.filter(v=>v.group==="workspace")},{id:"system",title:"System",items:d.filter(v=>v.group==="system")}],[d]),m=j.useMemo(()=>e==="tasks"?"Tracked execution, history, and resuming.":e==="chat"?"Fast conversational control with persistent context.":e==="memory"?"Inspect facts, episodes, and reports.":e==="control"?"Govern strategy, health, and runtime behavior.":"Bootstrap runtime, providers, and local workspace.",[e]),x=v=>{n({text:v,token:Date.now()}),t("chat")},k=()=>e==="tasks"?i.jsx(mx,{onContinueInChat:x}):e==="memory"?i.jsx(Mx,{}):e==="control"?i.jsx(_x,{}):e==="setup"?i.jsx(Rx,{onSetupCompleted:()=>t("chat")}):i.jsx(kx,{seedMessage:r==null?void 0:r.text,seedToken:r==null?void 0:r.token});return i.jsxs("div",{className:"app-shell",children:[i.jsxs("aside",{className:`${s?"w-[76px]":"w-[232px]"} border-r border-[color:var(--line)] bg-white/96 flex flex-col shrink-0 transition-[width] duration-200`,children:[i.jsxs("div",{className:`h-14 border-b border-[color:var(--line)] flex items-center gap-3 ${s?"px-3 justify-center":"px-5"}`,children:[i.jsx("button",{type:"button",onClick:()=>l(v=>!v),className:"h-8 w-8 rounded-lg border border-[color:var(--line)] text-[color:var(--text-muted)] grid place-items-center",children:i.jsx(By,{size:15})}),!s&&i.jsxs("div",{className:"min-w-0",children:[i.jsx("div",{className:"text-[17px] font-extrabold tracking-tight text-[color:var(--text-strong)]",children:"Lydia"}),i.jsx("div",{className:"text-[10px] uppercase tracking-[0.22em] text-[color:var(--text-muted)]",children:"Gateway Dashboard"})]})]}),i.jsxs("div",{className:`${s?"px-3 py-4":"px-5 py-4"} border-b border-[color:var(--line)]`,children:[i.jsxs("div",{className:`flex items-center gap-2 text-sm text-[color:var(--success)] ${s?"justify-center":""}`,children:[i.jsx("span",{className:"h-2 w-2 rounded-full bg-[color:var(--success)]"}),!s&&i.jsx("span",{children:(a==null?void 0:a.status)==="ok"?"System Online":"Connecting..."})]}),!s&&!u&&i.jsx("div",{className:"mt-3 rounded-2xl border border-[color:var(--warning-soft)] bg-[color:var(--warning-soft)] px-3 py-2 text-[11px] leading-5 text-[color:var(--warning)]",children:"Setup is incomplete. Chat is available now; tasks remain gated until the workspace is initialized."})]}),i.jsx("nav",{className:`flex-1 overflow-y-auto py-5 space-y-6 ${s?"px-2":"px-4"}`,children:y.map(v=>i.jsxs("div",{children:[!s&&i.jsx("div",{className:"mb-2 px-2 text-[11px] uppercase tracking-[0.18em] text-[color:var(--text-muted)]",children:v.title}),i.jsx("div",{className:"space-y-1.5",children:v.items.map(w=>{const T=!!(w.disabledWhenUnready&&!u),c=w.key===e;return i.jsxs("button",{onClick:()=>!T&&t(w.key),disabled:T,className:`w-full rounded-2xl py-3 text-sm flex items-center transition-colors ${c?"bg-[#fff1f1] text-[#b3261e] border border-[#f5caca] shadow-[0_8px_20px_rgba(179,38,30,0.08)]":T?"text-gray-300 cursor-not-allowed":"text-[color:var(--text-muted)] hover:bg-[color:var(--surface-subtle)]"} ${s?"justify-center px-0":"gap-3 px-3"}`,title:T?"Complete setup first":void 0,children:[i.jsx("span",{className:"shrink-0",children:w.icon}),!s&&i.jsx("span",{className:"flex-1 text-left",children:w.label})]},w.key)})})]},v.id))}),i.jsx("div",{className:`${s?"px-2":"px-4"} py-4 border-t border-[color:var(--line)]`,children:i.jsxs("div",{className:`rounded-2xl border border-[color:var(--line)] bg-[color:var(--surface-subtle)] py-3 ${s?"px-0":"px-3"}`,children:[i.jsxs("div",{className:`flex items-center gap-2 text-[11px] uppercase tracking-[0.18em] text-[color:var(--text-muted)] ${s?"justify-center":""}`,children:[i.jsx(yh,{size:12}),!s&&"Runtime"]}),!s&&i.jsxs("div",{className:"mt-2 text-sm text-[color:var(--text-strong)]",children:["v",(a==null?void 0:a.version)||"0.0.0"]})]})})]}),i.jsxs("main",{className:"flex-1 min-w-0 overflow-hidden bg-[linear-gradient(180deg,#ffffff_0%,#fbfcff_100%)]",children:[i.jsxs("header",{className:"h-14 px-7 border-b border-[color:var(--line)] bg-white/92 flex items-center justify-between shrink-0",children:[i.jsxs("div",{children:[i.jsx("div",{className:"text-[11px] uppercase tracking-[0.22em] text-[color:var(--text-muted)]",children:e}),i.jsx("div",{className:"text-sm text-[color:var(--text-strong)] mt-0.5",children:m})]}),i.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[i.jsxs("div",{className:"inline-flex items-center gap-2 rounded-full border border-[color:var(--line)] bg-white px-3 py-2 text-[color:var(--text-muted)]",children:[i.jsx(Ay,{size:12}),i.jsxs("span",{children:["Version ",(a==null?void 0:a.version)||"0.0.0"]})]}),i.jsxs("div",{className:"inline-flex items-center gap-2 rounded-full border border-[color:var(--line)] bg-white px-3 py-2 text-[color:var(--success)]",children:[i.jsx("span",{className:"h-2 w-2 rounded-full bg-[color:var(--success)]"}),i.jsx("span",{children:(a==null?void 0:a.status)==="ok"?"Health OK":"Health Pending"})]})]})]}),i.jsx("section",{className:"h-[calc(100vh-56px)] overflow-hidden",children:k()})]})]})}const zx=new vy({defaultOptions:{queries:{refetchOnWindowFocus:!1,refetchOnReconnect:!1,retry:1}}});$i.createRoot(document.getElementById("root")).render(i.jsx(Ih.StrictMode,{children:i.jsx(gy,{client:zx,children:i.jsx(Ox,{})})}));
|