apteva 0.4.16 → 0.4.18
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/ActivityPage.yv28a2vj.js +3 -0
- package/dist/ApiDocsPage.4ccwjjbk.js +4 -0
- package/dist/App.155wke5v.js +4 -0
- package/dist/App.2e19nvn4.js +13 -0
- package/dist/App.2ye1b5n0.js +4 -0
- package/dist/App.4da4ycbe.js +4 -0
- package/dist/App.b6wtzd1j.js +4 -0
- package/dist/App.fjrh28tf.js +4 -0
- package/dist/App.htc36cy8.js +4 -0
- package/dist/App.me6reaa6.js +4 -0
- package/dist/App.n5q6p960.js +4 -0
- package/dist/App.nft7h9jt.js +4 -0
- package/dist/App.np463xvy.js +4 -0
- package/dist/App.nps62kvt.js +4 -0
- package/dist/App.q8ws33cc.js +181 -0
- package/dist/App.tb0y0jmt.js +40 -0
- package/dist/ConnectionsPage.52evzrp7.js +3 -0
- package/dist/McpPage.bjqrp0n2.js +3 -0
- package/dist/SettingsPage.es76hnj2.js +3 -0
- package/dist/SkillsPage.06h8yf0h.js +3 -0
- package/dist/TasksPage.99df66mk.js +3 -0
- package/dist/TelemetryPage.bmdnxhq7.js +3 -0
- package/dist/TestsPage.denxrg8c.js +3 -0
- package/dist/index.html +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/src/auth/middleware.ts +2 -0
- package/src/db.ts +162 -11
- package/src/mcp-platform.ts +41 -1
- package/src/routes/api/agent-utils.ts +38 -2
- package/src/routes/api/agents.ts +65 -2
- package/src/routes/api/projects.ts +19 -2
- package/src/routes/api/system.ts +26 -12
- package/src/routes/api/triggers.ts +458 -0
- package/src/routes/api/webhooks.ts +171 -0
- package/src/routes/api.ts +4 -0
- package/src/routes/static.ts +12 -3
- package/src/server.ts +6 -4
- package/src/triggers/agentdojo.ts +248 -0
- package/src/triggers/composio.ts +264 -0
- package/src/triggers/index.ts +71 -0
- package/src/web/App.tsx +20 -12
- package/src/web/components/agents/AgentCard.tsx +14 -7
- package/src/web/components/agents/AgentPanel.tsx +105 -115
- package/src/web/components/common/Icons.tsx +8 -0
- package/src/web/components/common/index.ts +1 -0
- package/src/web/components/connections/ConnectionsPage.tsx +54 -0
- package/src/web/components/connections/IntegrationsTab.tsx +144 -0
- package/src/web/components/connections/OverviewTab.tsx +183 -0
- package/src/web/components/connections/TriggersTab.tsx +690 -0
- package/src/web/components/index.ts +1 -0
- package/src/web/components/layout/Sidebar.tsx +7 -1
- package/src/web/components/mcp/IntegrationsPanel.tsx +19 -3
- package/src/web/components/mcp/McpPage.tsx +9 -3
- package/src/web/components/settings/SettingsPage.tsx +96 -2
- package/src/web/components/tasks/TasksPage.tsx +2 -2
- package/src/web/components/tests/TestsPage.tsx +1 -2
- package/src/web/context/TelemetryContext.tsx +14 -1
- package/src/web/context/index.ts +1 -1
- package/src/web/hooks/useAgents.ts +15 -11
- package/src/web/types.ts +1 -1
- package/dist/App.2194efgj.js +0 -228
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import{a as Nz}from"./App.4da4ycbe.js";import"./App.n5q6p960.js";import"./App.fjrh28tf.js";import{f as qL,g as kH}from"./App.htc36cy8.js";import"./App.155wke5v.js";import"./App.2ye1b5n0.js";import{A as tO,B as zL,C as QL,D as XL,F as YL,G as JL,H as $L,j as pY,k as Rz,l as MH,m as wH,n as AH,o as vQ,p as w5,q as kQ,r as IQ,s as s5,t as DY,u as TQ,v as sO,w as eO,x as SQ,y as VQ,z as nO}from"./App.nft7h9jt.js";import"./App.2e19nvn4.js";import"./App.b6wtzd1j.js";import{K as vH,L as gY}from"./App.np463xvy.js";import"./App.me6reaa6.js";import{O as C7}from"./App.nps62kvt.js";import{$ as _L,P as Q0,Q as K8,R as z7,S as I1,T as u1,U as UL,V as VY,W as ZL,X as mY,Y as IY,Z as BL,_ as V4,aa as K6,ba as OL}from"./App.tb0y0jmt.js";var _O=K8((X2)=>{(function(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function")__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var $=!1,U=!1,B=5;function W(J0,v0){var u0=J0.length;J0.push(v0),L(J0,v0,u0)}function H(J0){return J0.length===0?null:J0[0]}function R(J0){if(J0.length===0)return null;var v0=J0[0],u0=J0.pop();if(u0!==v0)J0[0]=u0,b(J0,u0,0);return v0}function L(J0,v0,u0){var L1=u0;while(L1>0){var D1=L1-1>>>1,K4=J0[D1];if(T(K4,v0)>0)J0[D1]=v0,J0[L1]=K4,L1=D1;else return}}function b(J0,v0,u0){var L1=u0,D1=J0.length,K4=D1>>>1;while(L1<K4){var c1=(L1+1)*2-1,e4=J0[c1],r0=c1+1,Z1=J0[r0];if(T(e4,v0)<0)if(r0<D1&&T(Z1,e4)<0)J0[L1]=Z1,J0[r0]=v0,L1=r0;else J0[L1]=e4,J0[c1]=v0,L1=c1;else if(r0<D1&&T(Z1,v0)<0)J0[L1]=Z1,J0[r0]=v0,L1=r0;else return}}function T(J0,v0){var u0=J0.sortIndex-v0.sortIndex;return u0!==0?u0:J0.id-v0.id}var k=1,P=2,w=3,M=4,I=5;function C(J0,v0){}var j=typeof performance==="object"&&typeof performance.now==="function";if(j){var u=performance;X2.unstable_now=function(){return u.now()}}else{var f=Date,i=f.now();X2.unstable_now=function(){return f.now()-i}}var l=1073741823,o=-1,t=250,c=5000,k0=1e4,s=l,N0=[],p=[],r=1,g=null,_0=w,I0=!1,b1=!1,Q1=!1,n1=typeof setTimeout==="function"?setTimeout:null,d=typeof clearTimeout==="function"?clearTimeout:null,O0=typeof setImmediate<"u"?setImmediate:null,B0=typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0?navigator.scheduling.isInputPending.bind(navigator.scheduling):null;function p0(J0){var v0=H(p);while(v0!==null){if(v0.callback===null)R(p);else if(v0.startTime<=J0)R(p),v0.sortIndex=v0.expirationTime,W(N0,v0);else return;v0=H(p)}}function R1(J0){if(Q1=!1,p0(J0),!b1)if(H(N0)!==null)b1=!0,C4(t1);else{var v0=H(p);if(v0!==null)U6(R1,v0.startTime-J0)}}function t1(J0,v0){if(b1=!1,Q1)Q1=!1,c6();I0=!0;var u0=_0;try{if(U)try{return i1(J0,v0)}catch(D1){if(g!==null){var L1=X2.unstable_now();C(g,L1),g.isQueued=!1}throw D1}else return i1(J0,v0)}finally{g=null,_0=u0,I0=!1}}function i1(J0,v0){var u0=v0;p0(u0),g=H(N0);while(g!==null&&!$){if(g.expirationTime>u0&&(!J0||c4()))break;var L1=g.callback;if(typeof L1==="function"){g.callback=null,_0=g.priorityLevel;var D1=g.expirationTime<=u0,K4=L1(D1);if(u0=X2.unstable_now(),typeof K4==="function")g.callback=K4;else if(g===H(N0))R(N0);p0(u0)}else R(N0);g=H(N0)}if(g!==null)return!0;else{var c1=H(p);if(c1!==null)U6(R1,c1.startTime-u0);return!1}}function q4(J0,v0){switch(J0){case k:case P:case w:case M:case I:break;default:J0=w}var u0=_0;_0=J0;try{return v0()}finally{_0=u0}}function A4(J0){var v0;switch(_0){case k:case P:case w:v0=w;break;default:v0=_0;break}var u0=_0;_0=v0;try{return J0()}finally{_0=u0}}function s1(J0){var v0=_0;return function(){var u0=_0;_0=v0;try{return J0.apply(this,arguments)}finally{_0=u0}}}function o1(J0,v0,u0){var L1=X2.unstable_now(),D1;if(typeof u0==="object"&&u0!==null){var K4=u0.delay;if(typeof K4==="number"&&K4>0)D1=L1+K4;else D1=L1}else D1=L1;var c1;switch(J0){case k:c1=o;break;case P:c1=t;break;case I:c1=s;break;case M:c1=k0;break;case w:default:c1=c;break}var e4=D1+c1,r0={id:r++,callback:v0,priorityLevel:J0,startTime:D1,expirationTime:e4,sortIndex:-1};if(D1>L1){if(r0.sortIndex=D1,W(p,r0),H(N0)===null&&r0===H(p)){if(Q1)c6();else Q1=!0;U6(R1,D1-L1)}}else if(r0.sortIndex=e4,W(N0,r0),!b1&&!I0)b1=!0,C4(t1);return r0}function Z4(){}function v4(){if(!b1&&!I0)b1=!0,C4(t1)}function y0(){return H(N0)}function O1(J0){J0.callback=null}function A1(){return _0}var v1=!1,X1=null,n4=-1,t4=B,g6=-1;function c4(){var J0=X2.unstable_now()-g6;if(J0<t4)return!1;return!0}function Fz(){}function G4(J0){if(J0<0||J0>125){console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported");return}if(J0>0)t4=Math.floor(1000/J0);else t4=B}var C6=function(){if(X1!==null){var J0=X2.unstable_now();g6=J0;var v0=!0,u0=!0;try{u0=X1(v0,J0)}finally{if(u0)Y4();else v1=!1,X1=null}}else v1=!1},Y4;if(typeof O0==="function")Y4=function(){O0(C6)};else if(typeof MessageChannel<"u"){var x6=new MessageChannel,H4=x6.port2;x6.port1.onmessage=C6,Y4=function(){H4.postMessage(null)}}else Y4=function(){n1(C6,0)};function C4(J0){if(X1=J0,!v1)v1=!0,Y4()}function U6(J0,v0){n4=n1(function(){J0(X2.unstable_now())},v0)}function c6(){d(n4),n4=-1}var s4=Fz,B6=null;if(X2.unstable_IdlePriority=I,X2.unstable_ImmediatePriority=k,X2.unstable_LowPriority=M,X2.unstable_NormalPriority=w,X2.unstable_Profiling=B6,X2.unstable_UserBlockingPriority=P,X2.unstable_cancelCallback=O1,X2.unstable_continueExecution=v4,X2.unstable_forceFrameRate=G4,X2.unstable_getCurrentPriorityLevel=A1,X2.unstable_getFirstCallbackNode=y0,X2.unstable_next=A4,X2.unstable_pauseExecution=Z4,X2.unstable_requestPaint=s4,X2.unstable_runWithPriority=q4,X2.unstable_scheduleCallback=o1,X2.unstable_shouldYield=c4,X2.unstable_wrapCallback=s1,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function")__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var OO=K8((Z2)=>{var U8=Q0(I1()),w1=Q0(_O());(function(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function")__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var $=U8.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,U=!1;function B(z){U=z}function W(z){if(!U){for(var Q=arguments.length,X=Array(Q>1?Q-1:0),Z=1;Z<Q;Z++)X[Z-1]=arguments[Z];R("warn",z,X)}}function H(z){if(!U){for(var Q=arguments.length,X=Array(Q>1?Q-1:0),Z=1;Z<Q;Z++)X[Z-1]=arguments[Z];R("error",z,X)}}function R(z,Q,X){{var Z=$.ReactDebugCurrentFrame,Y=Z.getStackAddendum();if(Y!=="")Q+="%s",X=X.concat([Y]);var J=X.map(function(q){return String(q)});J.unshift("Warning: "+Q),Function.prototype.apply.call(console[z],console,J)}}var L=0,b=1,T=2,k=3,P=4,w=5,M=6,I=7,C=8,j=9,u=10,f=11,i=12,l=13,o=14,t=15,c=16,k0=17,s=18,N0=19,p=21,r=22,g=23,_0=24,I0=25,b1=!0,Q1=!1,n1=!1,d=!1,O0=!1,B0=!0,p0=!1,R1=!0,t1=!0,i1=!0,q4=!0,A4=new Set,s1={},o1={};function Z4(z,Q){v4(z,Q),v4(z+"Capture",Q)}function v4(z,Q){if(s1[z])H("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",z);s1[z]=Q;{var X=z.toLowerCase();if(o1[X]=z,z==="onDoubleClick")o1.ondblclick=z}for(var Z=0;Z<Q.length;Z++)A4.add(Q[Z])}var y0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",O1=Object.prototype.hasOwnProperty;function A1(z){{var Q=typeof Symbol==="function"&&Symbol.toStringTag,X=Q&&z[Symbol.toStringTag]||z.constructor.name||"Object";return X}}function v1(z){try{return X1(z),!1}catch(Q){return!0}}function X1(z){return""+z}function n4(z,Q){if(v1(z))return H("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before before using it here.",Q,A1(z)),X1(z)}function t4(z){if(v1(z))return H("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",A1(z)),X1(z)}function g6(z,Q){if(v1(z))return H("The provided `%s` prop is an unsupported type %s. This value must be coerced to a string before before using it here.",Q,A1(z)),X1(z)}function c4(z,Q){if(v1(z))return H("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before before using it here.",Q,A1(z)),X1(z)}function Fz(z){if(v1(z))return H("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before before using it here.",A1(z)),X1(z)}function G4(z){if(v1(z))return H("Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before before using it here.",A1(z)),X1(z)}var C6=0,Y4=1,x6=2,H4=3,C4=4,U6=5,c6=6,s4=":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",B6=s4+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",J0=new RegExp("^["+s4+"]["+B6+"]*$"),v0={},u0={};function L1(z){if(O1.call(u0,z))return!0;if(O1.call(v0,z))return!1;if(J0.test(z))return u0[z]=!0,!0;return v0[z]=!0,H("Invalid attribute name: `%s`",z),!1}function D1(z,Q,X){if(Q!==null)return Q.type===C6;if(X)return!1;if(z.length>2&&(z[0]==="o"||z[0]==="O")&&(z[1]==="n"||z[1]==="N"))return!0;return!1}function K4(z,Q,X,Z){if(X!==null&&X.type===C6)return!1;switch(typeof Q){case"function":case"symbol":return!0;case"boolean":{if(Z)return!1;if(X!==null)return!X.acceptsBooleans;else{var Y=z.toLowerCase().slice(0,5);return Y!=="data-"&&Y!=="aria-"}}default:return!1}}function c1(z,Q,X,Z){if(Q===null||typeof Q>"u")return!0;if(K4(z,Q,X,Z))return!0;if(Z)return!1;if(X!==null)switch(X.type){case H4:return!Q;case C4:return Q===!1;case U6:return isNaN(Q);case c6:return isNaN(Q)||Q<1}return!1}function e4(z){return Z1.hasOwnProperty(z)?Z1[z]:null}function r0(z,Q,X,Z,Y,J,q){this.acceptsBooleans=Q===x6||Q===H4||Q===C4,this.attributeName=Z,this.attributeNamespace=Y,this.mustUseProperty=X,this.propertyName=z,this.type=Q,this.sanitizeURL=J,this.removeEmptyString=q}var Z1={},D7=["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"];D7.forEach(function(z){Z1[z]=new r0(z,C6,!1,z,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(z){var Q=z[0],X=z[1];Z1[Q]=new r0(Q,Y4,!1,X,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(z){Z1[z]=new r0(z,x6,!1,z.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(z){Z1[z]=new r0(z,x6,!1,z,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"].forEach(function(z){Z1[z]=new r0(z,H4,!1,z.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(z){Z1[z]=new r0(z,H4,!0,z,null,!1,!1)}),["capture","download"].forEach(function(z){Z1[z]=new r0(z,C4,!1,z,null,!1,!1)}),["cols","rows","size","span"].forEach(function(z){Z1[z]=new r0(z,c6,!1,z,null,!1,!1)}),["rowSpan","start"].forEach(function(z){Z1[z]=new r0(z,U6,!1,z.toLowerCase(),null,!1,!1)});var A5=/[\-\:]([a-z])/g,q5=function(z){return z[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"].forEach(function(z){var Q=z.replace(A5,q5);Z1[Q]=new r0(Q,Y4,!1,z,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(function(z){var Q=z.replace(A5,q5);Z1[Q]=new r0(Q,Y4,!1,z,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(z){var Q=z.replace(A5,q5);Z1[Q]=new r0(Q,Y4,!1,z,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(z){Z1[z]=new r0(z,Y4,!1,z.toLowerCase(),null,!1,!1)});var Pz="xlinkHref";Z1[Pz]=new r0("xlinkHref",Y4,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(z){Z1[z]=new r0(z,Y4,!1,z.toLowerCase(),null,!0,!0)});var Mz=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i,wz=!1;function y7(z){if(!wz&&Mz.test(z))wz=!0,H("A future version of React will block javascript: URLs as a security precaution. Use event handlers instead if you can. If you need to generate unsafe HTML try using dangerouslySetInnerHTML instead. React was passed %s.",JSON.stringify(z))}function f7(z,Q,X,Z){if(Z.mustUseProperty){var Y=Z.propertyName;return z[Y]}else{if(n4(X,Q),Z.sanitizeURL)y7(""+X);var J=Z.attributeName,q=null;if(Z.type===C4){if(z.hasAttribute(J)){var G=z.getAttribute(J);if(G==="")return!0;if(c1(Q,X,Z,!1))return G;if(G===""+X)return X;return G}}else if(z.hasAttribute(J)){if(c1(Q,X,Z,!1))return z.getAttribute(J);if(Z.type===H4)return X;q=z.getAttribute(J)}if(c1(Q,X,Z,!1))return q===null?X:q;else if(q===""+X)return X;else return q}}function DQ(z,Q,X,Z){{if(!L1(Q))return;if(!z.hasAttribute(Q))return X===void 0?void 0:null;var Y=z.getAttribute(Q);if(n4(X,Q),Y===""+X)return X;return Y}}function G1(z,Q,X,Z){var Y=e4(Q);if(D1(Q,Y,Z))return;if(c1(Q,X,Y,Z))X=null;if(Z||Y===null){if(L1(Q)){var J=Q;if(X===null)z.removeAttribute(J);else n4(X,Q),z.setAttribute(J,""+X)}return}var q=Y.mustUseProperty;if(q){var G=Y.propertyName;if(X===null){var K=Y.type;z[G]=K===H4?!1:""}else z[G]=X;return}var{attributeName:_,attributeNamespace:O}=Y;if(X===null)z.removeAttribute(_);else{var v=Y.type,A;if(v===H4||v===C4&&X===!0)A="";else if(n4(X,_),A=""+X,Y.sanitizeURL)y7(A.toString());if(O)z.setAttributeNS(O,_,A);else z.setAttribute(_,A)}}var p1=Symbol.for("react.element"),d1=Symbol.for("react.portal"),N1=Symbol.for("react.fragment"),k1=Symbol.for("react.strict_mode"),W1=Symbol.for("react.profiler"),J1=Symbol.for("react.provider"),N=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),z0=Symbol.for("react.suspense"),M0=Symbol.for("react.suspense_list"),l0=Symbol.for("react.memo"),j0=Symbol.for("react.lazy"),g0=Symbol.for("react.scope"),e=Symbol.for("react.debug_trace_mode"),K0=Symbol.for("react.offscreen"),S0=Symbol.for("react.legacy_hidden"),S1=Symbol.for("react.cache"),_6=Symbol.for("react.tracing_marker"),v5=Symbol.iterator,k5="@@iterator";function e1(z){if(z===null||typeof z!=="object")return null;var Q=v5&&z[v5]||z[k5];if(typeof Q==="function")return Q;return null}var o0=Object.assign,E7=0,P8,TH,SH,VH,CH,DH,yH;function fH(){}fH.__reactDisabledLog=!0;function WL(){{if(E7===0){P8=console.log,TH=console.info,SH=console.warn,VH=console.error,CH=console.group,DH=console.groupCollapsed,yH=console.groupEnd;var z={configurable:!0,enumerable:!0,value:fH,writable:!0};Object.defineProperties(console,{info:z,log:z,warn:z,error:z,group:z,groupCollapsed:z,groupEnd:z})}E7++}}function bL(){{if(E7--,E7===0){var z={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:o0({},z,{value:P8}),info:o0({},z,{value:TH}),warn:o0({},z,{value:SH}),error:o0({},z,{value:VH}),group:o0({},z,{value:CH}),groupCollapsed:o0({},z,{value:DH}),groupEnd:o0({},z,{value:yH})})}if(E7<0)H("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var iY=$.ReactCurrentDispatcher,oY;function Q7(z,Q,X){{if(oY===void 0)try{throw Error()}catch(Y){var Z=Y.stack.trim().match(/\n( *(at )?)/);oY=Z&&Z[1]||""}return`
|
|
2
|
+
`+oY+z}}var aY=!1,M8;{var RL=typeof WeakMap==="function"?WeakMap:Map;M8=new RL}function rY(z,Q){if(!z||aY)return"";{var X=M8.get(z);if(X!==void 0)return X}var Z;aY=!0;var Y=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var J;J=iY.current,iY.current=null,WL();try{if(Q){var q=function(){throw Error()};if(Object.defineProperty(q.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==="object"&&Reflect.construct){try{Reflect.construct(q,[])}catch(y){Z=y}Reflect.construct(z,[],q)}else{try{q.call()}catch(y){Z=y}z.call(q.prototype)}}else{try{throw Error()}catch(y){Z=y}z()}}catch(y){if(y&&Z&&typeof y.stack==="string"){var G=y.stack.split(`
|
|
3
|
+
`),K=Z.stack.split(`
|
|
4
|
+
`),_=G.length-1,O=K.length-1;while(_>=1&&O>=0&&G[_]!==K[O])O--;for(;_>=1&&O>=0;_--,O--)if(G[_]!==K[O]){if(_!==1||O!==1)do if(_--,O--,O<0||G[_]!==K[O]){var v=`
|
|
5
|
+
`+G[_].replace(" at new "," at ");if(z.displayName&&v.includes("<anonymous>"))v=v.replace("<anonymous>",z.displayName);if(typeof z==="function")M8.set(z,v);return v}while(_>=1&&O>=0);break}}}finally{aY=!1,iY.current=J,bL(),Error.prepareStackTrace=Y}var A=z?z.displayName||z.name:"",D=A?Q7(A):"";if(typeof z==="function")M8.set(z,D);return D}function NL(z,Q,X){return rY(z,!0)}function nY(z,Q,X){return rY(z,!1)}function FL(z){var Q=z.prototype;return!!(Q&&Q.isReactComponent)}function tY(z,Q,X){if(z==null)return"";if(typeof z==="function")return rY(z,FL(z));if(typeof z==="string")return Q7(z);switch(z){case z0:return Q7("Suspense");case M0:return Q7("SuspenseList")}if(typeof z==="object")switch(z.$$typeof){case E:return nY(z.render);case l0:return tY(z.type,Q,X);case j0:{var Z=z,Y=Z._payload,J=Z._init;try{return tY(J(Y),Q,X)}catch(q){}}}return""}function PL(z){var Q=z._debugOwner?z._debugOwner.type:null,X=z._debugSource;switch(z.tag){case w:return Q7(z.type);case c:return Q7("Lazy");case l:return Q7("Suspense");case N0:return Q7("SuspenseList");case L:case T:case t:return nY(z.type);case f:return nY(z.type.render);case b:return NL(z.type);default:return""}}function EH(z){try{var Q="",X=z;do Q+=PL(X),X=X.return;while(X);return Q}catch(Z){return`
|
|
6
|
+
Error generating stack: `+Z.message+`
|
|
7
|
+
`+Z.stack}}function ML(z,Q,X){var Z=z.displayName;if(Z)return Z;var Y=Q.displayName||Q.name||"";return Y!==""?X+"("+Y+")":X}function hH(z){return z.displayName||"Context"}function V1(z){if(z==null)return null;if(typeof z.tag==="number")H("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");if(typeof z==="function")return z.displayName||z.name||null;if(typeof z==="string")return z;switch(z){case N1:return"Fragment";case d1:return"Portal";case W1:return"Profiler";case k1:return"StrictMode";case z0:return"Suspense";case M0:return"SuspenseList"}if(typeof z==="object")switch(z.$$typeof){case N:var Q=z;return hH(Q)+".Consumer";case J1:var X=z;return hH(X._context)+".Provider";case E:return ML(z,z.render,"ForwardRef");case l0:var Z=z.displayName||null;if(Z!==null)return Z;return V1(z.type)||"Memo";case j0:{var Y=z,J=Y._payload,q=Y._init;try{return V1(q(J))}catch(G){return null}}}return null}function wL(z,Q,X){var Z=Q.displayName||Q.name||"";return z.displayName||(Z!==""?X+"("+Z+")":X)}function pH(z){return z.displayName||"Context"}function d0(z){var{tag:Q,type:X}=z;switch(Q){case _0:return"Cache";case j:var Z=X;return pH(Z)+".Consumer";case u:var Y=X;return pH(Y._context)+".Provider";case s:return"DehydratedFragment";case f:return wL(X,X.render,"ForwardRef");case I:return"Fragment";case w:return X;case P:return"Portal";case k:return"Root";case M:return"Text";case c:return V1(X);case C:if(X===k1)return"StrictMode";return"Mode";case r:return"Offscreen";case i:return"Profiler";case p:return"Scope";case l:return"Suspense";case N0:return"SuspenseList";case I0:return"TracingMarker";case b:case L:case k0:case T:case o:case t:if(typeof X==="function")return X.displayName||X.name||null;if(typeof X==="string")return X;break}return null}var mH=$.ReactDebugCurrentFrame,P6=null,yQ=!1;function fQ(){{if(P6===null)return null;var z=P6._debugOwner;if(z!==null&&typeof z<"u")return d0(z)}return null}function AL(){{if(P6===null)return"";return EH(P6)}}function z6(){mH.getCurrentStack=null,P6=null,yQ=!1}function J4(z){mH.getCurrentStack=z===null?null:AL,P6=z,yQ=!1}function vL(){return P6}function G5(z){yQ=z}function D6(z){return""+z}function X7(z){switch(typeof z){case"boolean":case"number":case"string":case"undefined":return z;case"object":return G4(z),z;default:return""}}var kL={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0};function sY(z,Q){{if(!(kL[Q.type]||Q.onChange||Q.onInput||Q.readOnly||Q.disabled||Q.value==null))H("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.");if(!(Q.onChange||Q.readOnly||Q.disabled||Q.checked==null))H("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")}}function uH(z){var{type:Q,nodeName:X}=z;return X&&X.toLowerCase()==="input"&&(Q==="checkbox"||Q==="radio")}function jH(z){return z._valueTracker}function IL(z){z._valueTracker=null}function TL(z){var Q="";if(!z)return Q;if(uH(z))Q=z.checked?"true":"false";else Q=z.value;return Q}function SL(z){var Q=uH(z)?"checked":"value",X=Object.getOwnPropertyDescriptor(z.constructor.prototype,Q);G4(z[Q]);var Z=""+z[Q];if(z.hasOwnProperty(Q)||typeof X>"u"||typeof X.get!=="function"||typeof X.set!=="function")return;var{get:Y,set:J}=X;Object.defineProperty(z,Q,{configurable:!0,get:function(){return Y.call(this)},set:function(G){G4(G),Z=""+G,J.call(this,G)}}),Object.defineProperty(z,Q,{enumerable:X.enumerable});var q={getValue:function(){return Z},setValue:function(G){G4(G),Z=""+G},stopTracking:function(){IL(z),delete z[Q]}};return q}function w8(z){if(jH(z))return;z._valueTracker=SL(z)}function gH(z){if(!z)return!1;var Q=jH(z);if(!Q)return!0;var X=Q.getValue(),Z=TL(z);if(Z!==X)return Q.setValue(Z),!0;return!1}function A8(z){if(z=z||(typeof document<"u"?document:void 0),typeof z>"u")return null;try{return z.activeElement||z.body}catch(Q){return z.body}}var xH=!1,cH=!1,dH=!1,lH=!1;function iH(z){var Q=z.type==="checkbox"||z.type==="radio";return Q?z.checked!=null:z.value!=null}function eY(z,Q){var X=z,Z=Q.checked,Y=o0({},Q,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:Z!=null?Z:X._wrapperState.initialChecked});return Y}function oH(z,Q){{if(sY("input",Q),Q.checked!==void 0&&Q.defaultChecked!==void 0&&!cH)H("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components",fQ()||"A component",Q.type),cH=!0;if(Q.value!==void 0&&Q.defaultValue!==void 0&&!xH)H("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components",fQ()||"A component",Q.type),xH=!0}var X=z,Z=Q.defaultValue==null?"":Q.defaultValue;X._wrapperState={initialChecked:Q.checked!=null?Q.checked:Q.defaultChecked,initialValue:X7(Q.value!=null?Q.value:Z),controlled:iH(Q)}}function aH(z,Q){var X=z,Z=Q.checked;if(Z!=null)G1(X,"checked",Z,!1)}function zJ(z,Q){var X=z;{var Z=iH(Q);if(!X._wrapperState.controlled&&Z&&!lH)H("A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components"),lH=!0;if(X._wrapperState.controlled&&!Z&&!dH)H("A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components"),dH=!0}aH(z,Q);var Y=X7(Q.value),J=Q.type;if(Y!=null){if(J==="number"){if(Y===0&&X.value===""||X.value!=Y)X.value=D6(Y)}else if(X.value!==D6(Y))X.value=D6(Y)}else if(J==="submit"||J==="reset"){X.removeAttribute("value");return}if(Q.hasOwnProperty("value"))QJ(X,Q.type,Y);else if(Q.hasOwnProperty("defaultValue"))QJ(X,Q.type,X7(Q.defaultValue));if(Q.checked==null&&Q.defaultChecked!=null)X.defaultChecked=!!Q.defaultChecked}function rH(z,Q,X){var Z=z;if(Q.hasOwnProperty("value")||Q.hasOwnProperty("defaultValue")){var Y=Q.type,J=Y==="submit"||Y==="reset";if(J&&(Q.value===void 0||Q.value===null))return;var q=D6(Z._wrapperState.initialValue);if(!X){if(q!==Z.value)Z.value=q}Z.defaultValue=q}var G=Z.name;if(G!=="")Z.name="";if(Z.defaultChecked=!Z.defaultChecked,Z.defaultChecked=!!Z._wrapperState.initialChecked,G!=="")Z.name=G}function VL(z,Q){var X=z;zJ(X,Q),CL(X,Q)}function CL(z,Q){var X=Q.name;if(Q.type==="radio"&&X!=null){var Z=z;while(Z.parentNode)Z=Z.parentNode;n4(X,"name");var Y=Z.querySelectorAll("input[name="+JSON.stringify(""+X)+'][type="radio"]');for(var J=0;J<Y.length;J++){var q=Y[J];if(q===z||q.form!==z.form)continue;var G=UZ(q);if(!G)throw Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");gH(q),zJ(q,G)}}}function QJ(z,Q,X){if(Q!=="number"||A8(z.ownerDocument)!==z){if(X==null)z.defaultValue=D6(z._wrapperState.initialValue);else if(z.defaultValue!==D6(X))z.defaultValue=D6(X)}}var nH=!1,tH=!1,sH=!1;function eH(z,Q){{if(Q.value==null){if(typeof Q.children==="object"&&Q.children!==null)U8.Children.forEach(Q.children,function(X){if(X==null)return;if(typeof X==="string"||typeof X==="number")return;if(!tH)tH=!0,H("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>.")});else if(Q.dangerouslySetInnerHTML!=null){if(!sH)sH=!0,H("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected.")}}if(Q.selected!=null&&!nH)H("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),nH=!0}}function DL(z,Q){if(Q.value!=null)z.setAttribute("value",D6(X7(Q.value)))}var yL=Array.isArray;function Q6(z){return yL(z)}var zK=!1;function QK(){var z=fQ();if(z)return`
|
|
8
|
+
|
|
9
|
+
Check the render method of \``+z+"`.";return""}var XK=["value","defaultValue"];function fL(z){{sY("select",z);for(var Q=0;Q<XK.length;Q++){var X=XK[Q];if(z[X]==null)continue;var Z=Q6(z[X]);if(z.multiple&&!Z)H("The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",X,QK());else if(!z.multiple&&Z)H("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",X,QK())}}}function Az(z,Q,X,Z){var Y=z.options;if(Q){var J=X,q={};for(var G=0;G<J.length;G++)q["$"+J[G]]=!0;for(var K=0;K<Y.length;K++){var _=q.hasOwnProperty("$"+Y[K].value);if(Y[K].selected!==_)Y[K].selected=_;if(_&&Z)Y[K].defaultSelected=!0}}else{var O=D6(X7(X)),v=null;for(var A=0;A<Y.length;A++){if(Y[A].value===O){if(Y[A].selected=!0,Z)Y[A].defaultSelected=!0;return}if(v===null&&!Y[A].disabled)v=Y[A]}if(v!==null)v.selected=!0}}function XJ(z,Q){return o0({},Q,{value:void 0})}function ZK(z,Q){var X=z;if(fL(Q),X._wrapperState={wasMultiple:!!Q.multiple},Q.value!==void 0&&Q.defaultValue!==void 0&&!zK)H("Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://reactjs.org/link/controlled-components"),zK=!0}function EL(z,Q){var X=z;X.multiple=!!Q.multiple;var Z=Q.value;if(Z!=null)Az(X,!!Q.multiple,Z,!1);else if(Q.defaultValue!=null)Az(X,!!Q.multiple,Q.defaultValue,!0)}function hL(z,Q){var X=z,Z=X._wrapperState.wasMultiple;X._wrapperState.wasMultiple=!!Q.multiple;var Y=Q.value;if(Y!=null)Az(X,!!Q.multiple,Y,!1);else if(Z!==!!Q.multiple)if(Q.defaultValue!=null)Az(X,!!Q.multiple,Q.defaultValue,!0);else Az(X,!!Q.multiple,Q.multiple?[]:"",!1)}function pL(z,Q){var X=z,Z=Q.value;if(Z!=null)Az(X,!!Q.multiple,Z,!1)}var YK=!1;function ZJ(z,Q){var X=z;if(Q.dangerouslySetInnerHTML!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");var Z=o0({},Q,{value:void 0,defaultValue:void 0,children:D6(X._wrapperState.initialValue)});return Z}function JK(z,Q){var X=z;if(sY("textarea",Q),Q.value!==void 0&&Q.defaultValue!==void 0&&!YK)H("%s contains a textarea with both value and defaultValue props. Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://reactjs.org/link/controlled-components",fQ()||"A component"),YK=!0;var Z=Q.value;if(Z==null){var{children:Y,defaultValue:J}=Q;if(Y!=null){H("Use the `defaultValue` or `value` props instead of setting children on <textarea>.");{if(J!=null)throw Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(Q6(Y)){if(Y.length>1)throw Error("<textarea> can only have at most one child.");Y=Y[0]}J=Y}}if(J==null)J="";Z=J}X._wrapperState={initialValue:X7(Z)}}function $K(z,Q){var X=z,Z=X7(Q.value),Y=X7(Q.defaultValue);if(Z!=null){var J=D6(Z);if(J!==X.value)X.value=J;if(Q.defaultValue==null&&X.defaultValue!==J)X.defaultValue=J}if(Y!=null)X.defaultValue=D6(Y)}function qK(z,Q){var X=z,Z=X.textContent;if(Z===X._wrapperState.initialValue){if(Z!==""&&Z!==null)X.value=Z}}function mL(z,Q){$K(z,Q)}var I5="http://www.w3.org/1999/xhtml",uL="http://www.w3.org/1998/Math/MathML",YJ="http://www.w3.org/2000/svg";function JJ(z){switch(z){case"svg":return YJ;case"math":return uL;default:return I5}}function $J(z,Q){if(z==null||z===I5)return JJ(Q);if(z===YJ&&Q==="foreignObject")return I5;return z}var jL=function(z){if(typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction)return function(Q,X,Z,Y){MSApp.execUnsafeLocalFunction(function(){return z(Q,X,Z,Y)})};else return z},v8,GK=jL(function(z,Q){if(z.namespaceURI===YJ){if(!("innerHTML"in z)){v8=v8||document.createElement("div"),v8.innerHTML="<svg>"+Q.valueOf().toString()+"</svg>";var X=v8.firstChild;while(z.firstChild)z.removeChild(z.firstChild);while(X.firstChild)z.appendChild(X.firstChild);return}}z.innerHTML=Q}),O6=1,T5=3,U4=8,S5=9,qJ=11,k8=function(z,Q){if(Q){var X=z.firstChild;if(X&&X===z.lastChild&&X.nodeType===T5){X.nodeValue=Q;return}}z.textContent=Q},gL={animation:["animationDelay","animationDirection","animationDuration","animationFillMode","animationIterationCount","animationName","animationPlayState","animationTimingFunction"],background:["backgroundAttachment","backgroundClip","backgroundColor","backgroundImage","backgroundOrigin","backgroundPositionX","backgroundPositionY","backgroundRepeat","backgroundSize"],backgroundPosition:["backgroundPositionX","backgroundPositionY"],border:["borderBottomColor","borderBottomStyle","borderBottomWidth","borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth","borderLeftColor","borderLeftStyle","borderLeftWidth","borderRightColor","borderRightStyle","borderRightWidth","borderTopColor","borderTopStyle","borderTopWidth"],borderBlockEnd:["borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth"],borderBlockStart:["borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth"],borderBottom:["borderBottomColor","borderBottomStyle","borderBottomWidth"],borderColor:["borderBottomColor","borderLeftColor","borderRightColor","borderTopColor"],borderImage:["borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth"],borderInlineEnd:["borderInlineEndColor","borderInlineEndStyle","borderInlineEndWidth"],borderInlineStart:["borderInlineStartColor","borderInlineStartStyle","borderInlineStartWidth"],borderLeft:["borderLeftColor","borderLeftStyle","borderLeftWidth"],borderRadius:["borderBottomLeftRadius","borderBottomRightRadius","borderTopLeftRadius","borderTopRightRadius"],borderRight:["borderRightColor","borderRightStyle","borderRightWidth"],borderStyle:["borderBottomStyle","borderLeftStyle","borderRightStyle","borderTopStyle"],borderTop:["borderTopColor","borderTopStyle","borderTopWidth"],borderWidth:["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth"],columnRule:["columnRuleColor","columnRuleStyle","columnRuleWidth"],columns:["columnCount","columnWidth"],flex:["flexBasis","flexGrow","flexShrink"],flexFlow:["flexDirection","flexWrap"],font:["fontFamily","fontFeatureSettings","fontKerning","fontLanguageOverride","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontVariantAlternates","fontVariantCaps","fontVariantEastAsian","fontVariantLigatures","fontVariantNumeric","fontVariantPosition","fontWeight","lineHeight"],fontVariant:["fontVariantAlternates","fontVariantCaps","fontVariantEastAsian","fontVariantLigatures","fontVariantNumeric","fontVariantPosition"],gap:["columnGap","rowGap"],grid:["gridAutoColumns","gridAutoFlow","gridAutoRows","gridTemplateAreas","gridTemplateColumns","gridTemplateRows"],gridArea:["gridColumnEnd","gridColumnStart","gridRowEnd","gridRowStart"],gridColumn:["gridColumnEnd","gridColumnStart"],gridColumnGap:["columnGap"],gridGap:["columnGap","rowGap"],gridRow:["gridRowEnd","gridRowStart"],gridRowGap:["rowGap"],gridTemplate:["gridTemplateAreas","gridTemplateColumns","gridTemplateRows"],listStyle:["listStyleImage","listStylePosition","listStyleType"],margin:["marginBottom","marginLeft","marginRight","marginTop"],marker:["markerEnd","markerMid","markerStart"],mask:["maskClip","maskComposite","maskImage","maskMode","maskOrigin","maskPositionX","maskPositionY","maskRepeat","maskSize"],maskPosition:["maskPositionX","maskPositionY"],outline:["outlineColor","outlineStyle","outlineWidth"],overflow:["overflowX","overflowY"],padding:["paddingBottom","paddingLeft","paddingRight","paddingTop"],placeContent:["alignContent","justifyContent"],placeItems:["alignItems","justifyItems"],placeSelf:["alignSelf","justifySelf"],textDecoration:["textDecorationColor","textDecorationLine","textDecorationStyle"],textEmphasis:["textEmphasisColor","textEmphasisStyle"],transition:["transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction"],wordWrap:["overflowWrap"]},EQ={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};function xL(z,Q){return z+Q.charAt(0).toUpperCase()+Q.substring(1)}var cL=["Webkit","ms","Moz","O"];Object.keys(EQ).forEach(function(z){cL.forEach(function(Q){EQ[xL(Q,z)]=EQ[z]})});function GJ(z,Q,X){var Z=Q==null||typeof Q==="boolean"||Q==="";if(Z)return"";if(!X&&typeof Q==="number"&&Q!==0&&!(EQ.hasOwnProperty(z)&&EQ[z]))return Q+"px";return c4(Q,z),(""+Q).trim()}var dL=/([A-Z])/g,lL=/^ms-/;function iL(z){return z.replace(dL,"-$1").toLowerCase().replace(lL,"-ms-")}var HK=function(){};{var oL=/^(?:webkit|moz|o)[A-Z]/,aL=/^-ms-/,rL=/-(.)/g,KK=/;\s*$/,vz={},HJ={},UK=!1,BK=!1,nL=function(z){return z.replace(rL,function(Q,X){return X.toUpperCase()})},tL=function(z){if(vz.hasOwnProperty(z)&&vz[z])return;vz[z]=!0,H("Unsupported style property %s. Did you mean %s?",z,nL(z.replace(aL,"ms-")))},sL=function(z){if(vz.hasOwnProperty(z)&&vz[z])return;vz[z]=!0,H("Unsupported vendor-prefixed style property %s. Did you mean %s?",z,z.charAt(0).toUpperCase()+z.slice(1))},eL=function(z,Q){if(HJ.hasOwnProperty(Q)&&HJ[Q])return;HJ[Q]=!0,H(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,z,Q.replace(KK,""))},z3=function(z,Q){if(UK)return;UK=!0,H("`NaN` is an invalid value for the `%s` css style property.",z)},Q3=function(z,Q){if(BK)return;BK=!0,H("`Infinity` is an invalid value for the `%s` css style property.",z)};HK=function(z,Q){if(z.indexOf("-")>-1)tL(z);else if(oL.test(z))sL(z);else if(KK.test(Q))eL(z,Q);if(typeof Q==="number"){if(isNaN(Q))z3(z,Q);else if(!isFinite(Q))Q3(z,Q)}}}var X3=HK;function Z3(z){{var Q="",X="";for(var Z in z){if(!z.hasOwnProperty(Z))continue;var Y=z[Z];if(Y!=null){var J=Z.indexOf("--")===0;Q+=X+(J?Z:iL(Z))+":",Q+=GJ(Z,Y,J),X=";"}}return Q||null}}function _K(z,Q){var X=z.style;for(var Z in Q){if(!Q.hasOwnProperty(Z))continue;var Y=Z.indexOf("--")===0;if(!Y)X3(Z,Q[Z]);var J=GJ(Z,Q[Z],Y);if(Z==="float")Z="cssFloat";if(Y)X.setProperty(Z,J);else X[Z]=J}}function Y3(z){return z==null||typeof z==="boolean"||z===""}function OK(z){var Q={};for(var X in z){var Z=gL[X]||[X];for(var Y=0;Y<Z.length;Y++)Q[Z[Y]]=X}return Q}function J3(z,Q){{if(!Q)return;var X=OK(z),Z=OK(Q),Y={};for(var J in X){var q=X[J],G=Z[J];if(G&&q!==G){var K=q+","+G;if(Y[K])continue;Y[K]=!0,H("%s a style property during rerender (%s) when a conflicting property is set (%s) can lead to styling bugs. To avoid this, don't mix shorthand and non-shorthand properties for the same value; instead, replace the shorthand with separate values.",Y3(z[q])?"Removing":"Updating",q,G)}}}}var $3={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},q3=o0({menuitem:!0},$3),G3="__html";function KJ(z,Q){if(!Q)return;if(q3[z]){if(Q.children!=null||Q.dangerouslySetInnerHTML!=null)throw Error(z+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.")}if(Q.dangerouslySetInnerHTML!=null){if(Q.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");if(typeof Q.dangerouslySetInnerHTML!=="object"||!(G3 in Q.dangerouslySetInnerHTML))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.")}if(!Q.suppressContentEditableWarning&&Q.contentEditable&&Q.children!=null)H("A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional.");if(Q.style!=null&&typeof Q.style!=="object")throw Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.")}function h7(z,Q){if(z.indexOf("-")===-1)return typeof Q.is==="string";switch(z){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 I8={accept:"accept",acceptcharset:"acceptCharset","accept-charset":"acceptCharset",accesskey:"accessKey",action:"action",allowfullscreen:"allowFullScreen",alt:"alt",as:"as",async:"async",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",capture:"capture",cellpadding:"cellPadding",cellspacing:"cellSpacing",challenge:"challenge",charset:"charSet",checked:"checked",children:"children",cite:"cite",class:"className",classid:"classID",classname:"className",cols:"cols",colspan:"colSpan",content:"content",contenteditable:"contentEditable",contextmenu:"contextMenu",controls:"controls",controlslist:"controlsList",coords:"coords",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",data:"data",datetime:"dateTime",default:"default",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",defer:"defer",dir:"dir",disabled:"disabled",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback",download:"download",draggable:"draggable",enctype:"encType",enterkeyhint:"enterKeyHint",for:"htmlFor",form:"form",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",headers:"headers",height:"height",hidden:"hidden",high:"high",href:"href",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",id:"id",imagesizes:"imageSizes",imagesrcset:"imageSrcSet",innerhtml:"innerHTML",inputmode:"inputMode",integrity:"integrity",is:"is",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",kind:"kind",label:"label",lang:"lang",list:"list",loop:"loop",low:"low",manifest:"manifest",marginwidth:"marginWidth",marginheight:"marginHeight",max:"max",maxlength:"maxLength",media:"media",mediagroup:"mediaGroup",method:"method",min:"min",minlength:"minLength",multiple:"multiple",muted:"muted",name:"name",nomodule:"noModule",nonce:"nonce",novalidate:"noValidate",open:"open",optimum:"optimum",pattern:"pattern",placeholder:"placeholder",playsinline:"playsInline",poster:"poster",preload:"preload",profile:"profile",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rel:"rel",required:"required",reversed:"reversed",role:"role",rows:"rows",rowspan:"rowSpan",sandbox:"sandbox",scope:"scope",scoped:"scoped",scrolling:"scrolling",seamless:"seamless",selected:"selected",shape:"shape",size:"size",sizes:"sizes",span:"span",spellcheck:"spellCheck",src:"src",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",start:"start",step:"step",style:"style",summary:"summary",tabindex:"tabIndex",target:"target",title:"title",type:"type",usemap:"useMap",value:"value",width:"width",wmode:"wmode",wrap:"wrap",about:"about",accentheight:"accentHeight","accent-height":"accentHeight",accumulate:"accumulate",additive:"additive",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",alphabetic:"alphabetic",amplitude:"amplitude",arabicform:"arabicForm","arabic-form":"arabicForm",ascent:"ascent",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",azimuth:"azimuth",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",bbox:"bbox",begin:"begin",bias:"bias",by:"by",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clip:"clip",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",color:"color",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",cursor:"cursor",cx:"cx",cy:"cy",d:"d",datatype:"datatype",decelerate:"decelerate",descent:"descent",diffuseconstant:"diffuseConstant",direction:"direction",display:"display",divisor:"divisor",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",dur:"dur",dx:"dx",dy:"dy",edgemode:"edgeMode",elevation:"elevation",enablebackground:"enableBackground","enable-background":"enableBackground",end:"end",exponent:"exponent",externalresourcesrequired:"externalResourcesRequired",fill:"fill",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filter:"filter",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",focusable:"focusable",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",format:"format",from:"from",fx:"fx",fy:"fy",g1:"g1",g2:"g2",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",hanging:"hanging",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",ideographic:"ideographic",imagerendering:"imageRendering","image-rendering":"imageRendering",in2:"in2",in:"in",inlist:"inlist",intercept:"intercept",k1:"k1",k2:"k2",k3:"k3",k4:"k4",k:"k",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",kerning:"kerning",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",local:"local",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",mask:"mask",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",mathematical:"mathematical",mode:"mode",numoctaves:"numOctaves",offset:"offset",opacity:"opacity",operator:"operator",order:"order",orient:"orient",orientation:"orientation",origin:"origin",overflow:"overflow",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder",panose1:"panose1","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",points:"points",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",prefix:"prefix",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",property:"property",r:"r",radius:"radius",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",resource:"resource",restart:"restart",result:"result",results:"results",rotate:"rotate",rx:"rx",ry:"ry",scale:"scale",security:"security",seed:"seed",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",slope:"slope",spacing:"spacing",specularconstant:"specularConstant",specularexponent:"specularExponent",speed:"speed",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stemh:"stemh",stemv:"stemv",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",string:"string",stroke:"stroke",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",to:"to",transform:"transform",typeof:"typeof",u1:"u1",u2:"u2",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicode:"unicode",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",values:"values",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",version:"version",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",visibility:"visibility",vmathematical:"vMathematical","v-mathematical":"vMathematical",vocab:"vocab",widths:"widths",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",x1:"x1",x2:"x2",x:"x",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang",xmlns:"xmlns","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",y1:"y1",y2:"y2",y:"y",ychannelselector:"yChannelSelector",z:"z",zoomandpan:"zoomAndPan"},LK={"aria-current":0,"aria-description":0,"aria-details":0,"aria-disabled":0,"aria-hidden":0,"aria-invalid":0,"aria-keyshortcuts":0,"aria-label":0,"aria-roledescription":0,"aria-autocomplete":0,"aria-checked":0,"aria-expanded":0,"aria-haspopup":0,"aria-level":0,"aria-modal":0,"aria-multiline":0,"aria-multiselectable":0,"aria-orientation":0,"aria-placeholder":0,"aria-pressed":0,"aria-readonly":0,"aria-required":0,"aria-selected":0,"aria-sort":0,"aria-valuemax":0,"aria-valuemin":0,"aria-valuenow":0,"aria-valuetext":0,"aria-atomic":0,"aria-busy":0,"aria-live":0,"aria-relevant":0,"aria-dropeffect":0,"aria-grabbed":0,"aria-activedescendant":0,"aria-colcount":0,"aria-colindex":0,"aria-colspan":0,"aria-controls":0,"aria-describedby":0,"aria-errormessage":0,"aria-flowto":0,"aria-labelledby":0,"aria-owns":0,"aria-posinset":0,"aria-rowcount":0,"aria-rowindex":0,"aria-rowspan":0,"aria-setsize":0},kz={},H3=new RegExp("^(aria)-["+B6+"]*$"),K3=new RegExp("^(aria)[A-Z]["+B6+"]*$");function U3(z,Q){{if(O1.call(kz,Q)&&kz[Q])return!0;if(K3.test(Q)){var X="aria-"+Q.slice(4).toLowerCase(),Z=LK.hasOwnProperty(X)?X:null;if(Z==null)return H("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",Q),kz[Q]=!0,!0;if(Q!==Z)return H("Invalid ARIA attribute `%s`. Did you mean `%s`?",Q,Z),kz[Q]=!0,!0}if(H3.test(Q)){var Y=Q.toLowerCase(),J=LK.hasOwnProperty(Y)?Y:null;if(J==null)return kz[Q]=!0,!1;if(Q!==J)return H("Unknown ARIA attribute `%s`. Did you mean `%s`?",Q,J),kz[Q]=!0,!0}}return!0}function B3(z,Q){{var X=[];for(var Z in Q){var Y=U3(z,Z);if(!Y)X.push(Z)}var J=X.map(function(q){return"`"+q+"`"}).join(", ");if(X.length===1)H("Invalid aria prop %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",J,z);else if(X.length>1)H("Invalid aria props %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",J,z)}}function _3(z,Q){if(h7(z,Q))return;B3(z,Q)}var WK=!1;function O3(z,Q){{if(z!=="input"&&z!=="textarea"&&z!=="select")return;if(Q!=null&&Q.value===null&&!WK)if(WK=!0,z==="select"&&Q.multiple)H("`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.",z);else H("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",z)}}var bK=function(){};{var X6={},RK=/^on./,L3=/^on[^A-Z]/,W3=new RegExp("^(aria)-["+B6+"]*$"),b3=new RegExp("^(aria)[A-Z]["+B6+"]*$");bK=function(z,Q,X,Z){if(O1.call(X6,Q)&&X6[Q])return!0;var Y=Q.toLowerCase();if(Y==="onfocusin"||Y==="onfocusout")return H("React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React."),X6[Q]=!0,!0;if(Z!=null){var{registrationNameDependencies:J,possibleRegistrationNames:q}=Z;if(J.hasOwnProperty(Q))return!0;var G=q.hasOwnProperty(Y)?q[Y]:null;if(G!=null)return H("Invalid event handler property `%s`. Did you mean `%s`?",Q,G),X6[Q]=!0,!0;if(RK.test(Q))return H("Unknown event handler property `%s`. It will be ignored.",Q),X6[Q]=!0,!0}else if(RK.test(Q)){if(L3.test(Q))H("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",Q);return X6[Q]=!0,!0}if(W3.test(Q)||b3.test(Q))return!0;if(Y==="innerhtml")return H("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),X6[Q]=!0,!0;if(Y==="aria")return H("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),X6[Q]=!0,!0;if(Y==="is"&&X!==null&&X!==void 0&&typeof X!=="string")return H("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof X),X6[Q]=!0,!0;if(typeof X==="number"&&isNaN(X))return H("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",Q),X6[Q]=!0,!0;var K=e4(Q),_=K!==null&&K.type===C6;if(I8.hasOwnProperty(Y)){var O=I8[Y];if(O!==Q)return H("Invalid DOM property `%s`. Did you mean `%s`?",Q,O),X6[Q]=!0,!0}else if(!_&&Q!==Y)return H("React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.",Q,Y),X6[Q]=!0,!0;if(typeof X==="boolean"&&K4(Q,X,K,!1)){if(X)H('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.',X,Q,Q,X,Q);else H('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.',X,Q,Q,X,Q,Q,Q);return X6[Q]=!0,!0}if(_)return!0;if(K4(Q,X,K,!1))return X6[Q]=!0,!1;if((X==="false"||X==="true")&&K!==null&&K.type===H4)return H("Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",X,Q,X==="false"?"The browser will interpret it as a truthy value.":'Although this works, it will not work as expected if you pass the string "false".',Q,X),X6[Q]=!0,!0;return!0}}var R3=function(z,Q,X){{var Z=[];for(var Y in Q){var J=bK(z,Y,Q[Y],X);if(!J)Z.push(Y)}var q=Z.map(function(G){return"`"+G+"`"}).join(", ");if(Z.length===1)H("Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://reactjs.org/link/attribute-behavior ",q,z);else if(Z.length>1)H("Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://reactjs.org/link/attribute-behavior ",q,z)}};function N3(z,Q,X){if(h7(z,Q))return;R3(z,Q,X)}var NK=1,UJ=2,hQ=4,F3=NK|UJ|hQ,pQ=null;function P3(z){if(pQ!==null)H("Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue.");pQ=z}function M3(){if(pQ===null)H("Expected currently replaying event to not be null. This error is likely caused by a bug in React. Please file an issue.");pQ=null}function w3(z){return z===pQ}function BJ(z){var Q=z.target||z.srcElement||window;if(Q.correspondingUseElement)Q=Q.correspondingUseElement;return Q.nodeType===T5?Q.parentNode:Q}var _J=null,Iz=null,Tz=null;function FK(z){var Q=K7(z);if(!Q)return;if(typeof _J!=="function")throw Error("setRestoreImplementation() needs to be called to handle a target for controlled events. This error is likely caused by a bug in React. Please file an issue.");var X=Q.stateNode;if(X){var Z=UZ(X);_J(Q.stateNode,Q.type,Z)}}function A3(z){_J=z}function PK(z){if(Iz)if(Tz)Tz.push(z);else Tz=[z];else Iz=z}function v3(){return Iz!==null||Tz!==null}function MK(){if(!Iz)return;var z=Iz,Q=Tz;if(Iz=null,Tz=null,FK(z),Q)for(var X=0;X<Q.length;X++)FK(Q[X])}var wK=function(z,Q){return z(Q)},AK=function(){},OJ=!1;function k3(){var z=v3();if(z)AK(),MK()}function vK(z,Q,X){if(OJ)return z(Q,X);OJ=!0;try{return wK(z,Q,X)}finally{OJ=!1,k3()}}function I3(z,Q,X){wK=z,AK=X}function T3(z){return z==="button"||z==="input"||z==="select"||z==="textarea"}function S3(z,Q,X){switch(z){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":return!!(X.disabled&&T3(Q));default:return!1}}function mQ(z,Q){var X=z.stateNode;if(X===null)return null;var Z=UZ(X);if(Z===null)return null;var Y=Z[Q];if(S3(Q,z.type,Z))return null;if(Y&&typeof Y!=="function")throw Error("Expected `"+Q+"` listener to be a function, instead got a value of `"+typeof Y+"` type.");return Y}var LJ=!1;if(y0)try{var uQ={};Object.defineProperty(uQ,"passive",{get:function(){LJ=!0}}),window.addEventListener("test",uQ,uQ),window.removeEventListener("test",uQ,uQ)}catch(z){LJ=!1}function kK(z,Q,X,Z,Y,J,q,G,K){var _=Array.prototype.slice.call(arguments,3);try{Q.apply(X,_)}catch(O){this.onError(O)}}var IK=kK;if(typeof window<"u"&&typeof window.dispatchEvent==="function"&&typeof document<"u"&&typeof document.createEvent==="function"){var WJ=document.createElement("react");IK=function(Q,X,Z,Y,J,q,G,K,_){if(typeof document>"u"||document===null)throw Error("The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous.");var O=document.createEvent("Event"),v=!1,A=!0,D=window.event,y=Object.getOwnPropertyDescriptor(window,"event");function h(){if(WJ.removeEventListener(m,w0,!1),typeof window.event<"u"&&window.hasOwnProperty("event"))window.event=D}var Y0=Array.prototype.slice.call(arguments,3);function w0(){v=!0,h(),X.apply(Z,Y0),A=!1}var R0,n0=!1,t0=!1;function S(V){if(R0=V.error,n0=!0,R0===null&&V.colno===0&&V.lineno===0)t0=!0;if(V.defaultPrevented){if(R0!=null&&typeof R0==="object")try{R0._suppressLogging=!0}catch(n){}}}var m="react-"+(Q?Q:"invokeguardedcallback");if(window.addEventListener("error",S),WJ.addEventListener(m,w0,!1),O.initEvent(m,!1,!1),WJ.dispatchEvent(O),y)Object.defineProperty(window,"event",y);if(v&&A){if(!n0)R0=Error(`An error was thrown inside one of your components, but React doesn't know what it was. This is likely due to browser flakiness. React does its best to preserve the "Pause on exceptions" behavior of the DevTools, which requires some DEV-mode only tricks. It's possible that these don't work in your browser. Try triggering the error in production mode, or switching to a modern browser. If you suspect that this is actually an issue with React, please file an issue.`);else if(t0)R0=Error("A cross-origin error was thrown. React doesn't have access to the actual error object in development. See https://reactjs.org/link/crossorigin-error for more information.");this.onError(R0)}if(window.removeEventListener("error",S),!v)return h(),kK.apply(this,arguments)}}var V3=IK,Sz=!1,T8=null,S8=!1,bJ=null,C3={onError:function(z){Sz=!0,T8=z}};function RJ(z,Q,X,Z,Y,J,q,G,K){Sz=!1,T8=null,V3.apply(C3,arguments)}function D3(z,Q,X,Z,Y,J,q,G,K){if(RJ.apply(this,arguments),Sz){var _=NJ();if(!S8)S8=!0,bJ=_}}function y3(){if(S8){var z=bJ;throw S8=!1,bJ=null,z}}function f3(){return Sz}function NJ(){if(Sz){var z=T8;return Sz=!1,T8=null,z}else throw Error("clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.")}function Vz(z){return z._reactInternals}function E3(z){return z._reactInternals!==void 0}function h3(z,Q){z._reactInternals=Q}var V0=0,Cz=1,B4=2,Y1=4,p7=16,jQ=32,FJ=64,H1=128,V5=256,Z7=512,m7=1024,d6=2048,C5=4096,u7=8192,V8=16384,p3=d6|Y1|FJ|Z7|m7|V8,m3=32767,gQ=32768,Z6=65536,PJ=131072,TK=1048576,MJ=2097152,j7=4194304,wJ=8388608,D5=16777216,C8=33554432,AJ=Y1|m7|0,vJ=B4|Y1|p7|jQ|Z7|C5|u7,xQ=Y1|FJ|Z7|u7,Dz=d6|p7,y5=j7|wJ|MJ,u3=$.ReactCurrentOwner;function g7(z){var Q=z,X=z;if(!z.alternate){var Z=Q;do{if(Q=Z,(Q.flags&(B4|C5))!==V0)X=Q.return;Z=Q.return}while(Z)}else while(Q.return)Q=Q.return;if(Q.tag===k)return X;return null}function SK(z){if(z.tag===l){var Q=z.memoizedState;if(Q===null){var X=z.alternate;if(X!==null)Q=X.memoizedState}if(Q!==null)return Q.dehydrated}return null}function VK(z){return z.tag===k?z.stateNode.containerInfo:null}function j3(z){return g7(z)===z}function g3(z){{var Q=u3.current;if(Q!==null&&Q.tag===b){var X=Q,Z=X.stateNode;if(!Z._warnedAboutRefsInRender)H("%s is accessing isMounted inside its render() function. render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",d0(X)||"A component");Z._warnedAboutRefsInRender=!0}}var Y=Vz(z);if(!Y)return!1;return g7(Y)===Y}function CK(z){if(g7(z)!==z)throw Error("Unable to find node on an unmounted component.")}function DK(z){var Q=z.alternate;if(!Q){var X=g7(z);if(X===null)throw Error("Unable to find node on an unmounted component.");if(X!==z)return null;return z}var Z=z,Y=Q;while(!0){var J=Z.return;if(J===null)break;var q=J.alternate;if(q===null){var G=J.return;if(G!==null){Z=Y=G;continue}break}if(J.child===q.child){var K=J.child;while(K){if(K===Z)return CK(J),z;if(K===Y)return CK(J),Q;K=K.sibling}throw Error("Unable to find node on an unmounted component.")}if(Z.return!==Y.return)Z=J,Y=q;else{var _=!1,O=J.child;while(O){if(O===Z){_=!0,Z=J,Y=q;break}if(O===Y){_=!0,Y=J,Z=q;break}O=O.sibling}if(!_){O=q.child;while(O){if(O===Z){_=!0,Z=q,Y=J;break}if(O===Y){_=!0,Y=q,Z=J;break}O=O.sibling}if(!_)throw Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}if(Z.alternate!==Y)throw Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}if(Z.tag!==k)throw Error("Unable to find node on an unmounted component.");if(Z.stateNode.current===Z)return z;return Q}function yK(z){var Q=DK(z);return Q!==null?fK(Q):null}function fK(z){if(z.tag===w||z.tag===M)return z;var Q=z.child;while(Q!==null){var X=fK(Q);if(X!==null)return X;Q=Q.sibling}return null}function x3(z){var Q=DK(z);return Q!==null?EK(Q):null}function EK(z){if(z.tag===w||z.tag===M)return z;var Q=z.child;while(Q!==null){if(Q.tag!==P){var X=EK(Q);if(X!==null)return X}Q=Q.sibling}return null}var hK=w1.unstable_scheduleCallback,c3=w1.unstable_cancelCallback,d3=w1.unstable_shouldYield,l3=w1.unstable_requestPaint,k4=w1.unstable_now,i3=w1.unstable_getCurrentPriorityLevel,D8=w1.unstable_ImmediatePriority,kJ=w1.unstable_UserBlockingPriority,x7=w1.unstable_NormalPriority,o3=w1.unstable_LowPriority,IJ=w1.unstable_IdlePriority,a3=w1.unstable_yieldValue,r3=w1.unstable_setDisableYieldValue,c7=null,D4=null,q0=null,H5=!1,l6=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u";function n3(z){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")return!1;var Q=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(Q.isDisabled)return!0;if(!Q.supportsFiber)return H("The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://reactjs.org/link/react-devtools"),!0;try{if(t1)z=o0({},z,{getLaneLabelMap:XW,injectProfilingHooks:QW});c7=Q.inject(z),D4=Q}catch(X){H("React instrumentation encountered an error: %s.",X)}if(Q.checkDCE)return!0;else return!1}function t3(z,Q){if(D4&&typeof D4.onScheduleFiberRoot==="function")try{D4.onScheduleFiberRoot(c7,z,Q)}catch(X){if(!H5)H5=!0,H("React instrumentation encountered an error: %s",X)}}function s3(z,Q){if(D4&&typeof D4.onCommitFiberRoot==="function")try{var X=(z.current.flags&H1)===H1;if(i1){var Z;switch(Q){case A6:Z=D8;break;case E5:Z=kJ;break;case h5:Z=x7;break;case j8:Z=IJ;break;default:Z=x7;break}D4.onCommitFiberRoot(c7,z,Z,X)}else D4.onCommitFiberRoot(c7,z,void 0,X)}catch(Y){if(!H5)H5=!0,H("React instrumentation encountered an error: %s",Y)}}function e3(z){if(D4&&typeof D4.onPostCommitFiberRoot==="function")try{D4.onPostCommitFiberRoot(c7,z)}catch(Q){if(!H5)H5=!0,H("React instrumentation encountered an error: %s",Q)}}function zW(z){if(D4&&typeof D4.onCommitFiberUnmount==="function")try{D4.onCommitFiberUnmount(c7,z)}catch(Q){if(!H5)H5=!0,H("React instrumentation encountered an error: %s",Q)}}function I4(z){{if(typeof a3==="function")r3(z),B(z);if(D4&&typeof D4.setStrictMode==="function")try{D4.setStrictMode(c7,z)}catch(Q){if(!H5)H5=!0,H("React instrumentation encountered an error: %s",Q)}}}function QW(z){q0=z}function XW(){{var z=new Map,Q=1;for(var X=0;X<SJ;X++){var Z=MW(Q);z.set(Q,Z),Q*=2}return z}}function ZW(z){if(q0!==null&&typeof q0.markCommitStarted==="function")q0.markCommitStarted(z)}function pK(){if(q0!==null&&typeof q0.markCommitStopped==="function")q0.markCommitStopped()}function cQ(z){if(q0!==null&&typeof q0.markComponentRenderStarted==="function")q0.markComponentRenderStarted(z)}function yz(){if(q0!==null&&typeof q0.markComponentRenderStopped==="function")q0.markComponentRenderStopped()}function YW(z){if(q0!==null&&typeof q0.markComponentPassiveEffectMountStarted==="function")q0.markComponentPassiveEffectMountStarted(z)}function JW(){if(q0!==null&&typeof q0.markComponentPassiveEffectMountStopped==="function")q0.markComponentPassiveEffectMountStopped()}function $W(z){if(q0!==null&&typeof q0.markComponentPassiveEffectUnmountStarted==="function")q0.markComponentPassiveEffectUnmountStarted(z)}function qW(){if(q0!==null&&typeof q0.markComponentPassiveEffectUnmountStopped==="function")q0.markComponentPassiveEffectUnmountStopped()}function GW(z){if(q0!==null&&typeof q0.markComponentLayoutEffectMountStarted==="function")q0.markComponentLayoutEffectMountStarted(z)}function HW(){if(q0!==null&&typeof q0.markComponentLayoutEffectMountStopped==="function")q0.markComponentLayoutEffectMountStopped()}function mK(z){if(q0!==null&&typeof q0.markComponentLayoutEffectUnmountStarted==="function")q0.markComponentLayoutEffectUnmountStarted(z)}function uK(){if(q0!==null&&typeof q0.markComponentLayoutEffectUnmountStopped==="function")q0.markComponentLayoutEffectUnmountStopped()}function KW(z,Q,X){if(q0!==null&&typeof q0.markComponentErrored==="function")q0.markComponentErrored(z,Q,X)}function UW(z,Q,X){if(q0!==null&&typeof q0.markComponentSuspended==="function")q0.markComponentSuspended(z,Q,X)}function BW(z){if(q0!==null&&typeof q0.markLayoutEffectsStarted==="function")q0.markLayoutEffectsStarted(z)}function _W(){if(q0!==null&&typeof q0.markLayoutEffectsStopped==="function")q0.markLayoutEffectsStopped()}function OW(z){if(q0!==null&&typeof q0.markPassiveEffectsStarted==="function")q0.markPassiveEffectsStarted(z)}function LW(){if(q0!==null&&typeof q0.markPassiveEffectsStopped==="function")q0.markPassiveEffectsStopped()}function jK(z){if(q0!==null&&typeof q0.markRenderStarted==="function")q0.markRenderStarted(z)}function WW(){if(q0!==null&&typeof q0.markRenderYielded==="function")q0.markRenderYielded()}function gK(){if(q0!==null&&typeof q0.markRenderStopped==="function")q0.markRenderStopped()}function bW(z){if(q0!==null&&typeof q0.markRenderScheduled==="function")q0.markRenderScheduled(z)}function RW(z,Q){if(q0!==null&&typeof q0.markForceUpdateScheduled==="function")q0.markForceUpdateScheduled(z,Q)}function TJ(z,Q){if(q0!==null&&typeof q0.markStateUpdateScheduled==="function")q0.markStateUpdateScheduled(z,Q)}var T0=0,s0=1,F1=2,z4=8,K5=16,xK=Math.clz32?Math.clz32:PW,NW=Math.log,FW=Math.LN2;function PW(z){var Q=z>>>0;if(Q===0)return 32;return 31-(NW(Q)/FW|0)|0}var SJ=31,a=0,T4=0,f0=1,fz=2,f5=4,d7=8,U5=16,dQ=32,Ez=4194240,lQ=64,VJ=128,CJ=256,DJ=512,yJ=1024,fJ=2048,EJ=4096,hJ=8192,pJ=16384,mJ=32768,uJ=65536,jJ=131072,gJ=262144,xJ=524288,cJ=1048576,dJ=2097152,y8=130023424,hz=4194304,lJ=8388608,iJ=16777216,oJ=33554432,aJ=67108864,cK=hz,iQ=134217728,dK=268435455,oQ=268435456,l7=536870912,M6=1073741824;function MW(z){{if(z&f0)return"Sync";if(z&fz)return"InputContinuousHydration";if(z&f5)return"InputContinuous";if(z&d7)return"DefaultHydration";if(z&U5)return"Default";if(z&dQ)return"TransitionHydration";if(z&Ez)return"Transition";if(z&y8)return"Retry";if(z&iQ)return"SelectiveHydration";if(z&oQ)return"IdleHydration";if(z&l7)return"Idle";if(z&M6)return"Offscreen"}}var m1=-1,f8=lQ,E8=hz;function aQ(z){switch(i7(z)){case f0:return f0;case fz:return fz;case f5:return f5;case d7:return d7;case U5:return U5;case dQ:return dQ;case lQ:case VJ:case CJ:case DJ:case yJ:case fJ:case EJ:case hJ:case pJ:case mJ:case uJ:case jJ:case gJ:case xJ:case cJ:case dJ:return z&Ez;case hz:case lJ:case iJ:case oJ:case aJ:return z&y8;case iQ:return iQ;case oQ:return oQ;case l7:return l7;case M6:return M6;default:return H("Should have found matching lanes. This is a bug in React."),z}}function h8(z,Q){var X=z.pendingLanes;if(X===a)return a;var Z=a,Y=z.suspendedLanes,J=z.pingedLanes,q=X&dK;if(q!==a){var G=q&~Y;if(G!==a)Z=aQ(G);else{var K=q&J;if(K!==a)Z=aQ(K)}}else{var _=X&~Y;if(_!==a)Z=aQ(_);else if(J!==a)Z=aQ(J)}if(Z===a)return a;if(Q!==a&&Q!==Z&&(Q&Y)===a){var O=i7(Z),v=i7(Q);if(O>=v||O===U5&&(v&Ez)!==a)return Q}if((Z&f5)!==a)Z|=X&U5;var A=z.entangledLanes;if(A!==a){var D=z.entanglements,y=Z&A;while(y>0){var h=o7(y),Y0=1<<h;Z|=D[h],y&=~Y0}}return Z}function wW(z,Q){var X=z.eventTimes,Z=m1;while(Q>0){var Y=o7(Q),J=1<<Y,q=X[Y];if(q>Z)Z=q;Q&=~J}return Z}function AW(z,Q){switch(z){case f0:case fz:case f5:return Q+250;case d7:case U5:case dQ:case lQ:case VJ:case CJ:case DJ:case yJ:case fJ:case EJ:case hJ:case pJ:case mJ:case uJ:case jJ:case gJ:case xJ:case cJ:case dJ:return Q+5000;case hz:case lJ:case iJ:case oJ:case aJ:return m1;case iQ:case oQ:case l7:case M6:return m1;default:return H("Should have found matching lanes. This is a bug in React."),m1}}function vW(z,Q){var{pendingLanes:X,suspendedLanes:Z,pingedLanes:Y,expirationTimes:J}=z,q=X;while(q>0){var G=o7(q),K=1<<G,_=J[G];if(_===m1){if((K&Z)===a||(K&Y)!==a)J[G]=AW(K,Q)}else if(_<=Q)z.expiredLanes|=K;q&=~K}}function kW(z){return aQ(z.pendingLanes)}function rJ(z){var Q=z.pendingLanes&~M6;if(Q!==a)return Q;if(Q&M6)return M6;return a}function IW(z){return(z&f0)!==a}function nJ(z){return(z&dK)!==a}function lK(z){return(z&y8)===z}function TW(z){var Q=f0|f5|U5;return(z&Q)===a}function SW(z){return(z&Ez)===z}function p8(z,Q){var X=fz|f5|d7|U5;return(Q&X)!==a}function VW(z,Q){return(Q&z.expiredLanes)!==a}function iK(z){return(z&Ez)!==a}function oK(){var z=f8;if(f8<<=1,(f8&Ez)===a)f8=lQ;return z}function CW(){var z=E8;if(E8<<=1,(E8&y8)===a)E8=hz;return z}function i7(z){return z&-z}function rQ(z){return i7(z)}function o7(z){return 31-xK(z)}function tJ(z){return o7(z)}function w6(z,Q){return(z&Q)!==a}function pz(z,Q){return(z&Q)===Q}function c0(z,Q){return z|Q}function m8(z,Q){return z&~Q}function aK(z,Q){return z&Q}function u8(z){return z}function DW(z,Q){return z!==T4&&z<Q?z:Q}function sJ(z){var Q=[];for(var X=0;X<SJ;X++)Q.push(z);return Q}function nQ(z,Q,X){if(z.pendingLanes|=Q,Q!==l7)z.suspendedLanes=a,z.pingedLanes=a;var Z=z.eventTimes,Y=tJ(Q);Z[Y]=X}function yW(z,Q){z.suspendedLanes|=Q,z.pingedLanes&=~Q;var X=z.expirationTimes,Z=Q;while(Z>0){var Y=o7(Z),J=1<<Y;X[Y]=m1,Z&=~J}}function rK(z,Q,X){z.pingedLanes|=z.suspendedLanes&Q}function fW(z,Q){var X=z.pendingLanes&~Q;z.pendingLanes=Q,z.suspendedLanes=a,z.pingedLanes=a,z.expiredLanes&=Q,z.mutableReadLanes&=Q,z.entangledLanes&=Q;var{entanglements:Z,eventTimes:Y,expirationTimes:J}=z,q=X;while(q>0){var G=o7(q),K=1<<G;Z[G]=a,Y[G]=m1,J[G]=m1,q&=~K}}function eJ(z,Q){var X=z.entangledLanes|=Q,Z=z.entanglements,Y=X;while(Y){var J=o7(Y),q=1<<J;if(q&Q|Z[J]&Q)Z[J]|=Q;Y&=~q}}function EW(z,Q){var X=i7(Q),Z;switch(X){case f5:Z=fz;break;case U5:Z=d7;break;case lQ:case VJ:case CJ:case DJ:case yJ:case fJ:case EJ:case hJ:case pJ:case mJ:case uJ:case jJ:case gJ:case xJ:case cJ:case dJ:case hz:case lJ:case iJ:case oJ:case aJ:Z=dQ;break;case l7:Z=oQ;break;default:Z=T4;break}if((Z&(z.suspendedLanes|Q))!==T4)return T4;return Z}function nK(z,Q,X){if(!l6)return;var Z=z.pendingUpdatersLaneMap;while(X>0){var Y=tJ(X),J=1<<Y,q=Z[Y];q.add(Q),X&=~J}}function tK(z,Q){if(!l6)return;var{pendingUpdatersLaneMap:X,memoizedUpdaters:Z}=z;while(Q>0){var Y=tJ(Q),J=1<<Y,q=X[Y];if(q.size>0)q.forEach(function(G){var K=G.alternate;if(K===null||!Z.has(K))Z.add(G)}),q.clear();Q&=~J}}function sK(z,Q){return null}var A6=f0,E5=f5,h5=U5,j8=l7,tQ=T4;function i6(){return tQ}function S4(z){tQ=z}function hW(z,Q){var X=tQ;try{return tQ=z,Q()}finally{tQ=X}}function pW(z,Q){return z!==0&&z<Q?z:Q}function mW(z,Q){return z===0||z>Q?z:Q}function z$(z,Q){return z!==0&&z<Q}function eK(z){var Q=i7(z);if(!z$(A6,Q))return A6;if(!z$(E5,Q))return E5;if(nJ(Q))return h5;return j8}function g8(z){var Q=z.current.memoizedState;return Q.isDehydrated}var zU;function uW(z){zU=z}function jW(z){zU(z)}var Q$;function gW(z){Q$=z}var QU;function xW(z){QU=z}var XU;function cW(z){XU=z}var ZU;function dW(z){ZU=z}var X$=!1,x8=[],Y7=null,J7=null,$7=null,sQ=new Map,eQ=new Map,q7=[],lW=["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"];function iW(z){return lW.indexOf(z)>-1}function oW(z,Q,X,Z,Y){return{blockedOn:z,domEventName:Q,eventSystemFlags:X,nativeEvent:Y,targetContainers:[Z]}}function YU(z,Q){switch(z){case"focusin":case"focusout":Y7=null;break;case"dragenter":case"dragleave":J7=null;break;case"mouseover":case"mouseout":$7=null;break;case"pointerover":case"pointerout":{var X=Q.pointerId;sQ.delete(X);break}case"gotpointercapture":case"lostpointercapture":{var Z=Q.pointerId;eQ.delete(Z);break}}}function zX(z,Q,X,Z,Y,J){if(z===null||z.nativeEvent!==J){var q=oW(Q,X,Z,Y,J);if(Q!==null){var G=K7(Q);if(G!==null)Q$(G)}return q}z.eventSystemFlags|=Z;var K=z.targetContainers;if(Y!==null&&K.indexOf(Y)===-1)K.push(Y);return z}function aW(z,Q,X,Z,Y){switch(Q){case"focusin":{var J=Y;return Y7=zX(Y7,z,Q,X,Z,J),!0}case"dragenter":{var q=Y;return J7=zX(J7,z,Q,X,Z,q),!0}case"mouseover":{var G=Y;return $7=zX($7,z,Q,X,Z,G),!0}case"pointerover":{var K=Y,_=K.pointerId;return sQ.set(_,zX(sQ.get(_)||null,z,Q,X,Z,K)),!0}case"gotpointercapture":{var O=Y,v=O.pointerId;return eQ.set(v,zX(eQ.get(v)||null,z,Q,X,Z,O)),!0}}return!1}function JU(z){var Q=n7(z.target);if(Q!==null){var X=g7(Q);if(X!==null){var Z=X.tag;if(Z===l){var Y=SK(X);if(Y!==null){z.blockedOn=Y,ZU(z.priority,function(){QU(X)});return}}else if(Z===k){var J=X.stateNode;if(g8(J)){z.blockedOn=VK(X);return}}}}z.blockedOn=null}function rW(z){var Q=XU(),X={blockedOn:null,target:z,priority:Q},Z=0;for(;Z<q7.length;Z++)if(!z$(Q,q7[Z].priority))break;if(q7.splice(Z,0,X),Z===0)JU(X)}function c8(z){if(z.blockedOn!==null)return!1;var Q=z.targetContainers;while(Q.length>0){var X=Q[0],Z=J$(z.domEventName,z.eventSystemFlags,X,z.nativeEvent);if(Z===null){var Y=z.nativeEvent,J=new Y.constructor(Y.type,Y);P3(J),Y.target.dispatchEvent(J),M3()}else{var q=K7(Z);if(q!==null)Q$(q);return z.blockedOn=Z,!1}Q.shift()}return!0}function $U(z,Q,X){if(c8(z))X.delete(Q)}function nW(){if(X$=!1,Y7!==null&&c8(Y7))Y7=null;if(J7!==null&&c8(J7))J7=null;if($7!==null&&c8($7))$7=null;sQ.forEach($U),eQ.forEach($U)}function QX(z,Q){if(z.blockedOn===Q){if(z.blockedOn=null,!X$)X$=!0,w1.unstable_scheduleCallback(w1.unstable_NormalPriority,nW)}}function XX(z){if(x8.length>0){QX(x8[0],z);for(var Q=1;Q<x8.length;Q++){var X=x8[Q];if(X.blockedOn===z)X.blockedOn=null}}if(Y7!==null)QX(Y7,z);if(J7!==null)QX(J7,z);if($7!==null)QX($7,z);var Z=function(G){return QX(G,z)};sQ.forEach(Z),eQ.forEach(Z);for(var Y=0;Y<q7.length;Y++){var J=q7[Y];if(J.blockedOn===z)J.blockedOn=null}while(q7.length>0){var q=q7[0];if(q.blockedOn!==null)break;else if(JU(q),q.blockedOn===null)q7.shift()}}var mz=$.ReactCurrentBatchConfig,Z$=!0;function qU(z){Z$=!!z}function tW(){return Z$}function sW(z,Q,X){var Z=GU(Q),Y;switch(Z){case A6:Y=eW;break;case E5:Y=zb;break;case h5:default:Y=Y$;break}return Y.bind(null,Q,X,z)}function eW(z,Q,X,Z){var Y=i6(),J=mz.transition;mz.transition=null;try{S4(A6),Y$(z,Q,X,Z)}finally{S4(Y),mz.transition=J}}function zb(z,Q,X,Z){var Y=i6(),J=mz.transition;mz.transition=null;try{S4(E5),Y$(z,Q,X,Z)}finally{S4(Y),mz.transition=J}}function Y$(z,Q,X,Z){if(!Z$)return;Qb(z,Q,X,Z)}function Qb(z,Q,X,Z){var Y=J$(z,Q,X,Z);if(Y===null){N$(z,Q,Z,d8,X),YU(z,Z);return}if(aW(Y,z,Q,X,Z)){Z.stopPropagation();return}if(YU(z,Z),Q&hQ&&iW(z)){while(Y!==null){var J=K7(Y);if(J!==null)jW(J);var q=J$(z,Q,X,Z);if(q===null)N$(z,Q,Z,d8,X);if(q===Y)break;Y=q}if(Y!==null)Z.stopPropagation();return}N$(z,Q,Z,null,X)}var d8=null;function J$(z,Q,X,Z){d8=null;var Y=BJ(Z),J=n7(Y);if(J!==null){var q=g7(J);if(q===null)J=null;else{var G=q.tag;if(G===l){var K=SK(q);if(K!==null)return K;J=null}else if(G===k){var _=q.stateNode;if(g8(_))return VK(q);J=null}else if(q!==J)J=null}}return d8=J,null}function GU(z){switch(z){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 A6;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 E5;case"message":{var Q=i3();switch(Q){case D8:return A6;case kJ:return E5;case x7:case o3:return h5;case IJ:return j8;default:return h5}}default:return h5}}function Xb(z,Q,X){return z.addEventListener(Q,X,!1),X}function Zb(z,Q,X){return z.addEventListener(Q,X,!0),X}function Yb(z,Q,X,Z){return z.addEventListener(Q,X,{capture:!0,passive:Z}),X}function Jb(z,Q,X,Z){return z.addEventListener(Q,X,{passive:Z}),X}var ZX=null,$$=null,YX=null;function $b(z){return ZX=z,$$=KU(),!0}function qb(){ZX=null,$$=null,YX=null}function HU(){if(YX)return YX;var z,Q=$$,X=Q.length,Z,Y=KU(),J=Y.length;for(z=0;z<X;z++)if(Q[z]!==Y[z])break;var q=X-z;for(Z=1;Z<=q;Z++)if(Q[X-Z]!==Y[J-Z])break;var G=Z>1?1-Z:void 0;return YX=Y.slice(z,G),YX}function KU(){if("value"in ZX)return ZX.value;return ZX.textContent}function l8(z){var Q,X=z.keyCode;if("charCode"in z){if(Q=z.charCode,Q===0&&X===13)Q=13}else Q=X;if(Q===10)Q=13;if(Q>=32||Q===13)return Q;return 0}function i8(){return!0}function UU(){return!1}function v6(z){function Q(X,Z,Y,J,q){this._reactName=X,this._targetInst=Y,this.type=Z,this.nativeEvent=J,this.target=q,this.currentTarget=null;for(var G in z){if(!z.hasOwnProperty(G))continue;var K=z[G];if(K)this[G]=K(J);else this[G]=J[G]}var _=J.defaultPrevented!=null?J.defaultPrevented:J.returnValue===!1;if(_)this.isDefaultPrevented=i8;else this.isDefaultPrevented=UU;return this.isPropagationStopped=UU,this}return o0(Q.prototype,{preventDefault:function(){this.defaultPrevented=!0;var X=this.nativeEvent;if(!X)return;if(X.preventDefault)X.preventDefault();else if(typeof X.returnValue!=="unknown")X.returnValue=!1;this.isDefaultPrevented=i8},stopPropagation:function(){var X=this.nativeEvent;if(!X)return;if(X.stopPropagation)X.stopPropagation();else if(typeof X.cancelBubble!=="unknown")X.cancelBubble=!0;this.isPropagationStopped=i8},persist:function(){},isPersistent:i8}),Q}var uz={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(z){return z.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},q$=v6(uz),JX=o0({},uz,{view:0,detail:0}),Gb=v6(JX),G$,H$,$X;function Hb(z){if(z!==$X){if($X&&z.type==="mousemove")G$=z.screenX-$X.screenX,H$=z.screenY-$X.screenY;else G$=0,H$=0;$X=z}}var o8=o0({},JX,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:U$,button:0,buttons:0,relatedTarget:function(z){if(z.relatedTarget===void 0)return z.fromElement===z.srcElement?z.toElement:z.fromElement;return z.relatedTarget},movementX:function(z){if("movementX"in z)return z.movementX;return Hb(z),G$},movementY:function(z){if("movementY"in z)return z.movementY;return H$}}),BU=v6(o8),Kb=o0({},o8,{dataTransfer:0}),Ub=v6(Kb),Bb=o0({},JX,{relatedTarget:0}),K$=v6(Bb),_b=o0({},uz,{animationName:0,elapsedTime:0,pseudoElement:0}),Ob=v6(_b),Lb=o0({},uz,{clipboardData:function(z){return"clipboardData"in z?z.clipboardData:window.clipboardData}}),Wb=v6(Lb),bb=o0({},uz,{data:0}),_U=v6(bb),Rb=_U,Nb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Fb={"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"};function Pb(z){if(z.key){var Q=Nb[z.key]||z.key;if(Q!=="Unidentified")return Q}if(z.type==="keypress"){var X=l8(z);return X===13?"Enter":String.fromCharCode(X)}if(z.type==="keydown"||z.type==="keyup")return Fb[z.keyCode]||"Unidentified";return""}var Mb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function wb(z){var Q=this,X=Q.nativeEvent;if(X.getModifierState)return X.getModifierState(z);var Z=Mb[z];return Z?!!X[Z]:!1}function U$(z){return wb}var Ab=o0({},JX,{key:Pb,code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:U$,charCode:function(z){if(z.type==="keypress")return l8(z);return 0},keyCode:function(z){if(z.type==="keydown"||z.type==="keyup")return z.keyCode;return 0},which:function(z){if(z.type==="keypress")return l8(z);if(z.type==="keydown"||z.type==="keyup")return z.keyCode;return 0}}),vb=v6(Ab),kb=o0({},o8,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),OU=v6(kb),Ib=o0({},JX,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:U$}),Tb=v6(Ib),Sb=o0({},uz,{propertyName:0,elapsedTime:0,pseudoElement:0}),Vb=v6(Sb),Cb=o0({},o8,{deltaX:function(z){return"deltaX"in z?z.deltaX:("wheelDeltaX"in z)?-z.wheelDeltaX:0},deltaY:function(z){return"deltaY"in z?z.deltaY:("wheelDeltaY"in z)?-z.wheelDeltaY:("wheelDelta"in z)?-z.wheelDelta:0},deltaZ:0,deltaMode:0}),Db=v6(Cb),yb=[9,13,27,32],LU=229,B$=y0&&"CompositionEvent"in window,qX=null;if(y0&&"documentMode"in document)qX=document.documentMode;var fb=y0&&"TextEvent"in window&&!qX,WU=y0&&(!B$||qX&&qX>8&&qX<=11),bU=32,RU=String.fromCharCode(bU);function Eb(){Z4("onBeforeInput",["compositionend","keypress","textInput","paste"]),Z4("onCompositionEnd",["compositionend","focusout","keydown","keypress","keyup","mousedown"]),Z4("onCompositionStart",["compositionstart","focusout","keydown","keypress","keyup","mousedown"]),Z4("onCompositionUpdate",["compositionupdate","focusout","keydown","keypress","keyup","mousedown"])}var NU=!1;function hb(z){return(z.ctrlKey||z.altKey||z.metaKey)&&!(z.ctrlKey&&z.altKey)}function pb(z){switch(z){case"compositionstart":return"onCompositionStart";case"compositionend":return"onCompositionEnd";case"compositionupdate":return"onCompositionUpdate"}}function mb(z,Q){return z==="keydown"&&Q.keyCode===LU}function FU(z,Q){switch(z){case"keyup":return yb.indexOf(Q.keyCode)!==-1;case"keydown":return Q.keyCode!==LU;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function PU(z){var Q=z.detail;if(typeof Q==="object"&&"data"in Q)return Q.data;return null}function MU(z){return z.locale==="ko"}var jz=!1;function ub(z,Q,X,Z,Y){var J,q;if(B$)J=pb(Q);else if(!jz){if(mb(Q,Z))J="onCompositionStart"}else if(FU(Q,Z))J="onCompositionEnd";if(!J)return null;if(WU&&!MU(Z)){if(!jz&&J==="onCompositionStart")jz=$b(Y);else if(J==="onCompositionEnd"){if(jz)q=HU()}}var G=s8(X,J);if(G.length>0){var K=new _U(J,Q,null,Z,Y);if(z.push({event:K,listeners:G}),q)K.data=q;else{var _=PU(Z);if(_!==null)K.data=_}}}function jb(z,Q){switch(z){case"compositionend":return PU(Q);case"keypress":var X=Q.which;if(X!==bU)return null;return NU=!0,RU;case"textInput":var Z=Q.data;if(Z===RU&&NU)return null;return Z;default:return null}}function gb(z,Q){if(jz){if(z==="compositionend"||!B$&&FU(z,Q)){var X=HU();return qb(),jz=!1,X}return null}switch(z){case"paste":return null;case"keypress":if(!hb(Q)){if(Q.char&&Q.char.length>1)return Q.char;else if(Q.which)return String.fromCharCode(Q.which)}return null;case"compositionend":return WU&&!MU(Q)?null:Q.data;default:return null}}function xb(z,Q,X,Z,Y){var J;if(fb)J=jb(Q,Z);else J=gb(Q,Z);if(!J)return null;var q=s8(X,"onBeforeInput");if(q.length>0){var G=new Rb("onBeforeInput","beforeinput",null,Z,Y);z.push({event:G,listeners:q}),G.data=J}}function cb(z,Q,X,Z,Y,J,q){ub(z,Q,X,Z,Y),xb(z,Q,X,Z,Y)}var db={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 wU(z){var Q=z&&z.nodeName&&z.nodeName.toLowerCase();if(Q==="input")return!!db[z.type];if(Q==="textarea")return!0;return!1}function lb(z){if(!y0)return!1;var Q="on"+z,X=Q in document;if(!X){var Z=document.createElement("div");Z.setAttribute(Q,"return;"),X=typeof Z[Q]==="function"}return X}function ib(){Z4("onChange",["change","click","focusin","focusout","input","keydown","keyup","selectionchange"])}function AU(z,Q,X,Z){PK(Z);var Y=s8(Q,"onChange");if(Y.length>0){var J=new q$("onChange","change",null,X,Z);z.push({event:J,listeners:Y})}}var GX=null,HX=null;function ob(z){var Q=z.nodeName&&z.nodeName.toLowerCase();return Q==="select"||Q==="input"&&z.type==="file"}function ab(z){var Q=[];AU(Q,HX,z,BJ(z)),vK(rb,Q)}function rb(z){xU(z,0)}function a8(z){var Q=iz(z);if(gH(Q))return z}function nb(z,Q){if(z==="change")return Q}var vU=!1;if(y0)vU=lb("input")&&(!document.documentMode||document.documentMode>9);function tb(z,Q){GX=z,HX=Q,GX.attachEvent("onpropertychange",IU)}function kU(){if(!GX)return;GX.detachEvent("onpropertychange",IU),GX=null,HX=null}function IU(z){if(z.propertyName!=="value")return;if(a8(HX))ab(z)}function sb(z,Q,X){if(z==="focusin")kU(),tb(Q,X);else if(z==="focusout")kU()}function eb(z,Q){if(z==="selectionchange"||z==="keyup"||z==="keydown")return a8(HX)}function zR(z){var Q=z.nodeName;return Q&&Q.toLowerCase()==="input"&&(z.type==="checkbox"||z.type==="radio")}function QR(z,Q){if(z==="click")return a8(Q)}function XR(z,Q){if(z==="input"||z==="change")return a8(Q)}function ZR(z){var Q=z._wrapperState;if(!Q||!Q.controlled||z.type!=="number")return;QJ(z,"number",z.value)}function YR(z,Q,X,Z,Y,J,q){var G=X?iz(X):window,K,_;if(ob(G))K=nb;else if(wU(G))if(vU)K=XR;else K=eb,_=sb;else if(zR(G))K=QR;if(K){var O=K(Q,X);if(O){AU(z,O,Z,Y);return}}if(_)_(Q,G,X);if(Q==="focusout")ZR(G)}function JR(){v4("onMouseEnter",["mouseout","mouseover"]),v4("onMouseLeave",["mouseout","mouseover"]),v4("onPointerEnter",["pointerout","pointerover"]),v4("onPointerLeave",["pointerout","pointerover"])}function $R(z,Q,X,Z,Y,J,q){var G=Q==="mouseover"||Q==="pointerover",K=Q==="mouseout"||Q==="pointerout";if(G&&!w3(Z)){var _=Z.relatedTarget||Z.fromElement;if(_){if(n7(_)||AX(_))return}}if(!K&&!G)return;var O;if(Y.window===Y)O=Y;else{var v=Y.ownerDocument;if(v)O=v.defaultView||v.parentWindow;else O=window}var A,D;if(K){var y=Z.relatedTarget||Z.toElement;if(A=X,D=y?n7(y):null,D!==null){var h=g7(D);if(D!==h||D.tag!==w&&D.tag!==M)D=null}}else A=null,D=X;if(A===D)return;var Y0=BU,w0="onMouseLeave",R0="onMouseEnter",n0="mouse";if(Q==="pointerout"||Q==="pointerover")Y0=OU,w0="onPointerLeave",R0="onPointerEnter",n0="pointer";var t0=A==null?O:iz(A),S=D==null?O:iz(D),m=new Y0(w0,n0+"leave",A,Z,Y);m.target=t0,m.relatedTarget=S;var V=null,n=n7(Y);if(n===X){var H0=new Y0(R0,n0+"enter",D,Z,Y);H0.target=S,H0.relatedTarget=t0,V=H0}VR(z,m,V,A,D)}function qR(z,Q){return z===Q&&(z!==0||1/z===1/Q)||z!==z&&Q!==Q}var k6=typeof Object.is==="function"?Object.is:qR;function KX(z,Q){if(k6(z,Q))return!0;if(typeof z!=="object"||z===null||typeof Q!=="object"||Q===null)return!1;var X=Object.keys(z),Z=Object.keys(Q);if(X.length!==Z.length)return!1;for(var Y=0;Y<X.length;Y++){var J=X[Y];if(!O1.call(Q,J)||!k6(z[J],Q[J]))return!1}return!0}function TU(z){while(z&&z.firstChild)z=z.firstChild;return z}function GR(z){while(z){if(z.nextSibling)return z.nextSibling;z=z.parentNode}}function SU(z,Q){var X=TU(z),Z=0,Y=0;while(X){if(X.nodeType===T5){if(Y=Z+X.textContent.length,Z<=Q&&Y>=Q)return{node:X,offset:Q-Z};Z=Y}X=TU(GR(X))}}function HR(z){var Q=z.ownerDocument,X=Q&&Q.defaultView||window,Z=X.getSelection&&X.getSelection();if(!Z||Z.rangeCount===0)return null;var{anchorNode:Y,anchorOffset:J,focusNode:q,focusOffset:G}=Z;try{Y.nodeType,q.nodeType}catch(K){return null}return KR(z,Y,J,q,G)}function KR(z,Q,X,Z,Y){var J=0,q=-1,G=-1,K=0,_=0,O=z,v=null;z:while(!0){var A=null;while(!0){if(O===Q&&(X===0||O.nodeType===T5))q=J+X;if(O===Z&&(Y===0||O.nodeType===T5))G=J+Y;if(O.nodeType===T5)J+=O.nodeValue.length;if((A=O.firstChild)===null)break;v=O,O=A}while(!0){if(O===z)break z;if(v===Q&&++K===X)q=J;if(v===Z&&++_===Y)G=J;if((A=O.nextSibling)!==null)break;O=v,v=O.parentNode}O=A}if(q===-1||G===-1)return null;return{start:q,end:G}}function UR(z,Q){var X=z.ownerDocument||document,Z=X&&X.defaultView||window;if(!Z.getSelection)return;var Y=Z.getSelection(),J=z.textContent.length,q=Math.min(Q.start,J),G=Q.end===void 0?q:Math.min(Q.end,J);if(!Y.extend&&q>G){var K=G;G=q,q=K}var _=SU(z,q),O=SU(z,G);if(_&&O){if(Y.rangeCount===1&&Y.anchorNode===_.node&&Y.anchorOffset===_.offset&&Y.focusNode===O.node&&Y.focusOffset===O.offset)return;var v=X.createRange();if(v.setStart(_.node,_.offset),Y.removeAllRanges(),q>G)Y.addRange(v),Y.extend(O.node,O.offset);else v.setEnd(O.node,O.offset),Y.addRange(v)}}function VU(z){return z&&z.nodeType===T5}function CU(z,Q){if(!z||!Q)return!1;else if(z===Q)return!0;else if(VU(z))return!1;else if(VU(Q))return CU(z,Q.parentNode);else if("contains"in z)return z.contains(Q);else if(z.compareDocumentPosition)return!!(z.compareDocumentPosition(Q)&16);else return!1}function BR(z){return z&&z.ownerDocument&&CU(z.ownerDocument.documentElement,z)}function _R(z){try{return typeof z.contentWindow.location.href==="string"}catch(Q){return!1}}function DU(){var z=window,Q=A8();while(Q instanceof z.HTMLIFrameElement){if(_R(Q))z=Q.contentWindow;else return Q;Q=A8(z.document)}return Q}function _$(z){var Q=z&&z.nodeName&&z.nodeName.toLowerCase();return Q&&(Q==="input"&&(z.type==="text"||z.type==="search"||z.type==="tel"||z.type==="url"||z.type==="password")||Q==="textarea"||z.contentEditable==="true")}function OR(){var z=DU();return{focusedElem:z,selectionRange:_$(z)?WR(z):null}}function LR(z){var Q=DU(),X=z.focusedElem,Z=z.selectionRange;if(Q!==X&&BR(X)){if(Z!==null&&_$(X))bR(X,Z);var Y=[],J=X;while(J=J.parentNode)if(J.nodeType===O6)Y.push({element:J,left:J.scrollLeft,top:J.scrollTop});if(typeof X.focus==="function")X.focus();for(var q=0;q<Y.length;q++){var G=Y[q];G.element.scrollLeft=G.left,G.element.scrollTop=G.top}}}function WR(z){var Q;if("selectionStart"in z)Q={start:z.selectionStart,end:z.selectionEnd};else Q=HR(z);return Q||{start:0,end:0}}function bR(z,Q){var{start:X,end:Z}=Q;if(Z===void 0)Z=X;if("selectionStart"in z)z.selectionStart=X,z.selectionEnd=Math.min(Z,z.value.length);else UR(z,Q)}var RR=y0&&"documentMode"in document&&document.documentMode<=11;function NR(){Z4("onSelect",["focusout","contextmenu","dragend","focusin","keydown","keyup","mousedown","mouseup","selectionchange"])}var gz=null,O$=null,UX=null,L$=!1;function FR(z){if("selectionStart"in z&&_$(z))return{start:z.selectionStart,end:z.selectionEnd};else{var Q=z.ownerDocument&&z.ownerDocument.defaultView||window,X=Q.getSelection();return{anchorNode:X.anchorNode,anchorOffset:X.anchorOffset,focusNode:X.focusNode,focusOffset:X.focusOffset}}}function PR(z){return z.window===z?z.document:z.nodeType===S5?z:z.ownerDocument}function yU(z,Q,X){var Z=PR(X);if(L$||gz==null||gz!==A8(Z))return;var Y=FR(gz);if(!UX||!KX(UX,Y)){UX=Y;var J=s8(O$,"onSelect");if(J.length>0){var q=new q$("onSelect","select",null,Q,X);z.push({event:q,listeners:J}),q.target=gz}}}function MR(z,Q,X,Z,Y,J,q){var G=X?iz(X):window;switch(Q){case"focusin":if(wU(G)||G.contentEditable==="true")gz=G,O$=X,UX=null;break;case"focusout":gz=null,O$=null,UX=null;break;case"mousedown":L$=!0;break;case"contextmenu":case"mouseup":case"dragend":L$=!1,yU(z,Z,Y);break;case"selectionchange":if(RR)break;case"keydown":case"keyup":yU(z,Z,Y)}}function r8(z,Q){var X={};return X[z.toLowerCase()]=Q.toLowerCase(),X["Webkit"+z]="webkit"+Q,X["Moz"+z]="moz"+Q,X}var xz={animationend:r8("Animation","AnimationEnd"),animationiteration:r8("Animation","AnimationIteration"),animationstart:r8("Animation","AnimationStart"),transitionend:r8("Transition","TransitionEnd")},W$={},fU={};if(y0){if(fU=document.createElement("div").style,!("AnimationEvent"in window))delete xz.animationend.animation,delete xz.animationiteration.animation,delete xz.animationstart.animation;if(!("TransitionEvent"in window))delete xz.transitionend.transition}function n8(z){if(W$[z])return W$[z];else if(!xz[z])return z;var Q=xz[z];for(var X in Q)if(Q.hasOwnProperty(X)&&X in fU)return W$[z]=Q[X];return z}var EU=n8("animationend"),hU=n8("animationiteration"),pU=n8("animationstart"),mU=n8("transitionend"),uU=new Map,jU=["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"];function G7(z,Q){uU.set(z,Q),Z4(Q,[z])}function wR(){for(var z=0;z<jU.length;z++){var Q=jU[z],X=Q.toLowerCase(),Z=Q[0].toUpperCase()+Q.slice(1);G7(X,"on"+Z)}G7(EU,"onAnimationEnd"),G7(hU,"onAnimationIteration"),G7(pU,"onAnimationStart"),G7("dblclick","onDoubleClick"),G7("focusin","onFocus"),G7("focusout","onBlur"),G7(mU,"onTransitionEnd")}function AR(z,Q,X,Z,Y,J,q){var G=uU.get(Q);if(G===void 0)return;var K=q$,_=Q;switch(Q){case"keypress":if(l8(Z)===0)return;case"keydown":case"keyup":K=vb;break;case"focusin":_="focus",K=K$;break;case"focusout":_="blur",K=K$;break;case"beforeblur":case"afterblur":K=K$;break;case"click":if(Z.button===2)return;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":K=BU;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":K=Ub;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":K=Tb;break;case EU:case hU:case pU:K=Ob;break;case mU:K=Vb;break;case"scroll":K=Gb;break;case"wheel":K=Db;break;case"copy":case"cut":case"paste":K=Wb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":K=OU;break}var O=(J&hQ)!==0;{var v=!O&&Q==="scroll",A=TR(X,G,Z.type,O,v);if(A.length>0){var D=new K(G,_,null,Z,Y);z.push({event:D,listeners:A})}}}wR(),JR(),ib(),NR(),Eb();function vR(z,Q,X,Z,Y,J,q){AR(z,Q,X,Z,Y,J);var G=(J&F3)===0;if(G)$R(z,Q,X,Z,Y),YR(z,Q,X,Z,Y),MR(z,Q,X,Z,Y),cb(z,Q,X,Z,Y)}var BX=["abort","canplay","canplaythrough","durationchange","emptied","encrypted","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","resize","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"],b$=new Set(["cancel","close","invalid","load","scroll","toggle"].concat(BX));function gU(z,Q,X){var Z=z.type||"unknown-event";z.currentTarget=X,D3(Z,Q,void 0,z),z.currentTarget=null}function kR(z,Q,X){var Z;if(X)for(var Y=Q.length-1;Y>=0;Y--){var J=Q[Y],q=J.instance,G=J.currentTarget,K=J.listener;if(q!==Z&&z.isPropagationStopped())return;gU(z,K,G),Z=q}else for(var _=0;_<Q.length;_++){var O=Q[_],v=O.instance,A=O.currentTarget,D=O.listener;if(v!==Z&&z.isPropagationStopped())return;gU(z,D,A),Z=v}}function xU(z,Q){var X=(Q&hQ)!==0;for(var Z=0;Z<z.length;Z++){var Y=z[Z],J=Y.event,q=Y.listeners;kR(J,q,X)}y3()}function IR(z,Q,X,Z,Y){var J=BJ(X),q=[];vR(q,z,Z,X,J,Q),xU(q,Q)}function g1(z,Q){if(!b$.has(z))H('Did not expect a listenToNonDelegatedEvent() call for "%s". This is a bug in React. Please file an issue.',z);var X=!1,Z=ZF(Q),Y=CR(z,X);if(!Z.has(Y))cU(Q,z,UJ,X),Z.add(Y)}function R$(z,Q,X){if(b$.has(z)&&!Q)H('Did not expect a listenToNativeEvent() call for "%s" in the bubble phase. This is a bug in React. Please file an issue.',z);var Z=0;if(Q)Z|=hQ;cU(X,z,Z,Q)}var t8="_reactListening"+Math.random().toString(36).slice(2);function _X(z){if(!z[t8]){z[t8]=!0,A4.forEach(function(X){if(X!=="selectionchange"){if(!b$.has(X))R$(X,!1,z);R$(X,!0,z)}});var Q=z.nodeType===S5?z:z.ownerDocument;if(Q!==null){if(!Q[t8])Q[t8]=!0,R$("selectionchange",!1,Q)}}}function cU(z,Q,X,Z,Y){var J=sW(z,Q,X),q=void 0;if(LJ){if(Q==="touchstart"||Q==="touchmove"||Q==="wheel")q=!0}z=z;var G;if(Z)if(q!==void 0)G=Yb(z,Q,J,q);else G=Zb(z,Q,J);else if(q!==void 0)G=Jb(z,Q,J,q);else G=Xb(z,Q,J)}function dU(z,Q){return z===Q||z.nodeType===U4&&z.parentNode===Q}function N$(z,Q,X,Z,Y){var J=Z;if((Q&NK)===0&&(Q&UJ)===0){var q=Y;if(Z!==null){var G=Z;z:while(!0){if(G===null)return;var K=G.tag;if(K===k||K===P){var _=G.stateNode.containerInfo;if(dU(_,q))break;if(K===P){var O=G.return;while(O!==null){var v=O.tag;if(v===k||v===P){var A=O.stateNode.containerInfo;if(dU(A,q))return}O=O.return}}while(_!==null){var D=n7(_);if(D===null)return;var y=D.tag;if(y===w||y===M){G=J=D;continue z}_=_.parentNode}}G=G.return}}}vK(function(){return IR(z,Q,X,J)})}function OX(z,Q,X){return{instance:z,listener:Q,currentTarget:X}}function TR(z,Q,X,Z,Y,J){var q=Q!==null?Q+"Capture":null,G=Z?q:Q,K=[],_=z,O=null;while(_!==null){var v=_,A=v.stateNode,D=v.tag;if(D===w&&A!==null){if(O=A,G!==null){var y=mQ(_,G);if(y!=null)K.push(OX(_,y,O))}}if(Y)break;_=_.return}return K}function s8(z,Q){var X=Q+"Capture",Z=[],Y=z;while(Y!==null){var J=Y,q=J.stateNode,G=J.tag;if(G===w&&q!==null){var K=q,_=mQ(Y,X);if(_!=null)Z.unshift(OX(Y,_,K));var O=mQ(Y,Q);if(O!=null)Z.push(OX(Y,O,K))}Y=Y.return}return Z}function cz(z){if(z===null)return null;do z=z.return;while(z&&z.tag!==w);if(z)return z;return null}function SR(z,Q){var X=z,Z=Q,Y=0;for(var J=X;J;J=cz(J))Y++;var q=0;for(var G=Z;G;G=cz(G))q++;while(Y-q>0)X=cz(X),Y--;while(q-Y>0)Z=cz(Z),q--;var K=Y;while(K--){if(X===Z||Z!==null&&X===Z.alternate)return X;X=cz(X),Z=cz(Z)}return null}function lU(z,Q,X,Z,Y){var J=Q._reactName,q=[],G=X;while(G!==null){if(G===Z)break;var K=G,_=K.alternate,O=K.stateNode,v=K.tag;if(_!==null&&_===Z)break;if(v===w&&O!==null){var A=O;if(Y){var D=mQ(G,J);if(D!=null)q.unshift(OX(G,D,A))}else if(!Y){var y=mQ(G,J);if(y!=null)q.push(OX(G,y,A))}}G=G.return}if(q.length!==0)z.push({event:Q,listeners:q})}function VR(z,Q,X,Z,Y){var J=Z&&Y?SR(Z,Y):null;if(Z!==null)lU(z,Q,Z,J,!1);if(Y!==null&&X!==null)lU(z,X,Y,J,!0)}function CR(z,Q){return z+"__"+(Q?"capture":"bubble")}var L6=!1,LX="dangerouslySetInnerHTML",e8="suppressContentEditableWarning",H7="suppressHydrationWarning",iU="autoFocus",a7="children",r7="style",zZ="__html",F$,QZ,WX,oU,XZ,aU,rU;F$={dialog:!0,webview:!0},QZ=function(z,Q){_3(z,Q),O3(z,Q),N3(z,Q,{registrationNameDependencies:s1,possibleRegistrationNames:o1})},aU=y0&&!document.documentMode,WX=function(z,Q,X){if(L6)return;var Z=ZZ(X),Y=ZZ(Q);if(Y===Z)return;L6=!0,H("Prop `%s` did not match. Server: %s Client: %s",z,JSON.stringify(Y),JSON.stringify(Z))},oU=function(z){if(L6)return;L6=!0;var Q=[];z.forEach(function(X){Q.push(X)}),H("Extra attributes from the server: %s",Q)},XZ=function(z,Q){if(Q===!1)H("Expected `%s` listener to be a function, instead got `false`.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.",z,z,z);else H("Expected `%s` listener to be a function, instead got a value of `%s` type.",z,typeof Q)},rU=function(z,Q){var X=z.namespaceURI===I5?z.ownerDocument.createElement(z.tagName):z.ownerDocument.createElementNS(z.namespaceURI,z.tagName);return X.innerHTML=Q,X.innerHTML};var DR=/\r\n?/g,yR=/\u0000|\uFFFD/g;function ZZ(z){Fz(z);var Q=typeof z==="string"?z:""+z;return Q.replace(DR,`
|
|
10
|
+
`).replace(yR,"")}function YZ(z,Q,X,Z){var Y=ZZ(Q),J=ZZ(z);if(J===Y)return;if(Z){if(!L6)L6=!0,H('Text content did not match. Server: "%s" Client: "%s"',J,Y)}if(X&&b1)throw Error("Text content does not match server-rendered HTML.")}function nU(z){return z.nodeType===S5?z:z.ownerDocument}function fR(){}function JZ(z){z.onclick=fR}function ER(z,Q,X,Z,Y){for(var J in Z){if(!Z.hasOwnProperty(J))continue;var q=Z[J];if(J===r7){if(q)Object.freeze(q);_K(Q,q)}else if(J===LX){var G=q?q[zZ]:void 0;if(G!=null)GK(Q,G)}else if(J===a7){if(typeof q==="string"){var K=z!=="textarea"||q!=="";if(K)k8(Q,q)}else if(typeof q==="number")k8(Q,""+q)}else if(J===e8||J===H7);else if(J===iU);else if(s1.hasOwnProperty(J)){if(q!=null){if(typeof q!=="function")XZ(J,q);if(J==="onScroll")g1("scroll",Q)}}else if(q!=null)G1(Q,J,q,Y)}}function hR(z,Q,X,Z){for(var Y=0;Y<Q.length;Y+=2){var J=Q[Y],q=Q[Y+1];if(J===r7)_K(z,q);else if(J===LX)GK(z,q);else if(J===a7)k8(z,q);else G1(z,J,q,Z)}}function pR(z,Q,X,Z){var Y,J=nU(X),q,G=Z;if(G===I5)G=JJ(z);if(G===I5){if(Y=h7(z,Q),!Y&&z!==z.toLowerCase())H("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",z);if(z==="script"){var K=J.createElement("div");K.innerHTML="<script></script>";var _=K.firstChild;q=K.removeChild(_)}else if(typeof Q.is==="string")q=J.createElement(z,{is:Q.is});else if(q=J.createElement(z),z==="select"){var O=q;if(Q.multiple)O.multiple=!0;else if(Q.size)O.size=Q.size}}else q=J.createElementNS(G,z);if(G===I5){if(!Y&&Object.prototype.toString.call(q)==="[object HTMLUnknownElement]"&&!O1.call(F$,z))F$[z]=!0,H("The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.",z)}return q}function mR(z,Q){return nU(Q).createTextNode(z)}function uR(z,Q,X,Z){var Y=h7(Q,X);QZ(Q,X);var J;switch(Q){case"dialog":g1("cancel",z),g1("close",z),J=X;break;case"iframe":case"object":case"embed":g1("load",z),J=X;break;case"video":case"audio":for(var q=0;q<BX.length;q++)g1(BX[q],z);J=X;break;case"source":g1("error",z),J=X;break;case"img":case"image":case"link":g1("error",z),g1("load",z),J=X;break;case"details":g1("toggle",z),J=X;break;case"input":oH(z,X),J=eY(z,X),g1("invalid",z);break;case"option":eH(z,X),J=X;break;case"select":ZK(z,X),J=XJ(z,X),g1("invalid",z);break;case"textarea":JK(z,X),J=ZJ(z,X),g1("invalid",z);break;default:J=X}switch(KJ(Q,J),ER(Q,z,Z,J,Y),Q){case"input":w8(z),rH(z,X,!1);break;case"textarea":w8(z),qK(z);break;case"option":DL(z,X);break;case"select":EL(z,X);break;default:if(typeof J.onClick==="function")JZ(z);break}}function jR(z,Q,X,Z,Y){QZ(Q,Z);var J=null,q,G;switch(Q){case"input":q=eY(z,X),G=eY(z,Z),J=[];break;case"select":q=XJ(z,X),G=XJ(z,Z),J=[];break;case"textarea":q=ZJ(z,X),G=ZJ(z,Z),J=[];break;default:if(q=X,G=Z,typeof q.onClick!=="function"&&typeof G.onClick==="function")JZ(z);break}KJ(Q,G);var K,_,O=null;for(K in q){if(G.hasOwnProperty(K)||!q.hasOwnProperty(K)||q[K]==null)continue;if(K===r7){var v=q[K];for(_ in v)if(v.hasOwnProperty(_)){if(!O)O={};O[_]=""}}else if(K===LX||K===a7);else if(K===e8||K===H7);else if(K===iU);else if(s1.hasOwnProperty(K)){if(!J)J=[]}else(J=J||[]).push(K,null)}for(K in G){var A=G[K],D=q!=null?q[K]:void 0;if(!G.hasOwnProperty(K)||A===D||A==null&&D==null)continue;if(K===r7){if(A)Object.freeze(A);if(D){for(_ in D)if(D.hasOwnProperty(_)&&(!A||!A.hasOwnProperty(_))){if(!O)O={};O[_]=""}for(_ in A)if(A.hasOwnProperty(_)&&D[_]!==A[_]){if(!O)O={};O[_]=A[_]}}else{if(!O){if(!J)J=[];J.push(K,O)}O=A}}else if(K===LX){var y=A?A[zZ]:void 0,h=D?D[zZ]:void 0;if(y!=null){if(h!==y)(J=J||[]).push(K,y)}}else if(K===a7){if(typeof A==="string"||typeof A==="number")(J=J||[]).push(K,""+A)}else if(K===e8||K===H7);else if(s1.hasOwnProperty(K)){if(A!=null){if(typeof A!=="function")XZ(K,A);if(K==="onScroll")g1("scroll",z)}if(!J&&D!==A)J=[]}else(J=J||[]).push(K,A)}if(O)J3(O,G[r7]),(J=J||[]).push(r7,O);return J}function gR(z,Q,X,Z,Y){if(X==="input"&&Y.type==="radio"&&Y.name!=null)aH(z,Y);var J=h7(X,Z),q=h7(X,Y);switch(hR(z,Q,J,q),X){case"input":zJ(z,Y);break;case"textarea":$K(z,Y);break;case"select":hL(z,Y);break}}function xR(z){{var Q=z.toLowerCase();if(!I8.hasOwnProperty(Q))return null;return I8[Q]||null}}function cR(z,Q,X,Z,Y,J,q){var G,K;switch(G=h7(Q,X),QZ(Q,X),Q){case"dialog":g1("cancel",z),g1("close",z);break;case"iframe":case"object":case"embed":g1("load",z);break;case"video":case"audio":for(var _=0;_<BX.length;_++)g1(BX[_],z);break;case"source":g1("error",z);break;case"img":case"image":case"link":g1("error",z),g1("load",z);break;case"details":g1("toggle",z);break;case"input":oH(z,X),g1("invalid",z);break;case"option":eH(z,X);break;case"select":ZK(z,X),g1("invalid",z);break;case"textarea":JK(z,X),g1("invalid",z);break}KJ(Q,X);{K=new Set;var O=z.attributes;for(var v=0;v<O.length;v++){var A=O[v].name.toLowerCase();switch(A){case"value":break;case"checked":break;case"selected":break;default:K.add(O[v].name)}}}var D=null;for(var y in X){if(!X.hasOwnProperty(y))continue;var h=X[y];if(y===a7){if(typeof h==="string"){if(z.textContent!==h){if(X[H7]!==!0)YZ(z.textContent,h,J,q);D=[a7,h]}}else if(typeof h==="number"){if(z.textContent!==""+h){if(X[H7]!==!0)YZ(z.textContent,h,J,q);D=[a7,""+h]}}}else if(s1.hasOwnProperty(y)){if(h!=null){if(typeof h!=="function")XZ(y,h);if(y==="onScroll")g1("scroll",z)}}else if(q&&!0&&typeof G==="boolean"){var Y0=void 0,w0=G&&p0?null:e4(y);if(X[H7]===!0);else if(y===e8||y===H7||y==="value"||y==="checked"||y==="selected");else if(y===LX){var R0=z.innerHTML,n0=h?h[zZ]:void 0;if(n0!=null){var t0=rU(z,n0);if(t0!==R0)WX(y,R0,t0)}}else if(y===r7){if(K.delete(y),aU){var S=Z3(h);if(Y0=z.getAttribute("style"),S!==Y0)WX(y,Y0,S)}}else if(G&&!p0){if(K.delete(y.toLowerCase()),Y0=DQ(z,y,h),h!==Y0)WX(y,Y0,h)}else if(!D1(y,w0,G)&&!c1(y,h,w0,G)){var m=!1;if(w0!==null)K.delete(w0.attributeName),Y0=f7(z,y,h,w0);else{var V=Z;if(V===I5)V=JJ(Q);if(V===I5)K.delete(y.toLowerCase());else{var n=xR(y);if(n!==null&&n!==y)m=!0,K.delete(n);K.delete(y)}Y0=DQ(z,y,h)}var H0=p0;if(!H0&&h!==Y0&&!m)WX(y,Y0,h)}}}if(q){if(K.size>0&&X[H7]!==!0)oU(K)}switch(Q){case"input":w8(z),rH(z,X,!0);break;case"textarea":w8(z),qK(z);break;case"select":case"option":break;default:if(typeof X.onClick==="function")JZ(z);break}return D}function dR(z,Q,X){var Z=z.nodeValue!==Q;return Z}function P$(z,Q){{if(L6)return;L6=!0,H("Did not expect server HTML to contain a <%s> in <%s>.",Q.nodeName.toLowerCase(),z.nodeName.toLowerCase())}}function M$(z,Q){{if(L6)return;L6=!0,H('Did not expect server HTML to contain the text node "%s" in <%s>.',Q.nodeValue,z.nodeName.toLowerCase())}}function w$(z,Q,X){{if(L6)return;L6=!0,H("Expected server HTML to contain a matching <%s> in <%s>.",Q,z.nodeName.toLowerCase())}}function A$(z,Q){{if(Q==="")return;if(L6)return;L6=!0,H('Expected server HTML to contain a matching text node for "%s" in <%s>.',Q,z.nodeName.toLowerCase())}}function lR(z,Q,X){switch(Q){case"input":VL(z,X);return;case"textarea":mL(z,X);return;case"select":pL(z,X);return}}var bX=function(){},RX=function(){};{var iR=["address","applet","area","article","aside","base","basefont","bgsound","blockquote","body","br","button","caption","center","col","colgroup","dd","details","dir","div","dl","dt","embed","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","img","input","isindex","li","link","listing","main","marquee","menu","menuitem","meta","nav","noembed","noframes","noscript","object","ol","p","param","plaintext","pre","script","section","select","source","style","summary","table","tbody","td","template","textarea","tfoot","th","thead","title","tr","track","ul","wbr","xmp"],tU=["applet","caption","html","table","td","th","marquee","object","template","foreignObject","desc","title"],oR=tU.concat(["button"]),aR=["dd","dt","li","option","optgroup","p","rp","rt"],sU={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null};RX=function(z,Q){var X=o0({},z||sU),Z={tag:Q};if(tU.indexOf(Q)!==-1)X.aTagInScope=null,X.buttonTagInScope=null,X.nobrTagInScope=null;if(oR.indexOf(Q)!==-1)X.pTagInButtonScope=null;if(iR.indexOf(Q)!==-1&&Q!=="address"&&Q!=="div"&&Q!=="p")X.listItemTagAutoclosing=null,X.dlItemTagAutoclosing=null;if(X.current=Z,Q==="form")X.formTag=Z;if(Q==="a")X.aTagInScope=Z;if(Q==="button")X.buttonTagInScope=Z;if(Q==="nobr")X.nobrTagInScope=Z;if(Q==="p")X.pTagInButtonScope=Z;if(Q==="li")X.listItemTagAutoclosing=Z;if(Q==="dd"||Q==="dt")X.dlItemTagAutoclosing=Z;return X};var rR=function(z,Q){switch(Q){case"select":return z==="option"||z==="optgroup"||z==="#text";case"optgroup":return z==="option"||z==="#text";case"option":return z==="#text";case"tr":return z==="th"||z==="td"||z==="style"||z==="script"||z==="template";case"tbody":case"thead":case"tfoot":return z==="tr"||z==="style"||z==="script"||z==="template";case"colgroup":return z==="col"||z==="template";case"table":return z==="caption"||z==="colgroup"||z==="tbody"||z==="tfoot"||z==="thead"||z==="style"||z==="script"||z==="template";case"head":return z==="base"||z==="basefont"||z==="bgsound"||z==="link"||z==="meta"||z==="title"||z==="noscript"||z==="noframes"||z==="style"||z==="script"||z==="template";case"html":return z==="head"||z==="body"||z==="frameset";case"frameset":return z==="frame";case"#document":return z==="html"}switch(z){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return Q!=="h1"&&Q!=="h2"&&Q!=="h3"&&Q!=="h4"&&Q!=="h5"&&Q!=="h6";case"rp":case"rt":return aR.indexOf(Q)===-1;case"body":case"caption":case"col":case"colgroup":case"frameset":case"frame":case"head":case"html":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return Q==null}return!0},nR=function(z,Q){switch(z){case"address":case"article":case"aside":case"blockquote":case"center":case"details":case"dialog":case"dir":case"div":case"dl":case"fieldset":case"figcaption":case"figure":case"footer":case"header":case"hgroup":case"main":case"menu":case"nav":case"ol":case"p":case"section":case"summary":case"ul":case"pre":case"listing":case"table":case"hr":case"xmp":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return Q.pTagInButtonScope;case"form":return Q.formTag||Q.pTagInButtonScope;case"li":return Q.listItemTagAutoclosing;case"dd":case"dt":return Q.dlItemTagAutoclosing;case"button":return Q.buttonTagInScope;case"a":return Q.aTagInScope;case"nobr":return Q.nobrTagInScope}return null},eU={};bX=function(z,Q,X){X=X||sU;var Z=X.current,Y=Z&&Z.tag;if(Q!=null){if(z!=null)H("validateDOMNesting: when childText is passed, childTag should be null");z="#text"}var J=rR(z,Y)?null:Z,q=J?null:nR(z,X),G=J||q;if(!G)return;var K=G.tag,_=!!J+"|"+z+"|"+K;if(eU[_])return;eU[_]=!0;var O=z,v="";if(z==="#text")if(/\S/.test(Q))O="Text nodes";else O="Whitespace text nodes",v=" Make sure you don't have any extra whitespace between tags on each line of your source code.";else O="<"+z+">";if(J){var A="";if(K==="table"&&z==="tr")A+=" Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by the browser.";H("validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s",O,K,v,A)}else H("validateDOMNesting(...): %s cannot appear as a descendant of <%s>.",O,K)}}var $Z="suppressHydrationWarning",qZ="$",GZ="/$",NX="$?",FX="$!",tR="style",v$=null,k$=null;function sR(z){var Q,X,Z=z.nodeType;switch(Z){case S5:case qJ:{Q=Z===S5?"#document":"#fragment";var Y=z.documentElement;X=Y?Y.namespaceURI:$J(null,"");break}default:{var J=Z===U4?z.parentNode:z,q=J.namespaceURI||null;Q=J.tagName,X=$J(q,Q);break}}{var G=Q.toLowerCase(),K=RX(null,G);return{namespace:X,ancestorInfo:K}}}function eR(z,Q,X){{var Z=z,Y=$J(Z.namespace,Q),J=RX(Z.ancestorInfo,Q);return{namespace:Y,ancestorInfo:J}}}function I$(z){return z}function zN(z){v$=tW(),k$=OR();var Q=null;return qU(!1),Q}function QN(z){LR(k$),qU(v$),v$=null,k$=null}function XN(z,Q,X,Z,Y){var J;{var q=Z;if(bX(z,null,q.ancestorInfo),typeof Q.children==="string"||typeof Q.children==="number"){var G=""+Q.children,K=RX(q.ancestorInfo,z);bX(null,G,K)}J=q.namespace}var _=pR(z,Q,X,J);return wX(Y,_),E$(_,Q),_}function ZN(z,Q){z.appendChild(Q)}function YN(z,Q,X,Z,Y){switch(uR(z,Q,X,Z),Q){case"button":case"input":case"select":case"textarea":return!!X.autoFocus;case"img":return!0;default:return!1}}function JN(z,Q,X,Z,Y,J){{var q=J;if(typeof Z.children!==typeof X.children&&(typeof Z.children==="string"||typeof Z.children==="number")){var G=""+Z.children,K=RX(q.ancestorInfo,Q);bX(null,G,K)}}return jR(z,Q,X,Z)}function T$(z,Q){return z==="textarea"||z==="noscript"||typeof Q.children==="string"||typeof Q.children==="number"||typeof Q.dangerouslySetInnerHTML==="object"&&Q.dangerouslySetInnerHTML!==null&&Q.dangerouslySetInnerHTML.__html!=null}function $N(z,Q,X,Z){{var Y=X;bX(null,z,Y.ancestorInfo)}var J=mR(z,Q);return wX(Z,J),J}function qN(){var z=window.event;if(z===void 0)return h5;return GU(z.type)}var S$=typeof setTimeout==="function"?setTimeout:void 0,GN=typeof clearTimeout==="function"?clearTimeout:void 0,V$=-1,zB=typeof Promise==="function"?Promise:void 0,HN=typeof queueMicrotask==="function"?queueMicrotask:typeof zB<"u"?function(z){return zB.resolve(null).then(z).catch(KN)}:S$;function KN(z){setTimeout(function(){throw z})}function UN(z,Q,X,Z){switch(Q){case"button":case"input":case"select":case"textarea":if(X.autoFocus)z.focus();return;case"img":{if(X.src)z.src=X.src;return}}}function BN(z,Q,X,Z,Y,J){gR(z,Q,X,Z,Y),E$(z,Y)}function QB(z){k8(z,"")}function _N(z,Q,X){z.nodeValue=X}function ON(z,Q){z.appendChild(Q)}function LN(z,Q){var X;if(z.nodeType===U4)X=z.parentNode,X.insertBefore(Q,z);else X=z,X.appendChild(Q);var Z=z._reactRootContainer;if((Z===null||Z===void 0)&&X.onclick===null)JZ(X)}function WN(z,Q,X){z.insertBefore(Q,X)}function bN(z,Q,X){if(z.nodeType===U4)z.parentNode.insertBefore(Q,X);else z.insertBefore(Q,X)}function RN(z,Q){z.removeChild(Q)}function NN(z,Q){if(z.nodeType===U4)z.parentNode.removeChild(Q);else z.removeChild(Q)}function C$(z,Q){var X=Q,Z=0;do{var Y=X.nextSibling;if(z.removeChild(X),Y&&Y.nodeType===U4){var J=Y.data;if(J===GZ)if(Z===0){z.removeChild(Y),XX(Q);return}else Z--;else if(J===qZ||J===NX||J===FX)Z++}X=Y}while(X);XX(Q)}function FN(z,Q){if(z.nodeType===U4)C$(z.parentNode,Q);else if(z.nodeType===O6)C$(z,Q);XX(z)}function PN(z){z=z;var Q=z.style;if(typeof Q.setProperty==="function")Q.setProperty("display","none","important");else Q.display="none"}function MN(z){z.nodeValue=""}function wN(z,Q){z=z;var X=Q[tR],Z=X!==void 0&&X!==null&&X.hasOwnProperty("display")?X.display:null;z.style.display=GJ("display",Z)}function AN(z,Q){z.nodeValue=Q}function vN(z){if(z.nodeType===O6)z.textContent="";else if(z.nodeType===S5){if(z.documentElement)z.removeChild(z.documentElement)}}function kN(z,Q,X){if(z.nodeType!==O6||Q.toLowerCase()!==z.nodeName.toLowerCase())return null;return z}function IN(z,Q){if(Q===""||z.nodeType!==T5)return null;return z}function TN(z){if(z.nodeType!==U4)return null;return z}function XB(z){return z.data===NX}function D$(z){return z.data===FX}function SN(z){var Q=z.nextSibling&&z.nextSibling.dataset,X,Z,Y;if(Q)X=Q.dgst,Z=Q.msg,Y=Q.stck;return{message:Z,digest:X,stack:Y}}function VN(z,Q){z._reactRetry=Q}function HZ(z){for(;z!=null;z=z.nextSibling){var Q=z.nodeType;if(Q===O6||Q===T5)break;if(Q===U4){var X=z.data;if(X===qZ||X===FX||X===NX)break;if(X===GZ)return null}}return z}function PX(z){return HZ(z.nextSibling)}function CN(z){return HZ(z.firstChild)}function DN(z){return HZ(z.firstChild)}function yN(z){return HZ(z.nextSibling)}function fN(z,Q,X,Z,Y,J,q){wX(J,z),E$(z,X);var G;{var K=Y;G=K.namespace}var _=(J.mode&s0)!==T0;return cR(z,Q,X,G,Z,_,q)}function EN(z,Q,X,Z){wX(X,z);var Y=(X.mode&s0)!==T0;return dR(z,Q)}function hN(z,Q){wX(Q,z)}function pN(z){var Q=z.nextSibling,X=0;while(Q){if(Q.nodeType===U4){var Z=Q.data;if(Z===GZ)if(X===0)return PX(Q);else X--;else if(Z===qZ||Z===FX||Z===NX)X++}Q=Q.nextSibling}return null}function ZB(z){var Q=z.previousSibling,X=0;while(Q){if(Q.nodeType===U4){var Z=Q.data;if(Z===qZ||Z===FX||Z===NX)if(X===0)return Q;else X--;else if(Z===GZ)X++}Q=Q.previousSibling}return null}function mN(z){XX(z)}function uN(z){XX(z)}function jN(z){return z!=="head"&&z!=="body"}function gN(z,Q,X,Z){var Y=!0;YZ(Q.nodeValue,X,Z,Y)}function xN(z,Q,X,Z,Y,J){if(Q[$Z]!==!0){var q=!0;YZ(Z.nodeValue,Y,J,q)}}function cN(z,Q){if(Q.nodeType===O6)P$(z,Q);else if(Q.nodeType===U4);else M$(z,Q)}function dN(z,Q){{var X=z.parentNode;if(X!==null)if(Q.nodeType===O6)P$(X,Q);else if(Q.nodeType===U4);else M$(X,Q)}}function lN(z,Q,X,Z,Y){if(Y||Q[$Z]!==!0)if(Z.nodeType===O6)P$(X,Z);else if(Z.nodeType===U4);else M$(X,Z)}function iN(z,Q,X){w$(z,Q)}function oN(z,Q){A$(z,Q)}function aN(z,Q,X){{var Z=z.parentNode;if(Z!==null)w$(Z,Q)}}function rN(z,Q){{var X=z.parentNode;if(X!==null)A$(X,Q)}}function nN(z,Q,X,Z,Y,J){if(J||Q[$Z]!==!0)w$(X,Z)}function tN(z,Q,X,Z,Y){if(Y||Q[$Z]!==!0)A$(X,Z)}function sN(z){H("An error occurred during hydration. The server HTML was replaced with client content in <%s>.",z.nodeName.toLowerCase())}function eN(z){_X(z)}var dz=Math.random().toString(36).slice(2),lz="__reactFiber$"+dz,y$="__reactProps$"+dz,MX="__reactContainer$"+dz,f$="__reactEvents$"+dz,zF="__reactListeners$"+dz,QF="__reactHandles$"+dz;function XF(z){delete z[lz],delete z[y$],delete z[f$],delete z[zF],delete z[QF]}function wX(z,Q){Q[lz]=z}function KZ(z,Q){Q[MX]=z}function YB(z){z[MX]=null}function AX(z){return!!z[MX]}function n7(z){var Q=z[lz];if(Q)return Q;var X=z.parentNode;while(X){if(Q=X[MX]||X[lz],Q){var Z=Q.alternate;if(Q.child!==null||Z!==null&&Z.child!==null){var Y=ZB(z);while(Y!==null){var J=Y[lz];if(J)return J;Y=ZB(Y)}}return Q}z=X,X=z.parentNode}return null}function K7(z){var Q=z[lz]||z[MX];if(Q)if(Q.tag===w||Q.tag===M||Q.tag===l||Q.tag===k)return Q;else return null;return null}function iz(z){if(z.tag===w||z.tag===M)return z.stateNode;throw Error("getNodeFromInstance: Invalid argument.")}function UZ(z){return z[y$]||null}function E$(z,Q){z[y$]=Q}function ZF(z){var Q=z[f$];if(Q===void 0)Q=z[f$]=new Set;return Q}var JB={},$B=$.ReactDebugCurrentFrame;function BZ(z){if(z){var Q=z._owner,X=tY(z.type,z._source,Q?Q.type:null);$B.setExtraStackFrame(X)}else $B.setExtraStackFrame(null)}function o6(z,Q,X,Z,Y){{var J=Function.call.bind(O1);for(var q in z)if(J(z,q)){var G=void 0;try{if(typeof z[q]!=="function"){var K=Error((Z||"React class")+": "+X+" type `"+q+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof z[q]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw K.name="Invariant Violation",K}G=z[q](Q,q,Z,X,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(_){G=_}if(G&&!(G instanceof Error))BZ(Y),H("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",Z||"React class",X,q,typeof G),BZ(null);if(G instanceof Error&&!(G.message in JB))JB[G.message]=!0,BZ(Y),H("Failed %s type: %s",X,G.message),BZ(null)}}}var h$=[],_Z;_Z=[];var p5=-1;function U7(z){return{current:z}}function d4(z,Q){if(p5<0){H("Unexpected pop.");return}if(Q!==_Z[p5])H("Unexpected Fiber popped.");z.current=h$[p5],h$[p5]=null,_Z[p5]=null,p5--}function l4(z,Q,X){p5++,h$[p5]=z.current,_Z[p5]=X,z.current=Q}var qB={},I6={};Object.freeze(I6);var m5=U7(I6),B5=U7(!1),p$=I6;function oz(z,Q,X){{if(X&&_5(Q))return p$;return m5.current}}function GB(z,Q,X){{var Z=z.stateNode;Z.__reactInternalMemoizedUnmaskedChildContext=Q,Z.__reactInternalMemoizedMaskedChildContext=X}}function az(z,Q){{var X=z.type,Z=X.contextTypes;if(!Z)return I6;var Y=z.stateNode;if(Y&&Y.__reactInternalMemoizedUnmaskedChildContext===Q)return Y.__reactInternalMemoizedMaskedChildContext;var J={};for(var q in Z)J[q]=Q[q];{var G=d0(z)||"Unknown";o6(Z,J,"context",G)}if(Y)GB(z,Q,J);return J}}function OZ(){return B5.current}function _5(z){{var Q=z.childContextTypes;return Q!==null&&Q!==void 0}}function LZ(z){d4(B5,z),d4(m5,z)}function m$(z){d4(B5,z),d4(m5,z)}function HB(z,Q,X){{if(m5.current!==I6)throw Error("Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.");l4(m5,Q,z),l4(B5,X,z)}}function KB(z,Q,X){{var Z=z.stateNode,Y=Q.childContextTypes;if(typeof Z.getChildContext!=="function"){{var J=d0(z)||"Unknown";if(!qB[J])qB[J]=!0,H("%s.childContextTypes is specified but there is no getChildContext() method on the instance. You can either define getChildContext() on %s or remove childContextTypes from it.",J,J)}return X}var q=Z.getChildContext();for(var G in q)if(!(G in Y))throw Error((d0(z)||"Unknown")+'.getChildContext(): key "'+G+'" is not defined in childContextTypes.');{var K=d0(z)||"Unknown";o6(Y,q,"child context",K)}return o0({},X,q)}}function WZ(z){{var Q=z.stateNode,X=Q&&Q.__reactInternalMemoizedMergedChildContext||I6;return p$=m5.current,l4(m5,X,z),l4(B5,B5.current,z),!0}}function UB(z,Q,X){{var Z=z.stateNode;if(!Z)throw Error("Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue.");if(X){var Y=KB(z,Q,p$);Z.__reactInternalMemoizedMergedChildContext=Y,d4(B5,z),d4(m5,z),l4(m5,Y,z),l4(B5,X,z)}else d4(B5,z),l4(B5,X,z)}}function YF(z){{if(!j3(z)||z.tag!==b)throw Error("Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.");var Q=z;do{switch(Q.tag){case k:return Q.stateNode.context;case b:{var X=Q.type;if(_5(X))return Q.stateNode.__reactInternalMemoizedMergedChildContext;break}}Q=Q.return}while(Q!==null);throw Error("Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.")}}var B7=0,bZ=1,u5=null,u$=!1,j$=!1;function BB(z){if(u5===null)u5=[z];else u5.push(z)}function JF(z){u$=!0,BB(z)}function _B(){if(u$)_7()}function _7(){if(!j$&&u5!==null){j$=!0;var z=0,Q=i6();try{var X=!0,Z=u5;S4(A6);for(;z<Z.length;z++){var Y=Z[z];do Y=Y(X);while(Y!==null)}u5=null,u$=!1}catch(J){if(u5!==null)u5=u5.slice(z+1);throw hK(D8,_7),J}finally{S4(Q),j$=!1}}return null}var rz=[],nz=0,RZ=null,NZ=0,y6=[],f6=0,t7=null,j5=1,g5="";function $F(z){return e7(),(z.flags&TK)!==V0}function qF(z){return e7(),NZ}function GF(){var z=g5,Q=j5,X=Q&~HF(Q);return X.toString(32)+z}function s7(z,Q){e7(),rz[nz++]=NZ,rz[nz++]=RZ,RZ=z,NZ=Q}function OB(z,Q,X){e7(),y6[f6++]=j5,y6[f6++]=g5,y6[f6++]=t7,t7=z;var Z=j5,Y=g5,J=FZ(Z)-1,q=Z&~(1<<J),G=X+1,K=FZ(Q)+J;if(K>30){var _=J-J%5,O=(1<<_)-1,v=(q&O).toString(32),A=q>>_,D=J-_,y=FZ(Q)+D,h=G<<D,Y0=h|A,w0=v+Y;j5=1<<y|Y0,g5=w0}else{var R0=G<<J,n0=R0|q,t0=Y;j5=1<<K|n0,g5=t0}}function g$(z){e7();var Q=z.return;if(Q!==null){var X=1,Z=0;s7(z,X),OB(z,X,Z)}}function FZ(z){return 32-xK(z)}function HF(z){return 1<<FZ(z)-1}function x$(z){while(z===RZ)RZ=rz[--nz],rz[nz]=null,NZ=rz[--nz],rz[nz]=null;while(z===t7)t7=y6[--f6],y6[f6]=null,g5=y6[--f6],y6[f6]=null,j5=y6[--f6],y6[f6]=null}function KF(){if(e7(),t7!==null)return{id:j5,overflow:g5};else return null}function UF(z,Q){e7(),y6[f6++]=j5,y6[f6++]=g5,y6[f6++]=t7,j5=Q.id,g5=Q.overflow,t7=z}function e7(){if(!f4())H("Expected to be hydrating. This is a bug in React. Please file an issue.")}var y4=null,E6=null,a6=!1,zz=!1,O7=null;function BF(){if(a6)H("We should not be hydrating here. This is a bug in React. Please file a bug.")}function LB(){zz=!0}function _F(){return zz}function OF(z){var Q=z.stateNode.containerInfo;return E6=DN(Q),y4=z,a6=!0,O7=null,zz=!1,!0}function LF(z,Q,X){if(E6=yN(Q),y4=z,a6=!0,O7=null,zz=!1,X!==null)UF(z,X);return!0}function WB(z,Q){switch(z.tag){case k:{cN(z.stateNode.containerInfo,Q);break}case w:{var X=(z.mode&s0)!==T0;lN(z.type,z.memoizedProps,z.stateNode,Q,X);break}case l:{var Z=z.memoizedState;if(Z.dehydrated!==null)dN(Z.dehydrated,Q);break}}}function bB(z,Q){WB(z,Q);var X=ww();X.stateNode=Q,X.return=z;var Z=z.deletions;if(Z===null)z.deletions=[X],z.flags|=p7;else Z.push(X)}function c$(z,Q){{if(zz)return;switch(z.tag){case k:{var X=z.stateNode.containerInfo;switch(Q.tag){case w:var{type:Z,pendingProps:Y}=Q;iN(X,Z);break;case M:var J=Q.pendingProps;oN(X,J);break}break}case w:{var{type:q,memoizedProps:G,stateNode:K}=z;switch(Q.tag){case w:{var{type:_,pendingProps:O}=Q,v=(z.mode&s0)!==T0;nN(q,G,K,_,O,v);break}case M:{var A=Q.pendingProps,D=(z.mode&s0)!==T0;tN(q,G,K,A,D);break}}break}case l:{var y=z.memoizedState,h=y.dehydrated;if(h!==null)switch(Q.tag){case w:var{type:Y0,pendingProps:w0}=Q;aN(h,Y0);break;case M:var R0=Q.pendingProps;rN(h,R0);break}break}default:return}}}function RB(z,Q){Q.flags=Q.flags&~C5|B4,c$(z,Q)}function NB(z,Q){switch(z.tag){case w:{var{type:X,pendingProps:Z}=z,Y=kN(Q,X);if(Y!==null)return z.stateNode=Y,y4=z,E6=CN(Y),!0;return!1}case M:{var J=z.pendingProps,q=IN(Q,J);if(q!==null)return z.stateNode=q,y4=z,E6=null,!0;return!1}case l:{var G=TN(Q);if(G!==null){var K={dehydrated:G,treeContext:KF(),retryLane:M6};z.memoizedState=K;var _=Aw(G);return _.return=z,z.child=_,y4=z,E6=null,!0}return!1}default:return!1}}function d$(z){return(z.mode&s0)!==T0&&(z.flags&H1)===V0}function l$(z){throw Error("Hydration failed because the initial UI does not match what was rendered on the server.")}function i$(z){if(!a6)return;var Q=E6;if(!Q){if(d$(z))c$(y4,z),l$();RB(y4,z),a6=!1,y4=z;return}var X=Q;if(!NB(z,Q)){if(d$(z))c$(y4,z),l$();Q=PX(X);var Z=y4;if(!Q||!NB(z,Q)){RB(y4,z),a6=!1,y4=z;return}bB(Z,X)}}function WF(z,Q,X){var Z=z.stateNode,Y=!zz,J=fN(Z,z.type,z.memoizedProps,Q,X,z,Y);if(z.updateQueue=J,J!==null)return!0;return!1}function bF(z){var{stateNode:Q,memoizedProps:X}=z,Z=EN(Q,X,z);if(Z){var Y=y4;if(Y!==null)switch(Y.tag){case k:{var J=Y.stateNode.containerInfo,q=(Y.mode&s0)!==T0;gN(J,Q,X,q);break}case w:{var{type:G,memoizedProps:K,stateNode:_}=Y,O=(Y.mode&s0)!==T0;xN(G,K,_,Q,X,O);break}}}return Z}function RF(z){var Q=z.memoizedState,X=Q!==null?Q.dehydrated:null;if(!X)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");hN(X,z)}function NF(z){var Q=z.memoizedState,X=Q!==null?Q.dehydrated:null;if(!X)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");return pN(X)}function FB(z){var Q=z.return;while(Q!==null&&Q.tag!==w&&Q.tag!==k&&Q.tag!==l)Q=Q.return;y4=Q}function PZ(z){if(z!==y4)return!1;if(!a6)return FB(z),a6=!0,!1;if(z.tag!==k&&(z.tag!==w||jN(z.type)&&!T$(z.type,z.memoizedProps))){var Q=E6;if(Q)if(d$(z))PB(z),l$();else while(Q)bB(z,Q),Q=PX(Q)}if(FB(z),z.tag===l)E6=NF(z);else E6=y4?PX(z.stateNode):null;return!0}function FF(){return a6&&E6!==null}function PB(z){var Q=E6;while(Q)WB(z,Q),Q=PX(Q)}function tz(){y4=null,E6=null,a6=!1,zz=!1}function MB(){if(O7!==null)W_(O7),O7=null}function f4(){return a6}function o$(z){if(O7===null)O7=[z];else O7.push(z)}var PF=$.ReactCurrentBatchConfig,MF=null;function wF(){return PF.transition}var r6={recordUnsafeLifecycleWarnings:function(z,Q){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(z,Q){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}};{var AF=function(z){var Q=null,X=z;while(X!==null){if(X.mode&z4)Q=X;X=X.return}return Q},Qz=function(z){var Q=[];return z.forEach(function(X){Q.push(X)}),Q.sort().join(", ")},vX=[],kX=[],IX=[],TX=[],SX=[],VX=[],Xz=new Set;r6.recordUnsafeLifecycleWarnings=function(z,Q){if(Xz.has(z.type))return;if(typeof Q.componentWillMount==="function"&&Q.componentWillMount.__suppressDeprecationWarning!==!0)vX.push(z);if(z.mode&z4&&typeof Q.UNSAFE_componentWillMount==="function")kX.push(z);if(typeof Q.componentWillReceiveProps==="function"&&Q.componentWillReceiveProps.__suppressDeprecationWarning!==!0)IX.push(z);if(z.mode&z4&&typeof Q.UNSAFE_componentWillReceiveProps==="function")TX.push(z);if(typeof Q.componentWillUpdate==="function"&&Q.componentWillUpdate.__suppressDeprecationWarning!==!0)SX.push(z);if(z.mode&z4&&typeof Q.UNSAFE_componentWillUpdate==="function")VX.push(z)},r6.flushPendingUnsafeLifecycleWarnings=function(){var z=new Set;if(vX.length>0)vX.forEach(function(A){z.add(d0(A)||"Component"),Xz.add(A.type)}),vX=[];var Q=new Set;if(kX.length>0)kX.forEach(function(A){Q.add(d0(A)||"Component"),Xz.add(A.type)}),kX=[];var X=new Set;if(IX.length>0)IX.forEach(function(A){X.add(d0(A)||"Component"),Xz.add(A.type)}),IX=[];var Z=new Set;if(TX.length>0)TX.forEach(function(A){Z.add(d0(A)||"Component"),Xz.add(A.type)}),TX=[];var Y=new Set;if(SX.length>0)SX.forEach(function(A){Y.add(d0(A)||"Component"),Xz.add(A.type)}),SX=[];var J=new Set;if(VX.length>0)VX.forEach(function(A){J.add(d0(A)||"Component"),Xz.add(A.type)}),VX=[];if(Q.size>0){var q=Qz(Q);H(`Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.
|
|
11
|
+
|
|
12
|
+
* Move code with side effects to componentDidMount, and set initial state in the constructor.
|
|
13
|
+
|
|
14
|
+
Please update the following components: %s`,q)}if(Z.size>0){var G=Qz(Z);H(`Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.
|
|
15
|
+
|
|
16
|
+
* Move data fetching code or side effects to componentDidUpdate.
|
|
17
|
+
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state
|
|
18
|
+
|
|
19
|
+
Please update the following components: %s`,G)}if(J.size>0){var K=Qz(J);H(`Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.
|
|
20
|
+
|
|
21
|
+
* Move data fetching code or side effects to componentDidUpdate.
|
|
22
|
+
|
|
23
|
+
Please update the following components: %s`,K)}if(z.size>0){var _=Qz(z);W(`componentWillMount has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
|
|
24
|
+
|
|
25
|
+
* Move code with side effects to componentDidMount, and set initial state in the constructor.
|
|
26
|
+
* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
|
|
27
|
+
|
|
28
|
+
Please update the following components: %s`,_)}if(X.size>0){var O=Qz(X);W(`componentWillReceiveProps has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
|
|
29
|
+
|
|
30
|
+
* Move data fetching code or side effects to componentDidUpdate.
|
|
31
|
+
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state
|
|
32
|
+
* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
|
|
33
|
+
|
|
34
|
+
Please update the following components: %s`,O)}if(Y.size>0){var v=Qz(Y);W(`componentWillUpdate has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
|
|
35
|
+
|
|
36
|
+
* Move data fetching code or side effects to componentDidUpdate.
|
|
37
|
+
* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
|
|
38
|
+
|
|
39
|
+
Please update the following components: %s`,v)}};var MZ=new Map,wB=new Set;r6.recordLegacyContextWarning=function(z,Q){var X=AF(z);if(X===null){H("Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue.");return}if(wB.has(z.type))return;var Z=MZ.get(X);if(z.type.contextTypes!=null||z.type.childContextTypes!=null||Q!==null&&typeof Q.getChildContext==="function"){if(Z===void 0)Z=[],MZ.set(X,Z);Z.push(z)}},r6.flushLegacyContextWarning=function(){MZ.forEach(function(z,Q){if(z.length===0)return;var X=z[0],Z=new Set;z.forEach(function(J){Z.add(d0(J)||"Component"),wB.add(J.type)});var Y=Qz(Z);try{J4(X),H(`Legacy context API has been detected within a strict-mode tree.
|
|
40
|
+
|
|
41
|
+
The old API will be supported in all 16.x releases, but applications using it should migrate to the new version.
|
|
42
|
+
|
|
43
|
+
Please update the following components: %s
|
|
44
|
+
|
|
45
|
+
Learn more about this warning here: https://reactjs.org/link/legacy-context`,Y)}finally{z6()}})},r6.discardPendingWarnings=function(){vX=[],kX=[],IX=[],TX=[],SX=[],VX=[],MZ=new Map}}var a$,r$,n$,t$,s$,AB=function(z,Q){};a$=!1,r$=!1,n$={},t$={},s$={},AB=function(z,Q){if(z===null||typeof z!=="object")return;if(!z._store||z._store.validated||z.key!=null)return;if(typeof z._store!=="object")throw Error("React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.");z._store.validated=!0;var X=d0(Q)||"Component";if(t$[X])return;t$[X]=!0,H('Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information.')};function vF(z){return z.prototype&&z.prototype.isReactComponent}function CX(z,Q,X){var Z=X.ref;if(Z!==null&&typeof Z!=="function"&&typeof Z!=="object"){if((z.mode&z4||R1)&&!(X._owner&&X._self&&X._owner.stateNode!==X._self)&&!(X._owner&&X._owner.tag!==b)&&!(typeof X.type==="function"&&!vF(X.type))&&X._owner){var Y=d0(z)||"Component";if(!n$[Y])H('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. We recommend using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',Y,Z),n$[Y]=!0}if(X._owner){var J=X._owner,q;if(J){var G=J;if(G.tag!==b)throw Error("Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref");q=G.stateNode}if(!q)throw Error("Missing owner for string ref "+Z+". This error is likely caused by a bug in React. Please file an issue.");var K=q;g6(Z,"ref");var _=""+Z;if(Q!==null&&Q.ref!==null&&typeof Q.ref==="function"&&Q.ref._stringRef===_)return Q.ref;var O=function(v){var A=K.refs;if(v===null)delete A[_];else A[_]=v};return O._stringRef=_,O}else{if(typeof Z!=="string")throw Error("Expected ref to be a function, a string, an object returned by React.createRef(), or null.");if(!X._owner)throw Error("Element ref was specified as a string ("+Z+`) but no owner was set. This could happen for one of the following reasons:
|
|
46
|
+
1. You may be adding a ref to a function component
|
|
47
|
+
2. You may be adding a ref to a component that was not created inside a component's render method
|
|
48
|
+
3. You have multiple copies of React loaded
|
|
49
|
+
See https://reactjs.org/link/refs-must-have-owner for more information.`)}}return Z}function wZ(z,Q){var X=Object.prototype.toString.call(Q);throw Error("Objects are not valid as a React child (found: "+(X==="[object Object]"?"object with keys {"+Object.keys(Q).join(", ")+"}":X)+"). If you meant to render a collection of children, use an array instead.")}function AZ(z){{var Q=d0(z)||"Component";if(s$[Q])return;s$[Q]=!0,H("Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it.")}}function vB(z){var{_payload:Q,_init:X}=z;return X(Q)}function kB(z){function Q(S,m){if(!z)return;var V=S.deletions;if(V===null)S.deletions=[m],S.flags|=p7;else V.push(m)}function X(S,m){if(!z)return null;var V=m;while(V!==null)Q(S,V),V=V.sibling;return null}function Z(S,m){var V=new Map,n=m;while(n!==null){if(n.key!==null)V.set(n.key,n);else V.set(n.index,n);n=n.sibling}return V}function Y(S,m){var V=Uz(S,m);return V.index=0,V.sibling=null,V}function J(S,m,V){if(S.index=V,!z)return S.flags|=TK,m;var n=S.alternate;if(n!==null){var H0=n.index;if(H0<m)return S.flags|=B4,m;else return H0}else return S.flags|=B4,m}function q(S){if(z&&S.alternate===null)S.flags|=B4;return S}function G(S,m,V,n){if(m===null||m.tag!==M){var H0=rG(V,S.mode,n);return H0.return=S,H0}else{var $0=Y(m,V);return $0.return=S,$0}}function K(S,m,V,n){var H0=V.type;if(H0===N1)return O(S,m,V.props.children,n,V.key);if(m!==null){if(m.elementType===H0||D_(m,V)||typeof H0==="object"&&H0!==null&&H0.$$typeof===j0&&vB(H0)===m.type){var $0=Y(m,V.props);return $0.ref=CX(S,m,V),$0.return=S,$0._debugSource=V._source,$0._debugOwner=V._owner,$0}}var C0=aG(V,S.mode,n);return C0.ref=CX(S,m,V),C0.return=S,C0}function _(S,m,V,n){if(m===null||m.tag!==P||m.stateNode.containerInfo!==V.containerInfo||m.stateNode.implementation!==V.implementation){var H0=nG(V,S.mode,n);return H0.return=S,H0}else{var $0=Y(m,V.children||[]);return $0.return=S,$0}}function O(S,m,V,n,H0){if(m===null||m.tag!==I){var $0=v7(V,S.mode,n,H0);return $0.return=S,$0}else{var C0=Y(m,V);return C0.return=S,C0}}function v(S,m,V){if(typeof m==="string"&&m!==""||typeof m==="number"){var n=rG(""+m,S.mode,V);return n.return=S,n}if(typeof m==="object"&&m!==null){switch(m.$$typeof){case p1:{var H0=aG(m,S.mode,V);return H0.ref=CX(S,null,m),H0.return=S,H0}case d1:{var $0=nG(m,S.mode,V);return $0.return=S,$0}case j0:{var{_payload:C0,_init:m0}=m;return v(S,m0(C0),V)}}if(Q6(m)||e1(m)){var M1=v7(m,S.mode,V,null);return M1.return=S,M1}wZ(S,m)}if(typeof m==="function")AZ(S);return null}function A(S,m,V,n){var H0=m!==null?m.key:null;if(typeof V==="string"&&V!==""||typeof V==="number"){if(H0!==null)return null;return G(S,m,""+V,n)}if(typeof V==="object"&&V!==null){switch(V.$$typeof){case p1:if(V.key===H0)return K(S,m,V,n);else return null;case d1:if(V.key===H0)return _(S,m,V,n);else return null;case j0:{var{_payload:$0,_init:C0}=V;return A(S,m,C0($0),n)}}if(Q6(V)||e1(V)){if(H0!==null)return null;return O(S,m,V,n,null)}wZ(S,V)}if(typeof V==="function")AZ(S);return null}function D(S,m,V,n,H0){if(typeof n==="string"&&n!==""||typeof n==="number"){var $0=S.get(V)||null;return G(m,$0,""+n,H0)}if(typeof n==="object"&&n!==null){switch(n.$$typeof){case p1:{var C0=S.get(n.key===null?V:n.key)||null;return K(m,C0,n,H0)}case d1:{var m0=S.get(n.key===null?V:n.key)||null;return _(m,m0,n,H0)}case j0:var{_payload:M1,_init:$1}=n;return D(S,m,V,$1(M1),H0)}if(Q6(n)||e1(n)){var $4=S.get(V)||null;return O(m,$4,n,H0,null)}wZ(m,n)}if(typeof n==="function")AZ(m);return null}function y(S,m,V){{if(typeof S!=="object"||S===null)return m;switch(S.$$typeof){case p1:case d1:AB(S,V);var n=S.key;if(typeof n!=="string")break;if(m===null){m=new Set,m.add(n);break}if(!m.has(n)){m.add(n);break}H("Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be "+"duplicated and/or omitted — the behavior is unsupported and "+"could change in a future version.",n);break;case j0:var{_payload:H0,_init:$0}=S;y($0(H0),m,V);break}}return m}function h(S,m,V,n){{var H0=null;for(var $0=0;$0<V.length;$0++){var C0=V[$0];H0=y(C0,H0,S)}}var m0=null,M1=null,$1=m,$4=0,q1=0,Q4=null;for(;$1!==null&&q1<V.length;q1++){if($1.index>q1)Q4=$1,$1=null;else Q4=$1.sibling;var o4=A(S,$1,V[q1],n);if(o4===null){if($1===null)$1=Q4;break}if(z){if($1&&o4.alternate===null)Q(S,$1)}if($4=J(o4,$4,q1),M1===null)m0=o4;else M1.sibling=o4;M1=o4,$1=Q4}if(q1===V.length){if(X(S,$1),f4()){var g4=q1;s7(S,g4)}return m0}if($1===null){for(;q1<V.length;q1++){var S6=v(S,V[q1],n);if(S6===null)continue;if($4=J(S6,$4,q1),M1===null)m0=S6;else M1.sibling=S6;M1=S6}if(f4()){var q6=q1;s7(S,q6)}return m0}var G6=Z(S,$1);for(;q1<V.length;q1++){var a4=D(G6,S,q1,V[q1],n);if(a4!==null){if(z){if(a4.alternate!==null)G6.delete(a4.key===null?q1:a4.key)}if($4=J(a4,$4,q1),M1===null)m0=a4;else M1.sibling=a4;M1=a4}}if(z)G6.forEach(function(WQ){return Q(S,WQ)});if(f4()){var a5=q1;s7(S,a5)}return m0}function Y0(S,m,V,n){var H0=e1(V);if(typeof H0!=="function")throw Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");{if(typeof Symbol==="function"&&V[Symbol.toStringTag]==="Generator"){if(!r$)H("Using Generators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. Keep in mind you might need to polyfill these features for older browsers.");r$=!0}if(V.entries===H0){if(!a$)H("Using Maps as children is not supported. Use an array of keyed ReactElements instead.");a$=!0}var $0=H0.call(V);if($0){var C0=null,m0=$0.next();for(;!m0.done;m0=$0.next()){var M1=m0.value;C0=y(M1,C0,S)}}}var $1=H0.call(V);if($1==null)throw Error("An iterable object provided no iterator.");var $4=null,q1=null,Q4=m,o4=0,g4=0,S6=null,q6=$1.next();for(;Q4!==null&&!q6.done;g4++,q6=$1.next()){if(Q4.index>g4)S6=Q4,Q4=null;else S6=Q4.sibling;var G6=A(S,Q4,q6.value,n);if(G6===null){if(Q4===null)Q4=S6;break}if(z){if(Q4&&G6.alternate===null)Q(S,Q4)}if(o4=J(G6,o4,g4),q1===null)$4=G6;else q1.sibling=G6;q1=G6,Q4=S6}if(q6.done){if(X(S,Q4),f4()){var a4=g4;s7(S,a4)}return $4}if(Q4===null){for(;!q6.done;g4++,q6=$1.next()){var a5=v(S,q6.value,n);if(a5===null)continue;if(o4=J(a5,o4,g4),q1===null)$4=a5;else q1.sibling=a5;q1=a5}if(f4()){var WQ=g4;s7(S,WQ)}return $4}var H8=Z(S,Q4);for(;!q6.done;g4++,q6=$1.next()){var P5=D(H8,S,g4,q6.value,n);if(P5!==null){if(z){if(P5.alternate!==null)H8.delete(P5.key===null?g4:P5.key)}if(o4=J(P5,o4,g4),q1===null)$4=P5;else q1.sibling=P5;q1=P5}}if(z)H8.forEach(function(Q2){return Q(S,Q2)});if(f4()){var z2=g4;s7(S,z2)}return $4}function w0(S,m,V,n){if(m!==null&&m.tag===M){X(S,m.sibling);var H0=Y(m,V);return H0.return=S,H0}X(S,m);var $0=rG(V,S.mode,n);return $0.return=S,$0}function R0(S,m,V,n){var H0=V.key,$0=m;while($0!==null){if($0.key===H0){var C0=V.type;if(C0===N1){if($0.tag===I){X(S,$0.sibling);var m0=Y($0,V.props.children);return m0.return=S,m0._debugSource=V._source,m0._debugOwner=V._owner,m0}}else if($0.elementType===C0||D_($0,V)||typeof C0==="object"&&C0!==null&&C0.$$typeof===j0&&vB(C0)===$0.type){X(S,$0.sibling);var M1=Y($0,V.props);return M1.ref=CX(S,$0,V),M1.return=S,M1._debugSource=V._source,M1._debugOwner=V._owner,M1}X(S,$0);break}else Q(S,$0);$0=$0.sibling}if(V.type===N1){var $1=v7(V.props.children,S.mode,n,V.key);return $1.return=S,$1}else{var $4=aG(V,S.mode,n);return $4.ref=CX(S,m,V),$4.return=S,$4}}function n0(S,m,V,n){var H0=V.key,$0=m;while($0!==null){if($0.key===H0)if($0.tag===P&&$0.stateNode.containerInfo===V.containerInfo&&$0.stateNode.implementation===V.implementation){X(S,$0.sibling);var C0=Y($0,V.children||[]);return C0.return=S,C0}else{X(S,$0);break}else Q(S,$0);$0=$0.sibling}var m0=nG(V,S.mode,n);return m0.return=S,m0}function t0(S,m,V,n){var H0=typeof V==="object"&&V!==null&&V.type===N1&&V.key===null;if(H0)V=V.props.children;if(typeof V==="object"&&V!==null){switch(V.$$typeof){case p1:return q(R0(S,m,V,n));case d1:return q(n0(S,m,V,n));case j0:var{_payload:$0,_init:C0}=V;return t0(S,m,C0($0),n)}if(Q6(V))return h(S,m,V,n);if(e1(V))return Y0(S,m,V,n);wZ(S,V)}if(typeof V==="string"&&V!==""||typeof V==="number")return q(w0(S,m,""+V,n));if(typeof V==="function")AZ(S);return X(S,m)}return t0}var sz=kB(!0),IB=kB(!1);function kF(z,Q){if(z!==null&&Q.child!==z.child)throw Error("Resuming work not yet implemented.");if(Q.child===null)return;var X=Q.child,Z=Uz(X,X.pendingProps);Q.child=Z,Z.return=Q;while(X.sibling!==null)X=X.sibling,Z=Z.sibling=Uz(X,X.pendingProps),Z.return=Q;Z.sibling=null}function IF(z,Q){var X=z.child;while(X!==null)Rw(X,Q),X=X.sibling}var e$=U7(null),zq;zq={};var vZ=null,ez=null,Qq=null,kZ=!1;function IZ(){vZ=null,ez=null,Qq=null,kZ=!1}function TB(){kZ=!0}function SB(){kZ=!1}function VB(z,Q,X){{l4(e$,Q._currentValue,z),Q._currentValue=X;{if(Q._currentRenderer!==void 0&&Q._currentRenderer!==null&&Q._currentRenderer!==zq)H("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported.");Q._currentRenderer=zq}}}function Xq(z,Q){var X=e$.current;d4(e$,Q),z._currentValue=X}function Zq(z,Q,X){var Z=z;while(Z!==null){var Y=Z.alternate;if(!pz(Z.childLanes,Q)){if(Z.childLanes=c0(Z.childLanes,Q),Y!==null)Y.childLanes=c0(Y.childLanes,Q)}else if(Y!==null&&!pz(Y.childLanes,Q))Y.childLanes=c0(Y.childLanes,Q);if(Z===X)break;Z=Z.return}if(Z!==X)H("Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue.")}function TF(z,Q,X){SF(z,Q,X)}function SF(z,Q,X){var Z=z.child;if(Z!==null)Z.return=z;while(Z!==null){var Y=void 0,J=Z.dependencies;if(J!==null){Y=Z.child;var q=J.firstContext;while(q!==null){if(q.context===Q){if(Z.tag===b){var G=rQ(X),K=x5(m1,G);K.tag=SZ;var _=Z.updateQueue;if(_===null);else{var O=_.shared,v=O.pending;if(v===null)K.next=K;else K.next=v.next,v.next=K;O.pending=K}}Z.lanes=c0(Z.lanes,X);var A=Z.alternate;if(A!==null)A.lanes=c0(A.lanes,X);Zq(Z.return,X,z),J.lanes=c0(J.lanes,X);break}q=q.next}}else if(Z.tag===u)Y=Z.type===z.type?null:Z.child;else if(Z.tag===s){var D=Z.return;if(D===null)throw Error("We just came from a parent so we must have had a parent. This is a bug in React.");D.lanes=c0(D.lanes,X);var y=D.alternate;if(y!==null)y.lanes=c0(y.lanes,X);Zq(D,X,z),Y=Z.sibling}else Y=Z.child;if(Y!==null)Y.return=Z;else{Y=Z;while(Y!==null){if(Y===z){Y=null;break}var h=Y.sibling;if(h!==null){h.return=Y.return,Y=h;break}Y=Y.return}}Z=Y}}function zQ(z,Q){vZ=z,ez=null,Qq=null;var X=z.dependencies;if(X!==null){var Z=X.firstContext;if(Z!==null){if(w6(X.lanes,Q))iX();X.firstContext=null}}}function _4(z){if(kZ)H("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");var Q=z._currentValue;if(Qq===z);else{var X={context:z,memoizedValue:Q,next:null};if(ez===null){if(vZ===null)throw Error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");ez=X,vZ.dependencies={lanes:a,firstContext:X}}else ez=ez.next=X}return Q}var Zz=null;function Yq(z){if(Zz===null)Zz=[z];else Zz.push(z)}function VF(){if(Zz!==null){for(var z=0;z<Zz.length;z++){var Q=Zz[z],X=Q.interleaved;if(X!==null){Q.interleaved=null;var Z=X.next,Y=Q.pending;if(Y!==null){var J=Y.next;Y.next=Z,X.next=J}Q.pending=X}}Zz=null}}function CB(z,Q,X,Z){var Y=Q.interleaved;if(Y===null)X.next=X,Yq(Q);else X.next=Y.next,Y.next=X;return Q.interleaved=X,TZ(z,Z)}function CF(z,Q,X,Z){var Y=Q.interleaved;if(Y===null)X.next=X,Yq(Q);else X.next=Y.next,Y.next=X;Q.interleaved=X}function DF(z,Q,X,Z){var Y=Q.interleaved;if(Y===null)X.next=X,Yq(Q);else X.next=Y.next,Y.next=X;return Q.interleaved=X,TZ(z,Z)}function W6(z,Q){return TZ(z,Q)}var yF=TZ;function TZ(z,Q){z.lanes=c0(z.lanes,Q);var X=z.alternate;if(X!==null)X.lanes=c0(X.lanes,Q);if(X===null&&(z.flags&(B4|C5))!==V0)T_(z);var Z=z,Y=z.return;while(Y!==null){if(Y.childLanes=c0(Y.childLanes,Q),X=Y.alternate,X!==null)X.childLanes=c0(X.childLanes,Q);else if((Y.flags&(B4|C5))!==V0)T_(z);Z=Y,Y=Y.return}if(Z.tag===k){var J=Z.stateNode;return J}else return null}var DB=0,yB=1,SZ=2,Jq=3,VZ=!1,$q,CZ;$q=!1,CZ=null;function qq(z){var Q={baseState:z.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:a},effects:null};z.updateQueue=Q}function fB(z,Q){var X=Q.updateQueue,Z=z.updateQueue;if(X===Z){var Y={baseState:Z.baseState,firstBaseUpdate:Z.firstBaseUpdate,lastBaseUpdate:Z.lastBaseUpdate,shared:Z.shared,effects:Z.effects};Q.updateQueue=Y}}function x5(z,Q){var X={eventTime:z,lane:Q,tag:DB,payload:null,callback:null,next:null};return X}function L7(z,Q,X){var Z=z.updateQueue;if(Z===null)return null;var Y=Z.shared;if(CZ===Y&&!$q)H("An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback."),$q=!0;if(EM()){var J=Y.pending;if(J===null)Q.next=Q;else Q.next=J.next,J.next=Q;return Y.pending=Q,yF(z,X)}else return DF(z,Y,Q,X)}function DZ(z,Q,X){var Z=Q.updateQueue;if(Z===null)return;var Y=Z.shared;if(iK(X)){var J=Y.lanes;J=aK(J,z.pendingLanes);var q=c0(J,X);Y.lanes=q,eJ(z,q)}}function Gq(z,Q){var{updateQueue:X,alternate:Z}=z;if(Z!==null){var Y=Z.updateQueue;if(X===Y){var J=null,q=null,G=X.firstBaseUpdate;if(G!==null){var K=G;do{var _={eventTime:K.eventTime,lane:K.lane,tag:K.tag,payload:K.payload,callback:K.callback,next:null};if(q===null)J=q=_;else q.next=_,q=_;K=K.next}while(K!==null);if(q===null)J=q=Q;else q.next=Q,q=Q}else J=q=Q;X={baseState:Y.baseState,firstBaseUpdate:J,lastBaseUpdate:q,shared:Y.shared,effects:Y.effects},z.updateQueue=X;return}}var O=X.lastBaseUpdate;if(O===null)X.firstBaseUpdate=Q;else O.next=Q;X.lastBaseUpdate=Q}function fF(z,Q,X,Z,Y,J){switch(X.tag){case yB:{var q=X.payload;if(typeof q==="function"){TB();var G=q.call(J,Z,Y);{if(z.mode&z4){I4(!0);try{q.call(J,Z,Y)}finally{I4(!1)}}SB()}return G}return q}case Jq:z.flags=z.flags&~Z6|H1;case DB:{var K=X.payload,_;if(typeof K==="function"){TB(),_=K.call(J,Z,Y);{if(z.mode&z4){I4(!0);try{K.call(J,Z,Y)}finally{I4(!1)}}SB()}}else _=K;if(_===null||_===void 0)return Z;return o0({},Z,_)}case SZ:return VZ=!0,Z}return Z}function yZ(z,Q,X,Z){var Y=z.updateQueue;VZ=!1,CZ=Y.shared;var{firstBaseUpdate:J,lastBaseUpdate:q}=Y,G=Y.shared.pending;if(G!==null){Y.shared.pending=null;var K=G,_=K.next;if(K.next=null,q===null)J=_;else q.next=_;q=K;var O=z.alternate;if(O!==null){var v=O.updateQueue,A=v.lastBaseUpdate;if(A!==q){if(A===null)v.firstBaseUpdate=_;else A.next=_;v.lastBaseUpdate=K}}}if(J!==null){var D=Y.baseState,y=a,h=null,Y0=null,w0=null,R0=J;do{var{lane:n0,eventTime:t0}=R0;if(!pz(Z,n0)){var S={eventTime:t0,lane:n0,tag:R0.tag,payload:R0.payload,callback:R0.callback,next:null};if(w0===null)Y0=w0=S,h=D;else w0=w0.next=S;y=c0(y,n0)}else{if(w0!==null){var m={eventTime:t0,lane:T4,tag:R0.tag,payload:R0.payload,callback:R0.callback,next:null};w0=w0.next=m}D=fF(z,Y,R0,D,Q,X);var V=R0.callback;if(V!==null&&R0.lane!==T4){z.flags|=FJ;var n=Y.effects;if(n===null)Y.effects=[R0];else n.push(R0)}}if(R0=R0.next,R0===null)if(G=Y.shared.pending,G===null)break;else{var H0=G,$0=H0.next;H0.next=null,R0=$0,Y.lastBaseUpdate=H0,Y.shared.pending=null}}while(!0);if(w0===null)h=D;Y.baseState=h,Y.firstBaseUpdate=Y0,Y.lastBaseUpdate=w0;var C0=Y.shared.interleaved;if(C0!==null){var m0=C0;do y=c0(y,m0.lane),m0=m0.next;while(m0!==C0)}else if(J===null)Y.shared.lanes=a;Y8(y),z.lanes=y,z.memoizedState=D}CZ=null}function EF(z,Q){if(typeof z!=="function")throw Error("Invalid argument passed as callback. Expected a function. Instead "+("received: "+z));z.call(Q)}function EB(){VZ=!1}function fZ(){return VZ}function hB(z,Q,X){var Z=Q.effects;if(Q.effects=null,Z!==null)for(var Y=0;Y<Z.length;Y++){var J=Z[Y],q=J.callback;if(q!==null)J.callback=null,EF(q,X)}}var DX={},W7=U7(DX),yX=U7(DX),EZ=U7(DX);function hZ(z){if(z===DX)throw Error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.");return z}function pB(){var z=hZ(EZ.current);return z}function Hq(z,Q){l4(EZ,Q,z),l4(yX,z,z),l4(W7,DX,z);var X=sR(Q);d4(W7,z),l4(W7,X,z)}function QQ(z){d4(W7,z),d4(yX,z),d4(EZ,z)}function Kq(){var z=hZ(W7.current);return z}function mB(z){var Q=hZ(EZ.current),X=hZ(W7.current),Z=eR(X,z.type);if(X===Z)return;l4(yX,z,z),l4(W7,Z,z)}function Uq(z){if(yX.current!==z)return;d4(W7,z),d4(yX,z)}var hF=0,uB=1,jB=1,fX=2,n6=U7(hF);function Bq(z,Q){return(z&Q)!==0}function XQ(z){return z&uB}function _q(z,Q){return z&uB|Q}function pF(z,Q){return z|Q}function b7(z,Q){l4(n6,Q,z)}function ZQ(z){d4(n6,z)}function mF(z,Q){var X=z.memoizedState;if(X!==null){if(X.dehydrated!==null)return!0;return!1}var Z=z.memoizedProps;return!0}function pZ(z){var Q=z;while(Q!==null){if(Q.tag===l){var X=Q.memoizedState;if(X!==null){var Z=X.dehydrated;if(Z===null||XB(Z)||D$(Z))return Q}}else if(Q.tag===N0&&Q.memoizedProps.revealOrder!==void 0){var Y=(Q.flags&H1)!==V0;if(Y)return Q}else if(Q.child!==null){Q.child.return=Q,Q=Q.child;continue}if(Q===z)return null;while(Q.sibling===null){if(Q.return===null||Q.return===z)return null;Q=Q.return}Q.sibling.return=Q.return,Q=Q.sibling}return null}var b6=0,L4=1,O5=2,W4=4,E4=8,Oq=[];function Lq(){for(var z=0;z<Oq.length;z++){var Q=Oq[z];Q._workInProgressVersionPrimary=null}Oq.length=0}function uF(z,Q){var X=Q._getVersion,Z=X(Q._source);if(z.mutableSourceEagerHydrationData==null)z.mutableSourceEagerHydrationData=[Q,Z];else z.mutableSourceEagerHydrationData.push(Q,Z)}var{ReactCurrentDispatcher:G0,ReactCurrentBatchConfig:EX}=$,Wq,YQ;Wq=new Set;var Yz=a,P1=null,b4=null,R4=null,mZ=!1,hX=!1,pX=0,jF=0,gF=25,x=null,h6=null,R7=-1,bq=!1;function B1(){{var z=x;if(h6===null)h6=[z];else h6.push(z)}}function Z0(){{var z=x;if(h6!==null){if(R7++,h6[R7]!==z)xF(z)}}}function JQ(z){if(z!==void 0&&z!==null&&!Q6(z))H("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",x,typeof z)}function xF(z){{var Q=d0(P1);if(!Wq.has(Q)){if(Wq.add(Q),h6!==null){var X="",Z=30;for(var Y=0;Y<=R7;Y++){var J=h6[Y],q=Y===R7?z:J,G=Y+1+". "+J;while(G.length<Z)G+=" ";G+=q+`
|
|
50
|
+
`,X+=G}H(`React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks
|
|
51
|
+
|
|
52
|
+
Previous render Next render
|
|
53
|
+
------------------------------------------------------
|
|
54
|
+
%s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
55
|
+
`,Q,X)}}}}function i4(){throw Error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
56
|
+
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
57
|
+
2. You might be breaking the Rules of Hooks
|
|
58
|
+
3. You might have more than one copy of React in the same app
|
|
59
|
+
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`)}function Rq(z,Q){if(bq)return!1;if(Q===null)return H("%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.",x),!1;if(z.length!==Q.length)H(`The final argument passed to %s changed size between renders. The order and size of this array must remain constant.
|
|
60
|
+
|
|
61
|
+
Previous: %s
|
|
62
|
+
Incoming: %s`,x,"["+Q.join(", ")+"]","["+z.join(", ")+"]");for(var X=0;X<Q.length&&X<z.length;X++){if(k6(z[X],Q[X]))continue;return!1}return!0}function $Q(z,Q,X,Z,Y,J){if(Yz=J,P1=Q,h6=z!==null?z._debugHookTypes:null,R7=-1,bq=z!==null&&z.type!==Q.type,Q.memoizedState=null,Q.updateQueue=null,Q.lanes=a,z!==null&&z.memoizedState!==null)G0.current=G9;else if(h6!==null)G0.current=q9;else G0.current=$9;var q=X(Z,Y);if(hX){var G=0;do{if(hX=!1,pX=0,G>=gF)throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");G+=1,bq=!1,b4=null,R4=null,Q.updateQueue=null,R7=-1,G0.current=H9,q=X(Z,Y)}while(hX)}G0.current=eZ,Q._debugHookTypes=h6;var K=b4!==null&&b4.next!==null;if(Yz=a,P1=null,b4=null,R4=null,x=null,h6=null,R7=-1,z!==null&&(z.flags&y5)!==(Q.flags&y5)&&(z.mode&s0)!==T0)H("Internal React error: Expected static flag was missing. Please notify the React team.");if(mZ=!1,K)throw Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");return q}function qQ(){var z=pX!==0;return pX=0,z}function gB(z,Q,X){if(Q.updateQueue=z.updateQueue,(Q.mode&K5)!==T0)Q.flags&=~(C8|D5|d6|Y1);else Q.flags&=~(d6|Y1);z.lanes=m8(z.lanes,X)}function xB(){if(G0.current=eZ,mZ){var z=P1.memoizedState;while(z!==null){var Q=z.queue;if(Q!==null)Q.pending=null;z=z.next}mZ=!1}Yz=a,P1=null,b4=null,R4=null,h6=null,R7=-1,x=null,Q9=!1,hX=!1,pX=0}function L5(){var z={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};if(R4===null)P1.memoizedState=R4=z;else R4=R4.next=z;return R4}function p6(){var z;if(b4===null){var Q=P1.alternate;if(Q!==null)z=Q.memoizedState;else z=null}else z=b4.next;var X;if(R4===null)X=P1.memoizedState;else X=R4.next;if(X!==null)R4=X,X=R4.next,b4=z;else{if(z===null)throw Error("Rendered more hooks than during the previous render.");b4=z;var Z={memoizedState:b4.memoizedState,baseState:b4.baseState,baseQueue:b4.baseQueue,queue:b4.queue,next:null};if(R4===null)P1.memoizedState=R4=Z;else R4=R4.next=Z}return R4}function cB(){return{lastEffect:null,stores:null}}function Nq(z,Q){return typeof Q==="function"?Q(z):Q}function Fq(z,Q,X){var Z=L5(),Y;if(X!==void 0)Y=X(Q);else Y=Q;Z.memoizedState=Z.baseState=Y;var J={pending:null,interleaved:null,lanes:a,dispatch:null,lastRenderedReducer:z,lastRenderedState:Y};Z.queue=J;var q=J.dispatch=lF.bind(null,P1,J);return[Z.memoizedState,q]}function Pq(z,Q,X){var Z=p6(),Y=Z.queue;if(Y===null)throw Error("Should have a queue. This is likely a bug in React. Please file an issue.");Y.lastRenderedReducer=z;var J=b4,q=J.baseQueue,G=Y.pending;if(G!==null){if(q!==null){var K=q.next,_=G.next;q.next=_,G.next=K}if(J.baseQueue!==q)H("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React.");J.baseQueue=q=G,Y.pending=null}if(q!==null){var O=q.next,v=J.baseState,A=null,D=null,y=null,h=O;do{var Y0=h.lane;if(!pz(Yz,Y0)){var w0={lane:Y0,action:h.action,hasEagerState:h.hasEagerState,eagerState:h.eagerState,next:null};if(y===null)D=y=w0,A=v;else y=y.next=w0;P1.lanes=c0(P1.lanes,Y0),Y8(Y0)}else{if(y!==null){var R0={lane:T4,action:h.action,hasEagerState:h.hasEagerState,eagerState:h.eagerState,next:null};y=y.next=R0}if(h.hasEagerState)v=h.eagerState;else{var n0=h.action;v=z(v,n0)}}h=h.next}while(h!==null&&h!==O);if(y===null)A=v;else y.next=D;if(!k6(v,Z.memoizedState))iX();Z.memoizedState=v,Z.baseState=A,Z.baseQueue=y,Y.lastRenderedState=v}var t0=Y.interleaved;if(t0!==null){var S=t0;do{var m=S.lane;P1.lanes=c0(P1.lanes,m),Y8(m),S=S.next}while(S!==t0)}else if(q===null)Y.lanes=a;var V=Y.dispatch;return[Z.memoizedState,V]}function Mq(z,Q,X){var Z=p6(),Y=Z.queue;if(Y===null)throw Error("Should have a queue. This is likely a bug in React. Please file an issue.");Y.lastRenderedReducer=z;var{dispatch:J,pending:q}=Y,G=Z.memoizedState;if(q!==null){Y.pending=null;var K=q.next,_=K;do{var O=_.action;G=z(G,O),_=_.next}while(_!==K);if(!k6(G,Z.memoizedState))iX();if(Z.memoizedState=G,Z.baseQueue===null)Z.baseState=G;Y.lastRenderedState=G}return[G,J]}function wq(z,Q,X){return}function uZ(z,Q,X){return}function Aq(z,Q,X){var Z=P1,Y=L5(),J,q=f4();if(q){if(X===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");if(J=X(),!YQ){if(J!==X())H("The result of getServerSnapshot should be cached to avoid an infinite loop"),YQ=!0}}else{if(J=Q(),!YQ){var G=Q();if(!k6(J,G))H("The result of getSnapshot should be cached to avoid an infinite loop"),YQ=!0}var K=RY();if(K===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");if(!p8(K,Yz))dB(Z,Q,J)}Y.memoizedState=J;var _={value:J,getSnapshot:Q};return Y.queue=_,dZ(iB.bind(null,Z,_,z),[z]),Z.flags|=d6,mX(L4|E4,lB.bind(null,Z,_,J,Q),void 0,null),J}function jZ(z,Q,X){var Z=P1,Y=p6(),J=Q();if(!YQ){var q=Q();if(!k6(J,q))H("The result of getSnapshot should be cached to avoid an infinite loop"),YQ=!0}var G=Y.memoizedState,K=!k6(G,J);if(K)Y.memoizedState=J,iX();var _=Y.queue;if(jX(iB.bind(null,Z,_,z),[z]),_.getSnapshot!==Q||K||R4!==null&&R4.memoizedState.tag&L4){Z.flags|=d6,mX(L4|E4,lB.bind(null,Z,_,J,Q),void 0,null);var O=RY();if(O===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");if(!p8(O,Yz))dB(Z,Q,J)}return J}function dB(z,Q,X){z.flags|=V8;var Z={getSnapshot:Q,value:X},Y=P1.updateQueue;if(Y===null)Y=cB(),P1.updateQueue=Y,Y.stores=[Z];else{var J=Y.stores;if(J===null)Y.stores=[Z];else J.push(Z)}}function lB(z,Q,X,Z){if(Q.value=X,Q.getSnapshot=Z,oB(Q))aB(z)}function iB(z,Q,X){var Z=function(){if(oB(Q))aB(z)};return X(Z)}function oB(z){var{getSnapshot:Q,value:X}=z;try{var Z=Q();return!k6(X,Z)}catch(Y){return!0}}function aB(z){var Q=W6(z,f0);if(Q!==null)M4(Q,z,f0,m1)}function gZ(z){var Q=L5();if(typeof z==="function")z=z();Q.memoizedState=Q.baseState=z;var X={pending:null,interleaved:null,lanes:a,dispatch:null,lastRenderedReducer:Nq,lastRenderedState:z};Q.queue=X;var Z=X.dispatch=iF.bind(null,P1,X);return[Q.memoizedState,Z]}function vq(z){return Pq(Nq)}function kq(z){return Mq(Nq)}function mX(z,Q,X,Z){var Y={tag:z,create:Q,destroy:X,deps:Z,next:null},J=P1.updateQueue;if(J===null)J=cB(),P1.updateQueue=J,J.lastEffect=Y.next=Y;else{var q=J.lastEffect;if(q===null)J.lastEffect=Y.next=Y;else{var G=q.next;q.next=Y,Y.next=G,J.lastEffect=Y}}return Y}function Iq(z){var Q=L5();{var X={current:z};return Q.memoizedState=X,X}}function xZ(z){var Q=p6();return Q.memoizedState}function uX(z,Q,X,Z){var Y=L5(),J=Z===void 0?null:Z;P1.flags|=z,Y.memoizedState=mX(L4|Q,X,void 0,J)}function cZ(z,Q,X,Z){var Y=p6(),J=Z===void 0?null:Z,q=void 0;if(b4!==null){var G=b4.memoizedState;if(q=G.destroy,J!==null){var K=G.deps;if(Rq(J,K)){Y.memoizedState=mX(Q,X,q,J);return}}}P1.flags|=z,Y.memoizedState=mX(L4|Q,X,q,J)}function dZ(z,Q){if((P1.mode&K5)!==T0)return uX(C8|d6|wJ,E4,z,Q);else return uX(d6|wJ,E4,z,Q)}function jX(z,Q){return cZ(d6,E4,z,Q)}function Tq(z,Q){return uX(Y1,O5,z,Q)}function lZ(z,Q){return cZ(Y1,O5,z,Q)}function Sq(z,Q){var X=Y1;if(X|=j7,(P1.mode&K5)!==T0)X|=D5;return uX(X,W4,z,Q)}function iZ(z,Q){return cZ(Y1,W4,z,Q)}function rB(z,Q){if(typeof Q==="function"){var X=Q,Z=z();return X(Z),function(){X(null)}}else if(Q!==null&&Q!==void 0){var Y=Q;if(!Y.hasOwnProperty("current"))H("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(Y).join(", ")+"}");var J=z();return Y.current=J,function(){Y.current=null}}}function Vq(z,Q,X){if(typeof Q!=="function")H("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",Q!==null?typeof Q:"null");var Z=X!==null&&X!==void 0?X.concat([z]):null,Y=Y1;if(Y|=j7,(P1.mode&K5)!==T0)Y|=D5;return uX(Y,W4,rB.bind(null,Q,z),Z)}function oZ(z,Q,X){if(typeof Q!=="function")H("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",Q!==null?typeof Q:"null");var Z=X!==null&&X!==void 0?X.concat([z]):null;return cZ(Y1,W4,rB.bind(null,Q,z),Z)}function aZ(z,Q){}var rZ=aZ;function Cq(z,Q){var X=L5(),Z=Q===void 0?null:Q;return X.memoizedState=[z,Z],z}function nZ(z,Q){var X=p6(),Z=Q===void 0?null:Q,Y=X.memoizedState;if(Y!==null){if(Z!==null){var J=Y[1];if(Rq(Z,J))return Y[0]}}return X.memoizedState=[z,Z],z}function Dq(z,Q){var X=L5(),Z=Q===void 0?null:Q,Y=z();return X.memoizedState=[Y,Z],Y}function tZ(z,Q){var X=p6(),Z=Q===void 0?null:Q,Y=X.memoizedState;if(Y!==null){if(Z!==null){var J=Y[1];if(Rq(Z,J))return Y[0]}}var q=z();return X.memoizedState=[q,Z],q}function yq(z){var Q=L5();return Q.memoizedState=z,z}function nB(z){var Q=p6(),X=b4,Z=X.memoizedState;return sB(Q,Z,z)}function tB(z){var Q=p6();if(b4===null)return Q.memoizedState=z,z;else{var X=b4.memoizedState;return sB(Q,X,z)}}function sB(z,Q,X){var Z=!TW(Yz);if(Z){if(!k6(X,Q)){var Y=oK();P1.lanes=c0(P1.lanes,Y),Y8(Y),z.baseState=!0}return Q}else{if(z.baseState)z.baseState=!1,iX();return z.memoizedState=X,X}}function cF(z,Q,X){var Z=i6();S4(pW(Z,E5)),z(!0);var Y=EX.transition;EX.transition={};var J=EX.transition;EX.transition._updatedFibers=new Set;try{z(!1),Q()}finally{if(S4(Z),EX.transition=Y,Y===null&&J._updatedFibers){var q=J._updatedFibers.size;if(q>10)W("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.");J._updatedFibers.clear()}}}function fq(){var z=gZ(!1),Q=z[0],X=z[1],Z=cF.bind(null,X),Y=L5();return Y.memoizedState=Z,[Q,Z]}function eB(){var z=vq(),Q=z[0],X=p6(),Z=X.memoizedState;return[Q,Z]}function z9(){var z=kq(),Q=z[0],X=p6(),Z=X.memoizedState;return[Q,Z]}var Q9=!1;function dF(){return Q9}function Eq(){var z=L5(),Q=RY(),X=Q.identifierPrefix,Z;if(f4()){var Y=GF();Z=":"+X+"R"+Y;var J=pX++;if(J>0)Z+="H"+J.toString(32);Z+=":"}else{var q=jF++;Z=":"+X+"r"+q.toString(32)+":"}return z.memoizedState=Z,Z}function sZ(){var z=p6(),Q=z.memoizedState;return Q}function lF(z,Q,X){if(typeof arguments[3]==="function")H("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().");var Z=w7(z),Y={lane:Z,action:X,hasEagerState:!1,eagerState:null,next:null};if(X9(z))Z9(Q,Y);else{var J=CB(z,Q,Y,Z);if(J!==null){var q=$6();M4(J,z,Z,q),Y9(J,Q,Z)}}J9(z,Z)}function iF(z,Q,X){if(typeof arguments[3]==="function")H("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().");var Z=w7(z),Y={lane:Z,action:X,hasEagerState:!1,eagerState:null,next:null};if(X9(z))Z9(Q,Y);else{var J=z.alternate;if(z.lanes===a&&(J===null||J.lanes===a)){var q=Q.lastRenderedReducer;if(q!==null){var G;G=G0.current,G0.current=t6;try{var K=Q.lastRenderedState,_=q(K,X);if(Y.hasEagerState=!0,Y.eagerState=_,k6(_,K)){CF(z,Q,Y,Z);return}}catch(A){}finally{G0.current=G}}}var O=CB(z,Q,Y,Z);if(O!==null){var v=$6();M4(O,z,Z,v),Y9(O,Q,Z)}}J9(z,Z)}function X9(z){var Q=z.alternate;return z===P1||Q!==null&&Q===P1}function Z9(z,Q){hX=mZ=!0;var X=z.pending;if(X===null)Q.next=Q;else Q.next=X.next,X.next=Q;z.pending=Q}function Y9(z,Q,X){if(iK(X)){var Z=Q.lanes;Z=aK(Z,z.pendingLanes);var Y=c0(Z,X);Q.lanes=Y,eJ(z,Y)}}function J9(z,Q,X){TJ(z,Q)}var eZ={readContext:_4,useCallback:i4,useContext:i4,useEffect:i4,useImperativeHandle:i4,useInsertionEffect:i4,useLayoutEffect:i4,useMemo:i4,useReducer:i4,useRef:i4,useState:i4,useDebugValue:i4,useDeferredValue:i4,useTransition:i4,useMutableSource:i4,useSyncExternalStore:i4,useId:i4,unstable_isNewReconciler:Q1},$9=null,q9=null,G9=null,H9=null,W5=null,t6=null,zY=null;{var hq=function(){H("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().")},E0=function(){H("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://reactjs.org/link/rules-of-hooks")};$9={readContext:function(z){return _4(z)},useCallback:function(z,Q){return x="useCallback",B1(),JQ(Q),Cq(z,Q)},useContext:function(z){return x="useContext",B1(),_4(z)},useEffect:function(z,Q){return x="useEffect",B1(),JQ(Q),dZ(z,Q)},useImperativeHandle:function(z,Q,X){return x="useImperativeHandle",B1(),JQ(X),Vq(z,Q,X)},useInsertionEffect:function(z,Q){return x="useInsertionEffect",B1(),JQ(Q),Tq(z,Q)},useLayoutEffect:function(z,Q){return x="useLayoutEffect",B1(),JQ(Q),Sq(z,Q)},useMemo:function(z,Q){x="useMemo",B1(),JQ(Q);var X=G0.current;G0.current=W5;try{return Dq(z,Q)}finally{G0.current=X}},useReducer:function(z,Q,X){x="useReducer",B1();var Z=G0.current;G0.current=W5;try{return Fq(z,Q,X)}finally{G0.current=Z}},useRef:function(z){return x="useRef",B1(),Iq(z)},useState:function(z){x="useState",B1();var Q=G0.current;G0.current=W5;try{return gZ(z)}finally{G0.current=Q}},useDebugValue:function(z,Q){return x="useDebugValue",B1(),aZ()},useDeferredValue:function(z){return x="useDeferredValue",B1(),yq(z)},useTransition:function(){return x="useTransition",B1(),fq()},useMutableSource:function(z,Q,X){return x="useMutableSource",B1(),wq()},useSyncExternalStore:function(z,Q,X){return x="useSyncExternalStore",B1(),Aq(z,Q,X)},useId:function(){return x="useId",B1(),Eq()},unstable_isNewReconciler:Q1},q9={readContext:function(z){return _4(z)},useCallback:function(z,Q){return x="useCallback",Z0(),Cq(z,Q)},useContext:function(z){return x="useContext",Z0(),_4(z)},useEffect:function(z,Q){return x="useEffect",Z0(),dZ(z,Q)},useImperativeHandle:function(z,Q,X){return x="useImperativeHandle",Z0(),Vq(z,Q,X)},useInsertionEffect:function(z,Q){return x="useInsertionEffect",Z0(),Tq(z,Q)},useLayoutEffect:function(z,Q){return x="useLayoutEffect",Z0(),Sq(z,Q)},useMemo:function(z,Q){x="useMemo",Z0();var X=G0.current;G0.current=W5;try{return Dq(z,Q)}finally{G0.current=X}},useReducer:function(z,Q,X){x="useReducer",Z0();var Z=G0.current;G0.current=W5;try{return Fq(z,Q,X)}finally{G0.current=Z}},useRef:function(z){return x="useRef",Z0(),Iq(z)},useState:function(z){x="useState",Z0();var Q=G0.current;G0.current=W5;try{return gZ(z)}finally{G0.current=Q}},useDebugValue:function(z,Q){return x="useDebugValue",Z0(),aZ()},useDeferredValue:function(z){return x="useDeferredValue",Z0(),yq(z)},useTransition:function(){return x="useTransition",Z0(),fq()},useMutableSource:function(z,Q,X){return x="useMutableSource",Z0(),wq()},useSyncExternalStore:function(z,Q,X){return x="useSyncExternalStore",Z0(),Aq(z,Q,X)},useId:function(){return x="useId",Z0(),Eq()},unstable_isNewReconciler:Q1},G9={readContext:function(z){return _4(z)},useCallback:function(z,Q){return x="useCallback",Z0(),nZ(z,Q)},useContext:function(z){return x="useContext",Z0(),_4(z)},useEffect:function(z,Q){return x="useEffect",Z0(),jX(z,Q)},useImperativeHandle:function(z,Q,X){return x="useImperativeHandle",Z0(),oZ(z,Q,X)},useInsertionEffect:function(z,Q){return x="useInsertionEffect",Z0(),lZ(z,Q)},useLayoutEffect:function(z,Q){return x="useLayoutEffect",Z0(),iZ(z,Q)},useMemo:function(z,Q){x="useMemo",Z0();var X=G0.current;G0.current=t6;try{return tZ(z,Q)}finally{G0.current=X}},useReducer:function(z,Q,X){x="useReducer",Z0();var Z=G0.current;G0.current=t6;try{return Pq(z,Q,X)}finally{G0.current=Z}},useRef:function(z){return x="useRef",Z0(),xZ()},useState:function(z){x="useState",Z0();var Q=G0.current;G0.current=t6;try{return vq(z)}finally{G0.current=Q}},useDebugValue:function(z,Q){return x="useDebugValue",Z0(),rZ()},useDeferredValue:function(z){return x="useDeferredValue",Z0(),nB(z)},useTransition:function(){return x="useTransition",Z0(),eB()},useMutableSource:function(z,Q,X){return x="useMutableSource",Z0(),uZ()},useSyncExternalStore:function(z,Q,X){return x="useSyncExternalStore",Z0(),jZ(z,Q)},useId:function(){return x="useId",Z0(),sZ()},unstable_isNewReconciler:Q1},H9={readContext:function(z){return _4(z)},useCallback:function(z,Q){return x="useCallback",Z0(),nZ(z,Q)},useContext:function(z){return x="useContext",Z0(),_4(z)},useEffect:function(z,Q){return x="useEffect",Z0(),jX(z,Q)},useImperativeHandle:function(z,Q,X){return x="useImperativeHandle",Z0(),oZ(z,Q,X)},useInsertionEffect:function(z,Q){return x="useInsertionEffect",Z0(),lZ(z,Q)},useLayoutEffect:function(z,Q){return x="useLayoutEffect",Z0(),iZ(z,Q)},useMemo:function(z,Q){x="useMemo",Z0();var X=G0.current;G0.current=zY;try{return tZ(z,Q)}finally{G0.current=X}},useReducer:function(z,Q,X){x="useReducer",Z0();var Z=G0.current;G0.current=zY;try{return Mq(z,Q,X)}finally{G0.current=Z}},useRef:function(z){return x="useRef",Z0(),xZ()},useState:function(z){x="useState",Z0();var Q=G0.current;G0.current=zY;try{return kq(z)}finally{G0.current=Q}},useDebugValue:function(z,Q){return x="useDebugValue",Z0(),rZ()},useDeferredValue:function(z){return x="useDeferredValue",Z0(),tB(z)},useTransition:function(){return x="useTransition",Z0(),z9()},useMutableSource:function(z,Q,X){return x="useMutableSource",Z0(),uZ()},useSyncExternalStore:function(z,Q,X){return x="useSyncExternalStore",Z0(),jZ(z,Q)},useId:function(){return x="useId",Z0(),sZ()},unstable_isNewReconciler:Q1},W5={readContext:function(z){return hq(),_4(z)},useCallback:function(z,Q){return x="useCallback",E0(),B1(),Cq(z,Q)},useContext:function(z){return x="useContext",E0(),B1(),_4(z)},useEffect:function(z,Q){return x="useEffect",E0(),B1(),dZ(z,Q)},useImperativeHandle:function(z,Q,X){return x="useImperativeHandle",E0(),B1(),Vq(z,Q,X)},useInsertionEffect:function(z,Q){return x="useInsertionEffect",E0(),B1(),Tq(z,Q)},useLayoutEffect:function(z,Q){return x="useLayoutEffect",E0(),B1(),Sq(z,Q)},useMemo:function(z,Q){x="useMemo",E0(),B1();var X=G0.current;G0.current=W5;try{return Dq(z,Q)}finally{G0.current=X}},useReducer:function(z,Q,X){x="useReducer",E0(),B1();var Z=G0.current;G0.current=W5;try{return Fq(z,Q,X)}finally{G0.current=Z}},useRef:function(z){return x="useRef",E0(),B1(),Iq(z)},useState:function(z){x="useState",E0(),B1();var Q=G0.current;G0.current=W5;try{return gZ(z)}finally{G0.current=Q}},useDebugValue:function(z,Q){return x="useDebugValue",E0(),B1(),aZ()},useDeferredValue:function(z){return x="useDeferredValue",E0(),B1(),yq(z)},useTransition:function(){return x="useTransition",E0(),B1(),fq()},useMutableSource:function(z,Q,X){return x="useMutableSource",E0(),B1(),wq()},useSyncExternalStore:function(z,Q,X){return x="useSyncExternalStore",E0(),B1(),Aq(z,Q,X)},useId:function(){return x="useId",E0(),B1(),Eq()},unstable_isNewReconciler:Q1},t6={readContext:function(z){return hq(),_4(z)},useCallback:function(z,Q){return x="useCallback",E0(),Z0(),nZ(z,Q)},useContext:function(z){return x="useContext",E0(),Z0(),_4(z)},useEffect:function(z,Q){return x="useEffect",E0(),Z0(),jX(z,Q)},useImperativeHandle:function(z,Q,X){return x="useImperativeHandle",E0(),Z0(),oZ(z,Q,X)},useInsertionEffect:function(z,Q){return x="useInsertionEffect",E0(),Z0(),lZ(z,Q)},useLayoutEffect:function(z,Q){return x="useLayoutEffect",E0(),Z0(),iZ(z,Q)},useMemo:function(z,Q){x="useMemo",E0(),Z0();var X=G0.current;G0.current=t6;try{return tZ(z,Q)}finally{G0.current=X}},useReducer:function(z,Q,X){x="useReducer",E0(),Z0();var Z=G0.current;G0.current=t6;try{return Pq(z,Q,X)}finally{G0.current=Z}},useRef:function(z){return x="useRef",E0(),Z0(),xZ()},useState:function(z){x="useState",E0(),Z0();var Q=G0.current;G0.current=t6;try{return vq(z)}finally{G0.current=Q}},useDebugValue:function(z,Q){return x="useDebugValue",E0(),Z0(),rZ()},useDeferredValue:function(z){return x="useDeferredValue",E0(),Z0(),nB(z)},useTransition:function(){return x="useTransition",E0(),Z0(),eB()},useMutableSource:function(z,Q,X){return x="useMutableSource",E0(),Z0(),uZ()},useSyncExternalStore:function(z,Q,X){return x="useSyncExternalStore",E0(),Z0(),jZ(z,Q)},useId:function(){return x="useId",E0(),Z0(),sZ()},unstable_isNewReconciler:Q1},zY={readContext:function(z){return hq(),_4(z)},useCallback:function(z,Q){return x="useCallback",E0(),Z0(),nZ(z,Q)},useContext:function(z){return x="useContext",E0(),Z0(),_4(z)},useEffect:function(z,Q){return x="useEffect",E0(),Z0(),jX(z,Q)},useImperativeHandle:function(z,Q,X){return x="useImperativeHandle",E0(),Z0(),oZ(z,Q,X)},useInsertionEffect:function(z,Q){return x="useInsertionEffect",E0(),Z0(),lZ(z,Q)},useLayoutEffect:function(z,Q){return x="useLayoutEffect",E0(),Z0(),iZ(z,Q)},useMemo:function(z,Q){x="useMemo",E0(),Z0();var X=G0.current;G0.current=t6;try{return tZ(z,Q)}finally{G0.current=X}},useReducer:function(z,Q,X){x="useReducer",E0(),Z0();var Z=G0.current;G0.current=t6;try{return Mq(z,Q,X)}finally{G0.current=Z}},useRef:function(z){return x="useRef",E0(),Z0(),xZ()},useState:function(z){x="useState",E0(),Z0();var Q=G0.current;G0.current=t6;try{return kq(z)}finally{G0.current=Q}},useDebugValue:function(z,Q){return x="useDebugValue",E0(),Z0(),rZ()},useDeferredValue:function(z){return x="useDeferredValue",E0(),Z0(),tB(z)},useTransition:function(){return x="useTransition",E0(),Z0(),z9()},useMutableSource:function(z,Q,X){return x="useMutableSource",E0(),Z0(),uZ()},useSyncExternalStore:function(z,Q,X){return x="useSyncExternalStore",E0(),Z0(),jZ(z,Q)},useId:function(){return x="useId",E0(),Z0(),sZ()},unstable_isNewReconciler:Q1}}var N7=w1.unstable_now,K9=0,QY=-1,gX=-1,XY=-1,pq=!1,ZY=!1;function U9(){return pq}function oF(){ZY=!0}function aF(){pq=!1,ZY=!1}function rF(){pq=ZY,ZY=!1}function B9(){return K9}function _9(){K9=N7()}function mq(z){if(gX=N7(),z.actualStartTime<0)z.actualStartTime=N7()}function O9(z){gX=-1}function YY(z,Q){if(gX>=0){var X=N7()-gX;if(z.actualDuration+=X,Q)z.selfBaseDuration=X;gX=-1}}function b5(z){if(QY>=0){var Q=N7()-QY;QY=-1;var X=z.return;while(X!==null){switch(X.tag){case k:var Z=X.stateNode;Z.effectDuration+=Q;return;case i:var Y=X.stateNode;Y.effectDuration+=Q;return}X=X.return}}}function uq(z){if(XY>=0){var Q=N7()-XY;XY=-1;var X=z.return;while(X!==null){switch(X.tag){case k:var Z=X.stateNode;if(Z!==null)Z.passiveEffectDuration+=Q;return;case i:var Y=X.stateNode;if(Y!==null)Y.passiveEffectDuration+=Q;return}X=X.return}}}function R5(){QY=N7()}function jq(){XY=N7()}function gq(z){var Q=z.child;while(Q)z.actualDuration+=Q.actualDuration,Q=Q.sibling}function s6(z,Q){if(z&&z.defaultProps){var X=o0({},Q),Z=z.defaultProps;for(var Y in Z)if(X[Y]===void 0)X[Y]=Z[Y];return X}return Q}var xq={},cq,dq,lq,iq,oq,L9,JY,aq,rq,nq,xX;{cq=new Set,dq=new Set,lq=new Set,iq=new Set,aq=new Set,oq=new Set,rq=new Set,nq=new Set,xX=new Set;var W9=new Set;JY=function(z,Q){if(z===null||typeof z==="function")return;var X=Q+"_"+z;if(!W9.has(X))W9.add(X),H("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",Q,z)},L9=function(z,Q){if(Q===void 0){var X=V1(z)||"Component";if(!oq.has(X))oq.add(X),H("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",X)}},Object.defineProperty(xq,"_processChildContext",{enumerable:!1,value:function(){throw Error("_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn't supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal).")}}),Object.freeze(xq)}function tq(z,Q,X,Z){var Y=z.memoizedState,J=X(Z,Y);{if(z.mode&z4){I4(!0);try{J=X(Z,Y)}finally{I4(!1)}}L9(Q,J)}var q=J===null||J===void 0?Y:o0({},Y,J);if(z.memoizedState=q,z.lanes===a){var G=z.updateQueue;G.baseState=q}}var sq={isMounted:g3,enqueueSetState:function(z,Q,X){var Z=Vz(z),Y=$6(),J=w7(Z),q=x5(Y,J);if(q.payload=Q,X!==void 0&&X!==null)JY(X,"setState"),q.callback=X;var G=L7(Z,q,J);if(G!==null)M4(G,Z,J,Y),DZ(G,Z,J);TJ(Z,J)},enqueueReplaceState:function(z,Q,X){var Z=Vz(z),Y=$6(),J=w7(Z),q=x5(Y,J);if(q.tag=yB,q.payload=Q,X!==void 0&&X!==null)JY(X,"replaceState"),q.callback=X;var G=L7(Z,q,J);if(G!==null)M4(G,Z,J,Y),DZ(G,Z,J);TJ(Z,J)},enqueueForceUpdate:function(z,Q){var X=Vz(z),Z=$6(),Y=w7(X),J=x5(Z,Y);if(J.tag=SZ,Q!==void 0&&Q!==null)JY(Q,"forceUpdate"),J.callback=Q;var q=L7(X,J,Y);if(q!==null)M4(q,X,Y,Z),DZ(q,X,Y);RW(X,Y)}};function b9(z,Q,X,Z,Y,J,q){var G=z.stateNode;if(typeof G.shouldComponentUpdate==="function"){var K=G.shouldComponentUpdate(Z,J,q);{if(z.mode&z4){I4(!0);try{K=G.shouldComponentUpdate(Z,J,q)}finally{I4(!1)}}if(K===void 0)H("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",V1(Q)||"Component")}return K}if(Q.prototype&&Q.prototype.isPureReactComponent)return!KX(X,Z)||!KX(Y,J);return!0}function nF(z,Q,X){var Z=z.stateNode;{var Y=V1(Q)||"Component",J=Z.render;if(!J)if(Q.prototype&&typeof Q.prototype.render==="function")H("%s(...): No `render` method found on the returned component instance: did you accidentally return an object from the constructor?",Y);else H("%s(...): No `render` method found on the returned component instance: you may have forgotten to define `render`.",Y);if(Z.getInitialState&&!Z.getInitialState.isReactClassApproved&&!Z.state)H("getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",Y);if(Z.getDefaultProps&&!Z.getDefaultProps.isReactClassApproved)H("getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",Y);if(Z.propTypes)H("propTypes was defined as an instance property on %s. Use a static property to define propTypes instead.",Y);if(Z.contextType)H("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",Y);{if(Q.childContextTypes&&!xX.has(Q)&&(z.mode&z4)===T0)xX.add(Q),H(`%s uses the legacy childContextTypes API which is no longer supported and will be removed in the next major release. Use React.createContext() instead
|
|
63
|
+
|
|
64
|
+
.Learn more about this warning here: https://reactjs.org/link/legacy-context`,Y);if(Q.contextTypes&&!xX.has(Q)&&(z.mode&z4)===T0)xX.add(Q),H(`%s uses the legacy contextTypes API which is no longer supported and will be removed in the next major release. Use React.createContext() with static contextType instead.
|
|
65
|
+
|
|
66
|
+
Learn more about this warning here: https://reactjs.org/link/legacy-context`,Y);if(Z.contextTypes)H("contextTypes was defined as an instance property on %s. Use a static property to define contextTypes instead.",Y);if(Q.contextType&&Q.contextTypes&&!rq.has(Q))rq.add(Q),H("%s declares both contextTypes and contextType static properties. The legacy contextTypes property will be ignored.",Y)}if(typeof Z.componentShouldUpdate==="function")H("%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",Y);if(Q.prototype&&Q.prototype.isPureReactComponent&&typeof Z.shouldComponentUpdate<"u")H("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",V1(Q)||"A pure component");if(typeof Z.componentDidUnmount==="function")H("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",Y);if(typeof Z.componentDidReceiveProps==="function")H("%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().",Y);if(typeof Z.componentWillRecieveProps==="function")H("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",Y);if(typeof Z.UNSAFE_componentWillRecieveProps==="function")H("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",Y);var q=Z.props!==X;if(Z.props!==void 0&&q)H("%s(...): When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",Y,Y);if(Z.defaultProps)H("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",Y,Y);if(typeof Z.getSnapshotBeforeUpdate==="function"&&typeof Z.componentDidUpdate!=="function"&&!lq.has(Q))lq.add(Q),H("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",V1(Q));if(typeof Z.getDerivedStateFromProps==="function")H("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",Y);if(typeof Z.getDerivedStateFromError==="function")H("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",Y);if(typeof Q.getSnapshotBeforeUpdate==="function")H("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",Y);var G=Z.state;if(G&&(typeof G!=="object"||Q6(G)))H("%s.state: must be set to an object or null",Y);if(typeof Z.getChildContext==="function"&&typeof Q.childContextTypes!=="object")H("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",Y)}}function R9(z,Q){Q.updater=sq,z.stateNode=Q,h3(Q,z),Q._reactInternalInstance=xq}function N9(z,Q,X){var Z=!1,Y=I6,J=I6,q=Q.contextType;if("contextType"in Q){var G=q===null||q!==void 0&&q.$$typeof===N&&q._context===void 0;if(!G&&!nq.has(Q)){nq.add(Q);var K="";if(q===void 0)K=" However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file.";else if(typeof q!=="object")K=" However, it is set to a "+typeof q+".";else if(q.$$typeof===J1)K=" Did you accidentally pass the Context.Provider instead?";else if(q._context!==void 0)K=" Did you accidentally pass the Context.Consumer instead?";else K=" However, it is set to an object with keys {"+Object.keys(q).join(", ")+"}.";H("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",V1(Q)||"Component",K)}}if(typeof q==="object"&&q!==null)J=_4(q);else{Y=oz(z,Q,!0);var _=Q.contextTypes;Z=_!==null&&_!==void 0,J=Z?az(z,Y):I6}var O=new Q(X,J);if(z.mode&z4){I4(!0);try{O=new Q(X,J)}finally{I4(!1)}}var v=z.memoizedState=O.state!==null&&O.state!==void 0?O.state:null;R9(z,O);{if(typeof Q.getDerivedStateFromProps==="function"&&v===null){var A=V1(Q)||"Component";if(!dq.has(A))dq.add(A),H("`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.",A,O.state===null?"null":"undefined",A)}if(typeof Q.getDerivedStateFromProps==="function"||typeof O.getSnapshotBeforeUpdate==="function"){var D=null,y=null,h=null;if(typeof O.componentWillMount==="function"&&O.componentWillMount.__suppressDeprecationWarning!==!0)D="componentWillMount";else if(typeof O.UNSAFE_componentWillMount==="function")D="UNSAFE_componentWillMount";if(typeof O.componentWillReceiveProps==="function"&&O.componentWillReceiveProps.__suppressDeprecationWarning!==!0)y="componentWillReceiveProps";else if(typeof O.UNSAFE_componentWillReceiveProps==="function")y="UNSAFE_componentWillReceiveProps";if(typeof O.componentWillUpdate==="function"&&O.componentWillUpdate.__suppressDeprecationWarning!==!0)h="componentWillUpdate";else if(typeof O.UNSAFE_componentWillUpdate==="function")h="UNSAFE_componentWillUpdate";if(D!==null||y!==null||h!==null){var Y0=V1(Q)||"Component",w0=typeof Q.getDerivedStateFromProps==="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";if(!iq.has(Y0))iq.add(Y0),H(`Unsafe legacy lifecycles will not be called for components using new component APIs.
|
|
67
|
+
|
|
68
|
+
%s uses %s but also contains the following legacy lifecycles:%s%s%s
|
|
69
|
+
|
|
70
|
+
The above lifecycles should be removed. Learn more about this warning here:
|
|
71
|
+
https://reactjs.org/link/unsafe-component-lifecycles`,Y0,w0,D!==null?`
|
|
72
|
+
`+D:"",y!==null?`
|
|
73
|
+
`+y:"",h!==null?`
|
|
74
|
+
`+h:"")}}}if(Z)GB(z,Y,J);return O}function tF(z,Q){var X=Q.state;if(typeof Q.componentWillMount==="function")Q.componentWillMount();if(typeof Q.UNSAFE_componentWillMount==="function")Q.UNSAFE_componentWillMount();if(X!==Q.state)H("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",d0(z)||"Component"),sq.enqueueReplaceState(Q,Q.state,null)}function F9(z,Q,X,Z){var Y=Q.state;if(typeof Q.componentWillReceiveProps==="function")Q.componentWillReceiveProps(X,Z);if(typeof Q.UNSAFE_componentWillReceiveProps==="function")Q.UNSAFE_componentWillReceiveProps(X,Z);if(Q.state!==Y){{var J=d0(z)||"Component";if(!cq.has(J))cq.add(J),H("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",J)}sq.enqueueReplaceState(Q,Q.state,null)}}function eq(z,Q,X,Z){nF(z,Q,X);var Y=z.stateNode;Y.props=X,Y.state=z.memoizedState,Y.refs={},qq(z);var J=Q.contextType;if(typeof J==="object"&&J!==null)Y.context=_4(J);else{var q=oz(z,Q,!0);Y.context=az(z,q)}{if(Y.state===X){var G=V1(Q)||"Component";if(!aq.has(G))aq.add(G),H("%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",G)}if(z.mode&z4)r6.recordLegacyContextWarning(z,Y);r6.recordUnsafeLifecycleWarnings(z,Y)}Y.state=z.memoizedState;var K=Q.getDerivedStateFromProps;if(typeof K==="function")tq(z,Q,K,X),Y.state=z.memoizedState;if(typeof Q.getDerivedStateFromProps!=="function"&&typeof Y.getSnapshotBeforeUpdate!=="function"&&(typeof Y.UNSAFE_componentWillMount==="function"||typeof Y.componentWillMount==="function"))tF(z,Y),yZ(z,X,Y,Z),Y.state=z.memoizedState;if(typeof Y.componentDidMount==="function"){var _=Y1;if(_|=j7,(z.mode&K5)!==T0)_|=D5;z.flags|=_}}function sF(z,Q,X,Z){var{stateNode:Y,memoizedProps:J}=z;Y.props=J;var q=Y.context,G=Q.contextType,K=I6;if(typeof G==="object"&&G!==null)K=_4(G);else{var _=oz(z,Q,!0);K=az(z,_)}var O=Q.getDerivedStateFromProps,v=typeof O==="function"||typeof Y.getSnapshotBeforeUpdate==="function";if(!v&&(typeof Y.UNSAFE_componentWillReceiveProps==="function"||typeof Y.componentWillReceiveProps==="function")){if(J!==X||q!==K)F9(z,Y,X,K)}EB();var A=z.memoizedState,D=Y.state=A;if(yZ(z,X,Y,Z),D=z.memoizedState,J===X&&A===D&&!OZ()&&!fZ()){if(typeof Y.componentDidMount==="function"){var y=Y1;if(y|=j7,(z.mode&K5)!==T0)y|=D5;z.flags|=y}return!1}if(typeof O==="function")tq(z,Q,O,X),D=z.memoizedState;var h=fZ()||b9(z,Q,J,X,A,D,K);if(h){if(!v&&(typeof Y.UNSAFE_componentWillMount==="function"||typeof Y.componentWillMount==="function")){if(typeof Y.componentWillMount==="function")Y.componentWillMount();if(typeof Y.UNSAFE_componentWillMount==="function")Y.UNSAFE_componentWillMount()}if(typeof Y.componentDidMount==="function"){var Y0=Y1;if(Y0|=j7,(z.mode&K5)!==T0)Y0|=D5;z.flags|=Y0}}else{if(typeof Y.componentDidMount==="function"){var w0=Y1;if(w0|=j7,(z.mode&K5)!==T0)w0|=D5;z.flags|=w0}z.memoizedProps=X,z.memoizedState=D}return Y.props=X,Y.state=D,Y.context=K,h}function eF(z,Q,X,Z,Y){var J=Q.stateNode;fB(z,Q);var q=Q.memoizedProps,G=Q.type===Q.elementType?q:s6(Q.type,q);J.props=G;var K=Q.pendingProps,_=J.context,O=X.contextType,v=I6;if(typeof O==="object"&&O!==null)v=_4(O);else{var A=oz(Q,X,!0);v=az(Q,A)}var D=X.getDerivedStateFromProps,y=typeof D==="function"||typeof J.getSnapshotBeforeUpdate==="function";if(!y&&(typeof J.UNSAFE_componentWillReceiveProps==="function"||typeof J.componentWillReceiveProps==="function")){if(q!==K||_!==v)F9(Q,J,Z,v)}EB();var h=Q.memoizedState,Y0=J.state=h;if(yZ(Q,Z,J,Y),Y0=Q.memoizedState,q===K&&h===Y0&&!OZ()&&!fZ()&&!n1){if(typeof J.componentDidUpdate==="function"){if(q!==z.memoizedProps||h!==z.memoizedState)Q.flags|=Y1}if(typeof J.getSnapshotBeforeUpdate==="function"){if(q!==z.memoizedProps||h!==z.memoizedState)Q.flags|=m7}return!1}if(typeof D==="function")tq(Q,X,D,Z),Y0=Q.memoizedState;var w0=fZ()||b9(Q,X,G,Z,h,Y0,v)||n1;if(w0){if(!y&&(typeof J.UNSAFE_componentWillUpdate==="function"||typeof J.componentWillUpdate==="function")){if(typeof J.componentWillUpdate==="function")J.componentWillUpdate(Z,Y0,v);if(typeof J.UNSAFE_componentWillUpdate==="function")J.UNSAFE_componentWillUpdate(Z,Y0,v)}if(typeof J.componentDidUpdate==="function")Q.flags|=Y1;if(typeof J.getSnapshotBeforeUpdate==="function")Q.flags|=m7}else{if(typeof J.componentDidUpdate==="function"){if(q!==z.memoizedProps||h!==z.memoizedState)Q.flags|=Y1}if(typeof J.getSnapshotBeforeUpdate==="function"){if(q!==z.memoizedProps||h!==z.memoizedState)Q.flags|=m7}Q.memoizedProps=Z,Q.memoizedState=Y0}return J.props=Z,J.state=Y0,J.context=v,w0}function Jz(z,Q){return{value:z,source:Q,stack:EH(Q),digest:null}}function zG(z,Q,X){return{value:z,source:null,stack:X!=null?X:null,digest:Q!=null?Q:null}}function zP(z,Q){return!0}function QG(z,Q){try{var X=zP(z,Q);if(X===!1)return;var{value:Z,source:Y,stack:J}=Q,q=J!==null?J:"";if(Z!=null&&Z._suppressLogging){if(z.tag===b)return;console.error(Z)}var G=Y?d0(Y):null,K=G?"The above error occurred in the <"+G+"> component:":"The above error occurred in one of your React components:",_;if(z.tag===k)_=`Consider adding an error boundary to your tree to customize error handling behavior.
|
|
75
|
+
Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.`;else{var O=d0(z)||"Anonymous";_="React will try to recreate this component tree from scratch "+("using the error boundary you provided, "+O+".")}var v=K+`
|
|
76
|
+
`+q+`
|
|
77
|
+
|
|
78
|
+
`+(""+_);console.error(v)}catch(A){setTimeout(function(){throw A})}}var QP=typeof WeakMap==="function"?WeakMap:Map;function P9(z,Q,X){var Z=x5(m1,X);Z.tag=Jq,Z.payload={element:null};var Y=Q.value;return Z.callback=function(){sM(Y),QG(z,Q)},Z}function XG(z,Q,X){var Z=x5(m1,X);Z.tag=Jq;var Y=z.type.getDerivedStateFromError;if(typeof Y==="function"){var J=Q.value;Z.payload=function(){return Y(J)},Z.callback=function(){y_(z),QG(z,Q)}}var q=z.stateNode;if(q!==null&&typeof q.componentDidCatch==="function")Z.callback=function(){if(y_(z),QG(z,Q),typeof Y!=="function")nM(this);var{value:K,stack:_}=Q;if(this.componentDidCatch(K,{componentStack:_!==null?_:""}),typeof Y!=="function"){if(!w6(z.lanes,f0))H("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",d0(z)||"Unknown")}};return Z}function M9(z,Q,X){var Z=z.pingCache,Y;if(Z===null)Z=z.pingCache=new QP,Y=new Set,Z.set(Q,Y);else if(Y=Z.get(Q),Y===void 0)Y=new Set,Z.set(Q,Y);if(!Y.has(X)){Y.add(X);var J=eM.bind(null,z,Q,X);if(l6)J8(z,X);Q.then(J,J)}}function XP(z,Q,X,Z){var Y=z.updateQueue;if(Y===null){var J=new Set;J.add(X),z.updateQueue=J}else Y.add(X)}function ZP(z,Q){var X=z.tag;if((z.mode&s0)===T0&&(X===L||X===f||X===t)){var Z=z.alternate;if(Z)z.updateQueue=Z.updateQueue,z.memoizedState=Z.memoizedState,z.lanes=Z.lanes;else z.updateQueue=null,z.memoizedState=null}}function w9(z){var Q=z;do{if(Q.tag===l&&mF(Q))return Q;Q=Q.return}while(Q!==null);return null}function A9(z,Q,X,Z,Y){if((z.mode&s0)===T0){if(z===Q)z.flags|=Z6;else{if(z.flags|=H1,X.flags|=PJ,X.flags&=~(p3|gQ),X.tag===b){var J=X.alternate;if(J===null)X.tag=k0;else{var q=x5(m1,f0);q.tag=SZ,L7(X,q,f0)}}X.lanes=c0(X.lanes,f0)}return z}return z.flags|=Z6,z.lanes=Y,z}function YP(z,Q,X,Z,Y){if(X.flags|=gQ,l6)J8(z,Y);if(Z!==null&&typeof Z==="object"&&typeof Z.then==="function"){var J=Z;if(ZP(X),f4()&&X.mode&s0)LB();var q=w9(Q);if(q!==null){if(q.flags&=~V5,A9(q,Q,X,z,Y),q.mode&s0)M9(z,J,Y);XP(q,z,J);return}else{if(!IW(Y)){M9(z,J,Y),hG();return}var G=Error("A component suspended while responding to synchronous input. This will cause the UI to be replaced with a loading indicator. To fix, updates that suspend should be wrapped with startTransition.");Z=G}}else if(f4()&&X.mode&s0){LB();var K=w9(Q);if(K!==null){if((K.flags&Z6)===V0)K.flags|=V5;A9(K,Q,X,z,Y),o$(Jz(Z,X));return}}Z=Jz(Z,X),xM(Z);var _=Q;do{switch(_.tag){case k:{var O=Z;_.flags|=Z6;var v=rQ(Y);_.lanes=c0(_.lanes,v);var A=P9(_,O,v);Gq(_,A);return}case b:var D=Z,y=_.type,h=_.stateNode;if((_.flags&H1)===V0&&(typeof y.getDerivedStateFromError==="function"||h!==null&&typeof h.componentDidCatch==="function"&&!A_(h))){_.flags|=Z6;var Y0=rQ(Y);_.lanes=c0(_.lanes,Y0);var w0=XG(_,D,Y0);Gq(_,w0);return}break}_=_.return}while(_!==null)}function JP(){return null}var cX=$.ReactCurrentOwner,e6=!1,ZG,dX,YG,JG,$G,$z,qG,$Y,lX;ZG={},dX={},YG={},JG={},$G={},$z=!1,qG={},$Y={},lX={};function Y6(z,Q,X,Z){if(z===null)Q.child=IB(Q,null,X,Z);else Q.child=sz(Q,z.child,X,Z)}function $P(z,Q,X,Z){Q.child=sz(Q,z.child,null,Z),Q.child=sz(Q,null,X,Z)}function v9(z,Q,X,Z,Y){if(Q.type!==Q.elementType){var J=X.propTypes;if(J)o6(J,Z,"prop",V1(X))}var q=X.render,G=Q.ref,K,_;zQ(Q,Y),cQ(Q);{if(cX.current=Q,G5(!0),K=$Q(z,Q,q,Z,G,Y),_=qQ(),Q.mode&z4){I4(!0);try{K=$Q(z,Q,q,Z,G,Y),_=qQ()}finally{I4(!1)}}G5(!1)}if(yz(),z!==null&&!e6)return gB(z,Q,Y),c5(z,Q,Y);if(f4()&&_)g$(Q);return Q.flags|=Cz,Y6(z,Q,K,Y),Q.child}function k9(z,Q,X,Z,Y){if(z===null){var J=X.type;if(Ww(J)&&X.compare===null&&X.defaultProps===void 0){var q=J;return q=LQ(J),Q.tag=t,Q.type=q,KG(Q,J),I9(z,Q,q,Z,Y)}{var G=J.propTypes;if(G)o6(G,Z,"prop",V1(J));if(X.defaultProps!==void 0){var K=V1(J)||"Unknown";if(!lX[K])H("%s: Support for defaultProps will be removed from memo components in a future major release. Use JavaScript default parameters instead.",K),lX[K]=!0}}var _=oG(X.type,null,Z,Q,Q.mode,Y);return _.ref=Q.ref,_.return=Q,Q.child=_,_}{var O=X.type,v=O.propTypes;if(v)o6(v,Z,"prop",V1(O))}var A=z.child,D=WG(z,Y);if(!D){var y=A.memoizedProps,h=X.compare;if(h=h!==null?h:KX,h(y,Z)&&z.ref===Q.ref)return c5(z,Q,Y)}Q.flags|=Cz;var Y0=Uz(A,Z);return Y0.ref=Q.ref,Y0.return=Q,Q.child=Y0,Y0}function I9(z,Q,X,Z,Y){if(Q.type!==Q.elementType){var J=Q.elementType;if(J.$$typeof===j0){var q=J,G=q._payload,K=q._init;try{J=K(G)}catch(v){J=null}var _=J&&J.propTypes;if(_)o6(_,Z,"prop",V1(J))}}if(z!==null){var O=z.memoizedProps;if(KX(O,Z)&&z.ref===Q.ref&&Q.type===z.type){if(e6=!1,Q.pendingProps=Z=O,!WG(z,Y))return Q.lanes=z.lanes,c5(z,Q,Y);else if((z.flags&PJ)!==V0)e6=!0}}return GG(z,Q,X,Z,Y)}function T9(z,Q,X){var Z=Q.pendingProps,Y=Z.children,J=z!==null?z.memoizedState:null;if(Z.mode==="hidden"||d)if((Q.mode&s0)===T0){var q={baseLanes:a,cachePool:null,transitions:null};Q.memoizedState=q,NY(Q,X)}else if(!w6(X,M6)){var G=null,K;if(J!==null){var _=J.baseLanes;K=c0(_,X)}else K=X;Q.lanes=Q.childLanes=u8(M6);var O={baseLanes:K,cachePool:G,transitions:null};return Q.memoizedState=O,Q.updateQueue=null,NY(Q,K),null}else{var v={baseLanes:a,cachePool:null,transitions:null};Q.memoizedState=v;var A=J!==null?J.baseLanes:X;NY(Q,A)}else{var D;if(J!==null)D=c0(J.baseLanes,X),Q.memoizedState=null;else D=X;NY(Q,D)}return Y6(z,Q,Y,X),Q.child}function qP(z,Q,X){var Z=Q.pendingProps;return Y6(z,Q,Z,X),Q.child}function GP(z,Q,X){var Z=Q.pendingProps.children;return Y6(z,Q,Z,X),Q.child}function HP(z,Q,X){{Q.flags|=Y1;{var Z=Q.stateNode;Z.effectDuration=0,Z.passiveEffectDuration=0}}var Y=Q.pendingProps,J=Y.children;return Y6(z,Q,J,X),Q.child}function S9(z,Q){var X=Q.ref;if(z===null&&X!==null||z!==null&&z.ref!==X)Q.flags|=Z7,Q.flags|=MJ}function GG(z,Q,X,Z,Y){if(Q.type!==Q.elementType){var J=X.propTypes;if(J)o6(J,Z,"prop",V1(X))}var q;{var G=oz(Q,X,!0);q=az(Q,G)}var K,_;zQ(Q,Y),cQ(Q);{if(cX.current=Q,G5(!0),K=$Q(z,Q,X,Z,q,Y),_=qQ(),Q.mode&z4){I4(!0);try{K=$Q(z,Q,X,Z,q,Y),_=qQ()}finally{I4(!1)}}G5(!1)}if(yz(),z!==null&&!e6)return gB(z,Q,Y),c5(z,Q,Y);if(f4()&&_)g$(Q);return Q.flags|=Cz,Y6(z,Q,K,Y),Q.child}function V9(z,Q,X,Z,Y){{switch(Cw(Q)){case!1:{var{stateNode:J,type:q}=Q,G=new q(Q.memoizedProps,J.context),K=G.state;J.updater.enqueueSetState(J,K,null);break}case!0:{Q.flags|=H1,Q.flags|=Z6;var _=Error("Simulated error coming from DevTools"),O=rQ(Y);Q.lanes=c0(Q.lanes,O);var v=XG(Q,Jz(_,Q),O);Gq(Q,v);break}}if(Q.type!==Q.elementType){var A=X.propTypes;if(A)o6(A,Z,"prop",V1(X))}}var D;if(_5(X))D=!0,WZ(Q);else D=!1;zQ(Q,Y);var y=Q.stateNode,h;if(y===null)GY(z,Q),N9(Q,X,Z),eq(Q,X,Z,Y),h=!0;else if(z===null)h=sF(Q,X,Z,Y);else h=eF(z,Q,X,Z,Y);var Y0=HG(z,Q,X,h,D,Y);{var w0=Q.stateNode;if(h&&w0.props!==Z){if(!$z)H("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",d0(Q)||"a component");$z=!0}}return Y0}function HG(z,Q,X,Z,Y,J){S9(z,Q);var q=(Q.flags&H1)!==V0;if(!Z&&!q){if(Y)UB(Q,X,!1);return c5(z,Q,J)}var G=Q.stateNode;cX.current=Q;var K;if(q&&typeof X.getDerivedStateFromError!=="function")K=null,O9();else{cQ(Q);{if(G5(!0),K=G.render(),Q.mode&z4){I4(!0);try{G.render()}finally{I4(!1)}}G5(!1)}yz()}if(Q.flags|=Cz,z!==null&&q)$P(z,Q,K,J);else Y6(z,Q,K,J);if(Q.memoizedState=G.state,Y)UB(Q,X,!0);return Q.child}function C9(z){var Q=z.stateNode;if(Q.pendingContext)HB(z,Q.pendingContext,Q.pendingContext!==Q.context);else if(Q.context)HB(z,Q.context,!1);Hq(z,Q.containerInfo)}function KP(z,Q,X){if(C9(Q),z===null)throw Error("Should have a current fiber. This is a bug in React.");var{pendingProps:Z,memoizedState:Y}=Q,J=Y.element;fB(z,Q),yZ(Q,Z,null,X);var{memoizedState:q,stateNode:G}=Q,K=q.element;if(Y.isDehydrated){var _={element:K,isDehydrated:!1,cache:q.cache,pendingSuspenseBoundaries:q.pendingSuspenseBoundaries,transitions:q.transitions},O=Q.updateQueue;if(O.baseState=_,Q.memoizedState=_,Q.flags&V5){var v=Jz(Error("There was an error while hydrating. Because the error happened outside of a Suspense boundary, the entire root will switch to client rendering."),Q);return D9(z,Q,K,X,v)}else if(K!==J){var A=Jz(Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),Q);return D9(z,Q,K,X,A)}else{OF(Q);var D=IB(Q,null,K,X);Q.child=D;var y=D;while(y)y.flags=y.flags&~B4|C5,y=y.sibling}}else{if(tz(),K===J)return c5(z,Q,X);Y6(z,Q,K,X)}return Q.child}function D9(z,Q,X,Z,Y){return tz(),o$(Y),Q.flags|=V5,Y6(z,Q,X,Z),Q.child}function UP(z,Q,X){if(mB(Q),z===null)i$(Q);var{type:Z,pendingProps:Y}=Q,J=z!==null?z.memoizedProps:null,q=Y.children,G=T$(Z,Y);if(G)q=null;else if(J!==null&&T$(Z,J))Q.flags|=jQ;return S9(z,Q),Y6(z,Q,q,X),Q.child}function BP(z,Q){if(z===null)i$(Q);return null}function _P(z,Q,X,Z){GY(z,Q);var Y=Q.pendingProps,J=X,q=J._payload,G=J._init,K=G(q);Q.type=K;var _=Q.tag=bw(K),O=s6(K,Y),v;switch(_){case L:return KG(Q,K),Q.type=K=LQ(K),v=GG(null,Q,K,O,Z),v;case b:return Q.type=K=gG(K),v=V9(null,Q,K,O,Z),v;case f:return Q.type=K=xG(K),v=v9(null,Q,K,O,Z),v;case o:{if(Q.type!==Q.elementType){var A=K.propTypes;if(A)o6(A,O,"prop",V1(K))}return v=k9(null,Q,K,s6(K.type,O),Z),v}}var D="";if(K!==null&&typeof K==="object"&&K.$$typeof===j0)D=" Did you wrap a component in React.lazy() more than once?";throw Error("Element type is invalid. Received a promise that resolves to: "+K+". "+("Lazy element type must resolve to a class or function."+D))}function OP(z,Q,X,Z,Y){GY(z,Q),Q.tag=b;var J;if(_5(X))J=!0,WZ(Q);else J=!1;return zQ(Q,Y),N9(Q,X,Z),eq(Q,X,Z,Y),HG(null,Q,X,!0,J,Y)}function LP(z,Q,X,Z){GY(z,Q);var Y=Q.pendingProps,J;{var q=oz(Q,X,!1);J=az(Q,q)}zQ(Q,Z);var G,K;cQ(Q);{if(X.prototype&&typeof X.prototype.render==="function"){var _=V1(X)||"Unknown";if(!ZG[_])H("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",_,_),ZG[_]=!0}if(Q.mode&z4)r6.recordLegacyContextWarning(Q,null);G5(!0),cX.current=Q,G=$Q(null,Q,X,Y,J,Z),K=qQ(),G5(!1)}if(yz(),Q.flags|=Cz,typeof G==="object"&&G!==null&&typeof G.render==="function"&&G.$$typeof===void 0){var O=V1(X)||"Unknown";if(!dX[O])H("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",O,O,O),dX[O]=!0}if(typeof G==="object"&&G!==null&&typeof G.render==="function"&&G.$$typeof===void 0){{var v=V1(X)||"Unknown";if(!dX[v])H("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",v,v,v),dX[v]=!0}Q.tag=b,Q.memoizedState=null,Q.updateQueue=null;var A=!1;if(_5(X))A=!0,WZ(Q);else A=!1;return Q.memoizedState=G.state!==null&&G.state!==void 0?G.state:null,qq(Q),R9(Q,G),eq(Q,X,Y,Z),HG(null,Q,X,!0,A,Z)}else{if(Q.tag=L,Q.mode&z4){I4(!0);try{G=$Q(null,Q,X,Y,J,Z),K=qQ()}finally{I4(!1)}}if(f4()&&K)g$(Q);return Y6(null,Q,G,Z),KG(Q,X),Q.child}}function KG(z,Q){{if(Q){if(Q.childContextTypes)H("%s(...): childContextTypes cannot be defined on a function component.",Q.displayName||Q.name||"Component")}if(z.ref!==null){var X="",Z=fQ();if(Z)X+=`
|
|
79
|
+
|
|
80
|
+
Check the render method of \``+Z+"`.";var Y=Z||"",J=z._debugSource;if(J)Y=J.fileName+":"+J.lineNumber;if(!$G[Y])$G[Y]=!0,H("Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?%s",X)}if(Q.defaultProps!==void 0){var q=V1(Q)||"Unknown";if(!lX[q])H("%s: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.",q),lX[q]=!0}if(typeof Q.getDerivedStateFromProps==="function"){var G=V1(Q)||"Unknown";if(!JG[G])H("%s: Function components do not support getDerivedStateFromProps.",G),JG[G]=!0}if(typeof Q.contextType==="object"&&Q.contextType!==null){var K=V1(Q)||"Unknown";if(!YG[K])H("%s: Function components do not support contextType.",K),YG[K]=!0}}}var UG={dehydrated:null,treeContext:null,retryLane:T4};function BG(z){return{baseLanes:z,cachePool:JP(),transitions:null}}function WP(z,Q){var X=null;return{baseLanes:c0(z.baseLanes,Q),cachePool:X,transitions:z.transitions}}function bP(z,Q,X,Z){if(Q!==null){var Y=Q.memoizedState;if(Y===null)return!1}return Bq(z,fX)}function RP(z,Q){return m8(z.childLanes,Q)}function y9(z,Q,X){var Z=Q.pendingProps;if(Dw(Q))Q.flags|=H1;var Y=n6.current,J=!1,q=(Q.flags&H1)!==V0;if(q||bP(Y,z))J=!0,Q.flags&=~H1;else if(z===null||z.memoizedState!==null)Y=pF(Y,jB);if(Y=XQ(Y),b7(Q,Y),z===null){i$(Q);var G=Q.memoizedState;if(G!==null){var K=G.dehydrated;if(K!==null)return wP(Q,K)}var{children:_,fallback:O}=Z;if(J){var v=NP(Q,_,O,X),A=Q.child;return A.memoizedState=BG(X),Q.memoizedState=UG,v}else return _G(Q,_)}else{var D=z.memoizedState;if(D!==null){var y=D.dehydrated;if(y!==null)return AP(z,Q,q,Z,y,D,X)}if(J){var{fallback:h,children:Y0}=Z,w0=PP(z,Q,Y0,h,X),R0=Q.child,n0=z.child.memoizedState;return R0.memoizedState=n0===null?BG(X):WP(n0,X),R0.childLanes=RP(z,X),Q.memoizedState=UG,w0}else{var t0=Z.children,S=FP(z,Q,t0,X);return Q.memoizedState=null,S}}}function _G(z,Q,X){var Z=z.mode,Y={mode:"visible",children:Q},J=OG(Y,Z);return J.return=z,z.child=J,J}function NP(z,Q,X,Z){var{mode:Y,child:J}=z,q={mode:"hidden",children:Q},G,K;if((Y&s0)===T0&&J!==null){if(G=J,G.childLanes=a,G.pendingProps=q,z.mode&F1)G.actualDuration=0,G.actualStartTime=-1,G.selfBaseDuration=0,G.treeBaseDuration=0;K=v7(X,Y,Z,null)}else G=OG(q,Y),K=v7(X,Y,Z,null);return G.return=z,K.return=z,G.sibling=K,z.child=G,K}function OG(z,Q,X){return E_(z,Q,a,null)}function f9(z,Q){return Uz(z,Q)}function FP(z,Q,X,Z){var Y=z.child,J=Y.sibling,q=f9(Y,{mode:"visible",children:X});if((Q.mode&s0)===T0)q.lanes=Z;if(q.return=Q,q.sibling=null,J!==null){var G=Q.deletions;if(G===null)Q.deletions=[J],Q.flags|=p7;else G.push(J)}return Q.child=q,q}function PP(z,Q,X,Z,Y){var J=Q.mode,q=z.child,G=q.sibling,K={mode:"hidden",children:X},_;if((J&s0)===T0&&Q.child!==q){var O=Q.child;if(_=O,_.childLanes=a,_.pendingProps=K,Q.mode&F1)_.actualDuration=0,_.actualStartTime=-1,_.selfBaseDuration=q.selfBaseDuration,_.treeBaseDuration=q.treeBaseDuration;Q.deletions=null}else _=f9(q,K),_.subtreeFlags=q.subtreeFlags&y5;var v;if(G!==null)v=Uz(G,Z);else v=v7(Z,J,Y,null),v.flags|=B4;return v.return=Q,_.return=Q,_.sibling=v,Q.child=_,v}function qY(z,Q,X,Z){if(Z!==null)o$(Z);sz(Q,z.child,null,X);var Y=Q.pendingProps,J=Y.children,q=_G(Q,J);return q.flags|=B4,Q.memoizedState=null,q}function MP(z,Q,X,Z,Y){var J=Q.mode,q={mode:"visible",children:X},G=OG(q,J),K=v7(Z,J,Y,null);if(K.flags|=B4,G.return=Q,K.return=Q,G.sibling=K,Q.child=G,(Q.mode&s0)!==T0)sz(Q,z.child,null,Y);return K}function wP(z,Q,X){if((z.mode&s0)===T0)H("Cannot hydrate Suspense in legacy mode. Switch from ReactDOM.hydrate(element, container) to ReactDOMClient.hydrateRoot(container, <App />).render(element) or remove the Suspense components from the server rendered components."),z.lanes=u8(f0);else if(D$(Q))z.lanes=u8(d7);else z.lanes=u8(M6);return null}function AP(z,Q,X,Z,Y,J,q){if(!X){if(BF(),(Q.mode&s0)===T0)return qY(z,Q,q,null);if(D$(Y)){var G,K,_;{var O=SN(Y);G=O.digest,K=O.message,_=O.stack}var v;if(K)v=Error(K);else v=Error("The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering.");var A=zG(v,G,_);return qY(z,Q,q,A)}var D=w6(q,z.childLanes);if(e6||D){var y=RY();if(y!==null){var h=EW(y,q);if(h!==T4&&h!==J.retryLane){J.retryLane=h;var Y0=m1;W6(z,h),M4(y,z,h,Y0)}}hG();var w0=zG(Error("This Suspense boundary received an update before it finished hydrating. This caused the boundary to switch to client rendering. The usual way to fix this is to wrap the original update in startTransition."));return qY(z,Q,q,w0)}else if(XB(Y)){Q.flags|=H1,Q.child=z.child;var R0=zw.bind(null,z);return VN(Y,R0),null}else{LF(Q,Y,J.treeContext);var n0=Z.children,t0=_G(Q,n0);return t0.flags|=C5,t0}}else if(Q.flags&V5){Q.flags&=~V5;var S=zG(Error("There was an error while hydrating this Suspense boundary. Switched to client rendering."));return qY(z,Q,q,S)}else if(Q.memoizedState!==null)return Q.child=z.child,Q.flags|=H1,null;else{var{children:m,fallback:V}=Z,n=MP(z,Q,m,V,q),H0=Q.child;return H0.memoizedState=BG(q),Q.memoizedState=UG,n}}function E9(z,Q,X){z.lanes=c0(z.lanes,Q);var Z=z.alternate;if(Z!==null)Z.lanes=c0(Z.lanes,Q);Zq(z.return,Q,X)}function vP(z,Q,X){var Z=Q;while(Z!==null){if(Z.tag===l){var Y=Z.memoizedState;if(Y!==null)E9(Z,X,z)}else if(Z.tag===N0)E9(Z,X,z);else if(Z.child!==null){Z.child.return=Z,Z=Z.child;continue}if(Z===z)return;while(Z.sibling===null){if(Z.return===null||Z.return===z)return;Z=Z.return}Z.sibling.return=Z.return,Z=Z.sibling}}function kP(z){var Q=z,X=null;while(Q!==null){var Z=Q.alternate;if(Z!==null&&pZ(Z)===null)X=Q;Q=Q.sibling}return X}function IP(z){if(z!==void 0&&z!=="forwards"&&z!=="backwards"&&z!=="together"&&!qG[z])if(qG[z]=!0,typeof z==="string")switch(z.toLowerCase()){case"together":case"forwards":case"backwards":{H('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',z,z.toLowerCase());break}case"forward":case"backward":{H('"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.',z,z.toLowerCase());break}default:H('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',z);break}else H('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',z)}function TP(z,Q){if(z!==void 0&&!$Y[z]){if(z!=="collapsed"&&z!=="hidden")$Y[z]=!0,H('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "collapsed" or "hidden"?',z);else if(Q!=="forwards"&&Q!=="backwards")$Y[z]=!0,H('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',z)}}function h9(z,Q){{var X=Q6(z),Z=!X&&typeof e1(z)==="function";if(X||Z){var Y=X?"array":"iterable";return H("A nested %s was passed to row #%s in <SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder: <SuspenseList revealOrder=...> ... <SuspenseList revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>",Y,Q,Y),!1}}return!0}function SP(z,Q){if((Q==="forwards"||Q==="backwards")&&z!==void 0&&z!==null&&z!==!1)if(Q6(z)){for(var X=0;X<z.length;X++)if(!h9(z[X],X))return}else{var Z=e1(z);if(typeof Z==="function"){var Y=Z.call(z);if(Y){var J=Y.next(),q=0;for(;!J.done;J=Y.next()){if(!h9(J.value,q))return;q++}}}else H('A single row was passed to a <SuspenseList revealOrder="%s" />. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',Q)}}function LG(z,Q,X,Z,Y){var J=z.memoizedState;if(J===null)z.memoizedState={isBackwards:Q,rendering:null,renderingStartTime:0,last:Z,tail:X,tailMode:Y};else J.isBackwards=Q,J.rendering=null,J.renderingStartTime=0,J.last=Z,J.tail=X,J.tailMode=Y}function p9(z,Q,X){var Z=Q.pendingProps,Y=Z.revealOrder,J=Z.tail,q=Z.children;IP(Y),TP(J,Y),SP(q,Y),Y6(z,Q,q,X);var G=n6.current,K=Bq(G,fX);if(K)G=_q(G,fX),Q.flags|=H1;else{var _=z!==null&&(z.flags&H1)!==V0;if(_)vP(Q,Q.child,X);G=XQ(G)}if(b7(Q,G),(Q.mode&s0)===T0)Q.memoizedState=null;else switch(Y){case"forwards":{var O=kP(Q.child),v;if(O===null)v=Q.child,Q.child=null;else v=O.sibling,O.sibling=null;LG(Q,!1,v,O,J);break}case"backwards":{var A=null,D=Q.child;Q.child=null;while(D!==null){var y=D.alternate;if(y!==null&&pZ(y)===null){Q.child=D;break}var h=D.sibling;D.sibling=A,A=D,D=h}LG(Q,!0,A,null,J);break}case"together":{LG(Q,!1,null,null,void 0);break}default:Q.memoizedState=null}return Q.child}function VP(z,Q,X){Hq(Q,Q.stateNode.containerInfo);var Z=Q.pendingProps;if(z===null)Q.child=sz(Q,null,Z,X);else Y6(z,Q,Z,X);return Q.child}var m9=!1;function CP(z,Q,X){var Z=Q.type,Y=Z._context,J=Q.pendingProps,q=Q.memoizedProps,G=J.value;{if(!("value"in J)){if(!m9)m9=!0,H("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?")}var K=Q.type.propTypes;if(K)o6(K,J,"prop","Context.Provider")}if(VB(Q,Y,G),q!==null){var _=q.value;if(k6(_,G)){if(q.children===J.children&&!OZ())return c5(z,Q,X)}else TF(Q,Y,X)}var O=J.children;return Y6(z,Q,O,X),Q.child}var u9=!1;function DP(z,Q,X){var Z=Q.type;if(Z._context===void 0){if(Z!==Z.Consumer){if(!u9)u9=!0,H("Rendering <Context> directly is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")}}else Z=Z._context;var Y=Q.pendingProps,J=Y.children;if(typeof J!=="function")H("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it.");zQ(Q,X);var q=_4(Z);cQ(Q);var G;return cX.current=Q,G5(!0),G=J(q),G5(!1),yz(),Q.flags|=Cz,Y6(z,Q,G,X),Q.child}function iX(){e6=!0}function GY(z,Q){if((Q.mode&s0)===T0){if(z!==null)z.alternate=null,Q.alternate=null,Q.flags|=B4}}function c5(z,Q,X){if(z!==null)Q.dependencies=z.dependencies;if(O9(),Y8(Q.lanes),!w6(X,Q.childLanes))return null;return kF(z,Q),Q.child}function yP(z,Q,X){{var Z=Q.return;if(Z===null)throw Error("Cannot swap the root fiber.");if(z.alternate=null,Q.alternate=null,X.index=Q.index,X.sibling=Q.sibling,X.return=Q.return,X.ref=Q.ref,Q===Z.child)Z.child=X;else{var Y=Z.child;if(Y===null)throw Error("Expected parent to have a child.");while(Y.sibling!==Q)if(Y=Y.sibling,Y===null)throw Error("Expected to find the previous sibling.");Y.sibling=X}var J=Z.deletions;if(J===null)Z.deletions=[z],Z.flags|=p7;else J.push(z);return X.flags|=B4,X}}function WG(z,Q){var X=z.lanes;if(w6(X,Q))return!0;return!1}function fP(z,Q,X){switch(Q.tag){case k:C9(Q);var Z=Q.stateNode;tz();break;case w:mB(Q);break;case b:{var Y=Q.type;if(_5(Y))WZ(Q);break}case P:Hq(Q,Q.stateNode.containerInfo);break;case u:{var J=Q.memoizedProps.value,q=Q.type._context;VB(Q,q,J);break}case i:{var G=w6(X,Q.childLanes);if(G)Q.flags|=Y1;{var K=Q.stateNode;K.effectDuration=0,K.passiveEffectDuration=0}}break;case l:{var _=Q.memoizedState;if(_!==null){if(_.dehydrated!==null)return b7(Q,XQ(n6.current)),Q.flags|=H1,null;var O=Q.child,v=O.childLanes;if(w6(X,v))return y9(z,Q,X);else{b7(Q,XQ(n6.current));var A=c5(z,Q,X);if(A!==null)return A.sibling;else return null}}else b7(Q,XQ(n6.current));break}case N0:{var D=(z.flags&H1)!==V0,y=w6(X,Q.childLanes);if(D){if(y)return p9(z,Q,X);Q.flags|=H1}var h=Q.memoizedState;if(h!==null)h.rendering=null,h.tail=null,h.lastEffect=null;if(b7(Q,n6.current),y)break;else return null}case r:case g:return Q.lanes=a,T9(z,Q,X)}return c5(z,Q,X)}function j9(z,Q,X){if(Q._debugNeedsRemount&&z!==null)return yP(z,Q,oG(Q.type,Q.key,Q.pendingProps,Q._debugOwner||null,Q.mode,Q.lanes));if(z!==null){var Z=z.memoizedProps,Y=Q.pendingProps;if(Z!==Y||OZ()||Q.type!==z.type)e6=!0;else{var J=WG(z,X);if(!J&&(Q.flags&H1)===V0)return e6=!1,fP(z,Q,X);if((z.flags&PJ)!==V0)e6=!0;else e6=!1}}else if(e6=!1,f4()&&$F(Q)){var q=Q.index,G=qF();OB(Q,G,q)}switch(Q.lanes=a,Q.tag){case T:return LP(z,Q,Q.type,X);case c:{var K=Q.elementType;return _P(z,Q,K,X)}case L:{var{type:_,pendingProps:O}=Q,v=Q.elementType===_?O:s6(_,O);return GG(z,Q,_,v,X)}case b:{var{type:A,pendingProps:D}=Q,y=Q.elementType===A?D:s6(A,D);return V9(z,Q,A,y,X)}case k:return KP(z,Q,X);case w:return UP(z,Q,X);case M:return BP(z,Q);case l:return y9(z,Q,X);case P:return VP(z,Q,X);case f:{var{type:h,pendingProps:Y0}=Q,w0=Q.elementType===h?Y0:s6(h,Y0);return v9(z,Q,h,w0,X)}case I:return qP(z,Q,X);case C:return GP(z,Q,X);case i:return HP(z,Q,X);case u:return CP(z,Q,X);case j:return DP(z,Q,X);case o:{var{type:R0,pendingProps:n0}=Q,t0=s6(R0,n0);if(Q.type!==Q.elementType){var S=R0.propTypes;if(S)o6(S,t0,"prop",V1(R0))}return t0=s6(R0.type,t0),k9(z,Q,R0,t0,X)}case t:return I9(z,Q,Q.type,Q.pendingProps,X);case k0:{var{type:m,pendingProps:V}=Q,n=Q.elementType===m?V:s6(m,V);return OP(z,Q,m,n,X)}case N0:return p9(z,Q,X);case p:break;case r:return T9(z,Q,X)}throw Error("Unknown unit of work tag ("+Q.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function GQ(z){z.flags|=Y1}function g9(z){z.flags|=Z7,z.flags|=MJ}var x9,bG,c9,d9;x9=function(z,Q,X,Z){var Y=Q.child;while(Y!==null){if(Y.tag===w||Y.tag===M)ZN(z,Y.stateNode);else if(Y.tag===P);else if(Y.child!==null){Y.child.return=Y,Y=Y.child;continue}if(Y===Q)return;while(Y.sibling===null){if(Y.return===null||Y.return===Q)return;Y=Y.return}Y.sibling.return=Y.return,Y=Y.sibling}},bG=function(z,Q){},c9=function(z,Q,X,Z,Y){var J=z.memoizedProps;if(J===Z)return;var q=Q.stateNode,G=Kq(),K=JN(q,X,J,Z,Y,G);if(Q.updateQueue=K,K)GQ(Q)},d9=function(z,Q,X,Z){if(X!==Z)GQ(Q)};function oX(z,Q){if(f4())return;switch(z.tailMode){case"hidden":{var X=z.tail,Z=null;while(X!==null){if(X.alternate!==null)Z=X;X=X.sibling}if(Z===null)z.tail=null;else Z.sibling=null;break}case"collapsed":{var Y=z.tail,J=null;while(Y!==null){if(Y.alternate!==null)J=Y;Y=Y.sibling}if(J===null)if(!Q&&z.tail!==null)z.tail.sibling=null;else z.tail=null;else J.sibling=null;break}}}function h4(z){var Q=z.alternate!==null&&z.alternate.child===z.child,X=a,Z=V0;if(!Q){if((z.mode&F1)!==T0){var{actualDuration:Y,selfBaseDuration:J,child:q}=z;while(q!==null)X=c0(X,c0(q.lanes,q.childLanes)),Z|=q.subtreeFlags,Z|=q.flags,Y+=q.actualDuration,J+=q.treeBaseDuration,q=q.sibling;z.actualDuration=Y,z.treeBaseDuration=J}else{var G=z.child;while(G!==null)X=c0(X,c0(G.lanes,G.childLanes)),Z|=G.subtreeFlags,Z|=G.flags,G.return=z,G=G.sibling}z.subtreeFlags|=Z}else{if((z.mode&F1)!==T0){var{selfBaseDuration:K,child:_}=z;while(_!==null)X=c0(X,c0(_.lanes,_.childLanes)),Z|=_.subtreeFlags&y5,Z|=_.flags&y5,K+=_.treeBaseDuration,_=_.sibling;z.treeBaseDuration=K}else{var O=z.child;while(O!==null)X=c0(X,c0(O.lanes,O.childLanes)),Z|=O.subtreeFlags&y5,Z|=O.flags&y5,O.return=z,O=O.sibling}z.subtreeFlags|=Z}return z.childLanes=X,Q}function EP(z,Q,X){if(FF()&&(Q.mode&s0)!==T0&&(Q.flags&H1)===V0)return PB(Q),tz(),Q.flags|=V5|gQ|Z6,!1;var Z=PZ(Q);if(X!==null&&X.dehydrated!==null)if(z===null){if(!Z)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(RF(Q),h4(Q),(Q.mode&F1)!==T0){var Y=X!==null;if(Y){var J=Q.child;if(J!==null)Q.treeBaseDuration-=J.treeBaseDuration}}return!1}else{if(tz(),(Q.flags&H1)===V0)Q.memoizedState=null;if(Q.flags|=Y1,h4(Q),(Q.mode&F1)!==T0){var q=X!==null;if(q){var G=Q.child;if(G!==null)Q.treeBaseDuration-=G.treeBaseDuration}}return!1}else return MB(),!0}function l9(z,Q,X){var Z=Q.pendingProps;switch(x$(Q),Q.tag){case T:case c:case t:case L:case f:case I:case C:case i:case j:case o:return h4(Q),null;case b:{var Y=Q.type;if(_5(Y))LZ(Q);return h4(Q),null}case k:{var J=Q.stateNode;if(QQ(Q),m$(Q),Lq(),J.pendingContext)J.context=J.pendingContext,J.pendingContext=null;if(z===null||z.child===null){var q=PZ(Q);if(q)GQ(Q);else if(z!==null){var G=z.memoizedState;if(!G.isDehydrated||(Q.flags&V5)!==V0)Q.flags|=m7,MB()}}return bG(z,Q),h4(Q),null}case w:{Uq(Q);var K=pB(),_=Q.type;if(z!==null&&Q.stateNode!=null){if(c9(z,Q,_,Z,K),z.ref!==Q.ref)g9(Q)}else{if(!Z){if(Q.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return h4(Q),null}var O=Kq(),v=PZ(Q);if(v){if(WF(Q,K,O))GQ(Q)}else{var A=XN(_,Z,K,O,Q);if(x9(A,Q,!1,!1),Q.stateNode=A,YN(A,_,Z,K))GQ(Q)}if(Q.ref!==null)g9(Q)}return h4(Q),null}case M:{var D=Z;if(z&&Q.stateNode!=null){var y=z.memoizedProps;d9(z,Q,y,D)}else{if(typeof D!=="string"){if(Q.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.")}var h=pB(),Y0=Kq(),w0=PZ(Q);if(w0){if(bF(Q))GQ(Q)}else Q.stateNode=$N(D,h,Y0,Q)}return h4(Q),null}case l:{ZQ(Q);var R0=Q.memoizedState;if(z===null||z.memoizedState!==null&&z.memoizedState.dehydrated!==null){var n0=EP(z,Q,R0);if(!n0)if(Q.flags&Z6)return Q;else return null}if((Q.flags&H1)!==V0){if(Q.lanes=X,(Q.mode&F1)!==T0)gq(Q);return Q}var t0=R0!==null,S=z!==null&&z.memoizedState!==null;if(t0!==S){if(t0){var m=Q.child;if(m.flags|=u7,(Q.mode&s0)!==T0){var V=z===null&&(Q.memoizedProps.unstable_avoidThisFallback!==!0||!O0);if(V||Bq(n6.current,jB))gM();else hG()}}}var n=Q.updateQueue;if(n!==null)Q.flags|=Y1;if(h4(Q),(Q.mode&F1)!==T0){if(t0){var H0=Q.child;if(H0!==null)Q.treeBaseDuration-=H0.treeBaseDuration}}return null}case P:if(QQ(Q),bG(z,Q),z===null)eN(Q.stateNode.containerInfo);return h4(Q),null;case u:var $0=Q.type._context;return Xq($0,Q),h4(Q),null;case k0:{var C0=Q.type;if(_5(C0))LZ(Q);return h4(Q),null}case N0:{ZQ(Q);var m0=Q.memoizedState;if(m0===null)return h4(Q),null;var M1=(Q.flags&H1)!==V0,$1=m0.rendering;if($1===null)if(!M1){var $4=cM()&&(z===null||(z.flags&H1)===V0);if(!$4){var q1=Q.child;while(q1!==null){var Q4=pZ(q1);if(Q4!==null){M1=!0,Q.flags|=H1,oX(m0,!1);var o4=Q4.updateQueue;if(o4!==null)Q.updateQueue=o4,Q.flags|=Y1;return Q.subtreeFlags=V0,IF(Q,X),b7(Q,_q(n6.current,fX)),Q.child}q1=q1.sibling}}if(m0.tail!==null&&k4()>__())Q.flags|=H1,M1=!0,oX(m0,!1),Q.lanes=cK}else oX(m0,!1);else{if(!M1){var g4=pZ($1);if(g4!==null){Q.flags|=H1,M1=!0;var S6=g4.updateQueue;if(S6!==null)Q.updateQueue=S6,Q.flags|=Y1;if(oX(m0,!0),m0.tail===null&&m0.tailMode==="hidden"&&!$1.alternate&&!f4())return h4(Q),null}else if(k4()*2-m0.renderingStartTime>__()&&X!==M6)Q.flags|=H1,M1=!0,oX(m0,!1),Q.lanes=cK}if(m0.isBackwards)$1.sibling=Q.child,Q.child=$1;else{var q6=m0.last;if(q6!==null)q6.sibling=$1;else Q.child=$1;m0.last=$1}}if(m0.tail!==null){var G6=m0.tail;m0.rendering=G6,m0.tail=G6.sibling,m0.renderingStartTime=k4(),G6.sibling=null;var a4=n6.current;if(M1)a4=_q(a4,fX);else a4=XQ(a4);return b7(Q,a4),G6}return h4(Q),null}case p:break;case r:case g:{EG(Q);var a5=Q.memoizedState,WQ=a5!==null;if(z!==null){var H8=z.memoizedState,P5=H8!==null;if(P5!==WQ&&!d)Q.flags|=u7}if(!WQ||(Q.mode&s0)===T0)h4(Q);else if(w6(F5,M6)){if(h4(Q),Q.subtreeFlags&(B4|Y1))Q.flags|=u7}return null}case _0:return null;case I0:return null}throw Error("Unknown unit of work tag ("+Q.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function hP(z,Q,X){switch(x$(Q),Q.tag){case b:{var Z=Q.type;if(_5(Z))LZ(Q);var Y=Q.flags;if(Y&Z6){if(Q.flags=Y&~Z6|H1,(Q.mode&F1)!==T0)gq(Q);return Q}return null}case k:{var J=Q.stateNode;QQ(Q),m$(Q),Lq();var q=Q.flags;if((q&Z6)!==V0&&(q&H1)===V0)return Q.flags=q&~Z6|H1,Q;return null}case w:return Uq(Q),null;case l:{ZQ(Q);var G=Q.memoizedState;if(G!==null&&G.dehydrated!==null){if(Q.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");tz()}var K=Q.flags;if(K&Z6){if(Q.flags=K&~Z6|H1,(Q.mode&F1)!==T0)gq(Q);return Q}return null}case N0:return ZQ(Q),null;case P:return QQ(Q),null;case u:var _=Q.type._context;return Xq(_,Q),null;case r:case g:return EG(Q),null;case _0:return null;default:return null}}function i9(z,Q,X){switch(x$(Q),Q.tag){case b:{var Z=Q.type.childContextTypes;if(Z!==null&&Z!==void 0)LZ(Q);break}case k:{var Y=Q.stateNode;QQ(Q),m$(Q),Lq();break}case w:{Uq(Q);break}case P:QQ(Q);break;case l:ZQ(Q);break;case N0:ZQ(Q);break;case u:var J=Q.type._context;Xq(J,Q);break;case r:case g:EG(Q);break}}var o9=null;o9=new Set;var HY=!1,p4=!1,pP=typeof WeakSet==="function"?WeakSet:Set,L0=null,HQ=null,KQ=null;function mP(z){RJ(null,function(){throw z}),NJ()}var uP=function(z,Q){if(Q.props=z.memoizedProps,Q.state=z.memoizedState,z.mode&F1)try{R5(),Q.componentWillUnmount()}finally{b5(z)}else Q.componentWillUnmount()};function a9(z,Q){try{F7(W4,z)}catch(X){y1(z,Q,X)}}function RG(z,Q,X){try{uP(z,X)}catch(Z){y1(z,Q,Z)}}function jP(z,Q,X){try{X.componentDidMount()}catch(Z){y1(z,Q,Z)}}function r9(z,Q){try{s9(z)}catch(X){y1(z,Q,X)}}function UQ(z,Q){var X=z.ref;if(X!==null)if(typeof X==="function"){var Z;try{if(i1&&q4&&z.mode&F1)try{R5(),Z=X(null)}finally{b5(z)}else Z=X(null)}catch(Y){y1(z,Q,Y)}if(typeof Z==="function")H("Unexpected return value from a callback ref in %s. A callback ref should not return a function.",d0(z))}else X.current=null}function KY(z,Q,X){try{X()}catch(Z){y1(z,Q,Z)}}var n9=null,t9=!1;function gP(z,Q){n9=zN(z.containerInfo),L0=Q,xP();var X=t9;return t9=!1,n9=null,X}function xP(){while(L0!==null){var z=L0,Q=z.child;if((z.subtreeFlags&AJ)!==V0&&Q!==null)Q.return=z,L0=Q;else cP()}}function cP(){while(L0!==null){var z=L0;J4(z);try{dP(z)}catch(X){y1(z,z.return,X)}z6();var Q=z.sibling;if(Q!==null){Q.return=z.return,L0=Q;return}L0=z.return}}function dP(z){var{alternate:Q,flags:X}=z;if((X&m7)!==V0){switch(J4(z),z.tag){case L:case f:case t:break;case b:{if(Q!==null){var{memoizedProps:Z,memoizedState:Y}=Q,J=z.stateNode;if(z.type===z.elementType&&!$z){if(J.props!==z.memoizedProps)H("Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",d0(z)||"instance");if(J.state!==z.memoizedState)H("Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",d0(z)||"instance")}var q=J.getSnapshotBeforeUpdate(z.elementType===z.type?Z:s6(z.type,Z),Y);{var G=o9;if(q===void 0&&!G.has(z.type))G.add(z.type),H("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",d0(z))}J.__reactInternalSnapshotBeforeUpdate=q}break}case k:{{var K=z.stateNode;vN(K.containerInfo)}break}case w:case M:case P:case k0:break;default:throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}z6()}}function z5(z,Q,X){var Z=Q.updateQueue,Y=Z!==null?Z.lastEffect:null;if(Y!==null){var J=Y.next,q=J;do{if((q.tag&z)===z){var G=q.destroy;if(q.destroy=void 0,G!==void 0){if((z&E4)!==b6)$W(Q);else if((z&W4)!==b6)mK(Q);if((z&O5)!==b6)$8(!0);if(KY(Q,X,G),(z&O5)!==b6)$8(!1);if((z&E4)!==b6)qW();else if((z&W4)!==b6)uK()}}q=q.next}while(q!==J)}}function F7(z,Q){var X=Q.updateQueue,Z=X!==null?X.lastEffect:null;if(Z!==null){var Y=Z.next,J=Y;do{if((J.tag&z)===z){if((z&E4)!==b6)YW(Q);else if((z&W4)!==b6)GW(Q);var q=J.create;if((z&O5)!==b6)$8(!0);if(J.destroy=q(),(z&O5)!==b6)$8(!1);if((z&E4)!==b6)JW();else if((z&W4)!==b6)HW();{var G=J.destroy;if(G!==void 0&&typeof G!=="function"){var K=void 0;if((J.tag&W4)!==V0)K="useLayoutEffect";else if((J.tag&O5)!==V0)K="useInsertionEffect";else K="useEffect";var _=void 0;if(G===null)_=" You returned null. If your effect does not require clean up, return undefined (or nothing).";else if(typeof G.then==="function")_=`
|
|
81
|
+
|
|
82
|
+
It looks like you wrote `+K+`(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:
|
|
83
|
+
|
|
84
|
+
`+K+`(() => {
|
|
85
|
+
async function fetchData() {
|
|
86
|
+
// You can await here
|
|
87
|
+
const response = await MyAPI.getData(someId);
|
|
88
|
+
// ...
|
|
89
|
+
}
|
|
90
|
+
fetchData();
|
|
91
|
+
}, [someId]); // Or [] if effect doesn't need props or state
|
|
92
|
+
|
|
93
|
+
Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching`;else _=" You returned: "+G;H("%s must not return anything besides a function, which is used for clean-up.%s",K,_)}}}J=J.next}while(J!==Y)}}function lP(z,Q){if((Q.flags&Y1)!==V0)switch(Q.tag){case i:{var X=Q.stateNode.passiveEffectDuration,Z=Q.memoizedProps,Y=Z.id,J=Z.onPostCommit,q=B9(),G=Q.alternate===null?"mount":"update";if(U9())G="nested-update";if(typeof J==="function")J(Y,G,X,q);var K=Q.return;z:while(K!==null){switch(K.tag){case k:var _=K.stateNode;_.passiveEffectDuration+=X;break z;case i:var O=K.stateNode;O.passiveEffectDuration+=X;break z}K=K.return}break}}}function iP(z,Q,X,Z){if((X.flags&xQ)!==V0)switch(X.tag){case L:case f:case t:{if(!p4)if(X.mode&F1)try{R5(),F7(W4|L4,X)}finally{b5(X)}else F7(W4|L4,X);break}case b:{var Y=X.stateNode;if(X.flags&Y1){if(!p4)if(Q===null){if(X.type===X.elementType&&!$z){if(Y.props!==X.memoizedProps)H("Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",d0(X)||"instance");if(Y.state!==X.memoizedState)H("Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",d0(X)||"instance")}if(X.mode&F1)try{R5(),Y.componentDidMount()}finally{b5(X)}else Y.componentDidMount()}else{var J=X.elementType===X.type?Q.memoizedProps:s6(X.type,Q.memoizedProps),q=Q.memoizedState;if(X.type===X.elementType&&!$z){if(Y.props!==X.memoizedProps)H("Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",d0(X)||"instance");if(Y.state!==X.memoizedState)H("Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",d0(X)||"instance")}if(X.mode&F1)try{R5(),Y.componentDidUpdate(J,q,Y.__reactInternalSnapshotBeforeUpdate)}finally{b5(X)}else Y.componentDidUpdate(J,q,Y.__reactInternalSnapshotBeforeUpdate)}}var G=X.updateQueue;if(G!==null){if(X.type===X.elementType&&!$z){if(Y.props!==X.memoizedProps)H("Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",d0(X)||"instance");if(Y.state!==X.memoizedState)H("Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",d0(X)||"instance")}hB(X,G,Y)}break}case k:{var K=X.updateQueue;if(K!==null){var _=null;if(X.child!==null)switch(X.child.tag){case w:_=I$(X.child.stateNode);break;case b:_=X.child.stateNode;break}hB(X,K,_)}break}case w:{var O=X.stateNode;if(Q===null&&X.flags&Y1){var{type:v,memoizedProps:A}=X;UN(O,v,A)}break}case M:break;case P:break;case i:{{var D=X.memoizedProps,y=D.onCommit,h=D.onRender,Y0=X.stateNode.effectDuration,w0=B9(),R0=Q===null?"mount":"update";if(U9())R0="nested-update";if(typeof h==="function")h(X.memoizedProps.id,R0,X.actualDuration,X.treeBaseDuration,X.actualStartTime,w0);{if(typeof y==="function")y(X.memoizedProps.id,R0,Y0,w0);aM(X);var n0=X.return;z:while(n0!==null){switch(n0.tag){case k:var t0=n0.stateNode;t0.effectDuration+=Y0;break z;case i:var S=n0.stateNode;S.effectDuration+=Y0;break z}n0=n0.return}}}break}case l:{zM(z,X);break}case N0:case k0:case p:case r:case g:case I0:break;default:throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}if(!p4){if(X.flags&Z7)s9(X)}}function oP(z){switch(z.tag){case L:case f:case t:{if(z.mode&F1)try{R5(),a9(z,z.return)}finally{b5(z)}else a9(z,z.return);break}case b:{var Q=z.stateNode;if(typeof Q.componentDidMount==="function")jP(z,z.return,Q);r9(z,z.return);break}case w:{r9(z,z.return);break}}}function aP(z,Q){var X=null;{var Z=z;while(!0){if(Z.tag===w){if(X===null){X=Z;try{var Y=Z.stateNode;if(Q)PN(Y);else wN(Z.stateNode,Z.memoizedProps)}catch(q){y1(z,z.return,q)}}}else if(Z.tag===M){if(X===null)try{var J=Z.stateNode;if(Q)MN(J);else AN(J,Z.memoizedProps)}catch(q){y1(z,z.return,q)}}else if((Z.tag===r||Z.tag===g)&&Z.memoizedState!==null&&Z!==z);else if(Z.child!==null){Z.child.return=Z,Z=Z.child;continue}if(Z===z)return;while(Z.sibling===null){if(Z.return===null||Z.return===z)return;if(X===Z)X=null;Z=Z.return}if(X===Z)X=null;Z.sibling.return=Z.return,Z=Z.sibling}}}function s9(z){var Q=z.ref;if(Q!==null){var X=z.stateNode,Z;switch(z.tag){case w:Z=I$(X);break;default:Z=X}if(typeof Q==="function"){var Y;if(z.mode&F1)try{R5(),Y=Q(Z)}finally{b5(z)}else Y=Q(Z);if(typeof Y==="function")H("Unexpected return value from a callback ref in %s. A callback ref should not return a function.",d0(z))}else{if(!Q.hasOwnProperty("current"))H("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",d0(z));Q.current=Z}}}function rP(z){var Q=z.alternate;if(Q!==null)Q.return=null;z.return=null}function e9(z){var Q=z.alternate;if(Q!==null)z.alternate=null,e9(Q);{if(z.child=null,z.deletions=null,z.sibling=null,z.tag===w){var X=z.stateNode;if(X!==null)XF(X)}z.stateNode=null,z._debugOwner=null,z.return=null,z.dependencies=null,z.memoizedProps=null,z.memoizedState=null,z.pendingProps=null,z.stateNode=null,z.updateQueue=null}}function nP(z){var Q=z.return;while(Q!==null){if(z_(Q))return Q;Q=Q.return}throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.")}function z_(z){return z.tag===w||z.tag===k||z.tag===P}function Q_(z){var Q=z;z:while(!0){while(Q.sibling===null){if(Q.return===null||z_(Q.return))return null;Q=Q.return}Q.sibling.return=Q.return,Q=Q.sibling;while(Q.tag!==w&&Q.tag!==M&&Q.tag!==s){if(Q.flags&B4)continue z;if(Q.child===null||Q.tag===P)continue z;else Q.child.return=Q,Q=Q.child}if(!(Q.flags&B4))return Q.stateNode}}function tP(z){var Q=nP(z);switch(Q.tag){case w:{var X=Q.stateNode;if(Q.flags&jQ)QB(X),Q.flags&=~jQ;var Z=Q_(z);FG(z,Z,X);break}case k:case P:{var Y=Q.stateNode.containerInfo,J=Q_(z);NG(z,J,Y);break}default:throw Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}function NG(z,Q,X){var Z=z.tag,Y=Z===w||Z===M;if(Y){var J=z.stateNode;if(Q)bN(X,J,Q);else LN(X,J)}else if(Z===P);else{var q=z.child;if(q!==null){NG(q,Q,X);var G=q.sibling;while(G!==null)NG(G,Q,X),G=G.sibling}}}function FG(z,Q,X){var Z=z.tag,Y=Z===w||Z===M;if(Y){var J=z.stateNode;if(Q)WN(X,J,Q);else ON(X,J)}else if(Z===P);else{var q=z.child;if(q!==null){FG(q,Q,X);var G=q.sibling;while(G!==null)FG(G,Q,X),G=G.sibling}}}var m4=null,Q5=!1;function sP(z,Q,X){{var Z=Q;z:while(Z!==null){switch(Z.tag){case w:{m4=Z.stateNode,Q5=!1;break z}case k:{m4=Z.stateNode.containerInfo,Q5=!0;break z}case P:{m4=Z.stateNode.containerInfo,Q5=!0;break z}}Z=Z.return}if(m4===null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");X_(z,Q,X),m4=null,Q5=!1}rP(X)}function P7(z,Q,X){var Z=X.child;while(Z!==null)X_(z,Q,Z),Z=Z.sibling}function X_(z,Q,X){switch(zW(X),X.tag){case w:if(!p4)UQ(X,Q);case M:{{var Z=m4,Y=Q5;if(m4=null,P7(z,Q,X),m4=Z,Q5=Y,m4!==null)if(Q5)NN(m4,X.stateNode);else RN(m4,X.stateNode)}return}case s:{if(m4!==null)if(Q5)FN(m4,X.stateNode);else C$(m4,X.stateNode);return}case P:{{var J=m4,q=Q5;m4=X.stateNode.containerInfo,Q5=!0,P7(z,Q,X),m4=J,Q5=q}return}case L:case f:case o:case t:{if(!p4){var G=X.updateQueue;if(G!==null){var K=G.lastEffect;if(K!==null){var _=K.next,O=_;do{var v=O,A=v.destroy,D=v.tag;if(A!==void 0){if((D&O5)!==b6)KY(X,Q,A);else if((D&W4)!==b6){if(mK(X),X.mode&F1)R5(),KY(X,Q,A),b5(X);else KY(X,Q,A);uK()}}O=O.next}while(O!==_)}}}P7(z,Q,X);return}case b:{if(!p4){UQ(X,Q);var y=X.stateNode;if(typeof y.componentWillUnmount==="function")RG(X,Q,y)}P7(z,Q,X);return}case p:{P7(z,Q,X);return}case r:{if(X.mode&s0){var h=p4;p4=h||X.memoizedState!==null,P7(z,Q,X),p4=h}else P7(z,Q,X);break}default:{P7(z,Q,X);return}}}function eP(z){var Q=z.memoizedState}function zM(z,Q){var X=Q.memoizedState;if(X===null){var Z=Q.alternate;if(Z!==null){var Y=Z.memoizedState;if(Y!==null){var J=Y.dehydrated;if(J!==null)uN(J)}}}}function Z_(z){var Q=z.updateQueue;if(Q!==null){z.updateQueue=null;var X=z.stateNode;if(X===null)X=z.stateNode=new pP;Q.forEach(function(Z){var Y=Qw.bind(null,z,Z);if(!X.has(Z)){if(X.add(Z),l6)if(HQ!==null&&KQ!==null)J8(KQ,HQ);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");Z.then(Y,Y)}})}}function QM(z,Q,X){HQ=X,KQ=z,J4(Q),Y_(Q,z),J4(Q),HQ=null,KQ=null}function X5(z,Q,X){var Z=Q.deletions;if(Z!==null)for(var Y=0;Y<Z.length;Y++){var J=Z[Y];try{sP(z,Q,J)}catch(K){y1(J,Q,K)}}var q=vL();if(Q.subtreeFlags&vJ){var G=Q.child;while(G!==null)J4(G),Y_(G,z),G=G.sibling}J4(q)}function Y_(z,Q,X){var{alternate:Z,flags:Y}=z;switch(z.tag){case L:case f:case o:case t:{if(X5(Q,z),N5(z),Y&Y1){try{z5(O5|L4,z,z.return),F7(O5|L4,z)}catch(C0){y1(z,z.return,C0)}if(z.mode&F1){try{R5(),z5(W4|L4,z,z.return)}catch(C0){y1(z,z.return,C0)}b5(z)}else try{z5(W4|L4,z,z.return)}catch(C0){y1(z,z.return,C0)}}return}case b:{if(X5(Q,z),N5(z),Y&Z7){if(Z!==null)UQ(Z,Z.return)}return}case w:{if(X5(Q,z),N5(z),Y&Z7){if(Z!==null)UQ(Z,Z.return)}{if(z.flags&jQ){var J=z.stateNode;try{QB(J)}catch(C0){y1(z,z.return,C0)}}if(Y&Y1){var q=z.stateNode;if(q!=null){var G=z.memoizedProps,K=Z!==null?Z.memoizedProps:G,_=z.type,O=z.updateQueue;if(z.updateQueue=null,O!==null)try{BN(q,O,_,K,G,z)}catch(C0){y1(z,z.return,C0)}}}}return}case M:{if(X5(Q,z),N5(z),Y&Y1){if(z.stateNode===null)throw Error("This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");var{stateNode:v,memoizedProps:A}=z,D=Z!==null?Z.memoizedProps:A;try{_N(v,D,A)}catch(C0){y1(z,z.return,C0)}}return}case k:{if(X5(Q,z),N5(z),Y&Y1){if(Z!==null){var y=Z.memoizedState;if(y.isDehydrated)try{mN(Q.containerInfo)}catch(C0){y1(z,z.return,C0)}}}return}case P:{X5(Q,z),N5(z);return}case l:{X5(Q,z),N5(z);var h=z.child;if(h.flags&u7){var{stateNode:Y0,memoizedState:w0}=h,R0=w0!==null;if(Y0.isHidden=R0,R0){var n0=h.alternate!==null&&h.alternate.memoizedState!==null;if(!n0)jM()}}if(Y&Y1){try{eP(z)}catch(C0){y1(z,z.return,C0)}Z_(z)}return}case r:{var t0=Z!==null&&Z.memoizedState!==null;if(z.mode&s0){var S=p4;p4=S||t0,X5(Q,z),p4=S}else X5(Q,z);if(N5(z),Y&u7){var{stateNode:m,memoizedState:V}=z,n=V!==null,H0=z;if(m.isHidden=n,n){if(!t0){if((H0.mode&s0)!==T0){L0=H0;var $0=H0.child;while($0!==null)L0=$0,ZM($0),$0=$0.sibling}}}aP(H0,n)}return}case N0:{if(X5(Q,z),N5(z),Y&Y1)Z_(z);return}case p:return;default:{X5(Q,z),N5(z);return}}}function N5(z){var Q=z.flags;if(Q&B4){try{tP(z)}catch(X){y1(z,z.return,X)}z.flags&=~B4}if(Q&C5)z.flags&=~C5}function XM(z,Q,X){HQ=X,KQ=Q,L0=z,J_(z,Q,X),HQ=null,KQ=null}function J_(z,Q,X){var Z=(z.mode&s0)!==T0;while(L0!==null){var Y=L0,J=Y.child;if(Y.tag===r&&Z){var q=Y.memoizedState!==null,G=q||HY;if(G){PG(z,Q,X);continue}else{var K=Y.alternate,_=K!==null&&K.memoizedState!==null,O=_||p4,v=HY,A=p4;if(HY=G,p4=O,p4&&!A)L0=Y,YM(Y);var D=J;while(D!==null)L0=D,J_(D,Q,X),D=D.sibling;L0=Y,HY=v,p4=A,PG(z,Q,X);continue}}if((Y.subtreeFlags&xQ)!==V0&&J!==null)J.return=Y,L0=J;else PG(z,Q,X)}}function PG(z,Q,X){while(L0!==null){var Z=L0;if((Z.flags&xQ)!==V0){var Y=Z.alternate;J4(Z);try{iP(Q,Y,Z,X)}catch(q){y1(Z,Z.return,q)}z6()}if(Z===z){L0=null;return}var J=Z.sibling;if(J!==null){J.return=Z.return,L0=J;return}L0=Z.return}}function ZM(z){while(L0!==null){var Q=L0,X=Q.child;switch(Q.tag){case L:case f:case o:case t:{if(Q.mode&F1)try{R5(),z5(W4,Q,Q.return)}finally{b5(Q)}else z5(W4,Q,Q.return);break}case b:{UQ(Q,Q.return);var Z=Q.stateNode;if(typeof Z.componentWillUnmount==="function")RG(Q,Q.return,Z);break}case w:{UQ(Q,Q.return);break}case r:{var Y=Q.memoizedState!==null;if(Y){$_(z);continue}break}}if(X!==null)X.return=Q,L0=X;else $_(z)}}function $_(z){while(L0!==null){var Q=L0;if(Q===z){L0=null;return}var X=Q.sibling;if(X!==null){X.return=Q.return,L0=X;return}L0=Q.return}}function YM(z){while(L0!==null){var Q=L0,X=Q.child;if(Q.tag===r){var Z=Q.memoizedState!==null;if(Z){q_(z);continue}}if(X!==null)X.return=Q,L0=X;else q_(z)}}function q_(z){while(L0!==null){var Q=L0;J4(Q);try{oP(Q)}catch(Z){y1(Q,Q.return,Z)}if(z6(),Q===z){L0=null;return}var X=Q.sibling;if(X!==null){X.return=Q.return,L0=X;return}L0=Q.return}}function JM(z,Q,X,Z){L0=Q,$M(Q,z,X,Z)}function $M(z,Q,X,Z){while(L0!==null){var Y=L0,J=Y.child;if((Y.subtreeFlags&Dz)!==V0&&J!==null)J.return=Y,L0=J;else qM(z,Q,X,Z)}}function qM(z,Q,X,Z){while(L0!==null){var Y=L0;if((Y.flags&d6)!==V0){J4(Y);try{GM(Q,Y,X,Z)}catch(q){y1(Y,Y.return,q)}z6()}if(Y===z){L0=null;return}var J=Y.sibling;if(J!==null){J.return=Y.return,L0=J;return}L0=Y.return}}function GM(z,Q,X,Z){switch(Q.tag){case L:case f:case t:{if(Q.mode&F1){jq();try{F7(E4|L4,Q)}finally{uq(Q)}}else F7(E4|L4,Q);break}}}function HM(z){L0=z,KM()}function KM(){while(L0!==null){var z=L0,Q=z.child;if((L0.flags&p7)!==V0){var X=z.deletions;if(X!==null){for(var Z=0;Z<X.length;Z++){var Y=X[Z];L0=Y,_M(Y,z)}{var J=z.alternate;if(J!==null){var q=J.child;if(q!==null){J.child=null;do{var G=q.sibling;q.sibling=null,q=G}while(q!==null)}}}L0=z}}if((z.subtreeFlags&Dz)!==V0&&Q!==null)Q.return=z,L0=Q;else UM()}}function UM(){while(L0!==null){var z=L0;if((z.flags&d6)!==V0)J4(z),BM(z),z6();var Q=z.sibling;if(Q!==null){Q.return=z.return,L0=Q;return}L0=z.return}}function BM(z){switch(z.tag){case L:case f:case t:{if(z.mode&F1)jq(),z5(E4|L4,z,z.return),uq(z);else z5(E4|L4,z,z.return);break}}}function _M(z,Q){while(L0!==null){var X=L0;J4(X),LM(X,Q),z6();var Z=X.child;if(Z!==null)Z.return=X,L0=Z;else OM(z)}}function OM(z){while(L0!==null){var Q=L0,X=Q.sibling,Z=Q.return;if(e9(Q),Q===z){L0=null;return}if(X!==null){X.return=Z,L0=X;return}L0=Z}}function LM(z,Q){switch(z.tag){case L:case f:case t:{if(z.mode&F1)jq(),z5(E4,z,Q),uq(z);else z5(E4,z,Q);break}}}function WM(z){switch(z.tag){case L:case f:case t:{try{F7(W4|L4,z)}catch(X){y1(z,z.return,X)}break}case b:{var Q=z.stateNode;try{Q.componentDidMount()}catch(X){y1(z,z.return,X)}break}}}function bM(z){switch(z.tag){case L:case f:case t:{try{F7(E4|L4,z)}catch(Q){y1(z,z.return,Q)}break}}}function RM(z){switch(z.tag){case L:case f:case t:{try{z5(W4|L4,z,z.return)}catch(X){y1(z,z.return,X)}break}case b:{var Q=z.stateNode;if(typeof Q.componentWillUnmount==="function")RG(z,z.return,Q);break}}}function NM(z){switch(z.tag){case L:case f:case t:try{z5(E4|L4,z,z.return)}catch(Q){y1(z,z.return,Q)}}}var FM=0,PM=1,MM=2,wM=3,AM=4;if(typeof Symbol==="function"&&Symbol.for){var aX=Symbol.for;FM=aX("selector.component"),PM=aX("selector.has_pseudo_class"),MM=aX("selector.role"),wM=aX("selector.test_id"),AM=aX("selector.text")}var vM=[];function kM(){vM.forEach(function(z){return z()})}var IM=$.ReactCurrentActQueue;function TM(z){{var Q=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0,X=typeof jest<"u";return X&&Q!==!1}}function G_(){{var z=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0;if(!z&&IM.current!==null)H("The current testing environment is not configured to support act(...)");return z}}var SM=Math.ceil,MG=$.ReactCurrentDispatcher,wG=$.ReactCurrentOwner,u4=$.ReactCurrentBatchConfig,Z5=$.ReactCurrentActQueue,N4=0,H_=1,j4=2,m6=4,d5=0,rX=1,qz=2,UY=3,nX=4,K_=5,AG=6,e0=N4,J6=null,a1=null,F4=a,F5=a,vG=U7(a),P4=d5,tX=null,kG=a,BY=a,sX=a,_Y=a,eX=null,R6=null,IG=0,U_=500,B_=1/0,VM=500,l5=null;function z8(){B_=k4()+VM}function __(){return B_}var OY=!1,TG=null,BQ=null,Gz=!1,M7=null,Q8=a,SG=[],VG=null,CM=50,X8=0,CG=null,DG=!1,LY=!1,DM=50,_Q=0,WY=null,Z8=m1,bY=a,O_=!1;function RY(){return J6}function $6(){if((e0&(j4|m6))!==N4)return k4();if(Z8!==m1)return Z8;return Z8=k4(),Z8}function w7(z){var Q=z.mode;if((Q&s0)===T0)return f0;else if((e0&j4)!==N4&&F4!==a)return rQ(F4);var X=wF()!==MF;if(X){if(u4.transition!==null){var Z=u4.transition;if(!Z._updatedFibers)Z._updatedFibers=new Set;Z._updatedFibers.add(z)}if(bY===T4)bY=oK();return bY}var Y=i6();if(Y!==T4)return Y;var J=qN();return J}function yM(z){var Q=z.mode;if((Q&s0)===T0)return f0;return CW()}function M4(z,Q,X,Z){if(Zw(),O_)H("useInsertionEffect must not schedule updates.");if(DG)LY=!0;if(nQ(z,X,Z),(e0&j4)!==a&&z===J6)$w(Q);else{if(l6)nK(z,Q,X);if(qw(Q),z===J6){if((e0&j4)===N4)sX=c0(sX,X);if(P4===nX)A7(z,F4)}if(N6(z,Z),X===f0&&e0===N4&&(Q.mode&s0)===T0&&!Z5.isBatchingLegacy)z8(),_B()}}function fM(z,Q,X){var Z=z.current;Z.lanes=Q,nQ(z,Q,X),N6(z,X)}function EM(z){return(e0&j4)!==N4}function N6(z,Q){var X=z.callbackNode;vW(z,Q);var Z=h8(z,z===J6?F4:a);if(Z===a){if(X!==null)V_(X);z.callbackNode=null,z.callbackPriority=T4;return}var Y=i7(Z),J=z.callbackPriority;if(J===Y&&!(Z5.current!==null&&X!==uG)){if(X==null&&J!==f0)H("Expected scheduled callback to exist. This error is likely caused by a bug in React. Please file an issue.");return}if(X!=null)V_(X);var q;if(Y===f0){if(z.tag===B7){if(Z5.isBatchingLegacy!==null)Z5.didScheduleLegacyUpdate=!0;JF(b_.bind(null,z))}else BB(b_.bind(null,z));if(Z5.current!==null)Z5.current.push(_7);else HN(function(){if((e0&(j4|m6))===N4)_7()});q=null}else{var G;switch(eK(Z)){case A6:G=D8;break;case E5:G=kJ;break;case h5:G=x7;break;case j8:G=IJ;break;default:G=x7;break}q=jG(G,L_.bind(null,z))}z.callbackPriority=Y,z.callbackNode=q}function L_(z,Q){if(aF(),Z8=m1,bY=a,(e0&(j4|m6))!==N4)throw Error("Should not already be working.");var X=z.callbackNode,Z=o5();if(Z){if(z.callbackNode!==X)return null}var Y=h8(z,z===J6?F4:a);if(Y===a)return null;var J=!p8(z,Y)&&!VW(z,Y)&&!Q,q=J?lM(z,Y):FY(z,Y);if(q!==d5){if(q===qz){var G=rJ(z);if(G!==a)Y=G,q=yG(z,G)}if(q===rX){var K=tX;throw Hz(z,a),A7(z,Y),N6(z,k4()),K}if(q===AG)A7(z,Y);else{var _=!p8(z,Y),O=z.current.alternate;if(_&&!pM(O)){if(q=FY(z,Y),q===qz){var v=rJ(z);if(v!==a)Y=v,q=yG(z,v)}if(q===rX){var A=tX;throw Hz(z,a),A7(z,Y),N6(z,k4()),A}}z.finishedWork=O,z.finishedLanes=Y,hM(z,q,Y)}}if(N6(z,k4()),z.callbackNode===X)return L_.bind(null,z);return null}function yG(z,Q){var X=eX;if(g8(z)){var Z=Hz(z,Q);Z.flags|=V5,sN(z.containerInfo)}var Y=FY(z,Q);if(Y!==qz){var J=R6;if(R6=X,J!==null)W_(J)}return Y}function W_(z){if(R6===null)R6=z;else R6.push.apply(R6,z)}function hM(z,Q,X){switch(Q){case d5:case rX:throw Error("Root did not complete. This is a bug in React.");case qz:{Kz(z,R6,l5);break}case UY:{if(A7(z,X),lK(X)&&!C_()){var Z=IG+U_-k4();if(Z>10){var Y=h8(z,a);if(Y!==a)break;var J=z.suspendedLanes;if(!pz(J,X)){var q=$6();rK(z,J);break}z.timeoutHandle=S$(Kz.bind(null,z,R6,l5),Z);break}}Kz(z,R6,l5);break}case nX:{if(A7(z,X),SW(X))break;if(!C_()){var G=wW(z,X),K=G,_=k4()-K,O=Xw(_)-_;if(O>10){z.timeoutHandle=S$(Kz.bind(null,z,R6,l5),O);break}}Kz(z,R6,l5);break}case K_:{Kz(z,R6,l5);break}default:throw Error("Unknown root exit status.")}}function pM(z){var Q=z;while(!0){if(Q.flags&V8){var X=Q.updateQueue;if(X!==null){var Z=X.stores;if(Z!==null)for(var Y=0;Y<Z.length;Y++){var J=Z[Y],q=J.getSnapshot,G=J.value;try{if(!k6(q(),G))return!1}catch(_){return!1}}}}var K=Q.child;if(Q.subtreeFlags&V8&&K!==null){K.return=Q,Q=K;continue}if(Q===z)return!0;while(Q.sibling===null){if(Q.return===null||Q.return===z)return!0;Q=Q.return}Q.sibling.return=Q.return,Q=Q.sibling}return!0}function A7(z,Q){Q=m8(Q,_Y),Q=m8(Q,sX),yW(z,Q)}function b_(z){if(rF(),(e0&(j4|m6))!==N4)throw Error("Should not already be working.");o5();var Q=h8(z,a);if(!w6(Q,f0))return N6(z,k4()),null;var X=FY(z,Q);if(z.tag!==B7&&X===qz){var Z=rJ(z);if(Z!==a)Q=Z,X=yG(z,Z)}if(X===rX){var Y=tX;throw Hz(z,a),A7(z,Q),N6(z,k4()),Y}if(X===AG)throw Error("Root did not complete. This is a bug in React.");var J=z.current.alternate;return z.finishedWork=J,z.finishedLanes=Q,Kz(z,R6,l5),N6(z,k4()),null}function mM(z,Q){if(Q!==a){if(eJ(z,c0(Q,f0)),N6(z,k4()),(e0&(j4|m6))===N4)z8(),_7()}}function fG(z,Q){var X=e0;e0|=H_;try{return z(Q)}finally{if(e0=X,e0===N4&&!Z5.isBatchingLegacy)z8(),_B()}}function uM(z,Q,X,Z,Y){var J=i6(),q=u4.transition;try{return u4.transition=null,S4(A6),z(Q,X,Z,Y)}finally{if(S4(J),u4.transition=q,e0===N4)z8()}}function i5(z){if(M7!==null&&M7.tag===B7&&(e0&(j4|m6))===N4)o5();var Q=e0;e0|=H_;var X=u4.transition,Z=i6();try{if(u4.transition=null,S4(A6),z)return z();else return}finally{if(S4(Z),u4.transition=X,e0=Q,(e0&(j4|m6))===N4)_7()}}function R_(){return(e0&(j4|m6))!==N4}function NY(z,Q){l4(vG,F5,z),F5=c0(F5,Q),kG=c0(kG,Q)}function EG(z){F5=vG.current,d4(vG,z)}function Hz(z,Q){z.finishedWork=null,z.finishedLanes=a;var X=z.timeoutHandle;if(X!==V$)z.timeoutHandle=V$,GN(X);if(a1!==null){var Z=a1.return;while(Z!==null){var Y=Z.alternate;i9(Y,Z),Z=Z.return}}J6=z;var J=Uz(z.current,null);return a1=J,F4=F5=kG=Q,P4=d5,tX=null,BY=a,sX=a,_Y=a,eX=null,R6=null,VF(),r6.discardPendingWarnings(),J}function N_(z,Q){do{var X=a1;try{if(IZ(),xB(),z6(),wG.current=null,X===null||X.return===null){P4=rX,tX=Q,a1=null;return}if(i1&&X.mode&F1)YY(X,!0);if(t1)if(yz(),Q!==null&&typeof Q==="object"&&typeof Q.then==="function"){var Z=Q;UW(X,Z,F4)}else KW(X,Q,F4);YP(z,X.return,X,Q,F4),w_(X)}catch(Y){if(Q=Y,a1===X&&X!==null)X=X.return,a1=X;else X=a1;continue}return}while(!0)}function F_(){var z=MG.current;if(MG.current=eZ,z===null)return eZ;else return z}function P_(z){MG.current=z}function jM(){IG=k4()}function Y8(z){BY=c0(z,BY)}function gM(){if(P4===d5)P4=UY}function hG(){if(P4===d5||P4===UY||P4===qz)P4=nX;if(J6!==null&&(nJ(BY)||nJ(sX)))A7(J6,F4)}function xM(z){if(P4!==nX)P4=qz;if(eX===null)eX=[z];else eX.push(z)}function cM(){return P4===d5}function FY(z,Q){var X=e0;e0|=j4;var Z=F_();if(J6!==z||F4!==Q){if(l6){var Y=z.memoizedUpdaters;if(Y.size>0)J8(z,F4),Y.clear();tK(z,Q)}l5=sK(),Hz(z,Q)}jK(Q);do try{dM();break}catch(J){N_(z,J)}while(!0);if(IZ(),e0=X,P_(Z),a1!==null)throw Error("Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.");return gK(),J6=null,F4=a,P4}function dM(){while(a1!==null)M_(a1)}function lM(z,Q){var X=e0;e0|=j4;var Z=F_();if(J6!==z||F4!==Q){if(l6){var Y=z.memoizedUpdaters;if(Y.size>0)J8(z,F4),Y.clear();tK(z,Q)}l5=sK(),z8(),Hz(z,Q)}jK(Q);do try{iM();break}catch(J){N_(z,J)}while(!0);if(IZ(),P_(Z),e0=X,a1!==null)return WW(),d5;else return gK(),J6=null,F4=a,P4}function iM(){while(a1!==null&&!d3())M_(a1)}function M_(z){var Q=z.alternate;J4(z);var X;if((z.mode&F1)!==T0)mq(z),X=pG(Q,z,F5),YY(z,!0);else X=pG(Q,z,F5);if(z6(),z.memoizedProps=z.pendingProps,X===null)w_(z);else a1=X;wG.current=null}function w_(z){var Q=z;do{var{alternate:X,return:Z}=Q;if((Q.flags&gQ)===V0){J4(Q);var Y=void 0;if((Q.mode&F1)===T0)Y=l9(X,Q,F5);else mq(Q),Y=l9(X,Q,F5),YY(Q,!1);if(z6(),Y!==null){a1=Y;return}}else{var J=hP(X,Q);if(J!==null){J.flags&=m3,a1=J;return}if((Q.mode&F1)!==T0){YY(Q,!1);var{actualDuration:q,child:G}=Q;while(G!==null)q+=G.actualDuration,G=G.sibling;Q.actualDuration=q}if(Z!==null)Z.flags|=gQ,Z.subtreeFlags=V0,Z.deletions=null;else{P4=AG,a1=null;return}}var K=Q.sibling;if(K!==null){a1=K;return}Q=Z,a1=Q}while(Q!==null);if(P4===d5)P4=K_}function Kz(z,Q,X){var Z=i6(),Y=u4.transition;try{u4.transition=null,S4(A6),oM(z,Q,X,Z)}finally{u4.transition=Y,S4(Z)}return null}function oM(z,Q,X,Z){do o5();while(M7!==null);if(Yw(),(e0&(j4|m6))!==N4)throw Error("Should not already be working.");var{finishedWork:Y,finishedLanes:J}=z;if(ZW(J),Y===null)return pK(),null;else if(J===a)H("root.finishedLanes should not be empty during a commit. This is a bug in React.");if(z.finishedWork=null,z.finishedLanes=a,Y===z.current)throw Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");z.callbackNode=null,z.callbackPriority=T4;var q=c0(Y.lanes,Y.childLanes);if(fW(z,q),z===J6)J6=null,a1=null,F4=a;if((Y.subtreeFlags&Dz)!==V0||(Y.flags&Dz)!==V0){if(!Gz)Gz=!0,VG=X,jG(x7,function(){return o5(),null})}var G=(Y.subtreeFlags&(AJ|vJ|xQ|Dz))!==V0,K=(Y.flags&(AJ|vJ|xQ|Dz))!==V0;if(G||K){var _=u4.transition;u4.transition=null;var O=i6();S4(A6);var v=e0;e0|=m6,wG.current=null;var A=gP(z,Y);_9(),QM(z,Y,J),QN(z.containerInfo),z.current=Y,BW(J),XM(Y,z,J),_W(),l3(),e0=v,S4(O),u4.transition=_}else z.current=Y,_9();var D=Gz;if(Gz)Gz=!1,M7=z,Q8=J;else _Q=0,WY=null;if(q=z.pendingLanes,q===a)BQ=null;if(!D)I_(z.current,!1);if(s3(Y.stateNode,Z),l6)z.memoizedUpdaters.clear();if(kM(),N6(z,k4()),Q!==null){var y=z.onRecoverableError;for(var h=0;h<Q.length;h++){var Y0=Q[h],w0=Y0.stack,R0=Y0.digest;y(Y0.value,{componentStack:w0,digest:R0})}}if(OY){OY=!1;var n0=TG;throw TG=null,n0}if(w6(Q8,f0)&&z.tag!==B7)o5();if(q=z.pendingLanes,w6(q,f0))if(oF(),z===CG)X8++;else X8=0,CG=z;else X8=0;return _7(),pK(),null}function o5(){if(M7!==null){var z=eK(Q8),Q=mW(h5,z),X=u4.transition,Z=i6();try{return u4.transition=null,S4(Q),rM()}finally{S4(Z),u4.transition=X}}return!1}function aM(z){if(SG.push(z),!Gz)Gz=!0,jG(x7,function(){return o5(),null})}function rM(){if(M7===null)return!1;var z=VG;VG=null;var Q=M7,X=Q8;if(M7=null,Q8=a,(e0&(j4|m6))!==N4)throw Error("Cannot flush passive effects while already rendering.");DG=!0,LY=!1,OW(X);var Z=e0;e0|=m6,HM(Q.current),JM(Q,Q.current,X,z);{var Y=SG;SG=[];for(var J=0;J<Y.length;J++){var q=Y[J];lP(Q,q)}}LW(),I_(Q.current,!0),e0=Z,_7();{if(LY)if(Q===WY)_Q++;else _Q=0,WY=Q;else _Q=0;DG=!1,LY=!1}e3(Q);{var G=Q.current.stateNode;G.effectDuration=0,G.passiveEffectDuration=0}return!0}function A_(z){return BQ!==null&&BQ.has(z)}function nM(z){if(BQ===null)BQ=new Set([z]);else BQ.add(z)}function tM(z){if(!OY)OY=!0,TG=z}var sM=tM;function v_(z,Q,X){var Z=Jz(X,Q),Y=P9(z,Z,f0),J=L7(z,Y,f0),q=$6();if(J!==null)nQ(J,f0,q),N6(J,q)}function y1(z,Q,X){if(mP(X),$8(!1),z.tag===k){v_(z,z,X);return}var Z=null;Z=Q;while(Z!==null){if(Z.tag===k){v_(Z,z,X);return}else if(Z.tag===b){var{type:Y,stateNode:J}=Z;if(typeof Y.getDerivedStateFromError==="function"||typeof J.componentDidCatch==="function"&&!A_(J)){var q=Jz(X,z),G=XG(Z,q,f0),K=L7(Z,G,f0),_=$6();if(K!==null)nQ(K,f0,_),N6(K,_);return}}Z=Z.return}H(`Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Likely causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.
|
|
94
|
+
|
|
95
|
+
Error message:
|
|
96
|
+
|
|
97
|
+
%s`,X)}function eM(z,Q,X){var Z=z.pingCache;if(Z!==null)Z.delete(Q);var Y=$6();if(rK(z,X),Gw(z),J6===z&&pz(F4,X))if(P4===nX||P4===UY&&lK(F4)&&k4()-IG<U_)Hz(z,a);else _Y=c0(_Y,X);N6(z,Y)}function k_(z,Q){if(Q===T4)Q=yM(z);var X=$6(),Z=W6(z,Q);if(Z!==null)nQ(Z,Q,X),N6(Z,X)}function zw(z){var Q=z.memoizedState,X=T4;if(Q!==null)X=Q.retryLane;k_(z,X)}function Qw(z,Q){var X=T4,Z;switch(z.tag){case l:Z=z.stateNode;var Y=z.memoizedState;if(Y!==null)X=Y.retryLane;break;case N0:Z=z.stateNode;break;default:throw Error("Pinged unknown suspense boundary type. This is probably a bug in React.")}if(Z!==null)Z.delete(Q);k_(z,X)}function Xw(z){return z<120?120:z<480?480:z<1080?1080:z<1920?1920:z<3000?3000:z<4320?4320:SM(z/1960)*1960}function Zw(){if(X8>CM)throw X8=0,CG=null,Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.");if(_Q>DM)_Q=0,WY=null,H("Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render.")}function Yw(){r6.flushLegacyContextWarning(),r6.flushPendingUnsafeLifecycleWarnings()}function I_(z,Q){{if(J4(z),PY(z,D5,RM),Q)PY(z,C8,NM);if(PY(z,D5,WM),Q)PY(z,C8,bM);z6()}}function PY(z,Q,X){{var Z=z,Y=null;while(Z!==null){var J=Z.subtreeFlags&Q;if(Z!==Y&&Z.child!==null&&J!==V0)Z=Z.child;else{if((Z.flags&Q)!==V0)X(Z);if(Z.sibling!==null)Z=Z.sibling;else Z=Y=Z.return}}}}var MY=null;function T_(z){{if((e0&j4)!==N4)return;if(!(z.mode&s0))return;var Q=z.tag;if(Q!==T&&Q!==k&&Q!==b&&Q!==L&&Q!==f&&Q!==o&&Q!==t)return;var X=d0(z)||"ReactComponent";if(MY!==null){if(MY.has(X))return;MY.add(X)}else MY=new Set([X]);var Z=P6;try{J4(z),H("Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously later calls tries to update the component. Move this work to useEffect instead.")}finally{if(Z)J4(z);else z6()}}}var pG;{var Jw=null;pG=function(z,Q,X){var Z=h_(Jw,Q);try{return j9(z,Q,X)}catch(J){if(_F()||J!==null&&typeof J==="object"&&typeof J.then==="function")throw J;if(IZ(),xB(),i9(z,Q),h_(Q,Z),Q.mode&F1)mq(Q);if(RJ(null,j9,null,z,Q,X),f3()){var Y=NJ();if(typeof Y==="object"&&Y!==null&&Y._suppressLogging&&typeof J==="object"&&J!==null&&!J._suppressLogging)J._suppressLogging=!0}throw J}}}var S_=!1,mG;mG=new Set;function $w(z){if(yQ&&!dF())switch(z.tag){case L:case f:case t:{var Q=a1&&d0(a1)||"Unknown",X=Q;if(!mG.has(X)){mG.add(X);var Z=d0(z)||"Unknown";H("Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://reactjs.org/link/setstate-in-render",Z,Q,Q)}break}case b:{if(!S_)H("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),S_=!0;break}}}function J8(z,Q){if(l6){var X=z.memoizedUpdaters;X.forEach(function(Z){nK(z,Z,Q)})}}var uG={};function jG(z,Q){{var X=Z5.current;if(X!==null)return X.push(Q),uG;else return hK(z,Q)}}function V_(z){if(z===uG)return;return c3(z)}function C_(){return Z5.current!==null}function qw(z){{if(z.mode&s0){if(!G_())return}else{if(!TM())return;if(e0!==N4)return;if(z.tag!==L&&z.tag!==f&&z.tag!==t)return}if(Z5.current===null){var Q=P6;try{J4(z),H(`An update to %s inside a test was not wrapped in act(...).
|
|
98
|
+
|
|
99
|
+
When testing, code that causes React state updates should be wrapped into act(...):
|
|
100
|
+
|
|
101
|
+
act(() => {
|
|
102
|
+
/* fire events that update state */
|
|
103
|
+
});
|
|
104
|
+
/* assert on the output */
|
|
105
|
+
|
|
106
|
+
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act`,d0(z))}finally{if(Q)J4(z);else z6()}}}}function Gw(z){if(z.tag!==B7&&G_()&&Z5.current===null)H(`A suspended resource finished loading inside a test, but the event was not wrapped in act(...).
|
|
107
|
+
|
|
108
|
+
When testing, code that resolves suspended data should be wrapped into act(...):
|
|
109
|
+
|
|
110
|
+
act(() => {
|
|
111
|
+
/* finish loading suspended data */
|
|
112
|
+
});
|
|
113
|
+
/* assert on the output */
|
|
114
|
+
|
|
115
|
+
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act`)}function $8(z){O_=z}var u6=null,OQ=null,Hw=function(z){u6=z};function LQ(z){{if(u6===null)return z;var Q=u6(z);if(Q===void 0)return z;return Q.current}}function gG(z){return LQ(z)}function xG(z){{if(u6===null)return z;var Q=u6(z);if(Q===void 0){if(z!==null&&z!==void 0&&typeof z.render==="function"){var X=LQ(z.render);if(z.render!==X){var Z={$$typeof:E,render:X};if(z.displayName!==void 0)Z.displayName=z.displayName;return Z}}return z}return Q.current}}function D_(z,Q){{if(u6===null)return!1;var X=z.elementType,Z=Q.type,Y=!1,J=typeof Z==="object"&&Z!==null?Z.$$typeof:null;switch(z.tag){case b:{if(typeof Z==="function")Y=!0;break}case L:{if(typeof Z==="function")Y=!0;else if(J===j0)Y=!0;break}case f:{if(J===E)Y=!0;else if(J===j0)Y=!0;break}case o:case t:{if(J===l0)Y=!0;else if(J===j0)Y=!0;break}default:return!1}if(Y){var q=u6(X);if(q!==void 0&&q===u6(Z))return!0}return!1}}function y_(z){{if(u6===null)return;if(typeof WeakSet!=="function")return;if(OQ===null)OQ=new WeakSet;OQ.add(z)}}var Kw=function(z,Q){{if(u6===null)return;var{staleFamilies:X,updatedFamilies:Z}=Q;o5(),i5(function(){cG(z.current,Z,X)})}},Uw=function(z,Q){{if(z.context!==I6)return;o5(),i5(function(){q8(Q,z,null,null)})}};function cG(z,Q,X){{var{alternate:Z,child:Y,sibling:J,tag:q,type:G}=z,K=null;switch(q){case L:case t:case b:K=G;break;case f:K=G.render;break}if(u6===null)throw Error("Expected resolveFamily to be set during hot reload.");var _=!1,O=!1;if(K!==null){var v=u6(K);if(v!==void 0){if(X.has(v))O=!0;else if(Q.has(v))if(q===b)O=!0;else _=!0}}if(OQ!==null){if(OQ.has(z)||Z!==null&&OQ.has(Z))O=!0}if(O)z._debugNeedsRemount=!0;if(O||_){var A=W6(z,f0);if(A!==null)M4(A,z,f0,m1)}if(Y!==null&&!O)cG(Y,Q,X);if(J!==null)cG(J,Q,X)}}var Bw=function(z,Q){{var X=new Set,Z=new Set(Q.map(function(Y){return Y.current}));return dG(z.current,Z,X),X}};function dG(z,Q,X){{var{child:Z,sibling:Y,tag:J,type:q}=z,G=null;switch(J){case L:case t:case b:G=q;break;case f:G=q.render;break}var K=!1;if(G!==null){if(Q.has(G))K=!0}if(K)_w(z,X);else if(Z!==null)dG(Z,Q,X);if(Y!==null)dG(Y,Q,X)}}function _w(z,Q){{var X=Ow(z,Q);if(X)return;var Z=z;while(!0){switch(Z.tag){case w:Q.add(Z.stateNode);return;case P:Q.add(Z.stateNode.containerInfo);return;case k:Q.add(Z.stateNode.containerInfo);return}if(Z.return===null)throw Error("Expected to reach root first.");Z=Z.return}}}function Ow(z,Q){{var X=z,Z=!1;while(!0){if(X.tag===w)Z=!0,Q.add(X.stateNode);else if(X.child!==null){X.child.return=X,X=X.child;continue}if(X===z)return Z;while(X.sibling===null){if(X.return===null||X.return===z)return Z;X=X.return}X.sibling.return=X.return,X=X.sibling}}return!1}var lG;{lG=!1;try{var f_=Object.preventExtensions({})}catch(z){lG=!0}}function Lw(z,Q,X,Z){if(this.tag=z,this.key=X,this.elementType=null,this.type=null,this.stateNode=null,this.return=null,this.child=null,this.sibling=null,this.index=0,this.ref=null,this.pendingProps=Q,this.memoizedProps=null,this.updateQueue=null,this.memoizedState=null,this.dependencies=null,this.mode=Z,this.flags=V0,this.subtreeFlags=V0,this.deletions=null,this.lanes=a,this.childLanes=a,this.alternate=null,this.actualDuration=Number.NaN,this.actualStartTime=Number.NaN,this.selfBaseDuration=Number.NaN,this.treeBaseDuration=Number.NaN,this.actualDuration=0,this.actualStartTime=-1,this.selfBaseDuration=0,this.treeBaseDuration=0,this._debugSource=null,this._debugOwner=null,this._debugNeedsRemount=!1,this._debugHookTypes=null,!lG&&typeof Object.preventExtensions==="function")Object.preventExtensions(this)}var T6=function(z,Q,X,Z){return new Lw(z,Q,X,Z)};function iG(z){var Q=z.prototype;return!!(Q&&Q.isReactComponent)}function Ww(z){return typeof z==="function"&&!iG(z)&&z.defaultProps===void 0}function bw(z){if(typeof z==="function")return iG(z)?b:L;else if(z!==void 0&&z!==null){var Q=z.$$typeof;if(Q===E)return f;if(Q===l0)return o}return T}function Uz(z,Q){var X=z.alternate;if(X===null)X=T6(z.tag,Q,z.key,z.mode),X.elementType=z.elementType,X.type=z.type,X.stateNode=z.stateNode,X._debugSource=z._debugSource,X._debugOwner=z._debugOwner,X._debugHookTypes=z._debugHookTypes,X.alternate=z,z.alternate=X;else X.pendingProps=Q,X.type=z.type,X.flags=V0,X.subtreeFlags=V0,X.deletions=null,X.actualDuration=0,X.actualStartTime=-1;X.flags=z.flags&y5,X.childLanes=z.childLanes,X.lanes=z.lanes,X.child=z.child,X.memoizedProps=z.memoizedProps,X.memoizedState=z.memoizedState,X.updateQueue=z.updateQueue;var Z=z.dependencies;switch(X.dependencies=Z===null?null:{lanes:Z.lanes,firstContext:Z.firstContext},X.sibling=z.sibling,X.index=z.index,X.ref=z.ref,X.selfBaseDuration=z.selfBaseDuration,X.treeBaseDuration=z.treeBaseDuration,X._debugNeedsRemount=z._debugNeedsRemount,X.tag){case T:case L:case t:X.type=LQ(z.type);break;case b:X.type=gG(z.type);break;case f:X.type=xG(z.type);break}return X}function Rw(z,Q){z.flags&=y5|B4;var X=z.alternate;if(X===null)z.childLanes=a,z.lanes=Q,z.child=null,z.subtreeFlags=V0,z.memoizedProps=null,z.memoizedState=null,z.updateQueue=null,z.dependencies=null,z.stateNode=null,z.selfBaseDuration=0,z.treeBaseDuration=0;else{z.childLanes=X.childLanes,z.lanes=X.lanes,z.child=X.child,z.subtreeFlags=V0,z.deletions=null,z.memoizedProps=X.memoizedProps,z.memoizedState=X.memoizedState,z.updateQueue=X.updateQueue,z.type=X.type;var Z=X.dependencies;z.dependencies=Z===null?null:{lanes:Z.lanes,firstContext:Z.firstContext},z.selfBaseDuration=X.selfBaseDuration,z.treeBaseDuration=X.treeBaseDuration}return z}function Nw(z,Q,X){var Z;if(z===bZ){if(Z=s0,Q===!0)Z|=z4,Z|=K5}else Z=T0;if(l6)Z|=F1;return T6(k,null,null,Z)}function oG(z,Q,X,Z,Y,J){var q=T,G=z;if(typeof z==="function")if(iG(z))q=b,G=gG(G);else G=LQ(G);else if(typeof z==="string")q=w;else z:switch(z){case N1:return v7(X.children,Y,J,Q);case k1:if(q=C,Y|=z4,(Y&s0)!==T0)Y|=K5;break;case W1:return Fw(X,Y,J,Q);case z0:return Pw(X,Y,J,Q);case M0:return Mw(X,Y,J,Q);case K0:return E_(X,Y,J,Q);case S0:case g0:case S1:case _6:case e:default:{if(typeof z==="object"&&z!==null)switch(z.$$typeof){case J1:q=u;break z;case N:q=j;break z;case E:q=f,G=xG(G);break z;case l0:q=o;break z;case j0:q=c,G=null;break z}var K="";{if(z===void 0||typeof z==="object"&&z!==null&&Object.keys(z).length===0)K+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";var _=Z?d0(Z):null;if(_)K+=`
|
|
116
|
+
|
|
117
|
+
Check the render method of \``+_+"`."}throw Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) "+("but got: "+(z==null?z:typeof z)+"."+K))}}var O=T6(q,X,Q,Y);return O.elementType=z,O.type=G,O.lanes=J,O._debugOwner=Z,O}function aG(z,Q,X){var Z=null;Z=z._owner;var{type:Y,key:J,props:q}=z,G=oG(Y,J,q,Z,Q,X);return G._debugSource=z._source,G._debugOwner=z._owner,G}function v7(z,Q,X,Z){var Y=T6(I,z,Z,Q);return Y.lanes=X,Y}function Fw(z,Q,X,Z){if(typeof z.id!=="string")H('Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',typeof z.id);var Y=T6(i,z,Z,Q|F1);return Y.elementType=W1,Y.lanes=X,Y.stateNode={effectDuration:0,passiveEffectDuration:0},Y}function Pw(z,Q,X,Z){var Y=T6(l,z,Z,Q);return Y.elementType=z0,Y.lanes=X,Y}function Mw(z,Q,X,Z){var Y=T6(N0,z,Z,Q);return Y.elementType=M0,Y.lanes=X,Y}function E_(z,Q,X,Z){var Y=T6(r,z,Z,Q);Y.elementType=K0,Y.lanes=X;var J={isHidden:!1};return Y.stateNode=J,Y}function rG(z,Q,X){var Z=T6(M,z,null,Q);return Z.lanes=X,Z}function ww(){var z=T6(w,null,null,T0);return z.elementType="DELETED",z}function Aw(z){var Q=T6(s,null,null,T0);return Q.stateNode=z,Q}function nG(z,Q,X){var Z=z.children!==null?z.children:[],Y=T6(P,Z,z.key,Q);return Y.lanes=X,Y.stateNode={containerInfo:z.containerInfo,pendingChildren:null,implementation:z.implementation},Y}function h_(z,Q){if(z===null)z=T6(T,null,null,T0);return z.tag=Q.tag,z.key=Q.key,z.elementType=Q.elementType,z.type=Q.type,z.stateNode=Q.stateNode,z.return=Q.return,z.child=Q.child,z.sibling=Q.sibling,z.index=Q.index,z.ref=Q.ref,z.pendingProps=Q.pendingProps,z.memoizedProps=Q.memoizedProps,z.updateQueue=Q.updateQueue,z.memoizedState=Q.memoizedState,z.dependencies=Q.dependencies,z.mode=Q.mode,z.flags=Q.flags,z.subtreeFlags=Q.subtreeFlags,z.deletions=Q.deletions,z.lanes=Q.lanes,z.childLanes=Q.childLanes,z.alternate=Q.alternate,z.actualDuration=Q.actualDuration,z.actualStartTime=Q.actualStartTime,z.selfBaseDuration=Q.selfBaseDuration,z.treeBaseDuration=Q.treeBaseDuration,z._debugSource=Q._debugSource,z._debugOwner=Q._debugOwner,z._debugNeedsRemount=Q._debugNeedsRemount,z._debugHookTypes=Q._debugHookTypes,z}function vw(z,Q,X,Z,Y){this.tag=Q,this.containerInfo=z,this.pendingChildren=null,this.current=null,this.pingCache=null,this.finishedWork=null,this.timeoutHandle=V$,this.context=null,this.pendingContext=null,this.callbackNode=null,this.callbackPriority=T4,this.eventTimes=sJ(a),this.expirationTimes=sJ(m1),this.pendingLanes=a,this.suspendedLanes=a,this.pingedLanes=a,this.expiredLanes=a,this.mutableReadLanes=a,this.finishedLanes=a,this.entangledLanes=a,this.entanglements=sJ(a),this.identifierPrefix=Z,this.onRecoverableError=Y,this.mutableSourceEagerHydrationData=null,this.effectDuration=0,this.passiveEffectDuration=0;{this.memoizedUpdaters=new Set;var J=this.pendingUpdatersLaneMap=[];for(var q=0;q<SJ;q++)J.push(new Set)}switch(Q){case bZ:this._debugRootType=X?"hydrateRoot()":"createRoot()";break;case B7:this._debugRootType=X?"hydrate()":"render()";break}}function p_(z,Q,X,Z,Y,J,q,G,K,_){var O=new vw(z,Q,X,G,K),v=Nw(Q,J);O.current=v,v.stateNode=O;{var A={element:Z,isDehydrated:X,cache:null,transitions:null,pendingSuspenseBoundaries:null};v.memoizedState=A}return qq(v),O}var tG="18.3.1";function kw(z,Q,X){var Z=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;return t4(Z),{$$typeof:d1,key:Z==null?null:""+Z,children:z,containerInfo:Q,implementation:X}}var sG,eG;sG=!1,eG={};function m_(z){if(!z)return I6;var Q=Vz(z),X=YF(Q);if(Q.tag===b){var Z=Q.type;if(_5(Z))return KB(Q,Z,X)}return X}function Iw(z,Q){{var X=Vz(z);if(X===void 0)if(typeof z.render==="function")throw Error("Unable to find node on an unmounted component.");else{var Z=Object.keys(z).join(",");throw Error("Argument appears to not be a ReactComponent. Keys: "+Z)}var Y=yK(X);if(Y===null)return null;if(Y.mode&z4){var J=d0(X)||"Component";if(!eG[J]){eG[J]=!0;var q=P6;try{if(J4(Y),X.mode&z4)H("%s is deprecated in StrictMode. %s was passed an instance of %s which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node",Q,Q,J);else H("%s is deprecated in StrictMode. %s was passed an instance of %s which renders StrictMode children. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node",Q,Q,J)}finally{if(q)J4(q);else z6()}}}return Y.stateNode}}function u_(z,Q,X,Z,Y,J,q,G){var K=!1,_=null;return p_(z,Q,K,_,X,Z,Y,J,q)}function j_(z,Q,X,Z,Y,J,q,G,K,_){var O=!0,v=p_(X,Z,O,z,Y,J,q,G,K);v.context=m_(null);var A=v.current,D=$6(),y=w7(A),h=x5(D,y);return h.callback=Q!==void 0&&Q!==null?Q:null,L7(A,h,y),fM(v,y,D),v}function q8(z,Q,X,Z){t3(Q,z);var Y=Q.current,J=$6(),q=w7(Y);bW(q);var G=m_(X);if(Q.context===null)Q.context=G;else Q.pendingContext=G;if(yQ&&P6!==null&&!sG)sG=!0,H(`Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.
|
|
118
|
+
|
|
119
|
+
Check the render method of %s.`,d0(P6)||"Unknown");var K=x5(J,q);if(K.payload={element:z},Z=Z===void 0?null:Z,Z!==null){if(typeof Z!=="function")H("render(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",Z);K.callback=Z}var _=L7(Y,K,q);if(_!==null)M4(_,Y,q,J),DZ(_,Y,q);return q}function wY(z){var Q=z.current;if(!Q.child)return null;switch(Q.child.tag){case w:return I$(Q.child.stateNode);default:return Q.child.stateNode}}function Tw(z){switch(z.tag){case k:{var Q=z.stateNode;if(g8(Q)){var X=kW(Q);mM(Q,X)}break}case l:{i5(function(){var Y=W6(z,f0);if(Y!==null){var J=$6();M4(Y,z,f0,J)}});var Z=f0;zH(z,Z);break}}}function g_(z,Q){var X=z.memoizedState;if(X!==null&&X.dehydrated!==null)X.retryLane=DW(X.retryLane,Q)}function zH(z,Q){g_(z,Q);var X=z.alternate;if(X)g_(X,Q)}function Sw(z){if(z.tag!==l)return;var Q=iQ,X=W6(z,Q);if(X!==null){var Z=$6();M4(X,z,Q,Z)}zH(z,Q)}function Vw(z){if(z.tag!==l)return;var Q=w7(z),X=W6(z,Q);if(X!==null){var Z=$6();M4(X,z,Q,Z)}zH(z,Q)}function x_(z){var Q=x3(z);if(Q===null)return null;return Q.stateNode}var c_=function(z){return null};function Cw(z){return c_(z)}var d_=function(z){return!1};function Dw(z){return d_(z)}var l_=null,i_=null,o_=null,a_=null,r_=null,n_=null,t_=null,s_=null,e_=null;{var zO=function(z,Q,X){var Z=Q[X],Y=Q6(z)?z.slice():o0({},z);if(X+1===Q.length){if(Q6(Y))Y.splice(Z,1);else delete Y[Z];return Y}return Y[Z]=zO(z[Z],Q,X+1),Y},QO=function(z,Q){return zO(z,Q,0)},XO=function(z,Q,X,Z){var Y=Q[Z],J=Q6(z)?z.slice():o0({},z);if(Z+1===Q.length){var q=X[Z];if(J[q]=J[Y],Q6(J))J.splice(Y,1);else delete J[Y]}else J[Y]=XO(z[Y],Q,X,Z+1);return J},ZO=function(z,Q,X){if(Q.length!==X.length){W("copyWithRename() expects paths of the same length");return}else for(var Z=0;Z<X.length-1;Z++)if(Q[Z]!==X[Z]){W("copyWithRename() expects paths to be the same except for the deepest key");return}return XO(z,Q,X,0)},YO=function(z,Q,X,Z){if(X>=Q.length)return Z;var Y=Q[X],J=Q6(z)?z.slice():o0({},z);return J[Y]=YO(z[Y],Q,X+1,Z),J},JO=function(z,Q,X){return YO(z,Q,0,X)},QH=function(z,Q){var X=z.memoizedState;while(X!==null&&Q>0)X=X.next,Q--;return X};l_=function(z,Q,X,Z){var Y=QH(z,Q);if(Y!==null){var J=JO(Y.memoizedState,X,Z);Y.memoizedState=J,Y.baseState=J,z.memoizedProps=o0({},z.memoizedProps);var q=W6(z,f0);if(q!==null)M4(q,z,f0,m1)}},i_=function(z,Q,X){var Z=QH(z,Q);if(Z!==null){var Y=QO(Z.memoizedState,X);Z.memoizedState=Y,Z.baseState=Y,z.memoizedProps=o0({},z.memoizedProps);var J=W6(z,f0);if(J!==null)M4(J,z,f0,m1)}},o_=function(z,Q,X,Z){var Y=QH(z,Q);if(Y!==null){var J=ZO(Y.memoizedState,X,Z);Y.memoizedState=J,Y.baseState=J,z.memoizedProps=o0({},z.memoizedProps);var q=W6(z,f0);if(q!==null)M4(q,z,f0,m1)}},a_=function(z,Q,X){if(z.pendingProps=JO(z.memoizedProps,Q,X),z.alternate)z.alternate.pendingProps=z.pendingProps;var Z=W6(z,f0);if(Z!==null)M4(Z,z,f0,m1)},r_=function(z,Q){if(z.pendingProps=QO(z.memoizedProps,Q),z.alternate)z.alternate.pendingProps=z.pendingProps;var X=W6(z,f0);if(X!==null)M4(X,z,f0,m1)},n_=function(z,Q,X){if(z.pendingProps=ZO(z.memoizedProps,Q,X),z.alternate)z.alternate.pendingProps=z.pendingProps;var Z=W6(z,f0);if(Z!==null)M4(Z,z,f0,m1)},t_=function(z){var Q=W6(z,f0);if(Q!==null)M4(Q,z,f0,m1)},s_=function(z){c_=z},e_=function(z){d_=z}}function yw(z){var Q=yK(z);if(Q===null)return null;return Q.stateNode}function fw(z){return null}function Ew(){return P6}function hw(z){var Q=z.findFiberByHostInstance,X=$.ReactCurrentDispatcher;return n3({bundleType:z.bundleType,version:z.version,rendererPackageName:z.rendererPackageName,rendererConfig:z.rendererConfig,overrideHookState:l_,overrideHookStateDeletePath:i_,overrideHookStateRenamePath:o_,overrideProps:a_,overridePropsDeletePath:r_,overridePropsRenamePath:n_,setErrorHandler:s_,setSuspenseHandler:e_,scheduleUpdate:t_,currentDispatcherRef:X,findHostInstanceByFiber:yw,findFiberByHostInstance:Q||fw,findHostInstancesForRefresh:Bw,scheduleRefresh:Kw,scheduleRoot:Uw,setRefreshHandler:Hw,getCurrentFiber:Ew,reconcilerVersion:tG})}var $O=typeof reportError==="function"?reportError:function(z){console.error(z)};function XH(z){this._internalRoot=z}AY.prototype.render=XH.prototype.render=function(z){var Q=this._internalRoot;if(Q===null)throw Error("Cannot update an unmounted root.");{if(typeof arguments[1]==="function")H("render(...): does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect().");else if(vY(arguments[1]))H("You passed a container to the second argument of root.render(...). You don't need to pass it again since you already passed it to create the root.");else if(typeof arguments[1]<"u")H("You passed a second argument to root.render(...) but it only accepts one argument.");var X=Q.containerInfo;if(X.nodeType!==U4){var Z=x_(Q.current);if(Z){if(Z.parentNode!==X)H("render(...): It looks like the React-rendered content of the root container was removed without using React. This is not supported and will cause errors. Instead, call root.unmount() to empty a root's container.")}}}q8(z,Q,null,null)},AY.prototype.unmount=XH.prototype.unmount=function(){if(typeof arguments[0]==="function")H("unmount(...): does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect().");var z=this._internalRoot;if(z!==null){this._internalRoot=null;var Q=z.containerInfo;if(R_())H("Attempted to synchronously unmount a root while React was already rendering. React cannot finish unmounting the root until the current render has completed, which may lead to a race condition.");i5(function(){q8(null,z,null,null)}),YB(Q)}};function pw(z,Q){if(!vY(z))throw Error("createRoot(...): Target container is not a DOM element.");qO(z);var X=!1,Z=!1,Y="",J=$O,q=null;if(Q!==null&&Q!==void 0){if(Q.hydrate)W("hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead.");else if(typeof Q==="object"&&Q!==null&&Q.$$typeof===p1)H(`You passed a JSX element to createRoot. You probably meant to call root.render instead. Example usage:
|
|
120
|
+
|
|
121
|
+
let root = createRoot(domContainer);
|
|
122
|
+
root.render(<App />);`);if(Q.unstable_strictMode===!0)X=!0;if(Q.identifierPrefix!==void 0)Y=Q.identifierPrefix;if(Q.onRecoverableError!==void 0)J=Q.onRecoverableError;if(Q.transitionCallbacks!==void 0)q=Q.transitionCallbacks}var G=u_(z,bZ,null,X,Z,Y,J);KZ(G.current,z);var K=z.nodeType===U4?z.parentNode:z;return _X(K),new XH(G)}function AY(z){this._internalRoot=z}function mw(z){if(z)rW(z)}AY.prototype.unstable_scheduleHydration=mw;function uw(z,Q,X){if(!vY(z))throw Error("hydrateRoot(...): Target container is not a DOM element.");if(qO(z),Q===void 0)H("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var Z=X!=null?X:null,Y=X!=null&&X.hydratedSources||null,J=!1,q=!1,G="",K=$O;if(X!==null&&X!==void 0){if(X.unstable_strictMode===!0)J=!0;if(X.identifierPrefix!==void 0)G=X.identifierPrefix;if(X.onRecoverableError!==void 0)K=X.onRecoverableError}var _=j_(Q,null,z,bZ,Z,J,q,G,K);if(KZ(_.current,z),_X(z),Y)for(var O=0;O<Y.length;O++){var v=Y[O];uF(_,v)}return new AY(_)}function vY(z){return!!(z&&(z.nodeType===O6||z.nodeType===S5||z.nodeType===qJ||!B0))}function G8(z){return!!(z&&(z.nodeType===O6||z.nodeType===S5||z.nodeType===qJ||z.nodeType===U4&&z.nodeValue===" react-mount-point-unstable "))}function qO(z){{if(z.nodeType===O6&&z.tagName&&z.tagName.toUpperCase()==="BODY")H("createRoot(): Creating roots directly with document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try using a container element created for your app.");if(AX(z))if(z._reactRootContainer)H("You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported.");else H("You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it.")}}var jw=$.ReactCurrentOwner,GO;GO=function(z){if(z._reactRootContainer&&z.nodeType!==U4){var Q=x_(z._reactRootContainer.current);if(Q){if(Q.parentNode!==z)H("render(...): It looks like the React-rendered content of this container was removed without using React. This is not supported and will cause errors. Instead, call ReactDOM.unmountComponentAtNode to empty a container.")}}var X=!!z._reactRootContainer,Z=ZH(z),Y=!!(Z&&K7(Z));if(Y&&!X)H("render(...): Replacing React-rendered children with a new root component. If you intended to update the children of this node, you should instead have the existing children update their state and render the new components instead of calling ReactDOM.render.");if(z.nodeType===O6&&z.tagName&&z.tagName.toUpperCase()==="BODY")H("render(): Rendering components directly into document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try rendering into a container element created for your app.")};function ZH(z){if(!z)return null;if(z.nodeType===S5)return z.documentElement;else return z.firstChild}function HO(){}function gw(z,Q,X,Z,Y){if(Y){if(typeof Z==="function"){var J=Z;Z=function(){var A=wY(q);J.call(A)}}var q=j_(Q,Z,z,B7,null,!1,!1,"",HO);z._reactRootContainer=q,KZ(q.current,z);var G=z.nodeType===U4?z.parentNode:z;return _X(G),i5(),q}else{var K;while(K=z.lastChild)z.removeChild(K);if(typeof Z==="function"){var _=Z;Z=function(){var A=wY(O);_.call(A)}}var O=u_(z,B7,null,!1,!1,"",HO);z._reactRootContainer=O,KZ(O.current,z);var v=z.nodeType===U4?z.parentNode:z;return _X(v),i5(function(){q8(Q,O,X,Z)}),O}}function xw(z,Q){if(z!==null&&typeof z!=="function")H("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",Q,z)}function kY(z,Q,X,Z,Y){GO(X),xw(Y===void 0?null:Y,"render");var J=X._reactRootContainer,q;if(!J)q=gw(X,Q,z,Y,Z);else{if(q=J,typeof Y==="function"){var G=Y;Y=function(){var K=wY(q);G.call(K)}}q8(Q,q,z,Y)}return wY(q)}var KO=!1;function cw(z){{if(!KO)KO=!0,H("findDOMNode is deprecated and will be removed in the next major release. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node");var Q=jw.current;if(Q!==null&&Q.stateNode!==null){var X=Q.stateNode._warnedAboutRefsInRender;if(!X)H("%s is accessing findDOMNode inside its render(). render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",V1(Q.type)||"A component");Q.stateNode._warnedAboutRefsInRender=!0}}if(z==null)return null;if(z.nodeType===O6)return z;return Iw(z,"findDOMNode")}function dw(z,Q,X){if(H("ReactDOM.hydrate is no longer supported in React 18. Use hydrateRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!G8(Q))throw Error("Target container is not a DOM element.");{var Z=AX(Q)&&Q._reactRootContainer===void 0;if(Z)H("You are calling ReactDOM.hydrate() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call hydrateRoot(container, element)?")}return kY(null,z,Q,!0,X)}function lw(z,Q,X){if(H("ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!G8(Q))throw Error("Target container is not a DOM element.");{var Z=AX(Q)&&Q._reactRootContainer===void 0;if(Z)H("You are calling ReactDOM.render() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.render(element)?")}return kY(null,z,Q,!1,X)}function iw(z,Q,X,Z){if(H("ReactDOM.unstable_renderSubtreeIntoContainer() is no longer supported in React 18. Consider using a portal instead. Until you switch to the createRoot API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!G8(X))throw Error("Target container is not a DOM element.");if(z==null||!E3(z))throw Error("parentComponent must be a valid React Component");return kY(z,Q,X,!1,Z)}var UO=!1;function ow(z){if(!UO)UO=!0,H("unmountComponentAtNode is deprecated and will be removed in the next major release. Switch to the createRoot API. Learn more: https://reactjs.org/link/switch-to-createroot");if(!G8(z))throw Error("unmountComponentAtNode(...): Target container is not a DOM element.");{var Q=AX(z)&&z._reactRootContainer===void 0;if(Q)H("You are calling ReactDOM.unmountComponentAtNode() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.unmount()?")}if(z._reactRootContainer){{var X=ZH(z),Z=X&&!K7(X);if(Z)H("unmountComponentAtNode(): The node you're attempting to unmount was rendered by another copy of React.")}return i5(function(){kY(null,null,z,!1,function(){z._reactRootContainer=null,YB(z)})}),!0}else{{var Y=ZH(z),J=!!(Y&&K7(Y)),q=z.nodeType===O6&&G8(z.parentNode)&&!!z.parentNode._reactRootContainer;if(J)H("unmountComponentAtNode(): The node you're attempting to unmount was rendered by React and is not a top-level container. %s",q?"You may have accidentally passed in a React root node instead of its container.":"Instead, have the parent component update its state and rerender in order to remove this component.")}return!1}}if(uW(Tw),gW(Sw),xW(Vw),cW(i6),dW(hW),typeof Map!=="function"||Map.prototype==null||typeof Map.prototype.forEach!=="function"||typeof Set!=="function"||Set.prototype==null||typeof Set.prototype.clear!=="function"||typeof Set.prototype.forEach!=="function")H("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills");A3(lR),I3(fG,uM,i5);function aw(z,Q){var X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!vY(Q))throw Error("Target container is not a DOM element.");return kw(z,Q,null,X)}function rw(z,Q,X,Z){return iw(z,Q,X,Z)}var YH={usingClientEntryPoint:!1,Events:[K7,iz,UZ,PK,MK,fG]};function nw(z,Q){if(!YH.usingClientEntryPoint)H('You are importing createRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".');return pw(z,Q)}function tw(z,Q,X){if(!YH.usingClientEntryPoint)H('You are importing hydrateRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".');return uw(z,Q,X)}function sw(z){if(R_())H("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task.");return i5(z)}var ew=hw({findFiberByHostInstance:n7,bundleType:1,version:tG,rendererPackageName:"react-dom"});if(!ew&&y0&&window.top===window.self){if(navigator.userAgent.indexOf("Chrome")>-1&&navigator.userAgent.indexOf("Edge")===-1||navigator.userAgent.indexOf("Firefox")>-1){var BO=window.location.protocol;if(/^(https?|file):$/.test(BO))console.info("%cDownload the React DevTools for a better development experience: https://reactjs.org/link/react-devtools"+(BO==="file:"?`
|
|
123
|
+
You might need to use a local HTTP server (instead of file://): https://reactjs.org/link/react-devtools-faq`:""),"font-weight:bold")}}if(Z2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=YH,Z2.createPortal=aw,Z2.createRoot=nw,Z2.findDOMNode=cw,Z2.flushSync=sw,Z2.hydrate=dw,Z2.hydrateRoot=tw,Z2.render=lw,Z2.unmountComponentAtNode=ow,Z2.unstable_batchedUpdates=fG,Z2.unstable_renderSubtreeIntoContainer=rw,Z2.version=tG,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function")__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var WO=K8((lv,LO)=>{var Y2=Q0(OO());LO.exports=Y2});var bO=K8((J2)=>{var RQ=Q0(WO());bQ=RQ.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,J2.createRoot=function($,U){bQ.usingClientEntryPoint=!0;try{return RQ.createRoot($,U)}finally{bQ.usingClientEntryPoint=!1}},J2.hydrateRoot=function($,U,B){bQ.usingClientEntryPoint=!0;try{return RQ.hydrateRoot($,U,B)}finally{bQ.usingClientEntryPoint=!1}};var bQ});var f1=K8((p2)=>{var UH=Q0(I1());(function(){var $=Symbol.for("react.element"),U=Symbol.for("react.portal"),B=Symbol.for("react.fragment"),W=Symbol.for("react.strict_mode"),H=Symbol.for("react.profiler"),R=Symbol.for("react.provider"),L=Symbol.for("react.context"),b=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),k=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),M=Symbol.for("react.offscreen"),I=Symbol.iterator,C="@@iterator";function j(N){if(N===null||typeof N!=="object")return null;var E=I&&N[I]||N[C];if(typeof E==="function")return E;return null}var u=UH.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function f(N){{for(var E=arguments.length,z0=Array(E>1?E-1:0),M0=1;M0<E;M0++)z0[M0-1]=arguments[M0];i("error",N,z0)}}function i(N,E,z0){{var M0=u.ReactDebugCurrentFrame,l0=M0.getStackAddendum();if(l0!=="")E+="%s",z0=z0.concat([l0]);var j0=z0.map(function(g0){return String(g0)});j0.unshift("Warning: "+E),Function.prototype.apply.call(console[N],console,j0)}}var l=!1,o=!1,t=!1,c=!1,k0=!1,s;s=Symbol.for("react.module.reference");function N0(N){if(typeof N==="string"||typeof N==="function")return!0;if(N===B||N===H||k0||N===W||N===T||N===k||c||N===M||l||o||t)return!0;if(typeof N==="object"&&N!==null){if(N.$$typeof===w||N.$$typeof===P||N.$$typeof===R||N.$$typeof===L||N.$$typeof===b||N.$$typeof===s||N.getModuleId!==void 0)return!0}return!1}function p(N,E,z0){var M0=N.displayName;if(M0)return M0;var l0=E.displayName||E.name||"";return l0!==""?z0+"("+l0+")":z0}function r(N){return N.displayName||"Context"}function g(N){if(N==null)return null;if(typeof N.tag==="number")f("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");if(typeof N==="function")return N.displayName||N.name||null;if(typeof N==="string")return N;switch(N){case B:return"Fragment";case U:return"Portal";case H:return"Profiler";case W:return"StrictMode";case T:return"Suspense";case k:return"SuspenseList"}if(typeof N==="object")switch(N.$$typeof){case L:var E=N;return r(E)+".Consumer";case R:var z0=N;return r(z0._context)+".Provider";case b:return p(N,N.render,"ForwardRef");case P:var M0=N.displayName||null;if(M0!==null)return M0;return g(N.type)||"Memo";case w:{var l0=N,j0=l0._payload,g0=l0._init;try{return g(g0(j0))}catch(e){return null}}}return null}var _0=Object.assign,I0=0,b1,Q1,n1,d,O0,B0,p0;function R1(){}R1.__reactDisabledLog=!0;function t1(){{if(I0===0){b1=console.log,Q1=console.info,n1=console.warn,d=console.error,O0=console.group,B0=console.groupCollapsed,p0=console.groupEnd;var N={configurable:!0,enumerable:!0,value:R1,writable:!0};Object.defineProperties(console,{info:N,log:N,warn:N,error:N,group:N,groupCollapsed:N,groupEnd:N})}I0++}}function i1(){{if(I0--,I0===0){var N={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:_0({},N,{value:b1}),info:_0({},N,{value:Q1}),warn:_0({},N,{value:n1}),error:_0({},N,{value:d}),group:_0({},N,{value:O0}),groupCollapsed:_0({},N,{value:B0}),groupEnd:_0({},N,{value:p0})})}if(I0<0)f("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var q4=u.ReactCurrentDispatcher,A4;function s1(N,E,z0){{if(A4===void 0)try{throw Error()}catch(l0){var M0=l0.stack.trim().match(/\n( *(at )?)/);A4=M0&&M0[1]||""}return`
|
|
124
|
+
`+A4+N}}var o1=!1,Z4;{var v4=typeof WeakMap==="function"?WeakMap:Map;Z4=new v4}function y0(N,E){if(!N||o1)return"";{var z0=Z4.get(N);if(z0!==void 0)return z0}var M0;o1=!0;var l0=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var j0;j0=q4.current,q4.current=null,t1();try{if(E){var g0=function(){throw Error()};if(Object.defineProperty(g0.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==="object"&&Reflect.construct){try{Reflect.construct(g0,[])}catch(e1){M0=e1}Reflect.construct(N,[],g0)}else{try{g0.call()}catch(e1){M0=e1}N.call(g0.prototype)}}else{try{throw Error()}catch(e1){M0=e1}N()}}catch(e1){if(e1&&M0&&typeof e1.stack==="string"){var e=e1.stack.split(`
|
|
125
|
+
`),K0=M0.stack.split(`
|
|
126
|
+
`),S0=e.length-1,S1=K0.length-1;while(S0>=1&&S1>=0&&e[S0]!==K0[S1])S1--;for(;S0>=1&&S1>=0;S0--,S1--)if(e[S0]!==K0[S1]){if(S0!==1||S1!==1)do if(S0--,S1--,S1<0||e[S0]!==K0[S1]){var _6=`
|
|
127
|
+
`+e[S0].replace(" at new "," at ");if(N.displayName&&_6.includes("<anonymous>"))_6=_6.replace("<anonymous>",N.displayName);if(typeof N==="function")Z4.set(N,_6);return _6}while(S0>=1&&S1>=0);break}}}finally{o1=!1,q4.current=j0,i1(),Error.prepareStackTrace=l0}var v5=N?N.displayName||N.name:"",k5=v5?s1(v5):"";if(typeof N==="function")Z4.set(N,k5);return k5}function O1(N,E,z0){return y0(N,!1)}function A1(N){var E=N.prototype;return!!(E&&E.isReactComponent)}function v1(N,E,z0){if(N==null)return"";if(typeof N==="function")return y0(N,A1(N));if(typeof N==="string")return s1(N);switch(N){case T:return s1("Suspense");case k:return s1("SuspenseList")}if(typeof N==="object")switch(N.$$typeof){case b:return O1(N.render);case P:return v1(N.type,E,z0);case w:{var M0=N,l0=M0._payload,j0=M0._init;try{return v1(j0(l0),E,z0)}catch(g0){}}}return""}var X1=Object.prototype.hasOwnProperty,n4={},t4=u.ReactDebugCurrentFrame;function g6(N){if(N){var E=N._owner,z0=v1(N.type,N._source,E?E.type:null);t4.setExtraStackFrame(z0)}else t4.setExtraStackFrame(null)}function c4(N,E,z0,M0,l0){{var j0=Function.call.bind(X1);for(var g0 in N)if(j0(N,g0)){var e=void 0;try{if(typeof N[g0]!=="function"){var K0=Error((M0||"React class")+": "+z0+" type `"+g0+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof N[g0]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw K0.name="Invariant Violation",K0}e=N[g0](E,g0,M0,z0,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(S0){e=S0}if(e&&!(e instanceof Error))g6(l0),f("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",M0||"React class",z0,g0,typeof e),g6(null);if(e instanceof Error&&!(e.message in n4))n4[e.message]=!0,g6(l0),f("Failed %s type: %s",z0,e.message),g6(null)}}}var Fz=Array.isArray;function G4(N){return Fz(N)}function C6(N){{var E=typeof Symbol==="function"&&Symbol.toStringTag,z0=E&&N[Symbol.toStringTag]||N.constructor.name||"Object";return z0}}function Y4(N){try{return x6(N),!1}catch(E){return!0}}function x6(N){return""+N}function H4(N){if(Y4(N))return f("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",C6(N)),x6(N)}var C4=u.ReactCurrentOwner,U6={key:!0,ref:!0,__self:!0,__source:!0},c6,s4,B6;B6={};function J0(N){if(X1.call(N,"ref")){var E=Object.getOwnPropertyDescriptor(N,"ref").get;if(E&&E.isReactWarning)return!1}return N.ref!==void 0}function v0(N){if(X1.call(N,"key")){var E=Object.getOwnPropertyDescriptor(N,"key").get;if(E&&E.isReactWarning)return!1}return N.key!==void 0}function u0(N,E){if(typeof N.ref==="string"&&C4.current&&E&&C4.current.stateNode!==E){var z0=g(C4.current.type);if(!B6[z0])f('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',g(C4.current.type),N.ref),B6[z0]=!0}}function L1(N,E){{var z0=function(){if(!c6)c6=!0,f("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",E)};z0.isReactWarning=!0,Object.defineProperty(N,"key",{get:z0,configurable:!0})}}function D1(N,E){{var z0=function(){if(!s4)s4=!0,f("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",E)};z0.isReactWarning=!0,Object.defineProperty(N,"ref",{get:z0,configurable:!0})}}var K4=function(N,E,z0,M0,l0,j0,g0){var e={$$typeof:$,type:N,key:E,ref:z0,props:g0,_owner:j0};if(e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(e,"_self",{configurable:!1,enumerable:!1,writable:!1,value:M0}),Object.defineProperty(e,"_source",{configurable:!1,enumerable:!1,writable:!1,value:l0}),Object.freeze)Object.freeze(e.props),Object.freeze(e);return e};function c1(N,E,z0,M0,l0){{var j0,g0={},e=null,K0=null;if(z0!==void 0)H4(z0),e=""+z0;if(v0(E))H4(E.key),e=""+E.key;if(J0(E))K0=E.ref,u0(E,l0);for(j0 in E)if(X1.call(E,j0)&&!U6.hasOwnProperty(j0))g0[j0]=E[j0];if(N&&N.defaultProps){var S0=N.defaultProps;for(j0 in S0)if(g0[j0]===void 0)g0[j0]=S0[j0]}if(e||K0){var S1=typeof N==="function"?N.displayName||N.name||"Unknown":N;if(e)L1(g0,S1);if(K0)D1(g0,S1)}return K4(N,e,K0,l0,M0,C4.current,g0)}}var{ReactCurrentOwner:e4,ReactDebugCurrentFrame:r0}=u;function Z1(N){if(N){var E=N._owner,z0=v1(N.type,N._source,E?E.type:null);r0.setExtraStackFrame(z0)}else r0.setExtraStackFrame(null)}var D7=!1;function A5(N){return typeof N==="object"&&N!==null&&N.$$typeof===$}function q5(){{if(e4.current){var N=g(e4.current.type);if(N)return`
|
|
128
|
+
|
|
129
|
+
Check the render method of \``+N+"`."}return""}}function Pz(N){{if(N!==void 0){var E=N.fileName.replace(/^.*[\\\/]/,""),z0=N.lineNumber;return`
|
|
130
|
+
|
|
131
|
+
Check your code at `+E+":"+z0+"."}return""}}var Mz={};function wz(N){{var E=q5();if(!E){var z0=typeof N==="string"?N:N.displayName||N.name;if(z0)E=`
|
|
132
|
+
|
|
133
|
+
Check the top-level render call using <`+z0+">."}return E}}function y7(N,E){{if(!N._store||N._store.validated||N.key!=null)return;N._store.validated=!0;var z0=wz(E);if(Mz[z0])return;Mz[z0]=!0;var M0="";if(N&&N._owner&&N._owner!==e4.current)M0=" It was passed a child from "+g(N._owner.type)+".";Z1(N),f('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',z0,M0),Z1(null)}}function f7(N,E){{if(typeof N!=="object")return;if(G4(N))for(var z0=0;z0<N.length;z0++){var M0=N[z0];if(A5(M0))y7(M0,E)}else if(A5(N)){if(N._store)N._store.validated=!0}else if(N){var l0=j(N);if(typeof l0==="function"){if(l0!==N.entries){var j0=l0.call(N),g0;while(!(g0=j0.next()).done)if(A5(g0.value))y7(g0.value,E)}}}}}function DQ(N){{var E=N.type;if(E===null||E===void 0||typeof E==="string")return;var z0;if(typeof E==="function")z0=E.propTypes;else if(typeof E==="object"&&(E.$$typeof===b||E.$$typeof===P))z0=E.propTypes;else return;if(z0){var M0=g(E);c4(z0,N.props,"prop",M0,N)}else if(E.PropTypes!==void 0&&!D7){D7=!0;var l0=g(E);f("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",l0||"Unknown")}if(typeof E.getDefaultProps==="function"&&!E.getDefaultProps.isReactClassApproved)f("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function G1(N){{var E=Object.keys(N.props);for(var z0=0;z0<E.length;z0++){var M0=E[z0];if(M0!=="children"&&M0!=="key"){Z1(N),f("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",M0),Z1(null);break}}if(N.ref!==null)Z1(N),f("Invalid attribute `ref` supplied to `React.Fragment`."),Z1(null)}}var p1={};function d1(N,E,z0,M0,l0,j0){{var g0=N0(N);if(!g0){var e="";if(N===void 0||typeof N==="object"&&N!==null&&Object.keys(N).length===0)e+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";var K0=Pz(l0);if(K0)e+=K0;else e+=q5();var S0;if(N===null)S0="null";else if(G4(N))S0="array";else if(N!==void 0&&N.$$typeof===$)S0="<"+(g(N.type)||"Unknown")+" />",e=" Did you accidentally export a JSX literal instead of a component?";else S0=typeof N;f("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",S0,e)}var S1=c1(N,E,z0,l0,j0);if(S1==null)return S1;if(g0){var _6=E.children;if(_6!==void 0)if(M0)if(G4(_6)){for(var v5=0;v5<_6.length;v5++)f7(_6[v5],N);if(Object.freeze)Object.freeze(_6)}else f("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else f7(_6,N)}if(X1.call(E,"key")){var k5=g(N),e1=Object.keys(E).filter(function(P8){return P8!=="key"}),o0=e1.length>0?"{key: someKey, "+e1.join(": ..., ")+": ...}":"{key: someKey}";if(!p1[k5+o0]){var E7=e1.length>0?"{"+e1.join(": ..., ")+": ...}":"{}";f(`A props object containing a "key" prop is being spread into JSX:
|
|
134
|
+
let props = %s;
|
|
135
|
+
<%s {...props} />
|
|
136
|
+
React keys must be passed directly to JSX without using spread:
|
|
137
|
+
let props = %s;
|
|
138
|
+
<%s key={someKey} {...props} />`,o0,k5,E7,k5),p1[k5+o0]=!0}}if(N===B)G1(S1);else DQ(S1);return S1}}function N1(N,E,z0){return d1(N,E,z0,!0)}function k1(N,E,z0){return d1(N,E,z0,!1)}var W1=k1,J1=N1;p2.Fragment=B,p2.jsx=W1,p2.jsxs=J1})()});var j1=Q0(I1(),1),LL=Q0(bO(),1);var JH={memory:!0,tasks:!1,vision:!0,operator:!1,mcp:!1,realtime:!1,files:!1,agents:!1,builtinTools:{webSearch:!1,webFetch:!1}};function _z($,U){let B=$.agents;if(typeof B==="boolean")return{enabled:B,mode:"worker",group:U||void 0};return{...B,group:B.group||U||void 0}}var k7=Q0(I1(),1);function $H($){let{accessToken:U}=V4(),[B,W]=k7.useState([]),[H,R]=k7.useState(!0),L=k7.useCallback(()=>{let C={"Content-Type":"application/json"};if(U)C.Authorization=`Bearer ${U}`;return C},[U]),b=k7.useCallback(async()=>{let j=await(await fetch("/api/agents",{headers:L()})).json();W(j.agents||[]),R(!1)},[L]),T=IY();k7.useEffect(()=>{if($)b()},[$,T,b]);let k=async(C)=>{await fetch("/api/agents",{method:"POST",headers:L(),body:JSON.stringify(C)}),await b()},P=async(C)=>{await fetch(`/api/agents/${C}`,{method:"DELETE",headers:L()}),await b()},w=async(C,j)=>{let u=await fetch(`/api/agents/${C}`,{method:"PUT",headers:L(),body:JSON.stringify(j)}),f=await u.json();if(await b(),!u.ok&&f.error)return{error:f.error};return{}},M=async(C)=>{let j=C.status==="running"?"stop":"start";W((f)=>f.map((i)=>i.id===C.id?{...i,status:j==="start"?"starting":"stopping"}:i));let u=await fetch(`/api/agents/${C.id}/${j}`,{method:"POST",headers:L()});if(!u.ok){let f=await u.json();return W((i)=>i.map((l)=>l.id===C.id?{...l,status:C.status}:l)),{error:f.error}}return{}},I=B.filter((C)=>C.status==="running").length;return{agents:B,loading:H,runningCount:I,fetchAgents:b,createAgent:k,updateAgent:w,deleteAgent:P,toggleAgent:M}}var Oz=Q0(I1(),1);function qH($){let{accessToken:U}=V4(),[B,W]=Oz.useState([]),H=Oz.useCallback(()=>{let k={"Content-Type":"application/json"};if(U)k.Authorization=`Bearer ${U}`;return k},[U]),R=Oz.useCallback(async()=>{let P=await(await fetch("/api/providers",{headers:H()})).json();W(P.providers||[])},[H]);Oz.useEffect(()=>{if($)R()},[$,R]);let L=B.filter((k)=>k.hasKey);return{providers:B,configuredProviders:L,fetchProviders:R,saveKey:async(k,P)=>{let M=await(await fetch(`/api/keys/${k}/test`,{method:"POST",headers:H(),body:JSON.stringify({key:P})})).json();if(!M.valid)return{success:!1,error:M.error||"API key is invalid"};let I=await fetch(`/api/keys/${k}`,{method:"POST",headers:H(),body:JSON.stringify({key:P})});if(!I.ok)return{success:!1,error:(await I.json()).error||"Failed to save key"};return await R(),{success:!0}},deleteKey:async(k)=>{await fetch(`/api/keys/${k}`,{method:"DELETE",headers:H()}),await R()}}}var Lz=Q0(I1(),1);function GH(){let{accessToken:$,isAuthenticated:U}=V4(),[B,W]=Lz.useState(null),H=Lz.useCallback(()=>{let L={};if($)L.Authorization=`Bearer ${$}`;return L},[$]);Lz.useEffect(()=>{if(!U){W(null);return}fetch("/api/onboarding/status",{headers:H()}).then((L)=>L.json()).then((L)=>{W(L.completed||L.has_any_keys)}).catch(()=>W(!0))},[U,H]);let R=Lz.useCallback(async()=>{await fetch("/api/onboarding/complete",{method:"POST",headers:H()}),W(!0)},[H]);return{isComplete:B,setIsComplete:W,complete:R}}var PH=Q0(I1(),1);var V6=Q0(I1(),1);var _1=Q0(I1(),1),MQ=Q0(I1(),1),bz=Q0(I1(),1);function RO($){var U,B,W="";if(typeof $=="string"||typeof $=="number")W+=$;else if(typeof $=="object")if(Array.isArray($)){var H=$.length;for(U=0;U<H;U++)$[U]&&(B=RO($[U]))&&(W&&(W+=" "),W+=B)}else for(B in $)$[B]&&(W&&(W+=" "),W+=B);return W}function NO(){for(var $,U,B=0,W="",H=arguments.length;B<H;B++)($=arguments[B])&&(U=RO($))&&(W&&(W+=" "),W+=U);return W}var $2=($)=>{let U=G2($),{conflictingClassGroups:B,conflictingClassGroupModifiers:W}=$;return{getClassGroupId:(L)=>{let b=L.split("-");if(b[0]===""&&b.length!==1)b.shift();return MO(b,U)||q2(L)},getConflictingClassGroupIds:(L,b)=>{let T=B[L]||[];if(b&&W[L])return[...T,...W[L]];return T}}},MO=($,U)=>{if($.length===0)return U.classGroupId;let B=$[0],W=U.nextPart.get(B),H=W?MO($.slice(1),W):void 0;if(H)return H;if(U.validators.length===0)return;let R=$.join("-");return U.validators.find(({validator:L})=>L(R))?.classGroupId},FO=/^\[(.+)\]$/,q2=($)=>{if(FO.test($)){let U=FO.exec($)[1],B=U?.substring(0,U.indexOf(":"));if(B)return"arbitrary.."+B}},G2=($)=>{let{theme:U,prefix:B}=$,W={nextPart:new Map,validators:[]};return K2(Object.entries($.classGroups),B).forEach(([R,L])=>{KH(L,W,R,U)}),W},KH=($,U,B,W)=>{$.forEach((H)=>{if(typeof H==="string"){let R=H===""?U:PO(U,H);R.classGroupId=B;return}if(typeof H==="function"){if(H2(H)){KH(H(W),U,B,W);return}U.validators.push({validator:H,classGroupId:B});return}Object.entries(H).forEach(([R,L])=>{KH(L,PO(U,R),B,W)})})},PO=($,U)=>{let B=$;return U.split("-").forEach((W)=>{if(!B.nextPart.has(W))B.nextPart.set(W,{nextPart:new Map,validators:[]});B=B.nextPart.get(W)}),B},H2=($)=>$.isThemeGetter,K2=($,U)=>{if(!U)return $;return $.map(([B,W])=>{let H=W.map((R)=>{if(typeof R==="string")return U+R;if(typeof R==="object")return Object.fromEntries(Object.entries(R).map(([L,b])=>[U+L,b]));return R});return[B,H]})},U2=($)=>{if($<1)return{get:()=>{return},set:()=>{}};let U=0,B=new Map,W=new Map,H=(R,L)=>{if(B.set(R,L),U++,U>$)U=0,W=B,B=new Map};return{get(R){let L=B.get(R);if(L!==void 0)return L;if((L=W.get(R))!==void 0)return H(R,L),L},set(R,L){if(B.has(R))B.set(R,L);else H(R,L)}}};var B2=($)=>{let{separator:U,experimentalParseClassName:B}=$,W=U.length===1,H=U[0],R=U.length,L=(b)=>{let T=[],k=0,P=0,w;for(let u=0;u<b.length;u++){let f=b[u];if(k===0){if(f===H&&(W||b.slice(u,u+R)===U)){T.push(b.slice(P,u)),P=u+R;continue}if(f==="/"){w=u;continue}}if(f==="[")k++;else if(f==="]")k--}let M=T.length===0?b:b.substring(P),I=M.startsWith("!"),C=I?M.substring(1):M,j=w&&w>P?w-P:void 0;return{modifiers:T,hasImportantModifier:I,baseClassName:C,maybePostfixModifierPosition:j}};if(B)return(b)=>B({className:b,parseClassName:L});return L},_2=($)=>{if($.length<=1)return $;let U=[],B=[];return $.forEach((W)=>{if(W[0]==="[")U.push(...B.sort(),W),B=[];else B.push(W)}),U.push(...B.sort()),U},O2=($)=>({cache:U2($.cacheSize),parseClassName:B2($),...$2($)}),L2=/\s+/,W2=($,U)=>{let{parseClassName:B,getClassGroupId:W,getConflictingClassGroupIds:H}=U,R=[],L=$.trim().split(L2),b="";for(let T=L.length-1;T>=0;T-=1){let k=L[T],{modifiers:P,hasImportantModifier:w,baseClassName:M,maybePostfixModifierPosition:I}=B(k),C=Boolean(I),j=W(C?M.substring(0,I):M);if(!j){if(!C){b=k+(b.length>0?" "+b:b);continue}if(j=W(M),!j){b=k+(b.length>0?" "+b:b);continue}C=!1}let u=_2(P).join(":"),f=w?u+"!":u,i=f+j;if(R.includes(i))continue;R.push(i);let l=H(j,C);for(let o=0;o<l.length;++o){let t=l[o];R.push(f+t)}b=k+(b.length>0?" "+b:b)}return b};function b2(){let $=0,U,B,W="";while($<arguments.length)if(U=arguments[$++]){if(B=wO(U))W&&(W+=" "),W+=B}return W}var wO=($)=>{if(typeof $==="string")return $;let U,B="";for(let W=0;W<$.length;W++)if($[W]){if(U=wO($[W]))B&&(B+=" "),B+=U}return B};function R2($,...U){let B,W,H,R=L;function L(T){let k=U.reduce((P,w)=>w(P),$());return B=O2(k),W=B.cache.get,H=B.cache.set,R=b,b(T)}function b(T){let k=W(T);if(k)return k;let P=W2(T,B);return H(T,P),P}return function(){return R(b2.apply(null,arguments))}}var x1=($)=>{let U=(B)=>B[$]||[];return U.isThemeGetter=!0,U},AO=/^\[(?:([a-z-]+):)?(.+)\]$/i,N2=/^\d+\/\d+$/,F2=new Set(["px","full","screen"]),P2=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,M2=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,w2=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,A2=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,v2=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,r5=($)=>NQ($)||F2.has($)||N2.test($),I7=($)=>FQ($,"length",y2),NQ=($)=>Boolean($)&&!Number.isNaN(Number($)),HH=($)=>FQ($,"number",NQ),B8=($)=>Boolean($)&&Number.isInteger(Number($)),k2=($)=>$.endsWith("%")&&NQ($.slice(0,-1)),i0=($)=>AO.test($),T7=($)=>P2.test($),I2=new Set(["length","size","percentage"]),T2=($)=>FQ($,I2,vO),S2=($)=>FQ($,"position",vO),V2=new Set(["image","url"]),C2=($)=>FQ($,V2,E2),D2=($)=>FQ($,"",f2),_8=()=>!0,FQ=($,U,B)=>{let W=AO.exec($);if(W){if(W[1])return typeof U==="string"?W[1]===U:U.has(W[1]);return B(W[2])}return!1},y2=($)=>M2.test($)&&!w2.test($),vO=()=>!1,f2=($)=>A2.test($),E2=($)=>v2.test($);var h2=()=>{let $=x1("colors"),U=x1("spacing"),B=x1("blur"),W=x1("brightness"),H=x1("borderColor"),R=x1("borderRadius"),L=x1("borderSpacing"),b=x1("borderWidth"),T=x1("contrast"),k=x1("grayscale"),P=x1("hueRotate"),w=x1("invert"),M=x1("gap"),I=x1("gradientColorStops"),C=x1("gradientColorStopPositions"),j=x1("inset"),u=x1("margin"),f=x1("opacity"),i=x1("padding"),l=x1("saturate"),o=x1("scale"),t=x1("sepia"),c=x1("skew"),k0=x1("space"),s=x1("translate"),N0=()=>["auto","contain","none"],p=()=>["auto","hidden","clip","visible","scroll"],r=()=>["auto",i0,U],g=()=>[i0,U],_0=()=>["",r5,I7],I0=()=>["auto",NQ,i0],b1=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Q1=()=>["solid","dashed","dotted","double","none"],n1=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],d=()=>["start","end","center","between","around","evenly","stretch"],O0=()=>["","0",i0],B0=()=>["auto","avoid","all","avoid-page","page","left","right","column"],p0=()=>[NQ,i0];return{cacheSize:500,separator:":",theme:{colors:[_8],spacing:[r5,I7],blur:["none","",T7,i0],brightness:p0(),borderColor:[$],borderRadius:["none","","full",T7,i0],borderSpacing:g(),borderWidth:_0(),contrast:p0(),grayscale:O0(),hueRotate:p0(),invert:O0(),gap:g(),gradientColorStops:[$],gradientColorStopPositions:[k2,I7],inset:r(),margin:r(),opacity:p0(),padding:g(),saturate:p0(),scale:p0(),sepia:O0(),skew:p0(),space:g(),translate:g()},classGroups:{aspect:[{aspect:["auto","square","video",i0]}],container:["container"],columns:[{columns:[T7]}],"break-after":[{"break-after":B0()}],"break-before":[{"break-before":B0()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...b1(),i0]}],overflow:[{overflow:p()}],"overflow-x":[{"overflow-x":p()}],"overflow-y":[{"overflow-y":p()}],overscroll:[{overscroll:N0()}],"overscroll-x":[{"overscroll-x":N0()}],"overscroll-y":[{"overscroll-y":N0()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[j]}],"inset-x":[{"inset-x":[j]}],"inset-y":[{"inset-y":[j]}],start:[{start:[j]}],end:[{end:[j]}],top:[{top:[j]}],right:[{right:[j]}],bottom:[{bottom:[j]}],left:[{left:[j]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",B8,i0]}],basis:[{basis:r()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",i0]}],grow:[{grow:O0()}],shrink:[{shrink:O0()}],order:[{order:["first","last","none",B8,i0]}],"grid-cols":[{"grid-cols":[_8]}],"col-start-end":[{col:["auto",{span:["full",B8,i0]},i0]}],"col-start":[{"col-start":I0()}],"col-end":[{"col-end":I0()}],"grid-rows":[{"grid-rows":[_8]}],"row-start-end":[{row:["auto",{span:[B8,i0]},i0]}],"row-start":[{"row-start":I0()}],"row-end":[{"row-end":I0()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",i0]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",i0]}],gap:[{gap:[M]}],"gap-x":[{"gap-x":[M]}],"gap-y":[{"gap-y":[M]}],"justify-content":[{justify:["normal",...d()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...d(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...d(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[i]}],px:[{px:[i]}],py:[{py:[i]}],ps:[{ps:[i]}],pe:[{pe:[i]}],pt:[{pt:[i]}],pr:[{pr:[i]}],pb:[{pb:[i]}],pl:[{pl:[i]}],m:[{m:[u]}],mx:[{mx:[u]}],my:[{my:[u]}],ms:[{ms:[u]}],me:[{me:[u]}],mt:[{mt:[u]}],mr:[{mr:[u]}],mb:[{mb:[u]}],ml:[{ml:[u]}],"space-x":[{"space-x":[k0]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k0]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",i0,U]}],"min-w":[{"min-w":[i0,U,"min","max","fit"]}],"max-w":[{"max-w":[i0,U,"none","full","min","max","fit","prose",{screen:[T7]},T7]}],h:[{h:[i0,U,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[i0,U,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[i0,U,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[i0,U,"auto","min","max","fit"]}],"font-size":[{text:["base",T7,I7]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",HH]}],"font-family":[{font:[_8]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",i0]}],"line-clamp":[{"line-clamp":["none",NQ,HH]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",r5,i0]}],"list-image":[{"list-image":["none",i0]}],"list-style-type":[{list:["none","disc","decimal",i0]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[$]}],"placeholder-opacity":[{"placeholder-opacity":[f]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[$]}],"text-opacity":[{"text-opacity":[f]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Q1(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",r5,I7]}],"underline-offset":[{"underline-offset":["auto",r5,i0]}],"text-decoration-color":[{decoration:[$]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:g()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",i0]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",i0]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[f]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...b1(),S2]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",T2]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},C2]}],"bg-color":[{bg:[$]}],"gradient-from-pos":[{from:[C]}],"gradient-via-pos":[{via:[C]}],"gradient-to-pos":[{to:[C]}],"gradient-from":[{from:[I]}],"gradient-via":[{via:[I]}],"gradient-to":[{to:[I]}],rounded:[{rounded:[R]}],"rounded-s":[{"rounded-s":[R]}],"rounded-e":[{"rounded-e":[R]}],"rounded-t":[{"rounded-t":[R]}],"rounded-r":[{"rounded-r":[R]}],"rounded-b":[{"rounded-b":[R]}],"rounded-l":[{"rounded-l":[R]}],"rounded-ss":[{"rounded-ss":[R]}],"rounded-se":[{"rounded-se":[R]}],"rounded-ee":[{"rounded-ee":[R]}],"rounded-es":[{"rounded-es":[R]}],"rounded-tl":[{"rounded-tl":[R]}],"rounded-tr":[{"rounded-tr":[R]}],"rounded-br":[{"rounded-br":[R]}],"rounded-bl":[{"rounded-bl":[R]}],"border-w":[{border:[b]}],"border-w-x":[{"border-x":[b]}],"border-w-y":[{"border-y":[b]}],"border-w-s":[{"border-s":[b]}],"border-w-e":[{"border-e":[b]}],"border-w-t":[{"border-t":[b]}],"border-w-r":[{"border-r":[b]}],"border-w-b":[{"border-b":[b]}],"border-w-l":[{"border-l":[b]}],"border-opacity":[{"border-opacity":[f]}],"border-style":[{border:[...Q1(),"hidden"]}],"divide-x":[{"divide-x":[b]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[b]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[f]}],"divide-style":[{divide:Q1()}],"border-color":[{border:[H]}],"border-color-x":[{"border-x":[H]}],"border-color-y":[{"border-y":[H]}],"border-color-s":[{"border-s":[H]}],"border-color-e":[{"border-e":[H]}],"border-color-t":[{"border-t":[H]}],"border-color-r":[{"border-r":[H]}],"border-color-b":[{"border-b":[H]}],"border-color-l":[{"border-l":[H]}],"divide-color":[{divide:[H]}],"outline-style":[{outline:["",...Q1()]}],"outline-offset":[{"outline-offset":[r5,i0]}],"outline-w":[{outline:[r5,I7]}],"outline-color":[{outline:[$]}],"ring-w":[{ring:_0()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[$]}],"ring-opacity":[{"ring-opacity":[f]}],"ring-offset-w":[{"ring-offset":[r5,I7]}],"ring-offset-color":[{"ring-offset":[$]}],shadow:[{shadow:["","inner","none",T7,D2]}],"shadow-color":[{shadow:[_8]}],opacity:[{opacity:[f]}],"mix-blend":[{"mix-blend":[...n1(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":n1()}],filter:[{filter:["","none"]}],blur:[{blur:[B]}],brightness:[{brightness:[W]}],contrast:[{contrast:[T]}],"drop-shadow":[{"drop-shadow":["","none",T7,i0]}],grayscale:[{grayscale:[k]}],"hue-rotate":[{"hue-rotate":[P]}],invert:[{invert:[w]}],saturate:[{saturate:[l]}],sepia:[{sepia:[t]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[B]}],"backdrop-brightness":[{"backdrop-brightness":[W]}],"backdrop-contrast":[{"backdrop-contrast":[T]}],"backdrop-grayscale":[{"backdrop-grayscale":[k]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[P]}],"backdrop-invert":[{"backdrop-invert":[w]}],"backdrop-opacity":[{"backdrop-opacity":[f]}],"backdrop-saturate":[{"backdrop-saturate":[l]}],"backdrop-sepia":[{"backdrop-sepia":[t]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[L]}],"border-spacing-x":[{"border-spacing-x":[L]}],"border-spacing-y":[{"border-spacing-y":[L]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",i0]}],duration:[{duration:p0()}],ease:[{ease:["linear","in","out","in-out",i0]}],delay:[{delay:p0()}],animate:[{animate:["none","spin","ping","pulse","bounce",i0]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[o]}],"scale-x":[{"scale-x":[o]}],"scale-y":[{"scale-y":[o]}],rotate:[{rotate:[B8,i0]}],"translate-x":[{"translate-x":[s]}],"translate-y":[{"translate-y":[s]}],"skew-x":[{"skew-x":[c]}],"skew-y":[{"skew-y":[c]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",i0]}],accent:[{accent:["auto",$]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",i0]}],"caret-color":[{caret:[$]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":g()}],"scroll-mx":[{"scroll-mx":g()}],"scroll-my":[{"scroll-my":g()}],"scroll-ms":[{"scroll-ms":g()}],"scroll-me":[{"scroll-me":g()}],"scroll-mt":[{"scroll-mt":g()}],"scroll-mr":[{"scroll-mr":g()}],"scroll-mb":[{"scroll-mb":g()}],"scroll-ml":[{"scroll-ml":g()}],"scroll-p":[{"scroll-p":g()}],"scroll-px":[{"scroll-px":g()}],"scroll-py":[{"scroll-py":g()}],"scroll-ps":[{"scroll-ps":g()}],"scroll-pe":[{"scroll-pe":g()}],"scroll-pt":[{"scroll-pt":g()}],"scroll-pr":[{"scroll-pr":g()}],"scroll-pb":[{"scroll-pb":g()}],"scroll-pl":[{"scroll-pl":g()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",i0]}],fill:[{fill:[$,"none"]}],"stroke-w":[{stroke:[r5,I7,HH]}],stroke:[{stroke:[$,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var kO=R2(h2);var fO=Q0(I1(),1),J5=Q0(f1(),1),wQ=Q0(I1(),1),x4=Q0(f1(),1),EO=Q0(f1(),1),WH=Q0(f1(),1),AQ=Q0(I1(),1),X4=Q0(f1(),1),hO=Q0(I1(),1),w4=Q0(f1(),1),L8=Q0(f1(),1),X0=Q0(f1(),1),F6=Q0(f1(),1),RH=Q0(f1(),1),P0=Q0(f1(),1),l1=Q0(f1(),1),K1=Q0(f1(),1),U0=Q0(f1(),1),h0=Q0(f1(),1),O8=Q0(f1(),1),M5=Q0(I1(),1),D0=Q0(f1(),1),t5=Q0(I1(),1),b0=Q0(f1(),1),H6=Q0(f1(),1),vA=Q0(I1(),1),pO=Q0(f1(),1),NH=Q0(I1(),1),FH=Q0(f1(),1),kA=Q0(I1(),1),mO=Q0(f1(),1),uO=Q0(I1(),1),jO=Q0(f1(),1),IA=Q0(I1(),1),gO=Q0(f1(),1),xO=Q0(f1(),1),cO=Q0(f1(),1),m2=Object.defineProperty,u2=($,U,B)=>(U in $)?m2($,U,{enumerable:!0,configurable:!0,writable:!0,value:B}):$[U]=B,j2=($,U,B)=>u2($,typeof U!=="symbol"?U+"":U,B);function C1(...$){return kO(NO($))}var Rk=[{id:"msg-1",role:"assistant",content:"Hello! I'm your AI assistant. How can I help you today?",timestamp:new Date(Date.now()-3600000)},{id:"msg-2",role:"user",content:"I want to plan a trip to Europe",timestamp:new Date(Date.now()-3500000)},{id:"msg-3",role:"assistant",content:"Great choice! Europe has amazing destinations. What's your budget and how many days do you have?",timestamp:new Date(Date.now()-3400000)},{id:"msg-4",role:"user",content:"Around $2000 for 5 days",timestamp:new Date(Date.now()-3300000)},{id:"msg-5",role:"assistant",content:"Perfect! I found some great destinations that fit your budget:",widgets:[{type:"list",id:"destinations-1",props:{items:[{id:"paris",title:"Paris, France",subtitle:"5 days • $1,850",description:"The City of Light with iconic landmarks",metadata:{city:"Paris",country:"France",lat:48.8566,lng:2.3522,price:1850,days:5}},{id:"rome",title:"Rome, Italy",subtitle:"5 days • $1,650",description:"Ancient history meets modern culture",metadata:{city:"Rome",country:"Italy",lat:41.9028,lng:12.4964,price:1650,days:5}},{id:"barcelona",title:"Barcelona, Spain",subtitle:"5 days • $1,450",description:"Beautiful beaches and Gaudí architecture",metadata:{city:"Barcelona",country:"Spain",lat:41.3851,lng:2.1734,price:1450,days:5}}]},actions:[{type:"select_destination",label:"Select",handler:"client",payload:{}},{type:"view_details",label:"Details",handler:"server",payload:{}}]}],timestamp:new Date(Date.now()-3200000)}],Nk=[{id:"thread-1",title:"Trip to Europe",preview:"Planning a 5-day trip...",createdAt:new Date(Date.now()-86400000),updatedAt:new Date(Date.now()-3600000),messageCount:12},{id:"thread-2",title:"Restaurant Recommendations",preview:"Looking for good places...",createdAt:new Date(Date.now()-172800000),updatedAt:new Date(Date.now()-86400000),messageCount:8},{id:"thread-3",title:"Budget Planning",preview:"Help with monthly budget",createdAt:new Date(Date.now()-259200000),updatedAt:new Date(Date.now()-172800000),messageCount:15}];function g2($=1000){return new Promise((U)=>{setTimeout(()=>{U({id:`msg-${Date.now()}`,role:"assistant",content:"This is a mock response. In production, this would come from your AI agent API.",timestamp:new Date})},$)})}function x2($){let U=$.toLowerCase();if(U.includes("analyze")||U.includes("analysis"))return`Analysis complete for "${$}". Found 247 records with an average value of $1,234. The data shows a 23% increase compared to last quarter. Key insights: Revenue is up, customer satisfaction improved by 15%, and operational costs decreased by 8%.`;if(U.includes("sales")||U.includes("revenue"))return"Sales data processed: Q4 2024 revenue reached $2.4M, representing 18% growth year-over-year. Top performing products: Enterprise Plan (+45%), Pro Plan (+32%), Basic Plan (+12%). Regional breakdown: North America (52%), Europe (31%), APAC (17%).";if(U.includes("report")||U.includes("summary"))return"Report generated successfully. Executive Summary: Overall performance exceeded targets by 12%. Marketing ROI improved to 3.2x, customer acquisition cost reduced by 18%, and lifetime value increased by 24%. Detailed breakdown available in attached widgets.";if(U.includes("data")||U.includes("metrics"))return"Data metrics retrieved: 1,847 active users, 12,394 sessions this month, 94.2% uptime, average response time 127ms. Performance is within acceptable parameters. No critical issues detected.";if(U.includes("customer")||U.includes("user"))return"Customer analysis complete: 523 new customers this month, 89% retention rate, average satisfaction score 4.6/5. Top feedback themes: excellent support (87%), easy to use (72%), good value (68%). 3 support tickets pending review.";return"This is a mock response showing how your agent would process and respond to commands. The actual response would be generated by your AI agent based on real data and context."}function c2($){let U=x2($),B=$.toLowerCase(),W=[],H;if(B.includes("sales")||B.includes("revenue")||B.includes("analyze"))W.push({type:"card",id:`widget-${Date.now()}-1`,props:{title:"Q4 2024 Performance",description:"Revenue: $2.4M (+18% YoY)",footer:"Updated: "+new Date().toLocaleDateString()},actions:[{type:"view_details",label:"View Details",handler:"client",payload:{reportId:"q4-2024"}}]});if(B.includes("customer")||B.includes("user"))W.push({type:"list",id:`widget-${Date.now()}-2`,props:{items:[{id:"metric-1",title:"Active Users",subtitle:"1,847 users",description:"+12% from last month"},{id:"metric-2",title:"Retention Rate",subtitle:"89%",description:"Above industry average"},{id:"metric-3",title:"Satisfaction Score",subtitle:"4.6/5",description:"Based on 234 reviews"}]}});if(B.includes("task")||B.includes("todo")||B.includes("work")||B.includes("completed"))W.push({type:"list",id:`widget-${Date.now()}-tasks`,props:{items:[{id:"task-1",title:"Implement user authentication",subtitle:"Created just now",description:"Added OAuth 2.0 support with Google and GitHub providers",backgroundColor:"rgba(59, 130, 246, 0.15)",metadata:{status:"created",priority:"high",tags:["backend","security"]}},{id:"task-2",title:"Update API documentation",subtitle:"Modified 2 minutes ago",description:"Changed endpoint descriptions and added new examples",backgroundColor:"rgba(234, 179, 8, 0.15)",metadata:{status:"modified",priority:"medium",tags:["docs"]}},{id:"task-3",title:"Fix login redirect bug",subtitle:"Completed 5 minutes ago",description:"Users now properly redirected after successful login",backgroundColor:"rgba(34, 197, 94, 0.15)",metadata:{status:"completed",priority:"urgent",tags:["bugfix","auth"]}}]},actions:[{type:"view_task",label:"View",handler:"client",payload:{}},{type:"undo",label:"Undo",handler:"server",payload:{}}]}),H={type:"update_database",payload:{table:"tasks",operation:"mark_as_viewed",taskIds:["task-1","task-2","task-3"],timestamp:new Date().toISOString()}};if(B.includes("analyze")||B.includes("analysis"))H={type:"send_notification",payload:{recipient:"team@company.com",subject:"Analysis Complete",message:"Your requested analysis has been completed and is ready for review."}};return{message:U,widgets:W,action:H}}function d2($,U,B,W,H=30){let{message:R,widgets:L}=c2($),b=R.split(" "),T=0,k=setInterval(()=>{try{if(T<b.length)U({type:"token",content:b[T]+" "}),T++;else{clearInterval(k),L.forEach((w)=>{U({type:"widget",widget:w})});let P=`mock_thread_${Date.now()}`;U({type:"complete"}),B(P)}}catch(P){clearInterval(k),W(P instanceof Error?P:Error("Mock streaming error"))}},H)}function l2($){return new Promise((U,B)=>{let W=new FileReader;W.onload=()=>{let R=W.result.split(",")[1];U(R)},W.onerror=()=>B(Error("Failed to read file")),W.readAsDataURL($)})}function i2($){if($.startsWith("image/"))return"image";return"document"}function o2($){return["image/jpeg","image/png","image/gif","image/webp","application/pdf","text/plain","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"].includes($.type)}async function a2($){let U=await l2($);return{type:i2($.type),source:{type:"base64",media_type:$.type,data:U}}}async function r2($){let U=Array.from($);return await Promise.all(U.map((W)=>a2(W)))}async function IO($,U){if(!U||U.length===0)return $;let B=[];if($.trim())B.push({type:"text",text:$.trim()});let W=await r2(U);return B.push(...W),B}function SY($){if($<1024)return`${$} B`;if($<1048576)return`${($/1024).toFixed(1)} KB`;return`${($/1048576).toFixed(1)} MB`}var TO=10485760;function CO($){if(!o2($))return{valid:!1,error:`Unsupported file type: ${$.type}`};if($.size>TO)return{valid:!1,error:`File too large: ${SY($.size)} (max ${SY(TO)})`};return{valid:!0}}var n2=["list","table"];function t2($){let U=[],B=!1,W=$.match(/"items"\s*:\s*\[/);if(!W)return{items:U,isStreaming:!1};let H=$.indexOf("[",W.index);if(H===-1)return{items:U,isStreaming:!0};let R=0,L=!1,b=!1,T=-1;for(let w=H+1;w<$.length;w++){let M=$[w];if(b){b=!1;continue}if(M==="\\"&&L){b=!0;continue}if(M==='"'){L=!L;continue}if(L)continue;if(M==="{"){if(R===0)T=w;R++}else if(M==="}"){if(R--,R===0&&T!==-1){let I=$.slice(T,w+1);try{let C=JSON.parse(I);if(!C.id)C.id=`item-${U.length}-${OH(I)}`;U.push(C)}catch(C){}T=-1}}else if(M==="]"&&R===0){B=!1;break}}if(R>0||T!==-1)B=!0;let k=$.slice(H);if(LH(k,0)===-1)B=!0;return{items:U,isStreaming:B}}function OH($){let U=0;for(let B=0;B<$.length;B++){let W=$.charCodeAt(B);U=(U<<5)-U+W,U=U&U}return Math.abs(U).toString(36)}function LH($,U){let B=0,W=!1,H=!1;for(let R=U;R<$.length;R++){let L=$[R];if(H){H=!1;continue}if(L==="\\"&&W){H=!0;continue}if(L==='"'){W=!W;continue}if(W)continue;if(L==="["||L==="{")B++;else if(L==="]"||L==="}"){if(B--,B===0)return R}}return-1}function TY($){let U=[],B=!1,W=!1,H=0,R=null,L=$,b=$.lastIndexOf("@ui:");if(b!==-1){let P=$.slice(b),w=P.match(/^@ui:(\w+)/);if(w){let M=w[1],I=P.indexOf("[");if(I===-1)L=$.slice(0,b),R=M,W=!0;else{let C=b+I;if(LH($,C)===-1)if(n2.includes(M)){let u=$.slice(C+1),{items:f,isStreaming:i}=t2(u);if(f.length>0){L=$.slice(0,b);let l=`widget-${M}-streaming-${OH(u)}`,o=L.replace(/[\s:;\-–—\.]+$/g,"").trim();if(o)U.push({type:"text",content:o});U.push({type:"widget",widget:{type:M,id:l,props:M==="table"?{rows:f,columns:[]}:{items:f},isStreaming:i}}),B=!0,W=!1,L=""}else L=$.slice(0,b),R=M,W=!0}else L=$.slice(0,b),R=M,W=!0}}}if(W)L=L.replace(/[\s:;\-–—\.]+$/g,"");let T=/@ui:(\w+)\[/g,k;while((k=T.exec(L))!==null){let P=k[1],w=k.index+k[0].length-1,M=LH(L,w);if(M===-1)continue;let I=L.slice(w+1,M);if(k.index>H){let C=L.slice(H,k.index).trim();if(C)U.push({type:"text",content:C})}try{let C=I.trim(),j=JSON.parse(C),u=`widget-${P}-${OH(C)}`,{metadata:f,actions:i,...l}=j;U.push({type:"widget",widget:{type:P,id:u,props:l,...i&&{actions:i},...f&&{metadata:f}}}),B=!0}catch(C){}H=M+1,T.lastIndex=H}if(H<L.length){let P=L.slice(H).trim();if(P)U.push({type:"text",content:P})}if(U.length===0&&L.trim())U.push({type:"text",content:L.trim()});if(R)U.push({type:"widget_pending",pendingType:R});return{segments:U,hasWidgets:B,hasPendingWidget:W}}var DO={card:{schema:"title, description?, image?, footer?, actions?: [{type, label}]",example:'@ui:card[{"title": "Summary", "description": "Details here"}]'},list:{schema:"items: [{id, title, subtitle?, description?, image?, metadata?: {any extra data}}], actions?: [{type, label}] - metadata is sent as action payload when clicked",example:'@ui:list[{"items": [{"id": "1", "title": "Item", "subtitle": "Info", "metadata": {"key": "value"}}]}]'},button_group:{schema:"buttons: [{id, label, variant?}] - Use for standalone buttons only, NOT for form submits",example:'@ui:button_group[{"buttons": [{"id": "ok", "label": "OK"}]}]'},form:{schema:"title?, fields: [{name, type: text|password|number|select|checkbox|textarea|date, label, required?, placeholder?, options?}], actions: [{type, label}] - Button is built-in via actions, do NOT add separate button",example:'@ui:form[{"title": "Settings", "fields": [{"name": "apiKey", "type": "password", "label": "API Key", "required": true}], "actions": [{"type": "save", "label": "Save"}]}]'},table:{schema:"columns: [{key, label}], rows: [...], striped?, compact?",example:'@ui:table[{"columns": [{"key": "name", "label": "Name"}], "rows": [{"name": "A"}]}]'},image:{schema:"src, alt, caption?",example:'@ui:image[{"src": "url", "alt": "desc"}]'},chart:{schema:"chartType: line|bar|pie, data: {labels, datasets}",example:'@ui:chart[{"chartType": "bar", "data": {"labels": ["A"], "datasets": [{"label": "X", "data": [10]}]}}]'},flow:{schema:"title, subtitle?, icon?: research|schedule|analyze|deploy|recurring|automation|data, steps: [{id, label, type?, color?: blue|purple|cyan|amber|emerald|rose|indigo|orange, status?: pending|active|completed|error|skipped}] - Horizontal pipeline. Use @label for agents. Types auto-detected from label.",example:'@ui:flow[{"title": "Deploy Pipeline", "icon": "deploy", "steps": [{"id": "1", "label": "Test", "color": "cyan"}, {"id": "2", "label": "Build", "color": "amber"}, {"id": "3", "label": "Deploy", "color": "rose"}]}]'}},s2=Object.keys(DO),e2=["flow"],yO=s2.filter(($)=>!e2.includes($));function zA($){let U=$||yO,B=`
|
|
139
|
+
## UI Widgets
|
|
140
|
+
SYNTAX: @ui:type[{json}] - MUST use SQUARE BRACKETS [] around the JSON object.
|
|
141
|
+
CORRECT: @ui:list[{"items": [...]}]
|
|
142
|
+
WRONG: @ui:list{"items": [...]} (missing square brackets)
|
|
143
|
+
|
|
144
|
+
`;for(let W of U){let H=DO[W];if(!H)continue;B+=`${W}: ${H.schema} | ${H.example}
|
|
145
|
+
`}return B+=`
|
|
146
|
+
Per-item "metadata" is sent as payload on action click.
|
|
147
|
+
`,B}function QA($){return`
|
|
148
|
+
Widgets: @ui:type[{json}] - MUST use square brackets []. Example: @ui:list[{"items": [...]}]. Types: ${($||yO).join(", ")}. Per-item "metadata" is sent as action payload.
|
|
149
|
+
`}function XA({widget:$,onAction:U}){let{title:B,description:W,image:H,footer:R}=$.props;return J5.jsxs("div",{className:"border border-neutral-200 dark:border-neutral-700 rounded-xl bg-white dark:bg-neutral-900 overflow-hidden",children:[H&&J5.jsx("img",{src:H,alt:B,className:"w-full h-48 object-cover"}),J5.jsxs("div",{className:"p-4",children:[J5.jsx("h3",{className:"!text-lg font-semibold !text-neutral-900 dark:!text-white",children:B}),W&&J5.jsx("p",{className:"!text-neutral-600 dark:!text-neutral-400 mt-2",children:W})]}),(R||$.actions&&$.actions.length>0)&&J5.jsxs("div",{className:"border-t border-neutral-200 dark:border-neutral-700 p-4 flex justify-between items-center",children:[R&&J5.jsx("span",{className:"!text-sm !text-neutral-600 dark:!text-neutral-400",children:R}),$.actions&&$.actions.length>0&&J5.jsx("div",{className:"flex gap-2",children:$.actions.map((L,b)=>J5.jsx("button",{onClick:()=>U?.({type:L.type,payload:L.payload,widgetId:$.id,timestamp:new Date}),className:"px-3 py-1.5 !text-sm rounded-lg font-medium transition-colors bg-blue-500 !text-white hover:bg-blue-600",children:L.label},b))})]})]})}function ZA({widget:$,onAction:U}){let{items:B}=$.props,W=$.isStreaming??!1,H=wQ.useRef(new Set),[R,L]=wQ.useState(new Set);return wQ.useEffect(()=>{let b=new Set(B.map((k)=>k.id)),T=new Set;if(B.forEach((k)=>{if(!H.current.has(k.id))T.add(k.id)}),B.forEach((k)=>H.current.add(k.id)),T.size>0){L(T);let k=setTimeout(()=>{L(new Set)},500);return()=>clearTimeout(k)}},[B]),x4.jsxs("div",{className:"border border-neutral-200 dark:border-neutral-700 rounded-xl bg-white dark:bg-neutral-900 overflow-hidden",children:[B.map((b,T)=>{let k=R.has(b.id),P=T===B.length-1;return x4.jsxs("div",{className:`apteva-list-item flex items-center p-4 transition-colors ${!P||W?"border-b border-neutral-200 dark:border-neutral-700":""} ${!b.backgroundColor?"hover:bg-neutral-50 dark:hover:bg-neutral-800":""} ${k?"apteva-list-item-new":""}`,style:b.backgroundColor?{backgroundColor:b.backgroundColor}:void 0,children:[b.image&&x4.jsx("img",{src:b.image,alt:b.title,className:"w-16 h-16 rounded object-cover"}),x4.jsxs("div",{className:`flex-1 ${b.image?"ml-4":""}`,children:[x4.jsx("h4",{className:"font-semibold !text-neutral-900 dark:!text-white",children:b.title}),b.subtitle&&x4.jsx("p",{className:"!text-sm !text-neutral-600 dark:!text-neutral-400",children:b.subtitle}),b.description&&x4.jsx("p",{className:"!text-xs !text-neutral-500 dark:!text-neutral-500 mt-1",children:b.description})]}),$.actions&&$.actions.length>0&&x4.jsx("div",{className:"flex gap-2",children:$.actions.map((w,M)=>x4.jsx("button",{onClick:()=>U?.({type:w.type,payload:b.metadata||b,widgetId:$.id,timestamp:new Date}),className:"px-3 py-1.5 !text-sm rounded-lg font-medium transition-colors bg-blue-500 !text-white hover:bg-blue-600",children:w.label},M))})]},b.id)}),W&&x4.jsxs("div",{className:"apteva-list-streaming flex items-center gap-3 p-4 text-neutral-500 dark:text-neutral-400",children:[x4.jsxs("div",{className:"apteva-streaming-dots flex gap-1",children:[x4.jsx("span",{className:"w-2 h-2 bg-current rounded-full animate-pulse",style:{animationDelay:"0ms"}}),x4.jsx("span",{className:"w-2 h-2 bg-current rounded-full animate-pulse",style:{animationDelay:"150ms"}}),x4.jsx("span",{className:"w-2 h-2 bg-current rounded-full animate-pulse",style:{animationDelay:"300ms"}})]}),x4.jsx("span",{className:"text-sm",children:"Loading more..."})]})]})}function YA({widget:$,onAction:U}){let{label:B,variant:W="primary",disabled:H=!1}=$.props;return EO.jsx("button",{onClick:()=>$.actions?.[0]&&U?.({type:$.actions[0].type,payload:$.actions[0].payload,widgetId:$.id,timestamp:new Date}),disabled:H,className:C1("px-4 py-2 rounded-lg font-medium transition-colors",{primary:"bg-blue-500 !text-white hover:bg-blue-600",secondary:"bg-neutral-500 !text-white hover:bg-neutral-600",outline:"border-2 border-blue-500 !text-blue-500 hover:bg-blue-50 dark:hover:bg-blue-900",ghost:"!text-blue-500 hover:bg-blue-50 dark:hover:bg-blue-900"}[W],{"opacity-50 cursor-not-allowed":H}),children:B})}function JA({widget:$,onAction:U}){let{layout:B="horizontal",buttons:W}=$.props,H={primary:"bg-blue-500 !text-white hover:bg-blue-600",secondary:"bg-neutral-200 dark:bg-neutral-700 !text-neutral-800 dark:!text-neutral-200 hover:bg-neutral-300 dark:hover:bg-neutral-600",outline:"border border-neutral-300 dark:border-neutral-600 !text-neutral-700 dark:!text-neutral-300 hover:bg-neutral-100 dark:hover:bg-neutral-800"},R=(L)=>{return $.actions?.find((b)=>b.payload?.buttonId===L)||$.actions?.[0]};return WH.jsx("div",{className:C1("flex gap-2",B==="vertical"?"flex-col":"flex-row flex-wrap"),children:W.map((L)=>{let b=R(L.id);return WH.jsx("button",{onClick:()=>{if(b)U?.({type:b.type,payload:{...b.payload,buttonId:L.id},widgetId:$.id,timestamp:new Date})},className:C1("px-4 py-2 rounded-lg font-medium transition-colors text-sm",H[L.variant||"secondary"]),children:L.label},L.id)})})}function $A({widget:$,onAction:U}){let{columns:B,rows:W,caption:H,compact:R=!1,striped:L=!1}=$.props,b=$.isStreaming??!1,T=AQ.useRef(new Set),[k,P]=AQ.useState(new Set);AQ.useEffect(()=>{let M=new Set;if(W.forEach((I,C)=>{let j=I.id||`row-${C}`;if(!T.current.has(j))M.add(j)}),W.forEach((I,C)=>{let j=I.id||`row-${C}`;T.current.add(j)}),M.size>0){P(M);let I=setTimeout(()=>{P(new Set)},500);return()=>clearTimeout(I)}},[W]);let w=(M)=>{switch(M){case"center":return"text-center";case"right":return"text-right";default:return"text-left"}};return X4.jsx("div",{className:"border border-neutral-200 dark:border-neutral-700 rounded-xl bg-white dark:bg-neutral-900 overflow-hidden",children:X4.jsx("div",{className:"overflow-x-auto",children:X4.jsxs("table",{className:"w-full",children:[H&&X4.jsx("caption",{className:"px-4 py-2 text-sm text-neutral-600 dark:text-neutral-400 text-left bg-neutral-50 dark:bg-neutral-800 border-b border-neutral-200 dark:border-neutral-700",children:H}),X4.jsx("thead",{children:X4.jsx("tr",{className:"bg-neutral-50 dark:bg-neutral-800 border-b border-neutral-200 dark:border-neutral-700",children:B.map((M)=>X4.jsx("th",{className:C1("font-semibold text-neutral-900 dark:text-white",R?"px-3 py-2 text-xs":"px-4 py-3 text-sm",w(M.align)),style:M.width?{width:M.width}:void 0,children:M.label},M.key))})}),X4.jsxs("tbody",{children:[W.map((M,I)=>{let C=M.id||`row-${I}`,j=k.has(C);return X4.jsx("tr",{className:C1("apteva-table-row border-b border-neutral-200 dark:border-neutral-700 last:border-b-0","transition-colors hover:bg-neutral-50 dark:hover:bg-neutral-800",L&&I%2===1&&"bg-neutral-50/50 dark:bg-neutral-800/50",j&&"apteva-table-row-new"),onClick:()=>{if($.actions&&$.actions.length>0)U?.({type:$.actions[0].type,payload:M,widgetId:$.id,timestamp:new Date})},style:{cursor:$.actions?.length?"pointer":"default"},children:B.map((u)=>X4.jsx("td",{className:C1("text-neutral-700 dark:text-neutral-300",R?"px-3 py-2 text-xs":"px-4 py-3 text-sm",w(u.align)),children:M[u.key]??"—"},u.key))},C)}),W.length===0&&!b&&X4.jsx("tr",{children:X4.jsx("td",{colSpan:B.length||1,className:"px-4 py-8 text-center text-sm text-neutral-500 dark:text-neutral-400",children:"No data available"})}),b&&X4.jsx("tr",{className:"apteva-table-streaming",children:X4.jsx("td",{colSpan:B.length||1,className:"px-4 py-3 text-center",children:X4.jsxs("div",{className:"flex items-center justify-center gap-3 text-neutral-500 dark:text-neutral-400",children:[X4.jsxs("div",{className:"flex gap-1",children:[X4.jsx("span",{className:"w-2 h-2 bg-current rounded-full animate-pulse",style:{animationDelay:"0ms"}}),X4.jsx("span",{className:"w-2 h-2 bg-current rounded-full animate-pulse",style:{animationDelay:"150ms"}}),X4.jsx("span",{className:"w-2 h-2 bg-current rounded-full animate-pulse",style:{animationDelay:"300ms"}})]}),X4.jsx("span",{className:"text-sm",children:"Loading more..."})]})})})]})]})})})}function qA({widget:$,onAction:U}){let{title:B,fields:W}=$.props,[H,R]=hO.useState(()=>{let P={};return W.forEach((w)=>{P[w.name]=w.defaultValue??(w.type==="checkbox"?!1:"")}),P}),L=(P,w)=>{R((M)=>({...M,[P]:w}))},b=(P)=>{if(P.preventDefault(),$.actions?.[0]&&U)U({type:$.actions[0].type,payload:{...$.actions[0].payload,formData:H},widgetId:$.id,timestamp:new Date})},T=(P)=>{switch(P.type){case"text":case"password":case"number":case"date":return w4.jsx("input",{type:P.type,name:P.name,value:H[P.name]||"",onChange:(M)=>L(P.name,P.type==="number"?Number(M.target.value):M.target.value),placeholder:P.placeholder,required:P.required,className:"w-full px-3 py-2 rounded-lg border transition-colors border-neutral-200 dark:border-neutral-600 bg-neutral-50 dark:bg-neutral-800 !text-neutral-900 dark:!text-neutral-100 placeholder-neutral-400 dark:placeholder-neutral-500 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"});case"textarea":return w4.jsx("textarea",{name:P.name,value:H[P.name]||"",onChange:(M)=>L(P.name,M.target.value),placeholder:P.placeholder,required:P.required,rows:3,className:"w-full px-3 py-2 rounded-lg border transition-colors border-neutral-200 dark:border-neutral-600 bg-neutral-50 dark:bg-neutral-800 !text-neutral-900 dark:!text-neutral-100 placeholder-neutral-400 dark:placeholder-neutral-500 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"});case"select":return w4.jsxs("select",{name:P.name,value:H[P.name]||"",onChange:(M)=>L(P.name,M.target.value),required:P.required,className:"w-full px-3 py-2 rounded-lg border transition-colors border-neutral-200 dark:border-neutral-600 bg-neutral-50 dark:bg-neutral-800 !text-neutral-900 dark:!text-neutral-100 placeholder-neutral-400 dark:placeholder-neutral-500 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[w4.jsx("option",{value:"",children:P.placeholder||"Select..."}),P.options?.map((M)=>w4.jsx("option",{value:M.value,children:M.label},M.value))]});case"checkbox":return w4.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[w4.jsx("input",{type:"checkbox",name:P.name,checked:H[P.name]||!1,onChange:(M)=>L(P.name,M.target.checked),className:"w-4 h-4 rounded border-neutral-300 dark:border-neutral-600 text-blue-500 focus:ring-blue-500"}),w4.jsx("span",{className:"!text-neutral-700 dark:!text-neutral-300",children:P.label})]});default:return null}},k=$.actions?.find((P)=>P.type==="submit")||$.actions?.[0];return w4.jsxs("form",{onSubmit:b,className:"border border-neutral-200 dark:border-neutral-700 rounded-xl bg-white dark:bg-neutral-900 overflow-hidden",children:[w4.jsxs("div",{className:"p-4",children:[B&&w4.jsx("h3",{className:"!text-lg font-semibold !text-neutral-900 dark:!text-white mb-4",children:B}),w4.jsx("div",{className:"space-y-3",children:W.map((P)=>w4.jsxs("div",{className:P.type==="checkbox"?"":"space-y-1",children:[P.type!=="checkbox"&&w4.jsxs("label",{className:"block !text-sm font-medium !text-neutral-600 dark:!text-neutral-400",children:[P.label,P.required&&w4.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),T(P)]},P.name))})]}),k&&w4.jsx("div",{className:"px-4 pb-4",children:w4.jsx("button",{type:"submit",className:"px-3 py-1.5 !text-sm rounded-lg font-medium transition-colors bg-blue-500 !text-white hover:bg-blue-600",children:k.label||"Submit"})})]})}function GA({widget:$}){let{src:U,alt:B,caption:W}=$.props;return L8.jsxs("figure",{className:"overflow-hidden rounded-xl",children:[L8.jsx("img",{src:U,alt:B,className:"w-full h-auto object-contain bg-neutral-100 dark:bg-neutral-800",loading:"lazy"}),W&&L8.jsx("figcaption",{className:"mt-2 text-center text-sm text-neutral-600 dark:text-neutral-400",children:W})]})}function HA({type:$,status:U}){if(U==="completed")return X0.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:X0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M5 13l4 4L19 7"})});if(U==="error")return X0.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:X0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M6 18L18 6M6 6l12 12"})});if(U==="active")return X0.jsx("div",{className:"w-3.5 h-3.5 rounded-full bg-current animate-pulse"});let B="w-4 h-4";if($==="time"||$==="schedule"||$==="clock")return X0.jsx("svg",{className:B,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:X0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})});if($==="recurring"||$==="repeat")return X0.jsx("svg",{className:B,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:X0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})});if($==="agent"||$?.startsWith("@"))return X0.jsx("svg",{className:B,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:X0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0z"})});if($==="email"||$==="mail")return X0.jsx("svg",{className:B,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:X0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"})});if($==="slack"||$==="message"||$==="chat")return X0.jsx("svg",{className:B,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:X0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"})});if($==="webhook"||$==="api")return X0.jsx("svg",{className:B,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:X0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"})});if($==="build"||$==="compile"||$==="package")return X0.jsx("svg",{className:B,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:X0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M20 7l-8-4-8 4m16 0l-8 4m8-4v10l-8 4m0-10L4 7m8 4v10M4 7v10l8 4"})});if($==="test"||$==="check"||$==="verify")return X0.jsx("svg",{className:B,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:X0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"})});if($==="deploy"||$==="rocket"||$==="launch")return X0.jsx("svg",{className:B,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:X0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})});if($==="push"||$==="upload"||$==="cloud")return X0.jsx("svg",{className:B,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:X0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})});if($==="generate"||$==="create"||$==="document"||$==="file")return X0.jsx("svg",{className:B,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:X0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})});if($==="review"||$==="inspect"||$==="eye")return X0.jsxs("svg",{className:B,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[X0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),X0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})]});if($==="analyze"||$==="research"||$==="chart")return X0.jsx("svg",{className:B,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:X0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})});if($==="scrape"||$==="crawl"||$==="spider")return X0.jsx("svg",{className:B,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:X0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"})});if($==="data"||$==="database"||$==="storage")return X0.jsx("svg",{className:B,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:X0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4"})});if($==="notification"||$==="bell"||$==="alert")return X0.jsx("svg",{className:B,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:X0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9"})});if($==="transform"||$==="process"||$==="convert")return X0.jsx("svg",{className:B,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:X0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4"})});return X0.jsx("div",{className:"w-2 h-2 rounded-full bg-current opacity-50"})}function KA({icon:$}){if($==="research"||$==="multi-agent"||$==="agents")return X0.jsx("div",{className:"w-10 h-10 rounded-lg bg-purple-100 dark:bg-purple-500/20 flex items-center justify-center",children:X0.jsx("svg",{className:"w-6 h-6 text-purple-600 dark:text-purple-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:X0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})})});if($==="schedule"||$==="report"||$==="calendar")return X0.jsx("div",{className:"w-10 h-10 rounded-lg bg-amber-100 dark:bg-amber-500/20 flex items-center justify-center",children:X0.jsx("svg",{className:"w-6 h-6 text-amber-600 dark:text-amber-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:X0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})})});if($==="recurring"||$==="repeat"||$==="sync")return X0.jsx("div",{className:"w-10 h-10 rounded-lg bg-cyan-100 dark:bg-cyan-500/20 flex items-center justify-center",children:X0.jsx("svg",{className:"w-6 h-6 text-cyan-600 dark:text-cyan-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:X0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})});if($==="analyze"||$==="analysis"||$==="chart")return X0.jsx("div",{className:"w-10 h-10 rounded-lg bg-cyan-100 dark:bg-cyan-500/20 flex items-center justify-center",children:X0.jsx("svg",{className:"w-6 h-6 text-cyan-600 dark:text-cyan-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:X0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})})});if($==="deploy"||$==="rocket"||$==="launch")return X0.jsx("div",{className:"w-10 h-10 rounded-lg bg-blue-100 dark:bg-blue-500/20 flex items-center justify-center",children:X0.jsx("svg",{className:"w-6 h-6 text-blue-600 dark:text-blue-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:X0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})})});if($==="automation"||$==="workflow"||$==="process")return X0.jsx("div",{className:"w-10 h-10 rounded-lg bg-indigo-100 dark:bg-indigo-500/20 flex items-center justify-center",children:X0.jsx("svg",{className:"w-6 h-6 text-indigo-600 dark:text-indigo-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:X0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 5a1 1 0 011-1h14a1 1 0 011 1v2a1 1 0 01-1 1H5a1 1 0 01-1-1V5zM4 13a1 1 0 011-1h6a1 1 0 011 1v6a1 1 0 01-1 1H5a1 1 0 01-1-1v-6zM16 13a1 1 0 011-1h2a1 1 0 011 1v6a1 1 0 01-1 1h-2a1 1 0 01-1-1v-6z"})})});if($==="data"||$==="pipeline"||$==="etl")return X0.jsx("div",{className:"w-10 h-10 rounded-lg bg-emerald-100 dark:bg-emerald-500/20 flex items-center justify-center",children:X0.jsx("svg",{className:"w-6 h-6 text-emerald-600 dark:text-emerald-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:X0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4"})})});return X0.jsx("div",{className:"w-10 h-10 rounded-lg bg-neutral-100 dark:bg-neutral-700 flex items-center justify-center",children:X0.jsx("svg",{className:"w-6 h-6 text-neutral-600 dark:text-neutral-300",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:X0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})})})}function UA(){return X0.jsx("svg",{className:"w-4 h-4 text-neutral-400 dark:text-neutral-500 flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:X0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})}var Y5={blue:"bg-blue-100 dark:bg-blue-900/40 !text-blue-700 dark:!text-blue-300 border-blue-300 dark:border-blue-500",purple:"bg-purple-100 dark:bg-purple-900/40 !text-purple-700 dark:!text-purple-300 border-purple-300 dark:border-purple-500",cyan:"bg-cyan-100 dark:bg-cyan-900/40 !text-cyan-700 dark:!text-cyan-300 border-cyan-300 dark:border-cyan-500",amber:"bg-amber-100 dark:bg-amber-900/40 !text-amber-700 dark:!text-amber-300 border-amber-300 dark:border-amber-500",emerald:"bg-emerald-100 dark:bg-emerald-900/40 !text-emerald-700 dark:!text-emerald-300 border-emerald-300 dark:border-emerald-500",rose:"bg-rose-100 dark:bg-rose-900/40 !text-rose-700 dark:!text-rose-300 border-rose-300 dark:border-rose-500",indigo:"bg-indigo-100 dark:bg-indigo-900/40 !text-indigo-700 dark:!text-indigo-300 border-indigo-300 dark:border-indigo-500",orange:"bg-orange-100 dark:bg-orange-900/40 !text-orange-700 dark:!text-orange-300 border-orange-300 dark:border-orange-500",neutral:"bg-neutral-100 dark:bg-neutral-800 !text-neutral-600 dark:!text-neutral-300 border-neutral-300 dark:border-neutral-600"};function BA($,U){if($.color&&Y5[$.color])return Y5[$.color];if(U==="time"||U==="schedule"||U==="clock")return Y5.blue;if(U==="agent"||U?.startsWith("@"))return Y5.purple;if(U==="email"||U==="slack"||U==="message"||U==="notification")return Y5.cyan;if(U==="generate"||U==="document"||U==="create")return Y5.amber;if(U==="deploy"||U==="rocket"||U==="launch")return Y5.rose;if(U==="build"||U==="compile"||U==="package")return Y5.indigo;if(U==="test"||U==="check"||U==="verify")return Y5.emerald;if(U==="data"||U==="database"||U==="storage")return Y5.orange;return Y5.blue}function _A({widget:$}){let{title:U,subtitle:B,icon:W,steps:H}=$.props;return X0.jsxs("div",{className:"rounded-xl bg-white dark:bg-neutral-900 border border-neutral-200 dark:border-neutral-700 overflow-hidden",children:[X0.jsxs("div",{className:"px-4 py-4 flex items-center gap-4",children:[X0.jsx(KA,{icon:W}),X0.jsxs("div",{className:"flex-1 min-w-0",children:[X0.jsx("h3",{className:"font-semibold text-base text-neutral-900 dark:text-white truncate",children:U}),B&&X0.jsx("p",{className:"text-sm text-neutral-500 dark:text-neutral-400 truncate mt-0.5",children:B})]})]}),X0.jsx("div",{className:"px-4 pb-4",children:X0.jsx("div",{className:"flex flex-wrap items-center gap-2",children:H.map((R,L)=>{let b=L===H.length-1,T=R.status==="active",k=R.status==="completed",P=R.status==="error",w=R.status==="skipped",M=R.label,I=R.type;if(!I)if(M.startsWith("@"))I="agent";else if(/^\d+[ap]m$/i.test(M)||/^(mon|tue|wed|thu|fri|sat|sun)/i.test(M))I="time";else{let u=M.toLowerCase();I={test:"test",build:"build",push:"push",deploy:"deploy",email:"email",slack:"slack",generate:"generate",review:"review",analyze:"analyze",scrape:"scrape",transform:"transform",notify:"notification",alert:"notification",webhook:"webhook",api:"api",data:"data",process:"process"}[u]}let C,j="";if(T)C="bg-blue-100 dark:bg-blue-900/40 !text-blue-700 dark:!text-blue-300 border-blue-400 dark:border-blue-400 ring-2 ring-blue-400";else if(k)C="bg-emerald-100 dark:bg-emerald-900/40 !text-emerald-700 dark:!text-emerald-300 border-emerald-400 dark:border-emerald-400";else if(P)C="bg-red-100 dark:bg-red-900/40 !text-red-700 dark:!text-red-300 border-red-400 dark:border-red-400";else if(w)C="bg-neutral-100 dark:bg-neutral-800 !text-neutral-400 dark:!text-neutral-500 border-neutral-300 dark:border-neutral-600",j="line-through";else C=BA(R,I);return X0.jsxs("div",{className:"flex items-center gap-2",children:[X0.jsxs("span",{className:`inline-flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium border transition-colors ${C} ${j}`,children:[X0.jsx(HA,{type:I,status:R.status}),M]}),!b&&X0.jsx(UA,{})]},R.id)})})})]})}function bH({widget:$,onAction:U}){return F6.jsx("div",{className:"apteva-widget",children:(()=>{switch($.type){case"card":return F6.jsx(XA,{widget:$,onAction:U});case"list":return F6.jsx(ZA,{widget:$,onAction:U});case"button":return F6.jsx(YA,{widget:$,onAction:U});case"button_group":return F6.jsx(JA,{widget:$,onAction:U});case"table":return F6.jsx($A,{widget:$,onAction:U});case"form":return F6.jsx(qA,{widget:$,onAction:U});case"image":return F6.jsx(GA,{widget:$});case"flow":return F6.jsx(_A,{widget:$});default:return F6.jsxs("div",{className:"p-4 border border-yellow-300 bg-yellow-50 rounded-lg",children:[F6.jsxs("p",{className:"text-sm text-yellow-800",children:["Unknown widget type: ",$.type]}),F6.jsx("pre",{className:"text-xs mt-2 overflow-auto",children:JSON.stringify($,null,2)})]})}})()})}function BH({widgets:$,onAction:U,onWidgetMount:B,layout:W="stack",spacing:H="normal",columns:R=3,className:L}){fO.useEffect(()=>{$.forEach((k)=>{B?.(k.id)})},[$,B]);let b={stack:"flex flex-col",grid:`grid grid-cols-1 md:grid-cols-${R}`,masonry:"columns-1 md:columns-2 lg:columns-3"},T={tight:"gap-2",normal:"gap-4",loose:"gap-6"};return RH.jsx("div",{className:C1(b[W],T[H],L),children:$.map((k)=>RH.jsx(bH,{widget:k,onAction:U},k.id))})}function SO({type:$,className:U}){switch($){case"card":return P0.jsx("div",{className:C1("apteva-widget-skeleton animate-pulse rounded-lg border border-neutral-200 dark:border-neutral-800 overflow-hidden",U),children:P0.jsxs("div",{className:"p-4 space-y-3",children:[P0.jsx("div",{className:"h-4 bg-neutral-200 dark:bg-neutral-700 rounded w-3/4"}),P0.jsx("div",{className:"h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-full"}),P0.jsx("div",{className:"h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-5/6"})]})});case"list":return P0.jsx("div",{className:C1("apteva-widget-skeleton animate-pulse space-y-2",U),children:[1,2,3].map((B)=>P0.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg border border-neutral-200 dark:border-neutral-800",children:[P0.jsx("div",{className:"w-10 h-10 bg-neutral-200 dark:bg-neutral-700 rounded-full flex-shrink-0"}),P0.jsxs("div",{className:"flex-1 space-y-2",children:[P0.jsx("div",{className:"h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-1/2"}),P0.jsx("div",{className:"h-2 bg-neutral-200 dark:bg-neutral-700 rounded w-3/4"})]})]},B))});case"button_group":return P0.jsxs("div",{className:C1("apteva-widget-skeleton animate-pulse flex gap-2",U),children:[P0.jsx("div",{className:"h-9 bg-neutral-200 dark:bg-neutral-700 rounded-lg w-20"}),P0.jsx("div",{className:"h-9 bg-neutral-200 dark:bg-neutral-700 rounded-lg w-20"}),P0.jsx("div",{className:"h-9 bg-neutral-200 dark:bg-neutral-700 rounded-lg w-20"})]});case"form":return P0.jsxs("div",{className:C1("apteva-widget-skeleton animate-pulse rounded-lg border border-neutral-200 dark:border-neutral-800 p-4 space-y-4",U),children:[P0.jsx("div",{className:"h-4 bg-neutral-200 dark:bg-neutral-700 rounded w-1/3"}),P0.jsxs("div",{className:"space-y-3",children:[P0.jsx("div",{className:"h-10 bg-neutral-200 dark:bg-neutral-700 rounded"}),P0.jsx("div",{className:"h-10 bg-neutral-200 dark:bg-neutral-700 rounded"})]}),P0.jsx("div",{className:"h-9 bg-neutral-200 dark:bg-neutral-700 rounded w-24"})]});case"chart":return P0.jsxs("div",{className:C1("apteva-widget-skeleton animate-pulse rounded-lg border border-neutral-200 dark:border-neutral-800 p-4",U),children:[P0.jsx("div",{className:"h-4 bg-neutral-200 dark:bg-neutral-700 rounded w-1/4 mb-4"}),P0.jsxs("div",{className:"flex items-end gap-2 h-32",children:[P0.jsx("div",{className:"flex-1 bg-neutral-200 dark:bg-neutral-700 rounded-t h-1/2"}),P0.jsx("div",{className:"flex-1 bg-neutral-200 dark:bg-neutral-700 rounded-t h-3/4"}),P0.jsx("div",{className:"flex-1 bg-neutral-200 dark:bg-neutral-700 rounded-t h-1/3"}),P0.jsx("div",{className:"flex-1 bg-neutral-200 dark:bg-neutral-700 rounded-t h-full"}),P0.jsx("div",{className:"flex-1 bg-neutral-200 dark:bg-neutral-700 rounded-t h-2/3"})]})]});case"image":return P0.jsx("div",{className:C1("apteva-widget-skeleton animate-pulse",U),children:P0.jsx("div",{className:"aspect-video bg-neutral-200 dark:bg-neutral-700 rounded-lg"})});case"gallery":return P0.jsx("div",{className:C1("apteva-widget-skeleton animate-pulse grid grid-cols-3 gap-2",U),children:[1,2,3].map((B)=>P0.jsx("div",{className:"aspect-square bg-neutral-200 dark:bg-neutral-700 rounded-lg"},B))});case"map":return P0.jsx("div",{className:C1("apteva-widget-skeleton animate-pulse",U),children:P0.jsx("div",{className:"h-48 bg-neutral-200 dark:bg-neutral-700 rounded-lg flex items-center justify-center",children:P0.jsxs("svg",{className:"w-8 h-8 text-neutral-400 dark:text-neutral-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:[P0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"}),P0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M15 11a3 3 0 11-6 0 3 3 0 016 0z"})]})})});case"table":return P0.jsxs("div",{className:C1("apteva-widget-skeleton animate-pulse rounded-lg border border-neutral-200 dark:border-neutral-800 overflow-hidden",U),children:[P0.jsxs("div",{className:"flex bg-neutral-100 dark:bg-neutral-800 border-b border-neutral-200 dark:border-neutral-700",children:[P0.jsx("div",{className:"flex-1 px-4 py-3",children:P0.jsx("div",{className:"h-3 bg-neutral-300 dark:bg-neutral-600 rounded w-16"})}),P0.jsx("div",{className:"flex-1 px-4 py-3",children:P0.jsx("div",{className:"h-3 bg-neutral-300 dark:bg-neutral-600 rounded w-20"})}),P0.jsx("div",{className:"flex-1 px-4 py-3",children:P0.jsx("div",{className:"h-3 bg-neutral-300 dark:bg-neutral-600 rounded w-14"})})]}),[1,2,3].map((B)=>P0.jsxs("div",{className:"flex border-b border-neutral-200 dark:border-neutral-800 last:border-b-0",children:[P0.jsx("div",{className:"flex-1 px-4 py-3",children:P0.jsx("div",{className:"h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-24"})}),P0.jsx("div",{className:"flex-1 px-4 py-3",children:P0.jsx("div",{className:"h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-16"})}),P0.jsx("div",{className:"flex-1 px-4 py-3",children:P0.jsx("div",{className:"h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-20"})})]},B))]});default:return P0.jsxs("div",{className:C1("apteva-widget-skeleton animate-pulse rounded-lg border border-neutral-200 dark:border-neutral-800 p-4",U),children:[P0.jsx("div",{className:"h-4 bg-neutral-200 dark:bg-neutral-700 rounded w-1/2 mb-2"}),P0.jsx("div",{className:"h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-full"})]})}}function OA($){return/\.(jpg|jpeg|png|gif|webp|svg|bmp|ico)(\?.*)?$/i.test($)}function Wz($,U=""){let B=[],W=/!\[([^\]]*)\]\(([^)]+)\)|\[([^\]]+)\]\(([^)]+)\)|(\*\*|__)(.+?)\5|`([^`]+)`/g,H=0,R,L=0;while((R=W.exec($))!==null){if(R.index>H)B.push($.slice(H,R.index));if(R[1]!==void 0||R[2]!==void 0){let b=R[1]||"",T=R[2];B.push(l1.jsx("img",{src:T,alt:b,className:"apteva-md-img"},`${U}img${L++}`))}else if(R[3]!==void 0||R[4]!==void 0){let b=R[3],T=R[4];if(OA(T))B.push(l1.jsx("img",{src:T,alt:b,className:"apteva-md-img"},`${U}img${L++}`));else B.push(l1.jsx("a",{href:T,target:"_blank",rel:"noopener noreferrer",className:"apteva-md-link",children:b},`${U}a${L++}`))}else if(R[5]!==void 0)B.push(l1.jsx("strong",{children:R[6]},`${U}b${L++}`));else if(R[7]!==void 0)B.push(l1.jsx("code",{className:"apteva-md-inline-code",children:R[7]},`${U}code${L++}`));H=R.index+R[0].length}if(H<$.length)B.push($.slice(H));return B.length>0?B:[$]}function LA($){let U=$.split(`
|
|
150
|
+
`),B=[],W=0,H=0;while(H<U.length){let R=U[H],L=R.match(/^##\s+(.*)$/);if(L){B.push(l1.jsx("h2",{className:"apteva-md-h2",children:Wz(L[1],`${W}`)},`h2${W++}`)),H++;continue}let b=R.match(/^###\s+(.*)$/);if(b){B.push(l1.jsx("h3",{className:"apteva-md-h3",children:Wz(b[1],`${W}`)},`h3${W++}`)),H++;continue}let T=R.match(/^(\s*)([-*+])\s+(.*)$/);if(T){let w=[],M=T[1].length;while(H<U.length){let I=U[H].match(/^(\s*)([-*+])\s+(.*)$/);if(I&&I[1].length===M)w.push(l1.jsx("li",{className:"apteva-md-li",children:Wz(I[3],`${W}`)},`li${W++}`)),H++;else break}B.push(l1.jsx("ul",{className:"apteva-md-ul",children:w},`ul${W++}`));continue}let k=R.match(/^(\s*)(\d+)\.\s+(.*)$/);if(k){let w=[],M=k[1].length;while(H<U.length){let I=U[H].match(/^(\s*)(\d+)\.\s+(.*)$/);if(I&&I[1].length===M)w.push(l1.jsx("li",{className:"apteva-md-li",children:Wz(I[3],`${W}`)},`li${W++}`)),H++;else break}B.push(l1.jsx("ol",{className:"apteva-md-ol",children:w},`ol${W++}`));continue}if(R.match(/^\|(.+)\|$/)&&H+1<U.length){if(U[H+1].match(/^\|([\s:-]+\|)+$/)){let I=R.split("|").filter((j)=>j.trim()!=="").map((j)=>j.trim());H+=2;let C=[];while(H<U.length)if(U[H].match(/^\|(.+)\|$/)){let u=U[H].split("|").filter((f)=>f.trim()!=="").map((f)=>f.trim());C.push(u),H++}else break;B.push(l1.jsx("div",{className:"apteva-md-table-wrapper",children:l1.jsxs("table",{className:"apteva-md-table",children:[l1.jsx("thead",{children:l1.jsx("tr",{children:I.map((j,u)=>l1.jsx("th",{className:"apteva-md-th",children:Wz(j,`th${W}${u}`)},`th${u}`))})}),l1.jsx("tbody",{children:C.map((j,u)=>l1.jsx("tr",{children:j.map((f,i)=>l1.jsx("td",{className:"apteva-md-td",children:Wz(f,`td${W}${u}${i}`)},`td${i}`))},`tr${u}`))})]})},`table-wrapper${W++}`));continue}}if(R==="")B.push(l1.jsx("br",{},`br${W++}`));else B.push(l1.jsxs("span",{children:[Wz(R,`${W}`),H<U.length-1?`
|
|
151
|
+
`:""]},`p${W++}`));H++}return B}function n5({content:$,className:U=""}){return l1.jsx("div",{className:`apteva-md ${U}`,children:LA($)})}function WA({name:$,status:U,isReceiving:B=!1,inputLength:W=0,streamOutput:H}){if(U==="preparing")return K1.jsxs("div",{className:"apteva-tool-card apteva-tool-card-preparing",children:[K1.jsxs("svg",{className:"apteva-tool-icon apteva-tool-icon-spin",fill:"none",viewBox:"0 0 24 24",children:[K1.jsx("circle",{className:"apteva-tool-spinner-track",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),K1.jsx("path",{className:"apteva-tool-spinner-fill",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),K1.jsxs("span",{className:"apteva-tool-label",children:[K1.jsx("strong",{children:$}),K1.jsx("span",{className:"apteva-tool-status-text",children:" preparing..."})]})]});if(U==="running")return K1.jsxs("div",{className:"apteva-tool-card apteva-tool-card-running",children:[K1.jsxs("svg",{className:"apteva-tool-icon apteva-tool-icon-spin",fill:"none",viewBox:"0 0 24 24",children:[K1.jsx("circle",{className:"apteva-tool-spinner-track",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),K1.jsx("path",{className:"apteva-tool-spinner-fill",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),K1.jsxs("span",{className:"apteva-tool-label",children:[K1.jsx("strong",{children:$}),H?K1.jsx("span",{className:"apteva-tool-stream-separator",children:" · "}):null,H?K1.jsx("span",{className:"apteva-tool-stream-output",children:H}):K1.jsxs(K1.Fragment,{children:[K1.jsx("span",{className:"apteva-tool-status-text",children:" running"}),K1.jsxs("span",{className:"apteva-tool-dots",children:[K1.jsx("span",{children:"."}),K1.jsx("span",{children:"."}),K1.jsx("span",{children:"."})]})]})]})]});if(U==="completed")return K1.jsxs("div",{className:"apteva-tool-card apteva-tool-card-completed",children:[K1.jsx("svg",{className:"apteva-tool-icon",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:K1.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),K1.jsx("span",{className:"apteva-tool-label",children:$})]});return K1.jsxs("div",{className:"apteva-tool-card apteva-tool-card-error",children:[K1.jsx("svg",{className:"apteva-tool-icon",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:K1.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),K1.jsxs("span",{className:"apteva-tool-label",children:[$," failed"]})]})}function bA({message:$,onAction:U,enableWidgets:B,onWidgetRender:W}){let H=$.role==="user",R=$.metadata?.content_segments,L=$.metadata?.isStreaming===!0,b=$.content||R&&R.length>0,T=bz.useRef(new Set),k=bz.useMemo(()=>{if(!B||H||!$.content)return[];return TY($.content).segments.filter((o)=>o.type==="widget"&&!!o.widget).map((o)=>o.widget)},[B,H,$.content]);bz.useEffect(()=>{if(W&&$.widgets){for(let l of $.widgets)if(!T.current.has(l.id))T.current.add(l.id),W(l)}},[$.widgets,W]),bz.useEffect(()=>{if(W&&k.length>0){for(let l of k)if(!T.current.has(l.id))T.current.add(l.id),W(l)}},[k,W]);let P=(l)=>{if(!B||H)return U0.jsx(n5,{content:l});let t=TY(l).segments.filter((c)=>c.type==="text"&&c.content).map((c)=>c.content).join("");if(!t.trim())return null;return U0.jsx(n5,{content:t})},w=()=>{if(!B||H||!$.content)return null;let l=TY($.content),o=[],t="";if(l.segments.forEach((c,k0)=>{if(c.type==="text"&&c.content)t+=c.content;else if(c.type==="widget"&&c.widget){if(t.trim())o.push(U0.jsx("div",{className:"apteva-message-bubble apteva-message-assistant",children:U0.jsx("div",{className:"apteva-message-content-assistant",children:U0.jsx(n5,{content:t})})},`text-${k0}`)),t="";o.push(U0.jsx("div",{className:"apteva-widget-standalone",children:U0.jsx(bH,{widget:c.widget,onAction:U})},`widget-${k0}`))}else if(c.type==="widget_pending"&&c.pendingType){if(t.trim())o.push(U0.jsx("div",{className:"apteva-message-bubble apteva-message-assistant",children:U0.jsx("div",{className:"apteva-message-content-assistant",children:U0.jsx(n5,{content:t})})},`text-${k0}`)),t="";o.push(U0.jsx("div",{className:"apteva-widget-standalone",children:U0.jsx(SO,{type:c.pendingType})},`pending-${k0}`))}}),t.trim())o.push(U0.jsx("div",{className:"apteva-message-bubble apteva-message-assistant",children:U0.jsx("div",{className:"apteva-message-content-assistant",children:U0.jsx(n5,{content:t})})},"text-final"));return o.length>0?o:null},M=$.metadata?.attachments||[],I=M.length>0,C=()=>{if(!I)return null;return U0.jsx("div",{className:"apteva-message-attachments flex flex-wrap gap-2 mb-2 justify-end",children:M.map((l,o)=>{let t=l.type.startsWith("image/"),c=l.type==="application/pdf";if(t&&l.preview)return U0.jsx("div",{className:"apteva-attachment-image relative rounded-lg overflow-hidden shadow-sm",children:U0.jsx("img",{src:l.preview,alt:l.name,className:"max-w-[150px] max-h-[150px] object-cover"})},o);return U0.jsxs("div",{className:"apteva-attachment-doc flex items-center gap-3 px-4 py-3 bg-neutral-100 dark:bg-neutral-800 border border-neutral-200 dark:border-neutral-700 rounded-xl shadow-sm",children:[U0.jsx("div",{className:"w-10 h-10 flex items-center justify-center bg-red-100 dark:bg-red-900/30 rounded-lg text-red-600 dark:text-red-400",children:c?U0.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:U0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"})}):U0.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:U0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})})}),U0.jsxs("div",{className:"flex flex-col min-w-0",children:[U0.jsx("span",{className:"text-sm font-medium text-neutral-800 dark:text-neutral-200 truncate max-w-[180px]",children:l.name}),U0.jsxs("span",{className:"text-xs text-neutral-500 dark:text-neutral-400",children:[c?"PDF":"Document"," · ",SY(l.size)]})]})]},o)})})},j=()=>{if(H)return U0.jsx("div",{className:"apteva-message-text",children:$.content});if(L&&!b)return U0.jsxs("div",{className:"apteva-typing-indicator",children:[U0.jsx("span",{}),U0.jsx("span",{}),U0.jsx("span",{})]});if(R&&R.length>0)return null;return P($.content)},u=(l,o)=>{if(!B)return U0.jsx("div",{className:"apteva-message-bubble apteva-message-assistant",children:U0.jsx("div",{className:"apteva-message-content-assistant",children:U0.jsx(n5,{content:l})})},o);let t=TY(l),c=[],k0="";if(t.segments.forEach((s,N0)=>{if(s.type==="text"&&s.content)k0+=s.content;else if(s.type==="widget"&&s.widget){if(k0.trim())c.push(U0.jsx("div",{className:"apteva-message-bubble apteva-message-assistant",children:U0.jsx("div",{className:"apteva-message-content-assistant",children:U0.jsx(n5,{content:k0})})},`${o}-text-${N0}`)),k0="";c.push(U0.jsx("div",{className:"apteva-widget-standalone",children:U0.jsx(bH,{widget:s.widget,onAction:U})},`${o}-widget-${N0}`))}else if(s.type==="widget_pending"&&s.pendingType){if(k0.trim())c.push(U0.jsx("div",{className:"apteva-message-bubble apteva-message-assistant",children:U0.jsx("div",{className:"apteva-message-content-assistant",children:U0.jsx(n5,{content:k0})})},`${o}-text-${N0}`)),k0="";c.push(U0.jsx("div",{className:"apteva-widget-standalone",children:U0.jsx(SO,{type:s.pendingType})},`${o}-pending-${N0}`))}}),k0.trim())c.push(U0.jsx("div",{className:"apteva-message-bubble apteva-message-assistant",children:U0.jsx("div",{className:"apteva-message-content-assistant",children:U0.jsx(n5,{content:k0})})},`${o}-text-final`));return c},f=()=>{if(!R||R.length===0)return null;let l=[];return R.forEach((o,t)=>{if(o.type==="text"&&o.content){let c=u(o.content,`seg-${t}`);if(Array.isArray(c))l.push(...c);else l.push(c)}else if(o.type==="tool")l.push(U0.jsx("div",{className:"apteva-tool-call-standalone",children:U0.jsx(WA,{name:o.name,status:o.status||(o.result!==void 0?"completed":"running"),isReceiving:o.isReceiving,inputLength:o.inputLength,streamOutput:o.streamOutput})},o.id))}),l};if(!H&&(R&&R.length>0))return U0.jsxs("div",{className:"apteva-message-segmented",children:[f(),$.widgets&&$.widgets.length>0&&U0.jsx("div",{className:"apteva-widget-standalone",children:U0.jsx(BH,{widgets:$.widgets,onAction:U,layout:"stack"})}),U0.jsx("div",{className:"apteva-message-timestamp apteva-message-timestamp-assistant",suppressHydrationWarning:!0,children:$.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]});let i=w();if(!H&&B&&i)return U0.jsxs("div",{className:"apteva-message-segmented",children:[i,$.widgets&&$.widgets.length>0&&U0.jsx("div",{className:"apteva-widget-standalone",children:U0.jsx(BH,{widgets:$.widgets,onAction:U,layout:"stack"})}),U0.jsx("div",{className:"apteva-message-timestamp apteva-message-timestamp-assistant",suppressHydrationWarning:!0,children:$.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]});if(H&&I)return U0.jsxs("div",{className:"apteva-message-segmented apteva-message-user-with-attachments flex flex-col items-end",children:[C(),$.content&&U0.jsx("div",{className:"apteva-message-bubble apteva-message-user",children:U0.jsx("div",{className:"apteva-message-content-user",children:U0.jsx("div",{className:"apteva-message-text",children:$.content})})}),U0.jsx("div",{className:"apteva-message-timestamp apteva-message-timestamp-user",suppressHydrationWarning:!0,children:$.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]});return U0.jsxs("div",{className:C1("apteva-message-bubble",H?"apteva-message-user":"apteva-message-assistant"),children:[U0.jsx("div",{className:H?"apteva-message-content-user":"apteva-message-content-assistant",children:j()}),$.widgets&&$.widgets.length>0&&U0.jsx("div",{className:"apteva-widget-standalone",children:U0.jsx(BH,{widgets:$.widgets,onAction:U,layout:"stack"})}),U0.jsx("div",{className:C1("apteva-message-timestamp",H?"apteva-message-timestamp-user":"apteva-message-timestamp-assistant"),suppressHydrationWarning:!0,children:$.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})}var VO=()=>h0.jsx("svg",{className:"w-12 h-12 sm:w-16 sm:h-16",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:h0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"})}),_H=()=>h0.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:h0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 7l5 5m0 0l-5 5m5-5H6"})});function RA({title:$,subtitle:U,icon:B,prompts:W,variant:H="centered",chatVariant:R="default",onPromptClick:L}){let b=(W||[]).map((P)=>typeof P==="string"?{text:P}:P),T=b.length>0,k=$||U||B;if(!k&&!T)return h0.jsx("div",{className:"flex items-center justify-center h-full !text-neutral-500 dark:!text-neutral-400",children:h0.jsxs("div",{className:"text-center space-y-2",children:[h0.jsx("div",{className:"flex justify-center",children:h0.jsx(VO,{})}),h0.jsx("p",{className:"text-sm",children:"No messages yet. Start a conversation!"})]})});if(H==="minimal")return h0.jsxs("div",{className:"flex flex-col h-full px-4 py-4",children:[k&&h0.jsxs("div",{className:"mb-4",children:[$&&h0.jsx("h2",{className:"text-lg font-semibold !text-neutral-900 dark:!text-white",children:$}),U&&h0.jsx("p",{className:"text-sm !text-neutral-500 dark:!text-neutral-400 mt-1",children:U})]}),T&&h0.jsx("div",{className:"flex-1 space-y-2",children:b.map((P,w)=>h0.jsx("button",{onClick:()=>L(P.text),className:C1("w-full text-left px-4 py-3 rounded-xl","bg-neutral-50 dark:bg-neutral-800/50","border border-neutral-200 dark:border-neutral-700","hover:bg-neutral-100 dark:hover:bg-neutral-800","hover:border-neutral-300 dark:hover:border-neutral-600","transition-all duration-200","group"),children:h0.jsxs("div",{className:"flex items-center gap-3",children:[h0.jsx("div",{className:"flex-shrink-0 !text-neutral-400 dark:!text-neutral-500 group-hover:!text-blue-500 dark:group-hover:!text-blue-400 transition-colors",children:P.icon||h0.jsx(_H,{})}),h0.jsxs("div",{className:"flex-1 min-w-0",children:[h0.jsx("p",{className:"text-sm font-medium !text-neutral-900 dark:!text-white truncate",children:P.text}),P.description&&h0.jsx("p",{className:"text-xs !text-neutral-500 dark:!text-neutral-400 mt-0.5 truncate",children:P.description})]})]})},w))})]});return h0.jsxs("div",{className:"flex flex-col items-center justify-center h-full px-4 py-6 sm:py-8",children:[h0.jsxs("div",{className:"text-center mb-6 sm:mb-8 max-w-md",children:[h0.jsx("div",{className:"mb-4 !text-neutral-400 dark:!text-neutral-500 flex justify-center",children:B||h0.jsx(VO,{})}),$&&h0.jsx("h1",{className:"text-xl sm:text-2xl font-semibold !text-neutral-900 dark:!text-white mb-2",children:$}),U&&h0.jsx("p",{className:"text-sm sm:text-base !text-neutral-500 dark:!text-neutral-400",children:U})]}),T&&h0.jsxs("div",{className:"w-full max-w-2xl",children:[h0.jsx("div",{className:"sm:hidden space-y-2",children:b.map((P,w)=>h0.jsx("button",{onClick:()=>L(P.text),className:C1("w-full text-left px-4 py-3 rounded-xl","bg-white dark:bg-neutral-800","border border-neutral-200 dark:border-neutral-700","hover:bg-neutral-50 dark:hover:bg-neutral-700","hover:border-blue-300 dark:hover:border-blue-600","active:scale-[0.98]","transition-all duration-200","shadow-sm hover:shadow","group"),children:h0.jsxs("div",{className:"flex items-center gap-3",children:[h0.jsx("div",{className:"flex-shrink-0 w-8 h-8 rounded-lg bg-neutral-100 dark:bg-neutral-700 flex items-center justify-center !text-neutral-500 dark:!text-neutral-400 group-hover:bg-blue-100 dark:group-hover:bg-blue-900/30 group-hover:!text-blue-600 dark:group-hover:!text-blue-400 transition-colors",children:P.icon||h0.jsx(_H,{})}),h0.jsxs("div",{className:"flex-1 min-w-0",children:[h0.jsx("p",{className:"text-sm font-medium !text-neutral-900 dark:!text-white",children:P.text}),P.description&&h0.jsx("p",{className:"text-xs !text-neutral-500 dark:!text-neutral-400 mt-0.5 line-clamp-1",children:P.description})]}),h0.jsx("svg",{className:"w-4 h-4 !text-neutral-400 group-hover:!text-blue-500 transition-colors flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:h0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})]})},w))}),h0.jsx("div",{className:"hidden sm:grid sm:grid-cols-2 gap-3",children:b.map((P,w)=>h0.jsx("button",{onClick:()=>L(P.text),className:C1("text-left p-4 rounded-xl","bg-white dark:bg-neutral-800","border border-neutral-200 dark:border-neutral-700","hover:bg-neutral-50 dark:hover:bg-neutral-700","hover:border-blue-300 dark:hover:border-blue-600","hover:shadow-md","active:scale-[0.98]","transition-all duration-200","group"),children:h0.jsxs("div",{className:"flex items-start gap-3",children:[h0.jsx("div",{className:"flex-shrink-0 w-9 h-9 rounded-lg bg-neutral-100 dark:bg-neutral-700 flex items-center justify-center !text-neutral-500 dark:!text-neutral-400 group-hover:bg-blue-100 dark:group-hover:bg-blue-900/30 group-hover:!text-blue-600 dark:group-hover:!text-blue-400 transition-colors",children:P.icon||h0.jsx(_H,{})}),h0.jsxs("div",{className:"flex-1 min-w-0",children:[h0.jsx("p",{className:"text-sm font-medium !text-neutral-900 dark:!text-white leading-snug",children:P.text}),P.description&&h0.jsx("p",{className:"text-xs !text-neutral-500 dark:!text-neutral-400 mt-1 line-clamp-2",children:P.description})]})]})},w))})]})]})}function NA({messages:$,onAction:U,welcomeTitle:B,welcomeSubtitle:W,welcomeIcon:H,suggestedPrompts:R,welcomeVariant:L,chatVariant:b,onPromptClick:T,enableWidgets:k,onWidgetRender:P}){let w=MQ.useRef(null),M=MQ.useRef(!0),I=MQ.useRef(0),C=()=>{if(w.current){let{scrollTop:j,scrollHeight:u,clientHeight:f}=w.current;M.current=u-j-f<100}};return MQ.useEffect(()=>{if(w.current&&M.current){let j=w.current.scrollHeight;if(j!==I.current)w.current.scrollTop=j,I.current=j}},[$]),O8.jsx("div",{ref:w,className:"apteva-message-list apteva-scrollbar-hidden",onScroll:C,children:$.length===0?O8.jsx(RA,{title:B,subtitle:W,icon:H,prompts:R,variant:L,chatVariant:b,onPromptClick:T||(()=>{})}):$.map((j)=>O8.jsx("div",{className:j.role==="user"?"apteva-message-row-user":"apteva-message-row-assistant",children:O8.jsx(bA,{message:j,onAction:U,enableWidgets:k,onWidgetRender:P})},j.id))})}function FA({onSendMessage:$,placeholder:U="Type a message...",disabled:B=!1,isLoading:W=!1,onStop:H,onFileUpload:R,onSwitchMode:L}){let[b,T]=M5.useState(""),[k,P]=M5.useState(!1),[w,M]=M5.useState([]),[I,C]=M5.useState(null),[j,u]=M5.useState(!1),f=M5.useRef(null),i=M5.useRef(null),l=M5.useRef(null),o=(p)=>{if(p.key==="Enter"&&!p.shiftKey)p.preventDefault(),t()},t=()=>{let p=b.trim(),r=w.length>0;if((p||r)&&!B){let g=w.map((_0)=>_0.file);if($(b.trim(),g.length>0?g:void 0),T(""),M([]),C(null),u(!1),f.current)f.current.style.height="auto"}},c=(p)=>{T(p.target.value),p.target.style.height="auto";let r=p.target.scrollHeight;p.target.style.height=`${r}px`;let g=p.target.value.includes(`
|
|
152
|
+
`),I0=r>36;if(!j&&(g||I0))u(!0);else if(j&&!g&&!I0&&p.target.value.length<20)u(!1)},k0=(p)=>{if(p.target.files&&p.target.files.length>0){let r=Array.from(p.target.files),g=[],_0=[];if(r.forEach((I0)=>{let b1=CO(I0);if(b1.valid){let Q1={file:I0};if(I0.type.startsWith("image/"))Q1.preview=URL.createObjectURL(I0);g.push(Q1)}else _0.push(b1.error||"Invalid file")}),g.length>0)M((I0)=>[...I0,...g]);if(_0.length>0)C(_0.join(", ")),setTimeout(()=>C(null),5000);R?.(p.target.files),P(!1),p.target.value=""}},s=(p)=>{M((r)=>{let g=r[p];if(g.preview)URL.revokeObjectURL(g.preview);return r.filter((_0,I0)=>I0!==p)})},N0=(p)=>{if(p.startsWith("image/"))return D0.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})});if(p==="application/pdf")return D0.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"})});return D0.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})})};return D0.jsxs("div",{className:"px-4 py-3 relative",children:[I&&D0.jsx("div",{className:"absolute bottom-full left-4 right-4 mb-2 p-3 bg-red-50 dark:bg-red-900/30 border border-red-200 dark:border-red-800 rounded-lg z-20",children:D0.jsxs("div",{className:"flex items-center gap-2 !text-red-700 dark:!text-red-300 text-sm",children:[D0.jsx("svg",{className:"w-4 h-4 flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),D0.jsx("span",{children:I})]})}),w.length>0&&D0.jsx("div",{className:"mb-2 flex flex-wrap gap-2",children:w.map((p,r)=>D0.jsxs("div",{className:"relative group flex items-center gap-2 px-3 py-2 bg-neutral-100 dark:bg-neutral-800 border border-neutral-200 dark:border-neutral-700 rounded-lg",children:[p.preview?D0.jsx("img",{src:p.preview,alt:p.file.name,className:"w-8 h-8 object-cover rounded"}):D0.jsx("div",{className:"w-8 h-8 flex items-center justify-center bg-neutral-200 dark:bg-neutral-700 rounded !text-neutral-500 dark:!text-neutral-400",children:N0(p.file.type)}),D0.jsxs("div",{className:"flex flex-col min-w-0",children:[D0.jsx("span",{className:"text-xs font-medium !text-neutral-700 dark:!text-neutral-300 truncate max-w-[120px]",children:p.file.name}),D0.jsx("span",{className:"text-xs !text-neutral-500 dark:!text-neutral-400",children:SY(p.file.size)})]}),D0.jsx("button",{onClick:()=>s(r),className:"absolute -top-1.5 -right-1.5 w-5 h-5 bg-neutral-500 hover:bg-red-500 text-white rounded-full flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity",title:"Remove file",children:D0.jsx("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]},r))}),D0.jsxs("div",{className:"apteva-composer",style:{gridTemplateColumns:"auto 1fr auto",gridTemplateAreas:j?'"textarea textarea textarea" "plus . send"':'"plus textarea send"',alignItems:"end"},children:[D0.jsxs("div",{className:"relative flex-shrink-0 self-end",style:{gridArea:"plus"},children:[D0.jsx("button",{ref:l,onClick:()=>P(!k),className:"apteva-composer-menu-btn w-8 h-8 rounded-lg flex items-center justify-center transition-all !text-neutral-700 dark:!text-neutral-300 hover:bg-neutral-100 dark:hover:bg-neutral-800",title:"More options",children:D0.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:D0.jsx("path",{d:"M10 5v10M5 10h10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),k&&D0.jsxs(D0.Fragment,{children:[D0.jsx("div",{className:"fixed inset-0 z-[9998]",onClick:()=>P(!1)}),D0.jsxs("div",{className:"apteva-composer-menu fixed bg-neutral-800 dark:bg-neutral-800 rounded-xl shadow-lg overflow-hidden z-[9999] min-w-[200px]",style:{left:l.current?.getBoundingClientRect().left??0,bottom:window.innerHeight-(l.current?.getBoundingClientRect().top??0)+8},children:[D0.jsxs("button",{onClick:()=>{i.current?.click(),P(!1)},className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-neutral-700 dark:hover:bg-neutral-700 transition-colors !text-white text-left",children:[D0.jsx("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:D0.jsx("path",{d:"M10.5 3.5L5.5 8.5C4.67157 9.32843 4.67157 10.6716 5.5 11.5C6.32843 12.3284 7.67157 12.3284 8.5 11.5L14.5 5.5C15.8807 4.11929 15.8807 1.88071 14.5 0.5C13.1193 -0.880711 10.8807 -0.880711 9.5 0.5L3.5 6.5C1.56846 8.43154 1.56846 11.5685 3.5 13.5C5.43154 15.4315 8.56846 15.4315 10.5 13.5L15.5 8.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",transform:"translate(2, 3)"})}),D0.jsx("span",{className:"!text-sm font-medium",children:"Add photos & files"})]}),L&&D0.jsxs("button",{onClick:()=>{L(),P(!1)},className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-neutral-700 dark:hover:bg-neutral-700 transition-colors !text-white text-left border-t border-neutral-700 dark:border-neutral-700",children:[D0.jsx("svg",{className:"w-4.5 h-4.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:D0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})}),D0.jsx("span",{className:"!text-sm font-medium",children:"Switch to command mode"})]})]})]})]}),D0.jsx("textarea",{ref:f,value:b,onChange:c,onKeyDown:o,placeholder:U,disabled:B,className:"apteva-composer-textarea resize-none bg-transparent border-none focus:outline-none !text-neutral-900 dark:!text-neutral-100 placeholder-neutral-400 dark:placeholder-neutral-500 py-1 disabled:opacity-50 disabled:cursor-not-allowed overflow-y-auto max-h-[200px]",style:{gridArea:"textarea"},rows:1}),D0.jsx("div",{className:"self-end",style:{gridArea:"send"},children:W&&H?D0.jsx("button",{onClick:H,className:"apteva-composer-stop-btn",title:"Stop generation",children:D0.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:D0.jsx("rect",{x:"2",y:"2",width:"10",height:"10",rx:"1",fill:"currentColor"})})}):D0.jsx("button",{onClick:t,disabled:!b.trim()&&w.length===0||B,className:"apteva-composer-send-btn w-8 h-8 rounded-lg flex items-center justify-center font-bold transition-all flex-shrink-0 border border-neutral-300 dark:border-neutral-600 bg-white dark:bg-neutral-800 !text-neutral-700 dark:!text-neutral-300 hover:bg-neutral-50 dark:hover:bg-neutral-700 disabled:opacity-30 disabled:cursor-not-allowed !text-lg",title:"Send message",children:D0.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:D0.jsx("path",{d:"M8 3L8 13M8 3L4 7M8 3L12 7",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})})]}),D0.jsx("input",{ref:i,type:"file",multiple:!0,onChange:k0,className:"hidden",accept:"image/*,application/pdf,.doc,.docx,.txt"})]})}function PA({onExecute:$,state:U,response:B,error:W,plan:H,streamedContent:R,toolName:L,onApprove:b,onReject:T,onReset:k,onStop:P,onExpand:w,placeholder:M="Enter your command...",disabled:I=!1}){let[C,j]=t5.useState(""),[u,f]=t5.useState([]),[i,l]=t5.useState(null),[o,t]=t5.useState(!1),c=t5.useRef(null),k0=t5.useRef(null),s=t5.useRef(null),N0=()=>{let B0=C.trim(),p0=u.length>0;if((B0||p0)&&!I&&U==="idle"){let R1=u.map((t1)=>t1.file);$(C.trim(),R1.length>0?R1:void 0),j(""),f([])}},p=(B0)=>{if(B0.key==="Enter"&&!B0.shiftKey)B0.preventDefault(),N0()},r=()=>{k?.(),c.current?.focus()},g=(B0)=>{if(j(B0),c.current)c.current.style.height="auto",c.current.style.height=`${Math.min(c.current.scrollHeight,120)}px`},_0=(B0)=>{if(B0.target.files&&B0.target.files.length>0){let p0=Array.from(B0.target.files),R1=[],t1=[];if(p0.forEach((i1)=>{let q4=CO(i1);if(q4.valid){let A4={file:i1};if(i1.type.startsWith("image/"))A4.preview=URL.createObjectURL(i1);R1.push(A4)}else t1.push(q4.error||"Invalid file")}),R1.length>0)f((i1)=>[...i1,...R1]);if(t1.length>0)l(t1.join(", ")),setTimeout(()=>l(null),5000);t(!1),B0.target.value=""}},I0=(B0)=>{f((p0)=>{let R1=p0[B0];if(R1.preview)URL.revokeObjectURL(R1.preview);return p0.filter((t1,i1)=>i1!==B0)})},b1=(B0)=>{if(B0.startsWith("image/"))return b0.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:b0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})});if(B0==="application/pdf")return b0.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:b0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"})});return b0.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:b0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})})},Q1=()=>{if(U==="loading"){if(L)return{text:L,isToolCall:!0};if(R)return{text:R,isToolCall:!1};return{text:"Processing...",isToolCall:!1}}if(U==="success"&&B)return{text:B,isToolCall:!1};if(U==="error"&&W)return{text:W,isToolCall:!1};if(U==="plan-pending"&&H)return{text:H,isToolCall:!1};return{text:"",isToolCall:!1}},n1=U!=="idle",{text:d,isToolCall:O0}=Q1();return b0.jsxs("div",{className:"w-full relative",children:[i&&b0.jsx("div",{className:"absolute -top-12 left-0 right-0 mx-3 p-2 bg-red-50 dark:bg-red-900/30 border border-red-200 dark:border-red-800 rounded-lg z-30",children:b0.jsxs("div",{className:"flex items-center gap-2 !text-red-700 dark:!text-red-300 text-xs",children:[b0.jsx("svg",{className:"w-3 h-3 flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:b0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),b0.jsx("span",{children:i})]})}),b0.jsxs("div",{className:C1("apteva-composer flex items-center gap-2 px-3 py-2 border-2 bg-white dark:bg-neutral-900 transition-all duration-200",U==="idle"&&"border-neutral-200 dark:border-neutral-700",U==="loading"&&"border-blue-400 dark:border-blue-500",U==="plan-pending"&&"border-amber-400 dark:border-amber-500",U==="success"&&"border-green-400 dark:border-green-500",U==="error"&&"border-red-400 dark:border-red-500"),children:[b0.jsxs("div",{className:"w-8 h-8 flex items-center justify-center flex-shrink-0",children:[U==="idle"&&b0.jsxs("div",{className:"relative",children:[b0.jsx("button",{ref:s,onClick:()=>t(!o),className:"apteva-composer-menu-btn w-8 h-8 rounded-lg flex items-center justify-center transition-all !text-neutral-500 dark:!text-neutral-400 hover:!text-neutral-700 dark:hover:!text-neutral-200 hover:bg-neutral-100 dark:hover:bg-neutral-800",title:"More options",children:b0.jsx("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:b0.jsx("path",{d:"M10 5v10M5 10h10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),o&&b0.jsxs(b0.Fragment,{children:[b0.jsx("div",{className:"fixed inset-0 z-[9998]",onClick:()=>t(!1)}),b0.jsxs("div",{className:"apteva-composer-menu fixed bg-neutral-800 dark:bg-neutral-800 rounded-xl shadow-lg overflow-hidden z-[9999] min-w-[200px]",style:{left:s.current?.getBoundingClientRect().left??0,top:(s.current?.getBoundingClientRect().bottom??0)+8},children:[b0.jsxs("button",{onClick:()=>{k0.current?.click(),t(!1)},className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-neutral-700 dark:hover:bg-neutral-700 transition-colors !text-white text-left",children:[b0.jsx("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:b0.jsx("path",{d:"M10.5 3.5L5.5 8.5C4.67157 9.32843 4.67157 10.6716 5.5 11.5C6.32843 12.3284 7.67157 12.3284 8.5 11.5L14.5 5.5C15.8807 4.11929 15.8807 1.88071 14.5 0.5C13.1193 -0.880711 10.8807 -0.880711 9.5 0.5L3.5 6.5C1.56846 8.43154 1.56846 11.5685 3.5 13.5C5.43154 15.4315 8.56846 15.4315 10.5 13.5L15.5 8.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",transform:"translate(2, 3)"})}),b0.jsx("span",{className:"!text-sm font-medium",children:"Add photos & files"})]}),w&&b0.jsxs("button",{onClick:()=>{w(),t(!1)},className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-neutral-700 dark:hover:bg-neutral-700 transition-colors !text-white text-left border-t border-neutral-700 dark:border-neutral-700",children:[b0.jsx("svg",{className:"w-4.5 h-4.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:b0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"})}),b0.jsx("span",{className:"!text-sm font-medium",children:"Expand to chat"})]})]})]})]}),U==="loading"&&!L&&b0.jsx("div",{className:"w-4 h-4 border-2 border-blue-200 border-t-blue-500 rounded-full animate-spin"}),U==="loading"&&L&&b0.jsx("div",{className:"w-2 h-2 rounded-full bg-blue-500 animate-pulse"})]}),u.length>0&&U==="idle"&&b0.jsx("div",{className:"flex items-center gap-1 flex-shrink-0",children:u.map((B0,p0)=>b0.jsxs("div",{className:"relative group flex items-center justify-center w-6 h-6 bg-neutral-100 dark:bg-neutral-800 rounded overflow-hidden",title:B0.file.name,children:[B0.preview?b0.jsx("img",{src:B0.preview,alt:B0.file.name,className:"w-6 h-6 object-cover"}):b0.jsx("span",{className:"text-xs !text-neutral-500 dark:!text-neutral-400",children:b1(B0.file.type)}),b0.jsx("button",{onClick:()=>I0(p0),className:"absolute inset-0 bg-black/50 opacity-0 group-hover:opacity-100 flex items-center justify-center transition-opacity",title:"Remove",children:b0.jsx("svg",{className:"w-3 h-3 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:b0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]},p0))}),U==="idle"?b0.jsx("textarea",{ref:c,value:C,onChange:(B0)=>g(B0.target.value),onKeyDown:p,placeholder:u.length>0?"Add a message...":M,disabled:I,rows:1,className:C1("flex-1 resize-none bg-transparent border-none focus:outline-none","!text-neutral-900 dark:!text-neutral-100 placeholder-neutral-400 dark:placeholder-neutral-500","text-sm leading-relaxed py-1","disabled:opacity-50"),style:{minHeight:"24px",maxHeight:"120px"}}):b0.jsx("div",{className:C1("flex-1 text-sm py-1 truncate flex items-center gap-2",U==="loading"&&!O0&&"!text-neutral-600 dark:!text-neutral-400",U==="loading"&&O0&&"!text-blue-600 dark:!text-blue-400",U==="success"&&"!text-neutral-900 dark:!text-neutral-100",U==="error"&&"!text-red-600 dark:!text-red-400",U==="plan-pending"&&"!text-amber-700 dark:!text-amber-300"),children:O0?b0.jsxs(b0.Fragment,{children:[b0.jsx("span",{className:"font-mono",children:d}),b0.jsx("span",{className:"text-neutral-400 dark:text-neutral-500",children:"Running..."})]}):d}),b0.jsx("div",{className:"w-8 h-8 flex items-center justify-center flex-shrink-0",children:U==="plan-pending"?b0.jsxs("div",{className:"flex items-center gap-1",children:[b0.jsx("button",{onClick:b,className:"px-2 py-1 bg-amber-500 text-white rounded-lg hover:bg-amber-600 transition-colors text-xs font-medium",children:"Approve"}),b0.jsx("button",{onClick:T,className:"px-2 py-1 bg-neutral-200 dark:bg-neutral-700 text-neutral-700 dark:text-neutral-300 rounded-lg hover:bg-neutral-300 dark:hover:bg-neutral-600 transition-colors text-xs font-medium",children:"Modify"})]}):b0.jsxs(b0.Fragment,{children:[U==="loading"&&P&&b0.jsx("button",{onClick:P,className:"apteva-composer-stop-btn",title:"Stop generation",children:b0.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:b0.jsx("rect",{x:"2",y:"2",width:"10",height:"10",rx:"1",fill:"currentColor"})})}),(U==="success"||U==="error")&&b0.jsx("button",{onClick:r,className:"w-8 h-8 rounded-lg flex items-center justify-center !text-neutral-400 hover:!text-neutral-600 dark:hover:!text-neutral-300 hover:bg-neutral-100 dark:hover:bg-neutral-800 transition-colors",title:"New command",children:b0.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:b0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),U==="idle"&&b0.jsx("button",{onClick:N0,disabled:!C.trim()&&u.length===0||I,className:C1("apteva-composer-send-btn w-8 h-8 rounded-lg flex items-center justify-center transition-all","border border-neutral-200 dark:border-neutral-700","disabled:opacity-30 disabled:cursor-not-allowed",C.trim()||u.length>0?"bg-neutral-900 dark:bg-white !text-white dark:!text-neutral-900 border-neutral-900 dark:border-white":"bg-white dark:bg-neutral-800 !text-neutral-400"),title:"Execute command",children:b0.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:b0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 12h14M12 5l7 7-7 7"})})})]})})]}),b0.jsx("input",{ref:k0,type:"file",multiple:!0,onChange:_0,className:"hidden",accept:"image/*,application/pdf,.doc,.docx,.txt"})]})}var MA="http://91.99.200.48:3000/agents",wA="agt_894abd5966bc9f1e9f8f17f2a6f6b5e0",AA=class{constructor(){j2(this,"config"),this.config={apiUrl:MA,apiKey:wA}}configure($){if($.apiUrl)this.config.apiUrl=$.apiUrl;if($.apiKey)this.config.apiKey=$.apiKey}getConfig(){return{...this.config}}async chat($){try{console.log("[AptevaClient] Chat request:",{agent_id:$.agent_id,message:typeof $.message==="string"?$.message.substring(0,100)+"...":"[multi-part message]",system:$.system,stream:$.stream});let U=await fetch(`${this.config.apiUrl}/chat`,{method:"POST",headers:{"Content-Type":"application/json","X-API-Key":this.config.apiKey},body:JSON.stringify($)});if(!U.ok){let W=await U.json().catch(()=>({error:"Request failed"}));throw Error(W.error||`Request failed with status ${U.status}`)}let B=await U.json();return{message:B.response||B.message||"",thread_id:B.thread_id,widgets:B.widgets}}catch(U){throw console.error("Chat API error:",U),U}}async chatStream($,U,B,W){try{console.log("[AptevaClient] Chat stream request:",{agent_id:$.agent_id,message:typeof $.message==="string"?$.message.substring(0,100)+"...":"[multi-part message]",system:$.system,stream:$.stream});let H=await fetch(`${this.config.apiUrl}/chat`,{method:"POST",headers:{"Content-Type":"application/json","X-API-Key":this.config.apiKey,Accept:"text/event-stream"},body:JSON.stringify({...$,stream:!0})});if(!H.ok){let k=await H.json().catch(()=>({error:"Request failed"}));throw Error(k.error||`Request failed with status ${H.status}`)}let R=H.body?.getReader();if(!R)throw Error("Response body is not readable");let L=new TextDecoder,b="",T="";while(!0){let{done:k,value:P}=await R.read();if(k)break;b+=L.decode(P,{stream:!0});let w=b.split(`
|
|
153
|
+
`);b=w.pop()||"";for(let M of w){if(!M.trim()||M.startsWith(":"))continue;if(M.startsWith("data: ")){let I=M.slice(6);if(I==="[DONE]"){B?.(T);return}try{let C=JSON.parse(I);if(C.thread_id)T=C.thread_id;U(C)}catch(C){console.warn("[AptevaClient] Failed to parse SSE data:",I)}}}}B?.(T)}catch(H){let R=H instanceof Error?H:Error("Unknown error");throw W?.(R),R}}async createThread($,U){let B=await fetch(`${this.config.apiUrl}/agents/${$}/threads`,{method:"POST",headers:{"Content-Type":"application/json","X-API-Key":this.config.apiKey},body:JSON.stringify({metadata:U})});if(!B.ok){let H=await B.json().catch(()=>({error:"Request failed"}));throw Error(H.error||`Request failed with status ${B.status}`)}return(await B.json()).thread_id}async getThreadMessages($){let U=await fetch(`${this.config.apiUrl}/threads/${$}/messages`,{method:"GET",headers:{"X-API-Key":this.config.apiKey}});if(!U.ok){let W=await U.json().catch(()=>({error:"Request failed"}));throw Error(W.error||`Request failed with status ${U.status}`)}return(await U.json()).messages}async cancelRequest($,U){try{let B=await fetch(`${this.config.apiUrl}/agents/${$}/requests/${U}/cancel`,{method:"POST",headers:{"Content-Type":"application/json","X-API-Key":this.config.apiKey}});if(!B.ok){let W=await B.json().catch(()=>({error:"Cancel request failed"}));throw Error(W.error||`Cancel request failed with status ${B.status}`)}}catch(B){throw console.error("[AptevaClient] Cancel request error:",B),B}}},PQ=new AA,W8=_1.forwardRef(function({agentId:U,threadId:B,initialMessages:W=[],context:H,apiUrl:R,apiKey:L,useMock:b=!1,initialMode:T="chat",showModeToggle:k=!1,onModeChange:P,commandVariant:w="default",planMode:M=!1,onPlanModeChange:I,enableStreaming:C=!0,showProgress:j=!0,loadingText:u="Processing...",welcomeTitle:f,welcomeSubtitle:i,welcomeIcon:l,suggestedPrompts:o,welcomeVariant:t,onThreadChange:c,onMessageSent:k0,onAction:s,onFileUpload:N0,onComplete:p,onError:r,onToolCall:g,onToolResult:_0,variant:I0="default",placeholder:b1,showHeader:Q1=!0,headerTitle:n1="Chat",enableWidgets:d=!1,availableWidgets:O0,compactWidgetContext:B0=!1,onWidgetRender:p0,className:R1},t1){let[i1,q4]=_1.useState(W),[A4,s1]=_1.useState(!1),[o1,Z4]=_1.useState(B||null),[v4,y0]=_1.useState(T),[O1,A1]=_1.useState(null),[v1,X1]=_1.useState("idle"),[n4,t4]=_1.useState(null),[g6,c4]=_1.useState(null),[Fz,G4]=_1.useState(0),[C6,Y4]=_1.useState(""),[x6,H4]=_1.useState(""),[C4,U6]=_1.useState(null),[c6,s4]=_1.useState(null),[B6,J0]=_1.useState(""),[v0,u0]=_1.useState(""),[L1,D1]=_1.useState(M),[K4,c1]=_1.useState(!1),e4=_1.useRef(null),r0=_1.useRef(null);_1.useImperativeHandle(t1,()=>({sendMessage:async(G1)=>{if(r0.current)await r0.current(G1)},sendSystemMessage:async(G1)=>{if(r0.current)await r0.current(G1,void 0,!0)},getMessages:()=>i1,clearMessages:()=>q4([])}),[i1]);let Z1=_1.useMemo(()=>{if(!d)return H;let G1=B0?QA(O0):zA(O0);return H?`${H}
|
|
154
|
+
${G1}`:G1},[H,d,O0,B0]);_1.useEffect(()=>{if(R||L)PQ.configure({...R&&{apiUrl:R},...L&&{apiKey:L}})},[R,L]),_1.useEffect(()=>{if(B)c?.(B)},[B,c]),_1.useEffect(()=>{D1(M)},[M]),_1.useEffect(()=>{let G1=(p1)=>{let d1=p1.target;if(K4&&!d1.closest(".settings-menu-container"))c1(!1)};return document.addEventListener("mousedown",G1),()=>document.removeEventListener("mousedown",G1)},[K4]);let D7=(G1)=>{if(y0(G1),P?.(G1),G1==="command")X1("idle"),t4(null),c4(null)},A5=v4==="chat"?"Type a message...":"Enter your command...",q5=async(G1,p1,d1)=>{let N1=p1&&p1.length>0,k1=N1?p1.map((W1)=>({name:W1.name,type:W1.type,size:W1.size,preview:W1.type.startsWith("image/")?URL.createObjectURL(W1):void 0})):[];if(!d1){let W1={id:`msg-${Date.now()}`,role:"user",content:G1,timestamp:new Date,metadata:N1?{attachments:k1}:void 0};q4((J1)=>[...J1,W1]),k0?.(W1)}s1(!0);try{let W1=await IO(G1,p1);if(b){let J1=await g2(1000);q4((N)=>[...N,J1])}else{let J1=[],N="",E=[],z0=o1,M0={},l0={},j0=`msg-${Date.now()}`,g0=()=>{let e=[...J1];if(N){let K0=e[e.length-1];if(K0&&K0.type==="text")K0.content=N;else e.push({type:"text",content:N})}q4((K0)=>{let S0=K0[K0.length-1];if(S0&&S0.role==="assistant")return[...K0.slice(0,-1),{...S0,content:N,widgets:E.length>0?E:void 0,metadata:{...S0.metadata,content_segments:e,isStreaming:!0}}];else return[...K0,{id:j0,role:"assistant",content:N,widgets:E.length>0?E:void 0,timestamp:new Date,metadata:{content_segments:e,isStreaming:!0}}]})};await PQ.chatStream({agent_id:U,message:W1,stream:!0,...o1&&{thread_id:o1},...Z1&&{system:Z1}},(e)=>{switch(e.type){case"thread_id":if(e.thread_id){if(z0=e.thread_id,!o1)Z4(e.thread_id),c?.(e.thread_id)}break;case"request_id":if(e.request_id)s4(e.request_id);break;case"content":case"token":if(e.content)N+=e.content,g0();break;case"tool_call":if(e.tool_id&&e.tool_name){let K0=e.tool_display_name||e.tool_name;if(N)J1.push({type:"text",content:N}),N="";J1.push({type:"tool",id:e.tool_id,name:K0,status:"preparing"}),M0[e.tool_id]="",A1(K0),g?.(e.tool_name,e.tool_id),g0()}break;case"tool_input_delta":if(e.tool_id&&e.content){let K0=e.tool_id;if(M0[K0]===void 0)M0[K0]="";M0[K0]+=e.content;let S0=J1.find((S1)=>S1.type==="tool"&&S1.id===K0);if(S0){if(S0.isReceiving=!0,S0.inputLength=M0[K0].length,g0(),l0[K0])clearTimeout(l0[K0]);l0[K0]=setTimeout(()=>{if(S0.status==="preparing")S0.isReceiving=!1,g0()},150)}}break;case"tool_use":if(e.tool_id){let K0=J1.find((S0)=>S0.type==="tool"&&S0.id===e.tool_id);if(K0&&K0.status==="preparing")K0.status="running",K0.isReceiving=!1,g0()}break;case"tool_stream":if(e.tool_id){let K0=J1.find((S0)=>S0.type==="tool"&&S0.id===e.tool_id);if(K0){if(e.event==="chunk"&&e.content){if(K0.pendingReset)K0.streamOutput="",K0.pendingReset=!1;K0.streamOutput=(K0.streamOutput||"")+e.content,g0()}else if(e.event==="log"||e.event==="progress")K0.pendingReset=!0}}break;case"tool_result":if(e.tool_id){let K0=J1.find((S0)=>S0.type==="tool"&&S0.id===e.tool_id);if(K0)K0.result=e.content,K0.status="completed",K0.isReceiving=!1,_0?.(K0.name,e.content);A1(null),g0()}break;case"widget":if(e.widget)E.push(e.widget),g0();break;case"error":throw Error(e.message||"Stream error")}},(e)=>{if(N){let K0=J1[J1.length-1];if(K0&&K0.type==="text")K0.content=N;else J1.push({type:"text",content:N})}if(q4((K0)=>{let S0=K0[K0.length-1];if(S0&&S0.role==="assistant")return[...K0.slice(0,-1),{...S0,content:N||"Response received",widgets:E.length>0?E:void 0,metadata:{thread_id:e,content_segments:J1,isStreaming:!1}}];return K0}),e&&e!==o1)Z4(e),c?.(e);s1(!1),s4(null),A1(null)},(e)=>{let K0={id:`msg-${Date.now()}-error`,role:"assistant",content:`Error: ${e.message}`,timestamp:new Date,metadata:{error:!0}};q4((S0)=>{let S1=S0[S0.length-1];if(S1&&S1.id.includes("streaming"))return[...S0.slice(0,-1),K0];return[...S0,K0]}),s1(!1),s4(null),A1(null),r?.(e)})}}catch(W1){let J1={id:`msg-${Date.now()}-error`,role:"assistant",content:W1 instanceof Error?`Error: ${W1.message}`:"An error occurred",timestamp:new Date,metadata:{error:!0}};q4((N)=>[...N,J1]),r?.(W1 instanceof Error?W1:Error("Unknown error"))}finally{s1(!1)}};r0.current=q5;let Pz=async(G1,p1)=>{let d1=G1||C6;if(!d1.trim()&&(!p1||p1.length===0)){c4(Error("Please enter a command")),X1("error");return}if(L1&&v1!=="plan-pending"){if(X1("loading"),c4(null),Y4(""),b)setTimeout(()=>{let N1=`1. Analyze the request: "${d1}"
|
|
155
|
+
2. Process the data
|
|
156
|
+
3. Generate response
|
|
157
|
+
4. Return results`;J0(N1),u0(d1),X1("plan-pending")},800);else try{let k1=Z1?`${Z1}
|
|
158
|
+
|
|
159
|
+
CRITICAL PLANNING MODE: You are ONLY creating a plan. Write a numbered list of steps describing what WOULD be done. DO NOT execute anything.`:"CRITICAL PLANNING MODE: You are ONLY creating a plan. Write a numbered list of steps describing what WOULD be done. DO NOT execute anything.",W1=await PQ.chat({agent_id:U,message:d1,stream:!1,system:k1});J0(W1.message),u0(d1),X1("plan-pending")}catch(N1){let k1=N1 instanceof Error?N1:Error("Failed to generate plan");c4(k1),X1("error"),r?.(k1)}return}X1("loading"),c4(null),G4(0),H4(""),Y4("");try{if(b)if(C){let N1="";d2(d1,(k1)=>{if(k1.type==="token"&&k1.content){N1+=k1.content,H4(N1);let W1=Math.min(Math.round(N1.length/10),90);G4(W1)}},(k1)=>{let W1={success:!0,data:{summary:N1,thread_id:k1},message:N1||"Command executed successfully"};t4(W1),X1("success"),G4(100),p?.(W1)},(k1)=>{c4(k1),X1("error"),r?.(k1)})}else{await new Promise((k1)=>setTimeout(k1,1500));let N1={success:!0,data:{summary:`Executed: ${d1}`},message:"Command executed successfully"};t4(N1),X1("success"),G4(100),p?.(N1)}else{let k1=Z1?`${Z1}
|
|
160
|
+
|
|
161
|
+
CRITICAL COMMAND MODE: Maximum 10 words per response. Execute the command immediately. Make reasonable assumptions based on context. Use sensible defaults for missing details. DO NOT ask questions unless something is truly impossible without user input (e.g., missing required password). State what you're doing or the result. Examples: "Analyzing customer data from last quarter..." or "Created 5 new database entries successfully" or "Search complete: found 12 matching results". NO greetings, NO filler words, NO clarification requests. Action/result only.`:`CRITICAL COMMAND MODE: Maximum 10 words per response. Execute the command immediately. Make reasonable assumptions based on context. Use sensible defaults for missing details. DO NOT ask questions unless something is truly impossible without user input (e.g., missing required password). State what you're doing or the result. Examples: "Analyzing customer data from last quarter..." or "Created 5 new database entries successfully" or "Search complete: found 12 matching results". NO greetings, NO filler words, NO clarification requests. Action/result only.`,W1=p1&&p1.length>0?await IO(d1,p1):d1;if(C){let J1="",N="";await PQ.chatStream({agent_id:U,message:W1,stream:!0,...o1&&{thread_id:o1},system:k1},(E)=>{if((E.type==="token"||E.type==="content")&&E.content){J1+=E.content,H4(J1),U6(null);let z0=Math.min(Math.round(J1.length/10),90);G4(z0)}else if(E.type==="tool_call"&&E.tool_name){let z0=E.tool_display_name||E.tool_name;N=E.tool_name,U6(z0),g?.(E.tool_name,E.tool_id||""),J1="",H4("")}else if(E.type==="tool_result")_0?.(N,E.content),U6(null);else if(E.type==="thread_id"&&E.thread_id){if(!o1)Z4(E.thread_id),c?.(E.thread_id)}else if(E.type==="request_id"&&E.request_id)s4(E.request_id)},(E)=>{let z0={success:!0,data:{summary:J1,thread_id:E},message:J1||"Command executed successfully"};t4(z0),X1("success"),G4(100),s4(null),p?.(z0)},(E)=>{c4(E),X1("error"),s4(null),r?.(E)})}else{let J1=await PQ.chat({agent_id:U,message:W1,stream:!1,...o1&&{thread_id:o1},system:k1}),N={success:!0,data:{summary:J1.message,thread_id:J1.thread_id},widgets:J1.widgets,message:J1.message};t4(N),X1("success"),G4(100),p?.(N)}}}catch(N1){let k1=N1 instanceof Error?N1:Error("Unknown error");c4(k1),X1("error"),r?.(k1)}},Mz=()=>{X1("idle"),t4(null),c4(null),G4(0),Y4(""),J0(""),u0(""),H4(""),U6(null)},wz=()=>{let G1=B6;J0(""),u0("");let p1=`Execute this plan now:
|
|
162
|
+
|
|
163
|
+
${G1}`;Pz(p1)},y7=()=>{Y4(v0),J0(""),u0(""),X1("idle")},f7=async()=>{if(c6&&U)try{await PQ.cancelRequest(U,c6)}catch(G1){console.error("Failed to cancel request:",G1)}if(s1(!1),v1==="loading")X1("idle"),H4(""),U6(null),G4(0);s4(null)},DQ=w==="compact";return H6.jsxs("div",{className:C1("apteva-chat flex flex-col h-full",I0!=="default"&&`apteva-chat-${I0}`,R1),children:[Q1&&v4==="chat"&&H6.jsx("div",{className:"apteva-chat-header px-4 py-3 flex items-center justify-between",children:H6.jsxs("div",{children:[H6.jsx("div",{className:"apteva-chat-title",children:n1}),H6.jsx("div",{className:C1("apteva-chat-status",A4?O1?"apteva-chat-status-tool":"apteva-chat-status-thinking":"apteva-chat-status-ready"),children:A4?O1?`Using ${O1}...`:"Thinking...":"Ready"})]})}),v4==="chat"&&H6.jsxs(H6.Fragment,{children:[H6.jsx(NA,{messages:i1,onAction:s,welcomeTitle:f,welcomeSubtitle:i,welcomeIcon:l,suggestedPrompts:o,welcomeVariant:t,chatVariant:I0,onPromptClick:(G1)=>q5(G1),enableWidgets:d,onWidgetRender:p0}),H6.jsx(FA,{onSendMessage:q5,placeholder:b1||A5,disabled:A4,isLoading:A4,onStop:f7,onFileUpload:N0,onSwitchMode:k?()=>D7("command"):void 0})]}),v4==="command"&&H6.jsx("div",{className:"w-full",children:H6.jsx(PA,{onExecute:(G1,p1)=>{Y4(G1),Pz(G1,p1)},state:v1,response:n4?.data?.summary||n4?.message,error:g6?.message,plan:B6,streamedContent:x6,toolName:C4,onApprove:wz,onReject:y7,onReset:Mz,onStop:f7,onExpand:k?()=>D7("chat"):void 0,placeholder:b1||"Enter your command..."})}),H6.jsx("style",{dangerouslySetInnerHTML:{__html:`
|
|
164
|
+
@keyframes pulse-border {
|
|
165
|
+
0%, 100% { border-color: rgb(59, 130, 246); }
|
|
166
|
+
50% { border-color: rgb(147, 197, 253); }
|
|
167
|
+
}
|
|
168
|
+
.animate-pulse-border {
|
|
169
|
+
animation: pulse-border 2s ease-in-out infinite;
|
|
170
|
+
}
|
|
171
|
+
.apteva-composer {
|
|
172
|
+
border-radius: var(--apteva-border-radius, 1rem) !important;
|
|
173
|
+
}
|
|
174
|
+
`}})]})});var T1=Q0(u1(),1),dO=V6.createContext(null);function lO(){return V6.useContext(dO)}function iO({children:$}){let{authFetch:U,isAuthenticated:B,isLoading:W}=V4(),[H,R]=V6.useState(null),[L,b]=V6.useState(!1),[T,k]=V6.useState(!1),[P,w]=V6.useState(null),M=async()=>{try{let l=await(await U("/api/meta-agent/status")).json();R(l)}catch(i){console.error("[MetaAgent] Failed to fetch status:",i)}};V6.useEffect(()=>{if(!W&&B)M()},[U,B,W]);let I=async()=>{k(!0),w(null);try{let i=await U("/api/meta-agent/start",{method:"POST"}),l=await i.json();if(!i.ok)w(l.error||"Failed to start assistant");else await M()}catch(i){w("Failed to start assistant")}k(!1)},C=!!(H?.enabled&&H?.available),j=H?.agent,u=!!(j?.status==="running"&&j?.port),f={status:H,isOpen:L,isStarting:T,error:P,isAvailable:C,isRunning:u,agent:j,toggle:()=>b(!L),close:()=>b(!1),startAgent:I};return T1.jsxDEV(dO.Provider,{value:f,children:$},void 0,!1,void 0,this)}function oO(){let $=lO();if(!$?.isAvailable)return null;return T1.jsxDEV("button",{onClick:$.toggle,className:`hidden md:flex items-center gap-2 px-3 py-2 rounded transition ${$.isOpen?"bg-[#f97316] text-white":"bg-[#151515] hover:bg-[#1a1a1a] text-[#888] hover:text-white"}`,title:"Apteva Assistant",children:[T1.jsxDEV(rO,{className:"w-5 h-5"},void 0,!1,void 0,this),T1.jsxDEV("span",{className:"text-sm",children:"Assistant"},void 0,!1,void 0,this),$.isRunning&&T1.jsxDEV("span",{className:"w-2 h-2 rounded-full bg-green-400"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function aO(){let $=lO(),{currentProjectId:U,currentProject:B}=K6();if(!$?.isAvailable||!$.isOpen)return null;let{agent:W,isRunning:H,error:R,isStarting:L,startAgent:b,close:T}=$,k=V6.useMemo(()=>{let P=[];if(B)P.push(`Current project: "${B.name}" (id: ${B.id})`);else if(U==="unassigned")P.push("Viewing: unassigned agents (no project)");else P.push("Viewing: All Projects");return P.join(`
|
|
175
|
+
`)},[U,B]);return T1.jsxDEV(T1.Fragment,{children:[T1.jsxDEV("div",{className:"hidden md:block fixed inset-0 bg-black/20 z-40",onClick:T},void 0,!1,void 0,this),T1.jsxDEV("div",{className:"hidden md:flex fixed top-0 right-0 h-full w-[480px] lg:w-[540px] bg-[#0a0a0a] border-l border-[#1a1a1a] shadow-2xl z-50 flex-col",children:[T1.jsxDEV("div",{className:"flex items-center justify-between px-4 py-3 border-b border-[#1a1a1a] bg-[#111]",children:[T1.jsxDEV("div",{className:"flex items-center gap-2",children:[T1.jsxDEV("div",{className:`w-2 h-2 rounded-full ${H?"bg-green-400":"bg-[#444]"}`},void 0,!1,void 0,this),T1.jsxDEV("span",{className:"font-medium text-sm",children:"Apteva Assistant"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),T1.jsxDEV("button",{onClick:T,className:"text-[#666] hover:text-[#888] transition",children:T1.jsxDEV(TA,{},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),T1.jsxDEV("div",{className:"flex-1 min-h-0 flex flex-col",children:H?T1.jsxDEV(W8,{agentId:"default",apiUrl:`/api/agents/${W.id}`,placeholder:"Ask me anything about Apteva...",variant:"terminal",showHeader:!1,context:k},void 0,!1,void 0,this):T1.jsxDEV("div",{className:"flex-1 flex flex-col items-center justify-center p-6 text-center",children:[T1.jsxDEV(rO,{className:"w-12 h-12 text-[#333] mb-4"},void 0,!1,void 0,this),T1.jsxDEV("h3",{className:"font-medium mb-2",children:"Apteva Assistant"},void 0,!1,void 0,this),T1.jsxDEV("p",{className:"text-sm text-[#666] mb-6",children:"I can help you navigate Apteva, create agents, set up MCP servers, and more."},void 0,!1,void 0,this),R&&T1.jsxDEV("p",{className:"text-sm text-red-400 mb-4",children:R},void 0,!1,void 0,this),T1.jsxDEV("button",{onClick:b,disabled:L,className:"bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 text-white px-6 py-2 rounded font-medium transition",children:L?"Starting...":"Start Assistant"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function rO({className:$="w-6 h-6"}){return T1.jsxDEV("svg",{className:$,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:T1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function TA(){return T1.jsxDEV("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:T1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}var a0=Q0(u1(),1);function CY({onMenuClick:$}){let{connected:U}=VY(),{user:B,logout:W}=V4(),{projects:H,currentProjectId:R,currentProject:L,setCurrentProjectId:b,unassignedCount:T,projectsEnabled:k}=K6(),[P,w]=PH.useState(!1),[M,I]=PH.useState(!1),C=async()=>{await W(),w(!1)},j=(i)=>{b(i),I(!1)},u=()=>{if(R===null)return"All Projects";if(R==="unassigned")return"Unassigned";return L?.name||"Select Project"},f=()=>{if(R===null)return"#666";if(R==="unassigned")return"#888";return L?.color||"#6366f1"};return a0.jsxDEV("header",{className:"border-b border-[#1a1a1a] px-4 md:px-6 py-4 flex-shrink-0",children:a0.jsxDEV("div",{className:"flex items-center justify-between",children:[a0.jsxDEV("div",{className:"flex items-center gap-3",children:[a0.jsxDEV("button",{onClick:$,className:"p-2 -ml-2 text-[#666] hover:text-[#e0e0e0] transition md:hidden",children:a0.jsxDEV(nO,{},void 0,!1,void 0,this)},void 0,!1,void 0,this),a0.jsxDEV("div",{className:"flex items-center gap-2",children:[a0.jsxDEV("span",{className:"text-[#f97316]",children:">_"},void 0,!1,void 0,this),a0.jsxDEV("span",{className:"text-xl tracking-wider",children:"apteva"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),k&&H.length>0&&a0.jsxDEV("div",{className:"relative ml-2 md:ml-4",children:[a0.jsxDEV("button",{onClick:()=>I(!M),className:"flex items-center gap-2 px-3 py-1.5 rounded border border-[#222] bg-[#111] hover:bg-[#1a1a1a] transition text-sm",children:[a0.jsxDEV("span",{className:"w-2.5 h-2.5 rounded-full",style:{backgroundColor:f()}},void 0,!1,void 0,this),a0.jsxDEV("span",{className:"hidden sm:inline max-w-[120px] md:max-w-[180px] truncate",children:u()},void 0,!1,void 0,this),a0.jsxDEV(tO,{},void 0,!1,void 0,this)]},void 0,!0,void 0,this),M&&a0.jsxDEV("div",{className:"absolute left-0 top-full mt-1 w-56 bg-[#111] border border-[#222] rounded-lg shadow-xl z-50",children:a0.jsxDEV("div",{className:"py-1 max-h-64 overflow-y-auto",children:[a0.jsxDEV("button",{onClick:()=>j(null),className:`w-full px-4 py-2 text-left text-sm flex items-center gap-2 hover:bg-[#1a1a1a] transition ${R===null?"bg-[#1a1a1a] text-[#f97316]":""}`,children:[a0.jsxDEV("span",{className:"w-2.5 h-2.5 rounded-full bg-[#666]"},void 0,!1,void 0,this),"All Projects"]},void 0,!0,void 0,this),H.map((i)=>a0.jsxDEV("button",{onClick:()=>j(i.id),className:`w-full px-4 py-2 text-left text-sm flex items-center gap-2 hover:bg-[#1a1a1a] transition ${R===i.id?"bg-[#1a1a1a] text-[#f97316]":""}`,children:[a0.jsxDEV("span",{className:"w-2.5 h-2.5 rounded-full flex-shrink-0",style:{backgroundColor:i.color}},void 0,!1,void 0,this),a0.jsxDEV("span",{className:"truncate",children:i.name},void 0,!1,void 0,this),a0.jsxDEV("span",{className:"ml-auto text-xs text-[#666]",children:i.agentCount},void 0,!1,void 0,this)]},i.id,!0,void 0,this)),T>0&&a0.jsxDEV("button",{onClick:()=>j("unassigned"),className:`w-full px-4 py-2 text-left text-sm flex items-center gap-2 hover:bg-[#1a1a1a] transition ${R==="unassigned"?"bg-[#1a1a1a] text-[#f97316]":""}`,children:[a0.jsxDEV("span",{className:"w-2.5 h-2.5 rounded-full bg-[#888]"},void 0,!1,void 0,this),a0.jsxDEV("span",{className:"truncate",children:"Unassigned"},void 0,!1,void 0,this),a0.jsxDEV("span",{className:"ml-auto text-xs text-[#666]",children:T},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),a0.jsxDEV("div",{className:"flex items-center gap-3 md:gap-4",children:[a0.jsxDEV("div",{className:"flex items-center gap-2",children:[a0.jsxDEV("span",{className:`w-2 h-2 rounded-full ${U?"bg-green-400":"bg-red-400"}`},void 0,!1,void 0,this),a0.jsxDEV("span",{className:"text-xs text-[#666] hidden sm:inline",children:U?"Live":"Offline"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),a0.jsxDEV(oO,{},void 0,!1,void 0,this),B&&a0.jsxDEV("div",{className:"relative",children:[a0.jsxDEV("button",{onClick:()=>w(!P),className:"flex items-center gap-2 px-2 md:px-3 py-2 rounded hover:bg-[#1a1a1a] transition",children:[a0.jsxDEV("div",{className:"w-8 h-8 rounded-full bg-[#f97316] flex items-center justify-center text-black font-medium text-sm",children:B.username.charAt(0).toUpperCase()},void 0,!1,void 0,this),a0.jsxDEV("span",{className:"text-sm text-[#888] hidden sm:block",children:B.username},void 0,!1,void 0,this)]},void 0,!0,void 0,this),P&&a0.jsxDEV("div",{className:"absolute right-0 top-full mt-1 w-48 bg-[#111] border border-[#222] rounded-lg shadow-xl z-50",children:[a0.jsxDEV("div",{className:"px-4 py-3 border-b border-[#222]",children:[a0.jsxDEV("p",{className:"text-sm font-medium",children:B.username},void 0,!1,void 0,this),a0.jsxDEV("p",{className:"text-xs text-[#f97316] mt-1",children:B.role},void 0,!1,void 0,this)]},void 0,!0,void 0,this),a0.jsxDEV("button",{onClick:C,className:"w-full px-4 py-2 text-left text-sm text-red-400 hover:bg-[#1a1a1a] transition",children:"Sign out"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}var z1=Q0(u1(),1);function yY({route:$,agentCount:U,taskCount:B,onNavigate:W,isOpen:H,onClose:R}){let L=(b)=>{W(b),R?.()};return z1.jsxDEV(z1.Fragment,{children:[H&&z1.jsxDEV("div",{className:"fixed inset-0 bg-black/60 z-40 md:hidden",onClick:R},void 0,!1,void 0,this),z1.jsxDEV("aside",{className:`
|
|
176
|
+
fixed inset-y-0 left-0 z-50 w-64 bg-[#0a0a0a] border-r border-[#1a1a1a] p-4 transform transition-transform duration-200 ease-in-out
|
|
177
|
+
md:relative md:w-56 md:translate-x-0 md:z-auto
|
|
178
|
+
${H?"translate-x-0":"-translate-x-full"}
|
|
179
|
+
`,children:[z1.jsxDEV("div",{className:"flex items-center justify-between mb-4 md:hidden",children:[z1.jsxDEV("div",{className:"flex items-center gap-2",children:[z1.jsxDEV("span",{className:"text-[#f97316]",children:">_"},void 0,!1,void 0,this),z1.jsxDEV("span",{className:"text-lg tracking-wider",children:"apteva"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),z1.jsxDEV("button",{onClick:R,className:"p-2 text-[#666] hover:text-[#e0e0e0] transition",children:z1.jsxDEV(Rz,{},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),z1.jsxDEV("nav",{className:"space-y-1",children:[z1.jsxDEV($5,{icon:z1.jsxDEV(MH,{},void 0,!1,void 0,this),label:"Dashboard",active:$==="dashboard",onClick:()=>L("dashboard")},void 0,!1,void 0,this),z1.jsxDEV($5,{icon:z1.jsxDEV(wH,{},void 0,!1,void 0,this),label:"Agents",active:$==="agents",onClick:()=>L("agents"),badge:U>0?String(U):void 0},void 0,!1,void 0,this),z1.jsxDEV($5,{icon:z1.jsxDEV(XL,{},void 0,!1,void 0,this),label:"Activity",active:$==="activity",onClick:()=>L("activity")},void 0,!1,void 0,this),z1.jsxDEV($5,{icon:z1.jsxDEV(w5,{},void 0,!1,void 0,this),label:"Tasks",active:$==="tasks",onClick:()=>L("tasks"),badge:B&&B>0?String(B):void 0},void 0,!1,void 0,this),z1.jsxDEV($5,{icon:z1.jsxDEV(s5,{},void 0,!1,void 0,this),label:"MCP",active:$==="mcp",onClick:()=>L("mcp")},void 0,!1,void 0,this),z1.jsxDEV($5,{icon:z1.jsxDEV(DY,{},void 0,!1,void 0,this),label:"Skills",active:$==="skills",onClick:()=>L("skills")},void 0,!1,void 0,this),z1.jsxDEV($5,{icon:z1.jsxDEV(QL,{},void 0,!1,void 0,this),label:"Connections",active:$==="connections",onClick:()=>L("connections")},void 0,!1,void 0,this),z1.jsxDEV($5,{icon:z1.jsxDEV(zL,{},void 0,!1,void 0,this),label:"Tests",active:$==="tests",onClick:()=>L("tests")},void 0,!1,void 0,this),z1.jsxDEV($5,{icon:z1.jsxDEV(sO,{},void 0,!1,void 0,this),label:"Telemetry",active:$==="telemetry",onClick:()=>L("telemetry")},void 0,!1,void 0,this),z1.jsxDEV($5,{icon:z1.jsxDEV(eO,{},void 0,!1,void 0,this),label:"API",active:$==="api",onClick:()=>L("api")},void 0,!1,void 0,this),z1.jsxDEV($5,{icon:z1.jsxDEV(AH,{},void 0,!1,void 0,this),label:"Settings",active:$==="settings",onClick:()=>L("settings")},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function $5({icon:$,label:U,active:B,onClick:W,badge:H}){return z1.jsxDEV("button",{onClick:W,className:`w-full flex items-center gap-3 px-3 py-2 rounded font-medium transition ${B?"bg-[#111] text-[#e0e0e0]":"text-[#666] hover:bg-[#111] hover:text-[#888]"}`,children:[$,U,H&&z1.jsxDEV("span",{className:"ml-auto bg-[#333] text-[#888] text-xs px-2 py-0.5 rounded-full",children:H},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var b8=Q0(u1(),1);function fY({message:$,onDismiss:U}){return b8.jsxDEV("div",{className:"bg-red-500/10 border-b border-red-500/30 px-6 py-3 text-red-400 text-sm flex items-center justify-between",children:[b8.jsxDEV("span",{children:$},void 0,!1,void 0,this),b8.jsxDEV("button",{onClick:U,className:"hover:text-red-300",children:b8.jsxDEV(Rz,{className:"w-4 h-4"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var R8=Q0(I1(),1);var O4=Q0(u1(),1);function EY(){let{login:$}=V4(),[U,B]=R8.useState(""),[W,H]=R8.useState(""),[R,L]=R8.useState(null),[b,T]=R8.useState(!1);return O4.jsxDEV("div",{className:"min-h-screen bg-[#0a0a0a] text-[#e0e0e0] font-mono flex items-center justify-center p-8",children:O4.jsxDEV("div",{className:"w-full max-w-md",children:[O4.jsxDEV("div",{className:"text-center mb-8",children:[O4.jsxDEV("div",{className:"flex items-center justify-center gap-2 mb-2",children:[O4.jsxDEV("span",{className:"text-[#f97316] text-3xl",children:">_"},void 0,!1,void 0,this),O4.jsxDEV("span",{className:"text-3xl tracking-wider",children:"apteva"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),O4.jsxDEV("p",{className:"text-[#666]",children:"Run AI agents locally"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),O4.jsxDEV("div",{className:"bg-[#111] rounded-lg border border-[#1a1a1a] p-8",children:[O4.jsxDEV("h2",{className:"text-2xl font-semibold mb-2",children:"Welcome back"},void 0,!1,void 0,this),O4.jsxDEV("p",{className:"text-[#666] mb-6",children:"Sign in to continue to apteva"},void 0,!1,void 0,this),O4.jsxDEV("form",{onSubmit:async(P)=>{P.preventDefault(),L(null),T(!0);let w=await $(U,W);if(!w.success)L(w.error||"Login failed");T(!1)},className:"space-y-4",children:[O4.jsxDEV("div",{children:[O4.jsxDEV("label",{htmlFor:"username",className:"block text-sm text-[#888] mb-1",children:"Username"},void 0,!1,void 0,this),O4.jsxDEV("input",{id:"username",type:"text",value:U,onChange:(P)=>B(P.target.value),placeholder:"Enter your username",autoFocus:!0,required:!0,className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-4 py-3 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),O4.jsxDEV("div",{children:[O4.jsxDEV("label",{htmlFor:"password",className:"block text-sm text-[#888] mb-1",children:"Password"},void 0,!1,void 0,this),O4.jsxDEV("input",{id:"password",type:"password",value:W,onChange:(P)=>H(P.target.value),placeholder:"Enter your password",required:!0,className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-4 py-3 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),R&&O4.jsxDEV("div",{className:"p-3 bg-red-500/10 border border-red-500/30 rounded text-red-400 text-sm",children:R},void 0,!1,void 0,this),O4.jsxDEV("button",{type:"submit",disabled:b||!U||!W,className:"w-full bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 disabled:cursor-not-allowed text-black px-4 py-3 rounded font-medium transition",children:b?"Signing in...":"Sign In"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}var S7=Q0(I1(),1),E1=Q0(u1(),1);function hY({onComplete:$}){let[U,B]=S7.useState(""),[W,H]=S7.useState(""),[R,L]=S7.useState(""),[b,T]=S7.useState(""),[k,P]=S7.useState(!1),[w,M]=S7.useState(null),[I,C]=S7.useState(!1);return E1.jsxDEV(E1.Fragment,{children:[E1.jsxDEV("h2",{className:"text-2xl font-semibold mb-2",children:"Create your account"},void 0,!1,void 0,this),E1.jsxDEV("p",{className:"text-[#666] mb-6",children:"Set up your admin account to get started with apteva."},void 0,!1,void 0,this),E1.jsxDEV("form",{onSubmit:async(u)=>{if(u.preventDefault(),M(null),W!==R){M("Passwords do not match");return}C(!0);try{let f=await fetch("/api/onboarding/user",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:U,password:W,...b&&{email:b}})}),i=await f.json();if(!f.ok){M(i.error||"Failed to create account"),C(!1);return}let l=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({username:U,password:W})});if(!l.ok){M("Account created but login failed. Please try logging in."),C(!1);return}let o=await l.json();if(o.accessToken)sessionStorage.setItem("accessToken",o.accessToken);$({username:U})}catch(f){M("Failed to create account"),C(!1)}},className:"space-y-4",children:[E1.jsxDEV("div",{children:[E1.jsxDEV("label",{htmlFor:"username",className:"block text-sm text-[#888] mb-1",children:"Username"},void 0,!1,void 0,this),E1.jsxDEV("input",{id:"username",type:"text",value:U,onChange:(u)=>B(u.target.value),placeholder:"Choose a username",autoFocus:!0,required:!0,className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-4 py-3 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),E1.jsxDEV("p",{className:"text-xs text-[#666] mt-1",children:"3-20 characters, letters, numbers, underscore"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),E1.jsxDEV("div",{children:[E1.jsxDEV("label",{htmlFor:"password",className:"block text-sm text-[#888] mb-1",children:"Password"},void 0,!1,void 0,this),E1.jsxDEV("input",{id:"password",type:"password",value:W,onChange:(u)=>H(u.target.value),placeholder:"Enter a password",required:!0,className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-4 py-3 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),E1.jsxDEV("p",{className:"text-xs text-[#666] mt-1",children:"Min 8 characters, uppercase, lowercase, number"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),E1.jsxDEV("div",{children:[E1.jsxDEV("label",{htmlFor:"confirmPassword",className:"block text-sm text-[#888] mb-1",children:"Confirm Password"},void 0,!1,void 0,this),E1.jsxDEV("input",{id:"confirmPassword",type:"password",value:R,onChange:(u)=>L(u.target.value),placeholder:"Confirm your password",required:!0,className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-4 py-3 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),!k?E1.jsxDEV("button",{type:"button",onClick:()=>P(!0),className:"text-sm text-[#666] hover:text-[#888] transition",children:"+ Add email for password recovery (optional)"},void 0,!1,void 0,this):E1.jsxDEV("div",{children:[E1.jsxDEV("label",{htmlFor:"email",className:"block text-sm text-[#888] mb-1",children:["Email ",E1.jsxDEV("span",{className:"text-[#666]",children:"(optional)"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),E1.jsxDEV("input",{id:"email",type:"email",value:b,onChange:(u)=>T(u.target.value),placeholder:"For password recovery only",className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-4 py-3 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),E1.jsxDEV("p",{className:"text-xs text-[#666] mt-1",children:"Only used for password recovery, never shared"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),w&&E1.jsxDEV("div",{className:"p-3 bg-red-500/10 border border-red-500/30 rounded text-red-400 text-sm",children:w},void 0,!1,void 0,this),E1.jsxDEV("button",{type:"submit",disabled:I||!U||!W||!R,className:"w-full bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 disabled:cursor-not-allowed text-black px-4 py-3 rounded font-medium transition",children:I?"Creating account...":"Create Account"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),E1.jsxDEV("p",{className:"text-xs text-[#666] mt-4 text-center",children:"This will be your admin account with full access to apteva."},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var j6=Q0(I1(),1);var W0=Q0(u1(),1);function N8({onComplete:$,needsAccount:U=!1}){let[B,W]=j6.useState(U?0:1),[H,R]=j6.useState([]),[L,b]=j6.useState(null),[T,k]=j6.useState(""),[P,w]=j6.useState(!1),[M,I]=j6.useState(!1),[C,j]=j6.useState(null),[u,f]=j6.useState(null),[i,l]=j6.useState(!1),o=()=>{let r=sessionStorage.getItem("accessToken");return r?{Authorization:`Bearer ${r}`}:{}};j6.useEffect(()=>{if(U&&!i&&B===0)return;fetch("/api/providers",{headers:o()}).then((r)=>r.json()).then((r)=>{let g=(r.providers||[]).filter((_0)=>_0.type==="llm");R(g)})},[i,B,U]);let t=H.filter((r)=>r.hasKey),c=async()=>{if(!L||!T)return;w(!0),j(null),f(null);try{I(!0);let g=await(await fetch(`/api/keys/${L}/test`,{method:"POST",headers:{"Content-Type":"application/json",...o()},body:JSON.stringify({key:T})})).json();if(I(!1),!g.valid){j(g.error||"API key is invalid"),w(!1);return}let _0=await fetch(`/api/keys/${L}`,{method:"POST",headers:{"Content-Type":"application/json",...o()},body:JSON.stringify({key:T})}),I0=await _0.json();if(!_0.ok)j(I0.error||"Failed to save key");else{f("API key saved successfully!"),k("");let Q1=await(await fetch("/api/providers",{headers:o()})).json();R(Q1.providers||[]),b(null)}}catch(r){j("Failed to save key")}w(!1)},k0=async()=>{try{let r=await fetch("/api/projects",{method:"POST",headers:{"Content-Type":"application/json",...o()},body:JSON.stringify({name:"My Project",description:"Default project for organizing agents",color:"#f97316"})});if(r.ok){let g=await r.json();if(g.project?.id)localStorage.setItem("apteva_current_project",g.project.id)}}catch(r){console.error("Failed to create default project:",r)}await fetch("/api/onboarding/complete",{method:"POST",headers:o()}),$()},s=()=>{l(!0),W(1)},N0=U?3:2,p=U?B:B-1;return W0.jsxDEV("div",{className:"min-h-screen bg-[#0a0a0a] text-[#e0e0e0] font-mono flex items-center justify-center p-8",children:W0.jsxDEV("div",{className:"w-full max-w-2xl",children:[W0.jsxDEV("div",{className:"text-center mb-8",children:[W0.jsxDEV("div",{className:"flex items-center justify-center gap-2 mb-2",children:[W0.jsxDEV("span",{className:"text-[#f97316] text-3xl",children:">_"},void 0,!1,void 0,this),W0.jsxDEV("span",{className:"text-3xl tracking-wider",children:"apteva"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),W0.jsxDEV("p",{className:"text-[#666]",children:"Run AI agents locally"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),W0.jsxDEV("div",{className:"flex items-center justify-center gap-2 mb-8",children:[U&&W0.jsxDEV(W0.Fragment,{children:[W0.jsxDEV("div",{className:`w-3 h-3 rounded-full ${B>=0?"bg-[#f97316]":"bg-[#333]"}`},void 0,!1,void 0,this),W0.jsxDEV("div",{className:`w-16 h-0.5 ${B>=1?"bg-[#f97316]":"bg-[#333]"}`},void 0,!1,void 0,this)]},void 0,!0,void 0,this),W0.jsxDEV("div",{className:`w-3 h-3 rounded-full ${B>=1?"bg-[#f97316]":"bg-[#333]"}`},void 0,!1,void 0,this),W0.jsxDEV("div",{className:`w-16 h-0.5 ${B>=2?"bg-[#f97316]":"bg-[#333]"}`},void 0,!1,void 0,this),W0.jsxDEV("div",{className:`w-3 h-3 rounded-full ${B>=2?"bg-[#f97316]":"bg-[#333]"}`},void 0,!1,void 0,this)]},void 0,!0,void 0,this),W0.jsxDEV("div",{className:"bg-[#111] rounded-lg border border-[#1a1a1a] p-8",children:[B===0&&U&&W0.jsxDEV(hY,{onComplete:s},void 0,!1,void 0,this),B===1&&W0.jsxDEV(SA,{providers:H,configuredProviders:t,selectedProvider:L,apiKey:T,saving:P,testing:M,error:C,success:u,onSelectProvider:b,onApiKeyChange:k,onSaveKey:c,onContinue:()=>W(2)},void 0,!1,void 0,this),B===2&&W0.jsxDEV(CA,{configuredProviders:t,onAddMore:()=>W(1),onComplete:k0},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function SA({providers:$,configuredProviders:U,selectedProvider:B,apiKey:W,saving:H,testing:R,error:L,success:b,onSelectProvider:T,onApiKeyChange:k,onSaveKey:P,onContinue:w}){let M=$.find((I)=>I.id===B);if(B&&M)return W0.jsxDEV(W0.Fragment,{children:[W0.jsxDEV("h2",{className:"text-2xl font-semibold mb-2",children:["Add ",M.name," Key"]},void 0,!0,void 0,this),W0.jsxDEV("p",{className:"text-[#666] mb-6",children:"Enter your API key below. It will be encrypted and stored locally."},void 0,!1,void 0,this),W0.jsxDEV("div",{className:"mb-6",children:[W0.jsxDEV("div",{className:"p-4 rounded border border-[#f97316] bg-[#f97316]/5 mb-4",children:W0.jsxDEV("div",{className:"flex items-center justify-between",children:[W0.jsxDEV("div",{children:[W0.jsxDEV("p",{className:"font-medium",children:M.name},void 0,!1,void 0,this),W0.jsxDEV("p",{className:"text-sm text-[#666]",children:[M.models.length," models available"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),W0.jsxDEV("a",{href:M.docsUrl,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-[#3b82f6] hover:underline",children:"Get API Key"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),W0.jsxDEV("div",{className:"space-y-3",children:[W0.jsxDEV("input",{type:"password",value:W,onChange:(I)=>k(I.target.value),placeholder:"Enter your API key...",autoFocus:!0,className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-4 py-3 focus:outline-none focus:border-[#f97316] text-lg"},void 0,!1,void 0,this),L&&W0.jsxDEV("p",{className:"text-red-400 text-sm",children:L},void 0,!1,void 0,this),b&&W0.jsxDEV("p",{className:"text-green-400 text-sm",children:b},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),W0.jsxDEV("div",{className:"flex gap-3",children:[W0.jsxDEV("button",{onClick:()=>{T(null),k("")},className:"flex-1 border border-[#333] hover:border-[#666] px-4 py-3 rounded font-medium transition",children:"Back"},void 0,!1,void 0,this),W0.jsxDEV("button",{onClick:P,disabled:!W||H,className:"flex-1 bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 disabled:cursor-not-allowed text-black px-4 py-3 rounded font-medium transition",children:R?"Testing...":H?"Saving...":"Save API Key"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this);return W0.jsxDEV(W0.Fragment,{children:[W0.jsxDEV("h2",{className:"text-2xl font-semibold mb-2",children:"Welcome to apteva"},void 0,!1,void 0,this),W0.jsxDEV("p",{className:"text-[#666] mb-6",children:"To get started, you'll need to add at least one AI provider API key. Your keys are encrypted and stored locally."},void 0,!1,void 0,this),W0.jsxDEV("div",{className:"space-y-3 mb-6",children:$.map((I)=>W0.jsxDEV(VA,{provider:I,selected:!1,onSelect:()=>!I.hasKey&&T(I.id)},I.id,!1,void 0,this))},void 0,!1,void 0,this),W0.jsxDEV("button",{onClick:w,disabled:U.length===0,className:"w-full bg-[#222] hover:bg-[#333] disabled:opacity-50 disabled:cursor-not-allowed px-4 py-3 rounded font-medium transition",children:U.length===0?"Add at least one API key to continue":`Continue with ${U.length} provider${U.length>1?"s":""}`},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function VA({provider:$,selected:U,onSelect:B}){return W0.jsxDEV("div",{onClick:B,className:`p-4 rounded border transition cursor-pointer ${$.hasKey?"border-green-500/30 bg-green-500/5":U?"border-[#f97316] bg-[#f97316]/5":"border-[#222] hover:border-[#333]"}`,children:W0.jsxDEV("div",{className:"flex items-center justify-between",children:[W0.jsxDEV("div",{children:[W0.jsxDEV("p",{className:"font-medium",children:$.name},void 0,!1,void 0,this),W0.jsxDEV("p",{className:"text-sm text-[#666]",children:[$.models.length," models available"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),$.hasKey?W0.jsxDEV("span",{className:"text-green-400 text-sm flex items-center gap-1",children:[W0.jsxDEV(pY,{},void 0,!1,void 0,this),"Configured (",$.keyHint,")"]},void 0,!0,void 0,this):W0.jsxDEV("a",{href:$.docsUrl,target:"_blank",rel:"noopener noreferrer",onClick:(W)=>W.stopPropagation(),className:"text-sm text-[#3b82f6] hover:underline",children:"Get API Key"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function CA({configuredProviders:$,onAddMore:U,onComplete:B}){return W0.jsxDEV(W0.Fragment,{children:[W0.jsxDEV("h2",{className:"text-2xl font-semibold mb-2",children:"You're all set!"},void 0,!1,void 0,this),W0.jsxDEV("p",{className:"text-[#666] mb-6",children:["You've configured ",$.length," provider",$.length>1?"s":"",". You can add more providers later in Settings."]},void 0,!0,void 0,this),W0.jsxDEV("div",{className:"space-y-2 mb-6",children:$.map((W)=>W0.jsxDEV("div",{className:"flex items-center gap-3 p-3 bg-[#0a0a0a] rounded",children:[W0.jsxDEV(pY,{className:"w-5 h-5 text-green-400"},void 0,!1,void 0,this),W0.jsxDEV("span",{children:W.name},void 0,!1,void 0,this),W0.jsxDEV("span",{className:"text-[#666] text-sm",children:["(",W.keyHint,")"]},void 0,!0,void 0,this)]},W.id,!0,void 0,this))},void 0,!1,void 0,this),W0.jsxDEV("div",{className:"flex gap-3",children:[W0.jsxDEV("button",{onClick:U,className:"flex-1 border border-[#333] hover:border-[#f97316] px-4 py-3 rounded font-medium transition",children:"Add More"},void 0,!1,void 0,this),W0.jsxDEV("button",{onClick:B,className:"flex-1 bg-[#f97316] hover:bg-[#fb923c] text-black px-4 py-3 rounded font-medium transition",children:"Start Using apteva"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}var r1=Q0(u1(),1),yA=[{key:"memory",icon:vQ,label:"Memory"},{key:"tasks",icon:w5,label:"Tasks"},{key:"files",icon:SQ,label:"Files"},{key:"vision",icon:kQ,label:"Vision"},{key:"operator",icon:IQ,label:"Operator"},{key:"mcp",icon:s5,label:"MCP"},{key:"realtime",icon:TQ,label:"Realtime"},{key:"agents",icon:VQ,label:"Multi-Agent"}];function uY({agent:$,selected:U,onSelect:B,onToggle:W,showProject:H}){let R=yA.filter((M)=>$.features?.[M.key]),L=$.mcpServerDetails||[],b=$.skillDetails||[],{isActive:T,type:k}=mY($.id),{projects:P}=K6(),w=$.projectId?P.find((M)=>M.id===$.projectId):null;return r1.jsxDEV("div",{onClick:B,className:`bg-[#111] rounded p-5 border transition cursor-pointer flex flex-col h-full ${U?"border-[#f97316]":"border-[#1a1a1a] hover:border-[#333]"}`,children:[r1.jsxDEV("div",{className:"flex items-start justify-between mb-3",children:[r1.jsxDEV("div",{children:[r1.jsxDEV("h3",{className:"font-semibold text-lg",children:$.name},void 0,!1,void 0,this),r1.jsxDEV("p",{className:"text-sm text-[#666]",children:[$.provider," / ",$.model,$.port&&r1.jsxDEV("span",{className:"text-[#444]",children:[" · :",$.port]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),H&&w&&r1.jsxDEV("p",{className:"text-sm text-[#666] flex items-center gap-1.5 mt-1",children:[r1.jsxDEV("span",{className:"w-2 h-2 rounded-full",style:{backgroundColor:w.color}},void 0,!1,void 0,this),w.name]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),r1.jsxDEV(fA,{status:$.status,isActive:T&&$.status==="running",activityType:k},void 0,!1,void 0,this)]},void 0,!0,void 0,this),R.length>0&&r1.jsxDEV("div",{className:"flex flex-wrap gap-1.5 mb-3",children:R.map(({key:M,icon:I,label:C})=>r1.jsxDEV("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded bg-[#f97316]/10 text-[#f97316]/70 text-xs",title:C,children:[r1.jsxDEV(I,{className:"w-3 h-3"},void 0,!1,void 0,this),C]},M,!0,void 0,this))},void 0,!1,void 0,this),L.length>0&&r1.jsxDEV("div",{className:"flex flex-wrap gap-1.5 mb-3",children:L.map((M)=>{let I=M.type==="http"&&M.url||M.status==="running";return r1.jsxDEV("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs ${I?"bg-green-500/10 text-green-400":"bg-[#222] text-[#666]"}`,title:`MCP: ${M.name} (${I?"available":M.status})`,children:[r1.jsxDEV(s5,{className:"w-3 h-3"},void 0,!1,void 0,this),M.name]},M.id,!0,void 0,this)})},void 0,!1,void 0,this),b.length>0&&r1.jsxDEV("div",{className:"flex flex-wrap gap-1.5 mb-3",children:b.map((M)=>r1.jsxDEV("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs ${M.enabled?"bg-purple-500/10 text-purple-400":"bg-[#222] text-[#666]"}`,title:`Skill: ${M.name} v${M.version}`,children:[r1.jsxDEV(DY,{className:"w-3 h-3"},void 0,!1,void 0,this),M.name]},M.id,!0,void 0,this))},void 0,!1,void 0,this),r1.jsxDEV("p",{className:"text-sm text-[#666] line-clamp-2 mb-4 flex-1",children:$.systemPrompt},void 0,!1,void 0,this),r1.jsxDEV("button",{onClick:W,disabled:$.status==="starting"||$.status==="stopping",className:`w-full px-3 py-1.5 rounded text-sm font-medium transition mt-auto ${$.status==="starting"||$.status==="stopping"?"bg-[#333] text-[#666] cursor-wait":$.status==="running"?"bg-[#f97316]/20 text-[#f97316] hover:bg-[#f97316]/30":"bg-[#3b82f6]/20 text-[#3b82f6] hover:bg-[#3b82f6]/30"}`,children:$.status==="starting"?"Starting...":$.status==="stopping"?"Stopping...":$.status==="running"?"Stop":"Start"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function fA({status:$,isActive:U,activityType:B}){if($==="running"&&U&&B)return r1.jsxDEV("span",{className:"px-2 py-1 rounded text-xs font-medium bg-green-500/20 text-green-400 animate-pulse",children:B},void 0,!1,void 0,this);return r1.jsxDEV("span",{className:`px-2 py-1 rounded text-xs font-medium ${$==="starting"||$==="stopping"?"bg-yellow-500/20 text-yellow-400 animate-pulse":$==="running"?"bg-[#3b82f6]/20 text-[#3b82f6]":"bg-[#333] text-[#666]"}`,children:$},void 0,!1,void 0,this)}var F8=Q0(I1(),1);var A0=Q0(u1(),1),EA=[{key:"memory",label:"Memory",description:"Persistent recall",icon:vQ},{key:"tasks",label:"Tasks",description:"Schedule and execute tasks",icon:w5},{key:"files",label:"Files",description:"File storage and management",icon:SQ},{key:"vision",label:"Vision",description:"Process images and PDFs",icon:kQ},{key:"operator",label:"Operator",description:"Browser automation",icon:IQ},{key:"mcp",label:"MCP",description:"External tools/services",icon:s5},{key:"realtime",label:"Realtime",description:"Voice conversations",icon:TQ},{key:"agents",label:"Multi-Agent",description:"Communicate with peer agents",icon:VQ}];function jY({form:$,providers:U,configuredProviders:B,onFormChange:W,onProviderChange:H,onCreate:R,onClose:L,onGoToSettings:b}){let{projects:T,currentProjectId:k}=K6(),P=U.find((c)=>c.id===$.provider),[w,M]=F8.default.useState([]),[I,C]=F8.default.useState(!1);F8.default.useEffect(()=>{if($.provider==="ollama")C(!0),fetch("/api/providers/ollama/models").then((c)=>c.json()).then((c)=>{if(c.models&&c.models.length>0){if(M(c.models.map((k0)=>({value:k0.value,label:k0.label||k0.value}))),!$.model&&c.models.length>0)W({...$,model:c.models[0].value})}}).catch(()=>M([])).finally(()=>C(!1))},[$.provider]);let j=B.filter((c)=>c.type==="llm").map((c)=>({value:c.id,label:c.name})),u=$.provider==="ollama"&&w.length>0?w:P?.models.map((c)=>({value:c.value,label:c.label,recommended:c.recommended}))||[],f=T.map((c)=>({value:c.id,label:c.name}));F8.default.useEffect(()=>{if($.projectId===void 0&&k&&k!=="unassigned")W({...$,projectId:k})},[k]);let i=(c)=>{if(c==="agents")if(typeof $.features.agents==="boolean"?$.features.agents:$.features.agents?.enabled??!1)W({...$,features:{...$.features,agents:!1}});else W({...$,features:{...$.features,agents:{enabled:!0,mode:"worker",group:$.projectId||void 0}}});else W({...$,features:{...$.features,[c]:!$.features[c]}})},l=()=>{let c=$.features.agents;if(typeof c==="boolean")return c;return c?.enabled??!1},o=()=>{return _z($.features,$.projectId).mode||"worker"},t=(c)=>{let k0=_z($.features,$.projectId);W({...$,features:{...$.features,agents:{...k0,enabled:!0,mode:c}}})};return A0.jsxDEV(vH,{children:[A0.jsxDEV("h2",{className:"text-xl font-semibold mb-4",children:"Create New Agent"},void 0,!1,void 0,this),j.length===0?A0.jsxDEV(hA,{onGoToSettings:b},void 0,!1,void 0,this):A0.jsxDEV(A0.Fragment,{children:[A0.jsxDEV("div",{className:"space-y-4",children:[A0.jsxDEV(V7,{label:"Name",children:A0.jsxDEV("input",{type:"text",value:$.name,onChange:(c)=>W({...$,name:c.target.value}),className:"w-full bg-[#0a0a0a] border border-[#222] rounded px-3 py-2 focus:outline-none focus:border-[#f97316] text-[#e0e0e0]",placeholder:"My Agent"},void 0,!1,void 0,this)},void 0,!1,void 0,this),T.length>0&&A0.jsxDEV(V7,{label:"Project",children:A0.jsxDEV(C7,{value:$.projectId||"",options:f,onChange:(c)=>W({...$,projectId:c||null}),placeholder:"Select project..."},void 0,!1,void 0,this)},void 0,!1,void 0,this),A0.jsxDEV(V7,{label:"Provider",children:A0.jsxDEV(C7,{value:$.provider,options:j,onChange:H,placeholder:"Select provider..."},void 0,!1,void 0,this)},void 0,!1,void 0,this),A0.jsxDEV(V7,{label:"Model",children:I?A0.jsxDEV("div",{className:"text-sm text-[#666] py-2",children:"Loading Ollama models..."},void 0,!1,void 0,this):$.provider==="ollama"&&u.length===0?A0.jsxDEV("div",{className:"text-sm text-yellow-400/80 py-2",children:["No models found. Run ",A0.jsxDEV("code",{className:"bg-[#1a1a1a] px-1 rounded",children:"ollama pull llama3.3"},void 0,!1,void 0,this)," to download a model."]},void 0,!0,void 0,this):A0.jsxDEV(C7,{value:$.model,options:u,onChange:(c)=>W({...$,model:c}),placeholder:"Select model..."},void 0,!1,void 0,this)},void 0,!1,void 0,this),A0.jsxDEV(V7,{label:"System Prompt",children:A0.jsxDEV("textarea",{value:$.systemPrompt,onChange:(c)=>W({...$,systemPrompt:c.target.value}),className:"w-full bg-[#0a0a0a] border border-[#222] rounded px-3 py-2 h-24 resize-none focus:outline-none focus:border-[#f97316] text-[#e0e0e0]"},void 0,!1,void 0,this)},void 0,!1,void 0,this),A0.jsxDEV(V7,{label:"Features",children:A0.jsxDEV("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:EA.map(({key:c,label:k0,description:s,icon:N0})=>{let p=c==="agents"?l():!!$.features[c];return A0.jsxDEV("button",{type:"button",onClick:()=>i(c),className:`flex items-center gap-3 p-3 rounded border text-left transition ${p?"border-[#f97316] bg-[#f97316]/10":"border-[#222] hover:border-[#333]"}`,children:[A0.jsxDEV(N0,{className:`w-5 h-5 flex-shrink-0 ${p?"text-[#f97316]":"text-[#666]"}`},void 0,!1,void 0,this),A0.jsxDEV("div",{className:"flex-1 min-w-0",children:[A0.jsxDEV("div",{className:`text-sm font-medium ${p?"text-[#f97316]":""}`,children:k0},void 0,!1,void 0,this),A0.jsxDEV("div",{className:"text-xs text-[#666]",children:s},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},c,!0,void 0,this)})},void 0,!1,void 0,this)},void 0,!1,void 0,this),l()&&A0.jsxDEV(V7,{label:"Multi-Agent Mode",children:[A0.jsxDEV("div",{className:"flex gap-2",children:[A0.jsxDEV("button",{type:"button",onClick:()=>t("coordinator"),className:`flex-1 p-3 rounded border text-left transition ${o()==="coordinator"?"border-[#f97316] bg-[#f97316]/10":"border-[#222] hover:border-[#333]"}`,children:[A0.jsxDEV("div",{className:`text-sm font-medium ${o()==="coordinator"?"text-[#f97316]":""}`,children:"Coordinator"},void 0,!1,void 0,this),A0.jsxDEV("div",{className:"text-xs text-[#666]",children:"Orchestrates and delegates"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),A0.jsxDEV("button",{type:"button",onClick:()=>t("worker"),className:`flex-1 p-3 rounded border text-left transition ${o()==="worker"?"border-[#f97316] bg-[#f97316]/10":"border-[#222] hover:border-[#333]"}`,children:[A0.jsxDEV("div",{className:`text-sm font-medium ${o()==="worker"?"text-[#f97316]":""}`,children:"Worker"},void 0,!1,void 0,this),A0.jsxDEV("div",{className:"text-xs text-[#666]",children:"Receives delegated tasks"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),$.projectId&&A0.jsxDEV("p",{className:"text-xs text-[#555] mt-2",children:"Group: Using project as agent group"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),$.provider==="anthropic"&&A0.jsxDEV(V7,{label:"Agent Built-in Tools",children:[A0.jsxDEV("div",{className:"flex flex-wrap gap-2",children:[A0.jsxDEV("button",{type:"button",onClick:()=>W({...$,features:{...$.features,builtinTools:{...$.features.builtinTools,webSearch:!$.features.builtinTools?.webSearch}}}),className:`flex items-center gap-2 px-3 py-2 rounded border transition ${$.features.builtinTools?.webSearch?"border-[#f97316] bg-[#f97316]/10 text-[#f97316]":"border-[#222] hover:border-[#333] text-[#888]"}`,children:[A0.jsxDEV("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:A0.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"},void 0,!1,void 0,this)},void 0,!1,void 0,this),A0.jsxDEV("span",{className:"text-sm",children:"Web Search"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),A0.jsxDEV("button",{type:"button",onClick:()=>W({...$,features:{...$.features,builtinTools:{...$.features.builtinTools,webFetch:!$.features.builtinTools?.webFetch}}}),className:`flex items-center gap-2 px-3 py-2 rounded border transition ${$.features.builtinTools?.webFetch?"border-[#f97316] bg-[#f97316]/10 text-[#f97316]":"border-[#222] hover:border-[#333] text-[#888]"}`,children:[A0.jsxDEV("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:A0.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"},void 0,!1,void 0,this)},void 0,!1,void 0,this),A0.jsxDEV("span",{className:"text-sm",children:"Web Fetch"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),A0.jsxDEV("p",{className:"text-xs text-[#555] mt-2",children:"Provider-native tools for real-time web access"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),A0.jsxDEV("div",{className:"flex gap-3 mt-6",children:[A0.jsxDEV("button",{onClick:L,className:"flex-1 border border-[#333] hover:border-[#f97316] hover:text-[#f97316] px-4 py-2 rounded font-medium transition",children:"Cancel"},void 0,!1,void 0,this),A0.jsxDEV("button",{onClick:R,disabled:!$.name,className:"flex-1 bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 text-black px-4 py-2 rounded font-medium transition",children:"Create"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function V7({label:$,children:U}){return A0.jsxDEV("div",{children:[A0.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:$},void 0,!1,void 0,this),U]},void 0,!0,void 0,this)}function hA({onGoToSettings:$}){return A0.jsxDEV("div",{className:"text-center py-6",children:[A0.jsxDEV("p",{className:"text-[#666] mb-4",children:"No API keys configured. Add a provider key first."},void 0,!1,void 0,this),A0.jsxDEV("button",{onClick:$,className:"bg-[#f97316] hover:bg-[#fb923c] text-black px-4 py-2 rounded font-medium transition",children:"Go to Settings"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var x0=Q0(I1(),1);var F=Q0(u1(),1),pA=[{key:"memory",label:"Memory",description:"Persistent recall",icon:vQ},{key:"tasks",label:"Tasks",description:"Schedule and execute tasks",icon:w5},{key:"files",label:"Files",description:"File storage and management",icon:SQ},{key:"vision",label:"Vision",description:"Process images and PDFs",icon:kQ},{key:"operator",label:"Operator",description:"Browser automation",icon:IQ},{key:"mcp",label:"MCP",description:"External tools/services",icon:s5},{key:"realtime",label:"Realtime",description:"Voice conversations",icon:TQ},{key:"agents",label:"Multi-Agent",description:"Communicate with peer agents",icon:VQ}];function xY({agent:$,providers:U,onClose:B,onStartAgent:W,onUpdateAgent:H,onDeleteAgent:R}){let[L,b]=x0.useState("chat");return F.jsxDEV("div",{className:"w-full h-full flex flex-col overflow-hidden bg-[#0a0a0a] border-l border-[#1a1a1a]",children:[F.jsxDEV("div",{className:"border-b border-[#1a1a1a] flex items-center",children:[F.jsxDEV("div",{className:"flex-1 overflow-x-auto scrollbar-hide px-2 md:px-4",children:F.jsxDEV("div",{className:"flex gap-1",children:[F.jsxDEV(CQ,{active:L==="chat",onClick:()=>b("chat"),children:"Chat"},void 0,!1,void 0,this),F.jsxDEV(CQ,{active:L==="threads",onClick:()=>b("threads"),children:"Threads"},void 0,!1,void 0,this),F.jsxDEV(CQ,{active:L==="tasks",onClick:()=>b("tasks"),children:"Tasks"},void 0,!1,void 0,this),F.jsxDEV(CQ,{active:L==="memory",onClick:()=>b("memory"),children:"Memory"},void 0,!1,void 0,this),F.jsxDEV(CQ,{active:L==="files",onClick:()=>b("files"),children:"Files"},void 0,!1,void 0,this),F.jsxDEV(CQ,{active:L==="settings",onClick:()=>b("settings"),children:"Settings"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),F.jsxDEV("button",{onClick:B,className:"text-[#666] hover:text-[#e0e0e0] transition p-2 flex-shrink-0 mr-2",children:F.jsxDEV(Rz,{},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),F.jsxDEV("div",{className:"flex-1 min-h-0 flex flex-col overflow-hidden",children:[L==="chat"&&F.jsxDEV(mA,{agent:$,onStartAgent:W},void 0,!1,void 0,this),L==="threads"&&F.jsxDEV(uA,{agent:$},void 0,!1,void 0,this),L==="tasks"&&F.jsxDEV(jA,{agent:$},void 0,!1,void 0,this),L==="memory"&&F.jsxDEV(gA,{agent:$},void 0,!1,void 0,this),L==="files"&&F.jsxDEV(xA,{agent:$},void 0,!1,void 0,this),L==="settings"&&F.jsxDEV(cA,{agent:$,providers:U,onUpdateAgent:H,onDeleteAgent:R},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function CQ({active:$,onClick:U,children:B}){return F.jsxDEV("button",{onClick:U,className:`px-4 py-3 text-sm font-medium border-b-2 transition ${$?"border-[#f97316] text-[#e0e0e0]":"border-transparent text-[#666] hover:text-[#888]"}`,children:B},void 0,!1,void 0,this)}function mA({agent:$,onStartAgent:U}){if($.status==="running"&&$.port)return F.jsxDEV(W8,{agentId:"default",apiUrl:`/api/agents/${$.id}`,placeholder:"Message this agent...",context:$.systemPrompt,variant:"terminal",headerTitle:$.name},void 0,!1,void 0,this);return F.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:F.jsxDEV("div",{className:"text-center",children:[F.jsxDEV("p",{className:"text-lg mb-2",children:"Agent is not running"},void 0,!1,void 0,this),F.jsxDEV("button",{onClick:U,className:"bg-[#3b82f6]/20 text-[#3b82f6] hover:bg-[#3b82f6]/30 px-4 py-2 rounded font-medium transition",children:"Start Agent"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function uA({agent:$}){let[U,B]=x0.useState([]),[W,H]=x0.useState(!0),[R,L]=x0.useState(null),[b,T]=x0.useState(null),[k,P]=x0.useState([]),[w,M]=x0.useState(!1),{confirm:I,ConfirmDialog:C}=gY();x0.useEffect(()=>{B([]),T(null),L(null),H(!0)},[$.id]),x0.useEffect(()=>{if($.status!=="running"){H(!1);return}(async()=>{try{let i=await fetch(`/api/agents/${$.id}/threads`);if(!i.ok)throw Error("Failed to fetch threads");let l=await i.json();B(l.threads||[]),L(null)}catch(i){L(i instanceof Error?i.message:"Failed to load threads")}finally{H(!1)}})()},[$.id,$.status]);let j=async(f)=>{M(!0),T(f);try{let i=await fetch(`/api/agents/${$.id}/threads/${f}/messages`);if(i.ok){let o=((await i.json()).messages||[]).filter((t)=>typeof t.content==="string").map((t)=>({id:t.id,role:t.role,content:t.content,timestamp:new Date(t.created_at)}));P(o)}else P([])}catch{P([])}M(!1)},u=async(f,i)=>{if(i.stopPropagation(),!await I("Delete this thread?",{confirmText:"Delete",title:"Delete Thread"}))return;try{if(await fetch(`/api/agents/${$.id}/threads/${f}`,{method:"DELETE"}),B((o)=>o.filter((t)=>t.id!==f)),b===f)T(null)}catch{}};if($.status!=="running")return F.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:F.jsxDEV("p",{children:"Start the agent to view threads"},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(W)return F.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:F.jsxDEV("p",{children:"Loading threads..."},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(R)return F.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-red-400",children:F.jsxDEV("p",{children:R},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(b){let f=U.find((i)=>i.id===b);return F.jsxDEV(F.Fragment,{children:[C,F.jsxDEV("div",{className:"flex-1 flex flex-col overflow-hidden",children:[F.jsxDEV("div",{className:"flex items-center gap-3 px-4 py-2 border-b border-[#1a1a1a] flex-shrink-0",children:[F.jsxDEV("button",{onClick:()=>{T(null),P([])},className:"text-[#666] hover:text-[#e0e0e0] transition text-lg",children:"←"},void 0,!1,void 0,this),F.jsxDEV("div",{className:"flex-1 min-w-0",children:[F.jsxDEV("p",{className:"text-sm font-medium truncate",children:f?.title||`Thread ${b.slice(0,8)}`},void 0,!1,void 0,this),F.jsxDEV("p",{className:"text-xs text-[#666]",children:f&&new Date(f.updated_at||f.created_at).toLocaleString()},void 0,!1,void 0,this)]},void 0,!0,void 0,this),F.jsxDEV("button",{onClick:(i)=>u(b,i),className:"text-[#666] hover:text-red-400 text-sm px-2 py-1",children:"Delete"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),w?F.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:"Loading messages..."},void 0,!1,void 0,this):F.jsxDEV(W8,{agentId:"default",apiUrl:`/api/agents/${$.id}`,threadId:b,initialMessages:k,placeholder:"Continue this conversation...",context:$.systemPrompt,variant:"terminal",showHeader:!1},b,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}return F.jsxDEV(F.Fragment,{children:[C,F.jsxDEV("div",{className:"flex-1 overflow-auto",children:U.length===0?F.jsxDEV("div",{className:"flex items-center justify-center h-full text-[#666]",children:F.jsxDEV("p",{children:"No conversation threads yet"},void 0,!1,void 0,this)},void 0,!1,void 0,this):F.jsxDEV("div",{className:"divide-y divide-[#1a1a1a]",children:U.map((f)=>F.jsxDEV("div",{onClick:()=>j(f.id),className:"p-4 cursor-pointer hover:bg-[#111] transition flex items-center justify-between",children:[F.jsxDEV("div",{className:"flex-1 min-w-0",children:[F.jsxDEV("p",{className:"text-sm font-medium truncate",children:f.title||`Thread ${f.id.slice(0,8)}`},void 0,!1,void 0,this),F.jsxDEV("p",{className:"text-xs text-[#666] mt-1",children:[new Date(f.updated_at||f.created_at).toLocaleString(),f.message_count!==void 0&&` • ${f.message_count} messages`]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),F.jsxDEV("button",{onClick:(i)=>u(f.id,i),className:"text-[#666] hover:text-red-400 text-lg ml-4",children:"×"},void 0,!1,void 0,this)]},f.id,!0,void 0,this))},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function jA({agent:$}){let[U,B]=x0.useState([]),[W,H]=x0.useState(!0),[R,L]=x0.useState(null),[b,T]=x0.useState("all"),{events:k}=ZL({agent_id:$.id,category:"task"});x0.useEffect(()=>{B([]),L(null),H(!0)},[$.id]);let P=async()=>{if($.status!=="running"){H(!1);return}try{let I=await fetch(`/api/agents/${$.id}/tasks?status=${b}`);if(!I.ok)throw Error("Failed to fetch tasks");let C=await I.json();B(C.tasks||[]),L(null)}catch(I){L(I instanceof Error?I.message:"Failed to load tasks")}finally{H(!1)}};x0.useEffect(()=>{H(!0),P()},[$.id,$.status,b,k.length]);let w={pending:"bg-yellow-500/20 text-yellow-400",running:"bg-blue-500/20 text-blue-400",completed:"bg-green-500/20 text-green-400",failed:"bg-red-500/20 text-red-400",cancelled:"bg-gray-500/20 text-gray-400"};if($.status!=="running")return F.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:F.jsxDEV("p",{children:"Start the agent to view tasks"},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(!$.features?.tasks)return F.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:F.jsxDEV("div",{className:"text-center",children:[F.jsxDEV("p",{className:"mb-2",children:"Tasks feature is not enabled"},void 0,!1,void 0,this),F.jsxDEV("p",{className:"text-sm",children:"Enable it in Settings to schedule tasks"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this);if(W)return F.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:F.jsxDEV("p",{children:"Loading tasks..."},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(R)return F.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-red-400",children:F.jsxDEV("p",{children:R},void 0,!1,void 0,this)},void 0,!1,void 0,this);return F.jsxDEV("div",{className:"flex-1 overflow-auto p-4",children:[F.jsxDEV("div",{className:"flex gap-2 mb-4",children:[{value:"all",label:"All"},{value:"pending",label:"Pending"},{value:"running",label:"Running"},{value:"completed",label:"Completed"},{value:"failed",label:"Failed"}].map((I)=>F.jsxDEV("button",{onClick:()=>T(I.value),className:`px-3 py-1.5 rounded text-sm transition ${b===I.value?"bg-[#f97316] text-black":"bg-[#1a1a1a] hover:bg-[#222]"}`,children:I.label},I.value,!1,void 0,this))},void 0,!1,void 0,this),U.length===0?F.jsxDEV("div",{className:"text-center py-10",children:[F.jsxDEV(w5,{className:"w-10 h-10 mx-auto mb-3 text-[#333]"},void 0,!1,void 0,this),F.jsxDEV("p",{className:"text-[#666]",children:["No ",b==="all"?"":b+" ","tasks"]},void 0,!0,void 0,this),F.jsxDEV("p",{className:"text-sm text-[#444] mt-1",children:"Tasks will appear here when created"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):F.jsxDEV("div",{className:"space-y-3",children:U.map((I)=>F.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4",children:[F.jsxDEV("div",{className:"flex items-start justify-between mb-2",children:[F.jsxDEV("div",{className:"flex-1 min-w-0",children:F.jsxDEV("h3",{className:"font-medium",children:I.title||I.name},void 0,!1,void 0,this)},void 0,!1,void 0,this),F.jsxDEV("span",{className:`px-2 py-1 rounded text-xs font-medium ml-2 ${w[I.status]||w.pending}`,children:I.status},void 0,!1,void 0,this)]},void 0,!0,void 0,this),I.description&&F.jsxDEV("p",{className:"text-sm text-[#888] mb-2 line-clamp-2",children:I.description},void 0,!1,void 0,this),F.jsxDEV("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-[#555]",children:[F.jsxDEV("span",{className:"flex items-center gap-1",children:[I.type==="recurring"?F.jsxDEV(YL,{className:"w-3.5 h-3.5"},void 0,!1,void 0,this):I.execute_at?F.jsxDEV(JL,{className:"w-3.5 h-3.5"},void 0,!1,void 0,this):F.jsxDEV($L,{className:"w-3.5 h-3.5"},void 0,!1,void 0,this),I.type==="recurring"&&I.recurrence?qL(I.recurrence):I.type||"once"]},void 0,!0,void 0,this),I.priority!==void 0&&F.jsxDEV("span",{children:["Priority: ",I.priority]},void 0,!0,void 0,this),I.next_run&&F.jsxDEV("span",{className:"text-[#f97316]",children:kH(I.next_run)},void 0,!1,void 0,this),!I.next_run&&I.execute_at&&F.jsxDEV("span",{className:"text-[#f97316]",children:kH(I.execute_at)},void 0,!1,void 0,this),F.jsxDEV("span",{children:["Created: ",new Date(I.created_at).toLocaleDateString()]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),I.status==="completed"&&I.result&&F.jsxDEV("div",{className:"mt-3 bg-green-500/10 border border-green-500/20 rounded p-3",children:[F.jsxDEV("h4",{className:"text-xs text-green-400 uppercase tracking-wider mb-1",children:"Result"},void 0,!1,void 0,this),F.jsxDEV("pre",{className:"text-sm text-green-400 whitespace-pre-wrap break-words",children:typeof I.result==="string"?I.result:JSON.stringify(I.result,null,2)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),I.status==="failed"&&I.error&&F.jsxDEV("div",{className:"mt-3 bg-red-500/10 border border-red-500/20 rounded p-3",children:[F.jsxDEV("h4",{className:"text-xs text-red-400 uppercase tracking-wider mb-1",children:"Error"},void 0,!1,void 0,this),F.jsxDEV("pre",{className:"text-sm text-red-400 whitespace-pre-wrap break-words",children:I.error},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},I.id,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function gA({agent:$}){let[U,B]=x0.useState([]),[W,H]=x0.useState(!0),[R,L]=x0.useState(null),[b,T]=x0.useState(!1),{confirm:k,ConfirmDialog:P}=gY();x0.useEffect(()=>{B([]),L(null),H(!0)},[$.id]);let w=async()=>{if($.status!=="running"){H(!1);return}try{let C=await fetch(`/api/agents/${$.id}/memories`);if(!C.ok)throw Error("Failed to fetch memories");let j=await C.json();B(j.memories||[]),T(j.enabled??!1),L(null)}catch(C){L(C instanceof Error?C.message:"Failed to load memories")}finally{H(!1)}};x0.useEffect(()=>{w()},[$.id,$.status]);let M=async(C)=>{try{await fetch(`/api/agents/${$.id}/memories/${C}`,{method:"DELETE"}),B((j)=>j.filter((u)=>u.id!==C))}catch{}},I=async()=>{if(!await k("Clear all memories?",{confirmText:"Clear",title:"Clear Memories"}))return;try{await fetch(`/api/agents/${$.id}/memories`,{method:"DELETE"}),B([])}catch{}};if(!$.features?.memory)return F.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:F.jsxDEV("div",{className:"text-center",children:[F.jsxDEV("p",{className:"mb-2",children:"Memory feature is not enabled"},void 0,!1,void 0,this),F.jsxDEV("p",{className:"text-sm",children:"Enable it in Settings to persist knowledge"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this);if($.status!=="running")return F.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:F.jsxDEV("p",{children:"Start the agent to view memories"},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(W)return F.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:F.jsxDEV("p",{children:"Loading memories..."},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(R)return F.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-red-400",children:F.jsxDEV("p",{children:R},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(!b)return F.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:F.jsxDEV("div",{className:"text-center",children:[F.jsxDEV("p",{className:"mb-2",children:"Memory system not initialized"},void 0,!1,void 0,this),F.jsxDEV("p",{className:"text-sm",children:"Check OPENAI_API_KEY for embeddings"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this);return F.jsxDEV(F.Fragment,{children:[P,F.jsxDEV("div",{className:"flex-1 overflow-auto p-4",children:[F.jsxDEV("div",{className:"flex items-center justify-between mb-4",children:[F.jsxDEV("h3",{className:"text-sm font-medium text-[#888]",children:["Stored Memories (",U.length,")"]},void 0,!0,void 0,this),U.length>0&&F.jsxDEV("button",{onClick:I,className:"text-xs text-red-400 hover:text-red-300",children:"Clear All"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),U.length===0?F.jsxDEV("div",{className:"text-center py-10 text-[#666]",children:[F.jsxDEV("p",{children:"No memories stored yet"},void 0,!1,void 0,this),F.jsxDEV("p",{className:"text-sm mt-1",children:"The agent will remember important information from conversations"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):F.jsxDEV("div",{className:"space-y-3",children:U.map((C)=>F.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded p-3",children:[F.jsxDEV("div",{className:"flex items-start justify-between gap-2",children:[F.jsxDEV("p",{className:"text-sm text-[#e0e0e0] flex-1",children:C.content},void 0,!1,void 0,this),F.jsxDEV("button",{onClick:()=>M(C.id),className:"text-[#666] hover:text-red-400 text-sm flex-shrink-0",children:"×"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),F.jsxDEV("div",{className:"flex items-center gap-3 mt-2",children:[F.jsxDEV("span",{className:`text-xs px-2 py-0.5 rounded ${C.type==="preference"?"bg-purple-500/20 text-purple-400":C.type==="fact"?"bg-green-500/20 text-green-400":"bg-blue-500/20 text-blue-400"}`,children:C.type},void 0,!1,void 0,this),F.jsxDEV("span",{className:"text-xs text-[#666]",children:new Date(C.created_at).toLocaleString()},void 0,!1,void 0,this),C.importance&&F.jsxDEV("span",{className:"text-xs text-[#555]",children:["importance: ",C.importance.toFixed(1)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},C.id,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function xA({agent:$}){let[U,B]=x0.useState([]),[W,H]=x0.useState(!0),[R,L]=x0.useState(null),[b,T]=x0.useState(!1),[k,P]=x0.useState(null),[w,M]=x0.useState(!1),I=x0.default.useRef(null),{confirm:C,ConfirmDialog:j}=gY();x0.useEffect(()=>{B([]),L(null),H(!0)},[$.id]);let u=async()=>{if($.status!=="running"){H(!1);return}try{let p=await fetch(`/api/agents/${$.id}/files`);if(!p.ok)throw Error("Failed to fetch files");let r=await p.json();B(r.files||[]),L(null)}catch(p){L(p instanceof Error?p.message:"Failed to load files")}finally{H(!1)}};x0.useEffect(()=>{u()},[$.id,$.status]);let f=async(p)=>{if(!await C("Delete this file?",{confirmText:"Delete",title:"Delete File"}))return;try{await fetch(`/api/agents/${$.id}/files/${p}`,{method:"DELETE"}),B((g)=>g.filter((_0)=>_0.id!==p))}catch{}},i=(p,r)=>{let g=document.createElement("a");g.href=`/api/agents/${$.id}/files/${p}/download`,g.download=r,g.click()},l=(p)=>{if(p<1024)return`${p} B`;if(p<1048576)return`${(p/1024).toFixed(1)} KB`;return`${(p/1048576).toFixed(1)} MB`},o=async(p)=>{T(!0),P(null);try{let r=new FormData;r.append("file",p);let g=await fetch(`/api/agents/${$.id}/files`,{method:"POST",body:r});if(!g.ok){let _0=await g.json();throw Error(_0.error||"Upload failed")}await u()}catch(r){P(r instanceof Error?r.message:"Upload failed")}finally{T(!1)}},t=(p)=>{let r=p.target.files?.[0];if(r)o(r);p.target.value=""},c=(p)=>{p.preventDefault(),M(!1);let r=p.dataTransfer.files?.[0];if(r)o(r)},k0=(p)=>{p.preventDefault(),M(!0)},s=(p)=>{p.preventDefault(),M(!1)},N0=(p)=>{if(p.startsWith("image/"))return"\uD83D\uDDBC";if(p.includes("pdf"))return"\uD83D\uDCD5";if(p.includes("json"))return"{}";if(p.includes("javascript")||p.includes("typescript"))return"⚡";if(p.startsWith("text/"))return"\uD83D\uDCC4";if(p.startsWith("audio/"))return"\uD83C\uDFB5";if(p.startsWith("video/"))return"\uD83C\uDFAC";return"\uD83D\uDCC1"};if(!$.features?.files)return F.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:F.jsxDEV("div",{className:"text-center",children:[F.jsxDEV("p",{className:"mb-2",children:"Files feature is not enabled"},void 0,!1,void 0,this),F.jsxDEV("p",{className:"text-sm",children:"Enable it in Settings to manage files"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this);if($.status!=="running")return F.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:F.jsxDEV("p",{children:"Start the agent to view files"},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(W)return F.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:F.jsxDEV("p",{children:"Loading files..."},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(R)return F.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-red-400",children:F.jsxDEV("p",{children:R},void 0,!1,void 0,this)},void 0,!1,void 0,this);return F.jsxDEV(F.Fragment,{children:[j,F.jsxDEV("div",{className:`flex-1 overflow-auto p-4 transition ${w?"bg-[#f97316]/5":""}`,onDrop:c,onDragOver:k0,onDragLeave:s,children:[F.jsxDEV("input",{ref:I,type:"file",className:"hidden",onChange:t},void 0,!1,void 0,this),F.jsxDEV("div",{className:"flex items-center justify-between mb-4",children:[F.jsxDEV("h3",{className:"text-sm font-medium text-[#888]",children:["Agent Files (",U.length,")"]},void 0,!0,void 0,this),F.jsxDEV("div",{className:"flex items-center gap-2",children:[F.jsxDEV("button",{onClick:()=>I.current?.click(),disabled:b,className:"text-xs bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 text-black px-3 py-1 rounded font-medium transition",children:b?"Uploading...":"Upload"},void 0,!1,void 0,this),F.jsxDEV("button",{onClick:u,className:"text-xs text-[#666] hover:text-[#888]",children:"Refresh"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),k&&F.jsxDEV("div",{className:"mb-4 text-sm bg-red-500/10 text-red-400 px-3 py-2 rounded",children:k},void 0,!1,void 0,this),w&&F.jsxDEV("div",{className:"mb-4 border-2 border-dashed border-[#f97316] rounded-lg p-8 text-center",children:F.jsxDEV("p",{className:"text-[#f97316]",children:"Drop file to upload"},void 0,!1,void 0,this)},void 0,!1,void 0,this),U.length===0&&!w&&F.jsxDEV("div",{className:"text-center py-10 text-[#666]",children:[F.jsxDEV("p",{children:"No files stored yet"},void 0,!1,void 0,this),F.jsxDEV("p",{className:"text-sm mt-1",children:"Drop files here, click Upload, or attach files in Chat"},void 0,!1,void 0,this),$.features?.memory&&F.jsxDEV("p",{className:"text-xs mt-2 text-[#555]",children:"Files will be auto-ingested into memory"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),U.length>0&&F.jsxDEV("div",{className:"space-y-2",children:U.map((p)=>F.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded p-3 flex items-center gap-3",children:[F.jsxDEV("div",{className:"w-10 h-10 bg-[#1a1a1a] rounded flex items-center justify-center text-[#666]",children:N0(p.mime_type)},void 0,!1,void 0,this),F.jsxDEV("div",{className:"flex-1 min-w-0",children:[F.jsxDEV("p",{className:"text-sm text-[#e0e0e0] truncate",children:p.filename},void 0,!1,void 0,this),F.jsxDEV("p",{className:"text-xs text-[#666]",children:[l(p.size_bytes)," • ",new Date(p.created_at).toLocaleString(),p.source&&p.source!=="upload"&&` • ${p.source}`]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),F.jsxDEV("div",{className:"flex items-center gap-2",children:[F.jsxDEV("button",{onClick:()=>i(p.id,p.filename),className:"text-xs text-[#666] hover:text-[#f97316] px-2 py-1",children:"↓"},void 0,!1,void 0,this),F.jsxDEV("button",{onClick:()=>f(p.id),className:"text-[#666] hover:text-red-400 text-sm",children:"×"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},p.id,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function cA({agent:$,providers:U,onUpdateAgent:B,onDeleteAgent:W}){let{authFetch:H,isDev:R}=V4(),[L,b]=x0.useState({name:$.name,provider:$.provider,model:$.model,systemPrompt:$.systemPrompt,features:{...$.features,builtinTools:$.features.builtinTools||{webSearch:!1,webFetch:!1}},mcpServers:[...$.mcpServers||[]],skills:[...$.skills||[]]}),[T,k]=x0.useState(!1),[P,w]=x0.useState(!1),[M,I]=x0.useState(null),[C,j]=x0.useState([]),[u,f]=x0.useState([]),[i,l]=x0.useState(null),[o,t]=x0.useState(!1);x0.useEffect(()=>{(async()=>{try{let B0=await(await H("/api/mcp/servers")).json();j(B0.servers||[])}catch(O0){console.error("Failed to fetch MCP servers:",O0)}})()},[H]),x0.useEffect(()=>{if(!R)return;(async()=>{try{let O0=await H(`/api/agents/${$.id}/api-key`);if(O0.ok){let B0=await O0.json();l(B0.apiKey)}}catch(O0){}})()},[$.id,R,H]),x0.useEffect(()=>{(async()=>{try{let B0=await(await H("/api/skills")).json();f(B0.skills||[])}catch(O0){console.error("Failed to fetch skills:",O0)}})()},[H]),x0.useEffect(()=>{b({name:$.name,provider:$.provider,model:$.model,systemPrompt:$.systemPrompt,features:{...$.features,builtinTools:$.features.builtinTools||{webSearch:!1,webFetch:!1}},mcpServers:[...$.mcpServers||[]],skills:[...$.skills||[]]}),I(null)},[$.id]);let c=U.find((d)=>d.id===L.provider),k0=U.filter((d)=>d.hasKey&&d.type==="llm").map((d)=>({value:d.id,label:d.name})),s=c?.models.map((d)=>({value:d.value,label:d.label,recommended:d.recommended}))||[],N0=(d)=>{let O0=U.find((p0)=>p0.id===d),B0=O0?.models.find((p0)=>p0.recommended)?.value||O0?.models[0]?.value||"";b((p0)=>({...p0,provider:d,model:B0}))},p=(d)=>{if(d==="agents"){let O0=(B0)=>{return _z(B0.features,$.projectId).enabled};b((B0)=>{if(typeof B0.features.agents==="boolean"?B0.features.agents:B0.features.agents?.enabled??!1)return{...B0,features:{...B0.features,agents:!1}};else return{...B0,features:{...B0.features,agents:{enabled:!0,mode:"worker",group:$.projectId||void 0}}}})}else b((O0)=>({...O0,features:{...O0.features,[d]:!O0.features[d]}}))},r=(d)=>{b((O0)=>{let B0=_z(O0.features,$.projectId);return{...O0,features:{...O0.features,agents:{...B0,enabled:!0,mode:d}}}})},g=()=>{let d=L.features.agents;if(typeof d==="boolean")return d;return d?.enabled??!1},_0=()=>{return _z(L.features,$.projectId).mode||"worker"},I0=(d)=>{b((O0)=>({...O0,mcpServers:O0.mcpServers.includes(d)?O0.mcpServers.filter((B0)=>B0!==d):[...O0.mcpServers,d]}))},b1=(d)=>{b((O0)=>({...O0,skills:O0.skills.includes(d)?O0.skills.filter((B0)=>B0!==d):[...O0.skills,d]}))},Q1=async()=>{k(!0),I(null);let d=await B(L);if(k(!1),d.error)I({type:"error",text:d.error});else I({type:"success",text:"Settings saved"}),setTimeout(()=>I(null),2000)},n1=L.name!==$.name||L.provider!==$.provider||L.model!==$.model||L.systemPrompt!==$.systemPrompt||JSON.stringify(L.features)!==JSON.stringify($.features)||JSON.stringify(L.mcpServers.sort())!==JSON.stringify(($.mcpServers||[]).sort())||JSON.stringify(L.skills.sort())!==JSON.stringify(($.skills||[]).sort());return F.jsxDEV("div",{className:"flex-1 overflow-auto p-4",children:F.jsxDEV("div",{className:"space-y-4",children:[F.jsxDEV(e5,{label:"Name",children:F.jsxDEV("input",{type:"text",value:L.name,onChange:(d)=>b((O0)=>({...O0,name:d.target.value})),className:"w-full bg-[#0a0a0a] border border-[#222] rounded px-3 py-2 focus:outline-none focus:border-[#f97316] text-[#e0e0e0]"},void 0,!1,void 0,this)},void 0,!1,void 0,this),F.jsxDEV(e5,{label:"Provider",children:F.jsxDEV(C7,{value:L.provider,options:k0,onChange:N0},void 0,!1,void 0,this)},void 0,!1,void 0,this),F.jsxDEV(e5,{label:"Model",children:F.jsxDEV(C7,{value:L.model,options:s,onChange:(d)=>b((O0)=>({...O0,model:d}))},void 0,!1,void 0,this)},void 0,!1,void 0,this),F.jsxDEV(e5,{label:"System Prompt",children:F.jsxDEV("textarea",{value:L.systemPrompt,onChange:(d)=>b((O0)=>({...O0,systemPrompt:d.target.value})),className:"w-full bg-[#0a0a0a] border border-[#222] rounded px-3 py-2 h-24 resize-none focus:outline-none focus:border-[#f97316] text-[#e0e0e0]"},void 0,!1,void 0,this)},void 0,!1,void 0,this),F.jsxDEV(e5,{label:"Features",children:F.jsxDEV("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:pA.map(({key:d,label:O0,description:B0,icon:p0})=>{let R1=d==="agents"?g():!!L.features[d];return F.jsxDEV("button",{type:"button",onClick:()=>p(d),className:`flex items-center gap-3 p-3 rounded border text-left transition ${R1?"border-[#f97316] bg-[#f97316]/10":"border-[#222] hover:border-[#333]"}`,children:[F.jsxDEV(p0,{className:`w-5 h-5 flex-shrink-0 ${R1?"text-[#f97316]":"text-[#666]"}`},void 0,!1,void 0,this),F.jsxDEV("div",{className:"flex-1 min-w-0",children:[F.jsxDEV("div",{className:`text-sm font-medium ${R1?"text-[#f97316]":""}`,children:O0},void 0,!1,void 0,this),F.jsxDEV("div",{className:"text-xs text-[#666]",children:B0},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},d,!0,void 0,this)})},void 0,!1,void 0,this)},void 0,!1,void 0,this),g()&&F.jsxDEV(e5,{label:"Multi-Agent Mode",children:[F.jsxDEV("div",{className:"flex gap-2",children:[F.jsxDEV("button",{type:"button",onClick:()=>r("coordinator"),className:`flex-1 p-3 rounded border text-left transition ${_0()==="coordinator"?"border-[#f97316] bg-[#f97316]/10":"border-[#222] hover:border-[#333]"}`,children:[F.jsxDEV("div",{className:`text-sm font-medium ${_0()==="coordinator"?"text-[#f97316]":""}`,children:"Coordinator"},void 0,!1,void 0,this),F.jsxDEV("div",{className:"text-xs text-[#666]",children:"Orchestrates and delegates to other agents"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),F.jsxDEV("button",{type:"button",onClick:()=>r("worker"),className:`flex-1 p-3 rounded border text-left transition ${_0()==="worker"?"border-[#f97316] bg-[#f97316]/10":"border-[#222] hover:border-[#333]"}`,children:[F.jsxDEV("div",{className:`text-sm font-medium ${_0()==="worker"?"text-[#f97316]":""}`,children:"Worker"},void 0,!1,void 0,this),F.jsxDEV("div",{className:"text-xs text-[#666]",children:"Receives tasks from coordinators"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),$.projectId&&F.jsxDEV("p",{className:"text-xs text-[#555] mt-2",children:"Group: Using project as agent group"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),L.provider==="anthropic"&&F.jsxDEV(e5,{label:"Agent Built-in Tools",children:[F.jsxDEV("div",{className:"flex flex-wrap gap-2",children:[F.jsxDEV("button",{type:"button",onClick:()=>b((d)=>({...d,features:{...d.features,builtinTools:{...d.features.builtinTools,webSearch:!d.features.builtinTools?.webSearch}}})),className:`flex items-center gap-2 px-3 py-2 rounded border transition ${L.features.builtinTools?.webSearch?"border-[#f97316] bg-[#f97316]/10 text-[#f97316]":"border-[#222] hover:border-[#333] text-[#888]"}`,children:[F.jsxDEV("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:F.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"},void 0,!1,void 0,this)},void 0,!1,void 0,this),F.jsxDEV("span",{className:"text-sm",children:"Web Search"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),F.jsxDEV("button",{type:"button",onClick:()=>b((d)=>({...d,features:{...d.features,builtinTools:{...d.features.builtinTools,webFetch:!d.features.builtinTools?.webFetch}}})),className:`flex items-center gap-2 px-3 py-2 rounded border transition ${L.features.builtinTools?.webFetch?"border-[#f97316] bg-[#f97316]/10 text-[#f97316]":"border-[#222] hover:border-[#333] text-[#888]"}`,children:[F.jsxDEV("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:F.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"},void 0,!1,void 0,this)},void 0,!1,void 0,this),F.jsxDEV("span",{className:"text-sm",children:"Web Fetch"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),F.jsxDEV("p",{className:"text-xs text-[#555] mt-2",children:"Provider-native tools for real-time web access"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),L.features.mcp&&F.jsxDEV(e5,{label:"MCP Servers",children:C.length===0?F.jsxDEV("p",{className:"text-sm text-[#666]",children:"No MCP servers configured. Add servers in the MCP page first."},void 0,!1,void 0,this):F.jsxDEV("div",{className:"space-y-2",children:[C.filter((d)=>d.project_id===null||d.project_id===$.projectId).map((d)=>{let O0=d.type==="http"&&d.url,B0=O0||d.status==="running",p0=O0?`${d.source||"remote"} • http`:`${d.type} • ${d.package||d.command||"custom"}${d.status==="running"&&d.port?` • :${d.port}`:""}`;return F.jsxDEV("button",{type:"button",onClick:()=>I0(d.id),className:`w-full flex items-center gap-3 p-3 rounded border text-left transition ${L.mcpServers.includes(d.id)?"border-[#f97316] bg-[#f97316]/10":"border-[#222] hover:border-[#333]"}`,children:[F.jsxDEV("div",{className:`w-2 h-2 rounded-full flex-shrink-0 ${B0?"bg-green-400":"bg-[#444]"}`},void 0,!1,void 0,this),F.jsxDEV("div",{className:"flex-1 min-w-0",children:[F.jsxDEV("div",{className:"flex items-center gap-2",children:[F.jsxDEV("span",{className:`text-sm font-medium ${L.mcpServers.includes(d.id)?"text-[#f97316]":""}`,children:d.name},void 0,!1,void 0,this),d.project_id===null&&F.jsxDEV("span",{className:"text-[10px] text-[#666] bg-[#1a1a1a] px-1.5 py-0.5 rounded",children:"Global"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),F.jsxDEV("div",{className:"text-xs text-[#666]",children:p0},void 0,!1,void 0,this)]},void 0,!0,void 0,this),F.jsxDEV("div",{className:`text-xs px-2 py-0.5 rounded ${B0?"bg-green-500/20 text-green-400":"bg-[#222] text-[#666]"}`,children:O0?"remote":d.status},void 0,!1,void 0,this)]},d.id,!0,void 0,this)}),F.jsxDEV("p",{className:"text-xs text-[#666] mt-2",children:"Remote servers are always available. Local servers must be running."},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),F.jsxDEV(e5,{label:"Skills",children:u.length===0?F.jsxDEV("p",{className:"text-sm text-[#666]",children:"No skills configured. Add skills in the Skills page first."},void 0,!1,void 0,this):F.jsxDEV("div",{className:"space-y-2",children:[u.filter((d)=>d.enabled&&(d.project_id===null||d.project_id===$.projectId)).map((d)=>F.jsxDEV("button",{type:"button",onClick:()=>b1(d.id),className:`w-full flex items-center gap-3 p-3 rounded border text-left transition ${L.skills.includes(d.id)?"border-[#f97316] bg-[#f97316]/10":"border-[#222] hover:border-[#333]"}`,children:[F.jsxDEV("div",{className:"flex-1 min-w-0",children:[F.jsxDEV("div",{className:"flex items-center gap-2",children:[F.jsxDEV("span",{className:`text-sm font-medium ${L.skills.includes(d.id)?"text-[#f97316]":""}`,children:d.name},void 0,!1,void 0,this),d.project_id===null&&F.jsxDEV("span",{className:"text-[10px] text-[#666] bg-[#1a1a1a] px-1.5 py-0.5 rounded",children:"Global"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),F.jsxDEV("div",{className:"text-xs text-[#666]",children:d.description},void 0,!1,void 0,this)]},void 0,!0,void 0,this),F.jsxDEV("div",{className:"text-xs px-2 py-0.5 rounded bg-[#222] text-[#666]",children:["v",d.version]},void 0,!0,void 0,this)]},d.id,!0,void 0,this)),F.jsxDEV("p",{className:"text-xs text-[#666] mt-2",children:"Skills provide reusable instructions for the agent."},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),M&&F.jsxDEV("div",{className:`text-sm px-3 py-2 rounded ${M.type==="success"?"bg-green-500/10 text-green-400":"bg-red-500/10 text-red-400"}`,children:M.text},void 0,!1,void 0,this),F.jsxDEV("button",{onClick:Q1,disabled:!n1||T||!L.name,className:"w-full bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 disabled:cursor-not-allowed text-black px-4 py-2 rounded font-medium transition",children:T?"Saving...":"Save Changes"},void 0,!1,void 0,this),$.status==="running"&&n1&&F.jsxDEV("p",{className:"text-xs text-[#666] text-center",children:"Changes will be applied to the running agent"},void 0,!1,void 0,this),R&&i&&F.jsxDEV("div",{className:"mt-8 pt-6 border-t border-[#222]",children:[F.jsxDEV("p",{className:"text-sm text-[#666] mb-3",children:"Developer Info"},void 0,!1,void 0,this),F.jsxDEV("div",{className:"space-y-2",children:[F.jsxDEV("div",{className:"flex items-center justify-between",children:[F.jsxDEV("span",{className:"text-xs text-[#666]",children:"Agent ID"},void 0,!1,void 0,this),F.jsxDEV("code",{className:"text-xs bg-[#1a1a1a] px-2 py-1 rounded text-[#888]",children:$.id},void 0,!1,void 0,this)]},void 0,!0,void 0,this),F.jsxDEV("div",{className:"flex items-center justify-between",children:[F.jsxDEV("span",{className:"text-xs text-[#666]",children:"Port"},void 0,!1,void 0,this),F.jsxDEV("code",{className:"text-xs bg-[#1a1a1a] px-2 py-1 rounded text-[#888]",children:$.port||"N/A"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),F.jsxDEV("div",{className:"flex flex-col gap-1",children:[F.jsxDEV("div",{className:"flex items-center justify-between",children:[F.jsxDEV("span",{className:"text-xs text-[#666]",children:"API Key"},void 0,!1,void 0,this),F.jsxDEV("button",{onClick:()=>t(!o),className:"text-xs text-[#f97316] hover:text-[#fb923c]",children:o?"Hide":"Show"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),o&&F.jsxDEV("code",{className:"text-xs bg-[#1a1a1a] px-2 py-1 rounded text-[#888] break-all",children:i},void 0,!1,void 0,this)]},void 0,!0,void 0,this),$.status==="running"&&$.port&&F.jsxDEV("div",{className:"flex flex-col gap-1 mt-2",children:[F.jsxDEV("span",{className:"text-xs text-[#666]",children:"Test with curl"},void 0,!1,void 0,this),F.jsxDEV("code",{className:"text-xs bg-[#1a1a1a] px-2 py-1.5 rounded text-[#666] break-all",children:['curl -H "X-API-Key: ',o?i:"***",'" http://localhost:',$.port,"/config"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),F.jsxDEV("div",{className:"mt-8 pt-6 border-t border-[#222]",children:[F.jsxDEV("p",{className:"text-sm text-[#666] mb-3",children:"Danger Zone"},void 0,!1,void 0,this),P?F.jsxDEV("div",{className:"flex gap-2",children:[F.jsxDEV("button",{onClick:()=>w(!1),className:"flex-1 border border-[#333] hover:border-[#444] px-4 py-2 rounded font-medium transition",children:"Cancel"},void 0,!1,void 0,this),F.jsxDEV("button",{onClick:W,className:"flex-1 bg-red-500/20 text-red-400 hover:bg-red-500/30 px-4 py-2 rounded font-medium transition",children:"Confirm Delete"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):F.jsxDEV("button",{onClick:()=>w(!0),className:"w-full border border-red-500/30 text-red-400/70 hover:border-red-500/50 hover:text-red-400 px-4 py-2 rounded font-medium transition",children:"Delete Agent"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function e5({label:$,children:U}){return F.jsxDEV("div",{children:[F.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:$},void 0,!1,void 0,this),U]},void 0,!0,void 0,this)}var GL=Q0(I1(),1);var h1=Q0(u1(),1);function cY({agents:$,loading:U,selectedAgent:B,providers:W,onSelectAgent:H,onCloseAgent:R,onToggleAgent:L,onDeleteAgent:b,onUpdateAgent:T,onNewAgent:k,canCreateAgent:P=!0}){let{currentProjectId:w,currentProject:M}=K6(),I=GL.useMemo(()=>{if(w===null)return $;if(w==="unassigned")return $.filter((j)=>!j.projectId);return $.filter((j)=>j.projectId===w)},[$,w]),C=w===null?"Agents":w==="unassigned"?"Unassigned Agents":M?.name||"Agents";return h1.jsxDEV("div",{className:"flex-1 flex overflow-hidden relative",children:[h1.jsxDEV("div",{className:"flex-1 overflow-auto p-6",children:[h1.jsxDEV("div",{className:"flex items-center justify-between mb-6",children:[h1.jsxDEV("div",{className:"flex items-center gap-3",children:[M&&h1.jsxDEV("span",{className:"w-3 h-3 rounded-full",style:{backgroundColor:M.color}},void 0,!1,void 0,this),h1.jsxDEV("h1",{className:"text-xl font-semibold",children:C},void 0,!1,void 0,this),w!==null&&h1.jsxDEV("span",{className:"text-sm text-[#666]",children:["(",I.length," agent",I.length!==1?"s":"",")"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),k&&h1.jsxDEV("button",{onClick:k,disabled:!P,className:"bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 disabled:cursor-not-allowed text-black px-4 py-2 rounded font-medium transition",children:"+ New Agent"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),U?h1.jsxDEV(Nz,{message:"Loading agents..."},void 0,!1,void 0,this):I.length===0?h1.jsxDEV(dA,{onNewAgent:k,canCreateAgent:P,hasProjectFilter:w!==null},void 0,!1,void 0,this):h1.jsxDEV("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-3 auto-rows-fr",children:I.map((j)=>h1.jsxDEV(uY,{agent:j,selected:B?.id===j.id,onSelect:()=>H(j),onToggle:(u)=>L(j,u),showProject:w===null},j.id,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),B&&h1.jsxDEV("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-[2px] z-10",onClick:R},void 0,!1,void 0,this),B&&h1.jsxDEV("div",{className:"absolute right-0 top-0 bottom-0 w-full sm:w-[500px] lg:w-[600px] xl:w-[700px] z-20",children:h1.jsxDEV(xY,{agent:B,providers:W,onClose:R,onStartAgent:(j)=>L(B,j),onUpdateAgent:(j)=>T(B.id,j),onDeleteAgent:()=>b(B.id)},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function dA({onNewAgent:$,canCreateAgent:U,hasProjectFilter:B}){return h1.jsxDEV("div",{className:"text-center py-20 text-[#666]",children:[B?h1.jsxDEV(h1.Fragment,{children:[h1.jsxDEV("p",{className:"text-lg",children:"No agents in this project"},void 0,!1,void 0,this),h1.jsxDEV("p",{className:"text-sm mt-1",children:"Create an agent or assign existing agents to this project"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):h1.jsxDEV(h1.Fragment,{children:[h1.jsxDEV("p",{className:"text-lg",children:"No agents yet"},void 0,!1,void 0,this),h1.jsxDEV("p",{className:"text-sm mt-1",children:"Create your first agent to get started"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),$&&h1.jsxDEV("button",{onClick:$,disabled:!U,className:"mt-4 bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 disabled:cursor-not-allowed text-black px-4 py-2 rounded font-medium transition",children:"+ New Agent"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var r4=Q0(I1(),1);var F0=Q0(u1(),1);function lY({agents:$,loading:U,runningCount:B,configuredProviders:W,onNavigate:H,onSelectAgent:R}){let{authFetch:L}=V4(),{currentProjectId:b}=K6(),{events:T,statusChangeCounter:k}=VY(),[P,w]=r4.useState(null),[M,I]=r4.useState([]),[C,j]=r4.useState([]),u=r4.useMemo(()=>{if(!b)return $;if(b==="unassigned")return $.filter((s)=>!s.projectId);return $.filter((s)=>s.projectId===b)},[$,b]),f=r4.useMemo(()=>{return u.filter((s)=>s.status==="running").length},[u]),i=r4.useMemo(()=>{return new Set(u.map((s)=>s.id))},[u]),l=r4.useCallback(async()=>{try{let[s,N0,p]=await Promise.all([L("/api/dashboard"),L("/api/tasks?status=all"),L("/api/telemetry/events?type=thread_activity&limit=20")]);if(s.ok){let r=await s.json();w(r)}if(N0.ok){let r=await N0.json();I((r.tasks||[]).slice(0,5))}if(p.ok){let r=await p.json();j(r.events||[])}}catch(s){console.error("Failed to fetch dashboard data:",s)}},[L]);r4.useEffect(()=>{l()},[l,k]);let o=r4.useMemo(()=>{if(!b)return M;return M.filter((s)=>i.has(s.agentId))},[M,b,i]),t=r4.useMemo(()=>{if(!b)return P?.tasks||{total:0,pending:0,running:0,completed:0};let s=o.length,N0=o.filter((g)=>g.status==="pending").length,p=o.filter((g)=>g.status==="running").length,r=o.filter((g)=>g.status==="completed").length;return{total:s,pending:N0,running:p,completed:r}},[P,b,o]),c=r4.useMemo(()=>{let s=T.filter((g)=>g.type==="thread_activity"),N0=new Set(s.map((g)=>g.id)),p=[...s];for(let g of C)if(!N0.has(g.id))p.push(g),N0.add(g.id);let r=p;if(b)r=p.filter((g)=>i.has(g.agent_id));return r.sort((g,_0)=>new Date(_0.timestamp).getTime()-new Date(g.timestamp).getTime()),r.slice(0,8)},[T,C,b,i]),k0=r4.useMemo(()=>{let s=new Map;for(let N0 of $)s.set(N0.id,N0.name);return s},[$]);return F0.jsxDEV("div",{className:"flex-1 overflow-auto p-6",children:[F0.jsxDEV("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-4 mb-6",children:[F0.jsxDEV(dY,{label:"Agents",value:u.length,subValue:`${f} running`},void 0,!1,void 0,this),F0.jsxDEV(dY,{label:"Tasks",value:t.total,subValue:`${t.pending} pending`},void 0,!1,void 0,this),F0.jsxDEV(dY,{label:"Completed",value:t.completed,color:"text-green-400"},void 0,!1,void 0,this),F0.jsxDEV(dY,{label:"Providers",value:W.length,color:"text-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),F0.jsxDEV("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[F0.jsxDEV(IH,{title:"Agents",actionLabel:"View All",onAction:()=>H("agents"),children:U?F0.jsxDEV("div",{className:"p-4 text-center text-[#666]",children:"Loading..."},void 0,!1,void 0,this):u.length===0?F0.jsxDEV("div",{className:"p-4 text-center text-[#666]",children:"No agents yet"},void 0,!1,void 0,this):F0.jsxDEV("div",{className:"divide-y divide-[#1a1a1a]",children:u.slice(0,5).map((s)=>F0.jsxDEV(lA,{agent:s,onSelect:()=>R(s),showProject:!b},s.id,!1,void 0,this))},void 0,!1,void 0,this)},void 0,!1,void 0,this),F0.jsxDEV(IH,{title:"Activity",actionLabel:"Telemetry",onAction:()=>H("telemetry"),children:c.length===0?F0.jsxDEV("div",{className:"p-4 text-center text-[#666]",children:[F0.jsxDEV("p",{children:"No activity yet"},void 0,!1,void 0,this),F0.jsxDEV("p",{className:"text-sm text-[#444] mt-1",children:"Agent activity will appear here in real-time"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):F0.jsxDEV("div",{className:"divide-y divide-[#1a1a1a]",children:c.map((s)=>F0.jsxDEV(oA,{activity:s.data?.activity||"Working...",agentName:k0.get(s.agent_id)||s.agent_id,timestamp:s.timestamp},s.id,!1,void 0,this))},void 0,!1,void 0,this)},void 0,!1,void 0,this),F0.jsxDEV(IH,{title:"Recent Tasks",actionLabel:"View All",onAction:()=>H("tasks"),children:o.length===0?F0.jsxDEV("div",{className:"p-4 text-center text-[#666]",children:[F0.jsxDEV("p",{children:"No tasks yet"},void 0,!1,void 0,this),F0.jsxDEV("p",{className:"text-sm text-[#444] mt-1",children:"Tasks will appear when agents create them"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):F0.jsxDEV("div",{className:"divide-y divide-[#1a1a1a]",children:o.map((s)=>F0.jsxDEV("div",{className:"px-4 py-3 flex items-center justify-between",children:[F0.jsxDEV("div",{className:"flex-1 min-w-0",children:[F0.jsxDEV("p",{className:"font-medium truncate",children:s.title},void 0,!1,void 0,this),F0.jsxDEV("p",{className:"text-sm text-[#666]",children:[s.agentName,s.recurrence&&F0.jsxDEV("span",{className:"ml-1 text-[#555]",children:["· ",rA(s.recurrence)]},void 0,!0,void 0,this),s.next_run&&F0.jsxDEV("span",{className:"ml-1 text-[#f97316]",children:["· ",HL(s.next_run)]},void 0,!0,void 0,this),!s.next_run&&s.execute_at&&F0.jsxDEV("span",{className:"ml-1 text-[#f97316]",children:["· ",HL(s.execute_at)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),F0.jsxDEV(aA,{status:s.status},void 0,!1,void 0,this)]},`${s.agentId}-${s.id}`,!0,void 0,this))},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function dY({label:$,value:U,subValue:B,color:W}){return F0.jsxDEV("div",{className:"bg-[#111] rounded p-4 border border-[#1a1a1a]",children:[F0.jsxDEV("p",{className:"text-sm text-[#666] mb-1",children:$},void 0,!1,void 0,this),F0.jsxDEV("p",{className:`text-2xl font-semibold ${W||""}`,children:U},void 0,!1,void 0,this),B&&F0.jsxDEV("p",{className:"text-xs text-[#555] mt-1",children:B},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function IH({title:$,actionLabel:U,onAction:B,children:W}){return F0.jsxDEV("div",{className:"bg-[#111] rounded border border-[#1a1a1a] overflow-hidden",children:[F0.jsxDEV("div",{className:"px-4 py-3 border-b border-[#1a1a1a] flex items-center justify-between",children:[F0.jsxDEV("h3",{className:"font-semibold",children:$},void 0,!1,void 0,this),F0.jsxDEV("button",{onClick:B,className:"text-sm text-[#3b82f6] hover:text-[#60a5fa]",children:U},void 0,!1,void 0,this)]},void 0,!0,void 0,this),W]},void 0,!0,void 0,this)}function lA({agent:$,onSelect:U,showProject:B}){let{isActive:W}=mY($.id),{projects:H}=K6(),R=$.projectId?H.find((L)=>L.id===$.projectId):null;return F0.jsxDEV("div",{onClick:U,className:"px-4 py-3 hover:bg-[#1a1a1a] cursor-pointer flex items-center justify-between",children:[F0.jsxDEV("div",{className:"flex-1 min-w-0",children:[F0.jsxDEV("p",{className:"font-medium",children:$.name},void 0,!1,void 0,this),F0.jsxDEV("div",{className:"flex items-center gap-2 text-sm text-[#666]",children:[F0.jsxDEV("span",{children:$.provider},void 0,!1,void 0,this),B&&R&&F0.jsxDEV(F0.Fragment,{children:[F0.jsxDEV("span",{className:"text-[#444]",children:"·"},void 0,!1,void 0,this),F0.jsxDEV("span",{className:"flex items-center gap-1",children:[F0.jsxDEV("span",{className:"w-2 h-2 rounded-full",style:{backgroundColor:R.color}},void 0,!1,void 0,this),R.name]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),F0.jsxDEV("span",{className:`w-2 h-2 rounded-full flex-shrink-0 ${$.status==="running"?W?"bg-green-400 animate-pulse":"bg-[#3b82f6]":"bg-[#444]"}`},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function iA($){let U=Math.floor((Date.now()-new Date($).getTime())/1000);if(U<5)return"just now";if(U<60)return`${U}s ago`;let B=Math.floor(U/60);if(B<60)return`${B}m ago`;let W=Math.floor(B/60);if(W<24)return`${W}h ago`;return`${Math.floor(W/24)}d ago`}function oA({activity:$,agentName:U,timestamp:B}){return F0.jsxDEV("div",{className:"px-4 py-3",children:[F0.jsxDEV("p",{className:"text-sm truncate",children:$},void 0,!1,void 0,this),F0.jsxDEV("div",{className:"flex items-center gap-2 text-xs text-[#555] mt-1",children:[F0.jsxDEV("span",{className:"text-[#666]",children:U},void 0,!1,void 0,this),F0.jsxDEV("span",{className:"text-[#444]",children:"·"},void 0,!1,void 0,this),F0.jsxDEV("span",{children:iA(B)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function aA({status:$}){let U={pending:"bg-yellow-500/20 text-yellow-400",running:"bg-blue-500/20 text-blue-400",completed:"bg-green-500/20 text-green-400",failed:"bg-red-500/20 text-red-400",cancelled:"bg-gray-500/20 text-gray-400"};return F0.jsxDEV("span",{className:`px-2 py-0.5 rounded text-xs font-medium ${U[$]||U.pending}`,children:$},void 0,!1,void 0,this)}var KL=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];function rA($){try{let U=$.trim().split(/\s+/);if(U.length!==5)return $;let[B,W,H,R,L]=U;if(B.startsWith("*/")&&W==="*"&&H==="*"&&R==="*"&&L==="*"){let T=parseInt(B.slice(2));return T===1?"Every min":`Every ${T}min`}if(B!=="*"&&!B.includes("/")&&W==="*"&&H==="*"&&R==="*"&&L==="*")return"Hourly";if(W.startsWith("*/")&&H==="*"&&R==="*"&&L==="*"){let T=parseInt(W.slice(2));return T===1?"Hourly":`Every ${T}h`}let b=(T,k)=>{let P=parseInt(T),w=parseInt(k);if(isNaN(P))return"";let M=P>=12?"PM":"AM";return`${P===0?12:P>12?P-12:P}:${w.toString().padStart(2,"0")} ${M}`};if(W!=="*"&&!W.includes("/")&&H==="*"&&R==="*"){let T=b(W,B);if(L==="*")return`Daily ${T}`;let k=L.split(",").map((P)=>KL[parseInt(P.trim())]||P);if(k.length===1)return`${k[0]} ${T}`;return`${k.join(" & ")} ${T}`}return $}catch{return $}}function HL($){let U=new Date($),B=new Date,W=U.getTime()-B.getTime(),H=W>0,R=Math.abs(W),L=Math.floor(R/60000),b=Math.floor(R/3600000),T=U.toLocaleTimeString([],{hour:"numeric",minute:"2-digit"}),k=U.toDateString()===B.toDateString(),P=new Date(B);P.setDate(P.getDate()+1);let w=U.toDateString()===P.toDateString();if(k){if(L<1)return"now";if(L<60)return H?`in ${L}m`:`${L}m ago`;return H?`in ${b}h`:`${b}h ago`}if(w)return`Tomorrow ${T}`;return`${KL[U.getDay()]} ${T}`}var U1=Q0(u1(),1),eA=j1.lazy(()=>import("./SettingsPage.es76hnj2.js").then(($)=>({default:$.SettingsPage}))),zv=j1.lazy(()=>import("./ActivityPage.yv28a2vj.js").then(($)=>({default:$.ActivityPage}))),Qv=j1.lazy(()=>import("./TasksPage.99df66mk.js").then(($)=>({default:$.TasksPage}))),Xv=j1.lazy(()=>import("./McpPage.bjqrp0n2.js").then(($)=>({default:$.McpPage}))),Zv=j1.lazy(()=>import("./SkillsPage.06h8yf0h.js").then(($)=>({default:$.SkillsPage}))),Yv=j1.lazy(()=>import("./TestsPage.denxrg8c.js").then(($)=>({default:$.TestsPage}))),Jv=j1.lazy(()=>import("./TelemetryPage.bmdnxhq7.js").then(($)=>({default:$.TelemetryPage}))),$v=j1.lazy(()=>import("./ConnectionsPage.52evzrp7.js").then(($)=>({default:$.ConnectionsPage}))),qv=j1.lazy(()=>import("./ApiDocsPage.4ccwjjbk.js").then(($)=>({default:$.ApiDocsPage})));function Gv(){let{isAuthenticated:$,isLoading:U,hasUsers:B,accessToken:W,checkAuth:H}=V4(),{currentProjectId:R,refreshProjects:L}=K6(),b=IY(),T=BL(),{isComplete:k,setIsComplete:P}=GH(),w=()=>{return W?{Authorization:`Bearer ${W}`}:{}},M=$&&k===!0,{agents:I,loading:C,runningCount:j,fetchAgents:u,createAgent:f,updateAgent:i,deleteAgent:l,toggleAgent:o}=$H(M),{providers:t,configuredProviders:c,fetchProviders:k0}=qH(M),s=c.filter((y0)=>y0.type==="llm"),N0=j1.useMemo(()=>{if(R===null)return I.length;if(R==="unassigned")return I.filter((y0)=>!y0.projectId).length;return I.filter((y0)=>y0.projectId===R).length},[I,R]),[p,r]=j1.useState(!1),[g,_0]=j1.useState(null),[I0,b1]=j1.useState("dashboard"),[Q1,n1]=j1.useState(null),[d,O0]=j1.useState(0),[B0,p0]=j1.useState(!1);j1.useEffect(()=>{if(!M)return;(async()=>{try{let O1="/api/tasks?status=pending";if(R!==null)O1+=`&project_id=${encodeURIComponent(R)}`;let A1=await fetch(O1,{headers:w()});if(A1.ok){let v1=await A1.json();O0(v1.count??(v1.tasks||[]).length)}}catch{}})()},[M,W,R,I,b,T]);let[R1,t1]=j1.useState({name:"",model:"",provider:"",systemPrompt:"You are a helpful assistant.",features:{...JH},mcpServers:[],skills:[]});j1.useEffect(()=>{if(s.length>0&&!R1.provider){let y0=s[0],O1=y0.models.find((A1)=>A1.recommended)?.value||y0.models[0]?.value||"";t1((A1)=>({...A1,provider:y0.id,model:O1}))}},[s,R1.provider]),j1.useEffect(()=>{if(g){let y0=I.find((O1)=>O1.id===g.id);if(y0)_0(y0);else _0(null)}},[I,g]);let i1=(y0)=>{let O1=t.find((v1)=>v1.id===y0),A1=O1?.models.find((v1)=>v1.recommended)?.value||O1?.models[0]?.value||"";t1((v1)=>({...v1,provider:y0,model:A1}))},q4=async()=>{if(!R1.name)return;await f(R1),await L();let y0=s[0],O1=y0?.models.find((A1)=>A1.recommended)?.value||y0?.models[0]?.value||"";t1({name:"",model:O1,provider:y0?.id||"",systemPrompt:"You are a helpful assistant.",features:{...JH},mcpServers:[],skills:[]}),r(!1)},A4=async(y0,O1)=>{O1?.stopPropagation(),n1(null);let A1=await o(y0);if(A1.error)n1(A1.error)},s1=async(y0,O1)=>{if(O1?.stopPropagation(),g?.id===y0)_0(null);await l(y0),await L()},o1=(y0)=>{_0(y0),n1(null),b1("agents")},Z4=(y0)=>{b1(y0),_0(null)},v4=()=>{P(!0),k0(),H()};if(U||B===null)return U1.jsxDEV(Nz,{fullScreen:!0},void 0,!1,void 0,this);if(!B)return U1.jsxDEV(N8,{onComplete:v4,needsAccount:!0},void 0,!1,void 0,this);if(!$)return U1.jsxDEV(EY,{},void 0,!1,void 0,this);if(k===null)return U1.jsxDEV(Nz,{fullScreen:!0},void 0,!1,void 0,this);if(!k)return U1.jsxDEV(N8,{onComplete:v4,needsAccount:!1},void 0,!1,void 0,this);return U1.jsxDEV("div",{className:"h-screen bg-[#0a0a0a] text-[#e0e0e0] font-mono flex flex-col overflow-hidden",children:[U1.jsxDEV(CY,{onMenuClick:()=>p0(!0)},void 0,!1,void 0,this),Q1&&U1.jsxDEV(fY,{message:Q1,onDismiss:()=>n1(null)},void 0,!1,void 0,this),U1.jsxDEV("div",{className:"flex flex-1 overflow-hidden",children:[U1.jsxDEV(yY,{route:I0,agentCount:N0,taskCount:d,onNavigate:Z4,isOpen:B0,onClose:()=>p0(!1)},void 0,!1,void 0,this),U1.jsxDEV("main",{className:"flex-1 overflow-hidden flex",children:U1.jsxDEV(j1.Suspense,{fallback:U1.jsxDEV(Nz,{},void 0,!1,void 0,this),children:[I0==="settings"&&U1.jsxDEV(eA,{},void 0,!1,void 0,this),I0==="activity"&&U1.jsxDEV(zv,{agents:I,loading:C},void 0,!1,void 0,this),I0==="agents"&&U1.jsxDEV(cY,{agents:I,loading:C,selectedAgent:g,providers:t,onSelectAgent:o1,onCloseAgent:()=>_0(null),onToggleAgent:A4,onDeleteAgent:s1,onUpdateAgent:i,onNewAgent:()=>r(!0),canCreateAgent:s.length>0},void 0,!1,void 0,this),I0==="dashboard"&&U1.jsxDEV(lY,{agents:I,loading:C,runningCount:j,configuredProviders:c,onNavigate:Z4,onSelectAgent:o1},void 0,!1,void 0,this),I0==="tasks"&&U1.jsxDEV(Qv,{},void 0,!1,void 0,this),I0==="connections"&&U1.jsxDEV($v,{},void 0,!1,void 0,this),I0==="mcp"&&U1.jsxDEV(Xv,{},void 0,!1,void 0,this),I0==="skills"&&U1.jsxDEV(Zv,{},void 0,!1,void 0,this),I0==="tests"&&U1.jsxDEV(Yv,{},void 0,!1,void 0,this),I0==="telemetry"&&U1.jsxDEV(Jv,{},void 0,!1,void 0,this),I0==="api"&&U1.jsxDEV(qv,{},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),p&&U1.jsxDEV(jY,{form:R1,providers:t,configuredProviders:c,onFormChange:t1,onProviderChange:i1,onCreate:q4,onClose:()=>r(!1),onGoToSettings:()=>{r(!1),b1("settings")}},void 0,!1,void 0,this),U1.jsxDEV(aO,{},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function Hv(){return U1.jsxDEV(_L,{children:U1.jsxDEV(OL,{children:U1.jsxDEV(iO,{children:U1.jsxDEV(UL,{children:U1.jsxDEV(Gv,{},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)}var Kv=LL.createRoot(document.getElementById("root"));Kv.render(U1.jsxDEV(Hv,{},void 0,!1,void 0,this));
|
|
180
|
+
|
|
181
|
+
//# debugId=A9DA01414875F5B264756E2164756E21
|