openclaw-agent-builder 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +75 -0
- package/bin/cli.js +19 -0
- package/dist/assets/index-J39606WI.css +1 -0
- package/dist/assets/index-yzWCTaaY.js +228 -0
- package/dist/index.html +13 -0
- package/package.json +46 -0
- package/server/generators/agents.js +87 -0
- package/server/generators/bootstrap.js +42 -0
- package/server/generators/identity.js +18 -0
- package/server/generators/index.js +81 -0
- package/server/generators/memory.js +58 -0
- package/server/generators/routing.js +51 -0
- package/server/generators/soul.js +53 -0
- package/server/generators/team.js +58 -0
- package/server/generators/tools.js +42 -0
- package/server/generators/user.js +27 -0
- package/server/index.js +56 -0
- package/server/routes/agentChat.js +168 -0
- package/server/routes/capabilities.js +195 -0
- package/server/routes/channel.js +161 -0
- package/server/routes/chat.js +150 -0
- package/server/routes/config.js +130 -0
- package/server/routes/files.js +78 -0
- package/server/routes/generate.js +17 -0
- package/server/routes/preflight.js +114 -0
- package/server/routes/validate.js +30 -0
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const s of l)if(s.type==="childList")for(const i of s.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(l){const s={};return l.integrity&&(s.integrity=l.integrity),l.referrerPolicy&&(s.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?s.credentials="include":l.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(l){if(l.ep)return;l.ep=!0;const s=n(l);fetch(l.href,s)}})();function Wa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $a={exports:{}},vl={},Ba={exports:{}},D={};/**
|
|
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 pr=Symbol.for("react.element"),cd=Symbol.for("react.portal"),dd=Symbol.for("react.fragment"),fd=Symbol.for("react.strict_mode"),pd=Symbol.for("react.profiler"),md=Symbol.for("react.provider"),hd=Symbol.for("react.context"),gd=Symbol.for("react.forward_ref"),yd=Symbol.for("react.suspense"),xd=Symbol.for("react.memo"),vd=Symbol.for("react.lazy"),ki=Symbol.iterator;function wd(e){return e===null||typeof e!="object"?null:(e=ki&&e[ki]||e["@@iterator"],typeof e=="function"?e:null)}var Ha={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Va=Object.assign,Ka={};function kn(e,t,n){this.props=e,this.context=t,this.refs=Ka,this.updater=n||Ha}kn.prototype.isReactComponent={};kn.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};kn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Ga(){}Ga.prototype=kn.prototype;function so(e,t,n){this.props=e,this.context=t,this.refs=Ka,this.updater=n||Ha}var oo=so.prototype=new Ga;oo.constructor=so;Va(oo,kn.prototype);oo.isPureReactComponent=!0;var ji=Array.isArray,Qa=Object.prototype.hasOwnProperty,io={current:null},Ya={key:!0,ref:!0,__self:!0,__source:!0};function Xa(e,t,n){var r,l={},s=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(s=""+t.key),t)Qa.call(t,r)&&!Ya.hasOwnProperty(r)&&(l[r]=t[r]);var a=arguments.length-2;if(a===1)l.children=n;else if(1<a){for(var u=Array(a),c=0;c<a;c++)u[c]=arguments[c+2];l.children=u}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)l[r]===void 0&&(l[r]=a[r]);return{$$typeof:pr,type:e,key:s,ref:i,props:l,_owner:io.current}}function Sd(e,t){return{$$typeof:pr,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function ao(e){return typeof e=="object"&&e!==null&&e.$$typeof===pr}function kd(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Ni=/\/+/g;function zl(e,t){return typeof e=="object"&&e!==null&&e.key!=null?kd(""+e.key):t.toString(36)}function Dr(e,t,n,r,l){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(s){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case pr:case cd:i=!0}}if(i)return i=e,l=l(i),e=r===""?"."+zl(i,0):r,ji(l)?(n="",e!=null&&(n=e.replace(Ni,"$&/")+"/"),Dr(l,t,n,"",function(c){return c})):l!=null&&(ao(l)&&(l=Sd(l,n+(!l.key||i&&i.key===l.key?"":(""+l.key).replace(Ni,"$&/")+"/")+e)),t.push(l)),1;if(i=0,r=r===""?".":r+":",ji(e))for(var a=0;a<e.length;a++){s=e[a];var u=r+zl(s,a);i+=Dr(s,t,n,u,l)}else if(u=wd(e),typeof u=="function")for(e=u.call(e),a=0;!(s=e.next()).done;)s=s.value,u=r+zl(s,a++),i+=Dr(s,t,n,u,l);else if(s==="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 i}function xr(e,t,n){if(e==null)return e;var r=[],l=0;return Dr(e,r,"","",function(s){return t.call(n,s,l++)}),r}function jd(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var ve={current:null},zr={transition:null},Nd={ReactCurrentDispatcher:ve,ReactCurrentBatchConfig:zr,ReactCurrentOwner:io};function Ja(){throw Error("act(...) is not supported in production builds of React.")}D.Children={map:xr,forEach:function(e,t,n){xr(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return xr(e,function(){t++}),t},toArray:function(e){return xr(e,function(t){return t})||[]},only:function(e){if(!ao(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};D.Component=kn;D.Fragment=dd;D.Profiler=pd;D.PureComponent=so;D.StrictMode=fd;D.Suspense=yd;D.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Nd;D.act=Ja;D.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Va({},e.props),l=e.key,s=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,i=io.current),t.key!==void 0&&(l=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(u in t)Qa.call(t,u)&&!Ya.hasOwnProperty(u)&&(r[u]=t[u]===void 0&&a!==void 0?a[u]:t[u])}var u=arguments.length-2;if(u===1)r.children=n;else if(1<u){a=Array(u);for(var c=0;c<u;c++)a[c]=arguments[c+2];r.children=a}return{$$typeof:pr,type:e.type,key:l,ref:s,props:r,_owner:i}};D.createContext=function(e){return e={$$typeof:hd,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:md,_context:e},e.Consumer=e};D.createElement=Xa;D.createFactory=function(e){var t=Xa.bind(null,e);return t.type=e,t};D.createRef=function(){return{current:null}};D.forwardRef=function(e){return{$$typeof:gd,render:e}};D.isValidElement=ao;D.lazy=function(e){return{$$typeof:vd,_payload:{_status:-1,_result:e},_init:jd}};D.memo=function(e,t){return{$$typeof:xd,type:e,compare:t===void 0?null:t}};D.startTransition=function(e){var t=zr.transition;zr.transition={};try{e()}finally{zr.transition=t}};D.unstable_act=Ja;D.useCallback=function(e,t){return ve.current.useCallback(e,t)};D.useContext=function(e){return ve.current.useContext(e)};D.useDebugValue=function(){};D.useDeferredValue=function(e){return ve.current.useDeferredValue(e)};D.useEffect=function(e,t){return ve.current.useEffect(e,t)};D.useId=function(){return ve.current.useId()};D.useImperativeHandle=function(e,t,n){return ve.current.useImperativeHandle(e,t,n)};D.useInsertionEffect=function(e,t){return ve.current.useInsertionEffect(e,t)};D.useLayoutEffect=function(e,t){return ve.current.useLayoutEffect(e,t)};D.useMemo=function(e,t){return ve.current.useMemo(e,t)};D.useReducer=function(e,t,n){return ve.current.useReducer(e,t,n)};D.useRef=function(e){return ve.current.useRef(e)};D.useState=function(e){return ve.current.useState(e)};D.useSyncExternalStore=function(e,t,n){return ve.current.useSyncExternalStore(e,t,n)};D.useTransition=function(){return ve.current.useTransition()};D.version="18.3.1";Ba.exports=D;var S=Ba.exports;const Za=Wa(S);/**
|
|
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 Cd=S,bd=Symbol.for("react.element"),Ed=Symbol.for("react.fragment"),_d=Object.prototype.hasOwnProperty,Td=Cd.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Pd={key:!0,ref:!0,__self:!0,__source:!0};function qa(e,t,n){var r,l={},s=null,i=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)_d.call(t,r)&&!Pd.hasOwnProperty(r)&&(l[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)l[r]===void 0&&(l[r]=t[r]);return{$$typeof:bd,type:e,key:s,ref:i,props:l,_owner:Td.current}}vl.Fragment=Ed;vl.jsx=qa;vl.jsxs=qa;$a.exports=vl;var o=$a.exports,ds={},eu={exports:{}},Re={},tu={exports:{}},nu={};/**
|
|
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(C,N){var I=C.length;C.push(N);e:for(;0<I;){var F=I-1>>>1,W=C[F];if(0<l(W,N))C[F]=N,C[I]=W,I=F;else break e}}function n(C){return C.length===0?null:C[0]}function r(C){if(C.length===0)return null;var N=C[0],I=C.pop();if(I!==N){C[0]=I;e:for(var F=0,W=C.length,ke=W>>>1;F<ke;){var Z=2*(F+1)-1,A=C[Z],q=Z+1,P=C[q];if(0>l(A,I))q<W&&0>l(P,A)?(C[F]=P,C[q]=I,F=q):(C[F]=A,C[Z]=I,F=Z);else if(q<W&&0>l(P,I))C[F]=P,C[q]=I,F=q;else break e}}return N}function l(C,N){var I=C.sortIndex-N.sortIndex;return I!==0?I:C.id-N.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var i=Date,a=i.now();e.unstable_now=function(){return i.now()-a}}var u=[],c=[],m=1,g=null,h=3,x=!1,v=!1,w=!1,R=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,d=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function f(C){for(var N=n(c);N!==null;){if(N.callback===null)r(c);else if(N.startTime<=C)r(c),N.sortIndex=N.expirationTime,t(u,N);else break;N=n(c)}}function y(C){if(w=!1,f(C),!v)if(n(u)!==null)v=!0,ae(k);else{var N=n(c);N!==null&&$(y,N.startTime-C)}}function k(C,N){v=!1,w&&(w=!1,p(T),T=-1),x=!0;var I=h;try{for(f(N),g=n(u);g!==null&&(!(g.expirationTime>N)||C&&!O());){var F=g.callback;if(typeof F=="function"){g.callback=null,h=g.priorityLevel;var W=F(g.expirationTime<=N);N=e.unstable_now(),typeof W=="function"?g.callback=W:g===n(u)&&r(u),f(N)}else r(u);g=n(u)}if(g!==null)var ke=!0;else{var Z=n(c);Z!==null&&$(y,Z.startTime-N),ke=!1}return ke}finally{g=null,h=I,x=!1}}var b=!1,E=null,T=-1,z=5,L=-1;function O(){return!(e.unstable_now()-L<z)}function G(){if(E!==null){var C=e.unstable_now();L=C;var N=!0;try{N=E(!0,C)}finally{N?te():(b=!1,E=null)}}else b=!1}var te;if(typeof d=="function")te=function(){d(G)};else if(typeof MessageChannel<"u"){var Se=new MessageChannel,re=Se.port2;Se.port1.onmessage=G,te=function(){re.postMessage(null)}}else te=function(){R(G,0)};function ae(C){E=C,b||(b=!0,te())}function $(C,N){T=R(function(){C(e.unstable_now())},N)}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(C){C.callback=null},e.unstable_continueExecution=function(){v||x||(v=!0,ae(k))},e.unstable_forceFrameRate=function(C){0>C||125<C?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):z=0<C?Math.floor(1e3/C):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(C){switch(h){case 1:case 2:case 3:var N=3;break;default:N=h}var I=h;h=N;try{return C()}finally{h=I}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(C,N){switch(C){case 1:case 2:case 3:case 4:case 5:break;default:C=3}var I=h;h=C;try{return N()}finally{h=I}},e.unstable_scheduleCallback=function(C,N,I){var F=e.unstable_now();switch(typeof I=="object"&&I!==null?(I=I.delay,I=typeof I=="number"&&0<I?F+I:F):I=F,C){case 1:var W=-1;break;case 2:W=250;break;case 5:W=1073741823;break;case 4:W=1e4;break;default:W=5e3}return W=I+W,C={id:m++,callback:N,priorityLevel:C,startTime:I,expirationTime:W,sortIndex:-1},I>F?(C.sortIndex=I,t(c,C),n(u)===null&&C===n(c)&&(w?(p(T),T=-1):w=!0,$(y,I-F))):(C.sortIndex=W,t(u,C),v||x||(v=!0,ae(k))),C},e.unstable_shouldYield=O,e.unstable_wrapCallback=function(C){var N=h;return function(){var I=h;h=N;try{return C.apply(this,arguments)}finally{h=I}}}})(nu);tu.exports=nu;var Id=tu.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 Rd=S,Ie=Id;function j(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var ru=new Set,Yn={};function Ht(e,t){mn(e,t),mn(e+"Capture",t)}function mn(e,t){for(Yn[e]=t,e=0;e<t.length;e++)ru.add(t[e])}var ot=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),fs=Object.prototype.hasOwnProperty,Ld=/^[: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]*$/,Ci={},bi={};function Ad(e){return fs.call(bi,e)?!0:fs.call(Ci,e)?!1:Ld.test(e)?bi[e]=!0:(Ci[e]=!0,!1)}function Od(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Dd(e,t,n,r){if(t===null||typeof t>"u"||Od(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function we(e,t,n,r,l,s,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=i}var fe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){fe[e]=new we(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];fe[t]=new we(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){fe[e]=new we(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){fe[e]=new we(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){fe[e]=new we(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){fe[e]=new we(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){fe[e]=new we(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){fe[e]=new we(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){fe[e]=new we(e,5,!1,e.toLowerCase(),null,!1,!1)});var uo=/[\-:]([a-z])/g;function co(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(uo,co);fe[t]=new we(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(uo,co);fe[t]=new we(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(uo,co);fe[t]=new we(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){fe[e]=new we(e,1,!1,e.toLowerCase(),null,!1,!1)});fe.xlinkHref=new we("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){fe[e]=new we(e,1,!1,e.toLowerCase(),null,!0,!0)});function fo(e,t,n,r){var l=fe.hasOwnProperty(t)?fe[t]:null;(l!==null?l.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Dd(t,n,l,r)&&(n=null),r||l===null?Ad(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):l.mustUseProperty?e[l.propertyName]=n===null?l.type===3?!1:"":n:(t=l.attributeName,r=l.attributeNamespace,n===null?e.removeAttribute(t):(l=l.type,n=l===3||l===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var ct=Rd.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,vr=Symbol.for("react.element"),Yt=Symbol.for("react.portal"),Xt=Symbol.for("react.fragment"),po=Symbol.for("react.strict_mode"),ps=Symbol.for("react.profiler"),lu=Symbol.for("react.provider"),su=Symbol.for("react.context"),mo=Symbol.for("react.forward_ref"),ms=Symbol.for("react.suspense"),hs=Symbol.for("react.suspense_list"),ho=Symbol.for("react.memo"),ft=Symbol.for("react.lazy"),ou=Symbol.for("react.offscreen"),Ei=Symbol.iterator;function bn(e){return e===null||typeof e!="object"?null:(e=Ei&&e[Ei]||e["@@iterator"],typeof e=="function"?e:null)}var X=Object.assign,Ml;function Dn(e){if(Ml===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Ml=t&&t[1]||""}return`
|
|
34
|
+
`+Ml+e}var Fl=!1;function Ul(e,t){if(!e||Fl)return"";Fl=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var l=c.stack.split(`
|
|
35
|
+
`),s=r.stack.split(`
|
|
36
|
+
`),i=l.length-1,a=s.length-1;1<=i&&0<=a&&l[i]!==s[a];)a--;for(;1<=i&&0<=a;i--,a--)if(l[i]!==s[a]){if(i!==1||a!==1)do if(i--,a--,0>a||l[i]!==s[a]){var u=`
|
|
37
|
+
`+l[i].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=i&&0<=a);break}}}finally{Fl=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Dn(e):""}function zd(e){switch(e.tag){case 5:return Dn(e.type);case 16:return Dn("Lazy");case 13:return Dn("Suspense");case 19:return Dn("SuspenseList");case 0:case 2:case 15:return e=Ul(e.type,!1),e;case 11:return e=Ul(e.type.render,!1),e;case 1:return e=Ul(e.type,!0),e;default:return""}}function gs(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 Xt:return"Fragment";case Yt:return"Portal";case ps:return"Profiler";case po:return"StrictMode";case ms:return"Suspense";case hs:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case su:return(e.displayName||"Context")+".Consumer";case lu:return(e._context.displayName||"Context")+".Provider";case mo:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ho:return t=e.displayName||null,t!==null?t:gs(e.type)||"Memo";case ft:t=e._payload,e=e._init;try{return gs(e(t))}catch{}}return null}function Md(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 gs(t);case 8:return t===po?"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 bt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function iu(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Fd(e){var t=iu(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(i){r=""+i,s.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function wr(e){e._valueTracker||(e._valueTracker=Fd(e))}function au(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=iu(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Qr(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 ys(e,t){var n=t.checked;return X({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function _i(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=bt(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function uu(e,t){t=t.checked,t!=null&&fo(e,"checked",t,!1)}function xs(e,t){uu(e,t);var n=bt(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?vs(e,t.type,n):t.hasOwnProperty("defaultValue")&&vs(e,t.type,bt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ti(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function vs(e,t,n){(t!=="number"||Qr(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var zn=Array.isArray;function an(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l<n.length;l++)t["$"+n[l]]=!0;for(n=0;n<e.length;n++)l=t.hasOwnProperty("$"+e[n].value),e[n].selected!==l&&(e[n].selected=l),l&&r&&(e[n].defaultSelected=!0)}else{for(n=""+bt(n),t=null,l=0;l<e.length;l++){if(e[l].value===n){e[l].selected=!0,r&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function ws(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(j(91));return X({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Pi(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(j(92));if(zn(n)){if(1<n.length)throw Error(j(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:bt(n)}}function cu(e,t){var n=bt(t.value),r=bt(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Ii(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function du(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 Ss(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?du(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Sr,fu=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,l){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,l)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Sr=Sr||document.createElement("div"),Sr.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Sr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Xn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Un={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},Ud=["Webkit","ms","Moz","O"];Object.keys(Un).forEach(function(e){Ud.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Un[t]=Un[e]})});function pu(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Un.hasOwnProperty(e)&&Un[e]?(""+t).trim():t+"px"}function mu(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=pu(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var Wd=X({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 ks(e,t){if(t){if(Wd[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(j(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(j(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(j(61))}if(t.style!=null&&typeof t.style!="object")throw Error(j(62))}}function js(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 Ns=null;function go(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Cs=null,un=null,cn=null;function Ri(e){if(e=gr(e)){if(typeof Cs!="function")throw Error(j(280));var t=e.stateNode;t&&(t=Nl(t),Cs(e.stateNode,e.type,t))}}function hu(e){un?cn?cn.push(e):cn=[e]:un=e}function gu(){if(un){var e=un,t=cn;if(cn=un=null,Ri(e),t)for(e=0;e<t.length;e++)Ri(t[e])}}function yu(e,t){return e(t)}function xu(){}var Wl=!1;function vu(e,t,n){if(Wl)return e(t,n);Wl=!0;try{return yu(e,t,n)}finally{Wl=!1,(un!==null||cn!==null)&&(xu(),gu())}}function Jn(e,t){var n=e.stateNode;if(n===null)return null;var r=Nl(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(j(231,t,typeof n));return n}var bs=!1;if(ot)try{var En={};Object.defineProperty(En,"passive",{get:function(){bs=!0}}),window.addEventListener("test",En,En),window.removeEventListener("test",En,En)}catch{bs=!1}function $d(e,t,n,r,l,s,i,a,u){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(m){this.onError(m)}}var Wn=!1,Yr=null,Xr=!1,Es=null,Bd={onError:function(e){Wn=!0,Yr=e}};function Hd(e,t,n,r,l,s,i,a,u){Wn=!1,Yr=null,$d.apply(Bd,arguments)}function Vd(e,t,n,r,l,s,i,a,u){if(Hd.apply(this,arguments),Wn){if(Wn){var c=Yr;Wn=!1,Yr=null}else throw Error(j(198));Xr||(Xr=!0,Es=c)}}function Vt(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function wu(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 Li(e){if(Vt(e)!==e)throw Error(j(188))}function Kd(e){var t=e.alternate;if(!t){if(t=Vt(e),t===null)throw Error(j(188));return t!==e?null:e}for(var n=e,r=t;;){var l=n.return;if(l===null)break;var s=l.alternate;if(s===null){if(r=l.return,r!==null){n=r;continue}break}if(l.child===s.child){for(s=l.child;s;){if(s===n)return Li(l),e;if(s===r)return Li(l),t;s=s.sibling}throw Error(j(188))}if(n.return!==r.return)n=l,r=s;else{for(var i=!1,a=l.child;a;){if(a===n){i=!0,n=l,r=s;break}if(a===r){i=!0,r=l,n=s;break}a=a.sibling}if(!i){for(a=s.child;a;){if(a===n){i=!0,n=s,r=l;break}if(a===r){i=!0,r=s,n=l;break}a=a.sibling}if(!i)throw Error(j(189))}}if(n.alternate!==r)throw Error(j(190))}if(n.tag!==3)throw Error(j(188));return n.stateNode.current===n?e:t}function Su(e){return e=Kd(e),e!==null?ku(e):null}function ku(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=ku(e);if(t!==null)return t;e=e.sibling}return null}var ju=Ie.unstable_scheduleCallback,Ai=Ie.unstable_cancelCallback,Gd=Ie.unstable_shouldYield,Qd=Ie.unstable_requestPaint,ee=Ie.unstable_now,Yd=Ie.unstable_getCurrentPriorityLevel,yo=Ie.unstable_ImmediatePriority,Nu=Ie.unstable_UserBlockingPriority,Jr=Ie.unstable_NormalPriority,Xd=Ie.unstable_LowPriority,Cu=Ie.unstable_IdlePriority,wl=null,Je=null;function Jd(e){if(Je&&typeof Je.onCommitFiberRoot=="function")try{Je.onCommitFiberRoot(wl,e,void 0,(e.current.flags&128)===128)}catch{}}var He=Math.clz32?Math.clz32:ef,Zd=Math.log,qd=Math.LN2;function ef(e){return e>>>=0,e===0?32:31-(Zd(e)/qd|0)|0}var kr=64,jr=4194304;function Mn(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 Zr(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,s=e.pingedLanes,i=n&268435455;if(i!==0){var a=i&~l;a!==0?r=Mn(a):(s&=i,s!==0&&(r=Mn(s)))}else i=n&~l,i!==0?r=Mn(i):s!==0&&(r=Mn(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&l)&&(l=r&-r,s=t&-t,l>=s||l===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-He(t),l=1<<n,r|=e[n],t&=~l;return r}function tf(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 nf(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,l=e.expirationTimes,s=e.pendingLanes;0<s;){var i=31-He(s),a=1<<i,u=l[i];u===-1?(!(a&n)||a&r)&&(l[i]=tf(a,t)):u<=t&&(e.expiredLanes|=a),s&=~a}}function _s(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function bu(){var e=kr;return kr<<=1,!(kr&4194240)&&(kr=64),e}function $l(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function mr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-He(t),e[t]=n}function rf(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var l=31-He(n),s=1<<l;t[l]=0,r[l]=-1,e[l]=-1,n&=~s}}function xo(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-He(n),l=1<<r;l&t|e[r]&t&&(e[r]|=t),n&=~l}}var U=0;function Eu(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var _u,vo,Tu,Pu,Iu,Ts=!1,Nr=[],xt=null,vt=null,wt=null,Zn=new Map,qn=new Map,mt=[],lf="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 Oi(e,t){switch(e){case"focusin":case"focusout":xt=null;break;case"dragenter":case"dragleave":vt=null;break;case"mouseover":case"mouseout":wt=null;break;case"pointerover":case"pointerout":Zn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":qn.delete(t.pointerId)}}function _n(e,t,n,r,l,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[l]},t!==null&&(t=gr(t),t!==null&&vo(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function sf(e,t,n,r,l){switch(t){case"focusin":return xt=_n(xt,e,t,n,r,l),!0;case"dragenter":return vt=_n(vt,e,t,n,r,l),!0;case"mouseover":return wt=_n(wt,e,t,n,r,l),!0;case"pointerover":var s=l.pointerId;return Zn.set(s,_n(Zn.get(s)||null,e,t,n,r,l)),!0;case"gotpointercapture":return s=l.pointerId,qn.set(s,_n(qn.get(s)||null,e,t,n,r,l)),!0}return!1}function Ru(e){var t=At(e.target);if(t!==null){var n=Vt(t);if(n!==null){if(t=n.tag,t===13){if(t=wu(n),t!==null){e.blockedOn=t,Iu(e.priority,function(){Tu(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Mr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ps(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Ns=r,n.target.dispatchEvent(r),Ns=null}else return t=gr(n),t!==null&&vo(t),e.blockedOn=n,!1;t.shift()}return!0}function Di(e,t,n){Mr(e)&&n.delete(t)}function of(){Ts=!1,xt!==null&&Mr(xt)&&(xt=null),vt!==null&&Mr(vt)&&(vt=null),wt!==null&&Mr(wt)&&(wt=null),Zn.forEach(Di),qn.forEach(Di)}function Tn(e,t){e.blockedOn===t&&(e.blockedOn=null,Ts||(Ts=!0,Ie.unstable_scheduleCallback(Ie.unstable_NormalPriority,of)))}function er(e){function t(l){return Tn(l,e)}if(0<Nr.length){Tn(Nr[0],e);for(var n=1;n<Nr.length;n++){var r=Nr[n];r.blockedOn===e&&(r.blockedOn=null)}}for(xt!==null&&Tn(xt,e),vt!==null&&Tn(vt,e),wt!==null&&Tn(wt,e),Zn.forEach(t),qn.forEach(t),n=0;n<mt.length;n++)r=mt[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<mt.length&&(n=mt[0],n.blockedOn===null);)Ru(n),n.blockedOn===null&&mt.shift()}var dn=ct.ReactCurrentBatchConfig,qr=!0;function af(e,t,n,r){var l=U,s=dn.transition;dn.transition=null;try{U=1,wo(e,t,n,r)}finally{U=l,dn.transition=s}}function uf(e,t,n,r){var l=U,s=dn.transition;dn.transition=null;try{U=4,wo(e,t,n,r)}finally{U=l,dn.transition=s}}function wo(e,t,n,r){if(qr){var l=Ps(e,t,n,r);if(l===null)Zl(e,t,r,el,n),Oi(e,r);else if(sf(l,e,t,n,r))r.stopPropagation();else if(Oi(e,r),t&4&&-1<lf.indexOf(e)){for(;l!==null;){var s=gr(l);if(s!==null&&_u(s),s=Ps(e,t,n,r),s===null&&Zl(e,t,r,el,n),s===l)break;l=s}l!==null&&r.stopPropagation()}else Zl(e,t,r,null,n)}}var el=null;function Ps(e,t,n,r){if(el=null,e=go(r),e=At(e),e!==null)if(t=Vt(e),t===null)e=null;else if(n=t.tag,n===13){if(e=wu(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return el=e,null}function Lu(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(Yd()){case yo:return 1;case Nu:return 4;case Jr:case Xd:return 16;case Cu:return 536870912;default:return 16}default:return 16}}var gt=null,So=null,Fr=null;function Au(){if(Fr)return Fr;var e,t=So,n=t.length,r,l="value"in gt?gt.value:gt.textContent,s=l.length;for(e=0;e<n&&t[e]===l[e];e++);var i=n-e;for(r=1;r<=i&&t[n-r]===l[s-r];r++);return Fr=l.slice(e,1<r?1-r:void 0)}function Ur(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 Cr(){return!0}function zi(){return!1}function Le(e){function t(n,r,l,s,i){this._reactName=n,this._targetInst=l,this.type=r,this.nativeEvent=s,this.target=i,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Cr:zi,this.isPropagationStopped=zi,this}return X(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Cr)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Cr)},persist:function(){},isPersistent:Cr}),t}var jn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ko=Le(jn),hr=X({},jn,{view:0,detail:0}),cf=Le(hr),Bl,Hl,Pn,Sl=X({},hr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:jo,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!==Pn&&(Pn&&e.type==="mousemove"?(Bl=e.screenX-Pn.screenX,Hl=e.screenY-Pn.screenY):Hl=Bl=0,Pn=e),Bl)},movementY:function(e){return"movementY"in e?e.movementY:Hl}}),Mi=Le(Sl),df=X({},Sl,{dataTransfer:0}),ff=Le(df),pf=X({},hr,{relatedTarget:0}),Vl=Le(pf),mf=X({},jn,{animationName:0,elapsedTime:0,pseudoElement:0}),hf=Le(mf),gf=X({},jn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),yf=Le(gf),xf=X({},jn,{data:0}),Fi=Le(xf),vf={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},wf={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"},Sf={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function kf(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Sf[e])?!!t[e]:!1}function jo(){return kf}var jf=X({},hr,{key:function(e){if(e.key){var t=vf[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ur(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?wf[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:jo,charCode:function(e){return e.type==="keypress"?Ur(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ur(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Nf=Le(jf),Cf=X({},Sl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ui=Le(Cf),bf=X({},hr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:jo}),Ef=Le(bf),_f=X({},jn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Tf=Le(_f),Pf=X({},Sl,{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}),If=Le(Pf),Rf=[9,13,27,32],No=ot&&"CompositionEvent"in window,$n=null;ot&&"documentMode"in document&&($n=document.documentMode);var Lf=ot&&"TextEvent"in window&&!$n,Ou=ot&&(!No||$n&&8<$n&&11>=$n),Wi=" ",$i=!1;function Du(e,t){switch(e){case"keyup":return Rf.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Jt=!1;function Af(e,t){switch(e){case"compositionend":return zu(t);case"keypress":return t.which!==32?null:($i=!0,Wi);case"textInput":return e=t.data,e===Wi&&$i?null:e;default:return null}}function Of(e,t){if(Jt)return e==="compositionend"||!No&&Du(e,t)?(e=Au(),Fr=So=gt=null,Jt=!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 Ou&&t.locale!=="ko"?null:t.data;default:return null}}var Df={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 Bi(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Df[e.type]:t==="textarea"}function Mu(e,t,n,r){hu(r),t=tl(t,"onChange"),0<t.length&&(n=new ko("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Bn=null,tr=null;function zf(e){Yu(e,0)}function kl(e){var t=en(e);if(au(t))return e}function Mf(e,t){if(e==="change")return t}var Fu=!1;if(ot){var Kl;if(ot){var Gl="oninput"in document;if(!Gl){var Hi=document.createElement("div");Hi.setAttribute("oninput","return;"),Gl=typeof Hi.oninput=="function"}Kl=Gl}else Kl=!1;Fu=Kl&&(!document.documentMode||9<document.documentMode)}function Vi(){Bn&&(Bn.detachEvent("onpropertychange",Uu),tr=Bn=null)}function Uu(e){if(e.propertyName==="value"&&kl(tr)){var t=[];Mu(t,tr,e,go(e)),vu(zf,t)}}function Ff(e,t,n){e==="focusin"?(Vi(),Bn=t,tr=n,Bn.attachEvent("onpropertychange",Uu)):e==="focusout"&&Vi()}function Uf(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return kl(tr)}function Wf(e,t){if(e==="click")return kl(t)}function $f(e,t){if(e==="input"||e==="change")return kl(t)}function Bf(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ke=typeof Object.is=="function"?Object.is:Bf;function nr(e,t){if(Ke(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var l=n[r];if(!fs.call(t,l)||!Ke(e[l],t[l]))return!1}return!0}function Ki(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Gi(e,t){var n=Ki(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Ki(n)}}function Wu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Wu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function $u(){for(var e=window,t=Qr();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Qr(e.document)}return t}function Co(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 Hf(e){var t=$u(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Wu(n.ownerDocument.documentElement,n)){if(r!==null&&Co(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=n.textContent.length,s=Math.min(r.start,l);r=r.end===void 0?s:Math.min(r.end,l),!e.extend&&s>r&&(l=r,r=s,s=l),l=Gi(n,s);var i=Gi(n,r);l&&i&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Vf=ot&&"documentMode"in document&&11>=document.documentMode,Zt=null,Is=null,Hn=null,Rs=!1;function Qi(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Rs||Zt==null||Zt!==Qr(r)||(r=Zt,"selectionStart"in r&&Co(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Hn&&nr(Hn,r)||(Hn=r,r=tl(Is,"onSelect"),0<r.length&&(t=new ko("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Zt)))}function br(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var qt={animationend:br("Animation","AnimationEnd"),animationiteration:br("Animation","AnimationIteration"),animationstart:br("Animation","AnimationStart"),transitionend:br("Transition","TransitionEnd")},Ql={},Bu={};ot&&(Bu=document.createElement("div").style,"AnimationEvent"in window||(delete qt.animationend.animation,delete qt.animationiteration.animation,delete qt.animationstart.animation),"TransitionEvent"in window||delete qt.transitionend.transition);function jl(e){if(Ql[e])return Ql[e];if(!qt[e])return e;var t=qt[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Bu)return Ql[e]=t[n];return e}var Hu=jl("animationend"),Vu=jl("animationiteration"),Ku=jl("animationstart"),Gu=jl("transitionend"),Qu=new Map,Yi="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 Tt(e,t){Qu.set(e,t),Ht(t,[e])}for(var Yl=0;Yl<Yi.length;Yl++){var Xl=Yi[Yl],Kf=Xl.toLowerCase(),Gf=Xl[0].toUpperCase()+Xl.slice(1);Tt(Kf,"on"+Gf)}Tt(Hu,"onAnimationEnd");Tt(Vu,"onAnimationIteration");Tt(Ku,"onAnimationStart");Tt("dblclick","onDoubleClick");Tt("focusin","onFocus");Tt("focusout","onBlur");Tt(Gu,"onTransitionEnd");mn("onMouseEnter",["mouseout","mouseover"]);mn("onMouseLeave",["mouseout","mouseover"]);mn("onPointerEnter",["pointerout","pointerover"]);mn("onPointerLeave",["pointerout","pointerover"]);Ht("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ht("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ht("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ht("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ht("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ht("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Fn="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(" "),Qf=new Set("cancel close invalid load scroll toggle".split(" ").concat(Fn));function Xi(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Vd(r,t,void 0,e),e.currentTarget=null}function Yu(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],l=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var i=r.length-1;0<=i;i--){var a=r[i],u=a.instance,c=a.currentTarget;if(a=a.listener,u!==s&&l.isPropagationStopped())break e;Xi(l,a,c),s=u}else for(i=0;i<r.length;i++){if(a=r[i],u=a.instance,c=a.currentTarget,a=a.listener,u!==s&&l.isPropagationStopped())break e;Xi(l,a,c),s=u}}}if(Xr)throw e=Es,Xr=!1,Es=null,e}function H(e,t){var n=t[zs];n===void 0&&(n=t[zs]=new Set);var r=e+"__bubble";n.has(r)||(Xu(t,e,2,!1),n.add(r))}function Jl(e,t,n){var r=0;t&&(r|=4),Xu(n,e,r,t)}var Er="_reactListening"+Math.random().toString(36).slice(2);function rr(e){if(!e[Er]){e[Er]=!0,ru.forEach(function(n){n!=="selectionchange"&&(Qf.has(n)||Jl(n,!1,e),Jl(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Er]||(t[Er]=!0,Jl("selectionchange",!1,t))}}function Xu(e,t,n,r){switch(Lu(t)){case 1:var l=af;break;case 4:l=uf;break;default:l=wo}n=l.bind(null,t,n,e),l=void 0,!bs||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(l=!0),r?l!==void 0?e.addEventListener(t,n,{capture:!0,passive:l}):e.addEventListener(t,n,!0):l!==void 0?e.addEventListener(t,n,{passive:l}):e.addEventListener(t,n,!1)}function Zl(e,t,n,r,l){var s=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var i=r.tag;if(i===3||i===4){var a=r.stateNode.containerInfo;if(a===l||a.nodeType===8&&a.parentNode===l)break;if(i===4)for(i=r.return;i!==null;){var u=i.tag;if((u===3||u===4)&&(u=i.stateNode.containerInfo,u===l||u.nodeType===8&&u.parentNode===l))return;i=i.return}for(;a!==null;){if(i=At(a),i===null)return;if(u=i.tag,u===5||u===6){r=s=i;continue e}a=a.parentNode}}r=r.return}vu(function(){var c=s,m=go(n),g=[];e:{var h=Qu.get(e);if(h!==void 0){var x=ko,v=e;switch(e){case"keypress":if(Ur(n)===0)break e;case"keydown":case"keyup":x=Nf;break;case"focusin":v="focus",x=Vl;break;case"focusout":v="blur",x=Vl;break;case"beforeblur":case"afterblur":x=Vl;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":x=Mi;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":x=ff;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":x=Ef;break;case Hu:case Vu:case Ku:x=hf;break;case Gu:x=Tf;break;case"scroll":x=cf;break;case"wheel":x=If;break;case"copy":case"cut":case"paste":x=yf;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":x=Ui}var w=(t&4)!==0,R=!w&&e==="scroll",p=w?h!==null?h+"Capture":null:h;w=[];for(var d=c,f;d!==null;){f=d;var y=f.stateNode;if(f.tag===5&&y!==null&&(f=y,p!==null&&(y=Jn(d,p),y!=null&&w.push(lr(d,y,f)))),R)break;d=d.return}0<w.length&&(h=new x(h,v,null,n,m),g.push({event:h,listeners:w}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",x=e==="mouseout"||e==="pointerout",h&&n!==Ns&&(v=n.relatedTarget||n.fromElement)&&(At(v)||v[it]))break e;if((x||h)&&(h=m.window===m?m:(h=m.ownerDocument)?h.defaultView||h.parentWindow:window,x?(v=n.relatedTarget||n.toElement,x=c,v=v?At(v):null,v!==null&&(R=Vt(v),v!==R||v.tag!==5&&v.tag!==6)&&(v=null)):(x=null,v=c),x!==v)){if(w=Mi,y="onMouseLeave",p="onMouseEnter",d="mouse",(e==="pointerout"||e==="pointerover")&&(w=Ui,y="onPointerLeave",p="onPointerEnter",d="pointer"),R=x==null?h:en(x),f=v==null?h:en(v),h=new w(y,d+"leave",x,n,m),h.target=R,h.relatedTarget=f,y=null,At(m)===c&&(w=new w(p,d+"enter",v,n,m),w.target=f,w.relatedTarget=R,y=w),R=y,x&&v)t:{for(w=x,p=v,d=0,f=w;f;f=Gt(f))d++;for(f=0,y=p;y;y=Gt(y))f++;for(;0<d-f;)w=Gt(w),d--;for(;0<f-d;)p=Gt(p),f--;for(;d--;){if(w===p||p!==null&&w===p.alternate)break t;w=Gt(w),p=Gt(p)}w=null}else w=null;x!==null&&Ji(g,h,x,w,!1),v!==null&&R!==null&&Ji(g,R,v,w,!0)}}e:{if(h=c?en(c):window,x=h.nodeName&&h.nodeName.toLowerCase(),x==="select"||x==="input"&&h.type==="file")var k=Mf;else if(Bi(h))if(Fu)k=$f;else{k=Uf;var b=Ff}else(x=h.nodeName)&&x.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(k=Wf);if(k&&(k=k(e,c))){Mu(g,k,n,m);break e}b&&b(e,h,c),e==="focusout"&&(b=h._wrapperState)&&b.controlled&&h.type==="number"&&vs(h,"number",h.value)}switch(b=c?en(c):window,e){case"focusin":(Bi(b)||b.contentEditable==="true")&&(Zt=b,Is=c,Hn=null);break;case"focusout":Hn=Is=Zt=null;break;case"mousedown":Rs=!0;break;case"contextmenu":case"mouseup":case"dragend":Rs=!1,Qi(g,n,m);break;case"selectionchange":if(Vf)break;case"keydown":case"keyup":Qi(g,n,m)}var E;if(No)e:{switch(e){case"compositionstart":var T="onCompositionStart";break e;case"compositionend":T="onCompositionEnd";break e;case"compositionupdate":T="onCompositionUpdate";break e}T=void 0}else Jt?Du(e,n)&&(T="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(T="onCompositionStart");T&&(Ou&&n.locale!=="ko"&&(Jt||T!=="onCompositionStart"?T==="onCompositionEnd"&&Jt&&(E=Au()):(gt=m,So="value"in gt?gt.value:gt.textContent,Jt=!0)),b=tl(c,T),0<b.length&&(T=new Fi(T,e,null,n,m),g.push({event:T,listeners:b}),E?T.data=E:(E=zu(n),E!==null&&(T.data=E)))),(E=Lf?Af(e,n):Of(e,n))&&(c=tl(c,"onBeforeInput"),0<c.length&&(m=new Fi("onBeforeInput","beforeinput",null,n,m),g.push({event:m,listeners:c}),m.data=E))}Yu(g,t)})}function lr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function tl(e,t){for(var n=t+"Capture",r=[];e!==null;){var l=e,s=l.stateNode;l.tag===5&&s!==null&&(l=s,s=Jn(e,n),s!=null&&r.unshift(lr(e,s,l)),s=Jn(e,t),s!=null&&r.push(lr(e,s,l))),e=e.return}return r}function Gt(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Ji(e,t,n,r,l){for(var s=t._reactName,i=[];n!==null&&n!==r;){var a=n,u=a.alternate,c=a.stateNode;if(u!==null&&u===r)break;a.tag===5&&c!==null&&(a=c,l?(u=Jn(n,s),u!=null&&i.unshift(lr(n,u,a))):l||(u=Jn(n,s),u!=null&&i.push(lr(n,u,a)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var Yf=/\r\n?/g,Xf=/\u0000|\uFFFD/g;function Zi(e){return(typeof e=="string"?e:""+e).replace(Yf,`
|
|
38
|
+
`).replace(Xf,"")}function _r(e,t,n){if(t=Zi(t),Zi(e)!==t&&n)throw Error(j(425))}function nl(){}var Ls=null,As=null;function Os(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 Ds=typeof setTimeout=="function"?setTimeout:void 0,Jf=typeof clearTimeout=="function"?clearTimeout:void 0,qi=typeof Promise=="function"?Promise:void 0,Zf=typeof queueMicrotask=="function"?queueMicrotask:typeof qi<"u"?function(e){return qi.resolve(null).then(e).catch(qf)}:Ds;function qf(e){setTimeout(function(){throw e})}function ql(e,t){var n=t,r=0;do{var l=n.nextSibling;if(e.removeChild(n),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(r===0){e.removeChild(l),er(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=l}while(n);er(t)}function St(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 ea(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Nn=Math.random().toString(36).slice(2),Xe="__reactFiber$"+Nn,sr="__reactProps$"+Nn,it="__reactContainer$"+Nn,zs="__reactEvents$"+Nn,ep="__reactListeners$"+Nn,tp="__reactHandles$"+Nn;function At(e){var t=e[Xe];if(t)return t;for(var n=e.parentNode;n;){if(t=n[it]||n[Xe]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=ea(e);e!==null;){if(n=e[Xe])return n;e=ea(e)}return t}e=n,n=e.parentNode}return null}function gr(e){return e=e[Xe]||e[it],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function en(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(j(33))}function Nl(e){return e[sr]||null}var Ms=[],tn=-1;function Pt(e){return{current:e}}function V(e){0>tn||(e.current=Ms[tn],Ms[tn]=null,tn--)}function B(e,t){tn++,Ms[tn]=e.current,e.current=t}var Et={},ge=Pt(Et),Ce=Pt(!1),Ft=Et;function hn(e,t){var n=e.type.contextTypes;if(!n)return Et;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},s;for(s in n)l[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function be(e){return e=e.childContextTypes,e!=null}function rl(){V(Ce),V(ge)}function ta(e,t,n){if(ge.current!==Et)throw Error(j(168));B(ge,t),B(Ce,n)}function Ju(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(j(108,Md(e)||"Unknown",l));return X({},n,r)}function ll(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Et,Ft=ge.current,B(ge,e),B(Ce,Ce.current),!0}function na(e,t,n){var r=e.stateNode;if(!r)throw Error(j(169));n?(e=Ju(e,t,Ft),r.__reactInternalMemoizedMergedChildContext=e,V(Ce),V(ge),B(ge,e)):V(Ce),B(Ce,n)}var tt=null,Cl=!1,es=!1;function Zu(e){tt===null?tt=[e]:tt.push(e)}function np(e){Cl=!0,Zu(e)}function It(){if(!es&&tt!==null){es=!0;var e=0,t=U;try{var n=tt;for(U=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}tt=null,Cl=!1}catch(l){throw tt!==null&&(tt=tt.slice(e+1)),ju(yo,It),l}finally{U=t,es=!1}}return null}var nn=[],rn=0,sl=null,ol=0,Ae=[],Oe=0,Ut=null,nt=1,rt="";function Rt(e,t){nn[rn++]=ol,nn[rn++]=sl,sl=e,ol=t}function qu(e,t,n){Ae[Oe++]=nt,Ae[Oe++]=rt,Ae[Oe++]=Ut,Ut=e;var r=nt;e=rt;var l=32-He(r)-1;r&=~(1<<l),n+=1;var s=32-He(t)+l;if(30<s){var i=l-l%5;s=(r&(1<<i)-1).toString(32),r>>=i,l-=i,nt=1<<32-He(t)+l|n<<l|r,rt=s+e}else nt=1<<s|n<<l|r,rt=e}function bo(e){e.return!==null&&(Rt(e,1),qu(e,1,0))}function Eo(e){for(;e===sl;)sl=nn[--rn],nn[rn]=null,ol=nn[--rn],nn[rn]=null;for(;e===Ut;)Ut=Ae[--Oe],Ae[Oe]=null,rt=Ae[--Oe],Ae[Oe]=null,nt=Ae[--Oe],Ae[Oe]=null}var Pe=null,Te=null,K=!1,Be=null;function ec(e,t){var n=De(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function ra(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Pe=e,Te=St(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Pe=e,Te=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Ut!==null?{id:nt,overflow:rt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=De(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Pe=e,Te=null,!0):!1;default:return!1}}function Fs(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Us(e){if(K){var t=Te;if(t){var n=t;if(!ra(e,t)){if(Fs(e))throw Error(j(418));t=St(n.nextSibling);var r=Pe;t&&ra(e,t)?ec(r,n):(e.flags=e.flags&-4097|2,K=!1,Pe=e)}}else{if(Fs(e))throw Error(j(418));e.flags=e.flags&-4097|2,K=!1,Pe=e}}}function la(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Pe=e}function Tr(e){if(e!==Pe)return!1;if(!K)return la(e),K=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Os(e.type,e.memoizedProps)),t&&(t=Te)){if(Fs(e))throw tc(),Error(j(418));for(;t;)ec(e,t),t=St(t.nextSibling)}if(la(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(j(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Te=St(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Te=null}}else Te=Pe?St(e.stateNode.nextSibling):null;return!0}function tc(){for(var e=Te;e;)e=St(e.nextSibling)}function gn(){Te=Pe=null,K=!1}function _o(e){Be===null?Be=[e]:Be.push(e)}var rp=ct.ReactCurrentBatchConfig;function In(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(j(309));var r=n.stateNode}if(!r)throw Error(j(147,e));var l=r,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(i){var a=l.refs;i===null?delete a[s]:a[s]=i},t._stringRef=s,t)}if(typeof e!="string")throw Error(j(284));if(!n._owner)throw Error(j(290,e))}return e}function Pr(e,t){throw e=Object.prototype.toString.call(t),Error(j(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function sa(e){var t=e._init;return t(e._payload)}function nc(e){function t(p,d){if(e){var f=p.deletions;f===null?(p.deletions=[d],p.flags|=16):f.push(d)}}function n(p,d){if(!e)return null;for(;d!==null;)t(p,d),d=d.sibling;return null}function r(p,d){for(p=new Map;d!==null;)d.key!==null?p.set(d.key,d):p.set(d.index,d),d=d.sibling;return p}function l(p,d){return p=Ct(p,d),p.index=0,p.sibling=null,p}function s(p,d,f){return p.index=f,e?(f=p.alternate,f!==null?(f=f.index,f<d?(p.flags|=2,d):f):(p.flags|=2,d)):(p.flags|=1048576,d)}function i(p){return e&&p.alternate===null&&(p.flags|=2),p}function a(p,d,f,y){return d===null||d.tag!==6?(d=is(f,p.mode,y),d.return=p,d):(d=l(d,f),d.return=p,d)}function u(p,d,f,y){var k=f.type;return k===Xt?m(p,d,f.props.children,y,f.key):d!==null&&(d.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===ft&&sa(k)===d.type)?(y=l(d,f.props),y.ref=In(p,d,f),y.return=p,y):(y=Gr(f.type,f.key,f.props,null,p.mode,y),y.ref=In(p,d,f),y.return=p,y)}function c(p,d,f,y){return d===null||d.tag!==4||d.stateNode.containerInfo!==f.containerInfo||d.stateNode.implementation!==f.implementation?(d=as(f,p.mode,y),d.return=p,d):(d=l(d,f.children||[]),d.return=p,d)}function m(p,d,f,y,k){return d===null||d.tag!==7?(d=Mt(f,p.mode,y,k),d.return=p,d):(d=l(d,f),d.return=p,d)}function g(p,d,f){if(typeof d=="string"&&d!==""||typeof d=="number")return d=is(""+d,p.mode,f),d.return=p,d;if(typeof d=="object"&&d!==null){switch(d.$$typeof){case vr:return f=Gr(d.type,d.key,d.props,null,p.mode,f),f.ref=In(p,null,d),f.return=p,f;case Yt:return d=as(d,p.mode,f),d.return=p,d;case ft:var y=d._init;return g(p,y(d._payload),f)}if(zn(d)||bn(d))return d=Mt(d,p.mode,f,null),d.return=p,d;Pr(p,d)}return null}function h(p,d,f,y){var k=d!==null?d.key:null;if(typeof f=="string"&&f!==""||typeof f=="number")return k!==null?null:a(p,d,""+f,y);if(typeof f=="object"&&f!==null){switch(f.$$typeof){case vr:return f.key===k?u(p,d,f,y):null;case Yt:return f.key===k?c(p,d,f,y):null;case ft:return k=f._init,h(p,d,k(f._payload),y)}if(zn(f)||bn(f))return k!==null?null:m(p,d,f,y,null);Pr(p,f)}return null}function x(p,d,f,y,k){if(typeof y=="string"&&y!==""||typeof y=="number")return p=p.get(f)||null,a(d,p,""+y,k);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case vr:return p=p.get(y.key===null?f:y.key)||null,u(d,p,y,k);case Yt:return p=p.get(y.key===null?f:y.key)||null,c(d,p,y,k);case ft:var b=y._init;return x(p,d,f,b(y._payload),k)}if(zn(y)||bn(y))return p=p.get(f)||null,m(d,p,y,k,null);Pr(d,y)}return null}function v(p,d,f,y){for(var k=null,b=null,E=d,T=d=0,z=null;E!==null&&T<f.length;T++){E.index>T?(z=E,E=null):z=E.sibling;var L=h(p,E,f[T],y);if(L===null){E===null&&(E=z);break}e&&E&&L.alternate===null&&t(p,E),d=s(L,d,T),b===null?k=L:b.sibling=L,b=L,E=z}if(T===f.length)return n(p,E),K&&Rt(p,T),k;if(E===null){for(;T<f.length;T++)E=g(p,f[T],y),E!==null&&(d=s(E,d,T),b===null?k=E:b.sibling=E,b=E);return K&&Rt(p,T),k}for(E=r(p,E);T<f.length;T++)z=x(E,p,T,f[T],y),z!==null&&(e&&z.alternate!==null&&E.delete(z.key===null?T:z.key),d=s(z,d,T),b===null?k=z:b.sibling=z,b=z);return e&&E.forEach(function(O){return t(p,O)}),K&&Rt(p,T),k}function w(p,d,f,y){var k=bn(f);if(typeof k!="function")throw Error(j(150));if(f=k.call(f),f==null)throw Error(j(151));for(var b=k=null,E=d,T=d=0,z=null,L=f.next();E!==null&&!L.done;T++,L=f.next()){E.index>T?(z=E,E=null):z=E.sibling;var O=h(p,E,L.value,y);if(O===null){E===null&&(E=z);break}e&&E&&O.alternate===null&&t(p,E),d=s(O,d,T),b===null?k=O:b.sibling=O,b=O,E=z}if(L.done)return n(p,E),K&&Rt(p,T),k;if(E===null){for(;!L.done;T++,L=f.next())L=g(p,L.value,y),L!==null&&(d=s(L,d,T),b===null?k=L:b.sibling=L,b=L);return K&&Rt(p,T),k}for(E=r(p,E);!L.done;T++,L=f.next())L=x(E,p,T,L.value,y),L!==null&&(e&&L.alternate!==null&&E.delete(L.key===null?T:L.key),d=s(L,d,T),b===null?k=L:b.sibling=L,b=L);return e&&E.forEach(function(G){return t(p,G)}),K&&Rt(p,T),k}function R(p,d,f,y){if(typeof f=="object"&&f!==null&&f.type===Xt&&f.key===null&&(f=f.props.children),typeof f=="object"&&f!==null){switch(f.$$typeof){case vr:e:{for(var k=f.key,b=d;b!==null;){if(b.key===k){if(k=f.type,k===Xt){if(b.tag===7){n(p,b.sibling),d=l(b,f.props.children),d.return=p,p=d;break e}}else if(b.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===ft&&sa(k)===b.type){n(p,b.sibling),d=l(b,f.props),d.ref=In(p,b,f),d.return=p,p=d;break e}n(p,b);break}else t(p,b);b=b.sibling}f.type===Xt?(d=Mt(f.props.children,p.mode,y,f.key),d.return=p,p=d):(y=Gr(f.type,f.key,f.props,null,p.mode,y),y.ref=In(p,d,f),y.return=p,p=y)}return i(p);case Yt:e:{for(b=f.key;d!==null;){if(d.key===b)if(d.tag===4&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){n(p,d.sibling),d=l(d,f.children||[]),d.return=p,p=d;break e}else{n(p,d);break}else t(p,d);d=d.sibling}d=as(f,p.mode,y),d.return=p,p=d}return i(p);case ft:return b=f._init,R(p,d,b(f._payload),y)}if(zn(f))return v(p,d,f,y);if(bn(f))return w(p,d,f,y);Pr(p,f)}return typeof f=="string"&&f!==""||typeof f=="number"?(f=""+f,d!==null&&d.tag===6?(n(p,d.sibling),d=l(d,f),d.return=p,p=d):(n(p,d),d=is(f,p.mode,y),d.return=p,p=d),i(p)):n(p,d)}return R}var yn=nc(!0),rc=nc(!1),il=Pt(null),al=null,ln=null,To=null;function Po(){To=ln=al=null}function Io(e){var t=il.current;V(il),e._currentValue=t}function Ws(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function fn(e,t){al=e,To=ln=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ne=!0),e.firstContext=null)}function Me(e){var t=e._currentValue;if(To!==e)if(e={context:e,memoizedValue:t,next:null},ln===null){if(al===null)throw Error(j(308));ln=e,al.dependencies={lanes:0,firstContext:e}}else ln=ln.next=e;return t}var Ot=null;function Ro(e){Ot===null?Ot=[e]:Ot.push(e)}function lc(e,t,n,r){var l=t.interleaved;return l===null?(n.next=n,Ro(t)):(n.next=l.next,l.next=n),t.interleaved=n,at(e,r)}function at(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var pt=!1;function Lo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function sc(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 lt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function kt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,M&2){var l=r.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,at(e,n)}return l=r.interleaved,l===null?(t.next=t,Ro(r)):(t.next=l.next,l.next=t),r.interleaved=t,at(e,n)}function Wr(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,xo(e,n)}}function oa(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var l=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?l=s=i:s=s.next=i,n=n.next}while(n!==null);s===null?l=s=t:s=s.next=t}else l=s=t;n={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:s,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function ul(e,t,n,r){var l=e.updateQueue;pt=!1;var s=l.firstBaseUpdate,i=l.lastBaseUpdate,a=l.shared.pending;if(a!==null){l.shared.pending=null;var u=a,c=u.next;u.next=null,i===null?s=c:i.next=c,i=u;var m=e.alternate;m!==null&&(m=m.updateQueue,a=m.lastBaseUpdate,a!==i&&(a===null?m.firstBaseUpdate=c:a.next=c,m.lastBaseUpdate=u))}if(s!==null){var g=l.baseState;i=0,m=c=u=null,a=s;do{var h=a.lane,x=a.eventTime;if((r&h)===h){m!==null&&(m=m.next={eventTime:x,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var v=e,w=a;switch(h=t,x=n,w.tag){case 1:if(v=w.payload,typeof v=="function"){g=v.call(x,g,h);break e}g=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=w.payload,h=typeof v=="function"?v.call(x,g,h):v,h==null)break e;g=X({},g,h);break e;case 2:pt=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,h=l.effects,h===null?l.effects=[a]:h.push(a))}else x={eventTime:x,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},m===null?(c=m=x,u=g):m=m.next=x,i|=h;if(a=a.next,a===null){if(a=l.shared.pending,a===null)break;h=a,a=h.next,h.next=null,l.lastBaseUpdate=h,l.shared.pending=null}}while(!0);if(m===null&&(u=g),l.baseState=u,l.firstBaseUpdate=c,l.lastBaseUpdate=m,t=l.shared.interleaved,t!==null){l=t;do i|=l.lane,l=l.next;while(l!==t)}else s===null&&(l.shared.lanes=0);$t|=i,e.lanes=i,e.memoizedState=g}}function ia(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],l=r.callback;if(l!==null){if(r.callback=null,r=n,typeof l!="function")throw Error(j(191,l));l.call(r)}}}var yr={},Ze=Pt(yr),or=Pt(yr),ir=Pt(yr);function Dt(e){if(e===yr)throw Error(j(174));return e}function Ao(e,t){switch(B(ir,t),B(or,e),B(Ze,yr),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ss(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ss(t,e)}V(Ze),B(Ze,t)}function xn(){V(Ze),V(or),V(ir)}function oc(e){Dt(ir.current);var t=Dt(Ze.current),n=Ss(t,e.type);t!==n&&(B(or,e),B(Ze,n))}function Oo(e){or.current===e&&(V(Ze),V(or))}var Q=Pt(0);function cl(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ts=[];function Do(){for(var e=0;e<ts.length;e++)ts[e]._workInProgressVersionPrimary=null;ts.length=0}var $r=ct.ReactCurrentDispatcher,ns=ct.ReactCurrentBatchConfig,Wt=0,Y=null,le=null,oe=null,dl=!1,Vn=!1,ar=0,lp=0;function pe(){throw Error(j(321))}function zo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Ke(e[n],t[n]))return!1;return!0}function Mo(e,t,n,r,l,s){if(Wt=s,Y=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,$r.current=e===null||e.memoizedState===null?ap:up,e=n(r,l),Vn){s=0;do{if(Vn=!1,ar=0,25<=s)throw Error(j(301));s+=1,oe=le=null,t.updateQueue=null,$r.current=cp,e=n(r,l)}while(Vn)}if($r.current=fl,t=le!==null&&le.next!==null,Wt=0,oe=le=Y=null,dl=!1,t)throw Error(j(300));return e}function Fo(){var e=ar!==0;return ar=0,e}function Ye(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return oe===null?Y.memoizedState=oe=e:oe=oe.next=e,oe}function Fe(){if(le===null){var e=Y.alternate;e=e!==null?e.memoizedState:null}else e=le.next;var t=oe===null?Y.memoizedState:oe.next;if(t!==null)oe=t,le=e;else{if(e===null)throw Error(j(310));le=e,e={memoizedState:le.memoizedState,baseState:le.baseState,baseQueue:le.baseQueue,queue:le.queue,next:null},oe===null?Y.memoizedState=oe=e:oe=oe.next=e}return oe}function ur(e,t){return typeof t=="function"?t(e):t}function rs(e){var t=Fe(),n=t.queue;if(n===null)throw Error(j(311));n.lastRenderedReducer=e;var r=le,l=r.baseQueue,s=n.pending;if(s!==null){if(l!==null){var i=l.next;l.next=s.next,s.next=i}r.baseQueue=l=s,n.pending=null}if(l!==null){s=l.next,r=r.baseState;var a=i=null,u=null,c=s;do{var m=c.lane;if((Wt&m)===m)u!==null&&(u=u.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var g={lane:m,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};u===null?(a=u=g,i=r):u=u.next=g,Y.lanes|=m,$t|=m}c=c.next}while(c!==null&&c!==s);u===null?i=r:u.next=a,Ke(r,t.memoizedState)||(Ne=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=u,n.lastRenderedState=r}if(e=n.interleaved,e!==null){l=e;do s=l.lane,Y.lanes|=s,$t|=s,l=l.next;while(l!==e)}else l===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function ls(e){var t=Fe(),n=t.queue;if(n===null)throw Error(j(311));n.lastRenderedReducer=e;var r=n.dispatch,l=n.pending,s=t.memoizedState;if(l!==null){n.pending=null;var i=l=l.next;do s=e(s,i.action),i=i.next;while(i!==l);Ke(s,t.memoizedState)||(Ne=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function ic(){}function ac(e,t){var n=Y,r=Fe(),l=t(),s=!Ke(r.memoizedState,l);if(s&&(r.memoizedState=l,Ne=!0),r=r.queue,Uo(dc.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||oe!==null&&oe.memoizedState.tag&1){if(n.flags|=2048,cr(9,cc.bind(null,n,r,l,t),void 0,null),ie===null)throw Error(j(349));Wt&30||uc(n,t,l)}return l}function uc(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Y.updateQueue,t===null?(t={lastEffect:null,stores:null},Y.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function cc(e,t,n,r){t.value=n,t.getSnapshot=r,fc(t)&&pc(e)}function dc(e,t,n){return n(function(){fc(t)&&pc(e)})}function fc(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Ke(e,n)}catch{return!0}}function pc(e){var t=at(e,1);t!==null&&Ve(t,e,1,-1)}function aa(e){var t=Ye();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ur,lastRenderedState:e},t.queue=e,e=e.dispatch=ip.bind(null,Y,e),[t.memoizedState,e]}function cr(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Y.updateQueue,t===null?(t={lastEffect:null,stores:null},Y.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function mc(){return Fe().memoizedState}function Br(e,t,n,r){var l=Ye();Y.flags|=e,l.memoizedState=cr(1|t,n,void 0,r===void 0?null:r)}function bl(e,t,n,r){var l=Fe();r=r===void 0?null:r;var s=void 0;if(le!==null){var i=le.memoizedState;if(s=i.destroy,r!==null&&zo(r,i.deps)){l.memoizedState=cr(t,n,s,r);return}}Y.flags|=e,l.memoizedState=cr(1|t,n,s,r)}function ua(e,t){return Br(8390656,8,e,t)}function Uo(e,t){return bl(2048,8,e,t)}function hc(e,t){return bl(4,2,e,t)}function gc(e,t){return bl(4,4,e,t)}function yc(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 xc(e,t,n){return n=n!=null?n.concat([e]):null,bl(4,4,yc.bind(null,t,e),n)}function Wo(){}function vc(e,t){var n=Fe();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&zo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function wc(e,t){var n=Fe();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&zo(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Sc(e,t,n){return Wt&21?(Ke(n,t)||(n=bu(),Y.lanes|=n,$t|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ne=!0),e.memoizedState=n)}function sp(e,t){var n=U;U=n!==0&&4>n?n:4,e(!0);var r=ns.transition;ns.transition={};try{e(!1),t()}finally{U=n,ns.transition=r}}function kc(){return Fe().memoizedState}function op(e,t,n){var r=Nt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},jc(e))Nc(t,n);else if(n=lc(e,t,n,r),n!==null){var l=xe();Ve(n,e,r,l),Cc(n,t,r)}}function ip(e,t,n){var r=Nt(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(jc(e))Nc(t,l);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var i=t.lastRenderedState,a=s(i,n);if(l.hasEagerState=!0,l.eagerState=a,Ke(a,i)){var u=t.interleaved;u===null?(l.next=l,Ro(t)):(l.next=u.next,u.next=l),t.interleaved=l;return}}catch{}finally{}n=lc(e,t,l,r),n!==null&&(l=xe(),Ve(n,e,r,l),Cc(n,t,r))}}function jc(e){var t=e.alternate;return e===Y||t!==null&&t===Y}function Nc(e,t){Vn=dl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Cc(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,xo(e,n)}}var fl={readContext:Me,useCallback:pe,useContext:pe,useEffect:pe,useImperativeHandle:pe,useInsertionEffect:pe,useLayoutEffect:pe,useMemo:pe,useReducer:pe,useRef:pe,useState:pe,useDebugValue:pe,useDeferredValue:pe,useTransition:pe,useMutableSource:pe,useSyncExternalStore:pe,useId:pe,unstable_isNewReconciler:!1},ap={readContext:Me,useCallback:function(e,t){return Ye().memoizedState=[e,t===void 0?null:t],e},useContext:Me,useEffect:ua,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Br(4194308,4,yc.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Br(4194308,4,e,t)},useInsertionEffect:function(e,t){return Br(4,2,e,t)},useMemo:function(e,t){var n=Ye();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ye();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=op.bind(null,Y,e),[r.memoizedState,e]},useRef:function(e){var t=Ye();return e={current:e},t.memoizedState=e},useState:aa,useDebugValue:Wo,useDeferredValue:function(e){return Ye().memoizedState=e},useTransition:function(){var e=aa(!1),t=e[0];return e=sp.bind(null,e[1]),Ye().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Y,l=Ye();if(K){if(n===void 0)throw Error(j(407));n=n()}else{if(n=t(),ie===null)throw Error(j(349));Wt&30||uc(r,t,n)}l.memoizedState=n;var s={value:n,getSnapshot:t};return l.queue=s,ua(dc.bind(null,r,s,e),[e]),r.flags|=2048,cr(9,cc.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=Ye(),t=ie.identifierPrefix;if(K){var n=rt,r=nt;n=(r&~(1<<32-He(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ar++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=lp++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},up={readContext:Me,useCallback:vc,useContext:Me,useEffect:Uo,useImperativeHandle:xc,useInsertionEffect:hc,useLayoutEffect:gc,useMemo:wc,useReducer:rs,useRef:mc,useState:function(){return rs(ur)},useDebugValue:Wo,useDeferredValue:function(e){var t=Fe();return Sc(t,le.memoizedState,e)},useTransition:function(){var e=rs(ur)[0],t=Fe().memoizedState;return[e,t]},useMutableSource:ic,useSyncExternalStore:ac,useId:kc,unstable_isNewReconciler:!1},cp={readContext:Me,useCallback:vc,useContext:Me,useEffect:Uo,useImperativeHandle:xc,useInsertionEffect:hc,useLayoutEffect:gc,useMemo:wc,useReducer:ls,useRef:mc,useState:function(){return ls(ur)},useDebugValue:Wo,useDeferredValue:function(e){var t=Fe();return le===null?t.memoizedState=e:Sc(t,le.memoizedState,e)},useTransition:function(){var e=ls(ur)[0],t=Fe().memoizedState;return[e,t]},useMutableSource:ic,useSyncExternalStore:ac,useId:kc,unstable_isNewReconciler:!1};function We(e,t){if(e&&e.defaultProps){t=X({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function $s(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:X({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var El={isMounted:function(e){return(e=e._reactInternals)?Vt(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=xe(),l=Nt(e),s=lt(r,l);s.payload=t,n!=null&&(s.callback=n),t=kt(e,s,l),t!==null&&(Ve(t,e,l,r),Wr(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=xe(),l=Nt(e),s=lt(r,l);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=kt(e,s,l),t!==null&&(Ve(t,e,l,r),Wr(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=xe(),r=Nt(e),l=lt(n,r);l.tag=2,t!=null&&(l.callback=t),t=kt(e,l,r),t!==null&&(Ve(t,e,r,n),Wr(t,e,r))}};function ca(e,t,n,r,l,s,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,i):t.prototype&&t.prototype.isPureReactComponent?!nr(n,r)||!nr(l,s):!0}function bc(e,t,n){var r=!1,l=Et,s=t.contextType;return typeof s=="object"&&s!==null?s=Me(s):(l=be(t)?Ft:ge.current,r=t.contextTypes,s=(r=r!=null)?hn(e,l):Et),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=El,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=l,e.__reactInternalMemoizedMaskedChildContext=s),t}function da(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&El.enqueueReplaceState(t,t.state,null)}function Bs(e,t,n,r){var l=e.stateNode;l.props=n,l.state=e.memoizedState,l.refs={},Lo(e);var s=t.contextType;typeof s=="object"&&s!==null?l.context=Me(s):(s=be(t)?Ft:ge.current,l.context=hn(e,s)),l.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&($s(e,t,s,n),l.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof l.getSnapshotBeforeUpdate=="function"||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(t=l.state,typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount(),t!==l.state&&El.enqueueReplaceState(l,l.state,null),ul(e,n,l,r),l.state=e.memoizedState),typeof l.componentDidMount=="function"&&(e.flags|=4194308)}function vn(e,t){try{var n="",r=t;do n+=zd(r),r=r.return;while(r);var l=n}catch(s){l=`
|
|
39
|
+
Error generating stack: `+s.message+`
|
|
40
|
+
`+s.stack}return{value:e,source:t,stack:l,digest:null}}function ss(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Hs(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var dp=typeof WeakMap=="function"?WeakMap:Map;function Ec(e,t,n){n=lt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){ml||(ml=!0,eo=r),Hs(e,t)},n}function _c(e,t,n){n=lt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var l=t.value;n.payload=function(){return r(l)},n.callback=function(){Hs(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Hs(e,t),typeof r!="function"&&(jt===null?jt=new Set([this]):jt.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function fa(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new dp;var l=new Set;r.set(t,l)}else l=r.get(t),l===void 0&&(l=new Set,r.set(t,l));l.has(n)||(l.add(n),e=Cp.bind(null,e,t,n),t.then(e,e))}function pa(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 ma(e,t,n,r,l){return e.mode&1?(e.flags|=65536,e.lanes=l,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=lt(-1,1),t.tag=2,kt(n,t,1))),n.lanes|=1),e)}var fp=ct.ReactCurrentOwner,Ne=!1;function ye(e,t,n,r){t.child=e===null?rc(t,null,n,r):yn(t,e.child,n,r)}function ha(e,t,n,r,l){n=n.render;var s=t.ref;return fn(t,l),r=Mo(e,t,n,r,s,l),n=Fo(),e!==null&&!Ne?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,ut(e,t,l)):(K&&n&&bo(t),t.flags|=1,ye(e,t,r,l),t.child)}function ga(e,t,n,r,l){if(e===null){var s=n.type;return typeof s=="function"&&!Yo(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,Tc(e,t,s,r,l)):(e=Gr(n.type,null,r,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&l)){var i=s.memoizedProps;if(n=n.compare,n=n!==null?n:nr,n(i,r)&&e.ref===t.ref)return ut(e,t,l)}return t.flags|=1,e=Ct(s,r),e.ref=t.ref,e.return=t,t.child=e}function Tc(e,t,n,r,l){if(e!==null){var s=e.memoizedProps;if(nr(s,r)&&e.ref===t.ref)if(Ne=!1,t.pendingProps=r=s,(e.lanes&l)!==0)e.flags&131072&&(Ne=!0);else return t.lanes=e.lanes,ut(e,t,l)}return Vs(e,t,n,r,l)}function Pc(e,t,n){var r=t.pendingProps,l=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},B(on,_e),_e|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,B(on,_e),_e|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,B(on,_e),_e|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,B(on,_e),_e|=r;return ye(e,t,l,n),t.child}function Ic(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Vs(e,t,n,r,l){var s=be(n)?Ft:ge.current;return s=hn(t,s),fn(t,l),n=Mo(e,t,n,r,s,l),r=Fo(),e!==null&&!Ne?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,ut(e,t,l)):(K&&r&&bo(t),t.flags|=1,ye(e,t,n,l),t.child)}function ya(e,t,n,r,l){if(be(n)){var s=!0;ll(t)}else s=!1;if(fn(t,l),t.stateNode===null)Hr(e,t),bc(t,n,r),Bs(t,n,r,l),r=!0;else if(e===null){var i=t.stateNode,a=t.memoizedProps;i.props=a;var u=i.context,c=n.contextType;typeof c=="object"&&c!==null?c=Me(c):(c=be(n)?Ft:ge.current,c=hn(t,c));var m=n.getDerivedStateFromProps,g=typeof m=="function"||typeof i.getSnapshotBeforeUpdate=="function";g||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==r||u!==c)&&da(t,i,r,c),pt=!1;var h=t.memoizedState;i.state=h,ul(t,r,i,l),u=t.memoizedState,a!==r||h!==u||Ce.current||pt?(typeof m=="function"&&($s(t,n,m,r),u=t.memoizedState),(a=pt||ca(t,n,a,r,h,u,c))?(g||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),i.props=r,i.state=u,i.context=c,r=a):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,sc(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:We(t.type,a),i.props=c,g=t.pendingProps,h=i.context,u=n.contextType,typeof u=="object"&&u!==null?u=Me(u):(u=be(n)?Ft:ge.current,u=hn(t,u));var x=n.getDerivedStateFromProps;(m=typeof x=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==g||h!==u)&&da(t,i,r,u),pt=!1,h=t.memoizedState,i.state=h,ul(t,r,i,l);var v=t.memoizedState;a!==g||h!==v||Ce.current||pt?(typeof x=="function"&&($s(t,n,x,r),v=t.memoizedState),(c=pt||ca(t,n,c,r,h,v,u)||!1)?(m||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,v,u),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,v,u)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=v),i.props=r,i.state=v,i.context=u,r=c):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Ks(e,t,n,r,s,l)}function Ks(e,t,n,r,l,s){Ic(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return l&&na(t,n,!1),ut(e,t,s);r=t.stateNode,fp.current=t;var a=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=yn(t,e.child,null,s),t.child=yn(t,null,a,s)):ye(e,t,a,s),t.memoizedState=r.state,l&&na(t,n,!0),t.child}function Rc(e){var t=e.stateNode;t.pendingContext?ta(e,t.pendingContext,t.pendingContext!==t.context):t.context&&ta(e,t.context,!1),Ao(e,t.containerInfo)}function xa(e,t,n,r,l){return gn(),_o(l),t.flags|=256,ye(e,t,n,r),t.child}var Gs={dehydrated:null,treeContext:null,retryLane:0};function Qs(e){return{baseLanes:e,cachePool:null,transitions:null}}function Lc(e,t,n){var r=t.pendingProps,l=Q.current,s=!1,i=(t.flags&128)!==0,a;if((a=i)||(a=e!==null&&e.memoizedState===null?!1:(l&2)!==0),a?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(l|=1),B(Q,l&1),e===null)return Us(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):(i=r.children,e=r.fallback,s?(r=t.mode,s=t.child,i={mode:"hidden",children:i},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=i):s=Pl(i,r,0,null),e=Mt(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Qs(n),t.memoizedState=Gs,e):$o(t,i));if(l=e.memoizedState,l!==null&&(a=l.dehydrated,a!==null))return pp(e,t,i,r,a,l,n);if(s){s=r.fallback,i=t.mode,l=e.child,a=l.sibling;var u={mode:"hidden",children:r.children};return!(i&1)&&t.child!==l?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=Ct(l,u),r.subtreeFlags=l.subtreeFlags&14680064),a!==null?s=Ct(a,s):(s=Mt(s,i,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,i=e.child.memoizedState,i=i===null?Qs(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},s.memoizedState=i,s.childLanes=e.childLanes&~n,t.memoizedState=Gs,r}return s=e.child,e=s.sibling,r=Ct(s,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function $o(e,t){return t=Pl({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Ir(e,t,n,r){return r!==null&&_o(r),yn(t,e.child,null,n),e=$o(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function pp(e,t,n,r,l,s,i){if(n)return t.flags&256?(t.flags&=-257,r=ss(Error(j(422))),Ir(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,l=t.mode,r=Pl({mode:"visible",children:r.children},l,0,null),s=Mt(s,l,i,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&yn(t,e.child,null,i),t.child.memoizedState=Qs(i),t.memoizedState=Gs,s);if(!(t.mode&1))return Ir(e,t,i,null);if(l.data==="$!"){if(r=l.nextSibling&&l.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(j(419)),r=ss(s,r,void 0),Ir(e,t,i,r)}if(a=(i&e.childLanes)!==0,Ne||a){if(r=ie,r!==null){switch(i&-i){case 4:l=2;break;case 16:l=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:l=32;break;case 536870912:l=268435456;break;default:l=0}l=l&(r.suspendedLanes|i)?0:l,l!==0&&l!==s.retryLane&&(s.retryLane=l,at(e,l),Ve(r,e,l,-1))}return Qo(),r=ss(Error(j(421))),Ir(e,t,i,r)}return l.data==="$?"?(t.flags|=128,t.child=e.child,t=bp.bind(null,e),l._reactRetry=t,null):(e=s.treeContext,Te=St(l.nextSibling),Pe=t,K=!0,Be=null,e!==null&&(Ae[Oe++]=nt,Ae[Oe++]=rt,Ae[Oe++]=Ut,nt=e.id,rt=e.overflow,Ut=t),t=$o(t,r.children),t.flags|=4096,t)}function va(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ws(e.return,t,n)}function os(e,t,n,r,l){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:l}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=l)}function Ac(e,t,n){var r=t.pendingProps,l=r.revealOrder,s=r.tail;if(ye(e,t,r.children,n),r=Q.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&va(e,n,t);else if(e.tag===19)va(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(B(Q,r),!(t.mode&1))t.memoizedState=null;else switch(l){case"forwards":for(n=t.child,l=null;n!==null;)e=n.alternate,e!==null&&cl(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),os(t,!1,l,n,s);break;case"backwards":for(n=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&cl(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}os(t,!0,n,null,s);break;case"together":os(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Hr(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function ut(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),$t|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(j(153));if(t.child!==null){for(e=t.child,n=Ct(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Ct(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function mp(e,t,n){switch(t.tag){case 3:Rc(t),gn();break;case 5:oc(t);break;case 1:be(t.type)&&ll(t);break;case 4:Ao(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,l=t.memoizedProps.value;B(il,r._currentValue),r._currentValue=l;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(B(Q,Q.current&1),t.flags|=128,null):n&t.child.childLanes?Lc(e,t,n):(B(Q,Q.current&1),e=ut(e,t,n),e!==null?e.sibling:null);B(Q,Q.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Ac(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),B(Q,Q.current),r)break;return null;case 22:case 23:return t.lanes=0,Pc(e,t,n)}return ut(e,t,n)}var Oc,Ys,Dc,zc;Oc=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Ys=function(){};Dc=function(e,t,n,r){var l=e.memoizedProps;if(l!==r){e=t.stateNode,Dt(Ze.current);var s=null;switch(n){case"input":l=ys(e,l),r=ys(e,r),s=[];break;case"select":l=X({},l,{value:void 0}),r=X({},r,{value:void 0}),s=[];break;case"textarea":l=ws(e,l),r=ws(e,r),s=[];break;default:typeof l.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=nl)}ks(n,r);var i;n=null;for(c in l)if(!r.hasOwnProperty(c)&&l.hasOwnProperty(c)&&l[c]!=null)if(c==="style"){var a=l[c];for(i in a)a.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Yn.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in r){var u=r[c];if(a=l!=null?l[c]:void 0,r.hasOwnProperty(c)&&u!==a&&(u!=null||a!=null))if(c==="style")if(a){for(i in a)!a.hasOwnProperty(i)||u&&u.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in u)u.hasOwnProperty(i)&&a[i]!==u[i]&&(n||(n={}),n[i]=u[i])}else n||(s||(s=[]),s.push(c,n)),n=u;else c==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,a=a?a.__html:void 0,u!=null&&a!==u&&(s=s||[]).push(c,u)):c==="children"?typeof u!="string"&&typeof u!="number"||(s=s||[]).push(c,""+u):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Yn.hasOwnProperty(c)?(u!=null&&c==="onScroll"&&H("scroll",e),s||a===u||(s=[])):(s=s||[]).push(c,u))}n&&(s=s||[]).push("style",n);var c=s;(t.updateQueue=c)&&(t.flags|=4)}};zc=function(e,t,n,r){n!==r&&(t.flags|=4)};function Rn(e,t){if(!K)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function me(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags&14680064,r|=l.flags&14680064,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags,r|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function hp(e,t,n){var r=t.pendingProps;switch(Eo(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 be(t.type)&&rl(),me(t),null;case 3:return r=t.stateNode,xn(),V(Ce),V(ge),Do(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Tr(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Be!==null&&(ro(Be),Be=null))),Ys(e,t),me(t),null;case 5:Oo(t);var l=Dt(ir.current);if(n=t.type,e!==null&&t.stateNode!=null)Dc(e,t,n,r,l),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(j(166));return me(t),null}if(e=Dt(Ze.current),Tr(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[Xe]=t,r[sr]=s,e=(t.mode&1)!==0,n){case"dialog":H("cancel",r),H("close",r);break;case"iframe":case"object":case"embed":H("load",r);break;case"video":case"audio":for(l=0;l<Fn.length;l++)H(Fn[l],r);break;case"source":H("error",r);break;case"img":case"image":case"link":H("error",r),H("load",r);break;case"details":H("toggle",r);break;case"input":_i(r,s),H("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},H("invalid",r);break;case"textarea":Pi(r,s),H("invalid",r)}ks(n,s),l=null;for(var i in s)if(s.hasOwnProperty(i)){var a=s[i];i==="children"?typeof a=="string"?r.textContent!==a&&(s.suppressHydrationWarning!==!0&&_r(r.textContent,a,e),l=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&_r(r.textContent,a,e),l=["children",""+a]):Yn.hasOwnProperty(i)&&a!=null&&i==="onScroll"&&H("scroll",r)}switch(n){case"input":wr(r),Ti(r,s,!0);break;case"textarea":wr(r),Ii(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=nl)}r=l,t.updateQueue=r,r!==null&&(t.flags|=4)}else{i=l.nodeType===9?l:l.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=du(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[Xe]=t,e[sr]=r,Oc(e,t,!1,!1),t.stateNode=e;e:{switch(i=js(n,r),n){case"dialog":H("cancel",e),H("close",e),l=r;break;case"iframe":case"object":case"embed":H("load",e),l=r;break;case"video":case"audio":for(l=0;l<Fn.length;l++)H(Fn[l],e);l=r;break;case"source":H("error",e),l=r;break;case"img":case"image":case"link":H("error",e),H("load",e),l=r;break;case"details":H("toggle",e),l=r;break;case"input":_i(e,r),l=ys(e,r),H("invalid",e);break;case"option":l=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},l=X({},r,{value:void 0}),H("invalid",e);break;case"textarea":Pi(e,r),l=ws(e,r),H("invalid",e);break;default:l=r}ks(n,l),a=l;for(s in a)if(a.hasOwnProperty(s)){var u=a[s];s==="style"?mu(e,u):s==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&fu(e,u)):s==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&Xn(e,u):typeof u=="number"&&Xn(e,""+u):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Yn.hasOwnProperty(s)?u!=null&&s==="onScroll"&&H("scroll",e):u!=null&&fo(e,s,u,i))}switch(n){case"input":wr(e),Ti(e,r,!1);break;case"textarea":wr(e),Ii(e);break;case"option":r.value!=null&&e.setAttribute("value",""+bt(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?an(e,!!r.multiple,s,!1):r.defaultValue!=null&&an(e,!!r.multiple,r.defaultValue,!0);break;default:typeof l.onClick=="function"&&(e.onclick=nl)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return me(t),null;case 6:if(e&&t.stateNode!=null)zc(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(j(166));if(n=Dt(ir.current),Dt(Ze.current),Tr(t)){if(r=t.stateNode,n=t.memoizedProps,r[Xe]=t,(s=r.nodeValue!==n)&&(e=Pe,e!==null))switch(e.tag){case 3:_r(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&_r(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Xe]=t,t.stateNode=r}return me(t),null;case 13:if(V(Q),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(K&&Te!==null&&t.mode&1&&!(t.flags&128))tc(),gn(),t.flags|=98560,s=!1;else if(s=Tr(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(j(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(j(317));s[Xe]=t}else gn(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;me(t),s=!1}else Be!==null&&(ro(Be),Be=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Q.current&1?se===0&&(se=3):Qo())),t.updateQueue!==null&&(t.flags|=4),me(t),null);case 4:return xn(),Ys(e,t),e===null&&rr(t.stateNode.containerInfo),me(t),null;case 10:return Io(t.type._context),me(t),null;case 17:return be(t.type)&&rl(),me(t),null;case 19:if(V(Q),s=t.memoizedState,s===null)return me(t),null;if(r=(t.flags&128)!==0,i=s.rendering,i===null)if(r)Rn(s,!1);else{if(se!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=cl(e),i!==null){for(t.flags|=128,Rn(s,!1),r=i.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,i=s.alternate,i===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=i.childLanes,s.lanes=i.lanes,s.child=i.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=i.memoizedProps,s.memoizedState=i.memoizedState,s.updateQueue=i.updateQueue,s.type=i.type,e=i.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return B(Q,Q.current&1|2),t.child}e=e.sibling}s.tail!==null&&ee()>wn&&(t.flags|=128,r=!0,Rn(s,!1),t.lanes=4194304)}else{if(!r)if(e=cl(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Rn(s,!0),s.tail===null&&s.tailMode==="hidden"&&!i.alternate&&!K)return me(t),null}else 2*ee()-s.renderingStartTime>wn&&n!==1073741824&&(t.flags|=128,r=!0,Rn(s,!1),t.lanes=4194304);s.isBackwards?(i.sibling=t.child,t.child=i):(n=s.last,n!==null?n.sibling=i:t.child=i,s.last=i)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=ee(),t.sibling=null,n=Q.current,B(Q,r?n&1|2:n&1),t):(me(t),null);case 22:case 23:return Go(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?_e&1073741824&&(me(t),t.subtreeFlags&6&&(t.flags|=8192)):me(t),null;case 24:return null;case 25:return null}throw Error(j(156,t.tag))}function gp(e,t){switch(Eo(t),t.tag){case 1:return be(t.type)&&rl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return xn(),V(Ce),V(ge),Do(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Oo(t),null;case 13:if(V(Q),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(j(340));gn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return V(Q),null;case 4:return xn(),null;case 10:return Io(t.type._context),null;case 22:case 23:return Go(),null;case 24:return null;default:return null}}var Rr=!1,he=!1,yp=typeof WeakSet=="function"?WeakSet:Set,_=null;function sn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){J(e,t,r)}else n.current=null}function Xs(e,t,n){try{n()}catch(r){J(e,t,r)}}var wa=!1;function xp(e,t){if(Ls=qr,e=$u(),Co(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var i=0,a=-1,u=-1,c=0,m=0,g=e,h=null;t:for(;;){for(var x;g!==n||l!==0&&g.nodeType!==3||(a=i+l),g!==s||r!==0&&g.nodeType!==3||(u=i+r),g.nodeType===3&&(i+=g.nodeValue.length),(x=g.firstChild)!==null;)h=g,g=x;for(;;){if(g===e)break t;if(h===n&&++c===l&&(a=i),h===s&&++m===r&&(u=i),(x=g.nextSibling)!==null)break;g=h,h=g.parentNode}g=x}n=a===-1||u===-1?null:{start:a,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(As={focusedElem:e,selectionRange:n},qr=!1,_=t;_!==null;)if(t=_,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,_=e;else for(;_!==null;){t=_;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,R=v.memoizedState,p=t.stateNode,d=p.getSnapshotBeforeUpdate(t.elementType===t.type?w:We(t.type,w),R);p.__reactInternalSnapshotBeforeUpdate=d}break;case 3:var f=t.stateNode.containerInfo;f.nodeType===1?f.textContent="":f.nodeType===9&&f.documentElement&&f.removeChild(f.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(j(163))}}catch(y){J(t,t.return,y)}if(e=t.sibling,e!==null){e.return=t.return,_=e;break}_=t.return}return v=wa,wa=!1,v}function Kn(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var s=l.destroy;l.destroy=void 0,s!==void 0&&Xs(t,n,s)}l=l.next}while(l!==r)}}function _l(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Js(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Mc(e){var t=e.alternate;t!==null&&(e.alternate=null,Mc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Xe],delete t[sr],delete t[zs],delete t[ep],delete t[tp])),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 Fc(e){return e.tag===5||e.tag===3||e.tag===4}function Sa(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Fc(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 Zs(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=nl));else if(r!==4&&(e=e.child,e!==null))for(Zs(e,t,n),e=e.sibling;e!==null;)Zs(e,t,n),e=e.sibling}function qs(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(qs(e,t,n),e=e.sibling;e!==null;)qs(e,t,n),e=e.sibling}var ue=null,$e=!1;function dt(e,t,n){for(n=n.child;n!==null;)Uc(e,t,n),n=n.sibling}function Uc(e,t,n){if(Je&&typeof Je.onCommitFiberUnmount=="function")try{Je.onCommitFiberUnmount(wl,n)}catch{}switch(n.tag){case 5:he||sn(n,t);case 6:var r=ue,l=$e;ue=null,dt(e,t,n),ue=r,$e=l,ue!==null&&($e?(e=ue,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ue.removeChild(n.stateNode));break;case 18:ue!==null&&($e?(e=ue,n=n.stateNode,e.nodeType===8?ql(e.parentNode,n):e.nodeType===1&&ql(e,n),er(e)):ql(ue,n.stateNode));break;case 4:r=ue,l=$e,ue=n.stateNode.containerInfo,$e=!0,dt(e,t,n),ue=r,$e=l;break;case 0:case 11:case 14:case 15:if(!he&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var s=l,i=s.destroy;s=s.tag,i!==void 0&&(s&2||s&4)&&Xs(n,t,i),l=l.next}while(l!==r)}dt(e,t,n);break;case 1:if(!he&&(sn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){J(n,t,a)}dt(e,t,n);break;case 21:dt(e,t,n);break;case 22:n.mode&1?(he=(r=he)||n.memoizedState!==null,dt(e,t,n),he=r):dt(e,t,n);break;default:dt(e,t,n)}}function ka(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new yp),t.forEach(function(r){var l=Ep.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function Ue(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var l=n[r];try{var s=e,i=t,a=i;e:for(;a!==null;){switch(a.tag){case 5:ue=a.stateNode,$e=!1;break e;case 3:ue=a.stateNode.containerInfo,$e=!0;break e;case 4:ue=a.stateNode.containerInfo,$e=!0;break e}a=a.return}if(ue===null)throw Error(j(160));Uc(s,i,l),ue=null,$e=!1;var u=l.alternate;u!==null&&(u.return=null),l.return=null}catch(c){J(l,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Wc(t,e),t=t.sibling}function Wc(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ue(t,e),Qe(e),r&4){try{Kn(3,e,e.return),_l(3,e)}catch(w){J(e,e.return,w)}try{Kn(5,e,e.return)}catch(w){J(e,e.return,w)}}break;case 1:Ue(t,e),Qe(e),r&512&&n!==null&&sn(n,n.return);break;case 5:if(Ue(t,e),Qe(e),r&512&&n!==null&&sn(n,n.return),e.flags&32){var l=e.stateNode;try{Xn(l,"")}catch(w){J(e,e.return,w)}}if(r&4&&(l=e.stateNode,l!=null)){var s=e.memoizedProps,i=n!==null?n.memoizedProps:s,a=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&uu(l,s),js(a,i);var c=js(a,s);for(i=0;i<u.length;i+=2){var m=u[i],g=u[i+1];m==="style"?mu(l,g):m==="dangerouslySetInnerHTML"?fu(l,g):m==="children"?Xn(l,g):fo(l,m,g,c)}switch(a){case"input":xs(l,s);break;case"textarea":cu(l,s);break;case"select":var h=l._wrapperState.wasMultiple;l._wrapperState.wasMultiple=!!s.multiple;var x=s.value;x!=null?an(l,!!s.multiple,x,!1):h!==!!s.multiple&&(s.defaultValue!=null?an(l,!!s.multiple,s.defaultValue,!0):an(l,!!s.multiple,s.multiple?[]:"",!1))}l[sr]=s}catch(w){J(e,e.return,w)}}break;case 6:if(Ue(t,e),Qe(e),r&4){if(e.stateNode===null)throw Error(j(162));l=e.stateNode,s=e.memoizedProps;try{l.nodeValue=s}catch(w){J(e,e.return,w)}}break;case 3:if(Ue(t,e),Qe(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{er(t.containerInfo)}catch(w){J(e,e.return,w)}break;case 4:Ue(t,e),Qe(e);break;case 13:Ue(t,e),Qe(e),l=e.child,l.flags&8192&&(s=l.memoizedState!==null,l.stateNode.isHidden=s,!s||l.alternate!==null&&l.alternate.memoizedState!==null||(Vo=ee())),r&4&&ka(e);break;case 22:if(m=n!==null&&n.memoizedState!==null,e.mode&1?(he=(c=he)||m,Ue(t,e),he=c):Ue(t,e),Qe(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!m&&e.mode&1)for(_=e,m=e.child;m!==null;){for(g=_=m;_!==null;){switch(h=_,x=h.child,h.tag){case 0:case 11:case 14:case 15:Kn(4,h,h.return);break;case 1:sn(h,h.return);var v=h.stateNode;if(typeof v.componentWillUnmount=="function"){r=h,n=h.return;try{t=r,v.props=t.memoizedProps,v.state=t.memoizedState,v.componentWillUnmount()}catch(w){J(r,n,w)}}break;case 5:sn(h,h.return);break;case 22:if(h.memoizedState!==null){Na(g);continue}}x!==null?(x.return=h,_=x):Na(g)}m=m.sibling}e:for(m=null,g=e;;){if(g.tag===5){if(m===null){m=g;try{l=g.stateNode,c?(s=l.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=g.stateNode,u=g.memoizedProps.style,i=u!=null&&u.hasOwnProperty("display")?u.display:null,a.style.display=pu("display",i))}catch(w){J(e,e.return,w)}}}else if(g.tag===6){if(m===null)try{g.stateNode.nodeValue=c?"":g.memoizedProps}catch(w){J(e,e.return,w)}}else if((g.tag!==22&&g.tag!==23||g.memoizedState===null||g===e)&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===e)break e;for(;g.sibling===null;){if(g.return===null||g.return===e)break e;m===g&&(m=null),g=g.return}m===g&&(m=null),g.sibling.return=g.return,g=g.sibling}}break;case 19:Ue(t,e),Qe(e),r&4&&ka(e);break;case 21:break;default:Ue(t,e),Qe(e)}}function Qe(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Fc(n)){var r=n;break e}n=n.return}throw Error(j(160))}switch(r.tag){case 5:var l=r.stateNode;r.flags&32&&(Xn(l,""),r.flags&=-33);var s=Sa(e);qs(e,s,l);break;case 3:case 4:var i=r.stateNode.containerInfo,a=Sa(e);Zs(e,a,i);break;default:throw Error(j(161))}}catch(u){J(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function vp(e,t,n){_=e,$c(e)}function $c(e,t,n){for(var r=(e.mode&1)!==0;_!==null;){var l=_,s=l.child;if(l.tag===22&&r){var i=l.memoizedState!==null||Rr;if(!i){var a=l.alternate,u=a!==null&&a.memoizedState!==null||he;a=Rr;var c=he;if(Rr=i,(he=u)&&!c)for(_=l;_!==null;)i=_,u=i.child,i.tag===22&&i.memoizedState!==null?Ca(l):u!==null?(u.return=i,_=u):Ca(l);for(;s!==null;)_=s,$c(s),s=s.sibling;_=l,Rr=a,he=c}ja(e)}else l.subtreeFlags&8772&&s!==null?(s.return=l,_=s):ja(e)}}function ja(e){for(;_!==null;){var t=_;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:he||_l(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!he)if(n===null)r.componentDidMount();else{var l=t.elementType===t.type?n.memoizedProps:We(t.type,n.memoizedProps);r.componentDidUpdate(l,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&ia(t,s,r);break;case 3:var i=t.updateQueue;if(i!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}ia(t,i,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var m=c.memoizedState;if(m!==null){var g=m.dehydrated;g!==null&&er(g)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(j(163))}he||t.flags&512&&Js(t)}catch(h){J(t,t.return,h)}}if(t===e){_=null;break}if(n=t.sibling,n!==null){n.return=t.return,_=n;break}_=t.return}}function Na(e){for(;_!==null;){var t=_;if(t===e){_=null;break}var n=t.sibling;if(n!==null){n.return=t.return,_=n;break}_=t.return}}function Ca(e){for(;_!==null;){var t=_;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{_l(4,t)}catch(u){J(t,n,u)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var l=t.return;try{r.componentDidMount()}catch(u){J(t,l,u)}}var s=t.return;try{Js(t)}catch(u){J(t,s,u)}break;case 5:var i=t.return;try{Js(t)}catch(u){J(t,i,u)}}}catch(u){J(t,t.return,u)}if(t===e){_=null;break}var a=t.sibling;if(a!==null){a.return=t.return,_=a;break}_=t.return}}var wp=Math.ceil,pl=ct.ReactCurrentDispatcher,Bo=ct.ReactCurrentOwner,ze=ct.ReactCurrentBatchConfig,M=0,ie=null,ne=null,de=0,_e=0,on=Pt(0),se=0,dr=null,$t=0,Tl=0,Ho=0,Gn=null,je=null,Vo=0,wn=1/0,et=null,ml=!1,eo=null,jt=null,Lr=!1,yt=null,hl=0,Qn=0,to=null,Vr=-1,Kr=0;function xe(){return M&6?ee():Vr!==-1?Vr:Vr=ee()}function Nt(e){return e.mode&1?M&2&&de!==0?de&-de:rp.transition!==null?(Kr===0&&(Kr=bu()),Kr):(e=U,e!==0||(e=window.event,e=e===void 0?16:Lu(e.type)),e):1}function Ve(e,t,n,r){if(50<Qn)throw Qn=0,to=null,Error(j(185));mr(e,n,r),(!(M&2)||e!==ie)&&(e===ie&&(!(M&2)&&(Tl|=n),se===4&&ht(e,de)),Ee(e,r),n===1&&M===0&&!(t.mode&1)&&(wn=ee()+500,Cl&&It()))}function Ee(e,t){var n=e.callbackNode;nf(e,t);var r=Zr(e,e===ie?de:0);if(r===0)n!==null&&Ai(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Ai(n),t===1)e.tag===0?np(ba.bind(null,e)):Zu(ba.bind(null,e)),Zf(function(){!(M&6)&&It()}),n=null;else{switch(Eu(r)){case 1:n=yo;break;case 4:n=Nu;break;case 16:n=Jr;break;case 536870912:n=Cu;break;default:n=Jr}n=Xc(n,Bc.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Bc(e,t){if(Vr=-1,Kr=0,M&6)throw Error(j(327));var n=e.callbackNode;if(pn()&&e.callbackNode!==n)return null;var r=Zr(e,e===ie?de:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=gl(e,r);else{t=r;var l=M;M|=2;var s=Vc();(ie!==e||de!==t)&&(et=null,wn=ee()+500,zt(e,t));do try{jp();break}catch(a){Hc(e,a)}while(!0);Po(),pl.current=s,M=l,ne!==null?t=0:(ie=null,de=0,t=se)}if(t!==0){if(t===2&&(l=_s(e),l!==0&&(r=l,t=no(e,l))),t===1)throw n=dr,zt(e,0),ht(e,r),Ee(e,ee()),n;if(t===6)ht(e,r);else{if(l=e.current.alternate,!(r&30)&&!Sp(l)&&(t=gl(e,r),t===2&&(s=_s(e),s!==0&&(r=s,t=no(e,s))),t===1))throw n=dr,zt(e,0),ht(e,r),Ee(e,ee()),n;switch(e.finishedWork=l,e.finishedLanes=r,t){case 0:case 1:throw Error(j(345));case 2:Lt(e,je,et);break;case 3:if(ht(e,r),(r&130023424)===r&&(t=Vo+500-ee(),10<t)){if(Zr(e,0)!==0)break;if(l=e.suspendedLanes,(l&r)!==r){xe(),e.pingedLanes|=e.suspendedLanes&l;break}e.timeoutHandle=Ds(Lt.bind(null,e,je,et),t);break}Lt(e,je,et);break;case 4:if(ht(e,r),(r&4194240)===r)break;for(t=e.eventTimes,l=-1;0<r;){var i=31-He(r);s=1<<i,i=t[i],i>l&&(l=i),r&=~s}if(r=l,r=ee()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*wp(r/1960))-r,10<r){e.timeoutHandle=Ds(Lt.bind(null,e,je,et),r);break}Lt(e,je,et);break;case 5:Lt(e,je,et);break;default:throw Error(j(329))}}}return Ee(e,ee()),e.callbackNode===n?Bc.bind(null,e):null}function no(e,t){var n=Gn;return e.current.memoizedState.isDehydrated&&(zt(e,t).flags|=256),e=gl(e,t),e!==2&&(t=je,je=n,t!==null&&ro(t)),e}function ro(e){je===null?je=e:je.push.apply(je,e)}function Sp(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var l=n[r],s=l.getSnapshot;l=l.value;try{if(!Ke(s(),l))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ht(e,t){for(t&=~Ho,t&=~Tl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-He(t),r=1<<n;e[n]=-1,t&=~r}}function ba(e){if(M&6)throw Error(j(327));pn();var t=Zr(e,0);if(!(t&1))return Ee(e,ee()),null;var n=gl(e,t);if(e.tag!==0&&n===2){var r=_s(e);r!==0&&(t=r,n=no(e,r))}if(n===1)throw n=dr,zt(e,0),ht(e,t),Ee(e,ee()),n;if(n===6)throw Error(j(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Lt(e,je,et),Ee(e,ee()),null}function Ko(e,t){var n=M;M|=1;try{return e(t)}finally{M=n,M===0&&(wn=ee()+500,Cl&&It())}}function Bt(e){yt!==null&&yt.tag===0&&!(M&6)&&pn();var t=M;M|=1;var n=ze.transition,r=U;try{if(ze.transition=null,U=1,e)return e()}finally{U=r,ze.transition=n,M=t,!(M&6)&&It()}}function Go(){_e=on.current,V(on)}function zt(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Jf(n)),ne!==null)for(n=ne.return;n!==null;){var r=n;switch(Eo(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&rl();break;case 3:xn(),V(Ce),V(ge),Do();break;case 5:Oo(r);break;case 4:xn();break;case 13:V(Q);break;case 19:V(Q);break;case 10:Io(r.type._context);break;case 22:case 23:Go()}n=n.return}if(ie=e,ne=e=Ct(e.current,null),de=_e=t,se=0,dr=null,Ho=Tl=$t=0,je=Gn=null,Ot!==null){for(t=0;t<Ot.length;t++)if(n=Ot[t],r=n.interleaved,r!==null){n.interleaved=null;var l=r.next,s=n.pending;if(s!==null){var i=s.next;s.next=l,r.next=i}n.pending=r}Ot=null}return e}function Hc(e,t){do{var n=ne;try{if(Po(),$r.current=fl,dl){for(var r=Y.memoizedState;r!==null;){var l=r.queue;l!==null&&(l.pending=null),r=r.next}dl=!1}if(Wt=0,oe=le=Y=null,Vn=!1,ar=0,Bo.current=null,n===null||n.return===null){se=1,dr=t,ne=null;break}e:{var s=e,i=n.return,a=n,u=t;if(t=de,a.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var c=u,m=a,g=m.tag;if(!(m.mode&1)&&(g===0||g===11||g===15)){var h=m.alternate;h?(m.updateQueue=h.updateQueue,m.memoizedState=h.memoizedState,m.lanes=h.lanes):(m.updateQueue=null,m.memoizedState=null)}var x=pa(i);if(x!==null){x.flags&=-257,ma(x,i,a,s,t),x.mode&1&&fa(s,c,t),t=x,u=c;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)){fa(s,c,t),Qo();break e}u=Error(j(426))}}else if(K&&a.mode&1){var R=pa(i);if(R!==null){!(R.flags&65536)&&(R.flags|=256),ma(R,i,a,s,t),_o(vn(u,a));break e}}s=u=vn(u,a),se!==4&&(se=2),Gn===null?Gn=[s]:Gn.push(s),s=i;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var p=Ec(s,u,t);oa(s,p);break e;case 1:a=u;var d=s.type,f=s.stateNode;if(!(s.flags&128)&&(typeof d.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(jt===null||!jt.has(f)))){s.flags|=65536,t&=-t,s.lanes|=t;var y=_c(s,a,t);oa(s,y);break e}}s=s.return}while(s!==null)}Gc(n)}catch(k){t=k,ne===n&&n!==null&&(ne=n=n.return);continue}break}while(!0)}function Vc(){var e=pl.current;return pl.current=fl,e===null?fl:e}function Qo(){(se===0||se===3||se===2)&&(se=4),ie===null||!($t&268435455)&&!(Tl&268435455)||ht(ie,de)}function gl(e,t){var n=M;M|=2;var r=Vc();(ie!==e||de!==t)&&(et=null,zt(e,t));do try{kp();break}catch(l){Hc(e,l)}while(!0);if(Po(),M=n,pl.current=r,ne!==null)throw Error(j(261));return ie=null,de=0,se}function kp(){for(;ne!==null;)Kc(ne)}function jp(){for(;ne!==null&&!Gd();)Kc(ne)}function Kc(e){var t=Yc(e.alternate,e,_e);e.memoizedProps=e.pendingProps,t===null?Gc(e):ne=t,Bo.current=null}function Gc(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=gp(n,t),n!==null){n.flags&=32767,ne=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{se=6,ne=null;return}}else if(n=hp(n,t,_e),n!==null){ne=n;return}if(t=t.sibling,t!==null){ne=t;return}ne=t=e}while(t!==null);se===0&&(se=5)}function Lt(e,t,n){var r=U,l=ze.transition;try{ze.transition=null,U=1,Np(e,t,n,r)}finally{ze.transition=l,U=r}return null}function Np(e,t,n,r){do pn();while(yt!==null);if(M&6)throw Error(j(327));n=e.finishedWork;var l=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(j(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(rf(e,s),e===ie&&(ne=ie=null,de=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Lr||(Lr=!0,Xc(Jr,function(){return pn(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=ze.transition,ze.transition=null;var i=U;U=1;var a=M;M|=4,Bo.current=null,xp(e,n),Wc(n,e),Hf(As),qr=!!Ls,As=Ls=null,e.current=n,vp(n),Qd(),M=a,U=i,ze.transition=s}else e.current=n;if(Lr&&(Lr=!1,yt=e,hl=l),s=e.pendingLanes,s===0&&(jt=null),Jd(n.stateNode),Ee(e,ee()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)l=t[n],r(l.value,{componentStack:l.stack,digest:l.digest});if(ml)throw ml=!1,e=eo,eo=null,e;return hl&1&&e.tag!==0&&pn(),s=e.pendingLanes,s&1?e===to?Qn++:(Qn=0,to=e):Qn=0,It(),null}function pn(){if(yt!==null){var e=Eu(hl),t=ze.transition,n=U;try{if(ze.transition=null,U=16>e?16:e,yt===null)var r=!1;else{if(e=yt,yt=null,hl=0,M&6)throw Error(j(331));var l=M;for(M|=4,_=e.current;_!==null;){var s=_,i=s.child;if(_.flags&16){var a=s.deletions;if(a!==null){for(var u=0;u<a.length;u++){var c=a[u];for(_=c;_!==null;){var m=_;switch(m.tag){case 0:case 11:case 15:Kn(8,m,s)}var g=m.child;if(g!==null)g.return=m,_=g;else for(;_!==null;){m=_;var h=m.sibling,x=m.return;if(Mc(m),m===c){_=null;break}if(h!==null){h.return=x,_=h;break}_=x}}}var v=s.alternate;if(v!==null){var w=v.child;if(w!==null){v.child=null;do{var R=w.sibling;w.sibling=null,w=R}while(w!==null)}}_=s}}if(s.subtreeFlags&2064&&i!==null)i.return=s,_=i;else e:for(;_!==null;){if(s=_,s.flags&2048)switch(s.tag){case 0:case 11:case 15:Kn(9,s,s.return)}var p=s.sibling;if(p!==null){p.return=s.return,_=p;break e}_=s.return}}var d=e.current;for(_=d;_!==null;){i=_;var f=i.child;if(i.subtreeFlags&2064&&f!==null)f.return=i,_=f;else e:for(i=d;_!==null;){if(a=_,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:_l(9,a)}}catch(k){J(a,a.return,k)}if(a===i){_=null;break e}var y=a.sibling;if(y!==null){y.return=a.return,_=y;break e}_=a.return}}if(M=l,It(),Je&&typeof Je.onPostCommitFiberRoot=="function")try{Je.onPostCommitFiberRoot(wl,e)}catch{}r=!0}return r}finally{U=n,ze.transition=t}}return!1}function Ea(e,t,n){t=vn(n,t),t=Ec(e,t,1),e=kt(e,t,1),t=xe(),e!==null&&(mr(e,1,t),Ee(e,t))}function J(e,t,n){if(e.tag===3)Ea(e,e,n);else for(;t!==null;){if(t.tag===3){Ea(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(jt===null||!jt.has(r))){e=vn(n,e),e=_c(t,e,1),t=kt(t,e,1),e=xe(),t!==null&&(mr(t,1,e),Ee(t,e));break}}t=t.return}}function Cp(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=xe(),e.pingedLanes|=e.suspendedLanes&n,ie===e&&(de&n)===n&&(se===4||se===3&&(de&130023424)===de&&500>ee()-Vo?zt(e,0):Ho|=n),Ee(e,t)}function Qc(e,t){t===0&&(e.mode&1?(t=jr,jr<<=1,!(jr&130023424)&&(jr=4194304)):t=1);var n=xe();e=at(e,t),e!==null&&(mr(e,t,n),Ee(e,n))}function bp(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Qc(e,n)}function Ep(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(j(314))}r!==null&&r.delete(t),Qc(e,n)}var Yc;Yc=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ce.current)Ne=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ne=!1,mp(e,t,n);Ne=!!(e.flags&131072)}else Ne=!1,K&&t.flags&1048576&&qu(t,ol,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Hr(e,t),e=t.pendingProps;var l=hn(t,ge.current);fn(t,n),l=Mo(null,t,r,e,l,n);var s=Fo();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,be(r)?(s=!0,ll(t)):s=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Lo(t),l.updater=El,t.stateNode=l,l._reactInternals=t,Bs(t,r,e,n),t=Ks(null,t,r,!0,s,n)):(t.tag=0,K&&s&&bo(t),ye(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Hr(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=Tp(r),e=We(r,e),l){case 0:t=Vs(null,t,r,e,n);break e;case 1:t=ya(null,t,r,e,n);break e;case 11:t=ha(null,t,r,e,n);break e;case 14:t=ga(null,t,r,We(r.type,e),n);break e}throw Error(j(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:We(r,l),Vs(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:We(r,l),ya(e,t,r,l,n);case 3:e:{if(Rc(t),e===null)throw Error(j(387));r=t.pendingProps,s=t.memoizedState,l=s.element,sc(e,t),ul(t,r,null,n);var i=t.memoizedState;if(r=i.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){l=vn(Error(j(423)),t),t=xa(e,t,r,n,l);break e}else if(r!==l){l=vn(Error(j(424)),t),t=xa(e,t,r,n,l);break e}else for(Te=St(t.stateNode.containerInfo.firstChild),Pe=t,K=!0,Be=null,n=rc(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(gn(),r===l){t=ut(e,t,n);break e}ye(e,t,r,n)}t=t.child}return t;case 5:return oc(t),e===null&&Us(t),r=t.type,l=t.pendingProps,s=e!==null?e.memoizedProps:null,i=l.children,Os(r,l)?i=null:s!==null&&Os(r,s)&&(t.flags|=32),Ic(e,t),ye(e,t,i,n),t.child;case 6:return e===null&&Us(t),null;case 13:return Lc(e,t,n);case 4:return Ao(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=yn(t,null,r,n):ye(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:We(r,l),ha(e,t,r,l,n);case 7:return ye(e,t,t.pendingProps,n),t.child;case 8:return ye(e,t,t.pendingProps.children,n),t.child;case 12:return ye(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,s=t.memoizedProps,i=l.value,B(il,r._currentValue),r._currentValue=i,s!==null)if(Ke(s.value,i)){if(s.children===l.children&&!Ce.current){t=ut(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var a=s.dependencies;if(a!==null){i=s.child;for(var u=a.firstContext;u!==null;){if(u.context===r){if(s.tag===1){u=lt(-1,n&-n),u.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var m=c.pending;m===null?u.next=u:(u.next=m.next,m.next=u),c.pending=u}}s.lanes|=n,u=s.alternate,u!==null&&(u.lanes|=n),Ws(s.return,n,t),a.lanes|=n;break}u=u.next}}else if(s.tag===10)i=s.type===t.type?null:s.child;else if(s.tag===18){if(i=s.return,i===null)throw Error(j(341));i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),Ws(i,n,t),i=s.sibling}else i=s.child;if(i!==null)i.return=s;else for(i=s;i!==null;){if(i===t){i=null;break}if(s=i.sibling,s!==null){s.return=i.return,i=s;break}i=i.return}s=i}ye(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,fn(t,n),l=Me(l),r=r(l),t.flags|=1,ye(e,t,r,n),t.child;case 14:return r=t.type,l=We(r,t.pendingProps),l=We(r.type,l),ga(e,t,r,l,n);case 15:return Tc(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:We(r,l),Hr(e,t),t.tag=1,be(r)?(e=!0,ll(t)):e=!1,fn(t,n),bc(t,r,l),Bs(t,r,l,n),Ks(null,t,r,!0,e,n);case 19:return Ac(e,t,n);case 22:return Pc(e,t,n)}throw Error(j(156,t.tag))};function Xc(e,t){return ju(e,t)}function _p(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function De(e,t,n,r){return new _p(e,t,n,r)}function Yo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Tp(e){if(typeof e=="function")return Yo(e)?1:0;if(e!=null){if(e=e.$$typeof,e===mo)return 11;if(e===ho)return 14}return 2}function Ct(e,t){var n=e.alternate;return n===null?(n=De(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Gr(e,t,n,r,l,s){var i=2;if(r=e,typeof e=="function")Yo(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Xt:return Mt(n.children,l,s,t);case po:i=8,l|=8;break;case ps:return e=De(12,n,t,l|2),e.elementType=ps,e.lanes=s,e;case ms:return e=De(13,n,t,l),e.elementType=ms,e.lanes=s,e;case hs:return e=De(19,n,t,l),e.elementType=hs,e.lanes=s,e;case ou:return Pl(n,l,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case lu:i=10;break e;case su:i=9;break e;case mo:i=11;break e;case ho:i=14;break e;case ft:i=16,r=null;break e}throw Error(j(130,e==null?e:typeof e,""))}return t=De(i,n,t,l),t.elementType=e,t.type=r,t.lanes=s,t}function Mt(e,t,n,r){return e=De(7,e,r,t),e.lanes=n,e}function Pl(e,t,n,r){return e=De(22,e,r,t),e.elementType=ou,e.lanes=n,e.stateNode={isHidden:!1},e}function is(e,t,n){return e=De(6,e,null,t),e.lanes=n,e}function as(e,t,n){return t=De(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Pp(e,t,n,r,l){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=$l(0),this.expirationTimes=$l(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=$l(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Xo(e,t,n,r,l,s,i,a,u){return e=new Pp(e,t,n,a,u),t===1?(t=1,s===!0&&(t|=8)):t=0,s=De(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Lo(s),e}function Ip(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Yt,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Jc(e){if(!e)return Et;e=e._reactInternals;e:{if(Vt(e)!==e||e.tag!==1)throw Error(j(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(be(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(j(171))}if(e.tag===1){var n=e.type;if(be(n))return Ju(e,n,t)}return t}function Zc(e,t,n,r,l,s,i,a,u){return e=Xo(n,r,!0,e,l,s,i,a,u),e.context=Jc(null),n=e.current,r=xe(),l=Nt(n),s=lt(r,l),s.callback=t??null,kt(n,s,l),e.current.lanes=l,mr(e,l,r),Ee(e,r),e}function Il(e,t,n,r){var l=t.current,s=xe(),i=Nt(l);return n=Jc(n),t.context===null?t.context=n:t.pendingContext=n,t=lt(s,i),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=kt(l,t,i),e!==null&&(Ve(e,l,i,s),Wr(e,l,i)),i}function yl(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 _a(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Jo(e,t){_a(e,t),(e=e.alternate)&&_a(e,t)}function Rp(){return null}var qc=typeof reportError=="function"?reportError:function(e){console.error(e)};function Zo(e){this._internalRoot=e}Rl.prototype.render=Zo.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(j(409));Il(e,t,null,null)};Rl.prototype.unmount=Zo.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Bt(function(){Il(null,e,null,null)}),t[it]=null}};function Rl(e){this._internalRoot=e}Rl.prototype.unstable_scheduleHydration=function(e){if(e){var t=Pu();e={blockedOn:null,target:e,priority:t};for(var n=0;n<mt.length&&t!==0&&t<mt[n].priority;n++);mt.splice(n,0,e),n===0&&Ru(e)}};function qo(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ll(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Ta(){}function Lp(e,t,n,r,l){if(l){if(typeof r=="function"){var s=r;r=function(){var c=yl(i);s.call(c)}}var i=Zc(t,r,e,0,null,!1,!1,"",Ta);return e._reactRootContainer=i,e[it]=i.current,rr(e.nodeType===8?e.parentNode:e),Bt(),i}for(;l=e.lastChild;)e.removeChild(l);if(typeof r=="function"){var a=r;r=function(){var c=yl(u);a.call(c)}}var u=Xo(e,0,!1,null,null,!1,!1,"",Ta);return e._reactRootContainer=u,e[it]=u.current,rr(e.nodeType===8?e.parentNode:e),Bt(function(){Il(t,u,n,r)}),u}function Al(e,t,n,r,l){var s=n._reactRootContainer;if(s){var i=s;if(typeof l=="function"){var a=l;l=function(){var u=yl(i);a.call(u)}}Il(t,i,e,l)}else i=Lp(n,t,e,l,r);return yl(i)}_u=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Mn(t.pendingLanes);n!==0&&(xo(t,n|1),Ee(t,ee()),!(M&6)&&(wn=ee()+500,It()))}break;case 13:Bt(function(){var r=at(e,1);if(r!==null){var l=xe();Ve(r,e,1,l)}}),Jo(e,1)}};vo=function(e){if(e.tag===13){var t=at(e,134217728);if(t!==null){var n=xe();Ve(t,e,134217728,n)}Jo(e,134217728)}};Tu=function(e){if(e.tag===13){var t=Nt(e),n=at(e,t);if(n!==null){var r=xe();Ve(n,e,t,r)}Jo(e,t)}};Pu=function(){return U};Iu=function(e,t){var n=U;try{return U=e,t()}finally{U=n}};Cs=function(e,t,n){switch(t){case"input":if(xs(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var l=Nl(r);if(!l)throw Error(j(90));au(r),xs(r,l)}}}break;case"textarea":cu(e,n);break;case"select":t=n.value,t!=null&&an(e,!!n.multiple,t,!1)}};yu=Ko;xu=Bt;var Ap={usingClientEntryPoint:!1,Events:[gr,en,Nl,hu,gu,Ko]},Ln={findFiberByHostInstance:At,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Op={bundleType:Ln.bundleType,version:Ln.version,rendererPackageName:Ln.rendererPackageName,rendererConfig:Ln.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ct.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Su(e),e===null?null:e.stateNode},findFiberByHostInstance:Ln.findFiberByHostInstance||Rp,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 Ar=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ar.isDisabled&&Ar.supportsFiber)try{wl=Ar.inject(Op),Je=Ar}catch{}}Re.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ap;Re.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!qo(t))throw Error(j(200));return Ip(e,t,null,n)};Re.createRoot=function(e,t){if(!qo(e))throw Error(j(299));var n=!1,r="",l=qc;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(l=t.onRecoverableError)),t=Xo(e,1,!1,null,null,n,!1,r,l),e[it]=t.current,rr(e.nodeType===8?e.parentNode:e),new Zo(t)};Re.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(j(188)):(e=Object.keys(e).join(","),Error(j(268,e)));return e=Su(t),e=e===null?null:e.stateNode,e};Re.flushSync=function(e){return Bt(e)};Re.hydrate=function(e,t,n){if(!Ll(t))throw Error(j(200));return Al(null,e,t,!0,n)};Re.hydrateRoot=function(e,t,n){if(!qo(e))throw Error(j(405));var r=n!=null&&n.hydratedSources||null,l=!1,s="",i=qc;if(n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),t=Zc(t,null,e,1,n??null,l,!1,s,i),e[it]=t.current,rr(e),r)for(e=0;e<r.length;e++)n=r[e],l=n._getVersion,l=l(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,l]:t.mutableSourceEagerHydrationData.push(n,l);return new Rl(t)};Re.render=function(e,t,n){if(!Ll(t))throw Error(j(200));return Al(null,e,t,!1,n)};Re.unmountComponentAtNode=function(e){if(!Ll(e))throw Error(j(40));return e._reactRootContainer?(Bt(function(){Al(null,null,e,!1,function(){e._reactRootContainer=null,e[it]=null})}),!0):!1};Re.unstable_batchedUpdates=Ko;Re.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Ll(n))throw Error(j(200));if(e==null||e._reactInternals===void 0)throw Error(j(38));return Al(e,t,n,!1,r)};Re.version="18.3.1-next-f1338f8080-20240426";function ed(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(ed)}catch(e){console.error(e)}}ed(),eu.exports=Re;var Dp=eu.exports,Pa=Dp;ds.createRoot=Pa.createRoot,ds.hydrateRoot=Pa.hydrateRoot;function Ia({text:e}){const[t,n]=S.useState(!1);function r(){navigator.clipboard.writeText(e).then(()=>{n(!0),setTimeout(()=>n(!1),2e3)})}return o.jsx("button",{onClick:r,className:"text-xs text-gray-500 hover:text-gray-300 transition-colors px-2 py-0.5 rounded border border-gray-700 hover:border-gray-500",children:t?"โ Copied":"Copy"})}function zp({onReady:e}){const[t,n]=S.useState("checking"),[r,l]=S.useState(null),[s,i]=S.useState(""),[a,u]=S.useState(""),c=S.useRef(null);S.useEffect(()=>{m()},[]),S.useEffect(()=>{c.current&&(c.current.scrollTop=c.current.scrollHeight)},[s]);async function m(){n("checking");try{const x=await(await fetch("/api/preflight")).json();x.installed?(l(x.version),n("ok"),setTimeout(e,1200)):n("missing")}catch{n("missing")}}async function g(){n("installing"),i(""),u("");try{const x=(await fetch("/api/preflight/install",{method:"POST"})).body.getReader(),v=new TextDecoder;let w="";for(;;){const{done:R,value:p}=await x.read();if(R)break;w+=v.decode(p,{stream:!0});const d=w.split(`
|
|
41
|
+
`);w=d.pop();for(const f of d)if(f.startsWith("data:"))try{const{type:y,data:k}=JSON.parse(f.slice(5).trim());y==="log"&&i(b=>b+k),y==="done"&&(l(k),n("ok"),setTimeout(e,1500)),y==="error"&&(u(k),n("error"))}catch{}}}catch(h){u(h.message),n("error")}}return t==="checking"?o.jsxs("div",{className:"flex flex-col items-center justify-center h-screen gap-4",children:[o.jsx("div",{className:"text-4xl",children:"๐ฆ"}),o.jsx("p",{className:"text-gray-400 text-sm animate-pulse",children:"Checking your setup..."})]}):t==="ok"?o.jsxs("div",{className:"flex flex-col items-center justify-center h-screen gap-4",children:[o.jsx("div",{className:"text-4xl",children:"๐ฆ"}),o.jsxs("div",{className:"flex items-center gap-2 text-green-400",children:[o.jsx("span",{className:"text-xl",children:"โ"}),o.jsx("span",{className:"font-semibold",children:"OpenClaw is ready"})]}),r&&o.jsx("p",{className:"text-xs text-gray-600",children:r}),o.jsx("p",{className:"text-sm text-gray-500",children:"Starting the builder..."})]}):t==="installing"?o.jsxs("div",{className:"flex flex-col items-center justify-center h-screen px-6",children:[o.jsx("div",{className:"text-4xl mb-4",children:"๐ฆ"}),o.jsx("h2",{className:"text-lg font-bold text-white mb-1",children:"Installing OpenClaw..."}),o.jsx("p",{className:"text-sm text-gray-500 mb-4",children:"This usually takes under a minute."}),o.jsx("div",{ref:c,className:"w-full max-w-lg h-48 bg-gray-900 border border-gray-700 rounded-xl p-4 font-mono text-xs text-green-400 overflow-y-auto scrollbar-thin",children:s||"Starting..."})]}):t==="error"?o.jsxs("div",{className:"flex flex-col items-center justify-center h-screen px-6",children:[o.jsx("div",{className:"text-4xl mb-4",children:"๐ฆ"}),o.jsx("h2",{className:"text-lg font-bold text-white mb-2",children:"Installation ran into a problem"}),o.jsx("p",{className:"text-sm text-gray-400 mb-4",children:"Try running this in your terminal instead:"}),o.jsxs("div",{className:"w-full max-w-lg bg-gray-900 border border-gray-700 rounded-xl p-4 flex items-center justify-between mb-4",children:[o.jsx("code",{className:"text-sm text-claw-400",children:"npm install -g openclaw"}),o.jsx(Ia,{text:"npm install -g openclaw"})]}),a&&o.jsx("p",{className:"text-xs text-red-400 mb-4 max-w-lg text-center",children:a}),o.jsx("button",{onClick:m,className:"px-5 py-2 bg-claw-600 hover:bg-claw-500 text-white rounded-xl text-sm font-semibold transition-colors",children:"Check again โ"})]}):o.jsxs("div",{className:"flex flex-col items-center justify-center h-screen px-6",children:[o.jsx("div",{className:"text-5xl mb-5",children:"๐ฆ"}),o.jsx("h2",{className:"text-2xl font-bold text-white mb-2",children:"Welcome to OpenClaw Agent Builder"}),o.jsx("p",{className:"text-gray-400 text-sm text-center max-w-md mb-8",children:"This tool requires OpenClaw to be installed on your computer. It's free and takes about a minute to set up."}),o.jsxs("div",{className:"w-full max-w-md space-y-4",children:[o.jsxs("div",{className:"bg-gray-800 border border-gray-700 rounded-xl p-5",children:[o.jsx("p",{className:"text-sm font-semibold text-white mb-1",children:"Install automatically"}),o.jsx("p",{className:"text-xs text-gray-500 mb-4",children:"We'll run the installer for you. Requires Node.js 18+ to be installed."}),o.jsx("button",{onClick:g,className:"w-full px-5 py-2.5 bg-claw-600 hover:bg-claw-500 text-white rounded-xl text-sm font-semibold transition-colors",children:"Install OpenClaw โ"})]}),o.jsxs("div",{className:"bg-gray-800 border border-gray-700 rounded-xl p-5",children:[o.jsx("p",{className:"text-sm font-semibold text-white mb-1",children:"Install manually"}),o.jsx("p",{className:"text-xs text-gray-500 mb-3",children:'Run this in your terminal, then come back and click "Check again."'}),o.jsxs("div",{className:"flex items-center justify-between bg-gray-900 rounded-lg px-3 py-2 mb-3",children:[o.jsx("code",{className:"text-sm text-claw-400",children:"npm install -g openclaw"}),o.jsx(Ia,{text:"npm install -g openclaw"})]}),o.jsx("button",{onClick:m,className:"text-sm text-gray-400 hover:text-white transition-colors underline",children:"I've installed it โ check again"})]}),o.jsxs("p",{className:"text-center text-xs text-gray-600",children:["Already installed?"," ",o.jsx("button",{onClick:e,className:"underline hover:text-gray-400 transition-colors",children:"Skip this check"})]})]})]})}const Mp={},Ra=e=>{let t;const n=new Set,r=(m,g)=>{const h=typeof m=="function"?m(t):m;if(!Object.is(h,t)){const x=t;t=g??(typeof h!="object"||h===null)?h:Object.assign({},t,h),n.forEach(v=>v(t,x))}},l=()=>t,u={setState:r,getState:l,getInitialState:()=>c,subscribe:m=>(n.add(m),()=>n.delete(m)),destroy:()=>{(Mp?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},c=t=e(r,l,u);return u},Fp=e=>e?Ra(e):Ra;var td={exports:{}},nd={},rd={exports:{}},ld={};/**
|
|
42
|
+
* @license React
|
|
43
|
+
* use-sync-external-store-shim.production.js
|
|
44
|
+
*
|
|
45
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
46
|
+
*
|
|
47
|
+
* This source code is licensed under the MIT license found in the
|
|
48
|
+
* LICENSE file in the root directory of this source tree.
|
|
49
|
+
*/var Sn=S;function Up(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Wp=typeof Object.is=="function"?Object.is:Up,$p=Sn.useState,Bp=Sn.useEffect,Hp=Sn.useLayoutEffect,Vp=Sn.useDebugValue;function Kp(e,t){var n=t(),r=$p({inst:{value:n,getSnapshot:t}}),l=r[0].inst,s=r[1];return Hp(function(){l.value=n,l.getSnapshot=t,us(l)&&s({inst:l})},[e,n,t]),Bp(function(){return us(l)&&s({inst:l}),e(function(){us(l)&&s({inst:l})})},[e]),Vp(n),n}function us(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Wp(e,n)}catch{return!0}}function Gp(e,t){return t()}var Qp=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Gp:Kp;ld.useSyncExternalStore=Sn.useSyncExternalStore!==void 0?Sn.useSyncExternalStore:Qp;rd.exports=ld;var Yp=rd.exports;/**
|
|
50
|
+
* @license React
|
|
51
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
52
|
+
*
|
|
53
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
54
|
+
*
|
|
55
|
+
* This source code is licensed under the MIT license found in the
|
|
56
|
+
* LICENSE file in the root directory of this source tree.
|
|
57
|
+
*/var Ol=S,Xp=Yp;function Jp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Zp=typeof Object.is=="function"?Object.is:Jp,qp=Xp.useSyncExternalStore,em=Ol.useRef,tm=Ol.useEffect,nm=Ol.useMemo,rm=Ol.useDebugValue;nd.useSyncExternalStoreWithSelector=function(e,t,n,r,l){var s=em(null);if(s.current===null){var i={hasValue:!1,value:null};s.current=i}else i=s.current;s=nm(function(){function u(x){if(!c){if(c=!0,m=x,x=r(x),l!==void 0&&i.hasValue){var v=i.value;if(l(v,x))return g=v}return g=x}if(v=g,Zp(m,x))return v;var w=r(x);return l!==void 0&&l(v,w)?(m=x,v):(m=x,g=w)}var c=!1,m,g,h=n===void 0?null:n;return[function(){return u(t())},h===null?void 0:function(){return u(h())}]},[t,n,r,l]);var a=qp(e,s[0],s[1]);return tm(function(){i.hasValue=!0,i.value=a},[a]),rm(a),a};td.exports=nd;var lm=td.exports;const sm=Wa(lm),sd={},{useDebugValue:om}=Za,{useSyncExternalStoreWithSelector:im}=sm;let La=!1;const am=e=>e;function um(e,t=am,n){(sd?"production":void 0)!=="production"&&n&&!La&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),La=!0);const r=im(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return om(r),r}const Aa=e=>{(sd?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?Fp(e):e,n=(r,l)=>um(t,r,l);return Object.assign(n,t),n},od=e=>e?Aa(e):Aa,lo=()=>({id:"",name:"",mission:"",inputs:"",outputs:"",failure:"",escalation:"",never:[]}),Oa=()=>({version:"1.0",team:{name:"",mission:""},agents:[lo()],orchestration:{mode:"hub_and_spoke",router_agent:""},handoffs:[],shared_constraints:{never:[]},shared_memory:{mode:"separate",location:""},routing:{defaultAgentId:"",bindings:[]},capabilities:{recommendedSkills:[],webSearch:!1,webFetch:!1,memory:"lancedb",tools:{deny:[]}}}),Ge=od((e,t)=>({phase:0,subStep:0,isTeam:null,isMainAgent:null,defaultWorkspace:"~/.openclaw/workspace",conversationMessages:[],conversationComplete:!1,teamSpec:Oa(),generatedFiles:[],writeResult:null,validationOutput:"",isGenerating:!1,isWriting:!1,isValidating:!1,setPhase:n=>e({phase:n,subStep:0}),setSubStep:n=>e({subStep:n}),setIsTeam:n=>{if(e({isTeam:n}),!n){const{teamSpec:r}=t(),l=r.agents[0]||lo();e(s=>({teamSpec:{...s.teamSpec,orchestration:{mode:"hub_and_spoke",router_agent:l.id},handoffs:[],routing:{defaultAgentId:l.id,bindings:[]},team:{...s.teamSpec.team,name:s.teamSpec.team.name||(l.name?l.name+" Workspace":"")}}}))}},updateTeam:n=>e(r=>({teamSpec:{...r.teamSpec,team:{...r.teamSpec.team,...n}}})),updateOrchestration:n=>e(r=>({teamSpec:{...r.teamSpec,orchestration:{...r.teamSpec.orchestration,...n}}})),updateSharedMemory:n=>e(r=>({teamSpec:{...r.teamSpec,shared_memory:{...r.teamSpec.shared_memory,...n}}})),updateRouting:n=>e(r=>({teamSpec:{...r.teamSpec,routing:{...r.teamSpec.routing,...n}}})),updateSharedConstraints:n=>e(r=>({teamSpec:{...r.teamSpec,shared_constraints:{...r.teamSpec.shared_constraints,...n}}})),addAgent:()=>e(n=>({teamSpec:{...n.teamSpec,agents:[...n.teamSpec.agents,lo()]}})),removeAgent:n=>e(r=>({teamSpec:{...r.teamSpec,agents:r.teamSpec.agents.filter((l,s)=>s!==n)}})),updateAgent:(n,r)=>e(l=>{const s=[...l.teamSpec.agents];s[n]={...s[n],...r};const i=t().isTeam;let a={};return!i&&n===0&&(a={orchestration:{mode:"hub_and_spoke",router_agent:s[0].id},routing:{defaultAgentId:s[0].id,bindings:[]}}),{teamSpec:{...l.teamSpec,agents:s,...a}}}),addHandoff:()=>e(n=>({teamSpec:{...n.teamSpec,handoffs:[...n.teamSpec.handoffs,{from:"",to:"",when:"",payload_contract:""}]}})),removeHandoff:n=>e(r=>({teamSpec:{...r.teamSpec,handoffs:r.teamSpec.handoffs.filter((l,s)=>s!==n)}})),updateHandoff:(n,r)=>e(l=>{const s=[...l.teamSpec.handoffs];return s[n]={...s[n],...r},{teamSpec:{...l.teamSpec,handoffs:s}}}),addBinding:()=>e(n=>({teamSpec:{...n.teamSpec,routing:{...n.teamSpec.routing,bindings:[...n.teamSpec.routing.bindings||[],{agentId:"",match:{channel:""}}]}}})),removeBinding:n=>e(r=>({teamSpec:{...r.teamSpec,routing:{...r.teamSpec.routing,bindings:r.teamSpec.routing.bindings.filter((l,s)=>s!==n)}}})),updateBinding:(n,r)=>e(l=>{const s=[...l.teamSpec.routing.bindings];return s[n]={...s[n],...r},{teamSpec:{...l.teamSpec,routing:{...l.teamSpec.routing,bindings:s}}}}),setIsMainAgent:n=>e({isMainAgent:n}),setDefaultWorkspace:n=>e({defaultWorkspace:n}),setConversationMessages:n=>e({conversationMessages:n}),setConversationComplete:n=>e({conversationComplete:n}),mergeTeamSpec:n=>e(r=>{var i,a;const l=r.teamSpec,s={...l};if(n.version&&(s.version=n.version),n.team&&(s.team={...l.team,...n.team}),n.orchestration&&(s.orchestration={...l.orchestration,...n.orchestration}),n.shared_memory&&(s.shared_memory={...l.shared_memory,...n.shared_memory}),n.routing&&(s.routing={...l.routing,...n.routing}),n.shared_constraints&&(s.shared_constraints={...l.shared_constraints,...n.shared_constraints}),n.handoffs!==void 0&&(s.handoffs=n.handoffs),n.capabilities&&(s.capabilities={...l.capabilities,...n.capabilities,recommendedSkills:n.capabilities.recommendedSkills??((i=l.capabilities)==null?void 0:i.recommendedSkills)??[],tools:{...((a=l.capabilities)==null?void 0:a.tools)||{},...n.capabilities.tools||{}}}),n.agents){const u=new Map(l.agents.filter(m=>m.id).map(m=>[m.id,m]));for(const m of n.agents)m.id&&u.set(m.id,{...u.get(m.id)||{},...m});const c=Array.from(u.values());s.agents=c.length>0?c:l.agents}return{teamSpec:s}}),setGeneratedFiles:n=>e({generatedFiles:n}),setWriteResult:n=>e({writeResult:n}),setValidationOutput:n=>e({validationOutput:n}),setIsGenerating:n=>e({isGenerating:n}),setIsWriting:n=>e({isWriting:n}),setIsValidating:n=>e({isValidating:n}),reset:()=>e({phase:0,subStep:0,isTeam:null,isMainAgent:null,defaultWorkspace:"~/.openclaw/workspace",teamSpec:Oa(),generatedFiles:[],writeResult:null,validationOutput:"",isGenerating:!1,isWriting:!1,isValidating:!1,conversationMessages:[],conversationComplete:!1})})),id="openclaw-ai-config";function cm(){try{const e=localStorage.getItem(id);return e?JSON.parse(e):{}}catch{return{}}}function An(e){try{localStorage.setItem(id,JSON.stringify({provider:e.provider,apiKey:e.apiKey,model:e.model,configured:e.configured,openclawEnv:e.openclawEnv||!1}))}catch{}}const On=cm(),Dl=od((e,t)=>({provider:On.provider||"openclaw",apiKey:On.apiKey||"",model:On.model||"claude-sonnet-4-6",configured:On.configured||!1,openclawEnv:On.openclawEnv||!1,openclawDefault:null,setProvider:n=>{e({provider:n}),An(t())},setApiKey:n=>{e({apiKey:n}),An(t())},setModel:n=>{e({model:n}),An(t())},configure:({provider:n,apiKey:r,model:l,openclawEnv:s})=>{const i={provider:n,apiKey:r||"",model:l,configured:!0,openclawEnv:!!s};e(i),An({...t(),...i})},reset:()=>{const n={provider:"openclaw",apiKey:"",model:"claude-sonnet-4-6",configured:!1,openclawEnv:!1};e(n),An(n)},setOpenclawDefault:n=>e({openclawDefault:n})})),Da={CHAT:0,PLAYGROUND:6},za=["Chat","Review","Generate","Capabilities","Connect","Validate","Playground"];function Cn(){const{phase:e,setPhase:t}=Ge();function n(){t(Math.min(e+1,Da.PLAYGROUND))}function r(){t(Math.max(e-1,Da.CHAT))}return{phase:e,advance:n,goBack:r}}function dm({currentPhase:e}){return o.jsx("div",{className:"flex items-center gap-1",children:za.map((t,n)=>{const r=n<e,l=n===e;return o.jsxs("div",{className:"flex items-center",children:[o.jsxs("div",{className:"flex flex-col items-center",children:[o.jsx("div",{className:`w-7 h-7 rounded-full flex items-center justify-center text-xs font-bold border-2 transition-all ${r?"border-claw-500 bg-claw-600 text-white":l?"border-claw-400 bg-claw-500/20 text-claw-300 ring-2 ring-claw-500/30":"border-gray-600 bg-gray-800 text-gray-500"}`,children:r?"โ":n+1}),o.jsx("span",{className:`text-[10px] leading-tight mt-1 text-center w-16 ${l?"text-claw-300 font-medium":r?"text-claw-500":"text-gray-600"}`,children:t})]}),n<za.length-1&&o.jsx("div",{className:`h-0.5 w-6 mx-1 mb-5 rounded ${r?"bg-claw-600":"bg-gray-700"}`})]},n)})})}const cs={anthropic:{label:"Anthropic Claude",badge:"Recommended",defaultModel:"claude-sonnet-4-6",placeholder:"sk-ant-api03-...",costNote:"Free $5 credit on signup ยท ~100 sessions",steps:[{text:"Create a free account",url:"https://console.anthropic.com",urlLabel:"console.anthropic.com",note:"Includes $5 in free credit โ enough for ~100 builder sessions."},{text:o.jsxs(o.Fragment,{children:["In the left sidebar, click ",o.jsx("strong",{className:"text-gray-200",children:"API Keys"}),"."]})},{text:o.jsxs(o.Fragment,{children:["Click ",o.jsx("strong",{className:"text-gray-200",children:"Create Key"}),", give it any name, and copy it."]})},{text:"Paste it in the field below."}]},openai:{label:"OpenAI GPT",defaultModel:"gpt-4o",placeholder:"sk-proj-...",costNote:"Pay as you go ยท ~$0.05 per session",steps:[{text:"Create an account",url:"https://platform.openai.com/signup",urlLabel:"platform.openai.com",note:"You'll need to add a small credit balance โ $5 is plenty to get started."},{text:o.jsxs(o.Fragment,{children:["Click your profile icon (top-right) โ ",o.jsx("strong",{className:"text-gray-200",children:"API keys"}),"."]})},{text:o.jsxs(o.Fragment,{children:["Click ",o.jsx("strong",{className:"text-gray-200",children:"Create new secret key"})," and copy it."]})},{text:"Paste it in the field below."}]}};function fm({onDone:e}){const{configure:t,setOpenclawDefault:n}=Dl(),[r,l]=S.useState(null),[s,i]=S.useState("anthropic"),[a,u]=S.useState("need"),[c,m]=S.useState(""),[g,h]=S.useState(""),[x,v]=S.useState(!1);S.useEffect(()=>{fetch("/api/chat/openclaw-status").then(f=>f.json()).then(f=>{l(f),n(f),f.available&&(t({provider:"openclaw",apiKey:"",model:f.normalized||f.model||"claude-sonnet-4-6",openclawEnv:!0}),e==null||e())}).catch(()=>l({available:!1}))},[]);function w(f){i(f),m(""),h("")}function R(f){u(f),h("")}async function p(){if(!c.trim()){h("Paste your API key to continue.");return}h(""),v(!0);const f=cs[s].defaultModel;try{const y=await fetch("/api/chat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({messages:[{role:"user",content:'Say "ok" and nothing else.'}],apiKey:c.trim(),model:f,provider:s})}),k=await y.json();if(!y.ok)throw new Error(k.error||"Connection failed");t({provider:s,apiKey:c.trim(),model:f}),e==null||e()}catch(y){const k=y.message||"";k.includes("401")||k.includes("invalid")||k.includes("auth")||k.includes("key")?h("That key didn't work โ make sure you copied it in full."):k.includes("credit")||k.includes("balance")||k.includes("quota")?h("Your account has no remaining credit. Add a balance and try again."):h(`Connection failed: ${k}`)}finally{v(!1)}}if(r===null)return o.jsx("div",{className:"bg-gray-900 border border-gray-700 rounded-xl p-6 text-center",children:o.jsx("p",{className:"text-gray-500 text-sm",children:"Checking your setup..."})});const d=cs[s];return o.jsxs("div",{className:"bg-gray-900 border border-gray-700 rounded-xl p-6 max-w-md",children:[o.jsx("p",{className:"text-sm font-semibold text-white mb-1",children:"Connect an AI model"}),o.jsx("p",{className:"text-xs text-gray-400 mb-5",children:"The builder has a conversation with you to design your agent โ it needs an AI model to do that."}),o.jsx("div",{className:"flex gap-2 mb-5",children:Object.entries(cs).map(([f,y])=>o.jsxs("button",{onClick:()=>w(f),className:`flex-1 flex flex-col items-start px-4 py-3 rounded-xl border text-left transition-colors ${s===f?"border-claw-500 bg-claw-900/30":"border-gray-700 bg-gray-800/60 hover:border-gray-600"}`,children:[o.jsxs("div",{className:"flex items-center gap-2 mb-0.5 flex-wrap",children:[o.jsx("span",{className:`text-sm font-semibold ${s===f?"text-white":"text-gray-300"}`,children:y.label}),y.badge&&o.jsx("span",{className:"text-xs bg-claw-800 text-claw-300 px-1.5 py-0.5 rounded-full leading-none",children:y.badge})]}),o.jsx("span",{className:"text-xs text-gray-500",children:y.costNote})]},f))}),o.jsx("div",{className:"flex gap-1 p-1 bg-gray-800 rounded-lg mb-5",children:[{id:"need",label:"I need to get a key"},{id:"have",label:"I already have one"}].map(f=>o.jsx("button",{onClick:()=>R(f.id),className:`flex-1 px-3 py-1.5 rounded-md text-xs font-medium transition-colors ${a===f.id?"bg-gray-700 text-white shadow-sm":"text-gray-500 hover:text-gray-300"}`,children:f.label},f.id))}),a==="need"&&o.jsx("ol",{className:"space-y-3 mb-5",children:d.steps.map((f,y)=>o.jsxs("li",{className:"flex gap-3",children:[o.jsx("div",{className:"w-5 h-5 rounded-full bg-claw-900 border border-claw-700 flex items-center justify-center text-xs font-bold text-claw-400 shrink-0 mt-0.5",children:y+1}),o.jsxs("div",{className:"text-sm text-gray-300 leading-relaxed min-w-0",children:[f.url?o.jsxs(o.Fragment,{children:["Go to"," ",o.jsx("a",{href:f.url,target:"_blank",rel:"noopener noreferrer",className:"text-claw-400 hover:text-claw-300 underline font-medium",children:f.urlLabel})," ","and ",f.text.toLowerCase(),"."]}):f.text,f.note&&o.jsx("span",{className:"block text-xs text-gray-500 mt-0.5",children:f.note})]})]},y))}),o.jsxs("div",{className:"mb-1",children:[a==="need"&&o.jsx("label",{className:"block text-xs text-gray-400 mb-1.5",children:"Paste your key here:"}),o.jsx("input",{type:"password",value:c,onChange:f=>{m(f.target.value),h("")},onKeyDown:f=>f.key==="Enter"&&p(),placeholder:d.placeholder,autoFocus:a==="have",className:"w-full bg-gray-800 border border-gray-700 rounded-xl px-4 py-3 text-sm text-gray-100 placeholder-gray-600 focus:outline-none focus:border-claw-500 font-mono"}),o.jsx("p",{className:"text-xs text-gray-600 mt-1.5",children:"Stored in your browser session only โ never sent to us."})]}),g&&o.jsx("p",{className:"text-red-400 text-xs mt-3 mb-1",children:g}),o.jsx("button",{onClick:p,disabled:x||!c.trim(),className:"w-full mt-4 px-5 py-3 bg-claw-600 hover:bg-claw-500 text-white rounded-xl text-sm font-semibold transition-colors disabled:opacity-40",children:x?"โณ Testing connection...":"Connect โ"})]})}function Ma(e){return(e?`SETUP MODE: MAIN AGENT
|
|
58
|
+
You are configuring the user's PRIMARY default agent โ the one that handles all conversations when no other agent matches.
|
|
59
|
+
- Do NOT ask for a technical ID or slug. Never mention agent IDs to the user.
|
|
60
|
+
- You CAN and SHOULD ask what they want to call their helper and what personality it should have.
|
|
61
|
+
- Always silently set id: "main" in the teamspec for this agent.
|
|
62
|
+
- Frame this as their "main assistant" โ the one that's always there for them.
|
|
63
|
+
- Since this is their first/primary helper, focus on making it general and useful rather than narrowly specialized.
|
|
64
|
+
|
|
65
|
+
`:`SETUP MODE: NEW AGENT
|
|
66
|
+
You are helping the user add a NEW specialist agent alongside their existing setup.
|
|
67
|
+
- Ask for a name that distinguishes this agent from their other helpers.
|
|
68
|
+
- Pick an appropriate lowercase-hyphen id slug from the name.
|
|
69
|
+
- You can ask if this new helper should work with their other agents, or work independently.
|
|
70
|
+
|
|
71
|
+
`)+pm}const pm=`You are a friendly, patient assistant helping someone set up an AI helper (called an "agent") for OpenClaw. The person you're talking to may have no technical background at all โ imagine helping a relative who's never programmed anything.
|
|
72
|
+
|
|
73
|
+
YOUR JOB:
|
|
74
|
+
Have a natural conversation to understand what they want their AI helper to do. Ask one question at a time. Listen carefully. Ask follow-up questions when answers are vague. When you have a complete picture, build the technical spec silently in a <teamspec> block (the user never sees this โ it's background work).
|
|
75
|
+
|
|
76
|
+
CONVERSATION STYLE:
|
|
77
|
+
- Warm, patient, and encouraging. Like a helpful nephew who knows computers.
|
|
78
|
+
- Plain English only. Never say: agent, orchestration, payload, escalation, slug, schema, TeamSpec, hub-and-spoke, handoff chain, manager topology, or any other technical term.
|
|
79
|
+
- Instead say: "helper", "what it does", "what starts it", "what it produces", "when to ask a real person", "what it should never do"
|
|
80
|
+
- When someone is vague ("I want it to do stuff with emails"), ask what specifically. Give examples to help: "Like, when an important email arrives, it sends you a text? Or does it sort them into folders?"
|
|
81
|
+
- One question at a time. Wait for the answer before asking the next thing.
|
|
82
|
+
- If someone says something unclear, reflect it back: "So if I understand right, you want it to..."
|
|
83
|
+
- Be encouraging: "That's a great use case!" / "Perfect, that makes sense."
|
|
84
|
+
|
|
85
|
+
WHAT TO LEARN (natural order โ don't treat this as a checklist, let it flow):
|
|
86
|
+
1. What should this helper do? What's the big goal?
|
|
87
|
+
2. Is this one helper doing everything, or would it make more sense to have a small team of helpers (e.g. one that watches for things, another that takes action)?
|
|
88
|
+
3. For each helper:
|
|
89
|
+
- What's the main thing it does?
|
|
90
|
+
- What causes it to start working? (A message? A schedule? Someone asking it something?)
|
|
91
|
+
- What does it produce when it's done? (A message? A file? An email draft?)
|
|
92
|
+
- When it gets stuck or doesn't have enough info, what should it do?
|
|
93
|
+
- Are there things it should NEVER do, no matter what? (e.g. "never send an email without asking me first", "never delete anything")
|
|
94
|
+
- What kinds of actions should it always check with a real person before doing?
|
|
95
|
+
4. Should each helper remember things on its own, or share notes with the team?
|
|
96
|
+
|
|
97
|
+
RECOMMENDING SKILLS โ VERY IMPORTANT:
|
|
98
|
+
As you learn what the helper will do, proactively suggest relevant skills and capabilities. Weave this naturally into the conversation โ don't make it feel like a checklist. Mention skills conversationally: "Oh, since you want it to track your music taste, there's a Spotify skill that would be perfect for that โ I'll make sure we include it." Always explain WHY the skill fits.
|
|
99
|
+
|
|
100
|
+
Skills and capabilities you know about:
|
|
101
|
+
|
|
102
|
+
BUILT-IN CAPABILITIES (always available, no install needed):
|
|
103
|
+
- Web search: searches the internet (Brave or Perplexity). Use when: research helpers, news monitors, price trackers, anything needing current info.
|
|
104
|
+
- Web browsing: opens and reads web pages. Use when: anything that needs to read a specific URL, scrape a page, or interact with a website.
|
|
105
|
+
- Memory โ Vector (LanceDB): remembers things semantically โ finds related memories even without exact words. Ideal for: personal assistants, taste trackers, relationship managers, anything that learns about the user over time. Needs an OpenAI embedding API key.
|
|
106
|
+
- Memory โ Core: simpler structured memory. Good for: helpers that need to remember a short list of facts.
|
|
107
|
+
|
|
108
|
+
INSTALLED SKILLS (already on this machine):
|
|
109
|
+
- homeassistant: Controls smart home โ lights, locks, thermostats, automations. Use when: agent interacts with the home.
|
|
110
|
+
- discord: Discord operations โ reading channels, sending messages. Use when: agent lives in or manages Discord.
|
|
111
|
+
- memory-hygiene: Audits and cleans vector memory. Recommend for long-running agents.
|
|
112
|
+
- memory-tiering: Multi-tier memory (hot/warm/cold). Good for agents with lots of history.
|
|
113
|
+
- multi-agent-coordination: Helps agents delegate within a team. Use for multi-agent setups.
|
|
114
|
+
- playwright: Automates web browsers โ clicks, fills forms, screenshots. Use when: agent interacts with websites.
|
|
115
|
+
- tesla: Tesla vehicle integration โ status, lock/unlock, climate. Use for Tesla owners.
|
|
116
|
+
- virustotal: Security scanning of files and URLs. Good for: security helpers, file monitors.
|
|
117
|
+
|
|
118
|
+
COMMUNITY SKILLS FROM CLAWHUB (clawhub.ai โ installed with: clawhub install <id>):
|
|
119
|
+
- spotify: Spotify โ search tracks, recommendations, playlists, listening history. Use for: music helpers, taste trackers.
|
|
120
|
+
- apple-music: Apple Music integration. Alternative to Spotify.
|
|
121
|
+
- lastfm: Last.fm music stats and scrobbling. Good for: music history trackers.
|
|
122
|
+
- notion: Read/write Notion pages and databases. Good for: knowledge base helpers, project trackers.
|
|
123
|
+
- github: GitHub issues, PRs, code search. Good for: developer assistants.
|
|
124
|
+
- linear: Linear issue tracking. Good for: project management helpers.
|
|
125
|
+
- todoist: Todoist tasks. Good for: personal productivity helpers.
|
|
126
|
+
- google-calendar: Read/create Google Calendar events. Good for: scheduling helpers.
|
|
127
|
+
- airtable: Airtable database read/write. Good for: data management helpers.
|
|
128
|
+
- slack: Slack messaging and channel ops. Good for: Slack-based helpers.
|
|
129
|
+
- twitter-x: Post and read Twitter/X. Good for: social media helpers.
|
|
130
|
+
- weather: Weather lookups. Good for: anything needing weather data.
|
|
131
|
+
- news: News headlines and article fetching. Good for: news briefing helpers.
|
|
132
|
+
- wolfram: Wolfram Alpha computations. Good for: math, science, facts.
|
|
133
|
+
|
|
134
|
+
SKILL MATCHING GUIDE (use as inspiration, not a rigid map):
|
|
135
|
+
- Music tracking / recommendations โ spotify or apple-music + lastfm + memory (lancedb)
|
|
136
|
+
- Smart home control โ homeassistant
|
|
137
|
+
- Research assistant โ web search + web browsing
|
|
138
|
+
- Productivity / tasks โ todoist or notion or linear
|
|
139
|
+
- Developer assistant โ github
|
|
140
|
+
- News / research briefing โ news + web search
|
|
141
|
+
- Security monitoring โ virustotal
|
|
142
|
+
- Social media โ twitter-x
|
|
143
|
+
- Scheduling โ google-calendar
|
|
144
|
+
- Browser automation โ playwright
|
|
145
|
+
- Tesla owner โ tesla
|
|
146
|
+
|
|
147
|
+
WHEN YOU THINK YOU HAVE EVERYTHING โ CONFIRMATION LOOP:
|
|
148
|
+
Do NOT set complete="true" immediately. Instead, run this loop:
|
|
149
|
+
|
|
150
|
+
1. Present a clear, friendly summary of everything you've captured. Use plain English. Cover: what each helper does, what triggers it, what it produces, any skills you're recommending and why, what it'll never do. Example:
|
|
151
|
+
"Okay, here's what I've got! You want a helper called [name] that [mission]. It kicks in when [trigger]. I'm going to set it up with [skill] so it can [reason]. It'll always ask you before [escalation], and it'll never [never rules]. Does that sound right?"
|
|
152
|
+
|
|
153
|
+
2. Wait for their response. They might say:
|
|
154
|
+
- "Yes, that's right!" โ proceed to step 3
|
|
155
|
+
- "Actually, change X to Y" โ update the spec silently, confirm back, ask again
|
|
156
|
+
- They might add something โ incorporate it, update the summary, ask again
|
|
157
|
+
|
|
158
|
+
3. Keep going until they explicitly confirm. At least one full round, two or three is fine.
|
|
159
|
+
|
|
160
|
+
4. Only once they've confirmed: include complete="true" in your teamspec block.
|
|
161
|
+
|
|
162
|
+
โโโ TECHNICAL SPEC (invisible to user) โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
163
|
+
|
|
164
|
+
As you learn facts, silently update the spec. The user never sees these blocks.
|
|
165
|
+
|
|
166
|
+
<teamspec>
|
|
167
|
+
{ ...partial TeamSpec JSON... }
|
|
168
|
+
</teamspec>
|
|
169
|
+
|
|
170
|
+
When confirmed complete:
|
|
171
|
+
<teamspec complete="true">
|
|
172
|
+
{ ...full TeamSpec... }
|
|
173
|
+
</teamspec>
|
|
174
|
+
|
|
175
|
+
TeamSpec shape:
|
|
176
|
+
{
|
|
177
|
+
"version": "1.0",
|
|
178
|
+
"team": { "name": "string", "mission": "string" },
|
|
179
|
+
"agents": [{
|
|
180
|
+
"id": "lowercase-hyphen-slug",
|
|
181
|
+
"name": "string",
|
|
182
|
+
"mission": "string",
|
|
183
|
+
"inputs": "line1\\nline2",
|
|
184
|
+
"outputs": "line1\\nline2",
|
|
185
|
+
"failure": "string",
|
|
186
|
+
"escalation": "string",
|
|
187
|
+
"never": ["string", "string"]
|
|
188
|
+
}],
|
|
189
|
+
"orchestration": { "mode": "manager|handoff_chain|hub_and_spoke", "router_agent": "string" },
|
|
190
|
+
"handoffs": [{ "from": "string", "to": "string", "when": "string", "payload_contract": "string" }],
|
|
191
|
+
"shared_constraints": { "never": ["string"] },
|
|
192
|
+
"shared_memory": { "mode": "separate|shared_summary", "location": "string" },
|
|
193
|
+
"routing": { "defaultAgentId": "string", "bindings": [] },
|
|
194
|
+
"capabilities": {
|
|
195
|
+
"webSearch": false,
|
|
196
|
+
"webFetch": false,
|
|
197
|
+
"memory": "lancedb|core|none",
|
|
198
|
+
"recommendedSkills": [
|
|
199
|
+
{
|
|
200
|
+
"id": "skill-id",
|
|
201
|
+
"name": "Human-readable name",
|
|
202
|
+
"reason": "Why this skill fits in plain English",
|
|
203
|
+
"source": "installed|clawhub",
|
|
204
|
+
"install": "clawhub install skill-id",
|
|
205
|
+
"requiresApiKey": false,
|
|
206
|
+
"apiKeyName": "ENV_VAR_IF_NEEDED"
|
|
207
|
+
}
|
|
208
|
+
],
|
|
209
|
+
"tools": { "deny": [] }
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
Technical decisions you make silently (never ask the user):
|
|
214
|
+
- agent IDs: short lowercase-hyphen slugs from names ("Email Watcher" โ "email-watcher")
|
|
215
|
+
- orchestration mode: infer from structure (multiple coordinated โ "manager"; sequential pipeline โ "handoff_chain"; single or independent โ "hub_and_spoke")
|
|
216
|
+
- For a single helper: handoffs=[], routing.defaultAgentId=that agent's id, orchestration.mode="hub_and_spoke"
|
|
217
|
+
- shared_constraints.never: at least one sensible team-wide rule
|
|
218
|
+
- never[] rules: specific and actionable ("Never send emails without approval" not "Be helpful")
|
|
219
|
+
- capabilities.memory: "lancedb" for helpers that learn preferences or history; "none" for stateless helpers
|
|
220
|
+
- capabilities.webSearch: true if the helper needs current info, prices, news, or facts it can't know in advance
|
|
221
|
+
- capabilities.webFetch: true if the helper needs to read specific URLs or browse web pages`;function mm(e){const t=[],n=/<teamspec(\s+complete="true")?>([\s\S]*?)<\/teamspec>/g;let r;for(;(r=n.exec(e))!==null;)try{t.push({spec:JSON.parse(r[2].trim()),complete:!!r[1]})}catch{}return t}function hm(e){return e.replace(/<teamspec[\s\S]*?<\/teamspec>/g,"").trim()}function gm({msg:e}){const t=e.role==="user",n=e.role==="assistant"?hm(e.content):e.content;return n?o.jsxs("div",{className:`flex ${t?"justify-end":"justify-start"} mb-4`,children:[!t&&o.jsx("div",{className:"w-8 h-8 rounded-full bg-claw-700 flex items-center justify-center text-sm mr-3 mt-0.5 shrink-0",children:"๐ฆ"}),o.jsx("div",{className:`max-w-[75%] rounded-2xl px-4 py-3 text-sm leading-relaxed ${t?"bg-claw-700 text-white rounded-br-sm":"bg-gray-800 text-gray-100 rounded-bl-sm"}`,children:n.split(`
|
|
222
|
+
`).map((r,l)=>o.jsxs("span",{children:[r,l<n.split(`
|
|
223
|
+
`).length-1&&o.jsx("br",{})]},l))}),t&&o.jsx("div",{className:"w-8 h-8 rounded-full bg-gray-700 flex items-center justify-center text-sm ml-3 mt-0.5 shrink-0",children:"๐ค"})]}):null}function ym({installCtx:e,onConfirm:t}){const[n,r]=S.useState(e.isFreshInstall?"main":"new");return o.jsxs("div",{className:"max-w-lg mx-auto pt-8",children:[o.jsxs("div",{className:"text-center mb-8",children:[o.jsx("div",{className:"text-4xl mb-3",children:"๐ฆ"}),o.jsx("h2",{className:"text-2xl font-bold text-white mb-2",children:"Let's build your AI helper"}),o.jsx("p",{className:"text-gray-400 text-sm",children:"I'll have a friendly conversation with you and handle all the technical stuff behind the scenes."})]}),o.jsx("div",{className:"space-y-3 mb-6",children:[{id:"main",title:"Set up my main agent",desc:"Your default helper โ the one that responds to all your conversations.",detected:e.isFreshInstall},{id:"new",title:"Add a new agent",desc:e.existingAgentCount>0?`Add a specialist alongside your ${e.existingAgentCount} existing agent${e.existingAgentCount>1?"s":""}.`:"Create a new specialist with its own personality and workspace.",detected:!e.isFreshInstall}].map(l=>o.jsxs("button",{onClick:()=>r(l.id),className:`w-full flex items-start gap-4 p-4 rounded-xl border text-left transition-colors ${n===l.id?"border-claw-500 bg-claw-900/30":"border-gray-700 bg-gray-800/60 hover:border-gray-600"}`,children:[o.jsx("div",{className:`w-5 h-5 rounded-full border-2 flex items-center justify-center shrink-0 mt-0.5 ${n===l.id?"border-claw-400 bg-claw-500":"border-gray-600"}`,children:n===l.id&&o.jsx("div",{className:"w-2 h-2 rounded-full bg-white"})}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[o.jsx("span",{className:`text-sm font-semibold ${n===l.id?"text-white":"text-gray-300"}`,children:l.title}),l.detected&&o.jsx("span",{className:"text-xs text-claw-400 border border-claw-800 rounded px-1.5 py-0.5 leading-none",children:"detected"})]}),o.jsx("p",{className:"text-xs text-gray-500 mt-0.5",children:l.desc})]})]},l.id))}),o.jsx("button",{onClick:()=>t(n==="main",e.defaultWorkspace),className:"w-full px-5 py-3 bg-claw-600 hover:bg-claw-500 text-white rounded-xl text-sm font-semibold transition-colors",children:"Let's go โ"})]})}function ad(){const{conversationMessages:e,setConversationMessages:t,conversationComplete:n,setConversationComplete:r,mergeTeamSpec:l,setPhase:s,isMainAgent:i,setIsMainAgent:a,setDefaultWorkspace:u}=Ge(),{configured:c,provider:m,apiKey:g,model:h,openclawEnv:x}=Dl(),{advance:v}=Cn(),[w,R]=S.useState(""),[p,d]=S.useState(!1),[f,y]=S.useState(""),[k,b]=S.useState(!1),[E,T]=S.useState(null),[z,L]=S.useState(!1),O=S.useRef(!1),G=S.useRef(null),te=S.useRef(null),Se=S.useRef(null);S.useEffect(()=>{fetch("/api/install-context").then(N=>N.json()).then(N=>T(N)).catch(()=>T({isFreshInstall:!1,defaultWorkspace:"~/.openclaw/workspace",existingAgentCount:0}))},[]);function re(N,I){a(N),u(I),G.current=Ma(N),L(!0)}S.useEffect(()=>{c&&z&&!O.current&&e.length===0&&(O.current=!0,ae("Hello! I'd like to build an AI helper.",[]))},[c,z]),S.useEffect(()=>{var N;(N=te.current)==null||N.scrollIntoView({behavior:"smooth"})},[e,p]);async function ae(N,I){const F={role:"user",content:N},W=N.startsWith("Hello! I'd like to build"),ke=W?I:[...I,F];W||t(ke),d(!0),y("");try{const Z=await fetch("/api/chat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({messages:W?[{role:"user",content:"Start the conversation with a warm greeting and your first question."}]:ke,...x?{}:{apiKey:g},model:h,provider:m,system:G.current||Ma(i)})}),A=await Z.json();if(!Z.ok)throw new Error(A.error||"AI request failed");const q={role:"assistant",content:A.content},P=[...ke,q];t(P);const qe=mm(A.content);for(const Kt of qe)l(Kt.spec),Kt.complete&&r(!0)}catch(Z){y(Z.message)}finally{d(!1),setTimeout(()=>{var Z;return(Z=Se.current)==null?void 0:Z.focus()},100)}}function $(){const N=w.trim();!N||p||(R(""),ae(N,e))}function C(N){N.key==="Enter"&&!N.shiftKey&&(N.preventDefault(),$())}return!c||k?o.jsxs("div",{className:"max-w-lg mx-auto pt-8",children:[o.jsxs("div",{className:"text-center mb-8",children:[o.jsx("div",{className:"text-4xl mb-3",children:"๐ฆ"}),o.jsx("h2",{className:"text-2xl font-bold text-white mb-2",children:"Let's build your AI helper"}),o.jsx("p",{className:"text-gray-400 text-sm",children:"I'll have a friendly conversation with you and handle all the technical stuff behind the scenes."})]}),o.jsx(fm,{onDone:()=>{b(!1),O.current=!1}})]}):z?o.jsxs("div",{className:"flex flex-col h-full max-w-2xl mx-auto",children:[o.jsxs("div",{className:"flex-1 overflow-y-auto py-4 scrollbar-thin",children:[e.length===0&&!p&&o.jsx("div",{className:"text-center text-gray-600 text-sm mt-16",children:"Starting conversation..."}),e.map((N,I)=>o.jsx(gm,{msg:N},I)),p&&o.jsxs("div",{className:"flex justify-start mb-4",children:[o.jsx("div",{className:"w-8 h-8 rounded-full bg-claw-700 flex items-center justify-center text-sm mr-3 shrink-0",children:"๐ฆ"}),o.jsx("div",{className:"bg-gray-800 rounded-2xl rounded-bl-sm px-4 py-3",children:o.jsxs("span",{className:"flex gap-1",children:[o.jsx("span",{className:"w-1.5 h-1.5 bg-gray-500 rounded-full animate-bounce",style:{animationDelay:"0ms"}}),o.jsx("span",{className:"w-1.5 h-1.5 bg-gray-500 rounded-full animate-bounce",style:{animationDelay:"150ms"}}),o.jsx("span",{className:"w-1.5 h-1.5 bg-gray-500 rounded-full animate-bounce",style:{animationDelay:"300ms"}})]})})]}),f&&o.jsxs("div",{className:"bg-red-900/30 border border-red-700 rounded-xl p-3 mb-4 text-sm text-red-300",children:[f,o.jsx("button",{onClick:()=>{y(""),b(!0)},className:"ml-2 underline text-xs",children:"Check AI settings"})]}),n&&!p&&o.jsxs("div",{className:"bg-green-900/20 border border-green-700 rounded-xl p-4 mb-4 text-center",children:[o.jsx("p",{className:"text-green-300 text-sm font-medium mb-3",children:"โ All set! Ready to review and generate your agent files."}),o.jsx("button",{onClick:v,className:"px-6 py-2.5 bg-green-700 hover:bg-green-600 text-white rounded-xl text-sm font-semibold transition-colors",children:"Review & generate โ"})]}),o.jsx("div",{ref:te})]}),o.jsxs("div",{className:"border-t border-gray-800 pt-4 pb-2",children:[o.jsxs("div",{className:"flex gap-3 items-end",children:[o.jsx("textarea",{ref:Se,value:w,onChange:N=>R(N.target.value),onKeyDown:C,placeholder:"Type your reply...",rows:2,disabled:p,className:"flex-1 bg-gray-800 border border-gray-700 rounded-xl px-4 py-3 text-sm text-gray-100 placeholder-gray-600 focus:outline-none focus:border-claw-500 resize-none disabled:opacity-50 leading-relaxed"}),o.jsx("button",{onClick:$,disabled:p||!w.trim(),className:"px-5 py-3 bg-claw-600 hover:bg-claw-500 text-white rounded-xl text-sm font-semibold transition-colors disabled:opacity-40 shrink-0",children:"Send"})]}),o.jsxs("div",{className:"flex items-center justify-between mt-2 px-1",children:[o.jsx("span",{className:"text-xs text-gray-600",children:"Press Enter to send, Shift+Enter for new line"}),!n&&e.length>=10&&o.jsx("button",{onClick:v,className:"text-xs text-gray-500 hover:text-gray-300 transition-colors",children:"Skip to review โ"})]})]})]}):E?o.jsx(ym,{installCtx:E,onConfirm:re}):o.jsxs("div",{className:"flex items-center gap-2 text-gray-500 text-sm pt-16 justify-center",children:[o.jsx("span",{className:"animate-spin",children:"โณ"})," Checking your setup..."]})}function xm({agent:e}){const t=Array.isArray(e.never)?e.never:[];return o.jsxs("div",{className:"bg-gray-800 border border-gray-700 rounded-xl p-5 mb-4",children:[o.jsx("div",{className:"flex items-start justify-between mb-3",children:o.jsxs("div",{children:[o.jsx("h3",{className:"font-semibold text-white text-base",children:e.name||e.id}),o.jsx("code",{className:"text-xs text-gray-500",children:e.id})]})}),o.jsx("p",{className:"text-sm text-gray-300 mb-4",children:e.mission}),o.jsxs("div",{className:"grid grid-cols-2 gap-4 text-xs",children:[e.inputs&&o.jsxs("div",{children:[o.jsx("p",{className:"text-gray-500 uppercase tracking-wider mb-1 font-medium",children:"Triggered by"}),o.jsx("p",{className:"text-gray-300",children:e.inputs.replace(/\n/g," ยท ")})]}),e.outputs&&o.jsxs("div",{children:[o.jsx("p",{className:"text-gray-500 uppercase tracking-wider mb-1 font-medium",children:"Produces"}),o.jsx("p",{className:"text-gray-300",children:e.outputs.replace(/\n/g," ยท ")})]}),e.failure&&o.jsxs("div",{children:[o.jsx("p",{className:"text-gray-500 uppercase tracking-wider mb-1 font-medium",children:"When stuck"}),o.jsx("p",{className:"text-gray-300",children:e.failure})]}),e.escalation&&o.jsxs("div",{children:[o.jsx("p",{className:"text-gray-500 uppercase tracking-wider mb-1 font-medium",children:"Asks you first"}),o.jsx("p",{className:"text-gray-300",children:e.escalation})]})]}),t.length>0&&o.jsxs("div",{className:"mt-4 pt-4 border-t border-gray-700",children:[o.jsx("p",{className:"text-gray-500 text-xs uppercase tracking-wider mb-2 font-medium",children:"Will never"}),o.jsx("ul",{className:"space-y-1",children:t.map((n,r)=>o.jsxs("li",{className:"text-xs text-red-300 flex items-start gap-1.5",children:[o.jsx("span",{className:"mt-0.5",children:"โ"})," ",n]},r))})]})]})}function vm(){var u,c,m,g,h;const e=Ge(x=>x.teamSpec),{advance:t,goBack:n}=Cn(),[r,l]=S.useState(!1),s=((u=e.agents)==null?void 0:u.filter(x=>x.id))||[],i=((c=e.shared_memory)==null?void 0:c.mode)||"separate",a=s.length>1;return o.jsxs("div",{className:"max-w-2xl",children:[((m=e.team)==null?void 0:m.name)&&o.jsxs("div",{className:"mb-6",children:[o.jsx("h2",{className:"text-xl font-bold text-white mb-1",children:e.team.name}),e.team.mission&&o.jsx("p",{className:"text-gray-400 text-sm",children:e.team.mission})]}),s.length===0&&o.jsx("div",{className:"bg-yellow-900/20 border border-yellow-700 rounded-xl p-4 mb-4",children:o.jsx("p",{className:"text-yellow-300 text-sm",children:"The conversation didn't produce a complete agent spec yet. Go back and continue the conversation, or the files will be generated with placeholder values."})}),s.map(x=>o.jsx(xm,{agent:x},x.id)),a&&((g=e.handoffs)==null?void 0:g.length)>0&&o.jsxs("div",{className:"bg-gray-800 border border-gray-700 rounded-xl p-4 mb-4",children:[o.jsx("p",{className:"text-xs text-gray-500 uppercase tracking-wider mb-3 font-medium",children:"How they hand off work"}),e.handoffs.map((x,v)=>o.jsxs("p",{className:"text-sm text-gray-300 mb-1",children:[o.jsx("span",{className:"text-claw-400",children:x.from})," โ ",o.jsx("span",{className:"text-claw-400",children:x.to}),x.when&&o.jsxs("span",{className:"text-gray-500",children:[" when ",x.when]})]},v))]}),o.jsxs("div",{className:"bg-gray-800 border border-gray-700 rounded-xl p-4 mb-6",children:[o.jsx("p",{className:"text-xs text-gray-500 uppercase tracking-wider mb-1 font-medium",children:"Memory"}),o.jsx("p",{className:"text-sm text-gray-300",children:i==="shared_summary"?`Shared team memory${(h=e.shared_memory)!=null&&h.location?` at ${e.shared_memory.location}`:""}`:"Each helper keeps its own notes"})]}),o.jsxs("div",{className:"mb-6",children:[o.jsx("button",{onClick:()=>l(x=>!x),className:"text-xs text-gray-600 hover:text-gray-400 transition-colors",children:r?"โพ Hide technical details":"โธ Show technical details"}),r&&o.jsx("pre",{className:"mt-2 bg-gray-900 border border-gray-700 rounded-xl p-4 text-xs text-green-400 font-mono overflow-auto max-h-64 scrollbar-thin",children:JSON.stringify(e,null,2)})]}),o.jsxs("div",{className:"flex gap-3",children:[o.jsx("button",{onClick:n,className:"px-4 py-2 bg-gray-700 hover:bg-gray-600 text-gray-300 rounded-xl text-sm transition-colors",children:"โ Go back"}),o.jsx("button",{onClick:t,className:"px-6 py-2.5 bg-green-700 hover:bg-green-600 text-white rounded-xl text-sm font-semibold transition-colors",children:"Looks good โ generate files โ"})]})]})}function wm({files:e}){const[t,n]=S.useState(null);if(!e||e.length===0)return null;const r=e.find(l=>l.path===t);return o.jsxs("div",{className:"grid grid-cols-2 gap-4 h-full",children:[o.jsxs("div",{className:"overflow-auto scrollbar-thin",children:[o.jsxs("p",{className:"text-xs text-gray-500 mb-2 uppercase tracking-wider",children:["Files to write (",e.length,")"]}),o.jsx("ul",{className:"space-y-1",children:e.map(l=>o.jsx("li",{children:o.jsxs("button",{onClick:()=>n(t===l.path?null:l.path),className:`w-full text-left text-xs px-2 py-1.5 rounded font-mono truncate transition-colors ${t===l.path?"bg-claw-600/30 text-claw-300 border border-claw-600/50":"text-gray-400 hover:bg-gray-800 hover:text-gray-200"}`,children:["๐ ",l.path]})},l.path))})]}),o.jsx("div",{className:"overflow-auto scrollbar-thin",children:r?o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"text-xs text-gray-500 mb-2 font-mono truncate",children:r.path}),o.jsx("pre",{className:"text-xs text-gray-300 bg-gray-900 rounded p-3 overflow-auto whitespace-pre-wrap",children:r.content})]}):o.jsx("p",{className:"text-xs text-gray-600 mt-8 text-center",children:"Click a file to preview"})})]})}function Sm(){var z,L;const{teamSpec:e,generatedFiles:t,setGeneratedFiles:n,writeResult:r,setWriteResult:l,isGenerating:s,setIsGenerating:i,isWriting:a,setIsWriting:u,isMainAgent:c,defaultWorkspace:m}=Ge(),{advance:g}=Cn(),[h,x]=S.useState([]),[v,w]=S.useState(!1),[R,p]=S.useState(""),[d,f]=S.useState(!1),[y,k]=S.useState("");S.useEffect(()=>{t.length===0&&b()},[]);async function b(){i(!0),p("");try{const O=await fetch("/api/generate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({teamSpec:e})}),G=await O.json();if(!O.ok)throw new Error(G.error||"Generation failed");n(G.files);const te=e.agents.map(ae=>ae.id).join(","),re=await(await fetch(`/api/check-paths?agents=${te}`)).json();x(re.conflicts.filter(ae=>ae.exists))}catch(O){p(O.message)}finally{i(!1)}}async function E(){var O;u(!0),p(""),k("");try{const G={};if(c)for(const $ of e.agents)G[$.id]=m||"~/.openclaw/workspace";else await Promise.all(e.agents.map(async $=>{const N=await(await fetch(`/api/resolve-workspace/${$.id}`)).json();G[$.id]=N.workspace}));const te=t.map($=>{const C=$.path.match(/^workspace-([^/]+)\/(.+)$/);if(C){const[,N,I]=C,F=G[N]||`~/.openclaw/workspace-${N}`;return{...$,path:`${F}/${I}`}}return{...$,path:`~/.openclaw/${$.path}`}}),Se=await fetch("/api/write",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:te,force:v})}),re=await Se.json();if(!Se.ok)throw new Error(re.error||"Write failed");l(re),(await fetch("/api/openclaw-config",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({isMainAgent:!!c,agents:c?void 0:{list:e.agents.map($=>({id:$.id,workspace:G[$.id]||`~/.openclaw/workspace-${$.id}`}))},bindings:e.routing.bindings||[],defaultAgentId:e.routing.defaultAgentId||((O=e.agents[0])==null?void 0:O.id)})})).ok?f(!0):k("Files written, but failed to update openclaw.json. You may need to add the agent manually.")}catch(G){p(G.message)}finally{u(!1)}}const T=r&&(d||y);return o.jsxs("div",{className:"max-w-4xl",children:[s&&o.jsxs("div",{className:"flex items-center gap-2 text-claw-400 mb-4",children:[o.jsx("span",{className:"animate-spin",children:"โณ"}),o.jsx("span",{className:"text-sm",children:"Generating files..."})]}),!s&&t.length>0&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"h-80 mb-6",children:o.jsx(wm,{files:t})}),h.length>0&&!r&&o.jsxs("div",{className:"bg-yellow-900/30 border border-yellow-700 rounded-xl p-4 mb-4",children:[o.jsx("p",{className:"text-yellow-400 text-sm font-semibold mb-2",children:"โ Existing workspaces detected"}),o.jsx("ul",{className:"text-xs text-yellow-300 space-y-1 mb-3",children:h.map(O=>o.jsxs("li",{children:[o.jsx("code",{children:O.path})," already exists"]},O.agentId))}),o.jsxs("label",{className:"flex items-center gap-2 text-sm text-yellow-200 cursor-pointer",children:[o.jsx("input",{type:"checkbox",checked:v,onChange:O=>w(O.target.checked),className:"rounded"}),"Overwrite existing files (backs up as .bak-YYYYMMDD-HHmmss)"]})]}),r&&o.jsxs("div",{className:"bg-gray-800 border border-gray-700 rounded-xl p-4 mb-4 space-y-2",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"text-green-400 text-sm",children:"โ"}),o.jsxs("span",{className:"text-sm text-gray-200",children:["Written ",((z=r.written)==null?void 0:z.length)||0," files to ",o.jsx("code",{className:"text-claw-400",children:"~/.openclaw/"}),((L=r.skipped)==null?void 0:L.length)>0&&o.jsxs("span",{className:"text-gray-500",children:[" (",r.skipped.length," skipped, already existed)"]})]})]}),d&&o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"text-green-400 text-sm",children:"โ"}),o.jsxs("span",{className:"text-sm text-gray-200",children:["Agent",e.agents.length>1?"s":""," registered in ",o.jsx("code",{className:"text-claw-400",children:"openclaw.json"}),o.jsx("span",{className:"text-gray-500 ml-1",children:"โ gateway will pick them up on next restart"})]})]}),y&&o.jsxs("div",{className:"flex items-start gap-2",children:[o.jsx("span",{className:"text-yellow-400 text-sm",children:"โ "}),o.jsx("span",{className:"text-sm text-yellow-300",children:y})]})]}),R&&o.jsx("p",{className:"text-red-400 text-sm mb-4",children:R}),o.jsxs("div",{className:"flex gap-3 flex-wrap",children:[!r&&o.jsx("button",{onClick:b,disabled:s,className:"px-4 py-2 bg-gray-700 hover:bg-gray-600 text-gray-300 rounded-lg text-sm transition-colors disabled:opacity-50",children:"โบ Regenerate"}),!r&&o.jsx("button",{onClick:E,disabled:a,className:"px-6 py-2 bg-claw-600 hover:bg-claw-500 text-white rounded-lg text-sm font-semibold transition-colors disabled:opacity-50",children:a?"โณ Writing...":"Write to ~/.openclaw โ"}),T&&o.jsx("button",{onClick:g,className:"px-6 py-2 bg-green-700 hover:bg-green-600 text-white rounded-lg text-sm font-semibold transition-colors",children:"Set up capabilities โ"})]})]})]})}function km({enabled:e,onChange:t}){return o.jsx("button",{onClick:()=>t(!e),className:`relative inline-flex h-6 w-11 items-center rounded-full transition-colors ${e?"bg-claw-600":"bg-gray-700"}`,children:o.jsx("span",{className:`inline-block h-4 w-4 transform rounded-full bg-white transition-transform ${e?"translate-x-6":"translate-x-1"}`})})}function Qt({label:e,value:t,onChange:n,placeholder:r,type:l="text",hint:s}){return o.jsxs("div",{children:[e&&o.jsx("label",{className:"block text-xs text-gray-400 mb-1",children:e}),o.jsx("input",{type:l,value:t,onChange:i=>n(i.target.value),placeholder:r,className:"w-full bg-gray-900 border border-gray-700 rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:outline-none focus:border-claw-500"}),s&&o.jsx("p",{className:"text-xs text-gray-600 mt-1",children:s})]})}const jm=[{id:"exec",label:"Shell/exec",desc:"Run terminal commands"},{id:"browser",label:"Browser",desc:"Open and interact with web pages"},{id:"write",label:"Write files",desc:"Create or modify files"},{id:"read",label:"Read files",desc:"Read files from disk"},{id:"web",label:"Web search",desc:"Search the internet"}];function Nm({agent:e}){var s,i;const{teamSpec:t,mergeTeamSpec:n}=Ge(),r=((i=(s=t.capabilities)==null?void 0:s.agentToolDeny)==null?void 0:i[e.id])||[];function l(a){var g;const u=((g=t.capabilities)==null?void 0:g.agentToolDeny)||{},c=u[e.id]||[],m=c.includes(a)?c.filter(h=>h!==a):[...c,a];n({capabilities:{...t.capabilities,agentToolDeny:{...u,[e.id]:m}}})}return o.jsxs("div",{className:"bg-gray-900/30 rounded-lg p-3",children:[o.jsx("p",{className:"text-xs font-medium text-gray-300 mb-2",children:e.name||e.id}),o.jsx("div",{className:"flex flex-wrap gap-2",children:jm.map(a=>{const u=r.includes(a.id);return o.jsxs("button",{onClick:()=>l(a.id),title:a.desc,className:`text-xs px-2.5 py-1 rounded-lg border transition-colors ${u?"border-red-700 bg-red-900/30 text-red-300":"border-gray-700 text-gray-500 hover:border-gray-500 hover:text-gray-300"}`,children:[u?"โ ":"",a.label]},a.id)})}),r.length>0&&o.jsxs("p",{className:"text-xs text-gray-600 mt-2",children:[e.name||e.id," cannot use: ",r.join(", ")]})]})}function Or({title:e,icon:t,description:n,globalNote:r,enabled:l,onToggle:s,children:i}){return o.jsxs("div",{className:`border rounded-xl p-4 transition-colors ${l?"border-claw-700 bg-gray-800/60":"border-gray-800 bg-gray-800/20"}`,children:[o.jsxs("div",{className:"flex items-start justify-between gap-4 mb-1",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"text-lg",children:t}),o.jsx("span",{className:"font-semibold text-sm text-white",children:e}),r&&o.jsx("span",{className:"text-xs text-yellow-500 border border-yellow-800 rounded px-1.5 py-0.5",children:"global"})]}),o.jsx(km,{enabled:l,onChange:s})]}),o.jsx("p",{className:"text-xs text-gray-500 mb-3 ml-7",children:n}),l&&i&&o.jsx("div",{className:"ml-7 space-y-3 pt-2 border-t border-gray-700",children:i})]})}function Cm(){var q;const{advance:e}=Cn(),{teamSpec:t}=Ge(),n=((q=t.capabilities)==null?void 0:q.recommendedSkills)||[],[r,l]=S.useState(!0),[s,i]=S.useState(!1),[a,u]=S.useState(!1),[c,m]=S.useState(""),[g,h]=S.useState("none"),[x,v]=S.useState(!0),[w,R]=S.useState(!1),[p,d]=S.useState(""),[f,y]=S.useState("text-embedding-3-small"),[k,b]=S.useState(!1),[E,T]=S.useState("brave"),[z,L]=S.useState(""),[O,G]=S.useState(""),[te,Se]=S.useState(!1),[re,ae]=S.useState(!1),[$,C]=S.useState(""),[N,I]=S.useState("http://homeassistant.local:8123"),[F,W]=S.useState(!1),[ke,Z]=S.useState("");S.useEffect(()=>{fetch("/api/capabilities").then(P=>P.json()).then(P=>{var ei,ti,ni,ri,li,si,oi,ii,ai,ui,ci,di,fi,pi,mi,hi,gi,yi,xi,vi,wi,Si;const qe=((ei=P.memory)==null?void 0:ei.mode)||"none",Kt=(ti=t.capabilities)==null?void 0:ti.memory;h(qe!=="none"?qe:Kt||"none"),v(((ri=(ni=P.memory)==null?void 0:ni.lancedb)==null?void 0:ri.autoRecall)??!0),R(((si=(li=P.memory)==null?void 0:li.lancedb)==null?void 0:si.autoCapture)??!1),d(((ii=(oi=P.memory)==null?void 0:oi.lancedb)==null?void 0:ii.embeddingApiKey)||""),y(((ui=(ai=P.memory)==null?void 0:ai.lancedb)==null?void 0:ui.embeddingModel)||"text-embedding-3-small");const ud=((ci=P.webSearch)==null?void 0:ci.enabled)||!1;b(ud||((di=t.capabilities)==null?void 0:di.webSearch)||!1),T(((fi=P.webSearch)==null?void 0:fi.provider)||"brave"),L(((pi=P.webSearch)==null?void 0:pi.braveApiKey)||""),G(((mi=P.webSearch)==null?void 0:mi.perplexityApiKey)||""),Se(((hi=P.webFetch)==null?void 0:hi.enabled)||((gi=t.capabilities)==null?void 0:gi.webFetch)||!1),ae(((yi=P.homeAssistant)==null?void 0:yi.enabled)||!1),C(((xi=P.homeAssistant)==null?void 0:xi.token)||""),I(((vi=P.homeAssistant)==null?void 0:vi.url)||"http://homeassistant.local:8123"),W(((wi=P.googlePlaces)==null?void 0:wi.enabled)||!1),Z(((Si=P.googlePlaces)==null?void 0:Si.apiKey)||"")}).catch(()=>{}).finally(()=>l(!1))},[]);async function A(){var P;i(!0),m("");try{const qe=await fetch("/api/capabilities",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({agentToolDeny:((P=t.capabilities)==null?void 0:P.agentToolDeny)||{},memory:{mode:g,lancedb:{autoRecall:x,autoCapture:w,embeddingApiKey:p,embeddingModel:f}},webSearch:{enabled:k,provider:E,braveApiKey:z,perplexityApiKey:O},webFetch:{enabled:te},homeAssistant:{enabled:re,token:$,url:N},googlePlaces:{enabled:F,apiKey:ke}})}),Kt=await qe.json();if(!qe.ok)throw new Error(Kt.error||"Save failed");u(!0)}catch(qe){m(qe.message)}finally{i(!1)}}return r?o.jsxs("div",{className:"flex items-center gap-2 text-gray-400 text-sm",children:[o.jsx("span",{className:"animate-spin",children:"โณ"})," Loading current config..."]}):o.jsxs("div",{className:"max-w-2xl space-y-4",children:[n.length>0&&o.jsxs("div",{className:"border border-claw-700/50 bg-claw-900/20 rounded-xl p-4",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[o.jsx("span",{className:"text-base",children:"โจ"}),o.jsx("span",{className:"text-sm font-semibold text-claw-300",children:"Recommended for your agent"})]}),o.jsx("div",{className:"space-y-3",children:n.map(P=>o.jsx("div",{className:"flex items-start gap-3 bg-gray-900/40 rounded-lg p-3",children:o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[o.jsx("span",{className:"text-sm font-medium text-white",children:P.name}),o.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded border ${P.source==="installed"?"text-green-400 border-green-800 bg-green-900/20":"text-blue-400 border-blue-800 bg-blue-900/20"}`,children:P.source==="installed"?"already installed":"clawhub"}),P.requiresApiKey&&o.jsx("span",{className:"text-xs text-yellow-500 border border-yellow-800 rounded px-1.5 py-0.5",children:"needs API key"})]}),o.jsx("p",{className:"text-xs text-gray-400 mt-0.5",children:P.reason}),P.source==="clawhub"&&P.install&&o.jsx("code",{className:"text-xs text-gray-600 mt-1 block",children:P.install})]})},P.id))}),o.jsx("p",{className:"text-xs text-gray-600 mt-3",children:`Skills marked "clawhub" need to be installed via the terminal command shown above. They'll live in your agent's workspace and only apply to this agent.`})]}),o.jsxs("div",{className:"bg-yellow-900/20 border border-yellow-800/50 rounded-xl px-4 py-3 text-xs text-yellow-400",children:["These settings apply to ",o.jsx("strong",{children:"all agents"})," in your OpenClaw gateway โ not just the one you just built."]}),o.jsxs("div",{className:"border border-gray-800 bg-gray-800/20 rounded-xl p-4",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[o.jsx("span",{className:"text-lg",children:"๐ง "}),o.jsx("span",{className:"font-semibold text-sm text-white",children:"Memory"}),o.jsx("span",{className:"text-xs text-yellow-500 border border-yellow-800 rounded px-1.5 py-0.5",children:"global"})]}),o.jsx("p",{className:"text-xs text-gray-500 mb-4 ml-7",children:"How agents remember things between conversations."}),o.jsxs("div",{className:"ml-7 space-y-3",children:[o.jsx("div",{className:"grid grid-cols-3 gap-2",children:[{id:"none",label:"None",desc:"Manual markdown files only"},{id:"core",label:"Core",desc:"Lightweight structured memory"},{id:"lancedb",label:"Vector (LanceDB)",desc:"Semantic search โ finds memories by meaning"}].map(P=>o.jsxs("button",{onClick:()=>h(P.id),className:`text-left p-3 rounded-lg border text-xs transition-colors ${g===P.id?"border-claw-500 bg-claw-900/30 text-white":"border-gray-700 bg-gray-900/30 text-gray-400 hover:border-gray-600"}`,children:[o.jsx("div",{className:"font-semibold mb-0.5",children:P.label}),o.jsx("div",{className:"text-gray-500",children:P.desc})]},P.id))}),g==="lancedb"&&o.jsxs("div",{className:"space-y-3 pt-2 border-t border-gray-700",children:[o.jsx(Qt,{label:"OpenAI Embedding API Key",value:p,onChange:d,placeholder:"sk-...",type:"password",hint:"Used only for generating memory embeddings โ not for chat. text-embedding-3-small is fast and cheap."}),o.jsxs("div",{className:"flex gap-4",children:[o.jsxs("label",{className:"flex items-center gap-2 text-xs text-gray-300 cursor-pointer",children:[o.jsx("input",{type:"checkbox",checked:x,onChange:P=>v(P.target.checked),className:"rounded"}),"Auto-recall",o.jsx("span",{className:"text-gray-600",children:"(search memory on every message)"})]}),o.jsxs("label",{className:"flex items-center gap-2 text-xs text-gray-300 cursor-pointer",children:[o.jsx("input",{type:"checkbox",checked:w,onChange:P=>R(P.target.checked),className:"rounded"}),"Auto-capture",o.jsx("span",{className:"text-gray-600",children:"(auto-save after each session)"})]})]})]})]})]}),o.jsxs(Or,{title:"Web Search",icon:"๐",description:"Lets agents search the web for real-time information.",globalNote:!0,enabled:k,onToggle:b,children:[o.jsx("div",{className:"flex gap-2 mb-2",children:["brave","perplexity"].map(P=>o.jsx("button",{onClick:()=>T(P),className:`px-3 py-1 rounded-lg text-xs border transition-colors capitalize ${E===P?"border-claw-500 bg-claw-900/30 text-white":"border-gray-700 text-gray-400 hover:border-gray-600"}`,children:P==="brave"?"Brave Search":"Perplexity"},P))}),E==="brave"?o.jsx(Qt,{label:"Brave Search API Key",value:z,onChange:L,placeholder:"BSA...",type:"password",hint:"Get a free key at api.search.brave.com โ free tier supports 2,000 queries/month."}):o.jsx(Qt,{label:"Perplexity API Key (via OpenRouter)",value:O,onChange:G,placeholder:"sk-or-v1-...",type:"password",hint:"Uses perplexity/sonar-pro via OpenRouter. Get a key at openrouter.ai."})]}),o.jsx(Or,{title:"Web Browsing",icon:"๐",description:"Lets agents open URLs and read web pages. Uses a headless browser โ no API key needed.",globalNote:!0,enabled:te,onToggle:Se}),o.jsxs(Or,{title:"Home Assistant",icon:"๐ ",description:"Control smart home devices โ lights, locks, thermostats, automations.",enabled:re,onToggle:ae,children:[o.jsx(Qt,{label:"Long-Lived Access Token",value:$,onChange:C,placeholder:"eyJ...",type:"password",hint:"Profile โ Security โ Long-Lived Access Tokens โ Create token."}),o.jsx(Qt,{label:"Home Assistant URL",value:N,onChange:I,placeholder:"http://homeassistant.local:8123",hint:"Your HA instance URL. Works on local network or via Nabu Casa remote access."})]}),o.jsx(Or,{title:"Google Places",icon:"๐",description:"Location search, nearby places, business info, maps data.",enabled:F,onToggle:W,children:o.jsx(Qt,{label:"Google Maps API Key",value:ke,onChange:Z,placeholder:"AIza...",type:"password",hint:"Enable the Places API at console.cloud.google.com. Free tier: 28,000 calls/month."})}),t.agents.filter(P=>P.id).length>0&&o.jsxs("div",{className:"border border-gray-800 bg-gray-800/20 rounded-xl p-4",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[o.jsx("span",{className:"text-lg",children:"๐"}),o.jsx("span",{className:"font-semibold text-sm text-white",children:"Per-agent tool restrictions"})]}),o.jsx("p",{className:"text-xs text-gray-500 mb-4 ml-7",children:"Prevent specific agents from using certain tools โ useful for limiting public-facing or restricted agents."}),o.jsx("div",{className:"ml-7 space-y-3",children:t.agents.filter(P=>P.id).map(P=>o.jsx(Nm,{agent:P},P.id))})]}),c&&o.jsx("p",{className:"text-red-400 text-sm",children:c}),o.jsx("div",{className:"flex gap-3 pt-2",children:a?o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex items-center gap-2 text-green-400 text-sm",children:[o.jsx("span",{children:"โ"}),o.jsx("span",{children:"Capabilities saved to openclaw.json"})]}),o.jsx("button",{onClick:e,className:"px-6 py-2 bg-green-700 hover:bg-green-600 text-white rounded-lg text-sm font-semibold transition-colors",children:"Connect to Discord / Telegram โ"})]}):o.jsxs(o.Fragment,{children:[o.jsx("button",{onClick:A,disabled:s,className:"px-6 py-2 bg-claw-600 hover:bg-claw-500 text-white rounded-lg text-sm font-semibold transition-colors disabled:opacity-50",children:s?"โณ Saving...":"Save capabilities โ"}),o.jsx("button",{onClick:e,className:"px-4 py-2 text-gray-500 hover:text-gray-300 text-sm transition-colors",children:"Skip for now"})]})})]})}function st({step:e,total:t,title:n,subtitle:r}){return o.jsxs("div",{className:"mb-6",children:[o.jsxs("div",{className:"text-xs text-gray-500 mb-1",children:["Step ",e," of ",t]}),o.jsx("h2",{className:"text-xl font-bold text-white mb-1",children:n}),r&&o.jsx("p",{className:"text-sm text-gray-400",children:r})]})}function ce({number:e,children:t}){return o.jsxs("div",{className:"flex gap-3 mb-3",children:[o.jsx("div",{className:"w-6 h-6 rounded-full bg-claw-800 border border-claw-600 flex items-center justify-center text-xs font-bold text-claw-300 shrink-0 mt-0.5",children:e}),o.jsx("div",{className:"text-sm text-gray-300 leading-relaxed",children:t})]})}function xl({href:e,children:t}){return o.jsxs("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"text-claw-400 underline hover:text-claw-300 transition-colors",children:[t," โ"]})}function fr({label:e,hint:t,value:n,onChange:r,type:l="text",placeholder:s,mono:i}){return o.jsxs("div",{className:"mb-4",children:[o.jsx("label",{className:"block text-sm text-gray-300 font-medium mb-1",children:e}),t&&o.jsx("p",{className:"text-xs text-gray-500 mb-2",children:t}),o.jsx("input",{type:l,value:n,onChange:a=>r(a.target.value),placeholder:s,className:`w-full bg-gray-800 border border-gray-700 rounded-xl px-4 py-3 text-sm text-gray-100 placeholder-gray-600 focus:outline-none focus:border-claw-500 ${i?"font-mono":""}`})]})}function _t({onBack:e,onNext:t,nextLabel:n="Next โ",nextDisabled:r,saving:l}){return o.jsxs("div",{className:"flex gap-3 mt-6",children:[e&&o.jsx("button",{onClick:e,className:"px-4 py-2 bg-gray-700 hover:bg-gray-600 text-gray-300 rounded-xl text-sm transition-colors",children:"โ Back"}),o.jsx("button",{onClick:t,disabled:r||l,className:"px-6 py-2.5 bg-claw-600 hover:bg-claw-500 text-white rounded-xl text-sm font-semibold transition-colors disabled:opacity-40",children:l?"โณ Saving...":n})]})}function bm({agentName:e,botToken:t,setBotToken:n,appId:r,setAppId:l,onBack:s,onNext:i}){return o.jsxs("div",{className:"max-w-xl",children:[o.jsx(st,{step:2,total:6,title:"Create a Discord bot",subtitle:"Your agent needs its own Discord bot account. This takes about 3 minutes."}),o.jsxs(ce,{number:1,children:["Go to the ",o.jsx(xl,{href:"https://discord.com/developers/applications",children:"Discord Developer Portal"})," and click ",o.jsx("strong",{className:"text-white",children:"New Application"}),". Name it ",o.jsx("strong",{className:"text-white",children:e}),"."]}),o.jsxs(ce,{number:2,children:["In the left menu, click ",o.jsx("strong",{className:"text-white",children:"Bot"}),". Then click ",o.jsx("strong",{className:"text-white",children:"Add Bot"})," โ ",o.jsx("strong",{className:"text-white",children:"Yes, do it!"})]}),o.jsxs(ce,{number:3,children:["Scroll down to ",o.jsx("strong",{className:"text-white",children:"Privileged Gateway Intents"})," and turn on all three:",o.jsx("span",{className:"block mt-1 text-gray-400",children:"Message Content Intent ยท Server Members Intent ยท Presence Intent"})]}),o.jsxs(ce,{number:4,children:["Click ",o.jsx("strong",{className:"text-white",children:"Reset Token"}),", confirm, then copy the token and paste it below."]}),o.jsxs(ce,{number:5,children:["Click ",o.jsx("strong",{className:"text-white",children:"General Information"})," in the left menu and copy the ",o.jsx("strong",{className:"text-white",children:"Application ID"}),"."]}),o.jsxs("div",{className:"mt-6",children:[o.jsx(fr,{label:"Bot Token",type:"password",mono:!0,placeholder:"MTQ2NDQ...",hint:"From the Bot page โ Reset Token",value:t,onChange:n}),o.jsx(fr,{label:"Application ID",mono:!0,placeholder:"1234567890123456789",hint:"From the General Information page",value:r,onChange:l})]}),o.jsx(_t,{onBack:s,onNext:i,nextDisabled:!t.trim()||!r.trim()})]})}function Em({agentName:e,appId:t,confirmed:n,setConfirmed:r,onBack:l,onNext:s}){const i=`https://discord.com/oauth2/authorize?client_id=${t}&permissions=117824&scope=bot`;return o.jsxs("div",{className:"max-w-xl",children:[o.jsx(st,{step:3,total:6,title:"Add the bot to your server",subtitle:"Now invite your new bot to the Discord server where it should live."}),o.jsxs(ce,{number:1,children:["Click this link to invite ",o.jsx("strong",{className:"text-white",children:e})," to your server:"," ",o.jsx(xl,{href:i,children:"Open invite link"})]}),o.jsxs(ce,{number:2,children:["Choose your server from the dropdown, then click ",o.jsx("strong",{className:"text-white",children:"Authorize"}),". You may need to complete a CAPTCHA."]}),o.jsxs(ce,{number:3,children:["You should see ",o.jsx("strong",{className:"text-white",children:e})," appear in your server's member list."]}),o.jsxs("label",{className:"flex items-center gap-3 mt-6 p-4 bg-gray-800 border border-gray-700 rounded-xl cursor-pointer hover:border-claw-600 transition-colors",children:[o.jsx("input",{type:"checkbox",checked:n,onChange:a=>r(a.target.checked),className:"w-4 h-4 accent-claw-500"}),o.jsx("span",{className:"text-sm text-gray-200",children:"I've added the bot to my server"})]}),o.jsx(_t,{onBack:l,onNext:s,nextDisabled:!n})]})}function _m({agentName:e,guildId:t,setGuildId:n,channelId:r,setChannelId:l,requireMention:s,setRequireMention:i,onBack:a,onNext:u}){return o.jsxs("div",{className:"max-w-xl",children:[o.jsx(st,{step:4,total:6,title:"Pick a channel",subtitle:`Which channel in your server should ${e} listen to?`}),o.jsxs("div",{className:"bg-gray-800 border border-gray-700 rounded-xl p-4 mb-5",children:[o.jsx("p",{className:"text-sm text-gray-300 font-medium mb-3",children:"How to get your IDs:"}),o.jsxs(ce,{number:1,children:["Open Discord โ ",o.jsx("strong",{className:"text-white",children:"Settings"})," (gear icon) โ ",o.jsx("strong",{className:"text-white",children:"Advanced"})," โ turn on ",o.jsx("strong",{className:"text-white",children:"Developer Mode"})]}),o.jsxs(ce,{number:2,children:["Right-click your ",o.jsx("strong",{className:"text-white",children:"server name"})," in the sidebar โ ",o.jsx("strong",{className:"text-white",children:"Copy Server ID"})]}),o.jsxs(ce,{number:3,children:["Right-click the ",o.jsx("strong",{className:"text-white",children:"channel"})," where the bot should live โ ",o.jsx("strong",{className:"text-white",children:"Copy Channel ID"})]})]}),o.jsx(fr,{label:"Server ID",mono:!0,placeholder:"1464413706023731212",hint:"Right-click your server name โ Copy Server ID",value:t,onChange:n}),o.jsx(fr,{label:"Channel ID",mono:!0,placeholder:"1464413707005333704",hint:"Right-click the channel โ Copy Channel ID",value:r,onChange:l}),o.jsxs("div",{className:"mb-4",children:[o.jsx("p",{className:"text-sm text-gray-300 font-medium mb-2",children:"How should it respond?"}),o.jsx("div",{className:"space-y-2",children:[{value:!1,label:"Respond to every message in that channel",desc:"Good for a dedicated bot channel"},{value:!0,label:"Only when @mentioned",desc:"Good for a shared channel with other people"}].map(c=>o.jsxs("label",{className:`flex items-start gap-3 p-3 rounded-xl border cursor-pointer transition-colors ${s===c.value?"border-claw-500 bg-claw-900/20":"border-gray-700 bg-gray-800 hover:border-gray-600"}`,children:[o.jsx("input",{type:"radio",checked:s===c.value,onChange:()=>i(c.value),className:"mt-0.5 accent-claw-500"}),o.jsxs("div",{children:[o.jsx("div",{className:"text-sm text-gray-200",children:c.label}),o.jsx("div",{className:"text-xs text-gray-500",children:c.desc})]})]},String(c.value)))})]}),o.jsx(_t,{onBack:a,onNext:u,nextDisabled:!t.trim()})]})}function Tm({agentName:e,allowFrom:t,setAllowFrom:n,onBack:r,onNext:l}){const[s,i]=S.useState("");function a(){const u=s.trim();u&&!t.includes(u)&&n([...t,u]),i("")}return o.jsxs("div",{className:"max-w-xl",children:[o.jsx(st,{step:5,total:6,title:"Who can talk to it?",subtitle:`Only people you add here can message ${e}.`}),o.jsxs("div",{className:"bg-gray-800 border border-gray-700 rounded-xl p-4 mb-5",children:[o.jsx("p",{className:"text-sm text-gray-300 font-medium mb-2",children:"How to find your Discord user ID:"}),o.jsx(ce,{number:1,children:"Make sure Developer Mode is on (from the previous step)"}),o.jsxs(ce,{number:2,children:["Right-click ",o.jsx("strong",{className:"text-white",children:"your own name or avatar"})," anywhere in Discord โ ",o.jsx("strong",{className:"text-white",children:"Copy User ID"})]})]}),o.jsxs("div",{className:"mb-4",children:[o.jsx("label",{className:"block text-sm text-gray-300 font-medium mb-2",children:"Allowed user IDs"}),o.jsxs("div",{className:"flex gap-2 mb-2",children:[o.jsx("input",{value:s,onChange:u=>i(u.target.value),onKeyDown:u=>u.key==="Enter"&&a(),placeholder:"679071398756614175",className:"flex-1 bg-gray-800 border border-gray-700 rounded-xl px-4 py-2.5 text-sm text-gray-100 placeholder-gray-600 focus:outline-none focus:border-claw-500 font-mono"}),o.jsx("button",{onClick:a,className:"px-4 py-2 bg-claw-600 hover:bg-claw-500 text-white rounded-xl text-sm font-semibold transition-colors",children:"Add"})]}),t.length>0&&o.jsx("div",{className:"space-y-1",children:t.map(u=>o.jsxs("div",{className:"flex items-center justify-between bg-gray-800 border border-gray-700 rounded-lg px-3 py-2",children:[o.jsx("code",{className:"text-xs text-claw-400",children:u}),o.jsx("button",{onClick:()=>n(t.filter(c=>c!==u)),className:"text-gray-600 hover:text-red-400 text-xs transition-colors",children:"โ"})]},u))}),t.length===0&&o.jsx("p",{className:"text-xs text-yellow-500",children:"Add at least your own user ID so you can talk to it."})]}),o.jsx(_t,{onBack:r,onNext:l,nextDisabled:t.length===0})]})}function Fa({agentName:e,existingAgents:t,selected:n,setSelected:r,onBack:l,onNext:s,stepNum:i,totalSteps:a}){return t.length===0?(S.useEffect(()=>{s()},[]),null):o.jsxs("div",{className:"max-w-xl",children:[o.jsx(st,{step:i,total:a,title:"Agent teamwork",subtitle:`Should ${e} be able to delegate tasks to your other agents?`}),o.jsxs("p",{className:"text-sm text-gray-400 mb-4",children:["Select any agents that ",o.jsx("strong",{className:"text-white",children:e})," should be able to work with. We'll update both sides so they can talk to each other."]}),o.jsx("div",{className:"space-y-2 mb-4",children:t.map(u=>o.jsxs("label",{className:`flex items-center gap-3 p-3 rounded-xl border cursor-pointer transition-colors ${n.includes(u.id)?"border-claw-500 bg-claw-900/20":"border-gray-700 bg-gray-800 hover:border-gray-600"}`,children:[o.jsx("input",{type:"checkbox",checked:n.includes(u.id),onChange:c=>r(c.target.checked?[...n,u.id]:n.filter(m=>m!==u.id)),className:"accent-claw-500"}),o.jsx("span",{className:"text-lg",children:u.emoji}),o.jsxs("div",{children:[o.jsx("div",{className:"text-sm text-gray-200 font-medium",children:u.name}),o.jsx("div",{className:"text-xs text-gray-500",children:u.id})]})]},u.id))}),o.jsx("p",{className:"text-xs text-gray-600 mb-2",children:"You can always change this later by editing your OpenClaw config."}),o.jsx(_t,{onBack:l,onNext:s,nextLabel:"Save & continue โ"})]})}function Pm({alreadyConfigured:e,botToken:t,setBotToken:n,allowFrom:r,setAllowFrom:l,onBack:s,onNext:i}){const[a,u]=S.useState("");function c(){const m=a.trim();m&&!r.includes(m)&&l([...r,m]),u("")}return o.jsxs("div",{className:"max-w-xl",children:[o.jsx(st,{step:2,total:3,title:"Set up Telegram",subtitle:e?"You already have a Telegram bot. Just add your user ID below.":"Create a Telegram bot in about 2 minutes."}),!e&&o.jsxs(o.Fragment,{children:[o.jsxs(ce,{number:1,children:["Open Telegram and search for ",o.jsx("strong",{className:"text-white",children:"@BotFather"}),", or"," ",o.jsx(xl,{href:"https://t.me/BotFather",children:"open this link"}),"."]}),o.jsxs(ce,{number:2,children:["Send the message: ",o.jsx("code",{className:"bg-gray-800 px-1.5 py-0.5 rounded text-claw-400",children:"/newbot"})]}),o.jsxs(ce,{number:3,children:['BotFather will ask for a name and a username (must end in "bot"). When done, it gives you a ',o.jsx("strong",{className:"text-white",children:"token"})," โ copy it below."]}),o.jsx(fr,{label:"Bot Token",type:"password",mono:!0,placeholder:"8231064890:AAF2ojRBD...",value:t,onChange:n})]}),e&&o.jsx("div",{className:"bg-green-900/20 border border-green-700 rounded-xl p-4 mb-5",children:o.jsx("p",{className:"text-sm text-green-300",children:"โ Telegram bot already configured. Your new agent will use the same bot."})}),o.jsxs("div",{className:"border-t border-gray-700 pt-5 mt-2",children:[o.jsx("p",{className:"text-sm text-gray-300 font-medium mb-3",children:"Your Telegram user ID"}),o.jsxs(ce,{number:e?1:4,children:["Message ",o.jsx(xl,{href:"https://t.me/userinfobot",children:"@userinfobot"})," on Telegram (just send it any message) and it'll reply with your user ID."]}),o.jsxs("div",{className:"flex gap-2 mb-2",children:[o.jsx("input",{value:a,onChange:m=>u(m.target.value),onKeyDown:m=>m.key==="Enter"&&c(),placeholder:"7103027356",className:"flex-1 bg-gray-800 border border-gray-700 rounded-xl px-4 py-2.5 text-sm text-gray-100 placeholder-gray-600 focus:outline-none focus:border-claw-500 font-mono"}),o.jsx("button",{onClick:c,className:"px-4 py-2 bg-claw-600 hover:bg-claw-500 text-white rounded-xl text-sm font-semibold transition-colors",children:"Add"})]}),r.map(m=>o.jsxs("div",{className:"flex items-center justify-between bg-gray-800 border border-gray-700 rounded-lg px-3 py-2 mb-1",children:[o.jsx("code",{className:"text-xs text-claw-400",children:m}),o.jsx("button",{onClick:()=>l(r.filter(g=>g!==m)),className:"text-gray-600 hover:text-red-400 text-xs transition-colors",children:"โ"})]},m))]}),o.jsx(_t,{onBack:s,onNext:i,nextDisabled:!e&&!t.trim()})]})}function Ua({channel:e,agentName:t,onNext:n}){return o.jsx("div",{className:"max-w-xl",children:o.jsxs("div",{className:"text-center py-8",children:[o.jsx("div",{className:"text-5xl mb-4",children:e==="discord"?"๐ฎ":e==="telegram"?"โ๏ธ":"โ"}),o.jsx("h2",{className:"text-xl font-bold text-white mb-2",children:e==="skip"?"All set!":`${t} is connected!`}),o.jsxs("p",{className:"text-sm text-gray-400 mb-6",children:[e==="discord"&&"Your agent will appear in Discord once the OpenClaw gateway is running.",e==="telegram"&&"Your agent will respond in Telegram once the OpenClaw gateway is running.",e==="skip"&&"You can set up a channel later by editing your OpenClaw config."]}),e!=="skip"&&o.jsxs("div",{className:"bg-gray-800 border border-gray-700 rounded-xl p-4 text-left mb-6",children:[o.jsx("p",{className:"text-xs text-gray-500 uppercase tracking-wider mb-2 font-medium",children:"To go live"}),o.jsx("p",{className:"text-sm text-gray-300",children:"Make sure your OpenClaw gateway is running:"}),o.jsx("code",{className:"block mt-2 bg-gray-900 rounded-lg px-3 py-2 text-sm text-claw-400",children:"openclaw gateway"})]}),o.jsx("button",{onClick:n,className:"px-6 py-2.5 bg-green-700 hover:bg-green-600 text-white rounded-xl text-sm font-semibold transition-colors",children:"Run validation โ"})]})})}function Im(){var Z;const{teamSpec:e}=Ge(),{advance:t}=Cn(),n=((Z=e.agents)==null?void 0:Z[0])||{},r=n.id||"",l=n.name||r||"Your agent",[s,i]=S.useState(null),[a,u]=S.useState(0),[c,m]=S.useState(""),[g,h]=S.useState(""),[x,v]=S.useState(!1),[w,R]=S.useState(""),[p,d]=S.useState(""),[f,y]=S.useState(!1),[k,b]=S.useState([]),[E,T]=S.useState(!1),[z,L]=S.useState(""),[O,G]=S.useState([]),[te,Se]=S.useState([]),[re,ae]=S.useState([]),[$,C]=S.useState(!1),[N,I]=S.useState(""),[F,W]=S.useState(!1);S.useEffect(()=>{fetch("/api/channel/agents").then(A=>A.json()).then(A=>Se((A.agents||[]).filter(q=>q.id!==r))),fetch("/api/channel/telegram-status").then(A=>A.json()).then(A=>T(A.configured))},[]);async function ke(){C(!0),I("");try{const A={channel:s,agentId:r,agentName:l,agentComms:re,...s==="discord"&&{discord:{token:c,guildId:w,channelId:p,requireMention:f,allowFrom:k}},...s==="telegram"&&{telegram:{token:E?null:z,allowFrom:O}}},q=await fetch("/api/channel/setup",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(A)}),P=await q.json();if(!q.ok)throw new Error(P.error||"Save failed");W(!0)}catch(A){I(A.message)}finally{C(!1)}}if(!s)return o.jsxs("div",{className:"max-w-xl",children:[o.jsx(st,{step:1,total:1,title:"Connect your agent",subtitle:`How do you want to talk to ${l}?`}),o.jsx("div",{className:"space-y-3 mb-6",children:[{id:"discord",emoji:"๐ฎ",label:"Discord",desc:"Each agent gets its own bot. Best for teams and ongoing conversations.",badge:"Recommended"},{id:"telegram",emoji:"โ๏ธ",label:"Telegram",desc:"Simpler setup โ all your agents share one Telegram bot.",badge:null},{id:"skip",emoji:"โญ",label:"Skip for now",desc:"I'll set up a channel later.",badge:null}].map(A=>o.jsxs("button",{onClick:()=>{i(A.id),u(1)},className:"w-full flex items-start gap-4 p-4 bg-gray-800 border border-gray-700 hover:border-claw-500 rounded-xl text-left transition-colors group",children:[o.jsx("span",{className:"text-2xl mt-0.5",children:A.emoji}),o.jsxs("div",{className:"flex-1",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"text-sm font-semibold text-white",children:A.label}),A.badge&&o.jsx("span",{className:"text-xs bg-claw-800 text-claw-300 px-2 py-0.5 rounded-full",children:A.badge})]}),o.jsx("p",{className:"text-xs text-gray-400 mt-0.5",children:A.desc})]}),o.jsx("span",{className:"text-gray-600 group-hover:text-claw-400 transition-colors mt-0.5",children:"โ"})]},A.id))})]});if(s==="skip")return o.jsx(Ua,{channel:"skip",agentName:l,onNext:t});if(F)return o.jsx(Ua,{channel:s,agentName:l,onNext:t});if(s==="discord"){const A=te.length>0,q=A?6:5;if(a===1)return o.jsx(bm,{agentName:l,botToken:c,setBotToken:m,appId:g,setAppId:h,onBack:()=>i(null),onNext:()=>u(2)});if(a===2)return o.jsx(Em,{agentName:l,appId:g,confirmed:x,setConfirmed:v,onBack:()=>u(1),onNext:()=>u(3)});if(a===3)return o.jsx(_m,{agentName:l,guildId:w,setGuildId:R,channelId:p,setChannelId:d,requireMention:f,setRequireMention:y,onBack:()=>u(2),onNext:()=>u(4)});if(a===4)return o.jsx(Tm,{agentName:l,allowFrom:k,setAllowFrom:b,onBack:()=>u(3),onNext:()=>u(A?5:6)});if(a===5&&A)return o.jsx(Fa,{agentName:l,existingAgents:te,selected:re,setSelected:ae,stepNum:5,totalSteps:q,onBack:()=>u(4),onNext:()=>u(6)});if(a===6)return o.jsxs("div",{className:"max-w-xl",children:[o.jsx(st,{step:q,total:q,title:"All done โ save configuration",subtitle:"We'll write your Discord bot settings to openclaw.json."}),o.jsxs("div",{className:"bg-gray-800 border border-gray-700 rounded-xl p-4 mb-5 space-y-2 text-sm text-gray-300",children:[o.jsxs("div",{children:["๐ค Bot added to ",o.jsx("strong",{className:"text-white",children:l}),"'s account"]}),w&&o.jsxs("div",{children:["๐ฎ Server: ",o.jsx("code",{className:"text-claw-400",children:w})]}),p&&o.jsxs("div",{children:["๐ข Channel: ",o.jsx("code",{className:"text-claw-400",children:p})]}),k.length>0&&o.jsxs("div",{children:["๐ค ",k.length," allowed user",k.length>1?"s":""]}),re.length>0&&o.jsxs("div",{children:["๐ค Can collaborate with: ",re.join(", ")]})]}),N&&o.jsx("p",{className:"text-red-400 text-sm mb-4",children:N}),o.jsx(_t,{onBack:()=>u(A?5:4),onNext:ke,nextLabel:"Save & continue โ",saving:$})]})}if(s==="telegram"){const A=te.length>0;if(a===1)return o.jsx(Pm,{alreadyConfigured:E,botToken:z,setBotToken:L,allowFrom:O,setAllowFrom:G,onBack:()=>i(null),onNext:()=>u(A?2:3)});if(a===2&&A)return o.jsx(Fa,{agentName:l,existingAgents:te,selected:re,setSelected:ae,stepNum:2,totalSteps:3,onBack:()=>u(1),onNext:()=>u(3)});if(a===3)return o.jsxs("div",{className:"max-w-xl",children:[o.jsx(st,{step:A?3:2,total:A?3:2,title:"Save configuration",subtitle:"We'll write your Telegram settings to openclaw.json."}),o.jsxs("div",{className:"bg-gray-800 border border-gray-700 rounded-xl p-4 mb-5 space-y-2 text-sm text-gray-300",children:[E?o.jsx("div",{children:"โ๏ธ Using your existing Telegram bot"}):o.jsx("div",{children:"โ๏ธ New Telegram bot will be configured"}),O.length>0&&o.jsxs("div",{children:["๐ค ",O.length," allowed user",O.length>1?"s":""]}),re.length>0&&o.jsxs("div",{children:["๐ค Can collaborate with: ",re.join(", ")]})]}),N&&o.jsx("p",{className:"text-red-400 text-sm mb-4",children:N}),o.jsx(_t,{onBack:()=>u(A?2:1),onNext:ke,nextLabel:"Save & continue โ",saving:$})]})}return null}function Rm(){const{validationOutput:e,setValidationOutput:t,isValidating:n,setIsValidating:r,reset:l}=Ge(),{advance:s}=Cn(),[i,a]=S.useState(!1);async function u(){r(!0),t("");try{const m=await(await fetch("/api/validate",{method:"POST"})).json();t(m.output||"(no output)"),a(!0)}catch(c){t(`Error: ${c.message}`),a(!0)}finally{r(!1)}}return o.jsxs("div",{className:"max-w-2xl",children:[o.jsxs("p",{className:"text-sm text-gray-400 mb-6",children:["Run ",o.jsx("code",{className:"text-claw-400",children:"openclaw doctor"})," to validate the configuration."]}),o.jsx("button",{onClick:u,disabled:n,className:"mb-4 px-6 py-2 bg-claw-600 hover:bg-claw-500 text-white rounded-lg text-sm font-semibold transition-colors disabled:opacity-50",children:n?"โณ Running...":"Run openclaw doctor"}),(e||n)&&o.jsxs("div",{className:"bg-gray-950 border border-gray-700 rounded-xl overflow-hidden mb-6",children:[o.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 border-b border-gray-800 bg-gray-900",children:[o.jsx("div",{className:"w-3 h-3 rounded-full bg-red-500"}),o.jsx("div",{className:"w-3 h-3 rounded-full bg-yellow-500"}),o.jsx("div",{className:"w-3 h-3 rounded-full bg-green-500"}),o.jsx("span",{className:"text-xs text-gray-500 ml-2 font-mono",children:"terminal"})]}),o.jsx("pre",{className:"p-4 text-xs font-mono text-green-400 overflow-auto max-h-64 scrollbar-thin whitespace-pre-wrap",children:n?"Running openclaw doctor...":e})]}),i&&o.jsxs("div",{className:"flex gap-3 flex-wrap",children:[o.jsx("button",{onClick:s,className:"px-6 py-2 bg-claw-600 hover:bg-claw-500 text-white rounded-lg text-sm font-semibold transition-colors",children:"Chat with your agent โ"}),o.jsx("button",{onClick:l,className:"px-4 py-2 bg-gray-700 hover:bg-gray-600 text-gray-300 rounded-lg text-sm transition-colors",children:"Start new agent/team"})]})]})}function Lm(){const[e,t]=S.useState("idle"),[n,r]=S.useState(""),l=S.useRef(null);S.useEffect(()=>{l.current&&(l.current.scrollTop=l.current.scrollHeight)},[n]);async function s(){t("restarting"),r("");try{const a=(await fetch("/api/gateway/restart",{method:"POST"})).body.getReader(),u=new TextDecoder;let c="";for(;;){const{done:m,value:g}=await a.read();if(m)break;c+=u.decode(g,{stream:!0});const h=c.split(`
|
|
224
|
+
`);c=h.pop();for(const x of h)if(x.startsWith("data:"))try{const{type:v,data:w}=JSON.parse(x.slice(5).trim());v==="log"&&r(R=>R+w),v==="done"&&(t("done"),r(R=>R+`
|
|
225
|
+
โ `+w)),v==="error"&&(t("error"),r(R=>R+`
|
|
226
|
+
โ `+w))}catch{}}}catch(i){t("error"),r("Error: "+i.message)}}return o.jsxs("div",{className:"border border-gray-700 rounded-xl p-4 mb-6 bg-gray-800/30",children:[o.jsxs("div",{className:"flex items-center justify-between mb-2",children:[o.jsxs("div",{children:[o.jsx("p",{className:"text-sm font-semibold text-white",children:"OpenClaw Gateway"}),o.jsx("p",{className:"text-xs text-gray-500",children:"Restart so your new agent goes live on Discord / Telegram"})]}),e==="idle"&&o.jsx("button",{onClick:s,className:"px-4 py-1.5 bg-claw-600 hover:bg-claw-500 text-white rounded-lg text-xs font-semibold transition-colors",children:"Restart gateway"}),e==="restarting"&&o.jsx("span",{className:"text-xs text-gray-400 animate-pulse",children:"Restarting..."}),e==="done"&&o.jsx("span",{className:"text-xs text-green-400",children:"โ Live"}),e==="error"&&o.jsx("button",{onClick:s,className:"px-3 py-1.5 bg-gray-700 hover:bg-gray-600 text-gray-300 rounded-lg text-xs transition-colors",children:"Try again"})]}),n&&o.jsx("pre",{ref:l,className:"mt-2 h-20 bg-gray-950 border border-gray-800 rounded-lg p-2 text-xs font-mono text-green-400 overflow-y-auto scrollbar-thin whitespace-pre-wrap",children:n})]})}function Am({agent:e}){const{provider:t,apiKey:n,model:r,openclawEnv:l}=Dl(),[s,i]=S.useState([]),[a,u]=S.useState(""),[c,m]=S.useState(!1),[g,h]=S.useState(""),x=S.useRef(null),v=S.useRef(null);S.useEffect(()=>{var p;(p=x.current)==null||p.scrollIntoView({behavior:"smooth"})},[s,c]);async function w(){const p=a.trim();if(!p||c)return;u(""),h("");const d={role:"user",content:p},f=[...s,d];i(f),m(!0);try{const y=await fetch(`/api/agent-chat/${e.id}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({messages:f,...l?{}:{apiKey:n},provider:t,model:r})}),k=await y.json();if(!y.ok)throw new Error(k.error||"Chat failed");i([...f,{role:"assistant",content:k.content}])}catch(y){h(y.message)}finally{m(!1),setTimeout(()=>{var y;return(y=v.current)==null?void 0:y.focus()},100)}}function R(p){p.key==="Enter"&&!p.shiftKey&&(p.preventDefault(),w())}return o.jsxs("div",{className:"flex flex-col h-full",children:[o.jsx("div",{className:"mb-3 px-3 py-2 bg-gray-800/40 border border-gray-700/50 rounded-lg text-xs text-gray-500",children:"Preview mode โ personality and rules are loaded from your workspace files. External tools (web, shell, memory) require the gateway."}),o.jsxs("div",{className:"flex-1 overflow-y-auto space-y-3 py-2 scrollbar-thin min-h-0",children:[s.length===0&&o.jsxs("div",{className:"text-center text-gray-600 text-xs mt-8",children:["Say hello to ",e.name||e.id," to test how they respond."]}),s.map((p,d)=>o.jsx("div",{className:`flex ${p.role==="user"?"justify-end":"justify-start"}`,children:o.jsx("div",{className:`max-w-[80%] rounded-2xl px-3 py-2 text-sm leading-relaxed ${p.role==="user"?"bg-claw-700 text-white rounded-br-sm":"bg-gray-800 text-gray-100 rounded-bl-sm"}`,children:p.content.split(`
|
|
227
|
+
`).map((f,y)=>o.jsxs("span",{children:[f,y<p.content.split(`
|
|
228
|
+
`).length-1&&o.jsx("br",{})]},y))})},d)),c&&o.jsx("div",{className:"flex justify-start",children:o.jsx("div",{className:"bg-gray-800 rounded-2xl rounded-bl-sm px-3 py-2",children:o.jsxs("span",{className:"flex gap-1",children:[o.jsx("span",{className:"w-1.5 h-1.5 bg-gray-500 rounded-full animate-bounce",style:{animationDelay:"0ms"}}),o.jsx("span",{className:"w-1.5 h-1.5 bg-gray-500 rounded-full animate-bounce",style:{animationDelay:"150ms"}}),o.jsx("span",{className:"w-1.5 h-1.5 bg-gray-500 rounded-full animate-bounce",style:{animationDelay:"300ms"}})]})})}),g&&o.jsx("div",{className:"text-xs text-red-400 text-center",children:g}),o.jsx("div",{ref:x})]}),o.jsxs("div",{className:"border-t border-gray-800 pt-3",children:[o.jsxs("div",{className:"flex gap-2 items-end",children:[o.jsx("textarea",{ref:v,value:a,onChange:p=>u(p.target.value),onKeyDown:R,placeholder:`Message ${e.name||e.id}...`,rows:2,disabled:c,className:"flex-1 bg-gray-800 border border-gray-700 rounded-xl px-3 py-2 text-sm text-gray-100 placeholder-gray-600 focus:outline-none focus:border-claw-500 resize-none disabled:opacity-50 leading-relaxed"}),o.jsx("button",{onClick:w,disabled:c||!a.trim(),className:"px-4 py-2 bg-claw-600 hover:bg-claw-500 text-white rounded-xl text-sm font-semibold transition-colors disabled:opacity-40 shrink-0",children:"Send"})]}),o.jsx("p",{className:"text-xs text-gray-700 mt-1",children:"Enter to send ยท Shift+Enter for new line"})]})]})}function Om(){var i;const{teamSpec:e,reset:t}=Ge(),n=e.agents.filter(a=>a.id),[r,l]=S.useState(((i=n[0])==null?void 0:i.id)||""),s=n.find(a=>a.id===r)||n[0];return o.jsxs("div",{className:"flex flex-col h-full max-w-3xl mx-auto",children:[o.jsxs("div",{className:"mb-4",children:[o.jsxs("h2",{className:"text-lg font-bold text-white mb-1",children:["Your agent",n.length>1?"s are":" is"," ready"]}),o.jsxs("p",{className:"text-sm text-gray-400",children:["Chat with ",n.length>1?"them":"it"," below to test personality and responses, then restart the gateway to go live."]})]}),o.jsx(Lm,{}),n.length>1&&o.jsx("div",{className:"flex gap-1 mb-4 border-b border-gray-800 pb-0",children:n.map(a=>o.jsx("button",{onClick:()=>l(a.id),className:`px-4 py-2 text-sm font-medium rounded-t-lg transition-colors -mb-px border-b-2 ${r===a.id?"text-white border-claw-500 bg-gray-800/40":"text-gray-500 border-transparent hover:text-gray-300 hover:border-gray-600"}`,children:a.name||a.id},a.id))}),o.jsx("div",{className:"flex-1 min-h-0 border border-gray-800 rounded-xl p-4 bg-gray-900/20",children:s&&o.jsx(Am,{agent:s},s.id)}),o.jsxs("div",{className:"pt-4 flex justify-between items-center",children:[o.jsx("button",{onClick:t,className:"text-xs text-gray-600 hover:text-gray-400 transition-colors",children:"Build another agent โ"}),o.jsx("p",{className:"text-xs text-gray-700",children:"Full capabilities available once the gateway is running"})]})]})}const Dm=[ad,vm,Sm,Cm,Im,Rm,Om];function zm(){const e=Ge(s=>s.phase),t=Ge(s=>s.reset),{configured:n,reset:r}=Dl(),l=Dm[e]||ad;return o.jsxs("div",{className:"flex flex-col h-screen",children:[o.jsxs("header",{className:"flex items-center justify-between px-6 py-3 border-b border-gray-800 shrink-0",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("span",{className:"text-lg font-bold text-claw-400",children:"๐ฆ OpenClaw"}),o.jsx("span",{className:"text-gray-600 hidden sm:block",children:"Agent Builder"})]}),o.jsxs("div",{className:"flex items-center gap-4",children:[n&&o.jsx("button",{onClick:r,className:"text-xs text-gray-600 hover:text-gray-400 transition-colors",children:"Change AI"}),o.jsx("button",{onClick:()=>{(e===0||confirm("Start over? Your conversation will be lost."))&&t()},className:"text-xs text-gray-600 hover:text-gray-400 transition-colors",children:"Start over"})]})]}),e>0&&o.jsx("div",{className:"px-6 py-3 border-b border-gray-800 shrink-0",children:o.jsx(dm,{currentPhase:e})}),o.jsx("div",{className:"flex-1 overflow-y-auto flex flex-col px-6 py-4",children:o.jsx(l,{})})]})}function Mm(){const[e,t]=S.useState(!1);return e?o.jsx(zm,{}):o.jsx(zp,{onReady:()=>t(!0)})}ds.createRoot(document.getElementById("root")).render(o.jsx(Za.StrictMode,{children:o.jsx(Mm,{})}));
|