openclaw-agent-builder 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/index-C9IXUW-V.css +1 -0
- package/dist/assets/index-CHYw1YB7.js +263 -0
- package/dist/index.html +2 -2
- package/electron/icons/icon.icns +0 -0
- package/electron/icons/icon.ico +0 -0
- package/electron/icons/icon.png +0 -0
- package/electron/main.js +161 -0
- package/package.json +14 -2
- package/server/index.js +5 -4
- package/server/routes/chat.js +6 -3
- package/server/utils/paths.js +19 -0
- package/dist/assets/index-C7Hk4nus.css +0 -1
- package/dist/assets/index-CpVghac4.js +0 -227
|
@@ -1,227 +0,0 @@
|
|
|
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 Ba(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ha={exports:{}},wl={},Va={exports:{}},O={};/**
|
|
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 mr=Symbol.for("react.element"),fd=Symbol.for("react.portal"),pd=Symbol.for("react.fragment"),md=Symbol.for("react.strict_mode"),hd=Symbol.for("react.profiler"),gd=Symbol.for("react.provider"),yd=Symbol.for("react.context"),xd=Symbol.for("react.forward_ref"),vd=Symbol.for("react.suspense"),wd=Symbol.for("react.memo"),kd=Symbol.for("react.lazy"),Ni=Symbol.iterator;function Sd(e){return e===null||typeof e!="object"?null:(e=Ni&&e[Ni]||e["@@iterator"],typeof e=="function"?e:null)}var Ka={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ga=Object.assign,Qa={};function jn(e,t,n){this.props=e,this.context=t,this.refs=Qa,this.updater=n||Ka}jn.prototype.isReactComponent={};jn.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")};jn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Ya(){}Ya.prototype=jn.prototype;function oo(e,t,n){this.props=e,this.context=t,this.refs=Qa,this.updater=n||Ka}var io=oo.prototype=new Ya;io.constructor=oo;Ga(io,jn.prototype);io.isPureReactComponent=!0;var bi=Array.isArray,Xa=Object.prototype.hasOwnProperty,ao={current:null},Ja={key:!0,ref:!0,__self:!0,__source:!0};function Za(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)Xa.call(t,r)&&!Ja.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:mr,type:e,key:s,ref:i,props:l,_owner:ao.current}}function jd(e,t){return{$$typeof:mr,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function uo(e){return typeof e=="object"&&e!==null&&e.$$typeof===mr}function Nd(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Ci=/\/+/g;function Ml(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Nd(""+e.key):t.toString(36)}function zr(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 mr:case fd:i=!0}}if(i)return i=e,l=l(i),e=r===""?"."+Ml(i,0):r,bi(l)?(n="",e!=null&&(n=e.replace(Ci,"$&/")+"/"),zr(l,t,n,"",function(c){return c})):l!=null&&(uo(l)&&(l=jd(l,n+(!l.key||i&&i.key===l.key?"":(""+l.key).replace(Ci,"$&/")+"/")+e)),t.push(l)),1;if(i=0,r=r===""?".":r+":",bi(e))for(var a=0;a<e.length;a++){s=e[a];var u=r+Ml(s,a);i+=zr(s,t,n,u,l)}else if(u=Sd(e),typeof u=="function")for(e=u.call(e),a=0;!(s=e.next()).done;)s=s.value,u=r+Ml(s,a++),i+=zr(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 vr(e,t,n){if(e==null)return e;var r=[],l=0;return zr(e,r,"","",function(s){return t.call(n,s,l++)}),r}function bd(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 xe={current:null},Mr={transition:null},Cd={ReactCurrentDispatcher:xe,ReactCurrentBatchConfig:Mr,ReactCurrentOwner:ao};function qa(){throw Error("act(...) is not supported in production builds of React.")}O.Children={map:vr,forEach:function(e,t,n){vr(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return vr(e,function(){t++}),t},toArray:function(e){return vr(e,function(t){return t})||[]},only:function(e){if(!uo(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};O.Component=jn;O.Fragment=pd;O.Profiler=hd;O.PureComponent=oo;O.StrictMode=md;O.Suspense=vd;O.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Cd;O.act=qa;O.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=Ga({},e.props),l=e.key,s=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,i=ao.current),t.key!==void 0&&(l=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(u in t)Xa.call(t,u)&&!Ja.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:mr,type:e.type,key:l,ref:s,props:r,_owner:i}};O.createContext=function(e){return e={$$typeof:yd,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:gd,_context:e},e.Consumer=e};O.createElement=Za;O.createFactory=function(e){var t=Za.bind(null,e);return t.type=e,t};O.createRef=function(){return{current:null}};O.forwardRef=function(e){return{$$typeof:xd,render:e}};O.isValidElement=uo;O.lazy=function(e){return{$$typeof:kd,_payload:{_status:-1,_result:e},_init:bd}};O.memo=function(e,t){return{$$typeof:wd,type:e,compare:t===void 0?null:t}};O.startTransition=function(e){var t=Mr.transition;Mr.transition={};try{e()}finally{Mr.transition=t}};O.unstable_act=qa;O.useCallback=function(e,t){return xe.current.useCallback(e,t)};O.useContext=function(e){return xe.current.useContext(e)};O.useDebugValue=function(){};O.useDeferredValue=function(e){return xe.current.useDeferredValue(e)};O.useEffect=function(e,t){return xe.current.useEffect(e,t)};O.useId=function(){return xe.current.useId()};O.useImperativeHandle=function(e,t,n){return xe.current.useImperativeHandle(e,t,n)};O.useInsertionEffect=function(e,t){return xe.current.useInsertionEffect(e,t)};O.useLayoutEffect=function(e,t){return xe.current.useLayoutEffect(e,t)};O.useMemo=function(e,t){return xe.current.useMemo(e,t)};O.useReducer=function(e,t,n){return xe.current.useReducer(e,t,n)};O.useRef=function(e){return xe.current.useRef(e)};O.useState=function(e){return xe.current.useState(e)};O.useSyncExternalStore=function(e,t,n){return xe.current.useSyncExternalStore(e,t,n)};O.useTransition=function(){return xe.current.useTransition()};O.version="18.3.1";Va.exports=O;var w=Va.exports;const eu=Ba(w);/**
|
|
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 Ed=w,_d=Symbol.for("react.element"),Td=Symbol.for("react.fragment"),Pd=Object.prototype.hasOwnProperty,Id=Ed.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Rd={key:!0,ref:!0,__self:!0,__source:!0};function tu(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)Pd.call(t,r)&&!Rd.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:_d,type:e,key:s,ref:i,props:l,_owner:Id.current}}wl.Fragment=Td;wl.jsx=tu;wl.jsxs=tu;Ha.exports=wl;var o=Ha.exports,fs={},nu={exports:{}},Ie={},ru={exports:{}},lu={};/**
|
|
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(b,C){var I=b.length;b.push(C);e:for(;0<I;){var F=I-1>>>1,$=b[F];if(0<l($,C))b[F]=C,b[I]=$,I=F;else break e}}function n(b){return b.length===0?null:b[0]}function r(b){if(b.length===0)return null;var C=b[0],I=b.pop();if(I!==C){b[0]=I;e:for(var F=0,$=b.length,Ce=$>>>1;F<Ce;){var q=2*(F+1)-1,Le=b[q],A=q+1,_=b[A];if(0>l(Le,I))A<$&&0>l(_,Le)?(b[F]=_,b[A]=I,F=A):(b[F]=Le,b[q]=I,F=q);else if(A<$&&0>l(_,I))b[F]=_,b[A]=I,F=A;else break e}}return C}function l(b,C){var I=b.sortIndex-C.sortIndex;return I!==0?I:b.id-C.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=[],h=1,g=null,m=3,x=!1,v=!1,k=!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(b){for(var C=n(c);C!==null;){if(C.callback===null)r(c);else if(C.startTime<=b)r(c),C.sortIndex=C.expirationTime,t(u,C);else break;C=n(c)}}function y(b){if(k=!1,f(b),!v)if(n(u)!==null)v=!0,J(S);else{var C=n(c);C!==null&&B(y,C.startTime-b)}}function S(b,C){v=!1,k&&(k=!1,p(T),T=-1),x=!0;var I=m;try{for(f(C),g=n(u);g!==null&&(!(g.expirationTime>C)||b&&!z());){var F=g.callback;if(typeof F=="function"){g.callback=null,m=g.priorityLevel;var $=F(g.expirationTime<=C);C=e.unstable_now(),typeof $=="function"?g.callback=$:g===n(u)&&r(u),f(C)}else r(u);g=n(u)}if(g!==null)var Ce=!0;else{var q=n(c);q!==null&&B(y,q.startTime-C),Ce=!1}return Ce}finally{g=null,m=I,x=!1}}var N=!1,E=null,T=-1,D=5,L=-1;function z(){return!(e.unstable_now()-L<D)}function W(){if(E!==null){var b=e.unstable_now();L=b;var C=!0;try{C=E(!0,b)}finally{C?oe():(N=!1,E=null)}}else N=!1}var oe;if(typeof d=="function")oe=function(){d(W)};else if(typeof MessageChannel<"u"){var ie=new MessageChannel,be=ie.port2;ie.port1.onmessage=W,oe=function(){be.postMessage(null)}}else oe=function(){R(W,0)};function J(b){E=b,N||(N=!0,oe())}function B(b,C){T=R(function(){b(e.unstable_now())},C)}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(b){b.callback=null},e.unstable_continueExecution=function(){v||x||(v=!0,J(S))},e.unstable_forceFrameRate=function(b){0>b||125<b?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<b?Math.floor(1e3/b):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(b){switch(m){case 1:case 2:case 3:var C=3;break;default:C=m}var I=m;m=C;try{return b()}finally{m=I}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(b,C){switch(b){case 1:case 2:case 3:case 4:case 5:break;default:b=3}var I=m;m=b;try{return C()}finally{m=I}},e.unstable_scheduleCallback=function(b,C,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,b){case 1:var $=-1;break;case 2:$=250;break;case 5:$=1073741823;break;case 4:$=1e4;break;default:$=5e3}return $=I+$,b={id:h++,callback:C,priorityLevel:b,startTime:I,expirationTime:$,sortIndex:-1},I>F?(b.sortIndex=I,t(c,b),n(u)===null&&b===n(c)&&(k?(p(T),T=-1):k=!0,B(y,I-F))):(b.sortIndex=$,t(u,b),v||x||(v=!0,J(S))),b},e.unstable_shouldYield=z,e.unstable_wrapCallback=function(b){var C=m;return function(){var I=m;m=C;try{return b.apply(this,arguments)}finally{m=I}}}})(lu);ru.exports=lu;var Ld=ru.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 Ad=w,Pe=Ld;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 su=new Set,Xn={};function Ht(e,t){hn(e,t),hn(e+"Capture",t)}function hn(e,t){for(Xn[e]=t,e=0;e<t.length;e++)su.add(t[e])}var ot=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ps=Object.prototype.hasOwnProperty,Od=/^[: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]*$/,Ei={},_i={};function Dd(e){return ps.call(_i,e)?!0:ps.call(Ei,e)?!1:Od.test(e)?_i[e]=!0:(Ei[e]=!0,!1)}function zd(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 Md(e,t,n,r){if(t===null||typeof t>"u"||zd(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 ve(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 de={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){de[e]=new ve(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];de[t]=new ve(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){de[e]=new ve(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){de[e]=new ve(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){de[e]=new ve(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){de[e]=new ve(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){de[e]=new ve(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){de[e]=new ve(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){de[e]=new ve(e,5,!1,e.toLowerCase(),null,!1,!1)});var co=/[\-:]([a-z])/g;function fo(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(co,fo);de[t]=new ve(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(co,fo);de[t]=new ve(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(co,fo);de[t]=new ve(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){de[e]=new ve(e,1,!1,e.toLowerCase(),null,!1,!1)});de.xlinkHref=new ve("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){de[e]=new ve(e,1,!1,e.toLowerCase(),null,!0,!0)});function po(e,t,n,r){var l=de.hasOwnProperty(t)?de[t]:null;(l!==null?l.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Md(t,n,l,r)&&(n=null),r||l===null?Dd(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=Ad.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,wr=Symbol.for("react.element"),Xt=Symbol.for("react.portal"),Jt=Symbol.for("react.fragment"),mo=Symbol.for("react.strict_mode"),ms=Symbol.for("react.profiler"),ou=Symbol.for("react.provider"),iu=Symbol.for("react.context"),ho=Symbol.for("react.forward_ref"),hs=Symbol.for("react.suspense"),gs=Symbol.for("react.suspense_list"),go=Symbol.for("react.memo"),ft=Symbol.for("react.lazy"),au=Symbol.for("react.offscreen"),Ti=Symbol.iterator;function En(e){return e===null||typeof e!="object"?null:(e=Ti&&e[Ti]||e["@@iterator"],typeof e=="function"?e:null)}var X=Object.assign,Fl;function zn(e){if(Fl===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Fl=t&&t[1]||""}return`
|
|
34
|
-
`+Fl+e}var Ul=!1;function Wl(e,t){if(!e||Ul)return"";Ul=!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{Ul=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?zn(e):""}function Fd(e){switch(e.tag){case 5:return zn(e.type);case 16:return zn("Lazy");case 13:return zn("Suspense");case 19:return zn("SuspenseList");case 0:case 2:case 15:return e=Wl(e.type,!1),e;case 11:return e=Wl(e.type.render,!1),e;case 1:return e=Wl(e.type,!0),e;default:return""}}function ys(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 Jt:return"Fragment";case Xt:return"Portal";case ms:return"Profiler";case mo:return"StrictMode";case hs:return"Suspense";case gs:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case iu:return(e.displayName||"Context")+".Consumer";case ou:return(e._context.displayName||"Context")+".Provider";case ho:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case go:return t=e.displayName||null,t!==null?t:ys(e.type)||"Memo";case ft:t=e._payload,e=e._init;try{return ys(e(t))}catch{}}return null}function Ud(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 ys(t);case 8:return t===mo?"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 Ct(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function uu(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Wd(e){var t=uu(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 kr(e){e._valueTracker||(e._valueTracker=Wd(e))}function cu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=uu(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Yr(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 xs(e,t){var n=t.checked;return X({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Pi(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ct(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 du(e,t){t=t.checked,t!=null&&po(e,"checked",t,!1)}function vs(e,t){du(e,t);var n=Ct(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")?ws(e,t.type,n):t.hasOwnProperty("defaultValue")&&ws(e,t.type,Ct(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ii(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 ws(e,t,n){(t!=="number"||Yr(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Mn=Array.isArray;function un(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=""+Ct(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 ks(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(j(91));return X({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Ri(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(Mn(n)){if(1<n.length)throw Error(j(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Ct(n)}}function fu(e,t){var n=Ct(t.value),r=Ct(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 Li(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function pu(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"?pu(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Sr,mu=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 Jn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Wn={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},$d=["Webkit","ms","Moz","O"];Object.keys(Wn).forEach(function(e){$d.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Wn[t]=Wn[e]})});function hu(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Wn.hasOwnProperty(e)&&Wn[e]?(""+t).trim():t+"px"}function gu(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=hu(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var Bd=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 js(e,t){if(t){if(Bd[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 Ns(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 bs=null;function yo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Cs=null,cn=null,dn=null;function Ai(e){if(e=yr(e)){if(typeof Cs!="function")throw Error(j(280));var t=e.stateNode;t&&(t=bl(t),Cs(e.stateNode,e.type,t))}}function yu(e){cn?dn?dn.push(e):dn=[e]:cn=e}function xu(){if(cn){var e=cn,t=dn;if(dn=cn=null,Ai(e),t)for(e=0;e<t.length;e++)Ai(t[e])}}function vu(e,t){return e(t)}function wu(){}var $l=!1;function ku(e,t,n){if($l)return e(t,n);$l=!0;try{return vu(e,t,n)}finally{$l=!1,(cn!==null||dn!==null)&&(wu(),xu())}}function Zn(e,t){var n=e.stateNode;if(n===null)return null;var r=bl(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 Es=!1;if(ot)try{var _n={};Object.defineProperty(_n,"passive",{get:function(){Es=!0}}),window.addEventListener("test",_n,_n),window.removeEventListener("test",_n,_n)}catch{Es=!1}function Hd(e,t,n,r,l,s,i,a,u){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(h){this.onError(h)}}var $n=!1,Xr=null,Jr=!1,_s=null,Vd={onError:function(e){$n=!0,Xr=e}};function Kd(e,t,n,r,l,s,i,a,u){$n=!1,Xr=null,Hd.apply(Vd,arguments)}function Gd(e,t,n,r,l,s,i,a,u){if(Kd.apply(this,arguments),$n){if($n){var c=Xr;$n=!1,Xr=null}else throw Error(j(198));Jr||(Jr=!0,_s=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 Su(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 Oi(e){if(Vt(e)!==e)throw Error(j(188))}function Qd(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 Oi(l),e;if(s===r)return Oi(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 ju(e){return e=Qd(e),e!==null?Nu(e):null}function Nu(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Nu(e);if(t!==null)return t;e=e.sibling}return null}var bu=Pe.unstable_scheduleCallback,Di=Pe.unstable_cancelCallback,Yd=Pe.unstable_shouldYield,Xd=Pe.unstable_requestPaint,ee=Pe.unstable_now,Jd=Pe.unstable_getCurrentPriorityLevel,xo=Pe.unstable_ImmediatePriority,Cu=Pe.unstable_UserBlockingPriority,Zr=Pe.unstable_NormalPriority,Zd=Pe.unstable_LowPriority,Eu=Pe.unstable_IdlePriority,kl=null,Ze=null;function qd(e){if(Ze&&typeof Ze.onCommitFiberRoot=="function")try{Ze.onCommitFiberRoot(kl,e,void 0,(e.current.flags&128)===128)}catch{}}var Ve=Math.clz32?Math.clz32:nf,ef=Math.log,tf=Math.LN2;function nf(e){return e>>>=0,e===0?32:31-(ef(e)/tf|0)|0}var jr=64,Nr=4194304;function Fn(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 qr(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=Fn(a):(s&=i,s!==0&&(r=Fn(s)))}else i=n&~l,i!==0?r=Fn(i):s!==0&&(r=Fn(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-Ve(t),l=1<<n,r|=e[n],t&=~l;return r}function rf(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 lf(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,l=e.expirationTimes,s=e.pendingLanes;0<s;){var i=31-Ve(s),a=1<<i,u=l[i];u===-1?(!(a&n)||a&r)&&(l[i]=rf(a,t)):u<=t&&(e.expiredLanes|=a),s&=~a}}function Ts(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function _u(){var e=jr;return jr<<=1,!(jr&4194240)&&(jr=64),e}function Bl(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function hr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ve(t),e[t]=n}function sf(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-Ve(n),s=1<<l;t[l]=0,r[l]=-1,e[l]=-1,n&=~s}}function vo(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ve(n),l=1<<r;l&t|e[r]&t&&(e[r]|=t),n&=~l}}var U=0;function Tu(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Pu,wo,Iu,Ru,Lu,Ps=!1,br=[],xt=null,vt=null,wt=null,qn=new Map,er=new Map,mt=[],of="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 zi(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":qn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":er.delete(t.pointerId)}}function Tn(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=yr(t),t!==null&&wo(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function af(e,t,n,r,l){switch(t){case"focusin":return xt=Tn(xt,e,t,n,r,l),!0;case"dragenter":return vt=Tn(vt,e,t,n,r,l),!0;case"mouseover":return wt=Tn(wt,e,t,n,r,l),!0;case"pointerover":var s=l.pointerId;return qn.set(s,Tn(qn.get(s)||null,e,t,n,r,l)),!0;case"gotpointercapture":return s=l.pointerId,er.set(s,Tn(er.get(s)||null,e,t,n,r,l)),!0}return!1}function Au(e){var t=At(e.target);if(t!==null){var n=Vt(t);if(n!==null){if(t=n.tag,t===13){if(t=Su(n),t!==null){e.blockedOn=t,Lu(e.priority,function(){Iu(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 Fr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Is(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);bs=r,n.target.dispatchEvent(r),bs=null}else return t=yr(n),t!==null&&wo(t),e.blockedOn=n,!1;t.shift()}return!0}function Mi(e,t,n){Fr(e)&&n.delete(t)}function uf(){Ps=!1,xt!==null&&Fr(xt)&&(xt=null),vt!==null&&Fr(vt)&&(vt=null),wt!==null&&Fr(wt)&&(wt=null),qn.forEach(Mi),er.forEach(Mi)}function Pn(e,t){e.blockedOn===t&&(e.blockedOn=null,Ps||(Ps=!0,Pe.unstable_scheduleCallback(Pe.unstable_NormalPriority,uf)))}function tr(e){function t(l){return Pn(l,e)}if(0<br.length){Pn(br[0],e);for(var n=1;n<br.length;n++){var r=br[n];r.blockedOn===e&&(r.blockedOn=null)}}for(xt!==null&&Pn(xt,e),vt!==null&&Pn(vt,e),wt!==null&&Pn(wt,e),qn.forEach(t),er.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);)Au(n),n.blockedOn===null&&mt.shift()}var fn=ct.ReactCurrentBatchConfig,el=!0;function cf(e,t,n,r){var l=U,s=fn.transition;fn.transition=null;try{U=1,ko(e,t,n,r)}finally{U=l,fn.transition=s}}function df(e,t,n,r){var l=U,s=fn.transition;fn.transition=null;try{U=4,ko(e,t,n,r)}finally{U=l,fn.transition=s}}function ko(e,t,n,r){if(el){var l=Is(e,t,n,r);if(l===null)ql(e,t,r,tl,n),zi(e,r);else if(af(l,e,t,n,r))r.stopPropagation();else if(zi(e,r),t&4&&-1<of.indexOf(e)){for(;l!==null;){var s=yr(l);if(s!==null&&Pu(s),s=Is(e,t,n,r),s===null&&ql(e,t,r,tl,n),s===l)break;l=s}l!==null&&r.stopPropagation()}else ql(e,t,r,null,n)}}var tl=null;function Is(e,t,n,r){if(tl=null,e=yo(r),e=At(e),e!==null)if(t=Vt(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Su(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 tl=e,null}function Ou(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(Jd()){case xo:return 1;case Cu:return 4;case Zr:case Zd:return 16;case Eu:return 536870912;default:return 16}default:return 16}}var gt=null,So=null,Ur=null;function Du(){if(Ur)return Ur;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 Ur=l.slice(e,1<r?1-r:void 0)}function Wr(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 Fi(){return!1}function Re(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:Fi,this.isPropagationStopped=Fi,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 Nn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},jo=Re(Nn),gr=X({},Nn,{view:0,detail:0}),ff=Re(gr),Hl,Vl,In,Sl=X({},gr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:No,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!==In&&(In&&e.type==="mousemove"?(Hl=e.screenX-In.screenX,Vl=e.screenY-In.screenY):Vl=Hl=0,In=e),Hl)},movementY:function(e){return"movementY"in e?e.movementY:Vl}}),Ui=Re(Sl),pf=X({},Sl,{dataTransfer:0}),mf=Re(pf),hf=X({},gr,{relatedTarget:0}),Kl=Re(hf),gf=X({},Nn,{animationName:0,elapsedTime:0,pseudoElement:0}),yf=Re(gf),xf=X({},Nn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),vf=Re(xf),wf=X({},Nn,{data:0}),Wi=Re(wf),kf={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Sf={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"},jf={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Nf(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=jf[e])?!!t[e]:!1}function No(){return Nf}var bf=X({},gr,{key:function(e){if(e.key){var t=kf[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Wr(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Sf[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:No,charCode:function(e){return e.type==="keypress"?Wr(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Wr(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Cf=Re(bf),Ef=X({},Sl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),$i=Re(Ef),_f=X({},gr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:No}),Tf=Re(_f),Pf=X({},Nn,{propertyName:0,elapsedTime:0,pseudoElement:0}),If=Re(Pf),Rf=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}),Lf=Re(Rf),Af=[9,13,27,32],bo=ot&&"CompositionEvent"in window,Bn=null;ot&&"documentMode"in document&&(Bn=document.documentMode);var Of=ot&&"TextEvent"in window&&!Bn,zu=ot&&(!bo||Bn&&8<Bn&&11>=Bn),Bi=" ",Hi=!1;function Mu(e,t){switch(e){case"keyup":return Af.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Fu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Zt=!1;function Df(e,t){switch(e){case"compositionend":return Fu(t);case"keypress":return t.which!==32?null:(Hi=!0,Bi);case"textInput":return e=t.data,e===Bi&&Hi?null:e;default:return null}}function zf(e,t){if(Zt)return e==="compositionend"||!bo&&Mu(e,t)?(e=Du(),Ur=So=gt=null,Zt=!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 zu&&t.locale!=="ko"?null:t.data;default:return null}}var Mf={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 Vi(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Mf[e.type]:t==="textarea"}function Uu(e,t,n,r){yu(r),t=nl(t,"onChange"),0<t.length&&(n=new jo("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Hn=null,nr=null;function Ff(e){Ju(e,0)}function jl(e){var t=tn(e);if(cu(t))return e}function Uf(e,t){if(e==="change")return t}var Wu=!1;if(ot){var Gl;if(ot){var Ql="oninput"in document;if(!Ql){var Ki=document.createElement("div");Ki.setAttribute("oninput","return;"),Ql=typeof Ki.oninput=="function"}Gl=Ql}else Gl=!1;Wu=Gl&&(!document.documentMode||9<document.documentMode)}function Gi(){Hn&&(Hn.detachEvent("onpropertychange",$u),nr=Hn=null)}function $u(e){if(e.propertyName==="value"&&jl(nr)){var t=[];Uu(t,nr,e,yo(e)),ku(Ff,t)}}function Wf(e,t,n){e==="focusin"?(Gi(),Hn=t,nr=n,Hn.attachEvent("onpropertychange",$u)):e==="focusout"&&Gi()}function $f(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return jl(nr)}function Bf(e,t){if(e==="click")return jl(t)}function Hf(e,t){if(e==="input"||e==="change")return jl(t)}function Vf(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ge=typeof Object.is=="function"?Object.is:Vf;function rr(e,t){if(Ge(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(!ps.call(t,l)||!Ge(e[l],t[l]))return!1}return!0}function Qi(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Yi(e,t){var n=Qi(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=Qi(n)}}function Bu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Bu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Hu(){for(var e=window,t=Yr();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Yr(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 Kf(e){var t=Hu(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Bu(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=Yi(n,s);var i=Yi(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 Gf=ot&&"documentMode"in document&&11>=document.documentMode,qt=null,Rs=null,Vn=null,Ls=!1;function Xi(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ls||qt==null||qt!==Yr(r)||(r=qt,"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}),Vn&&rr(Vn,r)||(Vn=r,r=nl(Rs,"onSelect"),0<r.length&&(t=new jo("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=qt)))}function Er(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var en={animationend:Er("Animation","AnimationEnd"),animationiteration:Er("Animation","AnimationIteration"),animationstart:Er("Animation","AnimationStart"),transitionend:Er("Transition","TransitionEnd")},Yl={},Vu={};ot&&(Vu=document.createElement("div").style,"AnimationEvent"in window||(delete en.animationend.animation,delete en.animationiteration.animation,delete en.animationstart.animation),"TransitionEvent"in window||delete en.transitionend.transition);function Nl(e){if(Yl[e])return Yl[e];if(!en[e])return e;var t=en[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Vu)return Yl[e]=t[n];return e}var Ku=Nl("animationend"),Gu=Nl("animationiteration"),Qu=Nl("animationstart"),Yu=Nl("transitionend"),Xu=new Map,Ji="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){Xu.set(e,t),Ht(t,[e])}for(var Xl=0;Xl<Ji.length;Xl++){var Jl=Ji[Xl],Qf=Jl.toLowerCase(),Yf=Jl[0].toUpperCase()+Jl.slice(1);Tt(Qf,"on"+Yf)}Tt(Ku,"onAnimationEnd");Tt(Gu,"onAnimationIteration");Tt(Qu,"onAnimationStart");Tt("dblclick","onDoubleClick");Tt("focusin","onFocus");Tt("focusout","onBlur");Tt(Yu,"onTransitionEnd");hn("onMouseEnter",["mouseout","mouseover"]);hn("onMouseLeave",["mouseout","mouseover"]);hn("onPointerEnter",["pointerout","pointerover"]);hn("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 Un="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(" "),Xf=new Set("cancel close invalid load scroll toggle".split(" ").concat(Un));function Zi(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Gd(r,t,void 0,e),e.currentTarget=null}function Ju(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;Zi(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;Zi(l,a,c),s=u}}}if(Jr)throw e=_s,Jr=!1,_s=null,e}function V(e,t){var n=t[Ms];n===void 0&&(n=t[Ms]=new Set);var r=e+"__bubble";n.has(r)||(Zu(t,e,2,!1),n.add(r))}function Zl(e,t,n){var r=0;t&&(r|=4),Zu(n,e,r,t)}var _r="_reactListening"+Math.random().toString(36).slice(2);function lr(e){if(!e[_r]){e[_r]=!0,su.forEach(function(n){n!=="selectionchange"&&(Xf.has(n)||Zl(n,!1,e),Zl(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[_r]||(t[_r]=!0,Zl("selectionchange",!1,t))}}function Zu(e,t,n,r){switch(Ou(t)){case 1:var l=cf;break;case 4:l=df;break;default:l=ko}n=l.bind(null,t,n,e),l=void 0,!Es||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 ql(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}ku(function(){var c=s,h=yo(n),g=[];e:{var m=Xu.get(e);if(m!==void 0){var x=jo,v=e;switch(e){case"keypress":if(Wr(n)===0)break e;case"keydown":case"keyup":x=Cf;break;case"focusin":v="focus",x=Kl;break;case"focusout":v="blur",x=Kl;break;case"beforeblur":case"afterblur":x=Kl;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=Ui;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":x=mf;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":x=Tf;break;case Ku:case Gu:case Qu:x=yf;break;case Yu:x=If;break;case"scroll":x=ff;break;case"wheel":x=Lf;break;case"copy":case"cut":case"paste":x=vf;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":x=$i}var k=(t&4)!==0,R=!k&&e==="scroll",p=k?m!==null?m+"Capture":null:m;k=[];for(var d=c,f;d!==null;){f=d;var y=f.stateNode;if(f.tag===5&&y!==null&&(f=y,p!==null&&(y=Zn(d,p),y!=null&&k.push(sr(d,y,f)))),R)break;d=d.return}0<k.length&&(m=new x(m,v,null,n,h),g.push({event:m,listeners:k}))}}if(!(t&7)){e:{if(m=e==="mouseover"||e==="pointerover",x=e==="mouseout"||e==="pointerout",m&&n!==bs&&(v=n.relatedTarget||n.fromElement)&&(At(v)||v[it]))break e;if((x||m)&&(m=h.window===h?h:(m=h.ownerDocument)?m.defaultView||m.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(k=Ui,y="onMouseLeave",p="onMouseEnter",d="mouse",(e==="pointerout"||e==="pointerover")&&(k=$i,y="onPointerLeave",p="onPointerEnter",d="pointer"),R=x==null?m:tn(x),f=v==null?m:tn(v),m=new k(y,d+"leave",x,n,h),m.target=R,m.relatedTarget=f,y=null,At(h)===c&&(k=new k(p,d+"enter",v,n,h),k.target=f,k.relatedTarget=R,y=k),R=y,x&&v)t:{for(k=x,p=v,d=0,f=k;f;f=Gt(f))d++;for(f=0,y=p;y;y=Gt(y))f++;for(;0<d-f;)k=Gt(k),d--;for(;0<f-d;)p=Gt(p),f--;for(;d--;){if(k===p||p!==null&&k===p.alternate)break t;k=Gt(k),p=Gt(p)}k=null}else k=null;x!==null&&qi(g,m,x,k,!1),v!==null&&R!==null&&qi(g,R,v,k,!0)}}e:{if(m=c?tn(c):window,x=m.nodeName&&m.nodeName.toLowerCase(),x==="select"||x==="input"&&m.type==="file")var S=Uf;else if(Vi(m))if(Wu)S=Hf;else{S=$f;var N=Wf}else(x=m.nodeName)&&x.toLowerCase()==="input"&&(m.type==="checkbox"||m.type==="radio")&&(S=Bf);if(S&&(S=S(e,c))){Uu(g,S,n,h);break e}N&&N(e,m,c),e==="focusout"&&(N=m._wrapperState)&&N.controlled&&m.type==="number"&&ws(m,"number",m.value)}switch(N=c?tn(c):window,e){case"focusin":(Vi(N)||N.contentEditable==="true")&&(qt=N,Rs=c,Vn=null);break;case"focusout":Vn=Rs=qt=null;break;case"mousedown":Ls=!0;break;case"contextmenu":case"mouseup":case"dragend":Ls=!1,Xi(g,n,h);break;case"selectionchange":if(Gf)break;case"keydown":case"keyup":Xi(g,n,h)}var E;if(bo)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 Zt?Mu(e,n)&&(T="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(T="onCompositionStart");T&&(zu&&n.locale!=="ko"&&(Zt||T!=="onCompositionStart"?T==="onCompositionEnd"&&Zt&&(E=Du()):(gt=h,So="value"in gt?gt.value:gt.textContent,Zt=!0)),N=nl(c,T),0<N.length&&(T=new Wi(T,e,null,n,h),g.push({event:T,listeners:N}),E?T.data=E:(E=Fu(n),E!==null&&(T.data=E)))),(E=Of?Df(e,n):zf(e,n))&&(c=nl(c,"onBeforeInput"),0<c.length&&(h=new Wi("onBeforeInput","beforeinput",null,n,h),g.push({event:h,listeners:c}),h.data=E))}Ju(g,t)})}function sr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function nl(e,t){for(var n=t+"Capture",r=[];e!==null;){var l=e,s=l.stateNode;l.tag===5&&s!==null&&(l=s,s=Zn(e,n),s!=null&&r.unshift(sr(e,s,l)),s=Zn(e,t),s!=null&&r.push(sr(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 qi(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=Zn(n,s),u!=null&&i.unshift(sr(n,u,a))):l||(u=Zn(n,s),u!=null&&i.push(sr(n,u,a)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var Jf=/\r\n?/g,Zf=/\u0000|\uFFFD/g;function ea(e){return(typeof e=="string"?e:""+e).replace(Jf,`
|
|
38
|
-
`).replace(Zf,"")}function Tr(e,t,n){if(t=ea(t),ea(e)!==t&&n)throw Error(j(425))}function rl(){}var As=null,Os=null;function Ds(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 zs=typeof setTimeout=="function"?setTimeout:void 0,qf=typeof clearTimeout=="function"?clearTimeout:void 0,ta=typeof Promise=="function"?Promise:void 0,ep=typeof queueMicrotask=="function"?queueMicrotask:typeof ta<"u"?function(e){return ta.resolve(null).then(e).catch(tp)}:zs;function tp(e){setTimeout(function(){throw e})}function es(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),tr(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=l}while(n);tr(t)}function kt(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 na(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 bn=Math.random().toString(36).slice(2),Je="__reactFiber$"+bn,or="__reactProps$"+bn,it="__reactContainer$"+bn,Ms="__reactEvents$"+bn,np="__reactListeners$"+bn,rp="__reactHandles$"+bn;function At(e){var t=e[Je];if(t)return t;for(var n=e.parentNode;n;){if(t=n[it]||n[Je]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=na(e);e!==null;){if(n=e[Je])return n;e=na(e)}return t}e=n,n=e.parentNode}return null}function yr(e){return e=e[Je]||e[it],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function tn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(j(33))}function bl(e){return e[or]||null}var Fs=[],nn=-1;function Pt(e){return{current:e}}function K(e){0>nn||(e.current=Fs[nn],Fs[nn]=null,nn--)}function H(e,t){nn++,Fs[nn]=e.current,e.current=t}var Et={},he=Pt(Et),Se=Pt(!1),Ft=Et;function gn(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 je(e){return e=e.childContextTypes,e!=null}function ll(){K(Se),K(he)}function ra(e,t,n){if(he.current!==Et)throw Error(j(168));H(he,t),H(Se,n)}function qu(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,Ud(e)||"Unknown",l));return X({},n,r)}function sl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Et,Ft=he.current,H(he,e),H(Se,Se.current),!0}function la(e,t,n){var r=e.stateNode;if(!r)throw Error(j(169));n?(e=qu(e,t,Ft),r.__reactInternalMemoizedMergedChildContext=e,K(Se),K(he),H(he,e)):K(Se),H(Se,n)}var tt=null,Cl=!1,ts=!1;function ec(e){tt===null?tt=[e]:tt.push(e)}function lp(e){Cl=!0,ec(e)}function It(){if(!ts&&tt!==null){ts=!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)),bu(xo,It),l}finally{U=t,ts=!1}}return null}var rn=[],ln=0,ol=null,il=0,Ae=[],Oe=0,Ut=null,nt=1,rt="";function Rt(e,t){rn[ln++]=il,rn[ln++]=ol,ol=e,il=t}function tc(e,t,n){Ae[Oe++]=nt,Ae[Oe++]=rt,Ae[Oe++]=Ut,Ut=e;var r=nt;e=rt;var l=32-Ve(r)-1;r&=~(1<<l),n+=1;var s=32-Ve(t)+l;if(30<s){var i=l-l%5;s=(r&(1<<i)-1).toString(32),r>>=i,l-=i,nt=1<<32-Ve(t)+l|n<<l|r,rt=s+e}else nt=1<<s|n<<l|r,rt=e}function Eo(e){e.return!==null&&(Rt(e,1),tc(e,1,0))}function _o(e){for(;e===ol;)ol=rn[--ln],rn[ln]=null,il=rn[--ln],rn[ln]=null;for(;e===Ut;)Ut=Ae[--Oe],Ae[Oe]=null,rt=Ae[--Oe],Ae[Oe]=null,nt=Ae[--Oe],Ae[Oe]=null}var Te=null,_e=null,G=!1,He=null;function nc(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 sa(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,Te=e,_e=kt(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Te=e,_e=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,Te=e,_e=null,!0):!1;default:return!1}}function Us(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Ws(e){if(G){var t=_e;if(t){var n=t;if(!sa(e,t)){if(Us(e))throw Error(j(418));t=kt(n.nextSibling);var r=Te;t&&sa(e,t)?nc(r,n):(e.flags=e.flags&-4097|2,G=!1,Te=e)}}else{if(Us(e))throw Error(j(418));e.flags=e.flags&-4097|2,G=!1,Te=e}}}function oa(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Te=e}function Pr(e){if(e!==Te)return!1;if(!G)return oa(e),G=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Ds(e.type,e.memoizedProps)),t&&(t=_e)){if(Us(e))throw rc(),Error(j(418));for(;t;)nc(e,t),t=kt(t.nextSibling)}if(oa(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){_e=kt(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}_e=null}}else _e=Te?kt(e.stateNode.nextSibling):null;return!0}function rc(){for(var e=_e;e;)e=kt(e.nextSibling)}function yn(){_e=Te=null,G=!1}function To(e){He===null?He=[e]:He.push(e)}var sp=ct.ReactCurrentBatchConfig;function Rn(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 Ir(e,t){throw e=Object.prototype.toString.call(t),Error(j(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ia(e){var t=e._init;return t(e._payload)}function lc(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=bt(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=as(f,p.mode,y),d.return=p,d):(d=l(d,f),d.return=p,d)}function u(p,d,f,y){var S=f.type;return S===Jt?h(p,d,f.props.children,y,f.key):d!==null&&(d.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===ft&&ia(S)===d.type)?(y=l(d,f.props),y.ref=Rn(p,d,f),y.return=p,y):(y=Qr(f.type,f.key,f.props,null,p.mode,y),y.ref=Rn(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=us(f,p.mode,y),d.return=p,d):(d=l(d,f.children||[]),d.return=p,d)}function h(p,d,f,y,S){return d===null||d.tag!==7?(d=Mt(f,p.mode,y,S),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=as(""+d,p.mode,f),d.return=p,d;if(typeof d=="object"&&d!==null){switch(d.$$typeof){case wr:return f=Qr(d.type,d.key,d.props,null,p.mode,f),f.ref=Rn(p,null,d),f.return=p,f;case Xt:return d=us(d,p.mode,f),d.return=p,d;case ft:var y=d._init;return g(p,y(d._payload),f)}if(Mn(d)||En(d))return d=Mt(d,p.mode,f,null),d.return=p,d;Ir(p,d)}return null}function m(p,d,f,y){var S=d!==null?d.key:null;if(typeof f=="string"&&f!==""||typeof f=="number")return S!==null?null:a(p,d,""+f,y);if(typeof f=="object"&&f!==null){switch(f.$$typeof){case wr:return f.key===S?u(p,d,f,y):null;case Xt:return f.key===S?c(p,d,f,y):null;case ft:return S=f._init,m(p,d,S(f._payload),y)}if(Mn(f)||En(f))return S!==null?null:h(p,d,f,y,null);Ir(p,f)}return null}function x(p,d,f,y,S){if(typeof y=="string"&&y!==""||typeof y=="number")return p=p.get(f)||null,a(d,p,""+y,S);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case wr:return p=p.get(y.key===null?f:y.key)||null,u(d,p,y,S);case Xt:return p=p.get(y.key===null?f:y.key)||null,c(d,p,y,S);case ft:var N=y._init;return x(p,d,f,N(y._payload),S)}if(Mn(y)||En(y))return p=p.get(f)||null,h(d,p,y,S,null);Ir(d,y)}return null}function v(p,d,f,y){for(var S=null,N=null,E=d,T=d=0,D=null;E!==null&&T<f.length;T++){E.index>T?(D=E,E=null):D=E.sibling;var L=m(p,E,f[T],y);if(L===null){E===null&&(E=D);break}e&&E&&L.alternate===null&&t(p,E),d=s(L,d,T),N===null?S=L:N.sibling=L,N=L,E=D}if(T===f.length)return n(p,E),G&&Rt(p,T),S;if(E===null){for(;T<f.length;T++)E=g(p,f[T],y),E!==null&&(d=s(E,d,T),N===null?S=E:N.sibling=E,N=E);return G&&Rt(p,T),S}for(E=r(p,E);T<f.length;T++)D=x(E,p,T,f[T],y),D!==null&&(e&&D.alternate!==null&&E.delete(D.key===null?T:D.key),d=s(D,d,T),N===null?S=D:N.sibling=D,N=D);return e&&E.forEach(function(z){return t(p,z)}),G&&Rt(p,T),S}function k(p,d,f,y){var S=En(f);if(typeof S!="function")throw Error(j(150));if(f=S.call(f),f==null)throw Error(j(151));for(var N=S=null,E=d,T=d=0,D=null,L=f.next();E!==null&&!L.done;T++,L=f.next()){E.index>T?(D=E,E=null):D=E.sibling;var z=m(p,E,L.value,y);if(z===null){E===null&&(E=D);break}e&&E&&z.alternate===null&&t(p,E),d=s(z,d,T),N===null?S=z:N.sibling=z,N=z,E=D}if(L.done)return n(p,E),G&&Rt(p,T),S;if(E===null){for(;!L.done;T++,L=f.next())L=g(p,L.value,y),L!==null&&(d=s(L,d,T),N===null?S=L:N.sibling=L,N=L);return G&&Rt(p,T),S}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),N===null?S=L:N.sibling=L,N=L);return e&&E.forEach(function(W){return t(p,W)}),G&&Rt(p,T),S}function R(p,d,f,y){if(typeof f=="object"&&f!==null&&f.type===Jt&&f.key===null&&(f=f.props.children),typeof f=="object"&&f!==null){switch(f.$$typeof){case wr:e:{for(var S=f.key,N=d;N!==null;){if(N.key===S){if(S=f.type,S===Jt){if(N.tag===7){n(p,N.sibling),d=l(N,f.props.children),d.return=p,p=d;break e}}else if(N.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===ft&&ia(S)===N.type){n(p,N.sibling),d=l(N,f.props),d.ref=Rn(p,N,f),d.return=p,p=d;break e}n(p,N);break}else t(p,N);N=N.sibling}f.type===Jt?(d=Mt(f.props.children,p.mode,y,f.key),d.return=p,p=d):(y=Qr(f.type,f.key,f.props,null,p.mode,y),y.ref=Rn(p,d,f),y.return=p,p=y)}return i(p);case Xt:e:{for(N=f.key;d!==null;){if(d.key===N)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=us(f,p.mode,y),d.return=p,p=d}return i(p);case ft:return N=f._init,R(p,d,N(f._payload),y)}if(Mn(f))return v(p,d,f,y);if(En(f))return k(p,d,f,y);Ir(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=as(f,p.mode,y),d.return=p,p=d),i(p)):n(p,d)}return R}var xn=lc(!0),sc=lc(!1),al=Pt(null),ul=null,sn=null,Po=null;function Io(){Po=sn=ul=null}function Ro(e){var t=al.current;K(al),e._currentValue=t}function $s(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 pn(e,t){ul=e,Po=sn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ke=!0),e.firstContext=null)}function Me(e){var t=e._currentValue;if(Po!==e)if(e={context:e,memoizedValue:t,next:null},sn===null){if(ul===null)throw Error(j(308));sn=e,ul.dependencies={lanes:0,firstContext:e}}else sn=sn.next=e;return t}var Ot=null;function Lo(e){Ot===null?Ot=[e]:Ot.push(e)}function oc(e,t,n,r){var l=t.interleaved;return l===null?(n.next=n,Lo(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 Ao(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ic(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 St(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,Lo(r)):(t.next=l.next,l.next=t),r.interleaved=t,at(e,n)}function $r(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,vo(e,n)}}function aa(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 cl(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 h=e.alternate;h!==null&&(h=h.updateQueue,a=h.lastBaseUpdate,a!==i&&(a===null?h.firstBaseUpdate=c:a.next=c,h.lastBaseUpdate=u))}if(s!==null){var g=l.baseState;i=0,h=c=u=null,a=s;do{var m=a.lane,x=a.eventTime;if((r&m)===m){h!==null&&(h=h.next={eventTime:x,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var v=e,k=a;switch(m=t,x=n,k.tag){case 1:if(v=k.payload,typeof v=="function"){g=v.call(x,g,m);break e}g=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=k.payload,m=typeof v=="function"?v.call(x,g,m):v,m==null)break e;g=X({},g,m);break e;case 2:pt=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,m=l.effects,m===null?l.effects=[a]:m.push(a))}else x={eventTime:x,lane:m,tag:a.tag,payload:a.payload,callback:a.callback,next:null},h===null?(c=h=x,u=g):h=h.next=x,i|=m;if(a=a.next,a===null){if(a=l.shared.pending,a===null)break;m=a,a=m.next,m.next=null,l.lastBaseUpdate=m,l.shared.pending=null}}while(!0);if(h===null&&(u=g),l.baseState=u,l.firstBaseUpdate=c,l.lastBaseUpdate=h,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 ua(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 xr={},qe=Pt(xr),ir=Pt(xr),ar=Pt(xr);function Dt(e){if(e===xr)throw Error(j(174));return e}function Oo(e,t){switch(H(ar,t),H(ir,e),H(qe,xr),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)}K(qe),H(qe,t)}function vn(){K(qe),K(ir),K(ar)}function ac(e){Dt(ar.current);var t=Dt(qe.current),n=Ss(t,e.type);t!==n&&(H(ir,e),H(qe,n))}function Do(e){ir.current===e&&(K(qe),K(ir))}var Q=Pt(0);function dl(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 ns=[];function zo(){for(var e=0;e<ns.length;e++)ns[e]._workInProgressVersionPrimary=null;ns.length=0}var Br=ct.ReactCurrentDispatcher,rs=ct.ReactCurrentBatchConfig,Wt=0,Y=null,ne=null,le=null,fl=!1,Kn=!1,ur=0,op=0;function fe(){throw Error(j(321))}function Mo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Ge(e[n],t[n]))return!1;return!0}function Fo(e,t,n,r,l,s){if(Wt=s,Y=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Br.current=e===null||e.memoizedState===null?cp:dp,e=n(r,l),Kn){s=0;do{if(Kn=!1,ur=0,25<=s)throw Error(j(301));s+=1,le=ne=null,t.updateQueue=null,Br.current=fp,e=n(r,l)}while(Kn)}if(Br.current=pl,t=ne!==null&&ne.next!==null,Wt=0,le=ne=Y=null,fl=!1,t)throw Error(j(300));return e}function Uo(){var e=ur!==0;return ur=0,e}function Xe(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return le===null?Y.memoizedState=le=e:le=le.next=e,le}function Fe(){if(ne===null){var e=Y.alternate;e=e!==null?e.memoizedState:null}else e=ne.next;var t=le===null?Y.memoizedState:le.next;if(t!==null)le=t,ne=e;else{if(e===null)throw Error(j(310));ne=e,e={memoizedState:ne.memoizedState,baseState:ne.baseState,baseQueue:ne.baseQueue,queue:ne.queue,next:null},le===null?Y.memoizedState=le=e:le=le.next=e}return le}function cr(e,t){return typeof t=="function"?t(e):t}function ls(e){var t=Fe(),n=t.queue;if(n===null)throw Error(j(311));n.lastRenderedReducer=e;var r=ne,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 h=c.lane;if((Wt&h)===h)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:h,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};u===null?(a=u=g,i=r):u=u.next=g,Y.lanes|=h,$t|=h}c=c.next}while(c!==null&&c!==s);u===null?i=r:u.next=a,Ge(r,t.memoizedState)||(ke=!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 ss(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);Ge(s,t.memoizedState)||(ke=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function uc(){}function cc(e,t){var n=Y,r=Fe(),l=t(),s=!Ge(r.memoizedState,l);if(s&&(r.memoizedState=l,ke=!0),r=r.queue,Wo(pc.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||le!==null&&le.memoizedState.tag&1){if(n.flags|=2048,dr(9,fc.bind(null,n,r,l,t),void 0,null),se===null)throw Error(j(349));Wt&30||dc(n,t,l)}return l}function dc(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 fc(e,t,n,r){t.value=n,t.getSnapshot=r,mc(t)&&hc(e)}function pc(e,t,n){return n(function(){mc(t)&&hc(e)})}function mc(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Ge(e,n)}catch{return!0}}function hc(e){var t=at(e,1);t!==null&&Ke(t,e,1,-1)}function ca(e){var t=Xe();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:cr,lastRenderedState:e},t.queue=e,e=e.dispatch=up.bind(null,Y,e),[t.memoizedState,e]}function dr(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 gc(){return Fe().memoizedState}function Hr(e,t,n,r){var l=Xe();Y.flags|=e,l.memoizedState=dr(1|t,n,void 0,r===void 0?null:r)}function El(e,t,n,r){var l=Fe();r=r===void 0?null:r;var s=void 0;if(ne!==null){var i=ne.memoizedState;if(s=i.destroy,r!==null&&Mo(r,i.deps)){l.memoizedState=dr(t,n,s,r);return}}Y.flags|=e,l.memoizedState=dr(1|t,n,s,r)}function da(e,t){return Hr(8390656,8,e,t)}function Wo(e,t){return El(2048,8,e,t)}function yc(e,t){return El(4,2,e,t)}function xc(e,t){return El(4,4,e,t)}function vc(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 wc(e,t,n){return n=n!=null?n.concat([e]):null,El(4,4,vc.bind(null,t,e),n)}function $o(){}function kc(e,t){var n=Fe();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Mo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Sc(e,t){var n=Fe();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Mo(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function jc(e,t,n){return Wt&21?(Ge(n,t)||(n=_u(),Y.lanes|=n,$t|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,ke=!0),e.memoizedState=n)}function ip(e,t){var n=U;U=n!==0&&4>n?n:4,e(!0);var r=rs.transition;rs.transition={};try{e(!1),t()}finally{U=n,rs.transition=r}}function Nc(){return Fe().memoizedState}function ap(e,t,n){var r=Nt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},bc(e))Cc(t,n);else if(n=oc(e,t,n,r),n!==null){var l=ye();Ke(n,e,r,l),Ec(n,t,r)}}function up(e,t,n){var r=Nt(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(bc(e))Cc(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,Ge(a,i)){var u=t.interleaved;u===null?(l.next=l,Lo(t)):(l.next=u.next,u.next=l),t.interleaved=l;return}}catch{}finally{}n=oc(e,t,l,r),n!==null&&(l=ye(),Ke(n,e,r,l),Ec(n,t,r))}}function bc(e){var t=e.alternate;return e===Y||t!==null&&t===Y}function Cc(e,t){Kn=fl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ec(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,vo(e,n)}}var pl={readContext:Me,useCallback:fe,useContext:fe,useEffect:fe,useImperativeHandle:fe,useInsertionEffect:fe,useLayoutEffect:fe,useMemo:fe,useReducer:fe,useRef:fe,useState:fe,useDebugValue:fe,useDeferredValue:fe,useTransition:fe,useMutableSource:fe,useSyncExternalStore:fe,useId:fe,unstable_isNewReconciler:!1},cp={readContext:Me,useCallback:function(e,t){return Xe().memoizedState=[e,t===void 0?null:t],e},useContext:Me,useEffect:da,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Hr(4194308,4,vc.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Hr(4194308,4,e,t)},useInsertionEffect:function(e,t){return Hr(4,2,e,t)},useMemo:function(e,t){var n=Xe();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Xe();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=ap.bind(null,Y,e),[r.memoizedState,e]},useRef:function(e){var t=Xe();return e={current:e},t.memoizedState=e},useState:ca,useDebugValue:$o,useDeferredValue:function(e){return Xe().memoizedState=e},useTransition:function(){var e=ca(!1),t=e[0];return e=ip.bind(null,e[1]),Xe().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Y,l=Xe();if(G){if(n===void 0)throw Error(j(407));n=n()}else{if(n=t(),se===null)throw Error(j(349));Wt&30||dc(r,t,n)}l.memoizedState=n;var s={value:n,getSnapshot:t};return l.queue=s,da(pc.bind(null,r,s,e),[e]),r.flags|=2048,dr(9,fc.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=Xe(),t=se.identifierPrefix;if(G){var n=rt,r=nt;n=(r&~(1<<32-Ve(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ur++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=op++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},dp={readContext:Me,useCallback:kc,useContext:Me,useEffect:Wo,useImperativeHandle:wc,useInsertionEffect:yc,useLayoutEffect:xc,useMemo:Sc,useReducer:ls,useRef:gc,useState:function(){return ls(cr)},useDebugValue:$o,useDeferredValue:function(e){var t=Fe();return jc(t,ne.memoizedState,e)},useTransition:function(){var e=ls(cr)[0],t=Fe().memoizedState;return[e,t]},useMutableSource:uc,useSyncExternalStore:cc,useId:Nc,unstable_isNewReconciler:!1},fp={readContext:Me,useCallback:kc,useContext:Me,useEffect:Wo,useImperativeHandle:wc,useInsertionEffect:yc,useLayoutEffect:xc,useMemo:Sc,useReducer:ss,useRef:gc,useState:function(){return ss(cr)},useDebugValue:$o,useDeferredValue:function(e){var t=Fe();return ne===null?t.memoizedState=e:jc(t,ne.memoizedState,e)},useTransition:function(){var e=ss(cr)[0],t=Fe().memoizedState;return[e,t]},useMutableSource:uc,useSyncExternalStore:cc,useId:Nc,unstable_isNewReconciler:!1};function $e(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 Bs(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 _l={isMounted:function(e){return(e=e._reactInternals)?Vt(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ye(),l=Nt(e),s=lt(r,l);s.payload=t,n!=null&&(s.callback=n),t=St(e,s,l),t!==null&&(Ke(t,e,l,r),$r(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ye(),l=Nt(e),s=lt(r,l);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=St(e,s,l),t!==null&&(Ke(t,e,l,r),$r(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ye(),r=Nt(e),l=lt(n,r);l.tag=2,t!=null&&(l.callback=t),t=St(e,l,r),t!==null&&(Ke(t,e,r,n),$r(t,e,r))}};function fa(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?!rr(n,r)||!rr(l,s):!0}function _c(e,t,n){var r=!1,l=Et,s=t.contextType;return typeof s=="object"&&s!==null?s=Me(s):(l=je(t)?Ft:he.current,r=t.contextTypes,s=(r=r!=null)?gn(e,l):Et),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=_l,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=l,e.__reactInternalMemoizedMaskedChildContext=s),t}function pa(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&&_l.enqueueReplaceState(t,t.state,null)}function Hs(e,t,n,r){var l=e.stateNode;l.props=n,l.state=e.memoizedState,l.refs={},Ao(e);var s=t.contextType;typeof s=="object"&&s!==null?l.context=Me(s):(s=je(t)?Ft:he.current,l.context=gn(e,s)),l.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(Bs(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&&_l.enqueueReplaceState(l,l.state,null),cl(e,n,l,r),l.state=e.memoizedState),typeof l.componentDidMount=="function"&&(e.flags|=4194308)}function wn(e,t){try{var n="",r=t;do n+=Fd(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 os(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Vs(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var pp=typeof WeakMap=="function"?WeakMap:Map;function Tc(e,t,n){n=lt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){hl||(hl=!0,to=r),Vs(e,t)},n}function Pc(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(){Vs(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Vs(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 ma(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new pp;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=Ep.bind(null,e,t,n),t.then(e,e))}function ha(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 ga(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,St(n,t,1))),n.lanes|=1),e)}var mp=ct.ReactCurrentOwner,ke=!1;function ge(e,t,n,r){t.child=e===null?sc(t,null,n,r):xn(t,e.child,n,r)}function ya(e,t,n,r,l){n=n.render;var s=t.ref;return pn(t,l),r=Fo(e,t,n,r,s,l),n=Uo(),e!==null&&!ke?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,ut(e,t,l)):(G&&n&&Eo(t),t.flags|=1,ge(e,t,r,l),t.child)}function xa(e,t,n,r,l){if(e===null){var s=n.type;return typeof s=="function"&&!Xo(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,Ic(e,t,s,r,l)):(e=Qr(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:rr,n(i,r)&&e.ref===t.ref)return ut(e,t,l)}return t.flags|=1,e=bt(s,r),e.ref=t.ref,e.return=t,t.child=e}function Ic(e,t,n,r,l){if(e!==null){var s=e.memoizedProps;if(rr(s,r)&&e.ref===t.ref)if(ke=!1,t.pendingProps=r=s,(e.lanes&l)!==0)e.flags&131072&&(ke=!0);else return t.lanes=e.lanes,ut(e,t,l)}return Ks(e,t,n,r,l)}function Rc(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},H(an,Ee),Ee|=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,H(an,Ee),Ee|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,H(an,Ee),Ee|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,H(an,Ee),Ee|=r;return ge(e,t,l,n),t.child}function Lc(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ks(e,t,n,r,l){var s=je(n)?Ft:he.current;return s=gn(t,s),pn(t,l),n=Fo(e,t,n,r,s,l),r=Uo(),e!==null&&!ke?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,ut(e,t,l)):(G&&r&&Eo(t),t.flags|=1,ge(e,t,n,l),t.child)}function va(e,t,n,r,l){if(je(n)){var s=!0;sl(t)}else s=!1;if(pn(t,l),t.stateNode===null)Vr(e,t),_c(t,n,r),Hs(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=je(n)?Ft:he.current,c=gn(t,c));var h=n.getDerivedStateFromProps,g=typeof h=="function"||typeof i.getSnapshotBeforeUpdate=="function";g||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==r||u!==c)&&pa(t,i,r,c),pt=!1;var m=t.memoizedState;i.state=m,cl(t,r,i,l),u=t.memoizedState,a!==r||m!==u||Se.current||pt?(typeof h=="function"&&(Bs(t,n,h,r),u=t.memoizedState),(a=pt||fa(t,n,a,r,m,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,ic(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:$e(t.type,a),i.props=c,g=t.pendingProps,m=i.context,u=n.contextType,typeof u=="object"&&u!==null?u=Me(u):(u=je(n)?Ft:he.current,u=gn(t,u));var x=n.getDerivedStateFromProps;(h=typeof x=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==g||m!==u)&&pa(t,i,r,u),pt=!1,m=t.memoizedState,i.state=m,cl(t,r,i,l);var v=t.memoizedState;a!==g||m!==v||Se.current||pt?(typeof x=="function"&&(Bs(t,n,x,r),v=t.memoizedState),(c=pt||fa(t,n,c,r,m,v,u)||!1)?(h||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&&m===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&m===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&&m===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),r=!1)}return Gs(e,t,n,r,s,l)}function Gs(e,t,n,r,l,s){Lc(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return l&&la(t,n,!1),ut(e,t,s);r=t.stateNode,mp.current=t;var a=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=xn(t,e.child,null,s),t.child=xn(t,null,a,s)):ge(e,t,a,s),t.memoizedState=r.state,l&&la(t,n,!0),t.child}function Ac(e){var t=e.stateNode;t.pendingContext?ra(e,t.pendingContext,t.pendingContext!==t.context):t.context&&ra(e,t.context,!1),Oo(e,t.containerInfo)}function wa(e,t,n,r,l){return yn(),To(l),t.flags|=256,ge(e,t,n,r),t.child}var Qs={dehydrated:null,treeContext:null,retryLane:0};function Ys(e){return{baseLanes:e,cachePool:null,transitions:null}}function Oc(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),H(Q,l&1),e===null)return Ws(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=Il(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=Ys(n),t.memoizedState=Qs,e):Bo(t,i));if(l=e.memoizedState,l!==null&&(a=l.dehydrated,a!==null))return hp(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=bt(l,u),r.subtreeFlags=l.subtreeFlags&14680064),a!==null?s=bt(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?Ys(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},s.memoizedState=i,s.childLanes=e.childLanes&~n,t.memoizedState=Qs,r}return s=e.child,e=s.sibling,r=bt(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 Bo(e,t){return t=Il({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Rr(e,t,n,r){return r!==null&&To(r),xn(t,e.child,null,n),e=Bo(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function hp(e,t,n,r,l,s,i){if(n)return t.flags&256?(t.flags&=-257,r=os(Error(j(422))),Rr(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,l=t.mode,r=Il({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&&xn(t,e.child,null,i),t.child.memoizedState=Ys(i),t.memoizedState=Qs,s);if(!(t.mode&1))return Rr(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=os(s,r,void 0),Rr(e,t,i,r)}if(a=(i&e.childLanes)!==0,ke||a){if(r=se,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),Ke(r,e,l,-1))}return Yo(),r=os(Error(j(421))),Rr(e,t,i,r)}return l.data==="$?"?(t.flags|=128,t.child=e.child,t=_p.bind(null,e),l._reactRetry=t,null):(e=s.treeContext,_e=kt(l.nextSibling),Te=t,G=!0,He=null,e!==null&&(Ae[Oe++]=nt,Ae[Oe++]=rt,Ae[Oe++]=Ut,nt=e.id,rt=e.overflow,Ut=t),t=Bo(t,r.children),t.flags|=4096,t)}function ka(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),$s(e.return,t,n)}function is(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 Dc(e,t,n){var r=t.pendingProps,l=r.revealOrder,s=r.tail;if(ge(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&&ka(e,n,t);else if(e.tag===19)ka(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(H(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&&dl(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),is(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&&dl(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}is(t,!0,n,null,s);break;case"together":is(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Vr(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=bt(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=bt(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function gp(e,t,n){switch(t.tag){case 3:Ac(t),yn();break;case 5:ac(t);break;case 1:je(t.type)&&sl(t);break;case 4:Oo(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,l=t.memoizedProps.value;H(al,r._currentValue),r._currentValue=l;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(H(Q,Q.current&1),t.flags|=128,null):n&t.child.childLanes?Oc(e,t,n):(H(Q,Q.current&1),e=ut(e,t,n),e!==null?e.sibling:null);H(Q,Q.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Dc(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),H(Q,Q.current),r)break;return null;case 22:case 23:return t.lanes=0,Rc(e,t,n)}return ut(e,t,n)}var zc,Xs,Mc,Fc;zc=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}};Xs=function(){};Mc=function(e,t,n,r){var l=e.memoizedProps;if(l!==r){e=t.stateNode,Dt(qe.current);var s=null;switch(n){case"input":l=xs(e,l),r=xs(e,r),s=[];break;case"select":l=X({},l,{value:void 0}),r=X({},r,{value:void 0}),s=[];break;case"textarea":l=ks(e,l),r=ks(e,r),s=[];break;default:typeof l.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=rl)}js(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"&&(Xn.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"&&(Xn.hasOwnProperty(c)?(u!=null&&c==="onScroll"&&V("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)}};Fc=function(e,t,n,r){n!==r&&(t.flags|=4)};function Ln(e,t){if(!G)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 pe(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 yp(e,t,n){var r=t.pendingProps;switch(_o(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return pe(t),null;case 1:return je(t.type)&&ll(),pe(t),null;case 3:return r=t.stateNode,vn(),K(Se),K(he),zo(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Pr(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,He!==null&&(lo(He),He=null))),Xs(e,t),pe(t),null;case 5:Do(t);var l=Dt(ar.current);if(n=t.type,e!==null&&t.stateNode!=null)Mc(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 pe(t),null}if(e=Dt(qe.current),Pr(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[Je]=t,r[or]=s,e=(t.mode&1)!==0,n){case"dialog":V("cancel",r),V("close",r);break;case"iframe":case"object":case"embed":V("load",r);break;case"video":case"audio":for(l=0;l<Un.length;l++)V(Un[l],r);break;case"source":V("error",r);break;case"img":case"image":case"link":V("error",r),V("load",r);break;case"details":V("toggle",r);break;case"input":Pi(r,s),V("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},V("invalid",r);break;case"textarea":Ri(r,s),V("invalid",r)}js(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&&Tr(r.textContent,a,e),l=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&Tr(r.textContent,a,e),l=["children",""+a]):Xn.hasOwnProperty(i)&&a!=null&&i==="onScroll"&&V("scroll",r)}switch(n){case"input":kr(r),Ii(r,s,!0);break;case"textarea":kr(r),Li(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=rl)}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=pu(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[Je]=t,e[or]=r,zc(e,t,!1,!1),t.stateNode=e;e:{switch(i=Ns(n,r),n){case"dialog":V("cancel",e),V("close",e),l=r;break;case"iframe":case"object":case"embed":V("load",e),l=r;break;case"video":case"audio":for(l=0;l<Un.length;l++)V(Un[l],e);l=r;break;case"source":V("error",e),l=r;break;case"img":case"image":case"link":V("error",e),V("load",e),l=r;break;case"details":V("toggle",e),l=r;break;case"input":Pi(e,r),l=xs(e,r),V("invalid",e);break;case"option":l=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},l=X({},r,{value:void 0}),V("invalid",e);break;case"textarea":Ri(e,r),l=ks(e,r),V("invalid",e);break;default:l=r}js(n,l),a=l;for(s in a)if(a.hasOwnProperty(s)){var u=a[s];s==="style"?gu(e,u):s==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&mu(e,u)):s==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&Jn(e,u):typeof u=="number"&&Jn(e,""+u):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Xn.hasOwnProperty(s)?u!=null&&s==="onScroll"&&V("scroll",e):u!=null&&po(e,s,u,i))}switch(n){case"input":kr(e),Ii(e,r,!1);break;case"textarea":kr(e),Li(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Ct(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?un(e,!!r.multiple,s,!1):r.defaultValue!=null&&un(e,!!r.multiple,r.defaultValue,!0);break;default:typeof l.onClick=="function"&&(e.onclick=rl)}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 pe(t),null;case 6:if(e&&t.stateNode!=null)Fc(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(j(166));if(n=Dt(ar.current),Dt(qe.current),Pr(t)){if(r=t.stateNode,n=t.memoizedProps,r[Je]=t,(s=r.nodeValue!==n)&&(e=Te,e!==null))switch(e.tag){case 3:Tr(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Tr(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Je]=t,t.stateNode=r}return pe(t),null;case 13:if(K(Q),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(G&&_e!==null&&t.mode&1&&!(t.flags&128))rc(),yn(),t.flags|=98560,s=!1;else if(s=Pr(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[Je]=t}else yn(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;pe(t),s=!1}else He!==null&&(lo(He),He=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?re===0&&(re=3):Yo())),t.updateQueue!==null&&(t.flags|=4),pe(t),null);case 4:return vn(),Xs(e,t),e===null&&lr(t.stateNode.containerInfo),pe(t),null;case 10:return Ro(t.type._context),pe(t),null;case 17:return je(t.type)&&ll(),pe(t),null;case 19:if(K(Q),s=t.memoizedState,s===null)return pe(t),null;if(r=(t.flags&128)!==0,i=s.rendering,i===null)if(r)Ln(s,!1);else{if(re!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=dl(e),i!==null){for(t.flags|=128,Ln(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 H(Q,Q.current&1|2),t.child}e=e.sibling}s.tail!==null&&ee()>kn&&(t.flags|=128,r=!0,Ln(s,!1),t.lanes=4194304)}else{if(!r)if(e=dl(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Ln(s,!0),s.tail===null&&s.tailMode==="hidden"&&!i.alternate&&!G)return pe(t),null}else 2*ee()-s.renderingStartTime>kn&&n!==1073741824&&(t.flags|=128,r=!0,Ln(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,H(Q,r?n&1|2:n&1),t):(pe(t),null);case 22:case 23:return Qo(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ee&1073741824&&(pe(t),t.subtreeFlags&6&&(t.flags|=8192)):pe(t),null;case 24:return null;case 25:return null}throw Error(j(156,t.tag))}function xp(e,t){switch(_o(t),t.tag){case 1:return je(t.type)&&ll(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return vn(),K(Se),K(he),zo(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Do(t),null;case 13:if(K(Q),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(j(340));yn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return K(Q),null;case 4:return vn(),null;case 10:return Ro(t.type._context),null;case 22:case 23:return Qo(),null;case 24:return null;default:return null}}var Lr=!1,me=!1,vp=typeof WeakSet=="function"?WeakSet:Set,P=null;function on(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Z(e,t,r)}else n.current=null}function Js(e,t,n){try{n()}catch(r){Z(e,t,r)}}var Sa=!1;function wp(e,t){if(As=el,e=Hu(),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,h=0,g=e,m=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;)m=g,g=x;for(;;){if(g===e)break t;if(m===n&&++c===l&&(a=i),m===s&&++h===r&&(u=i),(x=g.nextSibling)!==null)break;g=m,m=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(Os={focusedElem:e,selectionRange:n},el=!1,P=t;P!==null;)if(t=P,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,P=e;else for(;P!==null;){t=P;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 k=v.memoizedProps,R=v.memoizedState,p=t.stateNode,d=p.getSnapshotBeforeUpdate(t.elementType===t.type?k:$e(t.type,k),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){Z(t,t.return,y)}if(e=t.sibling,e!==null){e.return=t.return,P=e;break}P=t.return}return v=Sa,Sa=!1,v}function Gn(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&&Js(t,n,s)}l=l.next}while(l!==r)}}function Tl(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 Zs(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 Uc(e){var t=e.alternate;t!==null&&(e.alternate=null,Uc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Je],delete t[or],delete t[Ms],delete t[np],delete t[rp])),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 Wc(e){return e.tag===5||e.tag===3||e.tag===4}function ja(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Wc(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 qs(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=rl));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}function eo(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(eo(e,t,n),e=e.sibling;e!==null;)eo(e,t,n),e=e.sibling}var ae=null,Be=!1;function dt(e,t,n){for(n=n.child;n!==null;)$c(e,t,n),n=n.sibling}function $c(e,t,n){if(Ze&&typeof Ze.onCommitFiberUnmount=="function")try{Ze.onCommitFiberUnmount(kl,n)}catch{}switch(n.tag){case 5:me||on(n,t);case 6:var r=ae,l=Be;ae=null,dt(e,t,n),ae=r,Be=l,ae!==null&&(Be?(e=ae,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ae.removeChild(n.stateNode));break;case 18:ae!==null&&(Be?(e=ae,n=n.stateNode,e.nodeType===8?es(e.parentNode,n):e.nodeType===1&&es(e,n),tr(e)):es(ae,n.stateNode));break;case 4:r=ae,l=Be,ae=n.stateNode.containerInfo,Be=!0,dt(e,t,n),ae=r,Be=l;break;case 0:case 11:case 14:case 15:if(!me&&(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)&&Js(n,t,i),l=l.next}while(l!==r)}dt(e,t,n);break;case 1:if(!me&&(on(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Z(n,t,a)}dt(e,t,n);break;case 21:dt(e,t,n);break;case 22:n.mode&1?(me=(r=me)||n.memoizedState!==null,dt(e,t,n),me=r):dt(e,t,n);break;default:dt(e,t,n)}}function Na(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new vp),t.forEach(function(r){var l=Tp.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function We(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:ae=a.stateNode,Be=!1;break e;case 3:ae=a.stateNode.containerInfo,Be=!0;break e;case 4:ae=a.stateNode.containerInfo,Be=!0;break e}a=a.return}if(ae===null)throw Error(j(160));$c(s,i,l),ae=null,Be=!1;var u=l.alternate;u!==null&&(u.return=null),l.return=null}catch(c){Z(l,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Bc(t,e),t=t.sibling}function Bc(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(We(t,e),Ye(e),r&4){try{Gn(3,e,e.return),Tl(3,e)}catch(k){Z(e,e.return,k)}try{Gn(5,e,e.return)}catch(k){Z(e,e.return,k)}}break;case 1:We(t,e),Ye(e),r&512&&n!==null&&on(n,n.return);break;case 5:if(We(t,e),Ye(e),r&512&&n!==null&&on(n,n.return),e.flags&32){var l=e.stateNode;try{Jn(l,"")}catch(k){Z(e,e.return,k)}}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&&du(l,s),Ns(a,i);var c=Ns(a,s);for(i=0;i<u.length;i+=2){var h=u[i],g=u[i+1];h==="style"?gu(l,g):h==="dangerouslySetInnerHTML"?mu(l,g):h==="children"?Jn(l,g):po(l,h,g,c)}switch(a){case"input":vs(l,s);break;case"textarea":fu(l,s);break;case"select":var m=l._wrapperState.wasMultiple;l._wrapperState.wasMultiple=!!s.multiple;var x=s.value;x!=null?un(l,!!s.multiple,x,!1):m!==!!s.multiple&&(s.defaultValue!=null?un(l,!!s.multiple,s.defaultValue,!0):un(l,!!s.multiple,s.multiple?[]:"",!1))}l[or]=s}catch(k){Z(e,e.return,k)}}break;case 6:if(We(t,e),Ye(e),r&4){if(e.stateNode===null)throw Error(j(162));l=e.stateNode,s=e.memoizedProps;try{l.nodeValue=s}catch(k){Z(e,e.return,k)}}break;case 3:if(We(t,e),Ye(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{tr(t.containerInfo)}catch(k){Z(e,e.return,k)}break;case 4:We(t,e),Ye(e);break;case 13:We(t,e),Ye(e),l=e.child,l.flags&8192&&(s=l.memoizedState!==null,l.stateNode.isHidden=s,!s||l.alternate!==null&&l.alternate.memoizedState!==null||(Ko=ee())),r&4&&Na(e);break;case 22:if(h=n!==null&&n.memoizedState!==null,e.mode&1?(me=(c=me)||h,We(t,e),me=c):We(t,e),Ye(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!h&&e.mode&1)for(P=e,h=e.child;h!==null;){for(g=P=h;P!==null;){switch(m=P,x=m.child,m.tag){case 0:case 11:case 14:case 15:Gn(4,m,m.return);break;case 1:on(m,m.return);var v=m.stateNode;if(typeof v.componentWillUnmount=="function"){r=m,n=m.return;try{t=r,v.props=t.memoizedProps,v.state=t.memoizedState,v.componentWillUnmount()}catch(k){Z(r,n,k)}}break;case 5:on(m,m.return);break;case 22:if(m.memoizedState!==null){Ca(g);continue}}x!==null?(x.return=m,P=x):Ca(g)}h=h.sibling}e:for(h=null,g=e;;){if(g.tag===5){if(h===null){h=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=hu("display",i))}catch(k){Z(e,e.return,k)}}}else if(g.tag===6){if(h===null)try{g.stateNode.nodeValue=c?"":g.memoizedProps}catch(k){Z(e,e.return,k)}}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;h===g&&(h=null),g=g.return}h===g&&(h=null),g.sibling.return=g.return,g=g.sibling}}break;case 19:We(t,e),Ye(e),r&4&&Na(e);break;case 21:break;default:We(t,e),Ye(e)}}function Ye(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Wc(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&&(Jn(l,""),r.flags&=-33);var s=ja(e);eo(e,s,l);break;case 3:case 4:var i=r.stateNode.containerInfo,a=ja(e);qs(e,a,i);break;default:throw Error(j(161))}}catch(u){Z(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function kp(e,t,n){P=e,Hc(e)}function Hc(e,t,n){for(var r=(e.mode&1)!==0;P!==null;){var l=P,s=l.child;if(l.tag===22&&r){var i=l.memoizedState!==null||Lr;if(!i){var a=l.alternate,u=a!==null&&a.memoizedState!==null||me;a=Lr;var c=me;if(Lr=i,(me=u)&&!c)for(P=l;P!==null;)i=P,u=i.child,i.tag===22&&i.memoizedState!==null?Ea(l):u!==null?(u.return=i,P=u):Ea(l);for(;s!==null;)P=s,Hc(s),s=s.sibling;P=l,Lr=a,me=c}ba(e)}else l.subtreeFlags&8772&&s!==null?(s.return=l,P=s):ba(e)}}function ba(e){for(;P!==null;){var t=P;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:me||Tl(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!me)if(n===null)r.componentDidMount();else{var l=t.elementType===t.type?n.memoizedProps:$e(t.type,n.memoizedProps);r.componentDidUpdate(l,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&ua(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}ua(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 h=c.memoizedState;if(h!==null){var g=h.dehydrated;g!==null&&tr(g)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(j(163))}me||t.flags&512&&Zs(t)}catch(m){Z(t,t.return,m)}}if(t===e){P=null;break}if(n=t.sibling,n!==null){n.return=t.return,P=n;break}P=t.return}}function Ca(e){for(;P!==null;){var t=P;if(t===e){P=null;break}var n=t.sibling;if(n!==null){n.return=t.return,P=n;break}P=t.return}}function Ea(e){for(;P!==null;){var t=P;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Tl(4,t)}catch(u){Z(t,n,u)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var l=t.return;try{r.componentDidMount()}catch(u){Z(t,l,u)}}var s=t.return;try{Zs(t)}catch(u){Z(t,s,u)}break;case 5:var i=t.return;try{Zs(t)}catch(u){Z(t,i,u)}}}catch(u){Z(t,t.return,u)}if(t===e){P=null;break}var a=t.sibling;if(a!==null){a.return=t.return,P=a;break}P=t.return}}var Sp=Math.ceil,ml=ct.ReactCurrentDispatcher,Ho=ct.ReactCurrentOwner,ze=ct.ReactCurrentBatchConfig,M=0,se=null,te=null,ce=0,Ee=0,an=Pt(0),re=0,fr=null,$t=0,Pl=0,Vo=0,Qn=null,we=null,Ko=0,kn=1/0,et=null,hl=!1,to=null,jt=null,Ar=!1,yt=null,gl=0,Yn=0,no=null,Kr=-1,Gr=0;function ye(){return M&6?ee():Kr!==-1?Kr:Kr=ee()}function Nt(e){return e.mode&1?M&2&&ce!==0?ce&-ce:sp.transition!==null?(Gr===0&&(Gr=_u()),Gr):(e=U,e!==0||(e=window.event,e=e===void 0?16:Ou(e.type)),e):1}function Ke(e,t,n,r){if(50<Yn)throw Yn=0,no=null,Error(j(185));hr(e,n,r),(!(M&2)||e!==se)&&(e===se&&(!(M&2)&&(Pl|=n),re===4&&ht(e,ce)),Ne(e,r),n===1&&M===0&&!(t.mode&1)&&(kn=ee()+500,Cl&&It()))}function Ne(e,t){var n=e.callbackNode;lf(e,t);var r=qr(e,e===se?ce:0);if(r===0)n!==null&&Di(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Di(n),t===1)e.tag===0?lp(_a.bind(null,e)):ec(_a.bind(null,e)),ep(function(){!(M&6)&&It()}),n=null;else{switch(Tu(r)){case 1:n=xo;break;case 4:n=Cu;break;case 16:n=Zr;break;case 536870912:n=Eu;break;default:n=Zr}n=Zc(n,Vc.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Vc(e,t){if(Kr=-1,Gr=0,M&6)throw Error(j(327));var n=e.callbackNode;if(mn()&&e.callbackNode!==n)return null;var r=qr(e,e===se?ce:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=yl(e,r);else{t=r;var l=M;M|=2;var s=Gc();(se!==e||ce!==t)&&(et=null,kn=ee()+500,zt(e,t));do try{bp();break}catch(a){Kc(e,a)}while(!0);Io(),ml.current=s,M=l,te!==null?t=0:(se=null,ce=0,t=re)}if(t!==0){if(t===2&&(l=Ts(e),l!==0&&(r=l,t=ro(e,l))),t===1)throw n=fr,zt(e,0),ht(e,r),Ne(e,ee()),n;if(t===6)ht(e,r);else{if(l=e.current.alternate,!(r&30)&&!jp(l)&&(t=yl(e,r),t===2&&(s=Ts(e),s!==0&&(r=s,t=ro(e,s))),t===1))throw n=fr,zt(e,0),ht(e,r),Ne(e,ee()),n;switch(e.finishedWork=l,e.finishedLanes=r,t){case 0:case 1:throw Error(j(345));case 2:Lt(e,we,et);break;case 3:if(ht(e,r),(r&130023424)===r&&(t=Ko+500-ee(),10<t)){if(qr(e,0)!==0)break;if(l=e.suspendedLanes,(l&r)!==r){ye(),e.pingedLanes|=e.suspendedLanes&l;break}e.timeoutHandle=zs(Lt.bind(null,e,we,et),t);break}Lt(e,we,et);break;case 4:if(ht(e,r),(r&4194240)===r)break;for(t=e.eventTimes,l=-1;0<r;){var i=31-Ve(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*Sp(r/1960))-r,10<r){e.timeoutHandle=zs(Lt.bind(null,e,we,et),r);break}Lt(e,we,et);break;case 5:Lt(e,we,et);break;default:throw Error(j(329))}}}return Ne(e,ee()),e.callbackNode===n?Vc.bind(null,e):null}function ro(e,t){var n=Qn;return e.current.memoizedState.isDehydrated&&(zt(e,t).flags|=256),e=yl(e,t),e!==2&&(t=we,we=n,t!==null&&lo(t)),e}function lo(e){we===null?we=e:we.push.apply(we,e)}function jp(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(!Ge(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&=~Vo,t&=~Pl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Ve(t),r=1<<n;e[n]=-1,t&=~r}}function _a(e){if(M&6)throw Error(j(327));mn();var t=qr(e,0);if(!(t&1))return Ne(e,ee()),null;var n=yl(e,t);if(e.tag!==0&&n===2){var r=Ts(e);r!==0&&(t=r,n=ro(e,r))}if(n===1)throw n=fr,zt(e,0),ht(e,t),Ne(e,ee()),n;if(n===6)throw Error(j(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Lt(e,we,et),Ne(e,ee()),null}function Go(e,t){var n=M;M|=1;try{return e(t)}finally{M=n,M===0&&(kn=ee()+500,Cl&&It())}}function Bt(e){yt!==null&&yt.tag===0&&!(M&6)&&mn();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 Qo(){Ee=an.current,K(an)}function zt(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,qf(n)),te!==null)for(n=te.return;n!==null;){var r=n;switch(_o(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&ll();break;case 3:vn(),K(Se),K(he),zo();break;case 5:Do(r);break;case 4:vn();break;case 13:K(Q);break;case 19:K(Q);break;case 10:Ro(r.type._context);break;case 22:case 23:Qo()}n=n.return}if(se=e,te=e=bt(e.current,null),ce=Ee=t,re=0,fr=null,Vo=Pl=$t=0,we=Qn=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 Kc(e,t){do{var n=te;try{if(Io(),Br.current=pl,fl){for(var r=Y.memoizedState;r!==null;){var l=r.queue;l!==null&&(l.pending=null),r=r.next}fl=!1}if(Wt=0,le=ne=Y=null,Kn=!1,ur=0,Ho.current=null,n===null||n.return===null){re=1,fr=t,te=null;break}e:{var s=e,i=n.return,a=n,u=t;if(t=ce,a.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var c=u,h=a,g=h.tag;if(!(h.mode&1)&&(g===0||g===11||g===15)){var m=h.alternate;m?(h.updateQueue=m.updateQueue,h.memoizedState=m.memoizedState,h.lanes=m.lanes):(h.updateQueue=null,h.memoizedState=null)}var x=ha(i);if(x!==null){x.flags&=-257,ga(x,i,a,s,t),x.mode&1&&ma(s,c,t),t=x,u=c;var v=t.updateQueue;if(v===null){var k=new Set;k.add(u),t.updateQueue=k}else v.add(u);break e}else{if(!(t&1)){ma(s,c,t),Yo();break e}u=Error(j(426))}}else if(G&&a.mode&1){var R=ha(i);if(R!==null){!(R.flags&65536)&&(R.flags|=256),ga(R,i,a,s,t),To(wn(u,a));break e}}s=u=wn(u,a),re!==4&&(re=2),Qn===null?Qn=[s]:Qn.push(s),s=i;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var p=Tc(s,u,t);aa(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=Pc(s,a,t);aa(s,y);break e}}s=s.return}while(s!==null)}Yc(n)}catch(S){t=S,te===n&&n!==null&&(te=n=n.return);continue}break}while(!0)}function Gc(){var e=ml.current;return ml.current=pl,e===null?pl:e}function Yo(){(re===0||re===3||re===2)&&(re=4),se===null||!($t&268435455)&&!(Pl&268435455)||ht(se,ce)}function yl(e,t){var n=M;M|=2;var r=Gc();(se!==e||ce!==t)&&(et=null,zt(e,t));do try{Np();break}catch(l){Kc(e,l)}while(!0);if(Io(),M=n,ml.current=r,te!==null)throw Error(j(261));return se=null,ce=0,re}function Np(){for(;te!==null;)Qc(te)}function bp(){for(;te!==null&&!Yd();)Qc(te)}function Qc(e){var t=Jc(e.alternate,e,Ee);e.memoizedProps=e.pendingProps,t===null?Yc(e):te=t,Ho.current=null}function Yc(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=xp(n,t),n!==null){n.flags&=32767,te=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{re=6,te=null;return}}else if(n=yp(n,t,Ee),n!==null){te=n;return}if(t=t.sibling,t!==null){te=t;return}te=t=e}while(t!==null);re===0&&(re=5)}function Lt(e,t,n){var r=U,l=ze.transition;try{ze.transition=null,U=1,Cp(e,t,n,r)}finally{ze.transition=l,U=r}return null}function Cp(e,t,n,r){do mn();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(sf(e,s),e===se&&(te=se=null,ce=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Ar||(Ar=!0,Zc(Zr,function(){return mn(),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,Ho.current=null,wp(e,n),Bc(n,e),Kf(Os),el=!!As,Os=As=null,e.current=n,kp(n),Xd(),M=a,U=i,ze.transition=s}else e.current=n;if(Ar&&(Ar=!1,yt=e,gl=l),s=e.pendingLanes,s===0&&(jt=null),qd(n.stateNode),Ne(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(hl)throw hl=!1,e=to,to=null,e;return gl&1&&e.tag!==0&&mn(),s=e.pendingLanes,s&1?e===no?Yn++:(Yn=0,no=e):Yn=0,It(),null}function mn(){if(yt!==null){var e=Tu(gl),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,gl=0,M&6)throw Error(j(331));var l=M;for(M|=4,P=e.current;P!==null;){var s=P,i=s.child;if(P.flags&16){var a=s.deletions;if(a!==null){for(var u=0;u<a.length;u++){var c=a[u];for(P=c;P!==null;){var h=P;switch(h.tag){case 0:case 11:case 15:Gn(8,h,s)}var g=h.child;if(g!==null)g.return=h,P=g;else for(;P!==null;){h=P;var m=h.sibling,x=h.return;if(Uc(h),h===c){P=null;break}if(m!==null){m.return=x,P=m;break}P=x}}}var v=s.alternate;if(v!==null){var k=v.child;if(k!==null){v.child=null;do{var R=k.sibling;k.sibling=null,k=R}while(k!==null)}}P=s}}if(s.subtreeFlags&2064&&i!==null)i.return=s,P=i;else e:for(;P!==null;){if(s=P,s.flags&2048)switch(s.tag){case 0:case 11:case 15:Gn(9,s,s.return)}var p=s.sibling;if(p!==null){p.return=s.return,P=p;break e}P=s.return}}var d=e.current;for(P=d;P!==null;){i=P;var f=i.child;if(i.subtreeFlags&2064&&f!==null)f.return=i,P=f;else e:for(i=d;P!==null;){if(a=P,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Tl(9,a)}}catch(S){Z(a,a.return,S)}if(a===i){P=null;break e}var y=a.sibling;if(y!==null){y.return=a.return,P=y;break e}P=a.return}}if(M=l,It(),Ze&&typeof Ze.onPostCommitFiberRoot=="function")try{Ze.onPostCommitFiberRoot(kl,e)}catch{}r=!0}return r}finally{U=n,ze.transition=t}}return!1}function Ta(e,t,n){t=wn(n,t),t=Tc(e,t,1),e=St(e,t,1),t=ye(),e!==null&&(hr(e,1,t),Ne(e,t))}function Z(e,t,n){if(e.tag===3)Ta(e,e,n);else for(;t!==null;){if(t.tag===3){Ta(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=wn(n,e),e=Pc(t,e,1),t=St(t,e,1),e=ye(),t!==null&&(hr(t,1,e),Ne(t,e));break}}t=t.return}}function Ep(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=ye(),e.pingedLanes|=e.suspendedLanes&n,se===e&&(ce&n)===n&&(re===4||re===3&&(ce&130023424)===ce&&500>ee()-Ko?zt(e,0):Vo|=n),Ne(e,t)}function Xc(e,t){t===0&&(e.mode&1?(t=Nr,Nr<<=1,!(Nr&130023424)&&(Nr=4194304)):t=1);var n=ye();e=at(e,t),e!==null&&(hr(e,t,n),Ne(e,n))}function _p(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Xc(e,n)}function Tp(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),Xc(e,n)}var Jc;Jc=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Se.current)ke=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ke=!1,gp(e,t,n);ke=!!(e.flags&131072)}else ke=!1,G&&t.flags&1048576&&tc(t,il,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Vr(e,t),e=t.pendingProps;var l=gn(t,he.current);pn(t,n),l=Fo(null,t,r,e,l,n);var s=Uo();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,je(r)?(s=!0,sl(t)):s=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Ao(t),l.updater=_l,t.stateNode=l,l._reactInternals=t,Hs(t,r,e,n),t=Gs(null,t,r,!0,s,n)):(t.tag=0,G&&s&&Eo(t),ge(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Vr(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=Ip(r),e=$e(r,e),l){case 0:t=Ks(null,t,r,e,n);break e;case 1:t=va(null,t,r,e,n);break e;case 11:t=ya(null,t,r,e,n);break e;case 14:t=xa(null,t,r,$e(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:$e(r,l),Ks(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:$e(r,l),va(e,t,r,l,n);case 3:e:{if(Ac(t),e===null)throw Error(j(387));r=t.pendingProps,s=t.memoizedState,l=s.element,ic(e,t),cl(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=wn(Error(j(423)),t),t=wa(e,t,r,n,l);break e}else if(r!==l){l=wn(Error(j(424)),t),t=wa(e,t,r,n,l);break e}else for(_e=kt(t.stateNode.containerInfo.firstChild),Te=t,G=!0,He=null,n=sc(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(yn(),r===l){t=ut(e,t,n);break e}ge(e,t,r,n)}t=t.child}return t;case 5:return ac(t),e===null&&Ws(t),r=t.type,l=t.pendingProps,s=e!==null?e.memoizedProps:null,i=l.children,Ds(r,l)?i=null:s!==null&&Ds(r,s)&&(t.flags|=32),Lc(e,t),ge(e,t,i,n),t.child;case 6:return e===null&&Ws(t),null;case 13:return Oc(e,t,n);case 4:return Oo(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=xn(t,null,r,n):ge(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:$e(r,l),ya(e,t,r,l,n);case 7:return ge(e,t,t.pendingProps,n),t.child;case 8:return ge(e,t,t.pendingProps.children,n),t.child;case 12:return ge(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,H(al,r._currentValue),r._currentValue=i,s!==null)if(Ge(s.value,i)){if(s.children===l.children&&!Se.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 h=c.pending;h===null?u.next=u:(u.next=h.next,h.next=u),c.pending=u}}s.lanes|=n,u=s.alternate,u!==null&&(u.lanes|=n),$s(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),$s(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}ge(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,pn(t,n),l=Me(l),r=r(l),t.flags|=1,ge(e,t,r,n),t.child;case 14:return r=t.type,l=$e(r,t.pendingProps),l=$e(r.type,l),xa(e,t,r,l,n);case 15:return Ic(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:$e(r,l),Vr(e,t),t.tag=1,je(r)?(e=!0,sl(t)):e=!1,pn(t,n),_c(t,r,l),Hs(t,r,l,n),Gs(null,t,r,!0,e,n);case 19:return Dc(e,t,n);case 22:return Rc(e,t,n)}throw Error(j(156,t.tag))};function Zc(e,t){return bu(e,t)}function Pp(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 Pp(e,t,n,r)}function Xo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ip(e){if(typeof e=="function")return Xo(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ho)return 11;if(e===go)return 14}return 2}function bt(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 Qr(e,t,n,r,l,s){var i=2;if(r=e,typeof e=="function")Xo(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Jt:return Mt(n.children,l,s,t);case mo:i=8,l|=8;break;case ms:return e=De(12,n,t,l|2),e.elementType=ms,e.lanes=s,e;case hs:return e=De(13,n,t,l),e.elementType=hs,e.lanes=s,e;case gs:return e=De(19,n,t,l),e.elementType=gs,e.lanes=s,e;case au:return Il(n,l,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ou:i=10;break e;case iu:i=9;break e;case ho:i=11;break e;case go: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 Il(e,t,n,r){return e=De(22,e,r,t),e.elementType=au,e.lanes=n,e.stateNode={isHidden:!1},e}function as(e,t,n){return e=De(6,e,null,t),e.lanes=n,e}function us(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 Rp(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=Bl(0),this.expirationTimes=Bl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Bl(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Jo(e,t,n,r,l,s,i,a,u){return e=new Rp(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},Ao(s),e}function Lp(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Xt,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function qc(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(je(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(je(n))return qu(e,n,t)}return t}function ed(e,t,n,r,l,s,i,a,u){return e=Jo(n,r,!0,e,l,s,i,a,u),e.context=qc(null),n=e.current,r=ye(),l=Nt(n),s=lt(r,l),s.callback=t??null,St(n,s,l),e.current.lanes=l,hr(e,l,r),Ne(e,r),e}function Rl(e,t,n,r){var l=t.current,s=ye(),i=Nt(l);return n=qc(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=St(l,t,i),e!==null&&(Ke(e,l,i,s),$r(e,l,i)),i}function xl(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 Pa(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Zo(e,t){Pa(e,t),(e=e.alternate)&&Pa(e,t)}function Ap(){return null}var td=typeof reportError=="function"?reportError:function(e){console.error(e)};function qo(e){this._internalRoot=e}Ll.prototype.render=qo.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(j(409));Rl(e,t,null,null)};Ll.prototype.unmount=qo.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Bt(function(){Rl(null,e,null,null)}),t[it]=null}};function Ll(e){this._internalRoot=e}Ll.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ru();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&&Au(e)}};function ei(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Al(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Ia(){}function Op(e,t,n,r,l){if(l){if(typeof r=="function"){var s=r;r=function(){var c=xl(i);s.call(c)}}var i=ed(t,r,e,0,null,!1,!1,"",Ia);return e._reactRootContainer=i,e[it]=i.current,lr(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=xl(u);a.call(c)}}var u=Jo(e,0,!1,null,null,!1,!1,"",Ia);return e._reactRootContainer=u,e[it]=u.current,lr(e.nodeType===8?e.parentNode:e),Bt(function(){Rl(t,u,n,r)}),u}function Ol(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=xl(i);a.call(u)}}Rl(t,i,e,l)}else i=Op(n,t,e,l,r);return xl(i)}Pu=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Fn(t.pendingLanes);n!==0&&(vo(t,n|1),Ne(t,ee()),!(M&6)&&(kn=ee()+500,It()))}break;case 13:Bt(function(){var r=at(e,1);if(r!==null){var l=ye();Ke(r,e,1,l)}}),Zo(e,1)}};wo=function(e){if(e.tag===13){var t=at(e,134217728);if(t!==null){var n=ye();Ke(t,e,134217728,n)}Zo(e,134217728)}};Iu=function(e){if(e.tag===13){var t=Nt(e),n=at(e,t);if(n!==null){var r=ye();Ke(n,e,t,r)}Zo(e,t)}};Ru=function(){return U};Lu=function(e,t){var n=U;try{return U=e,t()}finally{U=n}};Cs=function(e,t,n){switch(t){case"input":if(vs(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=bl(r);if(!l)throw Error(j(90));cu(r),vs(r,l)}}}break;case"textarea":fu(e,n);break;case"select":t=n.value,t!=null&&un(e,!!n.multiple,t,!1)}};vu=Go;wu=Bt;var Dp={usingClientEntryPoint:!1,Events:[yr,tn,bl,yu,xu,Go]},An={findFiberByHostInstance:At,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},zp={bundleType:An.bundleType,version:An.version,rendererPackageName:An.rendererPackageName,rendererConfig:An.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=ju(e),e===null?null:e.stateNode},findFiberByHostInstance:An.findFiberByHostInstance||Ap,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 Or=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Or.isDisabled&&Or.supportsFiber)try{kl=Or.inject(zp),Ze=Or}catch{}}Ie.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Dp;Ie.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!ei(t))throw Error(j(200));return Lp(e,t,null,n)};Ie.createRoot=function(e,t){if(!ei(e))throw Error(j(299));var n=!1,r="",l=td;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(l=t.onRecoverableError)),t=Jo(e,1,!1,null,null,n,!1,r,l),e[it]=t.current,lr(e.nodeType===8?e.parentNode:e),new qo(t)};Ie.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=ju(t),e=e===null?null:e.stateNode,e};Ie.flushSync=function(e){return Bt(e)};Ie.hydrate=function(e,t,n){if(!Al(t))throw Error(j(200));return Ol(null,e,t,!0,n)};Ie.hydrateRoot=function(e,t,n){if(!ei(e))throw Error(j(405));var r=n!=null&&n.hydratedSources||null,l=!1,s="",i=td;if(n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),t=ed(t,null,e,1,n??null,l,!1,s,i),e[it]=t.current,lr(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 Ll(t)};Ie.render=function(e,t,n){if(!Al(t))throw Error(j(200));return Ol(null,e,t,!1,n)};Ie.unmountComponentAtNode=function(e){if(!Al(e))throw Error(j(40));return e._reactRootContainer?(Bt(function(){Ol(null,null,e,!1,function(){e._reactRootContainer=null,e[it]=null})}),!0):!1};Ie.unstable_batchedUpdates=Go;Ie.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Al(n))throw Error(j(200));if(e==null||e._reactInternals===void 0)throw Error(j(38));return Ol(e,t,n,!1,r)};Ie.version="18.3.1-next-f1338f8080-20240426";function nd(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(nd)}catch(e){console.error(e)}}nd(),nu.exports=Ie;var Mp=nu.exports,Ra=Mp;fs.createRoot=Ra.createRoot,fs.hydrateRoot=Ra.hydrateRoot;function Fp({size:e="sm"}){const t=e==="sm"?"w-4 h-4":"w-5 h-5";return o.jsx("div",{className:`${t} border-2 border-claw-500 border-t-transparent rounded-full animate-spin shrink-0`})}function ti(){return 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"}})]})}function La({text:e}){const[t,n]=w.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 Up({onReady:e}){const[t,n]=w.useState("checking"),[r,l]=w.useState(null),[s,i]=w.useState(""),[a,u]=w.useState(""),[c,h]=w.useState(0),g=w.useRef(null);w.useEffect(()=>{m()},[]),w.useEffect(()=>{g.current&&(g.current.scrollTop=g.current.scrollHeight)},[s]),w.useEffect(()=>{if(t!=="installing")return;const v=setInterval(()=>h(k=>k+1),1e3);return()=>clearInterval(v)},[t]);async function m(){n("checking");try{const k=await(await fetch("/api/preflight")).json();k.installed?(l(k.version),n("ok"),setTimeout(e,1200)):n("missing")}catch{n("missing")}}async function x(){n("installing"),i(""),u(""),h(0);try{const k=(await fetch("/api/preflight/install",{method:"POST"})).body.getReader(),R=new TextDecoder;let p="";for(;;){const{done:d,value:f}=await k.read();if(d)break;p+=R.decode(f,{stream:!0});const y=p.split(`
|
|
41
|
-
`);p=y.pop();for(const S of y)if(S.startsWith("data:"))try{const{type:N,data:E}=JSON.parse(S.slice(5).trim());N==="log"&&i(T=>T+E),N==="done"&&(l(E),n("ok"),setTimeout(e,1500)),N==="error"&&(u(E),n("error"))}catch{}}}catch(v){u(v.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-5",children:"🦞"}),o.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[o.jsx(Fp,{size:"md"}),o.jsx("h2",{className:"text-lg font-bold text-white",children:"Installing OpenClaw..."})]}),o.jsxs("p",{className:"text-sm text-gray-500 mb-5",children:[c,"s elapsed · usually takes under a minute"]}),o.jsx("div",{ref:g,className:"w-full max-w-lg h-40 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 npm install..."}),o.jsxs("div",{className:"flex items-center gap-2 mt-4 text-xs text-gray-600",children:[o.jsx("span",{children:"Downloading packages"}),o.jsx(ti,{})]})]}):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(La,{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:x,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(La,{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 Wp={},Aa=e=>{let t;const n=new Set,r=(h,g)=>{const m=typeof h=="function"?h(t):h;if(!Object.is(m,t)){const x=t;t=g??(typeof m!="object"||m===null)?m:Object.assign({},t,m),n.forEach(v=>v(t,x))}},l=()=>t,u={setState:r,getState:l,getInitialState:()=>c,subscribe:h=>(n.add(h),()=>n.delete(h)),destroy:()=>{(Wp?"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},$p=e=>e?Aa(e):Aa;var rd={exports:{}},ld={},sd={exports:{}},od={};/**
|
|
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=w;function Bp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Hp=typeof Object.is=="function"?Object.is:Bp,Vp=Sn.useState,Kp=Sn.useEffect,Gp=Sn.useLayoutEffect,Qp=Sn.useDebugValue;function Yp(e,t){var n=t(),r=Vp({inst:{value:n,getSnapshot:t}}),l=r[0].inst,s=r[1];return Gp(function(){l.value=n,l.getSnapshot=t,cs(l)&&s({inst:l})},[e,n,t]),Kp(function(){return cs(l)&&s({inst:l}),e(function(){cs(l)&&s({inst:l})})},[e]),Qp(n),n}function cs(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Hp(e,n)}catch{return!0}}function Xp(e,t){return t()}var Jp=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Xp:Yp;od.useSyncExternalStore=Sn.useSyncExternalStore!==void 0?Sn.useSyncExternalStore:Jp;sd.exports=od;var Zp=sd.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 Dl=w,qp=Zp;function em(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var tm=typeof Object.is=="function"?Object.is:em,nm=qp.useSyncExternalStore,rm=Dl.useRef,lm=Dl.useEffect,sm=Dl.useMemo,om=Dl.useDebugValue;ld.useSyncExternalStoreWithSelector=function(e,t,n,r,l){var s=rm(null);if(s.current===null){var i={hasValue:!1,value:null};s.current=i}else i=s.current;s=sm(function(){function u(x){if(!c){if(c=!0,h=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,tm(h,x))return v;var k=r(x);return l!==void 0&&l(v,k)?(h=x,v):(h=x,g=k)}var c=!1,h,g,m=n===void 0?null:n;return[function(){return u(t())},m===null?void 0:function(){return u(m())}]},[t,n,r,l]);var a=nm(e,s[0],s[1]);return lm(function(){i.hasValue=!0,i.value=a},[a]),om(a),a};rd.exports=ld;var im=rd.exports;const am=Ba(im),id={},{useDebugValue:um}=eu,{useSyncExternalStoreWithSelector:cm}=am;let Oa=!1;const dm=e=>e;function fm(e,t=dm,n){(id?"production":void 0)!=="production"&&n&&!Oa&&(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"),Oa=!0);const r=cm(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return um(r),r}const Da=e=>{(id?"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"?$p(e):e,n=(r,l)=>fm(t,r,l);return Object.assign(n,t),n},ad=e=>e?Da(e):Da,so=()=>({id:"",name:"",mission:"",inputs:"",outputs:"",failure:"",escalation:"",never:[]}),za=()=>({version:"1.0",team:{name:"",mission:""},agents:[so()],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:[]}}}),Qe=ad((e,t)=>{const n=r=>l=>e(s=>({teamSpec:{...s.teamSpec,[r]:{...s.teamSpec[r],...l}}}));return{phase:0,subStep:0,isTeam:null,isMainAgent:null,defaultWorkspace:"~/.openclaw/workspace",conversationMessages:[],conversationComplete:!1,teamSpec:za(),generatedFiles:[],writeResult:null,validationOutput:"",isGenerating:!1,isWriting:!1,isValidating:!1,channelChoice:null,setPhase:r=>e({phase:r,subStep:0}),setSubStep:r=>e({subStep:r}),setIsTeam:r=>{if(e({isTeam:r}),!r){const{teamSpec:l}=t(),s=l.agents[0]||so();e(i=>({teamSpec:{...i.teamSpec,orchestration:{mode:"hub_and_spoke",router_agent:s.id},handoffs:[],routing:{defaultAgentId:s.id,bindings:[]},team:{...i.teamSpec.team,name:i.teamSpec.team.name||(s.name?s.name+" Workspace":"")}}}))}},updateTeam:n("team"),updateOrchestration:n("orchestration"),updateSharedMemory:n("shared_memory"),updateRouting:n("routing"),updateSharedConstraints:n("shared_constraints"),addAgent:()=>e(r=>({teamSpec:{...r.teamSpec,agents:[...r.teamSpec.agents,so()]}})),removeAgent:r=>e(l=>({teamSpec:{...l.teamSpec,agents:l.teamSpec.agents.filter((s,i)=>i!==r)}})),updateAgent:(r,l)=>e(s=>{const i=[...s.teamSpec.agents];i[r]={...i[r],...l};const a=t().isTeam;let u={};return!a&&r===0&&(u={orchestration:{mode:"hub_and_spoke",router_agent:i[0].id},routing:{defaultAgentId:i[0].id,bindings:[]}}),{teamSpec:{...s.teamSpec,agents:i,...u}}}),addHandoff:()=>e(r=>({teamSpec:{...r.teamSpec,handoffs:[...r.teamSpec.handoffs,{from:"",to:"",when:"",payload_contract:""}]}})),removeHandoff:r=>e(l=>({teamSpec:{...l.teamSpec,handoffs:l.teamSpec.handoffs.filter((s,i)=>i!==r)}})),updateHandoff:(r,l)=>e(s=>{const i=[...s.teamSpec.handoffs];return i[r]={...i[r],...l},{teamSpec:{...s.teamSpec,handoffs:i}}}),addBinding:()=>e(r=>({teamSpec:{...r.teamSpec,routing:{...r.teamSpec.routing,bindings:[...r.teamSpec.routing.bindings||[],{agentId:"",match:{channel:""}}]}}})),removeBinding:r=>e(l=>({teamSpec:{...l.teamSpec,routing:{...l.teamSpec.routing,bindings:l.teamSpec.routing.bindings.filter((s,i)=>i!==r)}}})),updateBinding:(r,l)=>e(s=>{const i=[...s.teamSpec.routing.bindings];return i[r]={...i[r],...l},{teamSpec:{...s.teamSpec,routing:{...s.teamSpec.routing,bindings:i}}}}),setIsMainAgent:r=>e({isMainAgent:r}),setDefaultWorkspace:r=>e({defaultWorkspace:r}),setConversationMessages:r=>e({conversationMessages:r}),setConversationComplete:r=>e({conversationComplete:r}),mergeTeamSpec:r=>e(l=>{var a,u;const s=l.teamSpec,i={...s};if(r.version&&(i.version=r.version),r.team&&(i.team={...s.team,...r.team}),r.orchestration&&(i.orchestration={...s.orchestration,...r.orchestration}),r.shared_memory&&(i.shared_memory={...s.shared_memory,...r.shared_memory}),r.routing&&(i.routing={...s.routing,...r.routing}),r.shared_constraints&&(i.shared_constraints={...s.shared_constraints,...r.shared_constraints}),r.handoffs!==void 0&&(i.handoffs=r.handoffs),r.capabilities&&(i.capabilities={...s.capabilities,...r.capabilities,recommendedSkills:r.capabilities.recommendedSkills??((a=s.capabilities)==null?void 0:a.recommendedSkills)??[],tools:{...((u=s.capabilities)==null?void 0:u.tools)||{},...r.capabilities.tools||{}}}),r.agents){const c=new Map(s.agents.filter(g=>g.id).map(g=>[g.id,g]));for(const g of r.agents)g.id&&c.set(g.id,{...c.get(g.id)||{},...g});const h=Array.from(c.values());i.agents=h.length>0?h:s.agents}return{teamSpec:i}}),setGeneratedFiles:r=>e({generatedFiles:r}),setWriteResult:r=>e({writeResult:r}),setValidationOutput:r=>e({validationOutput:r}),setIsGenerating:r=>e({isGenerating:r}),setIsWriting:r=>e({isWriting:r}),setIsValidating:r=>e({isValidating:r}),setChannelChoice:r=>e({channelChoice:r}),reset:()=>e({phase:0,subStep:0,isTeam:null,isMainAgent:null,defaultWorkspace:"~/.openclaw/workspace",teamSpec:za(),generatedFiles:[],writeResult:null,validationOutput:"",isGenerating:!1,isWriting:!1,isValidating:!1,channelChoice:null,conversationMessages:[],conversationComplete:!1})}}),ud="openclaw-ai-config";function pm(){try{const e=localStorage.getItem(ud);return e?JSON.parse(e):{}}catch{return{}}}function On(e){try{localStorage.setItem(ud,JSON.stringify({provider:e.provider,apiKey:e.apiKey,model:e.model,configured:e.configured,openclawEnv:e.openclawEnv||!1}))}catch{}}const Dn=pm(),zl=ad((e,t)=>({provider:Dn.provider||"openclaw",apiKey:Dn.apiKey||"",model:Dn.model||"claude-sonnet-4-6",configured:Dn.configured||!1,openclawEnv:Dn.openclawEnv||!1,openclawDefault:null,setProvider:n=>{e({provider:n}),On(t())},setApiKey:n=>{e({apiKey:n}),On(t())},setModel:n=>{e({model:n}),On(t())},configure:({provider:n,apiKey:r,model:l,openclawEnv:s})=>{const i={provider:n,apiKey:r||"",model:l,configured:!0,openclawEnv:!!s};e(i),On({...t(),...i})},reset:()=>{const n={provider:"openclaw",apiKey:"",model:"claude-sonnet-4-6",configured:!1,openclawEnv:!1};e(n),On(n)},setOpenclawDefault:n=>e({openclawDefault:n})})),Ma={CHAT:0,PLAYGROUND:6},Fa=["Chat","Review","Generate","Capabilities","Connect","Validate","Playground"];function Cn(){const{phase:e,setPhase:t}=Qe();function n(){t(Math.min(e+1,Ma.PLAYGROUND))}function r(){t(Math.max(e-1,Ma.CHAT))}return{phase:e,advance:n,goBack:r}}function mm({currentPhase:e}){return o.jsx("div",{className:"flex items-center gap-1",children:Fa.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<Fa.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 ds={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 hm({onDone:e}){const{configure:t,setOpenclawDefault:n}=zl(),[r,l]=w.useState(null),[s,i]=w.useState("anthropic"),[a,u]=w.useState("need"),[c,h]=w.useState(""),[g,m]=w.useState(""),[x,v]=w.useState(!1);w.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 k(f){i(f),h(""),m("")}function R(f){u(f),m("")}async function p(){if(!c.trim()){m("Paste your API key to continue.");return}m(""),v(!0);const f=ds[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})}),S=await y.json();if(!y.ok)throw new Error(S.error||"Connection failed");t({provider:s,apiKey:c.trim(),model:f}),e==null||e()}catch(y){const S=y.message||"";S.includes("401")||S.includes("invalid")||S.includes("auth")||S.includes("key")?m("That key didn't work — make sure you copied it in full."):S.includes("credit")||S.includes("balance")||S.includes("quota")?m("Your account has no remaining credit. Add a balance and try again."):m(`Connection failed: ${S}`)}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=ds[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(ds).map(([f,y])=>o.jsxs("button",{onClick:()=>k(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=>{h(f.target.value),m("")},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 Ua(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
|
-
`)+gm}const gm=`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 ym(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 xm(e){return e.replace(/<teamspec[\s\S]*?<\/teamspec>/g,"").trim()}function vm({msg:e}){const t=e.role==="user",n=e.role==="assistant"?xm(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 wm({installCtx:e,onConfirm:t}){const[n,r]=w.useState("new");if(w.useEffect(()=>{e.isFreshInstall&&t(!0,e.defaultWorkspace)},[]),e.isFreshInstall)return null;const l=e.existingAgentCount,s=[{id:"new",title:"Add a new agent",desc:l>0?`Add a specialist alongside your ${l} existing agent${l>1?"s":""}.`:"Create a new specialist with its own personality and workspace."},{id:"main",title:"Replace my main agent",desc:"Rebuild the default helper that responds to all your conversations."}];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:s.map(i=>o.jsxs("button",{onClick:()=>r(i.id),className:`w-full flex items-start gap-4 p-4 rounded-xl border text-left transition-colors ${n===i.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===i.id?"border-claw-400 bg-claw-500":"border-gray-600"}`,children:n===i.id&&o.jsx("div",{className:"w-2 h-2 rounded-full bg-white"})}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("span",{className:`text-sm font-semibold ${n===i.id?"text-white":"text-gray-300"}`,children:i.title}),o.jsx("p",{className:"text-xs text-gray-500 mt-0.5",children:i.desc})]})]},i.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 cd(){const{conversationMessages:e,setConversationMessages:t,conversationComplete:n,setConversationComplete:r,mergeTeamSpec:l,setPhase:s,isMainAgent:i,setIsMainAgent:a,setDefaultWorkspace:u}=Qe(),{configured:c,provider:h,apiKey:g,model:m,openclawEnv:x}=zl(),{advance:v}=Cn(),[k,R]=w.useState(""),[p,d]=w.useState(!1),[f,y]=w.useState(""),[S,N]=w.useState(!1),[E,T]=w.useState(null),[D,L]=w.useState(!1),z=w.useRef(!1),W=w.useRef(null),oe=w.useRef(null),ie=w.useRef(null);w.useEffect(()=>{fetch("/api/install-context").then(C=>C.json()).then(C=>T(C)).catch(()=>T({isFreshInstall:!1,defaultWorkspace:"~/.openclaw/workspace",existingAgentCount:0}))},[]);function be(C,I){a(C),u(I),W.current=Ua(C),L(!0)}w.useEffect(()=>{c&&D&&!z.current&&e.length===0&&(z.current=!0,J("Hello! I'd like to build an AI helper.",[]))},[c,D]),w.useEffect(()=>{var C;(C=oe.current)==null||C.scrollIntoView({behavior:"smooth"})},[e,p]);async function J(C,I){const F={role:"user",content:C},$=C.startsWith("Hello! I'd like to build"),Ce=$?I:[...I,F];$||t(Ce),d(!0),y("");try{const q=await fetch("/api/chat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({messages:$?[{role:"user",content:"Start the conversation with a warm greeting and your first question."}]:Ce,...x?{}:{apiKey:g},model:m,provider:h,system:W.current||Ua(i)})}),Le=await q.json();if(!q.ok)throw new Error(Le.error||"AI request failed");const A={role:"assistant",content:Le.content},_=[...Ce,A];t(_);const Ue=ym(Le.content);for(const Kt of Ue)l(Kt.spec),Kt.complete&&r(!0)}catch(q){y(q.message)}finally{d(!1),setTimeout(()=>{var q;return(q=ie.current)==null?void 0:q.focus()},100)}}function B(){const C=k.trim();!C||p||(R(""),J(C,e))}function b(C){C.key==="Enter"&&!C.shiftKey&&(C.preventDefault(),B())}return!c||S?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(hm,{onDone:()=>{N(!1),z.current=!1}})]}):D?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((C,I)=>o.jsx(vm,{msg:C},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.jsx(ti,{})})]}),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(""),N(!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:oe})]}),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:ie,value:k,onChange:C=>R(C.target.value),onKeyDown:b,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:B,disabled:p||!k.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(wm,{installCtx:E,onConfirm:be}):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 km({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 Sm(){var u,c,h,g,m;const e=Qe(x=>x.teamSpec),{advance:t,goBack:n}=Cn(),[r,l]=w.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:[((h=e.team)==null?void 0:h.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(km,{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${(m=e.shared_memory)!=null&&m.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 jm({files:e}){const[t,n]=w.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 Nm(){var D,L;const{teamSpec:e,generatedFiles:t,setGeneratedFiles:n,writeResult:r,setWriteResult:l,isGenerating:s,setIsGenerating:i,isWriting:a,setIsWriting:u,isMainAgent:c,defaultWorkspace:h}=Qe(),{advance:g}=Cn(),[m,x]=w.useState([]),[v,k]=w.useState(!1),[R,p]=w.useState(""),[d,f]=w.useState(!1),[y,S]=w.useState("");w.useEffect(()=>{t.length===0&&N()},[]);async function N(){i(!0),p("");try{const z=await fetch("/api/generate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({teamSpec:e})}),W=await z.json();if(!z.ok)throw new Error(W.error||"Generation failed");n(W.files);const oe=e.agents.map(J=>J.id).join(","),be=await(await fetch(`/api/check-paths?agents=${oe}`)).json();x(be.conflicts.filter(J=>J.exists))}catch(z){p(z.message)}finally{i(!1)}}async function E(){var z;u(!0),p(""),S("");try{const W={};if(c)for(const B of e.agents)W[B.id]=h||"~/.openclaw/workspace";else await Promise.all(e.agents.map(async B=>{const C=await(await fetch(`/api/resolve-workspace/${B.id}`)).json();W[B.id]=C.workspace}));const oe=t.map(B=>{const b=B.path.match(/^workspace-([^/]+)\/(.+)$/);if(b){const[,C,I]=b,F=W[C]||`~/.openclaw/workspace-${C}`;return{...B,path:`${F}/${I}`}}return{...B,path:`~/.openclaw/${B.path}`}}),ie=await fetch("/api/write",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:oe,force:v})}),be=await ie.json();if(!ie.ok)throw new Error(be.error||"Write failed");l(be),(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(B=>({id:B.id,workspace:W[B.id]||`~/.openclaw/workspace-${B.id}`}))},bindings:e.routing.bindings||[],defaultAgentId:e.routing.defaultAgentId||((z=e.agents[0])==null?void 0:z.id)})})).ok?f(!0):S("Files written, but failed to update openclaw.json. You may need to add the agent manually.")}catch(W){p(W.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(jm,{files:t})}),m.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:m.map(z=>o.jsxs("li",{children:[o.jsx("code",{children:z.path})," already exists"]},z.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:z=>k(z.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 ",((D=r.written)==null?void 0:D.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:N,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 bm({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 Cm=[{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 Em({agent:e}){var s,i;const{teamSpec:t,mergeTeamSpec:n}=Qe(),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]||[],h=c.includes(a)?c.filter(m=>m!==a):[...c,a];n({capabilities:{...t.capabilities,agentToolDeny:{...u,[e.id]:h}}})}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:Cm.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 Dr({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(bm,{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 _m(){var A;const{advance:e}=Cn(),{teamSpec:t}=Qe(),n=((A=t.capabilities)==null?void 0:A.recommendedSkills)||[],[r,l]=w.useState(!0),[s,i]=w.useState(!1),[a,u]=w.useState(!1),[c,h]=w.useState(""),[g,m]=w.useState("none"),[x,v]=w.useState(!0),[k,R]=w.useState(!1),[p,d]=w.useState(""),[f,y]=w.useState("text-embedding-3-small"),[S,N]=w.useState(!1),[E,T]=w.useState("brave"),[D,L]=w.useState(""),[z,W]=w.useState(""),[oe,ie]=w.useState(!1),[be,J]=w.useState(!1),[B,b]=w.useState(""),[C,I]=w.useState("http://homeassistant.local:8123"),[F,$]=w.useState(!1),[Ce,q]=w.useState("");w.useEffect(()=>{fetch("/api/capabilities").then(_=>_.json()).then(_=>{var ni,ri,li,si,oi,ii,ai,ui,ci,di,fi,pi,mi,hi,gi,yi,xi,vi,wi,ki,Si,ji;const Ue=((ni=_.memory)==null?void 0:ni.mode)||"none",Kt=(ri=t.capabilities)==null?void 0:ri.memory;m(Ue!=="none"?Ue:Kt||"none"),v(((si=(li=_.memory)==null?void 0:li.lancedb)==null?void 0:si.autoRecall)??!0),R(((ii=(oi=_.memory)==null?void 0:oi.lancedb)==null?void 0:ii.autoCapture)??!1),d(((ui=(ai=_.memory)==null?void 0:ai.lancedb)==null?void 0:ui.embeddingApiKey)||""),y(((di=(ci=_.memory)==null?void 0:ci.lancedb)==null?void 0:di.embeddingModel)||"text-embedding-3-small");const dd=((fi=_.webSearch)==null?void 0:fi.enabled)||!1;N(dd||((pi=t.capabilities)==null?void 0:pi.webSearch)||!1),T(((mi=_.webSearch)==null?void 0:mi.provider)||"brave"),L(((hi=_.webSearch)==null?void 0:hi.braveApiKey)||""),W(((gi=_.webSearch)==null?void 0:gi.perplexityApiKey)||""),ie(((yi=_.webFetch)==null?void 0:yi.enabled)||((xi=t.capabilities)==null?void 0:xi.webFetch)||!1),J(((vi=_.homeAssistant)==null?void 0:vi.enabled)||!1),b(((wi=_.homeAssistant)==null?void 0:wi.token)||""),I(((ki=_.homeAssistant)==null?void 0:ki.url)||"http://homeassistant.local:8123"),$(((Si=_.googlePlaces)==null?void 0:Si.enabled)||!1),q(((ji=_.googlePlaces)==null?void 0:ji.apiKey)||"")}).catch(()=>{}).finally(()=>l(!1))},[]);async function Le(){var _;i(!0),h("");try{const Ue=await fetch("/api/capabilities",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({agentToolDeny:((_=t.capabilities)==null?void 0:_.agentToolDeny)||{},memory:{mode:g,lancedb:{autoRecall:x,autoCapture:k,embeddingApiKey:p,embeddingModel:f}},webSearch:{enabled:S,provider:E,braveApiKey:D,perplexityApiKey:z},webFetch:{enabled:oe},homeAssistant:{enabled:be,token:B,url:C},googlePlaces:{enabled:F,apiKey:Ce}})}),Kt=await Ue.json();if(!Ue.ok)throw new Error(Kt.error||"Save failed");u(!0)}catch(Ue){h(Ue.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(_=>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:_.name}),o.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded border ${_.source==="installed"?"text-green-400 border-green-800 bg-green-900/20":"text-blue-400 border-blue-800 bg-blue-900/20"}`,children:_.source==="installed"?"already installed":"clawhub"}),_.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:_.reason}),_.source==="clawhub"&&_.install&&o.jsx("code",{className:"text-xs text-gray-600 mt-1 block",children:_.install})]})},_.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(_=>o.jsxs("button",{onClick:()=>m(_.id),className:`text-left p-3 rounded-lg border text-xs transition-colors ${g===_.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:_.label}),o.jsx("div",{className:"text-gray-500",children:_.desc})]},_.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:_=>v(_.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:k,onChange:_=>R(_.target.checked),className:"rounded"}),"Auto-capture",o.jsx("span",{className:"text-gray-600",children:"(auto-save after each session)"})]})]})]})]})]}),o.jsxs(Dr,{title:"Web Search",icon:"🔍",description:"Lets agents search the web for real-time information.",globalNote:!0,enabled:S,onToggle:N,children:[o.jsx("div",{className:"flex gap-2 mb-2",children:["brave","perplexity"].map(_=>o.jsx("button",{onClick:()=>T(_),className:`px-3 py-1 rounded-lg text-xs border transition-colors capitalize ${E===_?"border-claw-500 bg-claw-900/30 text-white":"border-gray-700 text-gray-400 hover:border-gray-600"}`,children:_==="brave"?"Brave Search":"Perplexity"},_))}),E==="brave"?o.jsx(Qt,{label:"Brave Search API Key",value:D,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:z,onChange:W,placeholder:"sk-or-v1-...",type:"password",hint:"Uses perplexity/sonar-pro via OpenRouter. Get a key at openrouter.ai."})]}),o.jsx(Dr,{title:"Web Browsing",icon:"🌐",description:"Lets agents open URLs and read web pages. Uses a headless browser — no API key needed.",globalNote:!0,enabled:oe,onToggle:ie}),o.jsxs(Dr,{title:"Home Assistant",icon:"🏠",description:"Control smart home devices — lights, locks, thermostats, automations.",enabled:be,onToggle:J,children:[o.jsx(Qt,{label:"Long-Lived Access Token",value:B,onChange:b,placeholder:"eyJ...",type:"password",hint:"Profile → Security → Long-Lived Access Tokens → Create token."}),o.jsx(Qt,{label:"Home Assistant URL",value:C,onChange:I,placeholder:"http://homeassistant.local:8123",hint:"Your HA instance URL. Works on local network or via Nabu Casa remote access."})]}),o.jsx(Dr,{title:"Google Places",icon:"📍",description:"Location search, nearby places, business info, maps data.",enabled:F,onToggle:$,children:o.jsx(Qt,{label:"Google Maps API Key",value:Ce,onChange:q,placeholder:"AIza...",type:"password",hint:"Enable the Places API at console.cloud.google.com. Free tier: 28,000 calls/month."})}),t.agents.filter(_=>_.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(_=>_.id).map(_=>o.jsx(Em,{agent:_},_.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:Le,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 pr({label:e,hint:t,value:n,onChange:r,type:l="text",placeholder:s,mono:i}){return o.jsxs("div",{className:"mb-4",children:[e&&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 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 ue({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 vl({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 _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 Tm({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(ue,{number:1,children:["Go to the ",o.jsx(vl,{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(ue,{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(ue,{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(ue,{number:4,children:["Click ",o.jsx("strong",{className:"text-white",children:"Reset Token"}),", confirm, then copy the token and paste it below."]}),o.jsxs(ue,{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(pr,{label:"Bot Token",type:"password",mono:!0,placeholder:"MTQ2NDQ...",hint:"From the Bot page → Reset Token",value:t,onChange:n}),o.jsx(pr,{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 Pm({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(ue,{number:1,children:["Click this link to invite ",o.jsx("strong",{className:"text-white",children:e})," to your server:"," ",o.jsx(vl,{href:i,children:"Open invite link"})]}),o.jsxs(ue,{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(ue,{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 Im({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(ue,{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(ue,{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(ue,{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(pr,{label:"Server ID",mono:!0,placeholder:"1464413706023731212",hint:"Right-click your server name → Copy Server ID",value:t,onChange:n}),o.jsx(pr,{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 Rm({agentName:e,allowFrom:t,setAllowFrom:n,onBack:r,onNext:l}){const[s,i]=w.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(ue,{number:1,children:"Make sure Developer Mode is on (from the previous step)"}),o.jsxs(ue,{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 Wa({agentName:e,existingAgents:t,selected:n,setSelected:r,onBack:l,onNext:s,stepNum:i,totalSteps:a}){return t.length===0?(w.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(h=>h!==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 Lm({alreadyConfigured:e,botToken:t,setBotToken:n,allowFrom:r,setAllowFrom:l,onBack:s,onNext:i}){const[a,u]=w.useState("");function c(){const h=a.trim();h&&!r.includes(h)&&l([...r,h]),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(ue,{number:1,children:["Open Telegram and search for ",o.jsx("strong",{className:"text-white",children:"@BotFather"}),", or"," ",o.jsx(vl,{href:"https://t.me/BotFather",children:"open this link"}),"."]}),o.jsxs(ue,{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(ue,{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(pr,{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(ue,{number:e?1:4,children:["Message ",o.jsx(vl,{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:h=>u(h.target.value),onKeyDown:h=>h.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(h=>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:h}),o.jsx("button",{onClick:()=>l(r.filter(g=>g!==h)),className:"text-gray-600 hover:text-red-400 text-xs transition-colors",children:"✕"})]},h))]}),o.jsx(_t,{onBack:s,onNext:i,nextDisabled:!e&&!t.trim()})]})}function $a({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 Am(){var Le;const{teamSpec:e,setChannelChoice:t}=Qe(),{advance:n}=Cn(),r=((Le=e.agents)==null?void 0:Le[0])||{},l=r.id||"",s=r.name||l||"Your agent",[i,a]=w.useState(null),[u,c]=w.useState(0),[h,g]=w.useState(""),[m,x]=w.useState(""),[v,k]=w.useState(!1),[R,p]=w.useState(""),[d,f]=w.useState(""),[y,S]=w.useState(!1),[N,E]=w.useState([]),[T,D]=w.useState(!1),[L,z]=w.useState(""),[W,oe]=w.useState([]),[ie,be]=w.useState([]),[J,B]=w.useState([]),[b,C]=w.useState(!1),[I,F]=w.useState(""),[$,Ce]=w.useState(!1);w.useEffect(()=>{fetch("/api/channel/agents").then(A=>A.json()).then(A=>be((A.agents||[]).filter(_=>_.id!==l))),fetch("/api/channel/telegram-status").then(A=>A.json()).then(A=>D(A.configured))},[]);async function q(){C(!0),F("");try{const A={channel:i,agentId:l,agentName:s,agentComms:J,...i==="discord"&&{discord:{token:h,guildId:R,channelId:d,requireMention:y,allowFrom:N}},...i==="telegram"&&{telegram:{token:T?null:L,allowFrom:W}}},_=await fetch("/api/channel/setup",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(A)}),Ue=await _.json();if(!_.ok)throw new Error(Ue.error||"Save failed");t(i),Ce(!0)}catch(A){F(A.message)}finally{C(!1)}}if(!i)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 ${s}?`}),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:()=>{a(A.id),c(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(i==="skip")return o.jsx($a,{channel:"skip",agentName:s,onNext:()=>{t("skip"),n()}});if($)return o.jsx($a,{channel:i,agentName:s,onNext:n});if(i==="discord"){const A=ie.length>0,_=A?6:5;if(u===1)return o.jsx(Tm,{agentName:s,botToken:h,setBotToken:g,appId:m,setAppId:x,onBack:()=>a(null),onNext:()=>c(2)});if(u===2)return o.jsx(Pm,{agentName:s,appId:m,confirmed:v,setConfirmed:k,onBack:()=>c(1),onNext:()=>c(3)});if(u===3)return o.jsx(Im,{agentName:s,guildId:R,setGuildId:p,channelId:d,setChannelId:f,requireMention:y,setRequireMention:S,onBack:()=>c(2),onNext:()=>c(4)});if(u===4)return o.jsx(Rm,{agentName:s,allowFrom:N,setAllowFrom:E,onBack:()=>c(3),onNext:()=>c(A?5:6)});if(u===5&&A)return o.jsx(Wa,{agentName:s,existingAgents:ie,selected:J,setSelected:B,stepNum:5,totalSteps:_,onBack:()=>c(4),onNext:()=>c(6)});if(u===6)return o.jsxs("div",{className:"max-w-xl",children:[o.jsx(st,{step:_,total:_,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:s}),"'s account"]}),R&&o.jsxs("div",{children:["🎮 Server: ",o.jsx("code",{className:"text-claw-400",children:R})]}),d&&o.jsxs("div",{children:["📢 Channel: ",o.jsx("code",{className:"text-claw-400",children:d})]}),N.length>0&&o.jsxs("div",{children:["👤 ",N.length," allowed user",N.length>1?"s":""]}),J.length>0&&o.jsxs("div",{children:["🤝 Can collaborate with: ",J.join(", ")]})]}),I&&o.jsx("p",{className:"text-red-400 text-sm mb-4",children:I}),o.jsx(_t,{onBack:()=>c(A?5:4),onNext:q,nextLabel:"Save & continue →",saving:b})]})}if(i==="telegram"){const A=ie.length>0;if(u===1)return o.jsx(Lm,{alreadyConfigured:T,botToken:L,setBotToken:z,allowFrom:W,setAllowFrom:oe,onBack:()=>a(null),onNext:()=>c(A?2:3)});if(u===2&&A)return o.jsx(Wa,{agentName:s,existingAgents:ie,selected:J,setSelected:B,stepNum:2,totalSteps:3,onBack:()=>c(1),onNext:()=>c(3)});if(u===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:[T?o.jsx("div",{children:"✈️ Using your existing Telegram bot"}):o.jsx("div",{children:"✈️ New Telegram bot will be configured"}),W.length>0&&o.jsxs("div",{children:["👤 ",W.length," allowed user",W.length>1?"s":""]}),J.length>0&&o.jsxs("div",{children:["🤝 Can collaborate with: ",J.join(", ")]})]}),I&&o.jsx("p",{className:"text-red-400 text-sm mb-4",children:I}),o.jsx(_t,{onBack:()=>c(A?2:1),onNext:q,nextLabel:"Save & continue →",saving:b})]})}return null}function Yt({done:e,pending:t,label:n,sublabel:r,code:l}){const s=e?"bg-green-900/50 border-green-700 text-green-400":t?"bg-yellow-900/20 border-yellow-700 text-yellow-500":"bg-gray-800 border-gray-700 text-gray-500",i=e?"✓":"○";return o.jsxs("div",{className:"flex items-start gap-3 py-3 border-b border-gray-800 last:border-0",children:[o.jsx("div",{className:`w-5 h-5 rounded-full flex items-center justify-center shrink-0 mt-0.5 text-xs font-bold border ${s}`,children:i}),o.jsxs("div",{className:"min-w-0",children:[o.jsx("div",{className:`text-sm ${e?"text-gray-200":t?"text-gray-300":"text-gray-500"}`,children:n}),r&&o.jsx("div",{className:"text-xs text-gray-600 mt-0.5",children:r}),l&&o.jsx("code",{className:"text-xs text-claw-400 mt-1.5 block bg-gray-900 rounded px-2 py-1 font-mono",children:l})]})]})}function Om(){var d,f;const{validationOutput:e,setValidationOutput:t,isValidating:n,setIsValidating:r,reset:l,teamSpec:s,writeResult:i,channelChoice:a}=Qe(),{advance:u}=Cn(),[c,h]=w.useState(!1),g=((d=s.agents)==null?void 0:d[0])||{},m=g.name||g.id||"your agent";async function x(){r(!0),t("");try{const S=await(await fetch("/api/validate",{method:"POST"})).json();t(S.output||"(no output)"),h(!0)}catch(y){t(`Error: ${y.message}`),h(!0)}finally{r(!1)}}const v=!!i,k=a==="discord",R=a==="telegram",p=a==="skip"||a===null;return o.jsxs("div",{className:"max-w-2xl space-y-6",children:[o.jsxs("div",{className:"border border-gray-800 bg-gray-800/20 rounded-xl overflow-hidden",children:[o.jsxs("div",{className:"px-4 py-3 border-b border-gray-800 bg-gray-800/40",children:[o.jsx("p",{className:"text-sm font-semibold text-white",children:"Setup summary"}),o.jsx("p",{className:"text-xs text-gray-500 mt-0.5",children:"What's done and what you still need to do manually"})]}),o.jsxs("div",{className:"px-4 divide-y divide-gray-800/0",children:[o.jsx(Yt,{done:v,label:v?`Agent files written (${((f=i.written)==null?void 0:f.length)||0} files)`:"Agent files not yet written",sublabel:v?"Written to ~/.openclaw/":null}),k&&o.jsx(Yt,{done:!0,label:`Discord bot configured for ${m}`,sublabel:"Token, server, channel and allowed users saved to openclaw.json"}),R&&o.jsx(Yt,{done:!0,label:"Telegram configured",sublabel:"Bot token and allowed users saved to openclaw.json"}),p&&o.jsx(Yt,{done:!1,label:"No channel configured yet",sublabel:"You can add Discord or Telegram later by editing openclaw.json"}),o.jsx(Yt,{pending:!0,label:"Start the OpenClaw gateway",sublabel:"Run this in your terminal to bring the agent online",code:"openclaw gateway"}),k&&o.jsx(Yt,{pending:!0,label:"Approve the agent via Discord DM (first time only)",sublabel:`Send a DM to your ${m} bot — it will ask you to pair before responding`})]})]}),o.jsxs("div",{children:[o.jsxs("p",{className:"text-sm text-gray-400 mb-3",children:["Optionally run ",o.jsx("code",{className:"text-claw-400",children:"openclaw doctor"})," to validate the configuration."]}),o.jsx("button",{onClick:x,disabled:n,className:"mb-4 px-5 py-2 bg-gray-700 hover:bg-gray-600 text-gray-200 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-4",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})]})]}),o.jsxs("div",{className:"flex gap-3 flex-wrap",children:[o.jsx("button",{onClick:u,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 Dm({role:e,content:t}){return o.jsx("div",{className:`flex ${e==="user"?"justify-end":"justify-start"}`,children:o.jsx("div",{className:`max-w-[80%] rounded-2xl px-3 py-2 text-sm leading-relaxed ${e==="user"?"bg-claw-700 text-white rounded-br-sm":"bg-gray-800 text-gray-100 rounded-bl-sm"}`,children:t.split(`
|
|
224
|
-
`).map((n,r)=>o.jsxs("span",{children:[n,r<t.split(`
|
|
225
|
-
`).length-1&&o.jsx("br",{})]},r))})})}function zm(){const[e,t]=w.useState("idle"),[n,r]=w.useState(""),[l,s]=w.useState(!1),i=w.useRef(null);w.useEffect(()=>{i.current&&(i.current.scrollTop=i.current.scrollHeight)},[n]);function a(){navigator.clipboard.writeText("openclaw gateway").then(()=>{s(!0),setTimeout(()=>s(!1),2e3)})}async function u(){t("starting"),r("");try{const h=(await fetch("/api/gateway/restart",{method:"POST"})).body.getReader(),g=new TextDecoder;let m="";for(;;){const{done:x,value:v}=await h.read();if(x)break;m+=g.decode(v,{stream:!0});const k=m.split(`
|
|
226
|
-
`);m=k.pop();for(const R of k)if(R.startsWith("data:"))try{const{type:p,data:d}=JSON.parse(R.slice(5).trim());p==="log"&&r(f=>f+d),p==="done"&&t("done"),p==="error"&&(t("error"),r(f=>f+`
|
|
227
|
-
`+d))}catch{}}}catch(c){t("error"),r("Error: "+c.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-start justify-between gap-4 mb-3",children:[o.jsxs("div",{children:[o.jsx("p",{className:"text-sm font-semibold text-white",children:"Start the OpenClaw gateway"}),o.jsx("p",{className:"text-xs text-gray-500 mt-0.5",children:"Your agent goes live on Discord / Telegram once the gateway is running."})]}),e==="idle"&&o.jsx("button",{onClick:u,className:"shrink-0 px-4 py-1.5 bg-claw-600 hover:bg-claw-500 text-white rounded-lg text-xs font-semibold transition-colors",children:"Start automatically"}),e==="starting"&&o.jsxs("span",{className:"shrink-0 flex items-center gap-1.5 text-xs text-gray-400",children:[o.jsx("span",{className:"w-3 h-3 border border-gray-400 border-t-transparent rounded-full animate-spin"}),"Starting..."]}),e==="done"&&o.jsx("span",{className:"shrink-0 text-xs text-green-400",children:"✓ Live"}),e==="error"&&o.jsx("button",{onClick:u,className:"shrink-0 px-3 py-1.5 bg-gray-700 hover:bg-gray-600 text-gray-300 rounded-lg text-xs transition-colors",children:"Try again"})]}),o.jsxs("div",{className:"flex items-center justify-between bg-gray-900 border border-gray-800 rounded-lg px-3 py-2",children:[o.jsx("code",{className:"text-xs text-claw-400 font-mono",children:"openclaw gateway"}),o.jsx("button",{onClick:a,className:"text-xs text-gray-600 hover:text-gray-300 transition-colors ml-3 shrink-0",children:l?"✓ Copied":"Copy"})]}),n&&o.jsx("pre",{ref:i,className:"mt-2 max-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 Mm({agent:e}){const{provider:t,apiKey:n,model:r,openclawEnv:l}=zl(),[s,i]=w.useState([]),[a,u]=w.useState(""),[c,h]=w.useState(!1),[g,m]=w.useState(""),x=w.useRef(null),v=w.useRef(null);w.useEffect(()=>{var p;(p=x.current)==null||p.scrollIntoView({behavior:"smooth"})},[s,c]);async function k(){const p=a.trim();if(!p||c)return;u(""),m("");const d={role:"user",content:p},f=[...s,d];i(f),h(!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})}),S=await y.json();if(!y.ok)throw new Error(S.error||"Chat failed");i([...f,{role:"assistant",content:S.content}])}catch(y){m(y.message)}finally{h(!1),setTimeout(()=>{var y;return(y=v.current)==null?void 0:y.focus()},100)}}function R(p){p.key==="Enter"&&!p.shiftKey&&(p.preventDefault(),k())}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(Dm,{role:p.role,content:p.content},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.jsx(ti,{})})}),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:k,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 Fm(){var i;const{teamSpec:e,reset:t}=Qe(),n=e.agents.filter(a=>a.id),[r,l]=w.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(zm,{}),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(Mm,{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 Um=[cd,Sm,Nm,_m,Am,Om,Fm];function Wm(){const e=Qe(s=>s.phase),t=Qe(s=>s.reset),{configured:n,reset:r}=zl(),l=Um[e]||cd;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(mm,{currentPhase:e})}),o.jsx("div",{className:"flex-1 overflow-y-auto flex flex-col px-6 py-4",children:o.jsx(l,{})})]})}function $m(){const[e,t]=w.useState(!1);return e?o.jsx(Wm,{}):o.jsx(Up,{onReady:()=>t(!0)})}fs.createRoot(document.getElementById("root")).render(o.jsx(eu.StrictMode,{children:o.jsx($m,{})}));
|