codex-linux 1.0.0 → 1.0.2
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/.github/workflows/ci.yml +0 -27
- package/README.md +40 -39
- package/abyss-teal-design-system.html +1449 -0
- package/dist/renderer/assets/main-AJwWHWV7.js +304 -0
- package/dist/renderer/assets/main-ua9RiJ9-.css +1 -0
- package/dist/renderer/index.html +2 -2
- package/package.json +4 -3
- package/scripts/install.sh +1 -1
- package/src/renderer/App.tsx +45 -15
- package/src/renderer/components/AgentPanel.tsx +94 -125
- package/src/renderer/components/AutomationPanel.tsx +39 -34
- package/src/renderer/components/ChatInterface.tsx +81 -123
- package/src/renderer/components/Header.tsx +24 -38
- package/src/renderer/components/SettingsPanel.tsx +89 -96
- package/src/renderer/components/Sidebar.tsx +33 -51
- package/src/renderer/components/SkillsPanel.tsx +54 -56
- package/src/renderer/components/WelcomeChat.tsx +199 -0
- package/src/renderer/components/WorktreePanel.tsx +32 -27
- package/src/renderer/components/ui/Button.tsx +17 -19
- package/src/renderer/components/ui/Card.tsx +14 -15
- package/src/renderer/components/ui/Input.tsx +12 -13
- package/src/renderer/index.css +37 -59
- package/src/renderer/styles/abyss-teal.css +405 -0
- package/dist/renderer/assets/main-DJlZQBCA.js +0 -304
- package/dist/renderer/assets/main-N33ZXEr8.css +0 -1
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
function vf(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const a in n)if(a!=="default"&&!(a in e)){const l=Object.getOwnPropertyDescriptor(n,a);l&&Object.defineProperty(e,a,l.get?l:{enumerable:!0,get:()=>n[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const l of a)if(l.type==="childList")for(const s of l.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function r(a){const l={};return a.integrity&&(l.integrity=a.integrity),a.referrerPolicy&&(l.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?l.credentials="include":a.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function n(a){if(a.ep)return;a.ep=!0;const l=r(a);fetch(a.href,l)}})();function gf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Eu={exports:{}},Qa={},Pu={exports:{}},H={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var On=Symbol.for("react.element"),xf=Symbol.for("react.portal"),yf=Symbol.for("react.fragment"),wf=Symbol.for("react.strict_mode"),bf=Symbol.for("react.profiler"),kf=Symbol.for("react.provider"),jf=Symbol.for("react.context"),Nf=Symbol.for("react.forward_ref"),Sf=Symbol.for("react.suspense"),Cf=Symbol.for("react.memo"),Ef=Symbol.for("react.lazy"),Hs=Symbol.iterator;function Pf(e){return e===null||typeof e!="object"?null:(e=Hs&&e[Hs]||e["@@iterator"],typeof e=="function"?e:null)}var Mu={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Au=Object.assign,Iu={};function Lr(e,t,r){this.props=e,this.context=t,this.refs=Iu,this.updater=r||Mu}Lr.prototype.isReactComponent={};Lr.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Lr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Tu(){}Tu.prototype=Lr.prototype;function Vi(e,t,r){this.props=e,this.context=t,this.refs=Iu,this.updater=r||Mu}var Hi=Vi.prototype=new Tu;Hi.constructor=Vi;Au(Hi,Lr.prototype);Hi.isPureReactComponent=!0;var Qs=Array.isArray,Lu=Object.prototype.hasOwnProperty,Qi={current:null},Ou={key:!0,ref:!0,__self:!0,__source:!0};function Ru(e,t,r){var n,a={},l=null,s=null;if(t!=null)for(n in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(l=""+t.key),t)Lu.call(t,n)&&!Ou.hasOwnProperty(n)&&(a[n]=t[n]);var o=arguments.length-2;if(o===1)a.children=r;else if(1<o){for(var u=Array(o),f=0;f<o;f++)u[f]=arguments[f+2];a.children=u}if(e&&e.defaultProps)for(n in o=e.defaultProps,o)a[n]===void 0&&(a[n]=o[n]);return{$$typeof:On,type:e,key:l,ref:s,props:a,_owner:Qi.current}}function Mf(e,t){return{$$typeof:On,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Yi(e){return typeof e=="object"&&e!==null&&e.$$typeof===On}function Af(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var Ys=/\/+/g;function ml(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Af(""+e.key):t.toString(36)}function ia(e,t,r,n,a){var l=typeof e;(l==="undefined"||l==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(l){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case On:case xf:s=!0}}if(s)return s=e,a=a(s),e=n===""?"."+ml(s,0):n,Qs(a)?(r="",e!=null&&(r=e.replace(Ys,"$&/")+"/"),ia(a,t,r,"",function(f){return f})):a!=null&&(Yi(a)&&(a=Mf(a,r+(!a.key||s&&s.key===a.key?"":(""+a.key).replace(Ys,"$&/")+"/")+e)),t.push(a)),1;if(s=0,n=n===""?".":n+":",Qs(e))for(var o=0;o<e.length;o++){l=e[o];var u=n+ml(l,o);s+=ia(l,t,r,u,a)}else if(u=Pf(e),typeof u=="function")for(e=u.call(e),o=0;!(l=e.next()).done;)l=l.value,u=n+ml(l,o++),s+=ia(l,t,r,u,a);else if(l==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function $n(e,t,r){if(e==null)return e;var n=[],a=0;return ia(e,n,"","",function(l){return t.call(r,l,a++)}),n}function If(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Se={current:null},sa={transition:null},Tf={ReactCurrentDispatcher:Se,ReactCurrentBatchConfig:sa,ReactCurrentOwner:Qi};function _u(){throw Error("act(...) is not supported in production builds of React.")}H.Children={map:$n,forEach:function(e,t,r){$n(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return $n(e,function(){t++}),t},toArray:function(e){return $n(e,function(t){return t})||[]},only:function(e){if(!Yi(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};H.Component=Lr;H.Fragment=yf;H.Profiler=bf;H.PureComponent=Vi;H.StrictMode=wf;H.Suspense=Sf;H.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Tf;H.act=_u;H.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=Au({},e.props),a=e.key,l=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(l=t.ref,s=Qi.current),t.key!==void 0&&(a=""+t.key),e.type&&e.type.defaultProps)var o=e.type.defaultProps;for(u in t)Lu.call(t,u)&&!Ou.hasOwnProperty(u)&&(n[u]=t[u]===void 0&&o!==void 0?o[u]:t[u])}var u=arguments.length-2;if(u===1)n.children=r;else if(1<u){o=Array(u);for(var f=0;f<u;f++)o[f]=arguments[f+2];n.children=o}return{$$typeof:On,type:e.type,key:a,ref:l,props:n,_owner:s}};H.createContext=function(e){return e={$$typeof:jf,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:kf,_context:e},e.Consumer=e};H.createElement=Ru;H.createFactory=function(e){var t=Ru.bind(null,e);return t.type=e,t};H.createRef=function(){return{current:null}};H.forwardRef=function(e){return{$$typeof:Nf,render:e}};H.isValidElement=Yi;H.lazy=function(e){return{$$typeof:Ef,_payload:{_status:-1,_result:e},_init:If}};H.memo=function(e,t){return{$$typeof:Cf,type:e,compare:t===void 0?null:t}};H.startTransition=function(e){var t=sa.transition;sa.transition={};try{e()}finally{sa.transition=t}};H.unstable_act=_u;H.useCallback=function(e,t){return Se.current.useCallback(e,t)};H.useContext=function(e){return Se.current.useContext(e)};H.useDebugValue=function(){};H.useDeferredValue=function(e){return Se.current.useDeferredValue(e)};H.useEffect=function(e,t){return Se.current.useEffect(e,t)};H.useId=function(){return Se.current.useId()};H.useImperativeHandle=function(e,t,r){return Se.current.useImperativeHandle(e,t,r)};H.useInsertionEffect=function(e,t){return Se.current.useInsertionEffect(e,t)};H.useLayoutEffect=function(e,t){return Se.current.useLayoutEffect(e,t)};H.useMemo=function(e,t){return Se.current.useMemo(e,t)};H.useReducer=function(e,t,r){return Se.current.useReducer(e,t,r)};H.useRef=function(e){return Se.current.useRef(e)};H.useState=function(e){return Se.current.useState(e)};H.useSyncExternalStore=function(e,t,r){return Se.current.useSyncExternalStore(e,t,r)};H.useTransition=function(){return Se.current.useTransition()};H.version="18.3.1";Pu.exports=H;var g=Pu.exports;const dt=gf(g),Lf=vf({__proto__:null,default:dt},[g]);/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.production.min.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var Of=g,Rf=Symbol.for("react.element"),_f=Symbol.for("react.fragment"),zf=Object.prototype.hasOwnProperty,Ff=Of.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Df={key:!0,ref:!0,__self:!0,__source:!0};function zu(e,t,r){var n,a={},l=null,s=null;r!==void 0&&(l=""+r),t.key!==void 0&&(l=""+t.key),t.ref!==void 0&&(s=t.ref);for(n in t)zf.call(t,n)&&!Df.hasOwnProperty(n)&&(a[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)a[n]===void 0&&(a[n]=t[n]);return{$$typeof:Rf,type:e,key:l,ref:s,props:a,_owner:Ff.current}}Qa.Fragment=_f;Qa.jsx=zu;Qa.jsxs=zu;Eu.exports=Qa;var i=Eu.exports,Ql={},Fu={exports:{}},ze={},Du={exports:{}},Wu={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.min.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/(function(e){function t(S,D){var B=S.length;S.push(D);e:for(;0<B;){var F=B-1>>>1,U=S[F];if(0<a(U,D))S[F]=D,S[B]=U,B=F;else break e}}function r(S){return S.length===0?null:S[0]}function n(S){if(S.length===0)return null;var D=S[0],B=S.pop();if(B!==D){S[0]=B;e:for(var F=0,U=S.length,se=U>>>1;F<se;){var xe=2*(F+1)-1,j=S[xe],_=xe+1,Y=S[_];if(0>a(j,B))_<U&&0>a(Y,j)?(S[F]=Y,S[_]=B,F=_):(S[F]=j,S[xe]=B,F=xe);else if(_<U&&0>a(Y,B))S[F]=Y,S[_]=B,F=_;else break e}}return D}function a(S,D){var B=S.sortIndex-D.sortIndex;return B!==0?B:S.id-D.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var s=Date,o=s.now();e.unstable_now=function(){return s.now()-o}}var u=[],f=[],h=1,m=null,p=3,b=!1,y=!1,w=!1,C=typeof setTimeout=="function"?setTimeout:null,d=typeof clearTimeout=="function"?clearTimeout:null,c=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(S){for(var D=r(f);D!==null;){if(D.callback===null)n(f);else if(D.startTime<=S)n(f),D.sortIndex=D.expirationTime,t(u,D);else break;D=r(f)}}function x(S){if(w=!1,v(S),!y)if(r(u)!==null)y=!0,z(k);else{var D=r(f);D!==null&&q(x,D.startTime-S)}}function k(S,D){y=!1,w&&(w=!1,d(T),T=-1),b=!0;var B=p;try{for(v(D),m=r(u);m!==null&&(!(m.expirationTime>D)||S&&!L());){var F=m.callback;if(typeof F=="function"){m.callback=null,p=m.priorityLevel;var U=F(m.expirationTime<=D);D=e.unstable_now(),typeof U=="function"?m.callback=U:m===r(u)&&n(u),v(D)}else n(u);m=r(u)}if(m!==null)var se=!0;else{var xe=r(f);xe!==null&&q(x,xe.startTime-D),se=!1}return se}finally{m=null,p=B,b=!1}}var N=!1,E=null,T=-1,$=5,M=-1;function L(){return!(e.unstable_now()-M<$)}function W(){if(E!==null){var S=e.unstable_now();M=S;var D=!0;try{D=E(!0,S)}finally{D?I():(N=!1,E=null)}}else N=!1}var I;if(typeof c=="function")I=function(){c(W)};else if(typeof MessageChannel<"u"){var R=new MessageChannel,A=R.port2;R.port1.onmessage=W,I=function(){A.postMessage(null)}}else I=function(){C(W,0)};function z(S){E=S,N||(N=!0,I())}function q(S,D){T=C(function(){S(e.unstable_now())},D)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(S){S.callback=null},e.unstable_continueExecution=function(){y||b||(y=!0,z(k))},e.unstable_forceFrameRate=function(S){0>S||125<S?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<S?Math.floor(1e3/S):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return r(u)},e.unstable_next=function(S){switch(p){case 1:case 2:case 3:var D=3;break;default:D=p}var B=p;p=D;try{return S()}finally{p=B}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(S,D){switch(S){case 1:case 2:case 3:case 4:case 5:break;default:S=3}var B=p;p=S;try{return D()}finally{p=B}},e.unstable_scheduleCallback=function(S,D,B){var F=e.unstable_now();switch(typeof B=="object"&&B!==null?(B=B.delay,B=typeof B=="number"&&0<B?F+B:F):B=F,S){case 1:var U=-1;break;case 2:U=250;break;case 5:U=1073741823;break;case 4:U=1e4;break;default:U=5e3}return U=B+U,S={id:h++,callback:D,priorityLevel:S,startTime:B,expirationTime:U,sortIndex:-1},B>F?(S.sortIndex=B,t(f,S),r(u)===null&&S===r(f)&&(w?(d(T),T=-1):w=!0,q(x,B-F))):(S.sortIndex=U,t(u,S),y||b||(y=!0,z(k))),S},e.unstable_shouldYield=L,e.unstable_wrapCallback=function(S){var D=p;return function(){var B=p;p=D;try{return S.apply(this,arguments)}finally{p=B}}}})(Wu);Du.exports=Wu;var Wf=Du.exports;/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.min.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var $f=g,_e=Wf;function P(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var $u=new Set,pn={};function rr(e,t){Cr(e,t),Cr(e+"Capture",t)}function Cr(e,t){for(pn[e]=t,e=0;e<t.length;e++)$u.add(t[e])}var pt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Yl=Object.prototype.hasOwnProperty,Uf=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Ks={},Gs={};function Bf(e){return Yl.call(Gs,e)?!0:Yl.call(Ks,e)?!1:Uf.test(e)?Gs[e]=!0:(Ks[e]=!0,!1)}function Vf(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Hf(e,t,r,n){if(t===null||typeof t>"u"||Vf(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ce(e,t,r,n,a,l,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=a,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=l,this.removeEmptyString=s}var ge={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ge[e]=new Ce(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ge[t]=new Ce(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ge[e]=new Ce(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ge[e]=new Ce(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ge[e]=new Ce(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ge[e]=new Ce(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ge[e]=new Ce(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ge[e]=new Ce(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ge[e]=new Ce(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ki=/[\-:]([a-z])/g;function Gi(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Ki,Gi);ge[t]=new Ce(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Ki,Gi);ge[t]=new Ce(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Ki,Gi);ge[t]=new Ce(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ge[e]=new Ce(e,1,!1,e.toLowerCase(),null,!1,!1)});ge.xlinkHref=new Ce("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ge[e]=new Ce(e,1,!1,e.toLowerCase(),null,!0,!0)});function qi(e,t,r,n){var a=ge.hasOwnProperty(t)?ge[t]:null;(a!==null?a.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Hf(t,r,a,n)&&(r=null),n||a===null?Bf(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):a.mustUseProperty?e[a.propertyName]=r===null?a.type===3?!1:"":r:(t=a.attributeName,n=a.attributeNamespace,r===null?e.removeAttribute(t):(a=a.type,r=a===3||a===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var gt=$f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Un=Symbol.for("react.element"),ir=Symbol.for("react.portal"),sr=Symbol.for("react.fragment"),Xi=Symbol.for("react.strict_mode"),Kl=Symbol.for("react.profiler"),Uu=Symbol.for("react.provider"),Bu=Symbol.for("react.context"),Zi=Symbol.for("react.forward_ref"),Gl=Symbol.for("react.suspense"),ql=Symbol.for("react.suspense_list"),Ji=Symbol.for("react.memo"),wt=Symbol.for("react.lazy"),Vu=Symbol.for("react.offscreen"),qs=Symbol.iterator;function Fr(e){return e===null||typeof e!="object"?null:(e=qs&&e[qs]||e["@@iterator"],typeof e=="function"?e:null)}var le=Object.assign,hl;function Kr(e){if(hl===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);hl=t&&t[1]||""}return`
|
|
34
|
+
`+hl+e}var vl=!1;function gl(e,t){if(!e||vl)return"";vl=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(f){var n=f}Reflect.construct(e,[],t)}else{try{t.call()}catch(f){n=f}e.call(t.prototype)}else{try{throw Error()}catch(f){n=f}e()}}catch(f){if(f&&n&&typeof f.stack=="string"){for(var a=f.stack.split(`
|
|
35
|
+
`),l=n.stack.split(`
|
|
36
|
+
`),s=a.length-1,o=l.length-1;1<=s&&0<=o&&a[s]!==l[o];)o--;for(;1<=s&&0<=o;s--,o--)if(a[s]!==l[o]){if(s!==1||o!==1)do if(s--,o--,0>o||a[s]!==l[o]){var u=`
|
|
37
|
+
`+a[s].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=s&&0<=o);break}}}finally{vl=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Kr(e):""}function Qf(e){switch(e.tag){case 5:return Kr(e.type);case 16:return Kr("Lazy");case 13:return Kr("Suspense");case 19:return Kr("SuspenseList");case 0:case 2:case 15:return e=gl(e.type,!1),e;case 11:return e=gl(e.type.render,!1),e;case 1:return e=gl(e.type,!0),e;default:return""}}function Xl(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case sr:return"Fragment";case ir:return"Portal";case Kl:return"Profiler";case Xi:return"StrictMode";case Gl:return"Suspense";case ql:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Bu:return(e.displayName||"Context")+".Consumer";case Uu:return(e._context.displayName||"Context")+".Provider";case Zi:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ji:return t=e.displayName||null,t!==null?t:Xl(e.type)||"Memo";case wt:t=e._payload,e=e._init;try{return Xl(e(t))}catch{}}return null}function Yf(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Xl(t);case 8:return t===Xi?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function _t(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Hu(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Kf(e){var t=Hu(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var a=r.get,l=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(s){n=""+s,l.call(this,s)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(s){n=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Bn(e){e._valueTracker||(e._valueTracker=Kf(e))}function Qu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=Hu(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function ya(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Zl(e,t){var r=t.checked;return le({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Xs(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=_t(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Yu(e,t){t=t.checked,t!=null&&qi(e,"checked",t,!1)}function Jl(e,t){Yu(e,t);var r=_t(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ei(e,t.type,r):t.hasOwnProperty("defaultValue")&&ei(e,t.type,_t(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Zs(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function ei(e,t,r){(t!=="number"||ya(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Gr=Array.isArray;function wr(e,t,r,n){if(e=e.options,t){t={};for(var a=0;a<r.length;a++)t["$"+r[a]]=!0;for(r=0;r<e.length;r++)a=t.hasOwnProperty("$"+e[r].value),e[r].selected!==a&&(e[r].selected=a),a&&n&&(e[r].defaultSelected=!0)}else{for(r=""+_t(r),t=null,a=0;a<e.length;a++){if(e[a].value===r){e[a].selected=!0,n&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function ti(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(P(91));return le({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Js(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(P(92));if(Gr(r)){if(1<r.length)throw Error(P(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:_t(r)}}function Ku(e,t){var r=_t(t.value),n=_t(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function eo(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Gu(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ri(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Gu(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Vn,qu=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,a){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,a)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Vn=Vn||document.createElement("div"),Vn.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Vn.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function mn(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var en={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},Gf=["Webkit","ms","Moz","O"];Object.keys(en).forEach(function(e){Gf.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),en[t]=en[e]})});function Xu(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||en.hasOwnProperty(e)&&en[e]?(""+t).trim():t+"px"}function Zu(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,a=Xu(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,a):e[r]=a}}var qf=le({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ni(e,t){if(t){if(qf[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(P(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(P(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(P(61))}if(t.style!=null&&typeof t.style!="object")throw Error(P(62))}}function ai(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var li=null;function es(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ii=null,br=null,kr=null;function to(e){if(e=zn(e)){if(typeof ii!="function")throw Error(P(280));var t=e.stateNode;t&&(t=Xa(t),ii(e.stateNode,e.type,t))}}function Ju(e){br?kr?kr.push(e):kr=[e]:br=e}function ec(){if(br){var e=br,t=kr;if(kr=br=null,to(e),t)for(e=0;e<t.length;e++)to(t[e])}}function tc(e,t){return e(t)}function rc(){}var xl=!1;function nc(e,t,r){if(xl)return e(t,r);xl=!0;try{return tc(e,t,r)}finally{xl=!1,(br!==null||kr!==null)&&(rc(),ec())}}function hn(e,t){var r=e.stateNode;if(r===null)return null;var n=Xa(r);if(n===null)return null;r=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(P(231,t,typeof r));return r}var si=!1;if(pt)try{var Dr={};Object.defineProperty(Dr,"passive",{get:function(){si=!0}}),window.addEventListener("test",Dr,Dr),window.removeEventListener("test",Dr,Dr)}catch{si=!1}function Xf(e,t,r,n,a,l,s,o,u){var f=Array.prototype.slice.call(arguments,3);try{t.apply(r,f)}catch(h){this.onError(h)}}var tn=!1,wa=null,ba=!1,oi=null,Zf={onError:function(e){tn=!0,wa=e}};function Jf(e,t,r,n,a,l,s,o,u){tn=!1,wa=null,Xf.apply(Zf,arguments)}function ep(e,t,r,n,a,l,s,o,u){if(Jf.apply(this,arguments),tn){if(tn){var f=wa;tn=!1,wa=null}else throw Error(P(198));ba||(ba=!0,oi=f)}}function nr(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function ac(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function ro(e){if(nr(e)!==e)throw Error(P(188))}function tp(e){var t=e.alternate;if(!t){if(t=nr(e),t===null)throw Error(P(188));return t!==e?null:e}for(var r=e,n=t;;){var a=r.return;if(a===null)break;var l=a.alternate;if(l===null){if(n=a.return,n!==null){r=n;continue}break}if(a.child===l.child){for(l=a.child;l;){if(l===r)return ro(a),e;if(l===n)return ro(a),t;l=l.sibling}throw Error(P(188))}if(r.return!==n.return)r=a,n=l;else{for(var s=!1,o=a.child;o;){if(o===r){s=!0,r=a,n=l;break}if(o===n){s=!0,n=a,r=l;break}o=o.sibling}if(!s){for(o=l.child;o;){if(o===r){s=!0,r=l,n=a;break}if(o===n){s=!0,n=l,r=a;break}o=o.sibling}if(!s)throw Error(P(189))}}if(r.alternate!==n)throw Error(P(190))}if(r.tag!==3)throw Error(P(188));return r.stateNode.current===r?e:t}function lc(e){return e=tp(e),e!==null?ic(e):null}function ic(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=ic(e);if(t!==null)return t;e=e.sibling}return null}var sc=_e.unstable_scheduleCallback,no=_e.unstable_cancelCallback,rp=_e.unstable_shouldYield,np=_e.unstable_requestPaint,oe=_e.unstable_now,ap=_e.unstable_getCurrentPriorityLevel,ts=_e.unstable_ImmediatePriority,oc=_e.unstable_UserBlockingPriority,ka=_e.unstable_NormalPriority,lp=_e.unstable_LowPriority,uc=_e.unstable_IdlePriority,Ya=null,at=null;function ip(e){if(at&&typeof at.onCommitFiberRoot=="function")try{at.onCommitFiberRoot(Ya,e,void 0,(e.current.flags&128)===128)}catch{}}var Xe=Math.clz32?Math.clz32:up,sp=Math.log,op=Math.LN2;function up(e){return e>>>=0,e===0?32:31-(sp(e)/op|0)|0}var Hn=64,Qn=4194304;function qr(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ja(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,a=e.suspendedLanes,l=e.pingedLanes,s=r&268435455;if(s!==0){var o=s&~a;o!==0?n=qr(o):(l&=s,l!==0&&(n=qr(l)))}else s=r&~a,s!==0?n=qr(s):l!==0&&(n=qr(l));if(n===0)return 0;if(t!==0&&t!==n&&!(t&a)&&(a=n&-n,l=t&-t,a>=l||a===16&&(l&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-Xe(t),a=1<<r,n|=e[r],t&=~a;return n}function cp(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function dp(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,a=e.expirationTimes,l=e.pendingLanes;0<l;){var s=31-Xe(l),o=1<<s,u=a[s];u===-1?(!(o&r)||o&n)&&(a[s]=cp(o,t)):u<=t&&(e.expiredLanes|=o),l&=~o}}function ui(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function cc(){var e=Hn;return Hn<<=1,!(Hn&4194240)&&(Hn=64),e}function yl(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function Rn(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Xe(t),e[t]=r}function fp(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<r;){var a=31-Xe(r),l=1<<a;t[a]=0,n[a]=-1,e[a]=-1,r&=~l}}function rs(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-Xe(r),a=1<<n;a&t|e[n]&t&&(e[n]|=t),r&=~a}}var G=0;function dc(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var fc,ns,pc,mc,hc,ci=!1,Yn=[],Et=null,Pt=null,Mt=null,vn=new Map,gn=new Map,kt=[],pp="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function ao(e,t){switch(e){case"focusin":case"focusout":Et=null;break;case"dragenter":case"dragleave":Pt=null;break;case"mouseover":case"mouseout":Mt=null;break;case"pointerover":case"pointerout":vn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":gn.delete(t.pointerId)}}function Wr(e,t,r,n,a,l){return e===null||e.nativeEvent!==l?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:l,targetContainers:[a]},t!==null&&(t=zn(t),t!==null&&ns(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function mp(e,t,r,n,a){switch(t){case"focusin":return Et=Wr(Et,e,t,r,n,a),!0;case"dragenter":return Pt=Wr(Pt,e,t,r,n,a),!0;case"mouseover":return Mt=Wr(Mt,e,t,r,n,a),!0;case"pointerover":var l=a.pointerId;return vn.set(l,Wr(vn.get(l)||null,e,t,r,n,a)),!0;case"gotpointercapture":return l=a.pointerId,gn.set(l,Wr(gn.get(l)||null,e,t,r,n,a)),!0}return!1}function vc(e){var t=Vt(e.target);if(t!==null){var r=nr(t);if(r!==null){if(t=r.tag,t===13){if(t=ac(r),t!==null){e.blockedOn=t,hc(e.priority,function(){pc(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function oa(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=di(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);li=n,r.target.dispatchEvent(n),li=null}else return t=zn(r),t!==null&&ns(t),e.blockedOn=r,!1;t.shift()}return!0}function lo(e,t,r){oa(e)&&r.delete(t)}function hp(){ci=!1,Et!==null&&oa(Et)&&(Et=null),Pt!==null&&oa(Pt)&&(Pt=null),Mt!==null&&oa(Mt)&&(Mt=null),vn.forEach(lo),gn.forEach(lo)}function $r(e,t){e.blockedOn===t&&(e.blockedOn=null,ci||(ci=!0,_e.unstable_scheduleCallback(_e.unstable_NormalPriority,hp)))}function xn(e){function t(a){return $r(a,e)}if(0<Yn.length){$r(Yn[0],e);for(var r=1;r<Yn.length;r++){var n=Yn[r];n.blockedOn===e&&(n.blockedOn=null)}}for(Et!==null&&$r(Et,e),Pt!==null&&$r(Pt,e),Mt!==null&&$r(Mt,e),vn.forEach(t),gn.forEach(t),r=0;r<kt.length;r++)n=kt[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<kt.length&&(r=kt[0],r.blockedOn===null);)vc(r),r.blockedOn===null&&kt.shift()}var jr=gt.ReactCurrentBatchConfig,Na=!0;function vp(e,t,r,n){var a=G,l=jr.transition;jr.transition=null;try{G=1,as(e,t,r,n)}finally{G=a,jr.transition=l}}function gp(e,t,r,n){var a=G,l=jr.transition;jr.transition=null;try{G=4,as(e,t,r,n)}finally{G=a,jr.transition=l}}function as(e,t,r,n){if(Na){var a=di(e,t,r,n);if(a===null)Ml(e,t,n,Sa,r),ao(e,n);else if(mp(a,e,t,r,n))n.stopPropagation();else if(ao(e,n),t&4&&-1<pp.indexOf(e)){for(;a!==null;){var l=zn(a);if(l!==null&&fc(l),l=di(e,t,r,n),l===null&&Ml(e,t,n,Sa,r),l===a)break;a=l}a!==null&&n.stopPropagation()}else Ml(e,t,n,null,r)}}var Sa=null;function di(e,t,r,n){if(Sa=null,e=es(n),e=Vt(e),e!==null)if(t=nr(e),t===null)e=null;else if(r=t.tag,r===13){if(e=ac(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Sa=e,null}function gc(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(ap()){case ts:return 1;case oc:return 4;case ka:case lp:return 16;case uc:return 536870912;default:return 16}default:return 16}}var Nt=null,ls=null,ua=null;function xc(){if(ua)return ua;var e,t=ls,r=t.length,n,a="value"in Nt?Nt.value:Nt.textContent,l=a.length;for(e=0;e<r&&t[e]===a[e];e++);var s=r-e;for(n=1;n<=s&&t[r-n]===a[l-n];n++);return ua=a.slice(e,1<n?1-n:void 0)}function ca(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Kn(){return!0}function io(){return!1}function Fe(e){function t(r,n,a,l,s){this._reactName=r,this._targetInst=a,this.type=n,this.nativeEvent=l,this.target=s,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(r=e[o],this[o]=r?r(l):l[o]);return this.isDefaultPrevented=(l.defaultPrevented!=null?l.defaultPrevented:l.returnValue===!1)?Kn:io,this.isPropagationStopped=io,this}return le(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Kn)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Kn)},persist:function(){},isPersistent:Kn}),t}var Or={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},is=Fe(Or),_n=le({},Or,{view:0,detail:0}),xp=Fe(_n),wl,bl,Ur,Ka=le({},_n,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ss,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Ur&&(Ur&&e.type==="mousemove"?(wl=e.screenX-Ur.screenX,bl=e.screenY-Ur.screenY):bl=wl=0,Ur=e),wl)},movementY:function(e){return"movementY"in e?e.movementY:bl}}),so=Fe(Ka),yp=le({},Ka,{dataTransfer:0}),wp=Fe(yp),bp=le({},_n,{relatedTarget:0}),kl=Fe(bp),kp=le({},Or,{animationName:0,elapsedTime:0,pseudoElement:0}),jp=Fe(kp),Np=le({},Or,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Sp=Fe(Np),Cp=le({},Or,{data:0}),oo=Fe(Cp),Ep={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Pp={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"},Mp={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ap(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Mp[e])?!!t[e]:!1}function ss(){return Ap}var Ip=le({},_n,{key:function(e){if(e.key){var t=Ep[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ca(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Pp[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ss,charCode:function(e){return e.type==="keypress"?ca(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ca(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Tp=Fe(Ip),Lp=le({},Ka,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),uo=Fe(Lp),Op=le({},_n,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ss}),Rp=Fe(Op),_p=le({},Or,{propertyName:0,elapsedTime:0,pseudoElement:0}),zp=Fe(_p),Fp=le({},Ka,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Dp=Fe(Fp),Wp=[9,13,27,32],os=pt&&"CompositionEvent"in window,rn=null;pt&&"documentMode"in document&&(rn=document.documentMode);var $p=pt&&"TextEvent"in window&&!rn,yc=pt&&(!os||rn&&8<rn&&11>=rn),co=" ",fo=!1;function wc(e,t){switch(e){case"keyup":return Wp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function bc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var or=!1;function Up(e,t){switch(e){case"compositionend":return bc(t);case"keypress":return t.which!==32?null:(fo=!0,co);case"textInput":return e=t.data,e===co&&fo?null:e;default:return null}}function Bp(e,t){if(or)return e==="compositionend"||!os&&wc(e,t)?(e=xc(),ua=ls=Nt=null,or=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return yc&&t.locale!=="ko"?null:t.data;default:return null}}var Vp={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 po(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Vp[e.type]:t==="textarea"}function kc(e,t,r,n){Ju(n),t=Ca(t,"onChange"),0<t.length&&(r=new is("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var nn=null,yn=null;function Hp(e){Lc(e,0)}function Ga(e){var t=dr(e);if(Qu(t))return e}function Qp(e,t){if(e==="change")return t}var jc=!1;if(pt){var jl;if(pt){var Nl="oninput"in document;if(!Nl){var mo=document.createElement("div");mo.setAttribute("oninput","return;"),Nl=typeof mo.oninput=="function"}jl=Nl}else jl=!1;jc=jl&&(!document.documentMode||9<document.documentMode)}function ho(){nn&&(nn.detachEvent("onpropertychange",Nc),yn=nn=null)}function Nc(e){if(e.propertyName==="value"&&Ga(yn)){var t=[];kc(t,yn,e,es(e)),nc(Hp,t)}}function Yp(e,t,r){e==="focusin"?(ho(),nn=t,yn=r,nn.attachEvent("onpropertychange",Nc)):e==="focusout"&&ho()}function Kp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ga(yn)}function Gp(e,t){if(e==="click")return Ga(t)}function qp(e,t){if(e==="input"||e==="change")return Ga(t)}function Xp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Je=typeof Object.is=="function"?Object.is:Xp;function wn(e,t){if(Je(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var a=r[n];if(!Yl.call(t,a)||!Je(e[a],t[a]))return!1}return!0}function vo(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function go(e,t){var r=vo(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=vo(r)}}function Sc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Sc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Cc(){for(var e=window,t=ya();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=ya(e.document)}return t}function us(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Zp(e){var t=Cc(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&Sc(r.ownerDocument.documentElement,r)){if(n!==null&&us(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var a=r.textContent.length,l=Math.min(n.start,a);n=n.end===void 0?l:Math.min(n.end,a),!e.extend&&l>n&&(a=n,n=l,l=a),a=go(r,l);var s=go(r,n);a&&s&&(e.rangeCount!==1||e.anchorNode!==a.node||e.anchorOffset!==a.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(a.node,a.offset),e.removeAllRanges(),l>n?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Jp=pt&&"documentMode"in document&&11>=document.documentMode,ur=null,fi=null,an=null,pi=!1;function xo(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;pi||ur==null||ur!==ya(n)||(n=ur,"selectionStart"in n&&us(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),an&&wn(an,n)||(an=n,n=Ca(fi,"onSelect"),0<n.length&&(t=new is("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=ur)))}function Gn(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var cr={animationend:Gn("Animation","AnimationEnd"),animationiteration:Gn("Animation","AnimationIteration"),animationstart:Gn("Animation","AnimationStart"),transitionend:Gn("Transition","TransitionEnd")},Sl={},Ec={};pt&&(Ec=document.createElement("div").style,"AnimationEvent"in window||(delete cr.animationend.animation,delete cr.animationiteration.animation,delete cr.animationstart.animation),"TransitionEvent"in window||delete cr.transitionend.transition);function qa(e){if(Sl[e])return Sl[e];if(!cr[e])return e;var t=cr[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in Ec)return Sl[e]=t[r];return e}var Pc=qa("animationend"),Mc=qa("animationiteration"),Ac=qa("animationstart"),Ic=qa("transitionend"),Tc=new Map,yo="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Ft(e,t){Tc.set(e,t),rr(t,[e])}for(var Cl=0;Cl<yo.length;Cl++){var El=yo[Cl],em=El.toLowerCase(),tm=El[0].toUpperCase()+El.slice(1);Ft(em,"on"+tm)}Ft(Pc,"onAnimationEnd");Ft(Mc,"onAnimationIteration");Ft(Ac,"onAnimationStart");Ft("dblclick","onDoubleClick");Ft("focusin","onFocus");Ft("focusout","onBlur");Ft(Ic,"onTransitionEnd");Cr("onMouseEnter",["mouseout","mouseover"]);Cr("onMouseLeave",["mouseout","mouseover"]);Cr("onPointerEnter",["pointerout","pointerover"]);Cr("onPointerLeave",["pointerout","pointerover"]);rr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));rr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));rr("onBeforeInput",["compositionend","keypress","textInput","paste"]);rr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));rr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));rr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Xr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),rm=new Set("cancel close invalid load scroll toggle".split(" ").concat(Xr));function wo(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,ep(n,t,void 0,e),e.currentTarget=null}function Lc(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],a=n.event;n=n.listeners;e:{var l=void 0;if(t)for(var s=n.length-1;0<=s;s--){var o=n[s],u=o.instance,f=o.currentTarget;if(o=o.listener,u!==l&&a.isPropagationStopped())break e;wo(a,o,f),l=u}else for(s=0;s<n.length;s++){if(o=n[s],u=o.instance,f=o.currentTarget,o=o.listener,u!==l&&a.isPropagationStopped())break e;wo(a,o,f),l=u}}}if(ba)throw e=oi,ba=!1,oi=null,e}function ee(e,t){var r=t[xi];r===void 0&&(r=t[xi]=new Set);var n=e+"__bubble";r.has(n)||(Oc(t,e,2,!1),r.add(n))}function Pl(e,t,r){var n=0;t&&(n|=4),Oc(r,e,n,t)}var qn="_reactListening"+Math.random().toString(36).slice(2);function bn(e){if(!e[qn]){e[qn]=!0,$u.forEach(function(r){r!=="selectionchange"&&(rm.has(r)||Pl(r,!1,e),Pl(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[qn]||(t[qn]=!0,Pl("selectionchange",!1,t))}}function Oc(e,t,r,n){switch(gc(t)){case 1:var a=vp;break;case 4:a=gp;break;default:a=as}r=a.bind(null,t,r,e),a=void 0,!si||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),n?a!==void 0?e.addEventListener(t,r,{capture:!0,passive:a}):e.addEventListener(t,r,!0):a!==void 0?e.addEventListener(t,r,{passive:a}):e.addEventListener(t,r,!1)}function Ml(e,t,r,n,a){var l=n;if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var s=n.tag;if(s===3||s===4){var o=n.stateNode.containerInfo;if(o===a||o.nodeType===8&&o.parentNode===a)break;if(s===4)for(s=n.return;s!==null;){var u=s.tag;if((u===3||u===4)&&(u=s.stateNode.containerInfo,u===a||u.nodeType===8&&u.parentNode===a))return;s=s.return}for(;o!==null;){if(s=Vt(o),s===null)return;if(u=s.tag,u===5||u===6){n=l=s;continue e}o=o.parentNode}}n=n.return}nc(function(){var f=l,h=es(r),m=[];e:{var p=Tc.get(e);if(p!==void 0){var b=is,y=e;switch(e){case"keypress":if(ca(r)===0)break e;case"keydown":case"keyup":b=Tp;break;case"focusin":y="focus",b=kl;break;case"focusout":y="blur",b=kl;break;case"beforeblur":case"afterblur":b=kl;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":b=so;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":b=wp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":b=Rp;break;case Pc:case Mc:case Ac:b=jp;break;case Ic:b=zp;break;case"scroll":b=xp;break;case"wheel":b=Dp;break;case"copy":case"cut":case"paste":b=Sp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":b=uo}var w=(t&4)!==0,C=!w&&e==="scroll",d=w?p!==null?p+"Capture":null:p;w=[];for(var c=f,v;c!==null;){v=c;var x=v.stateNode;if(v.tag===5&&x!==null&&(v=x,d!==null&&(x=hn(c,d),x!=null&&w.push(kn(c,x,v)))),C)break;c=c.return}0<w.length&&(p=new b(p,y,null,r,h),m.push({event:p,listeners:w}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",b=e==="mouseout"||e==="pointerout",p&&r!==li&&(y=r.relatedTarget||r.fromElement)&&(Vt(y)||y[mt]))break e;if((b||p)&&(p=h.window===h?h:(p=h.ownerDocument)?p.defaultView||p.parentWindow:window,b?(y=r.relatedTarget||r.toElement,b=f,y=y?Vt(y):null,y!==null&&(C=nr(y),y!==C||y.tag!==5&&y.tag!==6)&&(y=null)):(b=null,y=f),b!==y)){if(w=so,x="onMouseLeave",d="onMouseEnter",c="mouse",(e==="pointerout"||e==="pointerover")&&(w=uo,x="onPointerLeave",d="onPointerEnter",c="pointer"),C=b==null?p:dr(b),v=y==null?p:dr(y),p=new w(x,c+"leave",b,r,h),p.target=C,p.relatedTarget=v,x=null,Vt(h)===f&&(w=new w(d,c+"enter",y,r,h),w.target=v,w.relatedTarget=C,x=w),C=x,b&&y)t:{for(w=b,d=y,c=0,v=w;v;v=ar(v))c++;for(v=0,x=d;x;x=ar(x))v++;for(;0<c-v;)w=ar(w),c--;for(;0<v-c;)d=ar(d),v--;for(;c--;){if(w===d||d!==null&&w===d.alternate)break t;w=ar(w),d=ar(d)}w=null}else w=null;b!==null&&bo(m,p,b,w,!1),y!==null&&C!==null&&bo(m,C,y,w,!0)}}e:{if(p=f?dr(f):window,b=p.nodeName&&p.nodeName.toLowerCase(),b==="select"||b==="input"&&p.type==="file")var k=Qp;else if(po(p))if(jc)k=qp;else{k=Kp;var N=Yp}else(b=p.nodeName)&&b.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(k=Gp);if(k&&(k=k(e,f))){kc(m,k,r,h);break e}N&&N(e,p,f),e==="focusout"&&(N=p._wrapperState)&&N.controlled&&p.type==="number"&&ei(p,"number",p.value)}switch(N=f?dr(f):window,e){case"focusin":(po(N)||N.contentEditable==="true")&&(ur=N,fi=f,an=null);break;case"focusout":an=fi=ur=null;break;case"mousedown":pi=!0;break;case"contextmenu":case"mouseup":case"dragend":pi=!1,xo(m,r,h);break;case"selectionchange":if(Jp)break;case"keydown":case"keyup":xo(m,r,h)}var E;if(os)e:{switch(e){case"compositionstart":var T="onCompositionStart";break e;case"compositionend":T="onCompositionEnd";break e;case"compositionupdate":T="onCompositionUpdate";break e}T=void 0}else or?wc(e,r)&&(T="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(T="onCompositionStart");T&&(yc&&r.locale!=="ko"&&(or||T!=="onCompositionStart"?T==="onCompositionEnd"&&or&&(E=xc()):(Nt=h,ls="value"in Nt?Nt.value:Nt.textContent,or=!0)),N=Ca(f,T),0<N.length&&(T=new oo(T,e,null,r,h),m.push({event:T,listeners:N}),E?T.data=E:(E=bc(r),E!==null&&(T.data=E)))),(E=$p?Up(e,r):Bp(e,r))&&(f=Ca(f,"onBeforeInput"),0<f.length&&(h=new oo("onBeforeInput","beforeinput",null,r,h),m.push({event:h,listeners:f}),h.data=E))}Lc(m,t)})}function kn(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Ca(e,t){for(var r=t+"Capture",n=[];e!==null;){var a=e,l=a.stateNode;a.tag===5&&l!==null&&(a=l,l=hn(e,r),l!=null&&n.unshift(kn(e,l,a)),l=hn(e,t),l!=null&&n.push(kn(e,l,a))),e=e.return}return n}function ar(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function bo(e,t,r,n,a){for(var l=t._reactName,s=[];r!==null&&r!==n;){var o=r,u=o.alternate,f=o.stateNode;if(u!==null&&u===n)break;o.tag===5&&f!==null&&(o=f,a?(u=hn(r,l),u!=null&&s.unshift(kn(r,u,o))):a||(u=hn(r,l),u!=null&&s.push(kn(r,u,o)))),r=r.return}s.length!==0&&e.push({event:t,listeners:s})}var nm=/\r\n?/g,am=/\u0000|\uFFFD/g;function ko(e){return(typeof e=="string"?e:""+e).replace(nm,`
|
|
38
|
+
`).replace(am,"")}function Xn(e,t,r){if(t=ko(t),ko(e)!==t&&r)throw Error(P(425))}function Ea(){}var mi=null,hi=null;function vi(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var gi=typeof setTimeout=="function"?setTimeout:void 0,lm=typeof clearTimeout=="function"?clearTimeout:void 0,jo=typeof Promise=="function"?Promise:void 0,im=typeof queueMicrotask=="function"?queueMicrotask:typeof jo<"u"?function(e){return jo.resolve(null).then(e).catch(sm)}:gi;function sm(e){setTimeout(function(){throw e})}function Al(e,t){var r=t,n=0;do{var a=r.nextSibling;if(e.removeChild(r),a&&a.nodeType===8)if(r=a.data,r==="/$"){if(n===0){e.removeChild(a),xn(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=a}while(r);xn(t)}function At(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function No(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var Rr=Math.random().toString(36).slice(2),nt="__reactFiber$"+Rr,jn="__reactProps$"+Rr,mt="__reactContainer$"+Rr,xi="__reactEvents$"+Rr,om="__reactListeners$"+Rr,um="__reactHandles$"+Rr;function Vt(e){var t=e[nt];if(t)return t;for(var r=e.parentNode;r;){if(t=r[mt]||r[nt]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=No(e);e!==null;){if(r=e[nt])return r;e=No(e)}return t}e=r,r=e.parentNode}return null}function zn(e){return e=e[nt]||e[mt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function dr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(P(33))}function Xa(e){return e[jn]||null}var yi=[],fr=-1;function Dt(e){return{current:e}}function te(e){0>fr||(e.current=yi[fr],yi[fr]=null,fr--)}function Z(e,t){fr++,yi[fr]=e.current,e.current=t}var zt={},ke=Dt(zt),Me=Dt(!1),qt=zt;function Er(e,t){var r=e.type.contextTypes;if(!r)return zt;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var a={},l;for(l in r)a[l]=t[l];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function Ae(e){return e=e.childContextTypes,e!=null}function Pa(){te(Me),te(ke)}function So(e,t,r){if(ke.current!==zt)throw Error(P(168));Z(ke,t),Z(Me,r)}function Rc(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var a in n)if(!(a in t))throw Error(P(108,Yf(e)||"Unknown",a));return le({},r,n)}function Ma(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||zt,qt=ke.current,Z(ke,e),Z(Me,Me.current),!0}function Co(e,t,r){var n=e.stateNode;if(!n)throw Error(P(169));r?(e=Rc(e,t,qt),n.__reactInternalMemoizedMergedChildContext=e,te(Me),te(ke),Z(ke,e)):te(Me),Z(Me,r)}var ot=null,Za=!1,Il=!1;function _c(e){ot===null?ot=[e]:ot.push(e)}function cm(e){Za=!0,_c(e)}function Wt(){if(!Il&&ot!==null){Il=!0;var e=0,t=G;try{var r=ot;for(G=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}ot=null,Za=!1}catch(a){throw ot!==null&&(ot=ot.slice(e+1)),sc(ts,Wt),a}finally{G=t,Il=!1}}return null}var pr=[],mr=0,Aa=null,Ia=0,De=[],We=0,Xt=null,ut=1,ct="";function $t(e,t){pr[mr++]=Ia,pr[mr++]=Aa,Aa=e,Ia=t}function zc(e,t,r){De[We++]=ut,De[We++]=ct,De[We++]=Xt,Xt=e;var n=ut;e=ct;var a=32-Xe(n)-1;n&=~(1<<a),r+=1;var l=32-Xe(t)+a;if(30<l){var s=a-a%5;l=(n&(1<<s)-1).toString(32),n>>=s,a-=s,ut=1<<32-Xe(t)+a|r<<a|n,ct=l+e}else ut=1<<l|r<<a|n,ct=e}function cs(e){e.return!==null&&($t(e,1),zc(e,1,0))}function ds(e){for(;e===Aa;)Aa=pr[--mr],pr[mr]=null,Ia=pr[--mr],pr[mr]=null;for(;e===Xt;)Xt=De[--We],De[We]=null,ct=De[--We],De[We]=null,ut=De[--We],De[We]=null}var Re=null,Oe=null,re=!1,qe=null;function Fc(e,t){var r=$e(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function Eo(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Re=e,Oe=At(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Re=e,Oe=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Xt!==null?{id:ut,overflow:ct}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=$e(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,Re=e,Oe=null,!0):!1;default:return!1}}function wi(e){return(e.mode&1)!==0&&(e.flags&128)===0}function bi(e){if(re){var t=Oe;if(t){var r=t;if(!Eo(e,t)){if(wi(e))throw Error(P(418));t=At(r.nextSibling);var n=Re;t&&Eo(e,t)?Fc(n,r):(e.flags=e.flags&-4097|2,re=!1,Re=e)}}else{if(wi(e))throw Error(P(418));e.flags=e.flags&-4097|2,re=!1,Re=e}}}function Po(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Re=e}function Zn(e){if(e!==Re)return!1;if(!re)return Po(e),re=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!vi(e.type,e.memoizedProps)),t&&(t=Oe)){if(wi(e))throw Dc(),Error(P(418));for(;t;)Fc(e,t),t=At(t.nextSibling)}if(Po(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(P(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){Oe=At(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}Oe=null}}else Oe=Re?At(e.stateNode.nextSibling):null;return!0}function Dc(){for(var e=Oe;e;)e=At(e.nextSibling)}function Pr(){Oe=Re=null,re=!1}function fs(e){qe===null?qe=[e]:qe.push(e)}var dm=gt.ReactCurrentBatchConfig;function Br(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(P(309));var n=r.stateNode}if(!n)throw Error(P(147,e));var a=n,l=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===l?t.ref:(t=function(s){var o=a.refs;s===null?delete o[l]:o[l]=s},t._stringRef=l,t)}if(typeof e!="string")throw Error(P(284));if(!r._owner)throw Error(P(290,e))}return e}function Jn(e,t){throw e=Object.prototype.toString.call(t),Error(P(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Mo(e){var t=e._init;return t(e._payload)}function Wc(e){function t(d,c){if(e){var v=d.deletions;v===null?(d.deletions=[c],d.flags|=16):v.push(c)}}function r(d,c){if(!e)return null;for(;c!==null;)t(d,c),c=c.sibling;return null}function n(d,c){for(d=new Map;c!==null;)c.key!==null?d.set(c.key,c):d.set(c.index,c),c=c.sibling;return d}function a(d,c){return d=Ot(d,c),d.index=0,d.sibling=null,d}function l(d,c,v){return d.index=v,e?(v=d.alternate,v!==null?(v=v.index,v<c?(d.flags|=2,c):v):(d.flags|=2,c)):(d.flags|=1048576,c)}function s(d){return e&&d.alternate===null&&(d.flags|=2),d}function o(d,c,v,x){return c===null||c.tag!==6?(c=Fl(v,d.mode,x),c.return=d,c):(c=a(c,v),c.return=d,c)}function u(d,c,v,x){var k=v.type;return k===sr?h(d,c,v.props.children,x,v.key):c!==null&&(c.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===wt&&Mo(k)===c.type)?(x=a(c,v.props),x.ref=Br(d,c,v),x.return=d,x):(x=ga(v.type,v.key,v.props,null,d.mode,x),x.ref=Br(d,c,v),x.return=d,x)}function f(d,c,v,x){return c===null||c.tag!==4||c.stateNode.containerInfo!==v.containerInfo||c.stateNode.implementation!==v.implementation?(c=Dl(v,d.mode,x),c.return=d,c):(c=a(c,v.children||[]),c.return=d,c)}function h(d,c,v,x,k){return c===null||c.tag!==7?(c=Kt(v,d.mode,x,k),c.return=d,c):(c=a(c,v),c.return=d,c)}function m(d,c,v){if(typeof c=="string"&&c!==""||typeof c=="number")return c=Fl(""+c,d.mode,v),c.return=d,c;if(typeof c=="object"&&c!==null){switch(c.$$typeof){case Un:return v=ga(c.type,c.key,c.props,null,d.mode,v),v.ref=Br(d,null,c),v.return=d,v;case ir:return c=Dl(c,d.mode,v),c.return=d,c;case wt:var x=c._init;return m(d,x(c._payload),v)}if(Gr(c)||Fr(c))return c=Kt(c,d.mode,v,null),c.return=d,c;Jn(d,c)}return null}function p(d,c,v,x){var k=c!==null?c.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return k!==null?null:o(d,c,""+v,x);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Un:return v.key===k?u(d,c,v,x):null;case ir:return v.key===k?f(d,c,v,x):null;case wt:return k=v._init,p(d,c,k(v._payload),x)}if(Gr(v)||Fr(v))return k!==null?null:h(d,c,v,x,null);Jn(d,v)}return null}function b(d,c,v,x,k){if(typeof x=="string"&&x!==""||typeof x=="number")return d=d.get(v)||null,o(c,d,""+x,k);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Un:return d=d.get(x.key===null?v:x.key)||null,u(c,d,x,k);case ir:return d=d.get(x.key===null?v:x.key)||null,f(c,d,x,k);case wt:var N=x._init;return b(d,c,v,N(x._payload),k)}if(Gr(x)||Fr(x))return d=d.get(v)||null,h(c,d,x,k,null);Jn(c,x)}return null}function y(d,c,v,x){for(var k=null,N=null,E=c,T=c=0,$=null;E!==null&&T<v.length;T++){E.index>T?($=E,E=null):$=E.sibling;var M=p(d,E,v[T],x);if(M===null){E===null&&(E=$);break}e&&E&&M.alternate===null&&t(d,E),c=l(M,c,T),N===null?k=M:N.sibling=M,N=M,E=$}if(T===v.length)return r(d,E),re&&$t(d,T),k;if(E===null){for(;T<v.length;T++)E=m(d,v[T],x),E!==null&&(c=l(E,c,T),N===null?k=E:N.sibling=E,N=E);return re&&$t(d,T),k}for(E=n(d,E);T<v.length;T++)$=b(E,d,T,v[T],x),$!==null&&(e&&$.alternate!==null&&E.delete($.key===null?T:$.key),c=l($,c,T),N===null?k=$:N.sibling=$,N=$);return e&&E.forEach(function(L){return t(d,L)}),re&&$t(d,T),k}function w(d,c,v,x){var k=Fr(v);if(typeof k!="function")throw Error(P(150));if(v=k.call(v),v==null)throw Error(P(151));for(var N=k=null,E=c,T=c=0,$=null,M=v.next();E!==null&&!M.done;T++,M=v.next()){E.index>T?($=E,E=null):$=E.sibling;var L=p(d,E,M.value,x);if(L===null){E===null&&(E=$);break}e&&E&&L.alternate===null&&t(d,E),c=l(L,c,T),N===null?k=L:N.sibling=L,N=L,E=$}if(M.done)return r(d,E),re&&$t(d,T),k;if(E===null){for(;!M.done;T++,M=v.next())M=m(d,M.value,x),M!==null&&(c=l(M,c,T),N===null?k=M:N.sibling=M,N=M);return re&&$t(d,T),k}for(E=n(d,E);!M.done;T++,M=v.next())M=b(E,d,T,M.value,x),M!==null&&(e&&M.alternate!==null&&E.delete(M.key===null?T:M.key),c=l(M,c,T),N===null?k=M:N.sibling=M,N=M);return e&&E.forEach(function(W){return t(d,W)}),re&&$t(d,T),k}function C(d,c,v,x){if(typeof v=="object"&&v!==null&&v.type===sr&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Un:e:{for(var k=v.key,N=c;N!==null;){if(N.key===k){if(k=v.type,k===sr){if(N.tag===7){r(d,N.sibling),c=a(N,v.props.children),c.return=d,d=c;break e}}else if(N.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===wt&&Mo(k)===N.type){r(d,N.sibling),c=a(N,v.props),c.ref=Br(d,N,v),c.return=d,d=c;break e}r(d,N);break}else t(d,N);N=N.sibling}v.type===sr?(c=Kt(v.props.children,d.mode,x,v.key),c.return=d,d=c):(x=ga(v.type,v.key,v.props,null,d.mode,x),x.ref=Br(d,c,v),x.return=d,d=x)}return s(d);case ir:e:{for(N=v.key;c!==null;){if(c.key===N)if(c.tag===4&&c.stateNode.containerInfo===v.containerInfo&&c.stateNode.implementation===v.implementation){r(d,c.sibling),c=a(c,v.children||[]),c.return=d,d=c;break e}else{r(d,c);break}else t(d,c);c=c.sibling}c=Dl(v,d.mode,x),c.return=d,d=c}return s(d);case wt:return N=v._init,C(d,c,N(v._payload),x)}if(Gr(v))return y(d,c,v,x);if(Fr(v))return w(d,c,v,x);Jn(d,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,c!==null&&c.tag===6?(r(d,c.sibling),c=a(c,v),c.return=d,d=c):(r(d,c),c=Fl(v,d.mode,x),c.return=d,d=c),s(d)):r(d,c)}return C}var Mr=Wc(!0),$c=Wc(!1),Ta=Dt(null),La=null,hr=null,ps=null;function ms(){ps=hr=La=null}function hs(e){var t=Ta.current;te(Ta),e._currentValue=t}function ki(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function Nr(e,t){La=e,ps=hr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Pe=!0),e.firstContext=null)}function Be(e){var t=e._currentValue;if(ps!==e)if(e={context:e,memoizedValue:t,next:null},hr===null){if(La===null)throw Error(P(308));hr=e,La.dependencies={lanes:0,firstContext:e}}else hr=hr.next=e;return t}var Ht=null;function vs(e){Ht===null?Ht=[e]:Ht.push(e)}function Uc(e,t,r,n){var a=t.interleaved;return a===null?(r.next=r,vs(t)):(r.next=a.next,a.next=r),t.interleaved=r,ht(e,n)}function ht(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var bt=!1;function gs(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Bc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function ft(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function It(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,Q&2){var a=n.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),n.pending=t,ht(e,r)}return a=n.interleaved,a===null?(t.next=t,vs(n)):(t.next=a.next,a.next=t),n.interleaved=t,ht(e,r)}function da(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,rs(e,r)}}function Ao(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var a=null,l=null;if(r=r.firstBaseUpdate,r!==null){do{var s={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};l===null?a=l=s:l=l.next=s,r=r.next}while(r!==null);l===null?a=l=t:l=l.next=t}else a=l=t;r={baseState:n.baseState,firstBaseUpdate:a,lastBaseUpdate:l,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Oa(e,t,r,n){var a=e.updateQueue;bt=!1;var l=a.firstBaseUpdate,s=a.lastBaseUpdate,o=a.shared.pending;if(o!==null){a.shared.pending=null;var u=o,f=u.next;u.next=null,s===null?l=f:s.next=f,s=u;var h=e.alternate;h!==null&&(h=h.updateQueue,o=h.lastBaseUpdate,o!==s&&(o===null?h.firstBaseUpdate=f:o.next=f,h.lastBaseUpdate=u))}if(l!==null){var m=a.baseState;s=0,h=f=u=null,o=l;do{var p=o.lane,b=o.eventTime;if((n&p)===p){h!==null&&(h=h.next={eventTime:b,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var y=e,w=o;switch(p=t,b=r,w.tag){case 1:if(y=w.payload,typeof y=="function"){m=y.call(b,m,p);break e}m=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=w.payload,p=typeof y=="function"?y.call(b,m,p):y,p==null)break e;m=le({},m,p);break e;case 2:bt=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,p=a.effects,p===null?a.effects=[o]:p.push(o))}else b={eventTime:b,lane:p,tag:o.tag,payload:o.payload,callback:o.callback,next:null},h===null?(f=h=b,u=m):h=h.next=b,s|=p;if(o=o.next,o===null){if(o=a.shared.pending,o===null)break;p=o,o=p.next,p.next=null,a.lastBaseUpdate=p,a.shared.pending=null}}while(!0);if(h===null&&(u=m),a.baseState=u,a.firstBaseUpdate=f,a.lastBaseUpdate=h,t=a.shared.interleaved,t!==null){a=t;do s|=a.lane,a=a.next;while(a!==t)}else l===null&&(a.shared.lanes=0);Jt|=s,e.lanes=s,e.memoizedState=m}}function Io(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],a=n.callback;if(a!==null){if(n.callback=null,n=r,typeof a!="function")throw Error(P(191,a));a.call(n)}}}var Fn={},lt=Dt(Fn),Nn=Dt(Fn),Sn=Dt(Fn);function Qt(e){if(e===Fn)throw Error(P(174));return e}function xs(e,t){switch(Z(Sn,t),Z(Nn,e),Z(lt,Fn),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ri(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=ri(t,e)}te(lt),Z(lt,t)}function Ar(){te(lt),te(Nn),te(Sn)}function Vc(e){Qt(Sn.current);var t=Qt(lt.current),r=ri(t,e.type);t!==r&&(Z(Nn,e),Z(lt,r))}function ys(e){Nn.current===e&&(te(lt),te(Nn))}var ne=Dt(0);function Ra(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Tl=[];function ws(){for(var e=0;e<Tl.length;e++)Tl[e]._workInProgressVersionPrimary=null;Tl.length=0}var fa=gt.ReactCurrentDispatcher,Ll=gt.ReactCurrentBatchConfig,Zt=0,ae=null,ce=null,pe=null,_a=!1,ln=!1,Cn=0,fm=0;function ye(){throw Error(P(321))}function bs(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Je(e[r],t[r]))return!1;return!0}function ks(e,t,r,n,a,l){if(Zt=l,ae=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,fa.current=e===null||e.memoizedState===null?vm:gm,e=r(n,a),ln){l=0;do{if(ln=!1,Cn=0,25<=l)throw Error(P(301));l+=1,pe=ce=null,t.updateQueue=null,fa.current=xm,e=r(n,a)}while(ln)}if(fa.current=za,t=ce!==null&&ce.next!==null,Zt=0,pe=ce=ae=null,_a=!1,t)throw Error(P(300));return e}function js(){var e=Cn!==0;return Cn=0,e}function rt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return pe===null?ae.memoizedState=pe=e:pe=pe.next=e,pe}function Ve(){if(ce===null){var e=ae.alternate;e=e!==null?e.memoizedState:null}else e=ce.next;var t=pe===null?ae.memoizedState:pe.next;if(t!==null)pe=t,ce=e;else{if(e===null)throw Error(P(310));ce=e,e={memoizedState:ce.memoizedState,baseState:ce.baseState,baseQueue:ce.baseQueue,queue:ce.queue,next:null},pe===null?ae.memoizedState=pe=e:pe=pe.next=e}return pe}function En(e,t){return typeof t=="function"?t(e):t}function Ol(e){var t=Ve(),r=t.queue;if(r===null)throw Error(P(311));r.lastRenderedReducer=e;var n=ce,a=n.baseQueue,l=r.pending;if(l!==null){if(a!==null){var s=a.next;a.next=l.next,l.next=s}n.baseQueue=a=l,r.pending=null}if(a!==null){l=a.next,n=n.baseState;var o=s=null,u=null,f=l;do{var h=f.lane;if((Zt&h)===h)u!==null&&(u=u.next={lane:0,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null}),n=f.hasEagerState?f.eagerState:e(n,f.action);else{var m={lane:h,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null};u===null?(o=u=m,s=n):u=u.next=m,ae.lanes|=h,Jt|=h}f=f.next}while(f!==null&&f!==l);u===null?s=n:u.next=o,Je(n,t.memoizedState)||(Pe=!0),t.memoizedState=n,t.baseState=s,t.baseQueue=u,r.lastRenderedState=n}if(e=r.interleaved,e!==null){a=e;do l=a.lane,ae.lanes|=l,Jt|=l,a=a.next;while(a!==e)}else a===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function Rl(e){var t=Ve(),r=t.queue;if(r===null)throw Error(P(311));r.lastRenderedReducer=e;var n=r.dispatch,a=r.pending,l=t.memoizedState;if(a!==null){r.pending=null;var s=a=a.next;do l=e(l,s.action),s=s.next;while(s!==a);Je(l,t.memoizedState)||(Pe=!0),t.memoizedState=l,t.baseQueue===null&&(t.baseState=l),r.lastRenderedState=l}return[l,n]}function Hc(){}function Qc(e,t){var r=ae,n=Ve(),a=t(),l=!Je(n.memoizedState,a);if(l&&(n.memoizedState=a,Pe=!0),n=n.queue,Ns(Gc.bind(null,r,n,e),[e]),n.getSnapshot!==t||l||pe!==null&&pe.memoizedState.tag&1){if(r.flags|=2048,Pn(9,Kc.bind(null,r,n,a,t),void 0,null),me===null)throw Error(P(349));Zt&30||Yc(r,t,a)}return a}function Yc(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=ae.updateQueue,t===null?(t={lastEffect:null,stores:null},ae.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function Kc(e,t,r,n){t.value=r,t.getSnapshot=n,qc(t)&&Xc(e)}function Gc(e,t,r){return r(function(){qc(t)&&Xc(e)})}function qc(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Je(e,r)}catch{return!0}}function Xc(e){var t=ht(e,1);t!==null&&Ze(t,e,1,-1)}function To(e){var t=rt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:En,lastRenderedState:e},t.queue=e,e=e.dispatch=hm.bind(null,ae,e),[t.memoizedState,e]}function Pn(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=ae.updateQueue,t===null?(t={lastEffect:null,stores:null},ae.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function Zc(){return Ve().memoizedState}function pa(e,t,r,n){var a=rt();ae.flags|=e,a.memoizedState=Pn(1|t,r,void 0,n===void 0?null:n)}function Ja(e,t,r,n){var a=Ve();n=n===void 0?null:n;var l=void 0;if(ce!==null){var s=ce.memoizedState;if(l=s.destroy,n!==null&&bs(n,s.deps)){a.memoizedState=Pn(t,r,l,n);return}}ae.flags|=e,a.memoizedState=Pn(1|t,r,l,n)}function Lo(e,t){return pa(8390656,8,e,t)}function Ns(e,t){return Ja(2048,8,e,t)}function Jc(e,t){return Ja(4,2,e,t)}function ed(e,t){return Ja(4,4,e,t)}function td(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function rd(e,t,r){return r=r!=null?r.concat([e]):null,Ja(4,4,td.bind(null,t,e),r)}function Ss(){}function nd(e,t){var r=Ve();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&bs(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function ad(e,t){var r=Ve();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&bs(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function ld(e,t,r){return Zt&21?(Je(r,t)||(r=cc(),ae.lanes|=r,Jt|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Pe=!0),e.memoizedState=r)}function pm(e,t){var r=G;G=r!==0&&4>r?r:4,e(!0);var n=Ll.transition;Ll.transition={};try{e(!1),t()}finally{G=r,Ll.transition=n}}function id(){return Ve().memoizedState}function mm(e,t,r){var n=Lt(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},sd(e))od(t,r);else if(r=Uc(e,t,r,n),r!==null){var a=Ne();Ze(r,e,n,a),ud(r,t,n)}}function hm(e,t,r){var n=Lt(e),a={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(sd(e))od(t,a);else{var l=e.alternate;if(e.lanes===0&&(l===null||l.lanes===0)&&(l=t.lastRenderedReducer,l!==null))try{var s=t.lastRenderedState,o=l(s,r);if(a.hasEagerState=!0,a.eagerState=o,Je(o,s)){var u=t.interleaved;u===null?(a.next=a,vs(t)):(a.next=u.next,u.next=a),t.interleaved=a;return}}catch{}finally{}r=Uc(e,t,a,n),r!==null&&(a=Ne(),Ze(r,e,n,a),ud(r,t,n))}}function sd(e){var t=e.alternate;return e===ae||t!==null&&t===ae}function od(e,t){ln=_a=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function ud(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,rs(e,r)}}var za={readContext:Be,useCallback:ye,useContext:ye,useEffect:ye,useImperativeHandle:ye,useInsertionEffect:ye,useLayoutEffect:ye,useMemo:ye,useReducer:ye,useRef:ye,useState:ye,useDebugValue:ye,useDeferredValue:ye,useTransition:ye,useMutableSource:ye,useSyncExternalStore:ye,useId:ye,unstable_isNewReconciler:!1},vm={readContext:Be,useCallback:function(e,t){return rt().memoizedState=[e,t===void 0?null:t],e},useContext:Be,useEffect:Lo,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,pa(4194308,4,td.bind(null,t,e),r)},useLayoutEffect:function(e,t){return pa(4194308,4,e,t)},useInsertionEffect:function(e,t){return pa(4,2,e,t)},useMemo:function(e,t){var r=rt();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=rt();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=mm.bind(null,ae,e),[n.memoizedState,e]},useRef:function(e){var t=rt();return e={current:e},t.memoizedState=e},useState:To,useDebugValue:Ss,useDeferredValue:function(e){return rt().memoizedState=e},useTransition:function(){var e=To(!1),t=e[0];return e=pm.bind(null,e[1]),rt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=ae,a=rt();if(re){if(r===void 0)throw Error(P(407));r=r()}else{if(r=t(),me===null)throw Error(P(349));Zt&30||Yc(n,t,r)}a.memoizedState=r;var l={value:r,getSnapshot:t};return a.queue=l,Lo(Gc.bind(null,n,l,e),[e]),n.flags|=2048,Pn(9,Kc.bind(null,n,l,r,t),void 0,null),r},useId:function(){var e=rt(),t=me.identifierPrefix;if(re){var r=ct,n=ut;r=(n&~(1<<32-Xe(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Cn++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=fm++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},gm={readContext:Be,useCallback:nd,useContext:Be,useEffect:Ns,useImperativeHandle:rd,useInsertionEffect:Jc,useLayoutEffect:ed,useMemo:ad,useReducer:Ol,useRef:Zc,useState:function(){return Ol(En)},useDebugValue:Ss,useDeferredValue:function(e){var t=Ve();return ld(t,ce.memoizedState,e)},useTransition:function(){var e=Ol(En)[0],t=Ve().memoizedState;return[e,t]},useMutableSource:Hc,useSyncExternalStore:Qc,useId:id,unstable_isNewReconciler:!1},xm={readContext:Be,useCallback:nd,useContext:Be,useEffect:Ns,useImperativeHandle:rd,useInsertionEffect:Jc,useLayoutEffect:ed,useMemo:ad,useReducer:Rl,useRef:Zc,useState:function(){return Rl(En)},useDebugValue:Ss,useDeferredValue:function(e){var t=Ve();return ce===null?t.memoizedState=e:ld(t,ce.memoizedState,e)},useTransition:function(){var e=Rl(En)[0],t=Ve().memoizedState;return[e,t]},useMutableSource:Hc,useSyncExternalStore:Qc,useId:id,unstable_isNewReconciler:!1};function Ke(e,t){if(e&&e.defaultProps){t=le({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function ji(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:le({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var el={isMounted:function(e){return(e=e._reactInternals)?nr(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=Ne(),a=Lt(e),l=ft(n,a);l.payload=t,r!=null&&(l.callback=r),t=It(e,l,a),t!==null&&(Ze(t,e,a,n),da(t,e,a))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=Ne(),a=Lt(e),l=ft(n,a);l.tag=1,l.payload=t,r!=null&&(l.callback=r),t=It(e,l,a),t!==null&&(Ze(t,e,a,n),da(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Ne(),n=Lt(e),a=ft(r,n);a.tag=2,t!=null&&(a.callback=t),t=It(e,a,n),t!==null&&(Ze(t,e,n,r),da(t,e,n))}};function Oo(e,t,r,n,a,l,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,l,s):t.prototype&&t.prototype.isPureReactComponent?!wn(r,n)||!wn(a,l):!0}function cd(e,t,r){var n=!1,a=zt,l=t.contextType;return typeof l=="object"&&l!==null?l=Be(l):(a=Ae(t)?qt:ke.current,n=t.contextTypes,l=(n=n!=null)?Er(e,a):zt),t=new t(r,l),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=el,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=a,e.__reactInternalMemoizedMaskedChildContext=l),t}function Ro(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&el.enqueueReplaceState(t,t.state,null)}function Ni(e,t,r,n){var a=e.stateNode;a.props=r,a.state=e.memoizedState,a.refs={},gs(e);var l=t.contextType;typeof l=="object"&&l!==null?a.context=Be(l):(l=Ae(t)?qt:ke.current,a.context=Er(e,l)),a.state=e.memoizedState,l=t.getDerivedStateFromProps,typeof l=="function"&&(ji(e,t,l,r),a.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof a.getSnapshotBeforeUpdate=="function"||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(t=a.state,typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount(),t!==a.state&&el.enqueueReplaceState(a,a.state,null),Oa(e,r,a,n),a.state=e.memoizedState),typeof a.componentDidMount=="function"&&(e.flags|=4194308)}function Ir(e,t){try{var r="",n=t;do r+=Qf(n),n=n.return;while(n);var a=r}catch(l){a=`
|
|
39
|
+
Error generating stack: `+l.message+`
|
|
40
|
+
`+l.stack}return{value:e,source:t,stack:a,digest:null}}function _l(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Si(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var ym=typeof WeakMap=="function"?WeakMap:Map;function dd(e,t,r){r=ft(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){Da||(Da=!0,Ri=n),Si(e,t)},r}function fd(e,t,r){r=ft(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var a=t.value;r.payload=function(){return n(a)},r.callback=function(){Si(e,t)}}var l=e.stateNode;return l!==null&&typeof l.componentDidCatch=="function"&&(r.callback=function(){Si(e,t),typeof n!="function"&&(Tt===null?Tt=new Set([this]):Tt.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),r}function _o(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new ym;var a=new Set;n.set(t,a)}else a=n.get(t),a===void 0&&(a=new Set,n.set(t,a));a.has(r)||(a.add(r),e=Lm.bind(null,e,t,r),t.then(e,e))}function zo(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Fo(e,t,r,n,a){return e.mode&1?(e.flags|=65536,e.lanes=a,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=ft(-1,1),t.tag=2,It(r,t,1))),r.lanes|=1),e)}var wm=gt.ReactCurrentOwner,Pe=!1;function je(e,t,r,n){t.child=e===null?$c(t,null,r,n):Mr(t,e.child,r,n)}function Do(e,t,r,n,a){r=r.render;var l=t.ref;return Nr(t,a),n=ks(e,t,r,n,l,a),r=js(),e!==null&&!Pe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,vt(e,t,a)):(re&&r&&cs(t),t.flags|=1,je(e,t,n,a),t.child)}function Wo(e,t,r,n,a){if(e===null){var l=r.type;return typeof l=="function"&&!Ls(l)&&l.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=l,pd(e,t,l,n,a)):(e=ga(r.type,null,n,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(l=e.child,!(e.lanes&a)){var s=l.memoizedProps;if(r=r.compare,r=r!==null?r:wn,r(s,n)&&e.ref===t.ref)return vt(e,t,a)}return t.flags|=1,e=Ot(l,n),e.ref=t.ref,e.return=t,t.child=e}function pd(e,t,r,n,a){if(e!==null){var l=e.memoizedProps;if(wn(l,n)&&e.ref===t.ref)if(Pe=!1,t.pendingProps=n=l,(e.lanes&a)!==0)e.flags&131072&&(Pe=!0);else return t.lanes=e.lanes,vt(e,t,a)}return Ci(e,t,r,n,a)}function md(e,t,r){var n=t.pendingProps,a=n.children,l=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Z(gr,Te),Te|=r;else{if(!(r&1073741824))return e=l!==null?l.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Z(gr,Te),Te|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=l!==null?l.baseLanes:r,Z(gr,Te),Te|=n}else l!==null?(n=l.baseLanes|r,t.memoizedState=null):n=r,Z(gr,Te),Te|=n;return je(e,t,a,r),t.child}function hd(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function Ci(e,t,r,n,a){var l=Ae(r)?qt:ke.current;return l=Er(t,l),Nr(t,a),r=ks(e,t,r,n,l,a),n=js(),e!==null&&!Pe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,vt(e,t,a)):(re&&n&&cs(t),t.flags|=1,je(e,t,r,a),t.child)}function $o(e,t,r,n,a){if(Ae(r)){var l=!0;Ma(t)}else l=!1;if(Nr(t,a),t.stateNode===null)ma(e,t),cd(t,r,n),Ni(t,r,n,a),n=!0;else if(e===null){var s=t.stateNode,o=t.memoizedProps;s.props=o;var u=s.context,f=r.contextType;typeof f=="object"&&f!==null?f=Be(f):(f=Ae(r)?qt:ke.current,f=Er(t,f));var h=r.getDerivedStateFromProps,m=typeof h=="function"||typeof s.getSnapshotBeforeUpdate=="function";m||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(o!==n||u!==f)&&Ro(t,s,n,f),bt=!1;var p=t.memoizedState;s.state=p,Oa(t,n,s,a),u=t.memoizedState,o!==n||p!==u||Me.current||bt?(typeof h=="function"&&(ji(t,r,h,n),u=t.memoizedState),(o=bt||Oo(t,r,o,n,p,u,f))?(m||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=u),s.props=n,s.state=u,s.context=f,n=o):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{s=t.stateNode,Bc(e,t),o=t.memoizedProps,f=t.type===t.elementType?o:Ke(t.type,o),s.props=f,m=t.pendingProps,p=s.context,u=r.contextType,typeof u=="object"&&u!==null?u=Be(u):(u=Ae(r)?qt:ke.current,u=Er(t,u));var b=r.getDerivedStateFromProps;(h=typeof b=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(o!==m||p!==u)&&Ro(t,s,n,u),bt=!1,p=t.memoizedState,s.state=p,Oa(t,n,s,a);var y=t.memoizedState;o!==m||p!==y||Me.current||bt?(typeof b=="function"&&(ji(t,r,b,n),y=t.memoizedState),(f=bt||Oo(t,r,f,n,p,y,u)||!1)?(h||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(n,y,u),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(n,y,u)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||o===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=y),s.props=n,s.state=y,s.context=u,n=f):(typeof s.componentDidUpdate!="function"||o===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),n=!1)}return Ei(e,t,r,n,l,a)}function Ei(e,t,r,n,a,l){hd(e,t);var s=(t.flags&128)!==0;if(!n&&!s)return a&&Co(t,r,!1),vt(e,t,l);n=t.stateNode,wm.current=t;var o=s&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&s?(t.child=Mr(t,e.child,null,l),t.child=Mr(t,null,o,l)):je(e,t,o,l),t.memoizedState=n.state,a&&Co(t,r,!0),t.child}function vd(e){var t=e.stateNode;t.pendingContext?So(e,t.pendingContext,t.pendingContext!==t.context):t.context&&So(e,t.context,!1),xs(e,t.containerInfo)}function Uo(e,t,r,n,a){return Pr(),fs(a),t.flags|=256,je(e,t,r,n),t.child}var Pi={dehydrated:null,treeContext:null,retryLane:0};function Mi(e){return{baseLanes:e,cachePool:null,transitions:null}}function gd(e,t,r){var n=t.pendingProps,a=ne.current,l=!1,s=(t.flags&128)!==0,o;if((o=s)||(o=e!==null&&e.memoizedState===null?!1:(a&2)!==0),o?(l=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(a|=1),Z(ne,a&1),e===null)return bi(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=n.children,e=n.fallback,l?(n=t.mode,l=t.child,s={mode:"hidden",children:s},!(n&1)&&l!==null?(l.childLanes=0,l.pendingProps=s):l=nl(s,n,0,null),e=Kt(e,n,r,null),l.return=t,e.return=t,l.sibling=e,t.child=l,t.child.memoizedState=Mi(r),t.memoizedState=Pi,e):Cs(t,s));if(a=e.memoizedState,a!==null&&(o=a.dehydrated,o!==null))return bm(e,t,s,n,o,a,r);if(l){l=n.fallback,s=t.mode,a=e.child,o=a.sibling;var u={mode:"hidden",children:n.children};return!(s&1)&&t.child!==a?(n=t.child,n.childLanes=0,n.pendingProps=u,t.deletions=null):(n=Ot(a,u),n.subtreeFlags=a.subtreeFlags&14680064),o!==null?l=Ot(o,l):(l=Kt(l,s,r,null),l.flags|=2),l.return=t,n.return=t,n.sibling=l,t.child=n,n=l,l=t.child,s=e.child.memoizedState,s=s===null?Mi(r):{baseLanes:s.baseLanes|r,cachePool:null,transitions:s.transitions},l.memoizedState=s,l.childLanes=e.childLanes&~r,t.memoizedState=Pi,n}return l=e.child,e=l.sibling,n=Ot(l,{mode:"visible",children:n.children}),!(t.mode&1)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function Cs(e,t){return t=nl({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function ea(e,t,r,n){return n!==null&&fs(n),Mr(t,e.child,null,r),e=Cs(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function bm(e,t,r,n,a,l,s){if(r)return t.flags&256?(t.flags&=-257,n=_l(Error(P(422))),ea(e,t,s,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(l=n.fallback,a=t.mode,n=nl({mode:"visible",children:n.children},a,0,null),l=Kt(l,a,s,null),l.flags|=2,n.return=t,l.return=t,n.sibling=l,t.child=n,t.mode&1&&Mr(t,e.child,null,s),t.child.memoizedState=Mi(s),t.memoizedState=Pi,l);if(!(t.mode&1))return ea(e,t,s,null);if(a.data==="$!"){if(n=a.nextSibling&&a.nextSibling.dataset,n)var o=n.dgst;return n=o,l=Error(P(419)),n=_l(l,n,void 0),ea(e,t,s,n)}if(o=(s&e.childLanes)!==0,Pe||o){if(n=me,n!==null){switch(s&-s){case 4:a=2;break;case 16:a=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:a=32;break;case 536870912:a=268435456;break;default:a=0}a=a&(n.suspendedLanes|s)?0:a,a!==0&&a!==l.retryLane&&(l.retryLane=a,ht(e,a),Ze(n,e,a,-1))}return Ts(),n=_l(Error(P(421))),ea(e,t,s,n)}return a.data==="$?"?(t.flags|=128,t.child=e.child,t=Om.bind(null,e),a._reactRetry=t,null):(e=l.treeContext,Oe=At(a.nextSibling),Re=t,re=!0,qe=null,e!==null&&(De[We++]=ut,De[We++]=ct,De[We++]=Xt,ut=e.id,ct=e.overflow,Xt=t),t=Cs(t,n.children),t.flags|=4096,t)}function Bo(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),ki(e.return,t,r)}function zl(e,t,r,n,a){var l=e.memoizedState;l===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:a}:(l.isBackwards=t,l.rendering=null,l.renderingStartTime=0,l.last=n,l.tail=r,l.tailMode=a)}function xd(e,t,r){var n=t.pendingProps,a=n.revealOrder,l=n.tail;if(je(e,t,n.children,r),n=ne.current,n&2)n=n&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Bo(e,r,t);else if(e.tag===19)Bo(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(Z(ne,n),!(t.mode&1))t.memoizedState=null;else switch(a){case"forwards":for(r=t.child,a=null;r!==null;)e=r.alternate,e!==null&&Ra(e)===null&&(a=r),r=r.sibling;r=a,r===null?(a=t.child,t.child=null):(a=r.sibling,r.sibling=null),zl(t,!1,a,r,l);break;case"backwards":for(r=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&Ra(e)===null){t.child=a;break}e=a.sibling,a.sibling=r,r=a,a=e}zl(t,!0,r,null,l);break;case"together":zl(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ma(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function vt(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Jt|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(P(153));if(t.child!==null){for(e=t.child,r=Ot(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Ot(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function km(e,t,r){switch(t.tag){case 3:vd(t),Pr();break;case 5:Vc(t);break;case 1:Ae(t.type)&&Ma(t);break;case 4:xs(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,a=t.memoizedProps.value;Z(Ta,n._currentValue),n._currentValue=a;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(Z(ne,ne.current&1),t.flags|=128,null):r&t.child.childLanes?gd(e,t,r):(Z(ne,ne.current&1),e=vt(e,t,r),e!==null?e.sibling:null);Z(ne,ne.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return xd(e,t,r);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),Z(ne,ne.current),n)break;return null;case 22:case 23:return t.lanes=0,md(e,t,r)}return vt(e,t,r)}var yd,Ai,wd,bd;yd=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};Ai=function(){};wd=function(e,t,r,n){var a=e.memoizedProps;if(a!==n){e=t.stateNode,Qt(lt.current);var l=null;switch(r){case"input":a=Zl(e,a),n=Zl(e,n),l=[];break;case"select":a=le({},a,{value:void 0}),n=le({},n,{value:void 0}),l=[];break;case"textarea":a=ti(e,a),n=ti(e,n),l=[];break;default:typeof a.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=Ea)}ni(r,n);var s;r=null;for(f in a)if(!n.hasOwnProperty(f)&&a.hasOwnProperty(f)&&a[f]!=null)if(f==="style"){var o=a[f];for(s in o)o.hasOwnProperty(s)&&(r||(r={}),r[s]="")}else f!=="dangerouslySetInnerHTML"&&f!=="children"&&f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&f!=="autoFocus"&&(pn.hasOwnProperty(f)?l||(l=[]):(l=l||[]).push(f,null));for(f in n){var u=n[f];if(o=a!=null?a[f]:void 0,n.hasOwnProperty(f)&&u!==o&&(u!=null||o!=null))if(f==="style")if(o){for(s in o)!o.hasOwnProperty(s)||u&&u.hasOwnProperty(s)||(r||(r={}),r[s]="");for(s in u)u.hasOwnProperty(s)&&o[s]!==u[s]&&(r||(r={}),r[s]=u[s])}else r||(l||(l=[]),l.push(f,r)),r=u;else f==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,o=o?o.__html:void 0,u!=null&&o!==u&&(l=l||[]).push(f,u)):f==="children"?typeof u!="string"&&typeof u!="number"||(l=l||[]).push(f,""+u):f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&(pn.hasOwnProperty(f)?(u!=null&&f==="onScroll"&&ee("scroll",e),l||o===u||(l=[])):(l=l||[]).push(f,u))}r&&(l=l||[]).push("style",r);var f=l;(t.updateQueue=f)&&(t.flags|=4)}};bd=function(e,t,r,n){r!==n&&(t.flags|=4)};function Vr(e,t){if(!re)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function we(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var a=e.child;a!==null;)r|=a.lanes|a.childLanes,n|=a.subtreeFlags&14680064,n|=a.flags&14680064,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)r|=a.lanes|a.childLanes,n|=a.subtreeFlags,n|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function jm(e,t,r){var n=t.pendingProps;switch(ds(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return we(t),null;case 1:return Ae(t.type)&&Pa(),we(t),null;case 3:return n=t.stateNode,Ar(),te(Me),te(ke),ws(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Zn(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,qe!==null&&(Fi(qe),qe=null))),Ai(e,t),we(t),null;case 5:ys(t);var a=Qt(Sn.current);if(r=t.type,e!==null&&t.stateNode!=null)wd(e,t,r,n,a),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(P(166));return we(t),null}if(e=Qt(lt.current),Zn(t)){n=t.stateNode,r=t.type;var l=t.memoizedProps;switch(n[nt]=t,n[jn]=l,e=(t.mode&1)!==0,r){case"dialog":ee("cancel",n),ee("close",n);break;case"iframe":case"object":case"embed":ee("load",n);break;case"video":case"audio":for(a=0;a<Xr.length;a++)ee(Xr[a],n);break;case"source":ee("error",n);break;case"img":case"image":case"link":ee("error",n),ee("load",n);break;case"details":ee("toggle",n);break;case"input":Xs(n,l),ee("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!l.multiple},ee("invalid",n);break;case"textarea":Js(n,l),ee("invalid",n)}ni(r,l),a=null;for(var s in l)if(l.hasOwnProperty(s)){var o=l[s];s==="children"?typeof o=="string"?n.textContent!==o&&(l.suppressHydrationWarning!==!0&&Xn(n.textContent,o,e),a=["children",o]):typeof o=="number"&&n.textContent!==""+o&&(l.suppressHydrationWarning!==!0&&Xn(n.textContent,o,e),a=["children",""+o]):pn.hasOwnProperty(s)&&o!=null&&s==="onScroll"&&ee("scroll",n)}switch(r){case"input":Bn(n),Zs(n,l,!0);break;case"textarea":Bn(n),eo(n);break;case"select":case"option":break;default:typeof l.onClick=="function"&&(n.onclick=Ea)}n=a,t.updateQueue=n,n!==null&&(t.flags|=4)}else{s=a.nodeType===9?a:a.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Gu(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=s.createElement(r,{is:n.is}):(e=s.createElement(r),r==="select"&&(s=e,n.multiple?s.multiple=!0:n.size&&(s.size=n.size))):e=s.createElementNS(e,r),e[nt]=t,e[jn]=n,yd(e,t,!1,!1),t.stateNode=e;e:{switch(s=ai(r,n),r){case"dialog":ee("cancel",e),ee("close",e),a=n;break;case"iframe":case"object":case"embed":ee("load",e),a=n;break;case"video":case"audio":for(a=0;a<Xr.length;a++)ee(Xr[a],e);a=n;break;case"source":ee("error",e),a=n;break;case"img":case"image":case"link":ee("error",e),ee("load",e),a=n;break;case"details":ee("toggle",e),a=n;break;case"input":Xs(e,n),a=Zl(e,n),ee("invalid",e);break;case"option":a=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},a=le({},n,{value:void 0}),ee("invalid",e);break;case"textarea":Js(e,n),a=ti(e,n),ee("invalid",e);break;default:a=n}ni(r,a),o=a;for(l in o)if(o.hasOwnProperty(l)){var u=o[l];l==="style"?Zu(e,u):l==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&qu(e,u)):l==="children"?typeof u=="string"?(r!=="textarea"||u!=="")&&mn(e,u):typeof u=="number"&&mn(e,""+u):l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&l!=="autoFocus"&&(pn.hasOwnProperty(l)?u!=null&&l==="onScroll"&&ee("scroll",e):u!=null&&qi(e,l,u,s))}switch(r){case"input":Bn(e),Zs(e,n,!1);break;case"textarea":Bn(e),eo(e);break;case"option":n.value!=null&&e.setAttribute("value",""+_t(n.value));break;case"select":e.multiple=!!n.multiple,l=n.value,l!=null?wr(e,!!n.multiple,l,!1):n.defaultValue!=null&&wr(e,!!n.multiple,n.defaultValue,!0);break;default:typeof a.onClick=="function"&&(e.onclick=Ea)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return we(t),null;case 6:if(e&&t.stateNode!=null)bd(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(P(166));if(r=Qt(Sn.current),Qt(lt.current),Zn(t)){if(n=t.stateNode,r=t.memoizedProps,n[nt]=t,(l=n.nodeValue!==r)&&(e=Re,e!==null))switch(e.tag){case 3:Xn(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Xn(n.nodeValue,r,(e.mode&1)!==0)}l&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[nt]=t,t.stateNode=n}return we(t),null;case 13:if(te(ne),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(re&&Oe!==null&&t.mode&1&&!(t.flags&128))Dc(),Pr(),t.flags|=98560,l=!1;else if(l=Zn(t),n!==null&&n.dehydrated!==null){if(e===null){if(!l)throw Error(P(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(P(317));l[nt]=t}else Pr(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;we(t),l=!1}else qe!==null&&(Fi(qe),qe=null),l=!0;if(!l)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,t.mode&1&&(e===null||ne.current&1?de===0&&(de=3):Ts())),t.updateQueue!==null&&(t.flags|=4),we(t),null);case 4:return Ar(),Ai(e,t),e===null&&bn(t.stateNode.containerInfo),we(t),null;case 10:return hs(t.type._context),we(t),null;case 17:return Ae(t.type)&&Pa(),we(t),null;case 19:if(te(ne),l=t.memoizedState,l===null)return we(t),null;if(n=(t.flags&128)!==0,s=l.rendering,s===null)if(n)Vr(l,!1);else{if(de!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=Ra(e),s!==null){for(t.flags|=128,Vr(l,!1),n=s.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)l=r,e=n,l.flags&=14680066,s=l.alternate,s===null?(l.childLanes=0,l.lanes=e,l.child=null,l.subtreeFlags=0,l.memoizedProps=null,l.memoizedState=null,l.updateQueue=null,l.dependencies=null,l.stateNode=null):(l.childLanes=s.childLanes,l.lanes=s.lanes,l.child=s.child,l.subtreeFlags=0,l.deletions=null,l.memoizedProps=s.memoizedProps,l.memoizedState=s.memoizedState,l.updateQueue=s.updateQueue,l.type=s.type,e=s.dependencies,l.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return Z(ne,ne.current&1|2),t.child}e=e.sibling}l.tail!==null&&oe()>Tr&&(t.flags|=128,n=!0,Vr(l,!1),t.lanes=4194304)}else{if(!n)if(e=Ra(s),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Vr(l,!0),l.tail===null&&l.tailMode==="hidden"&&!s.alternate&&!re)return we(t),null}else 2*oe()-l.renderingStartTime>Tr&&r!==1073741824&&(t.flags|=128,n=!0,Vr(l,!1),t.lanes=4194304);l.isBackwards?(s.sibling=t.child,t.child=s):(r=l.last,r!==null?r.sibling=s:t.child=s,l.last=s)}return l.tail!==null?(t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=oe(),t.sibling=null,r=ne.current,Z(ne,n?r&1|2:r&1),t):(we(t),null);case 22:case 23:return Is(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?Te&1073741824&&(we(t),t.subtreeFlags&6&&(t.flags|=8192)):we(t),null;case 24:return null;case 25:return null}throw Error(P(156,t.tag))}function Nm(e,t){switch(ds(t),t.tag){case 1:return Ae(t.type)&&Pa(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ar(),te(Me),te(ke),ws(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return ys(t),null;case 13:if(te(ne),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(P(340));Pr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return te(ne),null;case 4:return Ar(),null;case 10:return hs(t.type._context),null;case 22:case 23:return Is(),null;case 24:return null;default:return null}}var ta=!1,be=!1,Sm=typeof WeakSet=="function"?WeakSet:Set,O=null;function vr(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){ie(e,t,n)}else r.current=null}function Ii(e,t,r){try{r()}catch(n){ie(e,t,n)}}var Vo=!1;function Cm(e,t){if(mi=Na,e=Cc(),us(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var a=n.anchorOffset,l=n.focusNode;n=n.focusOffset;try{r.nodeType,l.nodeType}catch{r=null;break e}var s=0,o=-1,u=-1,f=0,h=0,m=e,p=null;t:for(;;){for(var b;m!==r||a!==0&&m.nodeType!==3||(o=s+a),m!==l||n!==0&&m.nodeType!==3||(u=s+n),m.nodeType===3&&(s+=m.nodeValue.length),(b=m.firstChild)!==null;)p=m,m=b;for(;;){if(m===e)break t;if(p===r&&++f===a&&(o=s),p===l&&++h===n&&(u=s),(b=m.nextSibling)!==null)break;m=p,p=m.parentNode}m=b}r=o===-1||u===-1?null:{start:o,end:u}}else r=null}r=r||{start:0,end:0}}else r=null;for(hi={focusedElem:e,selectionRange:r},Na=!1,O=t;O!==null;)if(t=O,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,O=e;else for(;O!==null;){t=O;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var w=y.memoizedProps,C=y.memoizedState,d=t.stateNode,c=d.getSnapshotBeforeUpdate(t.elementType===t.type?w:Ke(t.type,w),C);d.__reactInternalSnapshotBeforeUpdate=c}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(P(163))}}catch(x){ie(t,t.return,x)}if(e=t.sibling,e!==null){e.return=t.return,O=e;break}O=t.return}return y=Vo,Vo=!1,y}function sn(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var a=n=n.next;do{if((a.tag&e)===e){var l=a.destroy;a.destroy=void 0,l!==void 0&&Ii(t,r,l)}a=a.next}while(a!==n)}}function tl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function Ti(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function kd(e){var t=e.alternate;t!==null&&(e.alternate=null,kd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[nt],delete t[jn],delete t[xi],delete t[om],delete t[um])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function jd(e){return e.tag===5||e.tag===3||e.tag===4}function Ho(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||jd(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Li(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Ea));else if(n!==4&&(e=e.child,e!==null))for(Li(e,t,r),e=e.sibling;e!==null;)Li(e,t,r),e=e.sibling}function Oi(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(Oi(e,t,r),e=e.sibling;e!==null;)Oi(e,t,r),e=e.sibling}var he=null,Ge=!1;function xt(e,t,r){for(r=r.child;r!==null;)Nd(e,t,r),r=r.sibling}function Nd(e,t,r){if(at&&typeof at.onCommitFiberUnmount=="function")try{at.onCommitFiberUnmount(Ya,r)}catch{}switch(r.tag){case 5:be||vr(r,t);case 6:var n=he,a=Ge;he=null,xt(e,t,r),he=n,Ge=a,he!==null&&(Ge?(e=he,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):he.removeChild(r.stateNode));break;case 18:he!==null&&(Ge?(e=he,r=r.stateNode,e.nodeType===8?Al(e.parentNode,r):e.nodeType===1&&Al(e,r),xn(e)):Al(he,r.stateNode));break;case 4:n=he,a=Ge,he=r.stateNode.containerInfo,Ge=!0,xt(e,t,r),he=n,Ge=a;break;case 0:case 11:case 14:case 15:if(!be&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){a=n=n.next;do{var l=a,s=l.destroy;l=l.tag,s!==void 0&&(l&2||l&4)&&Ii(r,t,s),a=a.next}while(a!==n)}xt(e,t,r);break;case 1:if(!be&&(vr(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(o){ie(r,t,o)}xt(e,t,r);break;case 21:xt(e,t,r);break;case 22:r.mode&1?(be=(n=be)||r.memoizedState!==null,xt(e,t,r),be=n):xt(e,t,r);break;default:xt(e,t,r)}}function Qo(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new Sm),t.forEach(function(n){var a=Rm.bind(null,e,n);r.has(n)||(r.add(n),n.then(a,a))})}}function Ye(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var a=r[n];try{var l=e,s=t,o=s;e:for(;o!==null;){switch(o.tag){case 5:he=o.stateNode,Ge=!1;break e;case 3:he=o.stateNode.containerInfo,Ge=!0;break e;case 4:he=o.stateNode.containerInfo,Ge=!0;break e}o=o.return}if(he===null)throw Error(P(160));Nd(l,s,a),he=null,Ge=!1;var u=a.alternate;u!==null&&(u.return=null),a.return=null}catch(f){ie(a,t,f)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Sd(t,e),t=t.sibling}function Sd(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ye(t,e),tt(e),n&4){try{sn(3,e,e.return),tl(3,e)}catch(w){ie(e,e.return,w)}try{sn(5,e,e.return)}catch(w){ie(e,e.return,w)}}break;case 1:Ye(t,e),tt(e),n&512&&r!==null&&vr(r,r.return);break;case 5:if(Ye(t,e),tt(e),n&512&&r!==null&&vr(r,r.return),e.flags&32){var a=e.stateNode;try{mn(a,"")}catch(w){ie(e,e.return,w)}}if(n&4&&(a=e.stateNode,a!=null)){var l=e.memoizedProps,s=r!==null?r.memoizedProps:l,o=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{o==="input"&&l.type==="radio"&&l.name!=null&&Yu(a,l),ai(o,s);var f=ai(o,l);for(s=0;s<u.length;s+=2){var h=u[s],m=u[s+1];h==="style"?Zu(a,m):h==="dangerouslySetInnerHTML"?qu(a,m):h==="children"?mn(a,m):qi(a,h,m,f)}switch(o){case"input":Jl(a,l);break;case"textarea":Ku(a,l);break;case"select":var p=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!l.multiple;var b=l.value;b!=null?wr(a,!!l.multiple,b,!1):p!==!!l.multiple&&(l.defaultValue!=null?wr(a,!!l.multiple,l.defaultValue,!0):wr(a,!!l.multiple,l.multiple?[]:"",!1))}a[jn]=l}catch(w){ie(e,e.return,w)}}break;case 6:if(Ye(t,e),tt(e),n&4){if(e.stateNode===null)throw Error(P(162));a=e.stateNode,l=e.memoizedProps;try{a.nodeValue=l}catch(w){ie(e,e.return,w)}}break;case 3:if(Ye(t,e),tt(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{xn(t.containerInfo)}catch(w){ie(e,e.return,w)}break;case 4:Ye(t,e),tt(e);break;case 13:Ye(t,e),tt(e),a=e.child,a.flags&8192&&(l=a.memoizedState!==null,a.stateNode.isHidden=l,!l||a.alternate!==null&&a.alternate.memoizedState!==null||(Ms=oe())),n&4&&Qo(e);break;case 22:if(h=r!==null&&r.memoizedState!==null,e.mode&1?(be=(f=be)||h,Ye(t,e),be=f):Ye(t,e),tt(e),n&8192){if(f=e.memoizedState!==null,(e.stateNode.isHidden=f)&&!h&&e.mode&1)for(O=e,h=e.child;h!==null;){for(m=O=h;O!==null;){switch(p=O,b=p.child,p.tag){case 0:case 11:case 14:case 15:sn(4,p,p.return);break;case 1:vr(p,p.return);var y=p.stateNode;if(typeof y.componentWillUnmount=="function"){n=p,r=p.return;try{t=n,y.props=t.memoizedProps,y.state=t.memoizedState,y.componentWillUnmount()}catch(w){ie(n,r,w)}}break;case 5:vr(p,p.return);break;case 22:if(p.memoizedState!==null){Ko(m);continue}}b!==null?(b.return=p,O=b):Ko(m)}h=h.sibling}e:for(h=null,m=e;;){if(m.tag===5){if(h===null){h=m;try{a=m.stateNode,f?(l=a.style,typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none"):(o=m.stateNode,u=m.memoizedProps.style,s=u!=null&&u.hasOwnProperty("display")?u.display:null,o.style.display=Xu("display",s))}catch(w){ie(e,e.return,w)}}}else if(m.tag===6){if(h===null)try{m.stateNode.nodeValue=f?"":m.memoizedProps}catch(w){ie(e,e.return,w)}}else if((m.tag!==22&&m.tag!==23||m.memoizedState===null||m===e)&&m.child!==null){m.child.return=m,m=m.child;continue}if(m===e)break e;for(;m.sibling===null;){if(m.return===null||m.return===e)break e;h===m&&(h=null),m=m.return}h===m&&(h=null),m.sibling.return=m.return,m=m.sibling}}break;case 19:Ye(t,e),tt(e),n&4&&Qo(e);break;case 21:break;default:Ye(t,e),tt(e)}}function tt(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(jd(r)){var n=r;break e}r=r.return}throw Error(P(160))}switch(n.tag){case 5:var a=n.stateNode;n.flags&32&&(mn(a,""),n.flags&=-33);var l=Ho(e);Oi(e,l,a);break;case 3:case 4:var s=n.stateNode.containerInfo,o=Ho(e);Li(e,o,s);break;default:throw Error(P(161))}}catch(u){ie(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Em(e,t,r){O=e,Cd(e)}function Cd(e,t,r){for(var n=(e.mode&1)!==0;O!==null;){var a=O,l=a.child;if(a.tag===22&&n){var s=a.memoizedState!==null||ta;if(!s){var o=a.alternate,u=o!==null&&o.memoizedState!==null||be;o=ta;var f=be;if(ta=s,(be=u)&&!f)for(O=a;O!==null;)s=O,u=s.child,s.tag===22&&s.memoizedState!==null?Go(a):u!==null?(u.return=s,O=u):Go(a);for(;l!==null;)O=l,Cd(l),l=l.sibling;O=a,ta=o,be=f}Yo(e)}else a.subtreeFlags&8772&&l!==null?(l.return=a,O=l):Yo(e)}}function Yo(e){for(;O!==null;){var t=O;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:be||tl(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!be)if(r===null)n.componentDidMount();else{var a=t.elementType===t.type?r.memoizedProps:Ke(t.type,r.memoizedProps);n.componentDidUpdate(a,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var l=t.updateQueue;l!==null&&Io(t,l,n);break;case 3:var s=t.updateQueue;if(s!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}Io(t,s,r)}break;case 5:var o=t.stateNode;if(r===null&&t.flags&4){r=o;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&r.focus();break;case"img":u.src&&(r.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var f=t.alternate;if(f!==null){var h=f.memoizedState;if(h!==null){var m=h.dehydrated;m!==null&&xn(m)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(P(163))}be||t.flags&512&&Ti(t)}catch(p){ie(t,t.return,p)}}if(t===e){O=null;break}if(r=t.sibling,r!==null){r.return=t.return,O=r;break}O=t.return}}function Ko(e){for(;O!==null;){var t=O;if(t===e){O=null;break}var r=t.sibling;if(r!==null){r.return=t.return,O=r;break}O=t.return}}function Go(e){for(;O!==null;){var t=O;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{tl(4,t)}catch(u){ie(t,r,u)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var a=t.return;try{n.componentDidMount()}catch(u){ie(t,a,u)}}var l=t.return;try{Ti(t)}catch(u){ie(t,l,u)}break;case 5:var s=t.return;try{Ti(t)}catch(u){ie(t,s,u)}}}catch(u){ie(t,t.return,u)}if(t===e){O=null;break}var o=t.sibling;if(o!==null){o.return=t.return,O=o;break}O=t.return}}var Pm=Math.ceil,Fa=gt.ReactCurrentDispatcher,Es=gt.ReactCurrentOwner,Ue=gt.ReactCurrentBatchConfig,Q=0,me=null,ue=null,ve=0,Te=0,gr=Dt(0),de=0,Mn=null,Jt=0,rl=0,Ps=0,on=null,Ee=null,Ms=0,Tr=1/0,st=null,Da=!1,Ri=null,Tt=null,ra=!1,St=null,Wa=0,un=0,_i=null,ha=-1,va=0;function Ne(){return Q&6?oe():ha!==-1?ha:ha=oe()}function Lt(e){return e.mode&1?Q&2&&ve!==0?ve&-ve:dm.transition!==null?(va===0&&(va=cc()),va):(e=G,e!==0||(e=window.event,e=e===void 0?16:gc(e.type)),e):1}function Ze(e,t,r,n){if(50<un)throw un=0,_i=null,Error(P(185));Rn(e,r,n),(!(Q&2)||e!==me)&&(e===me&&(!(Q&2)&&(rl|=r),de===4&&jt(e,ve)),Ie(e,n),r===1&&Q===0&&!(t.mode&1)&&(Tr=oe()+500,Za&&Wt()))}function Ie(e,t){var r=e.callbackNode;dp(e,t);var n=ja(e,e===me?ve:0);if(n===0)r!==null&&no(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&no(r),t===1)e.tag===0?cm(qo.bind(null,e)):_c(qo.bind(null,e)),im(function(){!(Q&6)&&Wt()}),r=null;else{switch(dc(n)){case 1:r=ts;break;case 4:r=oc;break;case 16:r=ka;break;case 536870912:r=uc;break;default:r=ka}r=Od(r,Ed.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function Ed(e,t){if(ha=-1,va=0,Q&6)throw Error(P(327));var r=e.callbackNode;if(Sr()&&e.callbackNode!==r)return null;var n=ja(e,e===me?ve:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=$a(e,n);else{t=n;var a=Q;Q|=2;var l=Md();(me!==e||ve!==t)&&(st=null,Tr=oe()+500,Yt(e,t));do try{Im();break}catch(o){Pd(e,o)}while(!0);ms(),Fa.current=l,Q=a,ue!==null?t=0:(me=null,ve=0,t=de)}if(t!==0){if(t===2&&(a=ui(e),a!==0&&(n=a,t=zi(e,a))),t===1)throw r=Mn,Yt(e,0),jt(e,n),Ie(e,oe()),r;if(t===6)jt(e,n);else{if(a=e.current.alternate,!(n&30)&&!Mm(a)&&(t=$a(e,n),t===2&&(l=ui(e),l!==0&&(n=l,t=zi(e,l))),t===1))throw r=Mn,Yt(e,0),jt(e,n),Ie(e,oe()),r;switch(e.finishedWork=a,e.finishedLanes=n,t){case 0:case 1:throw Error(P(345));case 2:Ut(e,Ee,st);break;case 3:if(jt(e,n),(n&130023424)===n&&(t=Ms+500-oe(),10<t)){if(ja(e,0)!==0)break;if(a=e.suspendedLanes,(a&n)!==n){Ne(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=gi(Ut.bind(null,e,Ee,st),t);break}Ut(e,Ee,st);break;case 4:if(jt(e,n),(n&4194240)===n)break;for(t=e.eventTimes,a=-1;0<n;){var s=31-Xe(n);l=1<<s,s=t[s],s>a&&(a=s),n&=~l}if(n=a,n=oe()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Pm(n/1960))-n,10<n){e.timeoutHandle=gi(Ut.bind(null,e,Ee,st),n);break}Ut(e,Ee,st);break;case 5:Ut(e,Ee,st);break;default:throw Error(P(329))}}}return Ie(e,oe()),e.callbackNode===r?Ed.bind(null,e):null}function zi(e,t){var r=on;return e.current.memoizedState.isDehydrated&&(Yt(e,t).flags|=256),e=$a(e,t),e!==2&&(t=Ee,Ee=r,t!==null&&Fi(t)),e}function Fi(e){Ee===null?Ee=e:Ee.push.apply(Ee,e)}function Mm(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var a=r[n],l=a.getSnapshot;a=a.value;try{if(!Je(l(),a))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function jt(e,t){for(t&=~Ps,t&=~rl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Xe(t),n=1<<r;e[r]=-1,t&=~n}}function qo(e){if(Q&6)throw Error(P(327));Sr();var t=ja(e,0);if(!(t&1))return Ie(e,oe()),null;var r=$a(e,t);if(e.tag!==0&&r===2){var n=ui(e);n!==0&&(t=n,r=zi(e,n))}if(r===1)throw r=Mn,Yt(e,0),jt(e,t),Ie(e,oe()),r;if(r===6)throw Error(P(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ut(e,Ee,st),Ie(e,oe()),null}function As(e,t){var r=Q;Q|=1;try{return e(t)}finally{Q=r,Q===0&&(Tr=oe()+500,Za&&Wt())}}function er(e){St!==null&&St.tag===0&&!(Q&6)&&Sr();var t=Q;Q|=1;var r=Ue.transition,n=G;try{if(Ue.transition=null,G=1,e)return e()}finally{G=n,Ue.transition=r,Q=t,!(Q&6)&&Wt()}}function Is(){Te=gr.current,te(gr)}function Yt(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,lm(r)),ue!==null)for(r=ue.return;r!==null;){var n=r;switch(ds(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&Pa();break;case 3:Ar(),te(Me),te(ke),ws();break;case 5:ys(n);break;case 4:Ar();break;case 13:te(ne);break;case 19:te(ne);break;case 10:hs(n.type._context);break;case 22:case 23:Is()}r=r.return}if(me=e,ue=e=Ot(e.current,null),ve=Te=t,de=0,Mn=null,Ps=rl=Jt=0,Ee=on=null,Ht!==null){for(t=0;t<Ht.length;t++)if(r=Ht[t],n=r.interleaved,n!==null){r.interleaved=null;var a=n.next,l=r.pending;if(l!==null){var s=l.next;l.next=a,n.next=s}r.pending=n}Ht=null}return e}function Pd(e,t){do{var r=ue;try{if(ms(),fa.current=za,_a){for(var n=ae.memoizedState;n!==null;){var a=n.queue;a!==null&&(a.pending=null),n=n.next}_a=!1}if(Zt=0,pe=ce=ae=null,ln=!1,Cn=0,Es.current=null,r===null||r.return===null){de=1,Mn=t,ue=null;break}e:{var l=e,s=r.return,o=r,u=t;if(t=ve,o.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var f=u,h=o,m=h.tag;if(!(h.mode&1)&&(m===0||m===11||m===15)){var p=h.alternate;p?(h.updateQueue=p.updateQueue,h.memoizedState=p.memoizedState,h.lanes=p.lanes):(h.updateQueue=null,h.memoizedState=null)}var b=zo(s);if(b!==null){b.flags&=-257,Fo(b,s,o,l,t),b.mode&1&&_o(l,f,t),t=b,u=f;var y=t.updateQueue;if(y===null){var w=new Set;w.add(u),t.updateQueue=w}else y.add(u);break e}else{if(!(t&1)){_o(l,f,t),Ts();break e}u=Error(P(426))}}else if(re&&o.mode&1){var C=zo(s);if(C!==null){!(C.flags&65536)&&(C.flags|=256),Fo(C,s,o,l,t),fs(Ir(u,o));break e}}l=u=Ir(u,o),de!==4&&(de=2),on===null?on=[l]:on.push(l),l=s;do{switch(l.tag){case 3:l.flags|=65536,t&=-t,l.lanes|=t;var d=dd(l,u,t);Ao(l,d);break e;case 1:o=u;var c=l.type,v=l.stateNode;if(!(l.flags&128)&&(typeof c.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(Tt===null||!Tt.has(v)))){l.flags|=65536,t&=-t,l.lanes|=t;var x=fd(l,o,t);Ao(l,x);break e}}l=l.return}while(l!==null)}Id(r)}catch(k){t=k,ue===r&&r!==null&&(ue=r=r.return);continue}break}while(!0)}function Md(){var e=Fa.current;return Fa.current=za,e===null?za:e}function Ts(){(de===0||de===3||de===2)&&(de=4),me===null||!(Jt&268435455)&&!(rl&268435455)||jt(me,ve)}function $a(e,t){var r=Q;Q|=2;var n=Md();(me!==e||ve!==t)&&(st=null,Yt(e,t));do try{Am();break}catch(a){Pd(e,a)}while(!0);if(ms(),Q=r,Fa.current=n,ue!==null)throw Error(P(261));return me=null,ve=0,de}function Am(){for(;ue!==null;)Ad(ue)}function Im(){for(;ue!==null&&!rp();)Ad(ue)}function Ad(e){var t=Ld(e.alternate,e,Te);e.memoizedProps=e.pendingProps,t===null?Id(e):ue=t,Es.current=null}function Id(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=Nm(r,t),r!==null){r.flags&=32767,ue=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{de=6,ue=null;return}}else if(r=jm(r,t,Te),r!==null){ue=r;return}if(t=t.sibling,t!==null){ue=t;return}ue=t=e}while(t!==null);de===0&&(de=5)}function Ut(e,t,r){var n=G,a=Ue.transition;try{Ue.transition=null,G=1,Tm(e,t,r,n)}finally{Ue.transition=a,G=n}return null}function Tm(e,t,r,n){do Sr();while(St!==null);if(Q&6)throw Error(P(327));r=e.finishedWork;var a=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(P(177));e.callbackNode=null,e.callbackPriority=0;var l=r.lanes|r.childLanes;if(fp(e,l),e===me&&(ue=me=null,ve=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||ra||(ra=!0,Od(ka,function(){return Sr(),null})),l=(r.flags&15990)!==0,r.subtreeFlags&15990||l){l=Ue.transition,Ue.transition=null;var s=G;G=1;var o=Q;Q|=4,Es.current=null,Cm(e,r),Sd(r,e),Zp(hi),Na=!!mi,hi=mi=null,e.current=r,Em(r),np(),Q=o,G=s,Ue.transition=l}else e.current=r;if(ra&&(ra=!1,St=e,Wa=a),l=e.pendingLanes,l===0&&(Tt=null),ip(r.stateNode),Ie(e,oe()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)a=t[r],n(a.value,{componentStack:a.stack,digest:a.digest});if(Da)throw Da=!1,e=Ri,Ri=null,e;return Wa&1&&e.tag!==0&&Sr(),l=e.pendingLanes,l&1?e===_i?un++:(un=0,_i=e):un=0,Wt(),null}function Sr(){if(St!==null){var e=dc(Wa),t=Ue.transition,r=G;try{if(Ue.transition=null,G=16>e?16:e,St===null)var n=!1;else{if(e=St,St=null,Wa=0,Q&6)throw Error(P(331));var a=Q;for(Q|=4,O=e.current;O!==null;){var l=O,s=l.child;if(O.flags&16){var o=l.deletions;if(o!==null){for(var u=0;u<o.length;u++){var f=o[u];for(O=f;O!==null;){var h=O;switch(h.tag){case 0:case 11:case 15:sn(8,h,l)}var m=h.child;if(m!==null)m.return=h,O=m;else for(;O!==null;){h=O;var p=h.sibling,b=h.return;if(kd(h),h===f){O=null;break}if(p!==null){p.return=b,O=p;break}O=b}}}var y=l.alternate;if(y!==null){var w=y.child;if(w!==null){y.child=null;do{var C=w.sibling;w.sibling=null,w=C}while(w!==null)}}O=l}}if(l.subtreeFlags&2064&&s!==null)s.return=l,O=s;else e:for(;O!==null;){if(l=O,l.flags&2048)switch(l.tag){case 0:case 11:case 15:sn(9,l,l.return)}var d=l.sibling;if(d!==null){d.return=l.return,O=d;break e}O=l.return}}var c=e.current;for(O=c;O!==null;){s=O;var v=s.child;if(s.subtreeFlags&2064&&v!==null)v.return=s,O=v;else e:for(s=c;O!==null;){if(o=O,o.flags&2048)try{switch(o.tag){case 0:case 11:case 15:tl(9,o)}}catch(k){ie(o,o.return,k)}if(o===s){O=null;break e}var x=o.sibling;if(x!==null){x.return=o.return,O=x;break e}O=o.return}}if(Q=a,Wt(),at&&typeof at.onPostCommitFiberRoot=="function")try{at.onPostCommitFiberRoot(Ya,e)}catch{}n=!0}return n}finally{G=r,Ue.transition=t}}return!1}function Xo(e,t,r){t=Ir(r,t),t=dd(e,t,1),e=It(e,t,1),t=Ne(),e!==null&&(Rn(e,1,t),Ie(e,t))}function ie(e,t,r){if(e.tag===3)Xo(e,e,r);else for(;t!==null;){if(t.tag===3){Xo(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Tt===null||!Tt.has(n))){e=Ir(r,e),e=fd(t,e,1),t=It(t,e,1),e=Ne(),t!==null&&(Rn(t,1,e),Ie(t,e));break}}t=t.return}}function Lm(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=Ne(),e.pingedLanes|=e.suspendedLanes&r,me===e&&(ve&r)===r&&(de===4||de===3&&(ve&130023424)===ve&&500>oe()-Ms?Yt(e,0):Ps|=r),Ie(e,t)}function Td(e,t){t===0&&(e.mode&1?(t=Qn,Qn<<=1,!(Qn&130023424)&&(Qn=4194304)):t=1);var r=Ne();e=ht(e,t),e!==null&&(Rn(e,t,r),Ie(e,r))}function Om(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Td(e,r)}function Rm(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,a=e.memoizedState;a!==null&&(r=a.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(P(314))}n!==null&&n.delete(t),Td(e,r)}var Ld;Ld=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Me.current)Pe=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Pe=!1,km(e,t,r);Pe=!!(e.flags&131072)}else Pe=!1,re&&t.flags&1048576&&zc(t,Ia,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;ma(e,t),e=t.pendingProps;var a=Er(t,ke.current);Nr(t,r),a=ks(null,t,n,e,a,r);var l=js();return t.flags|=1,typeof a=="object"&&a!==null&&typeof a.render=="function"&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ae(n)?(l=!0,Ma(t)):l=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,gs(t),a.updater=el,t.stateNode=a,a._reactInternals=t,Ni(t,n,e,r),t=Ei(null,t,n,!0,l,r)):(t.tag=0,re&&l&&cs(t),je(null,t,a,r),t=t.child),t;case 16:n=t.elementType;e:{switch(ma(e,t),e=t.pendingProps,a=n._init,n=a(n._payload),t.type=n,a=t.tag=zm(n),e=Ke(n,e),a){case 0:t=Ci(null,t,n,e,r);break e;case 1:t=$o(null,t,n,e,r);break e;case 11:t=Do(null,t,n,e,r);break e;case 14:t=Wo(null,t,n,Ke(n.type,e),r);break e}throw Error(P(306,n,""))}return t;case 0:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:Ke(n,a),Ci(e,t,n,a,r);case 1:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:Ke(n,a),$o(e,t,n,a,r);case 3:e:{if(vd(t),e===null)throw Error(P(387));n=t.pendingProps,l=t.memoizedState,a=l.element,Bc(e,t),Oa(t,n,null,r);var s=t.memoizedState;if(n=s.element,l.isDehydrated)if(l={element:n,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=l,t.memoizedState=l,t.flags&256){a=Ir(Error(P(423)),t),t=Uo(e,t,n,r,a);break e}else if(n!==a){a=Ir(Error(P(424)),t),t=Uo(e,t,n,r,a);break e}else for(Oe=At(t.stateNode.containerInfo.firstChild),Re=t,re=!0,qe=null,r=$c(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Pr(),n===a){t=vt(e,t,r);break e}je(e,t,n,r)}t=t.child}return t;case 5:return Vc(t),e===null&&bi(t),n=t.type,a=t.pendingProps,l=e!==null?e.memoizedProps:null,s=a.children,vi(n,a)?s=null:l!==null&&vi(n,l)&&(t.flags|=32),hd(e,t),je(e,t,s,r),t.child;case 6:return e===null&&bi(t),null;case 13:return gd(e,t,r);case 4:return xs(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Mr(t,null,n,r):je(e,t,n,r),t.child;case 11:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:Ke(n,a),Do(e,t,n,a,r);case 7:return je(e,t,t.pendingProps,r),t.child;case 8:return je(e,t,t.pendingProps.children,r),t.child;case 12:return je(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,a=t.pendingProps,l=t.memoizedProps,s=a.value,Z(Ta,n._currentValue),n._currentValue=s,l!==null)if(Je(l.value,s)){if(l.children===a.children&&!Me.current){t=vt(e,t,r);break e}}else for(l=t.child,l!==null&&(l.return=t);l!==null;){var o=l.dependencies;if(o!==null){s=l.child;for(var u=o.firstContext;u!==null;){if(u.context===n){if(l.tag===1){u=ft(-1,r&-r),u.tag=2;var f=l.updateQueue;if(f!==null){f=f.shared;var h=f.pending;h===null?u.next=u:(u.next=h.next,h.next=u),f.pending=u}}l.lanes|=r,u=l.alternate,u!==null&&(u.lanes|=r),ki(l.return,r,t),o.lanes|=r;break}u=u.next}}else if(l.tag===10)s=l.type===t.type?null:l.child;else if(l.tag===18){if(s=l.return,s===null)throw Error(P(341));s.lanes|=r,o=s.alternate,o!==null&&(o.lanes|=r),ki(s,r,t),s=l.sibling}else s=l.child;if(s!==null)s.return=l;else for(s=l;s!==null;){if(s===t){s=null;break}if(l=s.sibling,l!==null){l.return=s.return,s=l;break}s=s.return}l=s}je(e,t,a.children,r),t=t.child}return t;case 9:return a=t.type,n=t.pendingProps.children,Nr(t,r),a=Be(a),n=n(a),t.flags|=1,je(e,t,n,r),t.child;case 14:return n=t.type,a=Ke(n,t.pendingProps),a=Ke(n.type,a),Wo(e,t,n,a,r);case 15:return pd(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:Ke(n,a),ma(e,t),t.tag=1,Ae(n)?(e=!0,Ma(t)):e=!1,Nr(t,r),cd(t,n,a),Ni(t,n,a,r),Ei(null,t,n,!0,e,r);case 19:return xd(e,t,r);case 22:return md(e,t,r)}throw Error(P(156,t.tag))};function Od(e,t){return sc(e,t)}function _m(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function $e(e,t,r,n){return new _m(e,t,r,n)}function Ls(e){return e=e.prototype,!(!e||!e.isReactComponent)}function zm(e){if(typeof e=="function")return Ls(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Zi)return 11;if(e===Ji)return 14}return 2}function Ot(e,t){var r=e.alternate;return r===null?(r=$e(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function ga(e,t,r,n,a,l){var s=2;if(n=e,typeof e=="function")Ls(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case sr:return Kt(r.children,a,l,t);case Xi:s=8,a|=8;break;case Kl:return e=$e(12,r,t,a|2),e.elementType=Kl,e.lanes=l,e;case Gl:return e=$e(13,r,t,a),e.elementType=Gl,e.lanes=l,e;case ql:return e=$e(19,r,t,a),e.elementType=ql,e.lanes=l,e;case Vu:return nl(r,a,l,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Uu:s=10;break e;case Bu:s=9;break e;case Zi:s=11;break e;case Ji:s=14;break e;case wt:s=16,n=null;break e}throw Error(P(130,e==null?e:typeof e,""))}return t=$e(s,r,t,a),t.elementType=e,t.type=n,t.lanes=l,t}function Kt(e,t,r,n){return e=$e(7,e,n,t),e.lanes=r,e}function nl(e,t,r,n){return e=$e(22,e,n,t),e.elementType=Vu,e.lanes=r,e.stateNode={isHidden:!1},e}function Fl(e,t,r){return e=$e(6,e,null,t),e.lanes=r,e}function Dl(e,t,r){return t=$e(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Fm(e,t,r,n,a){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=yl(0),this.expirationTimes=yl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=yl(0),this.identifierPrefix=n,this.onRecoverableError=a,this.mutableSourceEagerHydrationData=null}function Os(e,t,r,n,a,l,s,o,u){return e=new Fm(e,t,r,o,u),t===1?(t=1,l===!0&&(t|=8)):t=0,l=$e(3,null,null,t),e.current=l,l.stateNode=e,l.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},gs(l),e}function Dm(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ir,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function Rd(e){if(!e)return zt;e=e._reactInternals;e:{if(nr(e)!==e||e.tag!==1)throw Error(P(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ae(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(P(171))}if(e.tag===1){var r=e.type;if(Ae(r))return Rc(e,r,t)}return t}function _d(e,t,r,n,a,l,s,o,u){return e=Os(r,n,!0,e,a,l,s,o,u),e.context=Rd(null),r=e.current,n=Ne(),a=Lt(r),l=ft(n,a),l.callback=t??null,It(r,l,a),e.current.lanes=a,Rn(e,a,n),Ie(e,n),e}function al(e,t,r,n){var a=t.current,l=Ne(),s=Lt(a);return r=Rd(r),t.context===null?t.context=r:t.pendingContext=r,t=ft(l,s),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=It(a,t,s),e!==null&&(Ze(e,a,s,l),da(e,a,s)),s}function Ua(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Zo(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function Rs(e,t){Zo(e,t),(e=e.alternate)&&Zo(e,t)}function Wm(){return null}var zd=typeof reportError=="function"?reportError:function(e){console.error(e)};function _s(e){this._internalRoot=e}ll.prototype.render=_s.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(P(409));al(e,t,null,null)};ll.prototype.unmount=_s.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;er(function(){al(null,e,null,null)}),t[mt]=null}};function ll(e){this._internalRoot=e}ll.prototype.unstable_scheduleHydration=function(e){if(e){var t=mc();e={blockedOn:null,target:e,priority:t};for(var r=0;r<kt.length&&t!==0&&t<kt[r].priority;r++);kt.splice(r,0,e),r===0&&vc(e)}};function zs(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function il(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Jo(){}function $m(e,t,r,n,a){if(a){if(typeof n=="function"){var l=n;n=function(){var f=Ua(s);l.call(f)}}var s=_d(t,n,e,0,null,!1,!1,"",Jo);return e._reactRootContainer=s,e[mt]=s.current,bn(e.nodeType===8?e.parentNode:e),er(),s}for(;a=e.lastChild;)e.removeChild(a);if(typeof n=="function"){var o=n;n=function(){var f=Ua(u);o.call(f)}}var u=Os(e,0,!1,null,null,!1,!1,"",Jo);return e._reactRootContainer=u,e[mt]=u.current,bn(e.nodeType===8?e.parentNode:e),er(function(){al(t,u,r,n)}),u}function sl(e,t,r,n,a){var l=r._reactRootContainer;if(l){var s=l;if(typeof a=="function"){var o=a;a=function(){var u=Ua(s);o.call(u)}}al(t,s,e,a)}else s=$m(r,t,e,a,n);return Ua(s)}fc=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=qr(t.pendingLanes);r!==0&&(rs(t,r|1),Ie(t,oe()),!(Q&6)&&(Tr=oe()+500,Wt()))}break;case 13:er(function(){var n=ht(e,1);if(n!==null){var a=Ne();Ze(n,e,1,a)}}),Rs(e,1)}};ns=function(e){if(e.tag===13){var t=ht(e,134217728);if(t!==null){var r=Ne();Ze(t,e,134217728,r)}Rs(e,134217728)}};pc=function(e){if(e.tag===13){var t=Lt(e),r=ht(e,t);if(r!==null){var n=Ne();Ze(r,e,t,n)}Rs(e,t)}};mc=function(){return G};hc=function(e,t){var r=G;try{return G=e,t()}finally{G=r}};ii=function(e,t,r){switch(t){case"input":if(Jl(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var a=Xa(n);if(!a)throw Error(P(90));Qu(n),Jl(n,a)}}}break;case"textarea":Ku(e,r);break;case"select":t=r.value,t!=null&&wr(e,!!r.multiple,t,!1)}};tc=As;rc=er;var Um={usingClientEntryPoint:!1,Events:[zn,dr,Xa,Ju,ec,As]},Hr={findFiberByHostInstance:Vt,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Bm={bundleType:Hr.bundleType,version:Hr.version,rendererPackageName:Hr.rendererPackageName,rendererConfig:Hr.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:gt.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=lc(e),e===null?null:e.stateNode},findFiberByHostInstance:Hr.findFiberByHostInstance||Wm,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var na=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!na.isDisabled&&na.supportsFiber)try{Ya=na.inject(Bm),at=na}catch{}}ze.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Um;ze.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!zs(t))throw Error(P(200));return Dm(e,t,null,r)};ze.createRoot=function(e,t){if(!zs(e))throw Error(P(299));var r=!1,n="",a=zd;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=Os(e,1,!1,null,null,r,!1,n,a),e[mt]=t.current,bn(e.nodeType===8?e.parentNode:e),new _s(t)};ze.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(P(188)):(e=Object.keys(e).join(","),Error(P(268,e)));return e=lc(t),e=e===null?null:e.stateNode,e};ze.flushSync=function(e){return er(e)};ze.hydrate=function(e,t,r){if(!il(t))throw Error(P(200));return sl(null,e,t,!0,r)};ze.hydrateRoot=function(e,t,r){if(!zs(e))throw Error(P(405));var n=r!=null&&r.hydratedSources||null,a=!1,l="",s=zd;if(r!=null&&(r.unstable_strictMode===!0&&(a=!0),r.identifierPrefix!==void 0&&(l=r.identifierPrefix),r.onRecoverableError!==void 0&&(s=r.onRecoverableError)),t=_d(t,null,e,1,r??null,a,!1,l,s),e[mt]=t.current,bn(e),n)for(e=0;e<n.length;e++)r=n[e],a=r._getVersion,a=a(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,a]:t.mutableSourceEagerHydrationData.push(r,a);return new ll(t)};ze.render=function(e,t,r){if(!il(t))throw Error(P(200));return sl(null,e,t,!1,r)};ze.unmountComponentAtNode=function(e){if(!il(e))throw Error(P(40));return e._reactRootContainer?(er(function(){sl(null,null,e,!1,function(){e._reactRootContainer=null,e[mt]=null})}),!0):!1};ze.unstable_batchedUpdates=As;ze.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!il(r))throw Error(P(200));if(e==null||e._reactInternals===void 0)throw Error(P(38));return sl(e,t,r,!1,n)};ze.version="18.3.1-next-f1338f8080-20240426";function Fd(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Fd)}catch(e){console.error(e)}}Fd(),Fu.exports=ze;var Vm=Fu.exports,eu=Vm;Ql.createRoot=eu.createRoot,Ql.hydrateRoot=eu.hydrateRoot;/**
|
|
41
|
+
* @remix-run/router v1.23.2
|
|
42
|
+
*
|
|
43
|
+
* Copyright (c) Remix Software Inc.
|
|
44
|
+
*
|
|
45
|
+
* This source code is licensed under the MIT license found in the
|
|
46
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
47
|
+
*
|
|
48
|
+
* @license MIT
|
|
49
|
+
*/function An(){return An=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},An.apply(this,arguments)}var Ct;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Ct||(Ct={}));const tu="popstate";function Hm(e){e===void 0&&(e={});function t(n,a){let{pathname:l,search:s,hash:o}=n.location;return Di("",{pathname:l,search:s,hash:o},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function r(n,a){return typeof a=="string"?a:Dd(a)}return Ym(t,r,null,e)}function fe(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Fs(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Qm(){return Math.random().toString(36).substr(2,8)}function ru(e,t){return{usr:e.state,key:e.key,idx:t}}function Di(e,t,r,n){return r===void 0&&(r=null),An({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?_r(t):t,{state:r,key:t&&t.key||n||Qm()})}function Dd(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function _r(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function Ym(e,t,r,n){n===void 0&&(n={});let{window:a=document.defaultView,v5Compat:l=!1}=n,s=a.history,o=Ct.Pop,u=null,f=h();f==null&&(f=0,s.replaceState(An({},s.state,{idx:f}),""));function h(){return(s.state||{idx:null}).idx}function m(){o=Ct.Pop;let C=h(),d=C==null?null:C-f;f=C,u&&u({action:o,location:w.location,delta:d})}function p(C,d){o=Ct.Push;let c=Di(w.location,C,d);f=h()+1;let v=ru(c,f),x=w.createHref(c);try{s.pushState(v,"",x)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;a.location.assign(x)}l&&u&&u({action:o,location:w.location,delta:1})}function b(C,d){o=Ct.Replace;let c=Di(w.location,C,d);f=h();let v=ru(c,f),x=w.createHref(c);s.replaceState(v,"",x),l&&u&&u({action:o,location:w.location,delta:0})}function y(C){let d=a.location.origin!=="null"?a.location.origin:a.location.href,c=typeof C=="string"?C:Dd(C);return c=c.replace(/ $/,"%20"),fe(d,"No window.location.(origin|href) available to create URL for href: "+c),new URL(c,d)}let w={get action(){return o},get location(){return e(a,s)},listen(C){if(u)throw new Error("A history only accepts one active listener");return a.addEventListener(tu,m),u=C,()=>{a.removeEventListener(tu,m),u=null}},createHref(C){return t(a,C)},createURL:y,encodeLocation(C){let d=y(C);return{pathname:d.pathname,search:d.search,hash:d.hash}},push:p,replace:b,go(C){return s.go(C)}};return w}var nu;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(nu||(nu={}));function Km(e,t,r){return r===void 0&&(r="/"),Gm(e,t,r)}function Gm(e,t,r,n){let a=typeof t=="string"?_r(t):t,l=Ud(a.pathname||"/",r);if(l==null)return null;let s=Wd(e);qm(s);let o=null;for(let u=0;o==null&&u<s.length;++u){let f=oh(l);o=lh(s[u],f)}return o}function Wd(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let a=(l,s,o)=>{let u={relativePath:o===void 0?l.path||"":o,caseSensitive:l.caseSensitive===!0,childrenIndex:s,route:l};u.relativePath.startsWith("/")&&(fe(u.relativePath.startsWith(n),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(n.length));let f=Gt([n,u.relativePath]),h=r.concat(u);l.children&&l.children.length>0&&(fe(l.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+f+'".')),Wd(l.children,t,h,f)),!(l.path==null&&!l.index)&&t.push({path:f,score:nh(f,l.index),routesMeta:h})};return e.forEach((l,s)=>{var o;if(l.path===""||!((o=l.path)!=null&&o.includes("?")))a(l,s);else for(let u of $d(l.path))a(l,s,u)}),t}function $d(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),l=r.replace(/\?$/,"");if(n.length===0)return a?[l,""]:[l];let s=$d(n.join("/")),o=[];return o.push(...s.map(u=>u===""?l:[l,u].join("/"))),a&&o.push(...s),o.map(u=>e.startsWith("/")&&u===""?"/":u)}function qm(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:ah(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const Xm=/^:[\w-]+$/,Zm=3,Jm=2,eh=1,th=10,rh=-2,au=e=>e==="*";function nh(e,t){let r=e.split("/"),n=r.length;return r.some(au)&&(n+=rh),t&&(n+=Jm),r.filter(a=>!au(a)).reduce((a,l)=>a+(Xm.test(l)?Zm:l===""?eh:th),n)}function ah(e,t){return e.length===t.length&&e.slice(0,-1).every((n,a)=>n===t[a])?e[e.length-1]-t[t.length-1]:0}function lh(e,t,r){let{routesMeta:n}=e,a={},l="/",s=[];for(let o=0;o<n.length;++o){let u=n[o],f=o===n.length-1,h=l==="/"?t:t.slice(l.length)||"/",m=ih({path:u.relativePath,caseSensitive:u.caseSensitive,end:f},h),p=u.route;if(!m)return null;Object.assign(a,m.params),s.push({params:a,pathname:Gt([l,m.pathname]),pathnameBase:hh(Gt([l,m.pathnameBase])),route:p}),m.pathnameBase!=="/"&&(l=Gt([l,m.pathnameBase]))}return s}function ih(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=sh(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let l=a[0],s=l.replace(/(.)\/+$/,"$1"),o=a.slice(1);return{params:n.reduce((f,h,m)=>{let{paramName:p,isOptional:b}=h;if(p==="*"){let w=o[m]||"";s=l.slice(0,l.length-w.length).replace(/(.)\/+$/,"$1")}const y=o[m];return b&&!y?f[p]=void 0:f[p]=(y||"").replace(/%2F/g,"/"),f},{}),pathname:l,pathnameBase:s,pattern:e}}function sh(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),Fs(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,o,u)=>(n.push({paramName:o,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function oh(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Fs(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Ud(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}const uh=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ch=e=>uh.test(e);function dh(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?_r(e):e,l;if(r)if(ch(r))l=r;else{if(r.includes("//")){let s=r;r=r.replace(/\/\/+/g,"/"),Fs(!1,"Pathnames cannot have embedded double slashes - normalizing "+(s+" -> "+r))}r.startsWith("/")?l=lu(r.substring(1),"/"):l=lu(r,t)}else l=t;return{pathname:l,search:vh(n),hash:gh(a)}}function lu(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function Wl(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function fh(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function ph(e,t){let r=fh(e);return t?r.map((n,a)=>a===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function mh(e,t,r,n){n===void 0&&(n=!1);let a;typeof e=="string"?a=_r(e):(a=An({},e),fe(!a.pathname||!a.pathname.includes("?"),Wl("?","pathname","search",a)),fe(!a.pathname||!a.pathname.includes("#"),Wl("#","pathname","hash",a)),fe(!a.search||!a.search.includes("#"),Wl("#","search","hash",a)));let l=e===""||a.pathname==="",s=l?"/":a.pathname,o;if(s==null)o=r;else{let m=t.length-1;if(!n&&s.startsWith("..")){let p=s.split("/");for(;p[0]==="..";)p.shift(),m-=1;a.pathname=p.join("/")}o=m>=0?t[m]:"/"}let u=dh(a,o),f=s&&s!=="/"&&s.endsWith("/"),h=(l||s===".")&&r.endsWith("/");return!u.pathname.endsWith("/")&&(f||h)&&(u.pathname+="/"),u}const Gt=e=>e.join("/").replace(/\/\/+/g,"/"),hh=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),vh=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,gh=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function xh(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Bd=["post","put","patch","delete"];new Set(Bd);const yh=["get",...Bd];new Set(yh);/**
|
|
50
|
+
* React Router v6.30.3
|
|
51
|
+
*
|
|
52
|
+
* Copyright (c) Remix Software Inc.
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the MIT license found in the
|
|
55
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
56
|
+
*
|
|
57
|
+
* @license MIT
|
|
58
|
+
*/function In(){return In=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},In.apply(this,arguments)}const Ds=g.createContext(null),wh=g.createContext(null),ol=g.createContext(null),ul=g.createContext(null),zr=g.createContext({outlet:null,matches:[],isDataRoute:!1}),Vd=g.createContext(null);function cl(){return g.useContext(ul)!=null}function Ws(){return cl()||fe(!1),g.useContext(ul).location}function Hd(e){g.useContext(ol).static||g.useLayoutEffect(e)}function bh(){let{isDataRoute:e}=g.useContext(zr);return e?Oh():kh()}function kh(){cl()||fe(!1);let e=g.useContext(Ds),{basename:t,future:r,navigator:n}=g.useContext(ol),{matches:a}=g.useContext(zr),{pathname:l}=Ws(),s=JSON.stringify(ph(a,r.v7_relativeSplatPath)),o=g.useRef(!1);return Hd(()=>{o.current=!0}),g.useCallback(function(f,h){if(h===void 0&&(h={}),!o.current)return;if(typeof f=="number"){n.go(f);return}let m=mh(f,JSON.parse(s),l,h.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:Gt([t,m.pathname])),(h.replace?n.replace:n.push)(m,h.state,h)},[t,n,s,l,e])}function jh(e,t){return Nh(e,t)}function Nh(e,t,r,n){cl()||fe(!1);let{navigator:a}=g.useContext(ol),{matches:l}=g.useContext(zr),s=l[l.length-1],o=s?s.params:{};s&&s.pathname;let u=s?s.pathnameBase:"/";s&&s.route;let f=Ws(),h;if(t){var m;let C=typeof t=="string"?_r(t):t;u==="/"||(m=C.pathname)!=null&&m.startsWith(u)||fe(!1),h=C}else h=f;let p=h.pathname||"/",b=p;if(u!=="/"){let C=u.replace(/^\//,"").split("/");b="/"+p.replace(/^\//,"").split("/").slice(C.length).join("/")}let y=Km(e,{pathname:b}),w=Mh(y&&y.map(C=>Object.assign({},C,{params:Object.assign({},o,C.params),pathname:Gt([u,a.encodeLocation?a.encodeLocation(C.pathname).pathname:C.pathname]),pathnameBase:C.pathnameBase==="/"?u:Gt([u,a.encodeLocation?a.encodeLocation(C.pathnameBase).pathname:C.pathnameBase])})),l,r,n);return t&&w?g.createElement(ul.Provider,{value:{location:In({pathname:"/",search:"",hash:"",state:null,key:"default"},h),navigationType:Ct.Pop}},w):w}function Sh(){let e=Lh(),t=xh(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},t),r?g.createElement("pre",{style:a},r):null,null)}const Ch=g.createElement(Sh,null);class Eh extends g.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?g.createElement(zr.Provider,{value:this.props.routeContext},g.createElement(Vd.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Ph(e){let{routeContext:t,match:r,children:n}=e,a=g.useContext(Ds);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),g.createElement(zr.Provider,{value:t},n)}function Mh(e,t,r,n){var a;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var l;if(!r)return null;if(r.errors)e=r.matches;else if((l=n)!=null&&l.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let s=e,o=(a=r)==null?void 0:a.errors;if(o!=null){let h=s.findIndex(m=>m.route.id&&(o==null?void 0:o[m.route.id])!==void 0);h>=0||fe(!1),s=s.slice(0,Math.min(s.length,h+1))}let u=!1,f=-1;if(r&&n&&n.v7_partialHydration)for(let h=0;h<s.length;h++){let m=s[h];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(f=h),m.route.id){let{loaderData:p,errors:b}=r,y=m.route.loader&&p[m.route.id]===void 0&&(!b||b[m.route.id]===void 0);if(m.route.lazy||y){u=!0,f>=0?s=s.slice(0,f+1):s=[s[0]];break}}}return s.reduceRight((h,m,p)=>{let b,y=!1,w=null,C=null;r&&(b=o&&m.route.id?o[m.route.id]:void 0,w=m.route.errorElement||Ch,u&&(f<0&&p===0?(Rh("route-fallback"),y=!0,C=null):f===p&&(y=!0,C=m.route.hydrateFallbackElement||null)));let d=t.concat(s.slice(0,p+1)),c=()=>{let v;return b?v=w:y?v=C:m.route.Component?v=g.createElement(m.route.Component,null):m.route.element?v=m.route.element:v=h,g.createElement(Ph,{match:m,routeContext:{outlet:h,matches:d,isDataRoute:r!=null},children:v})};return r&&(m.route.ErrorBoundary||m.route.errorElement||p===0)?g.createElement(Eh,{location:r.location,revalidation:r.revalidation,component:w,error:b,children:c(),routeContext:{outlet:null,matches:d,isDataRoute:!0}}):c()},null)}var Qd=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Qd||{}),Yd=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Yd||{});function Ah(e){let t=g.useContext(Ds);return t||fe(!1),t}function Ih(e){let t=g.useContext(wh);return t||fe(!1),t}function Th(e){let t=g.useContext(zr);return t||fe(!1),t}function Kd(e){let t=Th(),r=t.matches[t.matches.length-1];return r.route.id||fe(!1),r.route.id}function Lh(){var e;let t=g.useContext(Vd),r=Ih(),n=Kd();return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function Oh(){let{router:e}=Ah(Qd.UseNavigateStable),t=Kd(Yd.UseNavigateStable),r=g.useRef(!1);return Hd(()=>{r.current=!0}),g.useCallback(function(a,l){l===void 0&&(l={}),r.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,In({fromRouteId:t},l)))},[e,t])}const iu={};function Rh(e,t,r){iu[e]||(iu[e]=!0)}function _h(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function it(e){fe(!1)}function zh(e){let{basename:t="/",children:r=null,location:n,navigationType:a=Ct.Pop,navigator:l,static:s=!1,future:o}=e;cl()&&fe(!1);let u=t.replace(/^\/*/,"/"),f=g.useMemo(()=>({basename:u,navigator:l,static:s,future:In({v7_relativeSplatPath:!1},o)}),[u,o,l,s]);typeof n=="string"&&(n=_r(n));let{pathname:h="/",search:m="",hash:p="",state:b=null,key:y="default"}=n,w=g.useMemo(()=>{let C=Ud(h,u);return C==null?null:{location:{pathname:C,search:m,hash:p,state:b,key:y},navigationType:a}},[u,h,m,p,b,y,a]);return w==null?null:g.createElement(ol.Provider,{value:f},g.createElement(ul.Provider,{children:r,value:w}))}function Fh(e){let{children:t,location:r}=e;return jh(Wi(t),r)}new Promise(()=>{});function Wi(e,t){t===void 0&&(t=[]);let r=[];return g.Children.forEach(e,(n,a)=>{if(!g.isValidElement(n))return;let l=[...t,a];if(n.type===g.Fragment){r.push.apply(r,Wi(n.props.children,l));return}n.type!==it&&fe(!1),!n.props.index||!n.props.children||fe(!1);let s={id:n.props.id||l.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(s.children=Wi(n.props.children,l)),r.push(s)}),r}/**
|
|
59
|
+
* React Router DOM v6.30.3
|
|
60
|
+
*
|
|
61
|
+
* Copyright (c) Remix Software Inc.
|
|
62
|
+
*
|
|
63
|
+
* This source code is licensed under the MIT license found in the
|
|
64
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
65
|
+
*
|
|
66
|
+
* @license MIT
|
|
67
|
+
*/const Dh="6";try{window.__reactRouterVersion=Dh}catch{}const Wh="startTransition",su=Lf[Wh];function $h(e){let{basename:t,children:r,future:n,window:a}=e,l=g.useRef();l.current==null&&(l.current=Hm({window:a,v5Compat:!0}));let s=l.current,[o,u]=g.useState({action:s.action,location:s.location}),{v7_startTransition:f}=n||{},h=g.useCallback(m=>{f&&su?su(()=>u(m)):u(m)},[u,f]);return g.useLayoutEffect(()=>s.listen(h),[s,h]),g.useEffect(()=>_h(n),[n]),g.createElement(zh,{basename:t,children:r,location:o.location,navigationType:o.action,navigator:s,future:n})}var ou;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(ou||(ou={}));var uu;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(uu||(uu={}));/**
|
|
68
|
+
* @license lucide-react v0.303.0 - ISC
|
|
69
|
+
*
|
|
70
|
+
* This source code is licensed under the ISC license.
|
|
71
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
72
|
+
*/var Uh={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
73
|
+
* @license lucide-react v0.303.0 - ISC
|
|
74
|
+
*
|
|
75
|
+
* This source code is licensed under the ISC license.
|
|
76
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
77
|
+
*/const Bh=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),V=(e,t)=>{const r=g.forwardRef(({color:n="currentColor",size:a=24,strokeWidth:l=2,absoluteStrokeWidth:s,className:o="",children:u,...f},h)=>g.createElement("svg",{ref:h,...Uh,width:a,height:a,stroke:n,strokeWidth:s?Number(l)*24/Number(a):l,className:["lucide",`lucide-${Bh(e)}`,o].join(" "),...f},[...t.map(([m,p])=>g.createElement(m,p)),...Array.isArray(u)?u:[u]]));return r.displayName=`${e}`,r};/**
|
|
78
|
+
* @license lucide-react v0.303.0 - ISC
|
|
79
|
+
*
|
|
80
|
+
* This source code is licensed under the ISC license.
|
|
81
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
82
|
+
*/const xa=V("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
|
|
83
|
+
* @license lucide-react v0.303.0 - ISC
|
|
84
|
+
*
|
|
85
|
+
* This source code is licensed under the ISC license.
|
|
86
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
87
|
+
*/const Vh=V("Calendar",[["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",ry:"2",key:"eu3xkr"}],["line",{x1:"16",x2:"16",y1:"2",y2:"6",key:"m3sa8f"}],["line",{x1:"8",x2:"8",y1:"2",y2:"6",key:"18kwsl"}],["line",{x1:"3",x2:"21",y1:"10",y2:"10",key:"xt86sb"}]]);/**
|
|
88
|
+
* @license lucide-react v0.303.0 - ISC
|
|
89
|
+
*
|
|
90
|
+
* This source code is licensed under the ISC license.
|
|
91
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
92
|
+
*/const Gd=V("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
93
|
+
* @license lucide-react v0.303.0 - ISC
|
|
94
|
+
*
|
|
95
|
+
* This source code is licensed under the ISC license.
|
|
96
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
97
|
+
*/const Hh=V("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
98
|
+
* @license lucide-react v0.303.0 - ISC
|
|
99
|
+
*
|
|
100
|
+
* This source code is licensed under the ISC license.
|
|
101
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
102
|
+
*/const Qh=V("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
|
103
|
+
* @license lucide-react v0.303.0 - ISC
|
|
104
|
+
*
|
|
105
|
+
* This source code is licensed under the ISC license.
|
|
106
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
107
|
+
*/const qd=V("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
108
|
+
* @license lucide-react v0.303.0 - ISC
|
|
109
|
+
*
|
|
110
|
+
* This source code is licensed under the ISC license.
|
|
111
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
112
|
+
*/const Ba=V("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
|
|
113
|
+
* @license lucide-react v0.303.0 - ISC
|
|
114
|
+
*
|
|
115
|
+
* This source code is licensed under the ISC license.
|
|
116
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
117
|
+
*/const Xd=V("Code2",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);/**
|
|
118
|
+
* @license lucide-react v0.303.0 - ISC
|
|
119
|
+
*
|
|
120
|
+
* This source code is licensed under the ISC license.
|
|
121
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
122
|
+
*/const cu=V("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
|
|
123
|
+
* @license lucide-react v0.303.0 - ISC
|
|
124
|
+
*
|
|
125
|
+
* This source code is licensed under the ISC license.
|
|
126
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
127
|
+
*/const Zd=V("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
|
|
128
|
+
* @license lucide-react v0.303.0 - ISC
|
|
129
|
+
*
|
|
130
|
+
* This source code is licensed under the ISC license.
|
|
131
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
132
|
+
*/const Yh=V("EyeOff",[["path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24",key:"1jxqfv"}],["path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68",key:"9wicm4"}],["path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61",key:"1jreej"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);/**
|
|
133
|
+
* @license lucide-react v0.303.0 - ISC
|
|
134
|
+
*
|
|
135
|
+
* This source code is licensed under the ISC license.
|
|
136
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
137
|
+
*/const Kh=V("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
138
|
+
* @license lucide-react v0.303.0 - ISC
|
|
139
|
+
*
|
|
140
|
+
* This source code is licensed under the ISC license.
|
|
141
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
142
|
+
*/const $i=V("FileCode",[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}],["path",{d:"m10 13-2 2 2 2",key:"17smn8"}],["path",{d:"m14 17 2-2-2-2",key:"14mezr"}]]);/**
|
|
143
|
+
* @license lucide-react v0.303.0 - ISC
|
|
144
|
+
*
|
|
145
|
+
* This source code is licensed under the ISC license.
|
|
146
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
147
|
+
*/const Gh=V("FileText",[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}],["line",{x1:"16",x2:"8",y1:"13",y2:"13",key:"14keom"}],["line",{x1:"16",x2:"8",y1:"17",y2:"17",key:"17nazh"}],["line",{x1:"10",x2:"8",y1:"9",y2:"9",key:"1a5vjj"}]]);/**
|
|
148
|
+
* @license lucide-react v0.303.0 - ISC
|
|
149
|
+
*
|
|
150
|
+
* This source code is licensed under the ISC license.
|
|
151
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
152
|
+
*/const qh=V("File",[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}]]);/**
|
|
153
|
+
* @license lucide-react v0.303.0 - ISC
|
|
154
|
+
*
|
|
155
|
+
* This source code is licensed under the ISC license.
|
|
156
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
157
|
+
*/const Xh=V("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/**
|
|
158
|
+
* @license lucide-react v0.303.0 - ISC
|
|
159
|
+
*
|
|
160
|
+
* This source code is licensed under the ISC license.
|
|
161
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
162
|
+
*/const Jd=V("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
|
|
163
|
+
* @license lucide-react v0.303.0 - ISC
|
|
164
|
+
*
|
|
165
|
+
* This source code is licensed under the ISC license.
|
|
166
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
167
|
+
*/const cn=V("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);/**
|
|
168
|
+
* @license lucide-react v0.303.0 - ISC
|
|
169
|
+
*
|
|
170
|
+
* This source code is licensed under the ISC license.
|
|
171
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
172
|
+
*/const Zh=V("GitCommitHorizontal",[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]]);/**
|
|
173
|
+
* @license lucide-react v0.303.0 - ISC
|
|
174
|
+
*
|
|
175
|
+
* This source code is licensed under the ISC license.
|
|
176
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
177
|
+
*/const Jh=V("GitMerge",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]]);/**
|
|
178
|
+
* @license lucide-react v0.303.0 - ISC
|
|
179
|
+
*
|
|
180
|
+
* This source code is licensed under the ISC license.
|
|
181
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
182
|
+
*/const ev=V("GitPullRequest",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["line",{x1:"6",x2:"6",y1:"9",y2:"21",key:"rroup"}]]);/**
|
|
183
|
+
* @license lucide-react v0.303.0 - ISC
|
|
184
|
+
*
|
|
185
|
+
* This source code is licensed under the ISC license.
|
|
186
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
187
|
+
*/const tv=V("Loader2",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
188
|
+
* @license lucide-react v0.303.0 - ISC
|
|
189
|
+
*
|
|
190
|
+
* This source code is licensed under the ISC license.
|
|
191
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
192
|
+
*/const rv=V("MessageCirclePlus",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);/**
|
|
193
|
+
* @license lucide-react v0.303.0 - ISC
|
|
194
|
+
*
|
|
195
|
+
* This source code is licensed under the ISC license.
|
|
196
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
197
|
+
*/const $s=V("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
|
|
198
|
+
* @license lucide-react v0.303.0 - ISC
|
|
199
|
+
*
|
|
200
|
+
* This source code is licensed under the ISC license.
|
|
201
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
202
|
+
*/const nv=V("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
|
|
203
|
+
* @license lucide-react v0.303.0 - ISC
|
|
204
|
+
*
|
|
205
|
+
* This source code is licensed under the ISC license.
|
|
206
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
207
|
+
*/const av=V("Pause",[["rect",{width:"4",height:"16",x:"6",y:"4",key:"iffhe4"}],["rect",{width:"4",height:"16",x:"14",y:"4",key:"sjin7j"}]]);/**
|
|
208
|
+
* @license lucide-react v0.303.0 - ISC
|
|
209
|
+
*
|
|
210
|
+
* This source code is licensed under the ISC license.
|
|
211
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
212
|
+
*/const lv=V("Pen",[["path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z",key:"5qss01"}]]);/**
|
|
213
|
+
* @license lucide-react v0.303.0 - ISC
|
|
214
|
+
*
|
|
215
|
+
* This source code is licensed under the ISC license.
|
|
216
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
217
|
+
*/const iv=V("Play",[["polygon",{points:"5 3 19 12 5 21 5 3",key:"191637"}]]);/**
|
|
218
|
+
* @license lucide-react v0.303.0 - ISC
|
|
219
|
+
*
|
|
220
|
+
* This source code is licensed under the ISC license.
|
|
221
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
222
|
+
*/const dl=V("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
223
|
+
* @license lucide-react v0.303.0 - ISC
|
|
224
|
+
*
|
|
225
|
+
* This source code is licensed under the ISC license.
|
|
226
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
227
|
+
*/const Us=V("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
|
|
228
|
+
* @license lucide-react v0.303.0 - ISC
|
|
229
|
+
*
|
|
230
|
+
* This source code is licensed under the ISC license.
|
|
231
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
232
|
+
*/const sv=V("Save",[["path",{d:"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z",key:"1owoqh"}],["polyline",{points:"17 21 17 13 7 13 7 21",key:"1md35c"}],["polyline",{points:"7 3 7 8 15 8",key:"8nz8an"}]]);/**
|
|
233
|
+
* @license lucide-react v0.303.0 - ISC
|
|
234
|
+
*
|
|
235
|
+
* This source code is licensed under the ISC license.
|
|
236
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
237
|
+
*/const Ui=V("ScrollText",[["path",{d:"M8 21h12a2 2 0 0 0 2-2v-2H10v2a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v3h4",key:"13a6an"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M15 12h-5",key:"r7krc0"}]]);/**
|
|
238
|
+
* @license lucide-react v0.303.0 - ISC
|
|
239
|
+
*
|
|
240
|
+
* This source code is licensed under the ISC license.
|
|
241
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
242
|
+
*/const ef=V("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
243
|
+
* @license lucide-react v0.303.0 - ISC
|
|
244
|
+
*
|
|
245
|
+
* This source code is licensed under the ISC license.
|
|
246
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
247
|
+
*/const ov=V("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]);/**
|
|
248
|
+
* @license lucide-react v0.303.0 - ISC
|
|
249
|
+
*
|
|
250
|
+
* This source code is licensed under the ISC license.
|
|
251
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
252
|
+
*/const Bs=V("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
253
|
+
* @license lucide-react v0.303.0 - ISC
|
|
254
|
+
*
|
|
255
|
+
* This source code is licensed under the ISC license.
|
|
256
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
257
|
+
*/const uv=V("Sparkles",[["path",{d:"m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z",key:"17u4zn"}],["path",{d:"M5 3v4",key:"bklmnn"}],["path",{d:"M19 17v4",key:"iiml17"}],["path",{d:"M3 5h4",key:"nem4j1"}],["path",{d:"M17 19h4",key:"lbex7p"}]]);/**
|
|
258
|
+
* @license lucide-react v0.303.0 - ISC
|
|
259
|
+
*
|
|
260
|
+
* This source code is licensed under the ISC license.
|
|
261
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
262
|
+
*/const cv=V("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
|
|
263
|
+
* @license lucide-react v0.303.0 - ISC
|
|
264
|
+
*
|
|
265
|
+
* This source code is licensed under the ISC license.
|
|
266
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
267
|
+
*/const dv=V("Tag",[["path",{d:"M12 2H2v10l9.29 9.29c.94.94 2.48.94 3.42 0l6.58-6.58c.94-.94.94-2.48 0-3.42L12 2Z",key:"14b2ls"}],["path",{d:"M7 7h.01",key:"7u93v4"}]]);/**
|
|
268
|
+
* @license lucide-react v0.303.0 - ISC
|
|
269
|
+
*
|
|
270
|
+
* This source code is licensed under the ISC license.
|
|
271
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
272
|
+
*/const Dn=V("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|
273
|
+
* @license lucide-react v0.303.0 - ISC
|
|
274
|
+
*
|
|
275
|
+
* This source code is licensed under the ISC license.
|
|
276
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
277
|
+
*/const dn=V("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/**
|
|
278
|
+
* @license lucide-react v0.303.0 - ISC
|
|
279
|
+
*
|
|
280
|
+
* This source code is licensed under the ISC license.
|
|
281
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
282
|
+
*/const Vs=V("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
|
|
283
|
+
* @license lucide-react v0.303.0 - ISC
|
|
284
|
+
*
|
|
285
|
+
* This source code is licensed under the ISC license.
|
|
286
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
287
|
+
*/const tf=V("Zap",[["polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2",key:"45s27k"}]]),fv=[{id:"chat",label:"Chat",icon:$s},{id:"agents",label:"Agents",icon:xa},{id:"code",label:"Code",icon:Xd},{id:"worktrees",label:"Worktrees",icon:cn},{id:"skills",label:"Skills",icon:dn},{id:"automations",label:"Automations",icon:Ba},{id:"audit",label:"Audit",icon:Ui}],pv=({activeTab:e,onTabChange:t})=>i.jsxs("aside",{className:"w-[200px] bg-[var(--bg-surface)] border-r border-[var(--border-subtle)] flex flex-col","data-testid":"sidebar",children:[i.jsx("div",{className:"p-4 border-b border-[var(--border-faint)]",children:i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("div",{className:"w-[22px] h-[22px] bg-[var(--teal-500)] rounded-[6px] flex items-center justify-center",children:i.jsx("span",{className:"text-[12px] font-bold text-[var(--bg-void)] font-[var(--font-body)]",children:"C"})}),i.jsx("span",{className:"font-medium text-[14px] text-[var(--text-primary)]",children:"Codex"})]})}),i.jsx("nav",{className:"flex-1 p-3 space-y-0.5 overflow-y-auto","data-testid":"sidebar-nav",children:fv.map(r=>{const n=r.icon,a=e===r.id;return i.jsxs("button",{onClick:()=>t(r.id),className:`w-full flex items-center gap-2 px-2.5 py-2 rounded-[var(--radius-sm)] text-[12px] transition-all duration-[150ms] ${a?"bg-[rgba(0,200,168,0.08)] text-[var(--teal-300)] border-l-[2px] border-[var(--teal-500)] pl-[9px]":"text-[var(--text-muted)] hover:bg-[var(--bg-hover)] hover:text-[var(--text-secondary)]"}`,"data-testid":`nav-${r.id}`,children:[i.jsx(n,{className:"w-3.5 h-3.5 opacity-50"}),i.jsx("span",{children:r.label})]},r.id)})}),i.jsx("div",{className:"p-3 border-t border-[var(--border-faint)]",children:i.jsxs("button",{onClick:()=>t("settings"),className:`w-full flex items-center gap-2 px-2.5 py-2 rounded-[var(--radius-sm)] text-[12px] transition-all duration-[150ms] ${e==="settings"?"bg-[rgba(0,200,168,0.08)] text-[var(--teal-300)] border-l-[2px] border-[var(--teal-500)] pl-[9px]":"text-[var(--text-muted)] hover:bg-[var(--bg-hover)] hover:text-[var(--text-secondary)]"}`,"data-testid":"nav-settings",children:[i.jsx(Bs,{className:"w-3.5 h-3.5 opacity-50"}),i.jsx("span",{children:"Settings"})]})})]}),mv=({activeTab:e,agents:t})=>{const r=t.filter(o=>o.status==="running").length,n=()=>{switch(e){case"agents":return"Agents";case"worktrees":return"Worktrees";case"skills":return"Skills";case"automations":return"Automations";case"settings":return"Settings";default:return"Codex"}},a=()=>{window.electronAPI.window.minimize()},l=()=>{window.electronAPI.window.maximize()},s=()=>{window.electronAPI.window.close()};return i.jsxs("header",{className:"h-12 border-b border-[var(--border-subtle)] bg-[var(--bg-surface)] flex items-center justify-between px-5","data-testid":"app-header",children:[i.jsxs("div",{className:"flex items-center gap-4",children:[i.jsx("div",{children:i.jsx("h1",{className:"text-[18px] font-medium text-[var(--text-primary)] tracking-tight","data-testid":"page-title",style:{fontFamily:"var(--font-display)",fontStyle:"italic",fontWeight:300},children:n()})}),e==="agents"&&r>0&&i.jsxs("div",{className:"flex items-center gap-2 px-3 py-1 bg-[rgba(60,200,120,0.1)] border border-[rgba(60,200,120,0.2)] rounded-full text-[11px] font-medium text-[var(--success)]",children:[i.jsxs("span",{className:"relative flex h-2 w-2",children:[i.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-[var(--success)] opacity-75"}),i.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-[var(--success)]"})]}),r," running"]}),i.jsxs("div",{className:"relative hidden md:block",children:[i.jsx(ef,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-[var(--text-muted)]"}),i.jsx("input",{type:"text",placeholder:"Search...",className:"pl-8 pr-3 py-1.5 bg-[var(--bg-elevated)] border border-[var(--border-subtle)] rounded-[var(--radius-sm)] text-[12px] text-[var(--text-primary)] placeholder:text-[var(--text-muted)] w-56 focus:outline-none focus:border-[var(--teal-500)] transition-colors","data-testid":"search-input"})]})]}),i.jsxs("div",{className:"flex items-center gap-1",children:[i.jsx("button",{onClick:a,className:"p-2 hover:bg-[var(--bg-hover)] rounded-[var(--radius-sm)] text-[var(--text-muted)] hover:text-[var(--text-secondary)] transition-colors","data-testid":"window-minimize",children:i.jsx(nv,{className:"w-3.5 h-3.5"})}),i.jsx("button",{onClick:l,className:"p-2 hover:bg-[var(--bg-hover)] rounded-[var(--radius-sm)] text-[var(--text-muted)] hover:text-[var(--text-secondary)] transition-colors","data-testid":"window-maximize",children:i.jsx(cv,{className:"w-3.5 h-3.5"})}),i.jsx("button",{onClick:s,className:"p-2 hover:bg-[rgba(232,90,106,0.1)] hover:text-[var(--error)] rounded-[var(--radius-sm)] text-[var(--text-muted)] transition-colors","data-testid":"window-close",children:i.jsx(Vs,{className:"w-3.5 h-3.5"})})]})]})};var xr=(e=>(e.PENDING="pending",e.APPROVED="approved",e.REJECTED="rejected",e.APPLIED="applied",e))(xr||{});const hv=({changes:e,onApprove:t,onReject:r,onApply:n,onAddLineComment:a,onDeleteLineComment:l,initialComments:s={}})=>{var W;const[o,u]=g.useState(0),[f,h]=g.useState("unified"),[m,p]=g.useState(null),[b,y]=g.useState(""),[w,C]=g.useState(s),d=g.useRef(null),c=e[o],v=I=>{const R=[],A=I.split(`
|
|
288
|
+
`);let z=0,q=0;for(const S of A)if(S.startsWith("@@")){const D=S.match(/@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@/);D&&(z=parseInt(D[1])-1,q=parseInt(D[2])-1),R.push({type:"header",content:S})}else S.startsWith("+")?(q++,R.push({type:"addition",content:S.slice(1),newLineNum:q})):S.startsWith("-")?(z++,R.push({type:"deletion",content:S.slice(1),oldLineNum:z})):S.startsWith(" ")?(z++,q++,R.push({type:"context",content:S.slice(1),oldLineNum:z,newLineNum:q})):(S.startsWith("diff")||S.startsWith("index")||S.startsWith("---")||S.startsWith("+++"))&&R.push({type:"header",content:S});return R},x=I=>{const R=(I.match(/^\+/gm)||[]).length,A=(I.match(/^-/gm)||[]).length;return{additions:R,deletions:A}},k=I=>{p(I===m?null:I),I!==m&&setTimeout(()=>{var R;return(R=d.current)==null?void 0:R.focus()},100)},N=I=>{if(!b.trim()||!c)return;const R={id:`comment-${Date.now()}`,lineNumber:I,content:b.trim(),author:"You",createdAt:new Date},A=c.id;C(z=>({...z,[A]:[...z[A]||[],R]})),a==null||a(A,I,b.trim()),y(""),p(null)},E=I=>{if(!c)return;const R=c.id;C(A=>{var z;return{...A,[R]:((z=A[R])==null?void 0:z.filter(q=>q.id!==I))||[]}}),l==null||l(I)},T=I=>{var R;return c?((R=w[c.id])==null?void 0:R.filter(A=>A.lineNumber===I))||[]:[]};if(!c)return i.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-muted-foreground p-8",children:[i.jsx(ev,{className:"w-16 h-16 mb-4 opacity-30"}),i.jsx("h3",{className:"text-lg font-medium",children:"No Changes to Review"}),i.jsx("p",{className:"text-sm mt-2",children:"All changes have been reviewed"})]});const $=x(c.diff),M=v(c.diff),L=((W=w[c.id])==null?void 0:W.length)||0;return i.jsxs("div",{className:"flex flex-col h-full bg-card",children:[i.jsxs("div",{className:"px-4 py-3 border-b border-border flex items-center justify-between bg-background/50",children:[i.jsxs("div",{className:"flex items-center gap-4",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx($i,{className:"w-5 h-5 text-muted-foreground"}),i.jsx("span",{className:"font-medium truncate max-w-md",children:c.filePath})]}),i.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[i.jsxs("span",{className:"text-green-500",children:["+",$.additions]}),i.jsxs("span",{className:"text-red-500",children:["-",$.deletions]})]}),L>0&&i.jsxs("div",{className:"flex items-center gap-1 text-xs text-muted-foreground bg-muted px-2 py-0.5 rounded-full",children:[i.jsx($s,{className:"w-3 h-3"}),L]})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsxs("span",{className:"text-sm text-muted-foreground",children:[o+1," of ",e.length]}),i.jsxs("div",{className:"flex items-center gap-1",children:[i.jsx("button",{onClick:()=>u(Math.max(0,o-1)),disabled:o===0,className:"p-1.5 hover:bg-muted rounded-md disabled:opacity-50",children:i.jsx(Qh,{className:"w-4 h-4"})}),i.jsx("button",{onClick:()=>u(Math.min(e.length-1,o+1)),disabled:o===e.length-1,className:"p-1.5 hover:bg-muted rounded-md disabled:opacity-50",children:i.jsx(qd,{className:"w-4 h-4"})})]})]})]}),i.jsxs("div",{className:"px-4 py-2 border-b border-border flex items-center justify-between",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("button",{onClick:()=>h("unified"),className:`px-3 py-1 text-sm rounded-md transition-colors ${f==="unified"?"bg-primary text-primary-foreground":"hover:bg-muted"}`,children:"Unified"}),i.jsx("button",{onClick:()=>h("split"),className:`px-3 py-1 text-sm rounded-md transition-colors ${f==="split"?"bg-primary text-primary-foreground":"hover:bg-muted"}`,children:"Split"})]}),i.jsx("span",{className:`text-xs px-2 py-1 rounded-full ${c.status===xr.PENDING?"bg-yellow-500/10 text-yellow-500":c.status===xr.APPROVED?"bg-green-500/10 text-green-500":c.status===xr.REJECTED?"bg-red-500/10 text-red-500":"bg-blue-500/10 text-blue-500"}`,children:c.status})]}),i.jsx("div",{className:"flex-1 overflow-auto bg-background",children:f==="unified"?i.jsx("div",{className:"font-mono text-sm",children:M.map((I,R)=>{const A=I.newLineNum||I.oldLineNum||R,z=T(A),q=m===R;return i.jsxs("div",{children:[i.jsxs("div",{onClick:()=>I.type!=="header"&&k(R),className:`flex px-4 py-0.5 group cursor-pointer transition-colors ${I.type==="addition"?"bg-green-500/10 hover:bg-green-500/20":I.type==="deletion"?"bg-red-500/10 hover:bg-red-500/20":I.type==="header"?"bg-muted/50 text-muted-foreground":"hover:bg-muted/50"} ${q?"ring-2 ring-primary ring-inset":""}`,children:[i.jsxs("div",{className:"flex gap-2 w-20 flex-shrink-0 text-muted-foreground select-none",children:[i.jsx("span",{className:"w-8 text-right",children:I.oldLineNum||""}),i.jsx("span",{className:"w-8 text-right",children:I.newLineNum||""})]}),i.jsx("span",{className:`w-6 flex-shrink-0 select-none ${I.type==="addition"?"text-green-500":I.type==="deletion"?"text-red-500":"text-muted-foreground"}`,children:I.type==="addition"?"+":I.type==="deletion"?"-":" "}),i.jsx("span",{className:`flex-1 ${I.type==="addition"?"text-green-700 dark:text-green-300":I.type==="deletion"?"text-red-700 dark:text-red-300":""}`,children:I.content||" "}),I.type!=="header"&&i.jsx("button",{onClick:S=>{S.stopPropagation(),k(R)},className:"opacity-0 group-hover:opacity-100 p-1 hover:bg-muted rounded transition-opacity",title:"Add comment",children:i.jsx(rv,{className:"w-3.5 h-3.5 text-muted-foreground"})})]}),z.length>0&&i.jsx("div",{className:"bg-muted/30 border-l-2 border-primary ml-4 mr-4 my-1 rounded-r",children:z.map(S=>i.jsxs("div",{className:"p-3 border-b border-border last:border-b-0",children:[i.jsxs("div",{className:"flex items-start justify-between gap-2",children:[i.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[i.jsx("span",{className:"font-medium text-foreground",children:S.author}),i.jsx("span",{children:"•"}),i.jsx("span",{children:new Date(S.createdAt).toLocaleString()})]}),i.jsx("button",{onClick:()=>E(S.id),className:"p-1 hover:bg-muted rounded opacity-0 hover:opacity-100 transition-opacity",title:"Delete comment",children:i.jsx(Dn,{className:"w-3 h-3 text-muted-foreground"})})]}),i.jsx("p",{className:"text-sm mt-1",children:S.content})]},S.id))}),q&&I.type!=="header"&&i.jsxs("div",{className:"px-4 py-2 bg-primary/5 border-l-2 border-primary ml-4 mr-4 my-1 rounded-r",children:[i.jsx("textarea",{ref:d,value:b,onChange:S=>y(S.target.value),placeholder:"Add a comment on this line...",className:"w-full px-3 py-2 bg-background border border-input rounded-md text-sm resize-none",rows:2,onKeyDown:S=>{S.key==="Enter"&&!S.shiftKey&&(S.preventDefault(),N(A)),S.key==="Escape"&&(p(null),y(""))}}),i.jsxs("div",{className:"flex items-center justify-end gap-2 mt-2",children:[i.jsx("button",{onClick:()=>{p(null),y("")},className:"px-3 py-1 text-xs text-muted-foreground hover:text-foreground",children:"Cancel"}),i.jsxs("button",{onClick:()=>N(A),disabled:!b.trim(),className:"flex items-center gap-1 px-3 py-1 bg-primary text-primary-foreground rounded-md text-xs hover:bg-primary/90 disabled:opacity-50",children:[i.jsx(ov,{className:"w-3 h-3"}),"Comment"]})]})]})]},R)})}):i.jsxs("div",{className:"grid grid-cols-2 gap-0 font-mono text-sm",children:[i.jsxs("div",{className:"border-r border-border",children:[i.jsx("div",{className:"px-2 py-1 bg-muted text-xs text-muted-foreground sticky top-0",children:"Before"}),M.map((I,R)=>i.jsxs("div",{className:`flex px-2 py-0.5 ${I.type==="deletion"?"bg-red-500/10 text-red-700 dark:text-red-300":""} ${I.type==="header"?"text-muted-foreground text-xs":""}`,children:[i.jsx("span",{className:"w-8 text-right text-muted-foreground select-none mr-2",children:I.oldLineNum||""}),i.jsx("span",{children:I.content||" "})]},`old-${R}`))]}),i.jsxs("div",{children:[i.jsx("div",{className:"px-2 py-1 bg-muted text-xs text-muted-foreground sticky top-0",children:"After"}),M.map((I,R)=>i.jsxs("div",{className:`flex px-2 py-0.5 ${I.type==="addition"?"bg-green-500/10 text-green-700 dark:text-green-300":""} ${I.type==="header"?"text-muted-foreground text-xs":""}`,children:[i.jsx("span",{className:"w-8 text-right text-muted-foreground select-none mr-2",children:I.newLineNum||""}),i.jsx("span",{children:I.content||" "})]},`new-${R}`))]})]})}),i.jsx("div",{className:"px-4 py-3 border-t border-border flex items-center justify-between bg-background/50",children:i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsxs("button",{onClick:()=>r(c.id),className:"flex items-center gap-2 px-4 py-2 text-sm text-red-500 hover:bg-red-500/10 rounded-md transition-colors",children:[i.jsx(Vs,{className:"w-4 h-4"}),"Reject"]}),i.jsxs("button",{onClick:()=>{t(c.id),o<e.length-1&&u(o+1)},className:"flex items-center gap-2 px-4 py-2 text-sm bg-green-500/10 text-green-500 hover:bg-green-500/20 rounded-md transition-colors",children:[i.jsx(Gd,{className:"w-4 h-4"}),"Approve"]}),c.status===xr.APPROVED&&i.jsxs("button",{onClick:()=>n(c.id),className:"flex items-center gap-2 px-4 py-2 text-sm bg-primary text-primary-foreground hover:bg-primary/90 rounded-md transition-colors",children:[i.jsx(Zh,{className:"w-4 h-4"}),"Apply"]})]})})]})},vv=({agents:e,providers:t,skills:r,onCreateAgent:n,onDeleteAgent:a})=>{var se,xe;const[l,s]=g.useState(!1),[o,u]=g.useState(null),[f,h]=g.useState([]),[m,p]=g.useState(!1),[b,y]=g.useState([]),[w,C]=g.useState([]),[d,c]=g.useState(!1),[v,x]=g.useState({}),[k,N]=g.useState({}),[E,T]=g.useState("task"),[$,M]=g.useState(""),[L,W]=g.useState({name:"",projectPath:"",providerId:((se=t[0])==null?void 0:se.id)||"",model:"",skills:[]}),I=g.useMemo(()=>o?f.filter(j=>j.agentId===o.id):[],[f,o]),R=async j=>{p(!0);try{const _=await window.electronAPI.changes.list(j);h(_)}catch(_){console.error("Failed to load code changes:",_)}finally{p(!1)}},A=async j=>{try{const _=await window.electronAPI.queue.list(j);y(_)}catch(_){console.error("Failed to load queue:",_)}},z=async j=>{try{const _=await window.electronAPI.queue.history(j,20);C(_)}catch(_){console.error("Failed to load queue history:",_)}};g.useEffect(()=>{o&&(R(o.id),A(o.id),z(o.id))},[o==null?void 0:o.id]),g.useEffect(()=>{const j=(J,X)=>{x(He=>({...He,[X.agentId]:!0}))},_=async(J,X)=>{const He=k[X.agentId];if(He){try{await window.electronAPI.queue.complete(X.agentId,He.id,"completed"),await A(X.agentId)}catch(Qe){console.error("Failed to complete queued item:",Qe)}N(Qe=>({...Qe,[X.agentId]:null}))}x(Qe=>({...Qe,[X.agentId]:!1}))},Y=async(J,X)=>{const He=k[X.agentId];if(He){try{await window.electronAPI.queue.complete(X.agentId,He.id,"failed",X.error?String(X.error):void 0),await A(X.agentId)}catch(Qe){console.error("Failed to fail queued item:",Qe)}N(Qe=>({...Qe,[X.agentId]:null}))}x(Qe=>({...Qe,[X.agentId]:!1}))};return window.electronAPI.on("agent:taskStarted",j),window.electronAPI.on("agent:taskCompleted",_),window.electronAPI.on("agent:taskFailed",Y),()=>{window.electronAPI.removeListener("agent:taskStarted",j),window.electronAPI.removeListener("agent:taskCompleted",_),window.electronAPI.removeListener("agent:taskFailed",Y)}},[k]),g.useEffect(()=>{if(!o)return;const j=o.id;v[j]||k[j]||!b.some(J=>(J.status||"pending")==="pending")||(x(J=>({...J,[j]:!0})),(async()=>{try{const J=await window.electronAPI.queue.claimNext(j);if(!J){x(X=>({...X,[j]:!1}));return}N(X=>({...X,[j]:J})),await A(j),J.type==="message"?(await window.electronAPI.agent.sendMessage(j,J.content),await window.electronAPI.queue.complete(j,J.id,"completed"),N(X=>({...X,[j]:null})),await A(j),x(X=>({...X,[j]:!1}))):await window.electronAPI.agent.executeTask(j,J.content)}catch(J){console.error("Failed to dispatch queued item:",J);const X=k[j];if(X){try{await window.electronAPI.queue.complete(j,X.id,"failed",J instanceof Error?J.message:String(J))}catch{}N(He=>({...He,[j]:null}))}x(He=>({...He,[j]:!1})),await A(j),await window.electronAPI.notification.show({title:"Queue dispatch failed",body:J instanceof Error?J.message:String(J)})}})())},[b,v,k,o==null?void 0:o.id]),g.useEffect(()=>{const j=(_,Y)=>{o&&Y.agentId===o.id&&R(o.id)};return window.electronAPI.on("changes:created",j),()=>{window.electronAPI.removeListener("changes:created",j)}},[o==null?void 0:o.id]);const q=async()=>{var j;try{await n(L),s(!1),W({name:"",projectPath:"",providerId:((j=t[0])==null?void 0:j.id)||"",model:"",skills:[]})}catch(_){console.error("Failed to create agent:",_)}},S=async(j,_)=>{try{await window.electronAPI.agent.sendMessage(j,_)}catch(Y){console.error("Failed to send message:",Y)}},D=async j=>{if(o)try{await window.electronAPI.changes.approve(j),await R(o.id),await window.electronAPI.notification.show({title:"Change approved",body:"The change is approved and ready to apply."})}catch(_){console.error("Failed to approve change:",_),await window.electronAPI.notification.show({title:"Approve failed",body:_ instanceof Error?_.message:String(_)})}},B=async(j,_)=>{if(o)try{const Y=typeof _=="string"?_:window.prompt("Rejection comment (optional):")??void 0;await window.electronAPI.changes.reject(j,Y),await R(o.id),await window.electronAPI.notification.show({title:"Change rejected",body:"The change was rejected."})}catch(Y){console.error("Failed to reject change:",Y),await window.electronAPI.notification.show({title:"Reject failed",body:Y instanceof Error?Y.message:String(Y)})}},F=async j=>{if(o)try{await window.electronAPI.changes.apply(j),await R(o.id),await window.electronAPI.notification.show({title:"Change applied",body:"The change was written to the worktree."})}catch(_){console.error("Failed to apply change:",_),await window.electronAPI.notification.show({title:"Apply failed",body:_ instanceof Error?_.message:String(_)})}},U=j=>{switch(j){case"running":return i.jsx("div",{className:"w-2 h-2 bg-[var(--success)] rounded-full animate-pulse"});case"paused":return i.jsx("div",{className:"w-2 h-2 bg-[var(--warning)] rounded-full"});case"error":return i.jsx("div",{className:"w-2 h-2 bg-[var(--error)] rounded-full"});default:return i.jsx("div",{className:"w-2 h-2 bg-[var(--text-muted)] rounded-full"})}};return i.jsxs("div",{className:"h-full flex",children:[i.jsxs("div",{className:"w-80 border-r border-[var(--border-subtle)] bg-[var(--bg-surface)] flex flex-col",children:[i.jsxs("div",{className:"p-4 border-b border-[var(--border-faint)] flex items-center justify-between",children:[i.jsx("h2",{className:"font-medium text-[13px] text-[var(--text-primary)]",children:"Active Agents"}),i.jsx("button",{onClick:()=>s(!0),className:"p-2 bg-[var(--teal-500)] text-[var(--bg-void)] rounded-[var(--radius-sm)] hover:bg-[var(--teal-400)] transition-colors",children:i.jsx(dl,{className:"w-4 h-4"})})]}),i.jsxs("div",{className:"flex-1 overflow-auto p-2 space-y-1",children:[e.map(j=>i.jsxs("div",{onClick:()=>u(j),className:`p-3 rounded-[var(--radius-md)] cursor-pointer transition-all ${(o==null?void 0:o.id)===j.id?"bg-[rgba(0,200,168,0.08)] border border-[var(--border-accent)]":"hover:bg-[var(--bg-hover)] border border-transparent"}`,children:[i.jsxs("div",{className:"flex items-start justify-between",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(xa,{className:"w-4 h-4 text-[var(--text-muted)]"}),i.jsx("span",{className:"font-medium text-[13px] text-[var(--text-primary)]",children:j.name})]}),U(j.status)]}),i.jsxs("div",{className:"mt-2 text-[11px] text-[var(--text-muted)]",children:[i.jsx("div",{className:"truncate",children:j.projectPath}),i.jsx("div",{className:"mt-1",children:j.model})]})]},j.id)),e.length===0&&i.jsxs("div",{className:"text-center py-8 text-[var(--text-muted)]",children:[i.jsx(xa,{className:"w-12 h-12 mx-auto mb-2 opacity-30"}),i.jsx("p",{className:"text-[13px]",children:"No agents yet"}),i.jsx("p",{className:"text-[11px] mt-1",children:"Create your first agent to get started"})]})]})]}),i.jsx("div",{className:"flex-1 flex flex-col",children:o?i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"p-4 border-b border-[var(--border-subtle)] flex items-center justify-between",children:[i.jsxs("div",{children:[i.jsx("h2",{className:"text-[16px] font-medium text-[var(--text-primary)]",children:o.name}),i.jsxs("p",{className:"text-[12px] text-[var(--text-muted)]",children:[o.projectPath," · ",o.model]})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsxs("button",{onClick:()=>S(o.id,"Hello!"),className:"px-3 py-1.5 text-[12px] bg-[var(--teal-500)] text-[var(--bg-void)] rounded-[var(--radius-sm)] hover:bg-[var(--teal-400)] transition-colors flex items-center gap-1",children:[i.jsx($s,{className:"w-3.5 h-3.5"}),"Chat"]}),i.jsx("button",{onClick:()=>a(o.id),className:"p-2 text-[var(--error)] hover:bg-[rgba(232,90,106,0.1)] rounded-[var(--radius-sm)] transition-colors",children:i.jsx(Dn,{className:"w-4 h-4"})})]})]}),i.jsx("div",{className:"flex-1 overflow-auto p-4",children:i.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"bg-[var(--bg-card)] border border-[var(--border-subtle)] rounded-[var(--radius-lg)] p-4",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{children:[i.jsx("h3",{className:"text-[13px] font-medium text-[var(--text-primary)]",children:"Queue"}),i.jsx("p",{className:"text-[11px] text-[var(--text-muted)]",children:"Stack work while the agent is busy"})]}),i.jsxs("span",{className:"text-[11px] text-[var(--text-muted)]",children:[b.length," queued",v[o.id]?" · running":""]})]}),i.jsxs("div",{className:"mt-3 flex gap-2",children:[i.jsxs("select",{value:E,onChange:j=>T(j.target.value),className:"px-2 py-2 bg-[var(--bg-elevated)] border border-[var(--border-subtle)] rounded-[var(--radius-md)] text-[12px] text-[var(--text-primary)]",children:[i.jsx("option",{value:"task",children:"Task"}),i.jsx("option",{value:"message",children:"Message"})]}),i.jsx("input",{value:$,onChange:j=>M(j.target.value),placeholder:E==="task"?"Describe the task...":"Type a message...",className:"flex-1 px-3 py-2 bg-[var(--bg-elevated)] border border-[var(--border-subtle)] rounded-[var(--radius-md)] text-[12px] text-[var(--text-primary)] placeholder:text-[var(--text-disabled)] focus:outline-none focus:border-[var(--teal-500)]"}),i.jsx("button",{onClick:()=>{if(!$.trim()||!o)return;const j=o.id;(async()=>{try{await window.electronAPI.queue.enqueue(j,E,$.trim()),M(""),await A(j)}catch(_){await window.electronAPI.notification.show({title:"Enqueue failed",body:_ instanceof Error?_.message:String(_)})}})()},className:"px-3 py-2 bg-[var(--teal-500)] text-[var(--bg-void)] rounded-[var(--radius-md)] hover:bg-[var(--teal-400)] text-[12px] font-medium transition-colors",children:"Add"})]}),i.jsxs("div",{className:"mt-3 space-y-2 max-h-40 overflow-auto",children:[b.map((j,_)=>i.jsxs("div",{className:"flex items-center gap-2 p-2 bg-[var(--bg-elevated)] rounded-[var(--radius-md)]",children:[i.jsx("span",{className:"text-[10px] px-2 py-0.5 rounded-full bg-[var(--bg-hover)] border border-[var(--border-subtle)] text-[var(--text-secondary)]",children:j.type}),i.jsx("span",{className:"text-[12px] flex-1 truncate text-[var(--text-primary)]",children:j.content}),i.jsx("button",{onClick:()=>{const Y=o.id;(async()=>(await window.electronAPI.queue.delete(Y,j.id),await A(Y)))()},className:"text-[11px] text-[var(--error)] hover:underline",children:"Remove"})]},j.id)),b.length===0&&i.jsx("div",{className:"text-[11px] text-[var(--text-muted)]",children:"No queued items"})]}),i.jsxs("div",{className:"mt-3",children:[i.jsxs("button",{onClick:()=>c(!d),className:"text-[11px] text-[var(--text-muted)] hover:text-[var(--text-secondary)]",children:[d?"Hide":"Show"," history (",w.length,")"]}),d&&i.jsxs("div",{className:"mt-2 space-y-1 max-h-32 overflow-auto",children:[w.map(j=>i.jsxs("div",{className:"flex items-center gap-2 p-2 bg-[var(--bg-elevated)] rounded-[var(--radius-md)] text-[11px]",children:[i.jsx("span",{className:`px-1.5 py-0.5 rounded-full ${j.status==="completed"?"bg-[rgba(60,200,120,0.1)] text-[var(--success)]":"bg-[rgba(232,90,106,0.1)] text-[var(--error)]"}`,children:j.status}),i.jsx("span",{className:"text-[var(--text-muted)]",children:j.type}),i.jsx("span",{className:"flex-1 truncate text-[var(--text-primary)]",children:j.content}),j.error&&i.jsx("span",{className:"text-[var(--error)] truncate",title:j.error,children:"⚠️"})]},j.id)),w.length===0&&i.jsx("div",{className:"text-[11px] text-[var(--text-muted)]",children:"No completed items yet"})]})]})]}),i.jsxs("div",{children:[i.jsx("h3",{className:"text-[12px] font-medium text-[var(--text-secondary)] mb-2",children:"Status"}),i.jsx("div",{className:"flex items-center gap-2",children:i.jsx("span",{className:`px-2 py-1 rounded-full text-[11px] font-medium ${o.status==="running"?"bg-[rgba(60,200,120,0.1)] text-[var(--success)]":o.status==="paused"?"bg-[rgba(230,185,74,0.1)] text-[var(--warning)]":o.status==="error"?"bg-[rgba(232,90,106,0.1)] text-[var(--error)]":"bg-[var(--bg-hover)] text-[var(--text-muted)]"}`,children:o.status})})]}),i.jsxs("div",{children:[i.jsx("h3",{className:"text-[12px] font-medium text-[var(--text-secondary)] mb-2",children:"Skills"}),i.jsxs("div",{className:"flex flex-wrap gap-2",children:[o.skills.map(j=>{const _=r.find(Y=>Y.id===j);return i.jsx("span",{className:"px-2 py-1 bg-[var(--bg-hover)] rounded-[var(--radius-sm)] text-[11px] text-[var(--text-secondary)]",children:(_==null?void 0:_.name)||j},j)}),o.skills.length===0&&i.jsx("span",{className:"text-[12px] text-[var(--text-muted)]",children:"No skills applied"})]})]}),i.jsxs("div",{children:[i.jsx("h3",{className:"text-[12px] font-medium text-[var(--text-secondary)] mb-2",children:"Recent Tasks"}),i.jsxs("div",{className:"space-y-2",children:[o.tasks.slice(-5).map(j=>i.jsxs("div",{className:"p-3 bg-[var(--bg-card)] border border-[var(--border-subtle)] rounded-[var(--radius-md)]",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("span",{className:"text-[12px] font-medium text-[var(--text-primary)]",children:j.description}),i.jsx("span",{className:`text-[11px] ${j.status==="completed"?"text-[var(--success)]":j.status==="failed"?"text-[var(--error)]":j.status==="running"?"text-[var(--info)]":"text-[var(--text-muted)]"}`,children:j.status})]}),j.status==="running"&&i.jsx("div",{className:"mt-2 h-1 bg-[var(--bg-hover)] rounded-full overflow-hidden",children:i.jsx("div",{className:"h-full bg-[var(--teal-500)] transition-all",style:{width:`${j.progress}%`}})})]},j.id)),o.tasks.length===0&&i.jsx("span",{className:"text-[12px] text-[var(--text-muted)]",children:"No tasks yet"})]})]})]}),i.jsxs("div",{className:"bg-[var(--bg-card)] border border-[var(--border-subtle)] rounded-[var(--radius-lg)] overflow-hidden min-h-[420px]",children:[i.jsxs("div",{className:"p-3 border-b border-[var(--border-subtle)] flex items-center justify-between",children:[i.jsxs("div",{children:[i.jsx("h3",{className:"text-[13px] font-medium text-[var(--text-primary)]",children:"Changes"}),i.jsx("p",{className:"text-[11px] text-[var(--text-muted)]",children:"Review and apply changes generated by the agent"})]}),i.jsx("button",{onClick:async()=>{if(o)try{const _=(await window.electronAPI.checkpoints.list(o.id)).find(J=>!J.restoredAt),Y=_==null?void 0:_.filePath;await window.electronAPI.checkpoints.restoreLast(o.id),await R(o.id),await window.electronAPI.notification.show({title:"Checkpoint restored",body:Y?`Rolled back: ${Y}`:"Last applied change was rolled back."})}catch(j){await window.electronAPI.notification.show({title:"Rollback failed",body:j instanceof Error?j.message:String(j)})}},className:"px-3 py-1.5 text-[11px] bg-[var(--bg-hover)] hover:bg-[var(--bg-active)] rounded-[var(--radius-sm)] text-[var(--text-secondary)] transition-colors",children:"Undo last apply"}),m&&i.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:"Loading..."})]}),i.jsx("div",{className:"h-[520px]",children:i.jsx(hv,{changes:I.filter(j=>j.status!==xr.APPLIED),onApprove:D,onReject:B,onApply:F})})]})]})})]}):i.jsx("div",{className:"flex-1 flex items-center justify-center text-[var(--text-muted)]",children:i.jsxs("div",{className:"text-center",children:[i.jsx(xa,{className:"w-16 h-16 mx-auto mb-4 opacity-30"}),i.jsx("p",{className:"text-[14px]",children:"Select an agent to view details"})]})})}),l&&i.jsx("div",{className:"fixed inset-0 bg-[rgba(3,7,9,0.8)] flex items-center justify-center z-50",children:i.jsxs("div",{className:"bg-[var(--bg-card)] border border-[var(--border-subtle)] rounded-[var(--radius-lg)] p-6 w-[500px] max-w-[90vw]",children:[i.jsx("h2",{className:"text-[16px] font-medium text-[var(--text-primary)] mb-4",children:"Create New Agent"}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{children:[i.jsx("label",{className:"block text-[11px] font-medium text-[var(--text-secondary)] mb-1",children:"Name"}),i.jsx("input",{type:"text",value:L.name,onChange:j=>W({...L,name:j.target.value}),className:"w-full px-3 py-2 bg-[var(--bg-elevated)] border border-[var(--border-subtle)] rounded-[var(--radius-md)] text-[13px] text-[var(--text-primary)] placeholder:text-[var(--text-disabled)] focus:outline-none focus:border-[var(--teal-500)]",placeholder:"My Coding Agent"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-[11px] font-medium text-[var(--text-secondary)] mb-1",children:"Project Path"}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx("input",{type:"text",value:L.projectPath,onChange:j=>W({...L,projectPath:j.target.value}),className:"flex-1 px-3 py-2 bg-[var(--bg-elevated)] border border-[var(--border-subtle)] rounded-[var(--radius-md)] text-[13px] text-[var(--text-primary)] placeholder:text-[var(--text-disabled)] focus:outline-none focus:border-[var(--teal-500)]",placeholder:"/path/to/project"}),i.jsx("button",{onClick:async()=>{const j=await window.electronAPI.dialog.selectFolder();j&&W({...L,projectPath:j})},className:"px-3 py-2 bg-[var(--bg-hover)] rounded-[var(--radius-md)] hover:bg-[var(--bg-active)] text-[13px] text-[var(--text-secondary)] transition-colors",children:"Browse"})]})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-[11px] font-medium text-[var(--text-secondary)] mb-1",children:"Provider"}),i.jsx("select",{value:L.providerId,onChange:j=>{var Y;const _=t.find(J=>J.id===j.target.value);W({...L,providerId:j.target.value,model:((Y=_==null?void 0:_.models[0])==null?void 0:Y.id)||""})},className:"w-full px-3 py-2 bg-[var(--bg-elevated)] border border-[var(--border-subtle)] rounded-[var(--radius-md)] text-[13px] text-[var(--text-primary)]",children:t.map(j=>i.jsx("option",{value:j.id,children:j.name},j.id))})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-[11px] font-medium text-[var(--text-secondary)] mb-1",children:"Model"}),i.jsx("select",{value:L.model,onChange:j=>W({...L,model:j.target.value}),className:"w-full px-3 py-2 bg-[var(--bg-elevated)] border border-[var(--border-subtle)] rounded-[var(--radius-md)] text-[13px] text-[var(--text-primary)]",children:(xe=t.find(j=>j.id===L.providerId))==null?void 0:xe.models.map(j=>i.jsx("option",{value:j.id,children:j.name},j.id))})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-[11px] font-medium text-[var(--text-secondary)] mb-1",children:"Skills"}),i.jsx("div",{className:"flex flex-wrap gap-2",children:r.map(j=>i.jsx("button",{onClick:()=>{const _=L.skills.includes(j.id)?L.skills.filter(Y=>Y!==j.id):[...L.skills,j.id];W({...L,skills:_})},className:`px-3 py-1.5 rounded-[var(--radius-sm)] text-[12px] transition-colors ${L.skills.includes(j.id)?"bg-[var(--teal-500)] text-[var(--bg-void)]":"bg-[var(--bg-hover)] text-[var(--text-secondary)] hover:bg-[var(--bg-active)]"}`,children:j.name},j.id))})]})]}),i.jsxs("div",{className:"flex justify-end gap-2 mt-6",children:[i.jsx("button",{onClick:()=>s(!1),className:"px-4 py-2 text-[var(--text-muted)] hover:text-[var(--text-primary)] text-[13px] transition-colors",children:"Cancel"}),i.jsx("button",{onClick:q,disabled:!L.name||!L.projectPath,className:"px-4 py-2 bg-[var(--teal-500)] text-[var(--bg-void)] rounded-[var(--radius-sm)] hover:bg-[var(--teal-400)] disabled:opacity-50 text-[13px] font-medium transition-colors",children:"Create Agent"})]})]})})]})},gv=({worktrees:e,onCreateWorktree:t})=>{const[r,n]=g.useState(!1),[a,l]=g.useState({repoPath:"",name:""}),s=async()=>{try{await t(a.repoPath,a.name),n(!1),l({repoPath:"",name:""})}catch(o){console.error("Failed to create worktree:",o)}};return i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsxs("div",{className:"p-4 border-b border-[var(--border-subtle)] flex items-center justify-between",children:[i.jsxs("div",{children:[i.jsx("h2",{className:"text-[18px] font-medium text-[var(--text-primary)]",style:{fontFamily:"var(--font-display)",fontStyle:"italic",fontWeight:300},children:"Worktrees"}),i.jsx("p",{className:"text-[12px] text-[var(--text-muted)]",children:"Isolated workspaces for agents"})]}),i.jsxs("button",{onClick:()=>n(!0),className:"flex items-center gap-2 px-4 py-2 bg-[var(--teal-500)] text-[var(--bg-void)] rounded-[var(--radius-sm)] hover:bg-[var(--teal-400)] text-[13px] font-medium transition-colors",children:[i.jsx(dl,{className:"w-4 h-4"}),"New Worktree"]})]}),i.jsx("div",{className:"flex-1 overflow-auto p-4",children:i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[e.map(o=>{var u;return i.jsxs("div",{className:"p-4 bg-[var(--bg-card)] border border-[var(--border-subtle)] rounded-[var(--radius-lg)] hover:border-[var(--border-accent)] hover:translate-y-[-2px] transition-all",children:[i.jsxs("div",{className:"flex items-start justify-between mb-3",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(cn,{className:"w-5 h-5 text-[var(--text-muted)]"}),i.jsx("span",{className:"font-medium text-[13px] text-[var(--text-primary)]",children:o.name})]}),o.isMain&&i.jsx("span",{className:"badge badge-teal text-[10px]",children:"Main"})]}),i.jsxs("div",{className:"space-y-2 text-[12px] text-[var(--text-muted)]",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(Jd,{className:"w-4 h-4"}),i.jsx("span",{className:"truncate",children:o.path})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(cn,{className:"w-4 h-4"}),i.jsx("span",{children:o.branch})]}),i.jsx("div",{className:"text-[11px] font-[var(--font-mono)] text-[var(--teal-300)] truncate",children:(u=o.commit)==null?void 0:u.slice(0,8)})]}),!o.isMain&&i.jsxs("div",{className:"flex gap-2 mt-4 pt-4 border-t border-[var(--border-faint)]",children:[i.jsxs("button",{className:"flex-1 px-3 py-1.5 text-[12px] bg-[var(--bg-hover)] rounded-[var(--radius-sm)] hover:bg-[var(--bg-active)] text-[var(--text-secondary)] transition-colors",children:[i.jsx(Jh,{className:"w-4 h-4 inline mr-1"}),"Merge"]}),i.jsx("button",{className:"p-1.5 text-[var(--error)] hover:bg-[rgba(232,90,106,0.1)] rounded-[var(--radius-sm)] transition-colors",children:i.jsx(Dn,{className:"w-4 h-4"})})]})]},o.name)}),e.length===0&&i.jsxs("div",{className:"col-span-full flex flex-col items-center justify-center py-12 text-[var(--text-muted)]",children:[i.jsx(cn,{className:"w-16 h-16 mb-4 opacity-30"}),i.jsx("p",{className:"text-[15px] font-medium text-[var(--text-primary)]",children:"No worktrees yet"}),i.jsx("p",{className:"text-[12px]",children:"Create a worktree to isolate agent changes"})]})]})}),r&&i.jsx("div",{className:"fixed inset-0 bg-[rgba(3,7,9,0.8)] flex items-center justify-center z-50",children:i.jsxs("div",{className:"bg-[var(--bg-card)] border border-[var(--border-subtle)] rounded-[var(--radius-lg)] p-6 w-[500px]",children:[i.jsx("h2",{className:"text-[16px] font-medium text-[var(--text-primary)] mb-4",children:"Create New Worktree"}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{children:[i.jsx("label",{className:"block text-[11px] font-medium mb-1 text-[var(--text-secondary)]",children:"Repository Path"}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx("input",{type:"text",value:a.repoPath,onChange:o=>l({...a,repoPath:o.target.value}),className:"flex-1 px-3 py-2 bg-[var(--bg-elevated)] border border-[var(--border-subtle)] rounded-[var(--radius-md)] text-[13px] text-[var(--text-primary)] placeholder:text-[var(--text-disabled)] focus:outline-none focus:border-[var(--teal-500)]",placeholder:"/path/to/repo"}),i.jsx("button",{onClick:async()=>{const o=await window.electronAPI.dialog.selectFolder();o&&l({...a,repoPath:o})},className:"px-3 py-2 bg-[var(--bg-hover)] rounded-[var(--radius-md)] hover:bg-[var(--bg-active)] text-[13px] text-[var(--text-secondary)] transition-colors",children:"Browse"})]})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-[11px] font-medium mb-1 text-[var(--text-secondary)]",children:"Worktree Name"}),i.jsx("input",{type:"text",value:a.name,onChange:o=>l({...a,name:o.target.value}),className:"w-full px-3 py-2 bg-[var(--bg-elevated)] border border-[var(--border-subtle)] rounded-[var(--radius-md)] text-[13px] text-[var(--text-primary)] placeholder:text-[var(--text-disabled)] focus:outline-none focus:border-[var(--teal-500)]",placeholder:"feature-branch"})]})]}),i.jsxs("div",{className:"flex justify-end gap-2 mt-6",children:[i.jsx("button",{onClick:()=>n(!1),className:"px-4 py-2 text-[var(--text-muted)] hover:text-[var(--text-primary)] text-[13px] transition-colors",children:"Cancel"}),i.jsx("button",{onClick:s,disabled:!a.repoPath||!a.name,className:"px-4 py-2 bg-[var(--teal-500)] text-[var(--bg-void)] rounded-[var(--radius-sm)] disabled:opacity-50 text-[13px] font-medium transition-colors hover:bg-[var(--teal-400)]",children:"Create Worktree"})]})]})})]})},xv=({skills:e,onCreateSkill:t})=>{const[r,n]=g.useState(!1),[a,l]=g.useState(null),[s,o]=g.useState(""),[u,f]=g.useState({name:"",description:"",content:""}),h=e.filter(p=>p.name.toLowerCase().includes(s.toLowerCase())||p.description.toLowerCase().includes(s.toLowerCase())||p.tags.some(b=>b.toLowerCase().includes(s.toLowerCase()))),m=async()=>{try{await t(u),n(!1),f({name:"",description:"",content:""})}catch(p){console.error("Failed to create skill:",p)}};return i.jsxs("div",{className:"h-full flex",children:[i.jsxs("div",{className:"w-80 border-r border-[var(--border-subtle)] bg-[var(--bg-surface)] flex flex-col",children:[i.jsxs("div",{className:"p-4 border-b border-[var(--border-faint)]",children:[i.jsxs("div",{className:"flex items-center justify-between mb-3",children:[i.jsx("h2",{className:"font-medium text-[13px] text-[var(--text-primary)]",children:"Skills Library"}),i.jsx("button",{onClick:()=>n(!0),className:"p-2 bg-[var(--teal-500)] text-[var(--bg-void)] rounded-[var(--radius-sm)] hover:bg-[var(--teal-400)] transition-colors",children:i.jsx(dl,{className:"w-4 h-4"})})]}),i.jsx("input",{type:"text",placeholder:"Search skills...",value:s,onChange:p=>o(p.target.value),className:"w-full px-3 py-2 bg-[var(--bg-elevated)] border border-[var(--border-subtle)] rounded-[var(--radius-md)] text-[12px] text-[var(--text-primary)] placeholder:text-[var(--text-disabled)] focus:outline-none focus:border-[var(--teal-500)]"})]}),i.jsxs("div",{className:"flex-1 overflow-auto p-2 space-y-1",children:[h.map(p=>i.jsxs("div",{onClick:()=>l(p),className:`p-3 rounded-[var(--radius-md)] cursor-pointer transition-all ${(a==null?void 0:a.id)===p.id?"bg-[rgba(0,200,168,0.08)] border border-[var(--border-accent)]":"hover:bg-[var(--bg-hover)] border border-transparent"}`,children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(dn,{className:"w-4 h-4 text-[var(--text-muted)]"}),i.jsx("span",{className:"font-medium text-[13px] text-[var(--text-primary)]",children:p.name})]}),i.jsx("p",{className:"mt-1 text-[11px] text-[var(--text-muted)] line-clamp-2",children:p.description}),i.jsx("div",{className:"flex flex-wrap gap-1 mt-2",children:p.tags.slice(0,3).map(b=>i.jsx("span",{className:"badge badge-neutral text-[10px]",children:b},b))})]},p.id)),h.length===0&&i.jsxs("div",{className:"text-center py-8 text-[var(--text-muted)]",children:[i.jsx(dn,{className:"w-12 h-12 mx-auto mb-2 opacity-30"}),i.jsx("p",{className:"text-[13px]",children:"No skills found"})]})]})]}),i.jsx("div",{className:"flex-1 flex flex-col",children:a?i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"p-4 border-b border-[var(--border-subtle)] flex items-start justify-between",children:[i.jsxs("div",{children:[i.jsx("h2",{className:"text-[16px] font-medium text-[var(--text-primary)]",children:a.name}),i.jsx("p",{className:"text-[12px] text-[var(--text-muted)]",children:a.description}),i.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:a.tags.map(p=>i.jsxs("span",{className:"badge badge-teal",children:[i.jsx(dv,{className:"w-3 h-3"}),p]},p))})]}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx("button",{className:"p-2 hover:bg-[var(--bg-hover)] rounded-[var(--radius-sm)] text-[var(--text-muted)] transition-colors",children:i.jsx(lv,{className:"w-4 h-4"})}),i.jsx("button",{className:"p-2 text-[var(--error)] hover:bg-[rgba(232,90,106,0.1)] rounded-[var(--radius-sm)] transition-colors",children:i.jsx(Dn,{className:"w-4 h-4"})})]})]}),i.jsx("div",{className:"flex-1 overflow-auto p-4",children:i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{children:[i.jsx("h3",{className:"text-[12px] font-medium mb-2 text-[var(--text-secondary)]",children:"Files"}),i.jsx("div",{className:"space-y-2",children:a.files.map(p=>i.jsxs("div",{className:"p-3 bg-[var(--bg-card)] border border-[var(--border-subtle)] rounded-[var(--radius-md)]",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[i.jsx(Gh,{className:"w-4 h-4 text-[var(--text-muted)]"}),i.jsx("span",{className:"text-[12px] font-medium text-[var(--text-primary)]",children:p.path}),i.jsx("span",{className:"text-[10px] text-[var(--text-muted)] uppercase",children:p.type})]}),i.jsx("pre",{className:"text-[11px] bg-[var(--bg-void)] p-2 rounded-[var(--radius-sm)] overflow-x-auto border border-[var(--border-faint)]",children:i.jsxs("code",{className:"text-[var(--teal-300)]",children:[p.content.slice(0,500),p.content.length>500?"...":""]})})]},p.path))})]}),i.jsxs("div",{children:[i.jsx("h3",{className:"text-[12px] font-medium mb-2 text-[var(--text-secondary)]",children:"Configuration"}),i.jsx("div",{className:"bg-[var(--bg-card)] border border-[var(--border-subtle)] p-3 rounded-[var(--radius-md)] text-[12px]",children:i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsxs("div",{children:[i.jsx("span",{className:"text-[var(--text-muted)]",children:"Entry Point:"}),i.jsx("span",{className:"ml-2 text-[var(--text-primary)]",children:a.config.entryPoint})]}),i.jsxs("div",{children:[i.jsx("span",{className:"text-[var(--text-muted)]",children:"Version:"}),i.jsx("span",{className:"ml-2 text-[var(--text-primary)]",children:a.version})]}),i.jsxs("div",{children:[i.jsx("span",{className:"text-[var(--text-muted)]",children:"Author:"}),i.jsx("span",{className:"ml-2 text-[var(--text-primary)]",children:a.author})]}),i.jsxs("div",{children:[i.jsx("span",{className:"text-[var(--text-muted)]",children:"Dependencies:"}),i.jsx("span",{className:"ml-2 text-[var(--text-primary)]",children:a.config.dependencies.length||"None"})]})]})})]})]})})]}):i.jsx("div",{className:"flex-1 flex items-center justify-center text-[var(--text-muted)]",children:i.jsxs("div",{className:"text-center",children:[i.jsx(dn,{className:"w-16 h-16 mx-auto mb-4 opacity-30"}),i.jsx("p",{className:"text-[14px]",children:"Select a skill to view details"})]})})}),r&&i.jsx("div",{className:"fixed inset-0 bg-[rgba(3,7,9,0.8)] flex items-center justify-center z-50",children:i.jsxs("div",{className:"bg-[var(--bg-card)] border border-[var(--border-subtle)] rounded-[var(--radius-lg)] p-6 w-[600px]",children:[i.jsx("h2",{className:"text-[16px] font-medium text-[var(--text-primary)] mb-4",children:"Create New Skill"}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{children:[i.jsx("label",{className:"block text-[11px] font-medium mb-1 text-[var(--text-secondary)]",children:"Name"}),i.jsx("input",{type:"text",value:u.name,onChange:p=>f({...u,name:p.target.value}),className:"w-full px-3 py-2 bg-[var(--bg-elevated)] border border-[var(--border-subtle)] rounded-[var(--radius-md)] text-[13px] text-[var(--text-primary)] placeholder:text-[var(--text-disabled)] focus:outline-none focus:border-[var(--teal-500)]",placeholder:"My Custom Skill"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-[11px] font-medium mb-1 text-[var(--text-secondary)]",children:"Description"}),i.jsx("textarea",{value:u.description,onChange:p=>f({...u,description:p.target.value}),className:"w-full px-3 py-2 bg-[var(--bg-elevated)] border border-[var(--border-subtle)] rounded-[var(--radius-md)] h-20 resize-none text-[13px] text-[var(--text-primary)] placeholder:text-[var(--text-disabled)] focus:outline-none focus:border-[var(--teal-500)]",placeholder:"What does this skill do?"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-[11px] font-medium mb-1 text-[var(--text-secondary)]",children:"Content"}),i.jsx("textarea",{value:u.content,onChange:p=>f({...u,content:p.target.value}),className:"w-full px-3 py-2 bg-[var(--bg-elevated)] border border-[var(--border-subtle)] rounded-[var(--radius-md)] h-40 resize-none font-[var(--font-mono)] text-[12px] text-[var(--teal-300)] placeholder:text-[var(--text-disabled)] focus:outline-none focus:border-[var(--teal-500)]",placeholder:"Enter skill instructions..."})]})]}),i.jsxs("div",{className:"flex justify-end gap-2 mt-6",children:[i.jsx("button",{onClick:()=>n(!1),className:"px-4 py-2 text-[var(--text-muted)] hover:text-[var(--text-primary)] text-[13px] transition-colors",children:"Cancel"}),i.jsx("button",{onClick:m,disabled:!u.name||!u.content,className:"px-4 py-2 bg-[var(--teal-500)] text-[var(--bg-void)] rounded-[var(--radius-sm)] disabled:opacity-50 text-[13px] font-medium transition-colors hover:bg-[var(--teal-400)]",children:"Create Skill"})]})]})})]})},yv=({automations:e,agents:t,skills:r,onCreateAutomation:n})=>{const[a,l]=g.useState(!1),[s,o]=g.useState({name:"",description:"",triggerType:"schedule",triggerConfig:{cron:"0 9 * * *"},actions:[]}),u=async()=>{try{await n(s),l(!1),o({name:"",description:"",triggerType:"schedule",triggerConfig:{cron:"0 9 * * *"},actions:[]})}catch(h){console.error("Failed to create automation:",h)}},f=async(h,m)=>{try{await window.electronAPI.automation.toggle(h,m)}catch(p){console.error("Failed to toggle automation:",p)}};return i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsxs("div",{className:"p-4 border-b border-[var(--border-subtle)] flex items-center justify-between",children:[i.jsxs("div",{children:[i.jsx("h2",{className:"text-[18px] font-medium text-[var(--text-primary)]",style:{fontFamily:"var(--font-display)",fontStyle:"italic",fontWeight:300},children:"Automations"}),i.jsx("p",{className:"text-[12px] text-[var(--text-muted)]",children:"Schedule and automate agent tasks"})]}),i.jsxs("button",{onClick:()=>l(!0),className:"flex items-center gap-2 px-4 py-2 bg-[var(--teal-500)] text-[var(--bg-void)] rounded-[var(--radius-sm)] hover:bg-[var(--teal-400)] text-[13px] font-medium transition-colors",children:[i.jsx(dl,{className:"w-4 h-4"}),"New Automation"]})]}),i.jsx("div",{className:"flex-1 overflow-auto p-4",children:i.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[e.map(h=>i.jsxs("div",{className:"p-4 bg-[var(--bg-card)] border border-[var(--border-subtle)] rounded-[var(--radius-lg)] hover:border-[var(--border-accent)] transition-colors",children:[i.jsxs("div",{className:"flex items-start justify-between mb-3",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(Ba,{className:"w-5 h-5 text-[var(--text-muted)]"}),i.jsx("span",{className:"font-medium text-[13px] text-[var(--text-primary)]",children:h.name})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("button",{onClick:()=>f(h.id,!h.enabled),className:`p-1.5 rounded-[var(--radius-sm)] transition-colors ${h.enabled?"text-[var(--success)] hover:bg-[rgba(60,200,120,0.1)]":"text-[var(--text-muted)] hover:bg-[var(--bg-hover)]"}`,children:h.enabled?i.jsx(av,{className:"w-4 h-4"}):i.jsx(iv,{className:"w-4 h-4"})}),i.jsx("button",{className:"p-1.5 text-[var(--error)] hover:bg-[rgba(232,90,106,0.1)] rounded-[var(--radius-sm)] transition-colors",children:i.jsx(Dn,{className:"w-4 h-4"})})]})]}),i.jsx("p",{className:"text-[12px] text-[var(--text-muted)] mb-3",children:h.description}),i.jsxs("div",{className:"flex items-center gap-4 text-[11px] text-[var(--text-muted)]",children:[i.jsxs("div",{className:"flex items-center gap-1",children:[i.jsx(Vh,{className:"w-3 h-3"}),i.jsx("span",{className:"capitalize",children:h.trigger.type})]}),i.jsxs("div",{className:"flex items-center gap-1",children:[i.jsx(tf,{className:"w-3 h-3"}),i.jsxs("span",{children:[h.actions.length," actions"]})]}),h.runCount>0&&i.jsxs("div",{children:["Run ",h.runCount," times"]})]}),h.enabled&&i.jsxs("div",{className:"mt-3 flex items-center gap-2 text-[11px] text-[var(--success)]",children:[i.jsx("div",{className:"w-2 h-2 bg-[var(--success)] rounded-full animate-pulse"}),"Active"]})]},h.id)),e.length===0&&i.jsxs("div",{className:"col-span-full flex flex-col items-center justify-center py-12 text-[var(--text-muted)]",children:[i.jsx(Ba,{className:"w-16 h-16 mb-4 opacity-30"}),i.jsx("p",{className:"text-[15px] font-medium text-[var(--text-primary)]",children:"No automations yet"}),i.jsx("p",{className:"text-[12px]",children:"Create an automation to schedule agent tasks"})]})]})}),a&&i.jsx("div",{className:"fixed inset-0 bg-[rgba(3,7,9,0.8)] flex items-center justify-center z-50",children:i.jsxs("div",{className:"bg-[var(--bg-card)] border border-[var(--border-subtle)] rounded-[var(--radius-lg)] p-6 w-[600px]",children:[i.jsx("h2",{className:"text-[16px] font-medium text-[var(--text-primary)] mb-4",children:"Create New Automation"}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{children:[i.jsx("label",{className:"block text-[11px] font-medium mb-1 text-[var(--text-secondary)]",children:"Name"}),i.jsx("input",{type:"text",value:s.name,onChange:h=>o({...s,name:h.target.value}),className:"w-full px-3 py-2 bg-[var(--bg-elevated)] border border-[var(--border-subtle)] rounded-[var(--radius-md)] text-[13px] text-[var(--text-primary)] placeholder:text-[var(--text-disabled)] focus:outline-none focus:border-[var(--teal-500)]",placeholder:"Daily Code Review"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-[11px] font-medium mb-1 text-[var(--text-secondary)]",children:"Description"}),i.jsx("textarea",{value:s.description,onChange:h=>o({...s,description:h.target.value}),className:"w-full px-3 py-2 bg-[var(--bg-elevated)] border border-[var(--border-subtle)] rounded-[var(--radius-md)] h-20 resize-none text-[13px] text-[var(--text-primary)] placeholder:text-[var(--text-disabled)] focus:outline-none focus:border-[var(--teal-500)]",placeholder:"What does this automation do?"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-[11px] font-medium mb-1 text-[var(--text-secondary)]",children:"Trigger Type"}),i.jsxs("select",{value:s.triggerType,onChange:h=>o({...s,triggerType:h.target.value,triggerConfig:h.target.value==="schedule"?{cron:"0 9 * * *"}:{}}),className:"w-full px-3 py-2 bg-[var(--bg-elevated)] border border-[var(--border-subtle)] rounded-[var(--radius-md)] text-[13px] text-[var(--text-primary)]",children:[i.jsx("option",{value:"schedule",children:"Schedule (Cron)"}),i.jsx("option",{value:"event",children:"Event"}),i.jsx("option",{value:"webhook",children:"Webhook"}),i.jsx("option",{value:"manual",children:"Manual Only"})]})]}),s.triggerType==="schedule"&&i.jsxs("div",{children:[i.jsx("label",{className:"block text-[11px] font-medium mb-1 text-[var(--text-secondary)]",children:"Cron Expression"}),i.jsx("input",{type:"text",value:s.triggerConfig.cron,onChange:h=>o({...s,triggerConfig:{cron:h.target.value}}),className:"w-full px-3 py-2 bg-[var(--bg-elevated)] border border-[var(--border-subtle)] rounded-[var(--radius-md)] text-[13px] text-[var(--teal-300)] font-[var(--font-mono)] placeholder:text-[var(--text-disabled)] focus:outline-none focus:border-[var(--teal-500)]",placeholder:"0 9 * * *"}),i.jsx("p",{className:"text-[10px] text-[var(--text-muted)] mt-1",children:"Example: 0 9 * * * (every day at 9 AM)"})]})]}),i.jsxs("div",{className:"flex justify-end gap-2 mt-6",children:[i.jsx("button",{onClick:()=>l(!1),className:"px-4 py-2 text-[var(--text-muted)] hover:text-[var(--text-primary)] text-[13px] transition-colors",children:"Cancel"}),i.jsx("button",{onClick:u,disabled:!s.name,className:"px-4 py-2 bg-[var(--teal-500)] text-[var(--bg-void)] rounded-[var(--radius-sm)] disabled:opacity-50 text-[13px] font-medium transition-colors hover:bg-[var(--teal-400)]",children:"Create Automation"})]})]})})]})},wv=({settings:e,providers:t,onSettingsChange:r})=>{const[n,a]=g.useState(e),[l,s]=g.useState({}),[o,u]=g.useState("general"),[f,h]=g.useState(n.defaultModel),m=async()=>{for(const[d,c]of Object.entries(n))await window.electronAPI.settings.set(d,c);r(n)},p=async(d,c)=>{try{await window.electronAPI.providers.configure(d,{apiKey:c});const v=await window.electronAPI.providers.test(d);alert(v?"Connection successful!":"Connection failed. Please check your API key.")}catch(v){console.error("Failed to configure provider:",v),alert("Failed to configure provider")}},b=(d,c)=>{h(d),a({...n,defaultModel:d,defaultProvider:c})},y=[{id:"general",label:"General"},{id:"providers",label:"AI Providers"},{id:"appearance",label:"Appearance"},{id:"shortcuts",label:"Shortcuts"}],w=t.find(d=>d.isFree),C=t.filter(d=>!d.isFree);return i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsxs("div",{className:"p-4 border-b border-[var(--border-subtle)]",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[i.jsx(Bs,{className:"w-5 h-5 text-[var(--teal-400)]"}),i.jsx("h2",{className:"text-[18px] font-medium text-[var(--text-primary)]",style:{fontFamily:"var(--font-display)",fontStyle:"italic",fontWeight:300},children:"Settings"})]}),i.jsx("div",{className:"tabs",children:y.map(d=>i.jsx("button",{onClick:()=>u(d.id),className:`tab ${o===d.id?"active":""}`,children:d.label},d.id))})]}),i.jsxs("div",{className:"flex-1 overflow-auto p-6",children:[o==="general"&&i.jsxs("div",{className:"max-w-2xl space-y-6",children:[i.jsxs("section",{children:[i.jsx("h3",{className:"text-[14px] font-medium mb-4 text-[var(--text-primary)]",children:"General Settings"}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"flex items-center justify-between p-3 bg-[var(--bg-card)] border border-[var(--border-subtle)] rounded-[var(--radius-md)]",children:[i.jsxs("div",{children:[i.jsx("label",{className:"block text-[13px] font-medium text-[var(--text-primary)]",children:"Auto Save"}),i.jsx("p",{className:"text-[11px] text-[var(--text-muted)]",children:"Automatically save changes"})]}),i.jsx("input",{type:"checkbox",checked:n.autoSave,onChange:d=>a({...n,autoSave:d.target.checked}),className:"w-5 h-5 accent-[var(--teal-500)]"})]}),i.jsxs("div",{className:"flex items-center justify-between p-3 bg-[var(--bg-card)] border border-[var(--border-subtle)] rounded-[var(--radius-md)]",children:[i.jsxs("div",{children:[i.jsx("label",{className:"block text-[13px] font-medium text-[var(--text-primary)]",children:"Max Parallel Agents"}),i.jsx("p",{className:"text-[11px] text-[var(--text-muted)]",children:"Maximum number of agents running simultaneously"})]}),i.jsx("input",{type:"number",value:n.maxParallelAgents,onChange:d=>a({...n,maxParallelAgents:parseInt(d.target.value)}),className:"w-20 px-3 py-2 bg-[var(--bg-elevated)] border border-[var(--border-subtle)] rounded-[var(--radius-md)] text-[13px] text-[var(--text-primary)]",min:1,max:10})]}),i.jsxs("div",{className:"flex items-center justify-between p-3 bg-[var(--bg-card)] border border-[var(--border-subtle)] rounded-[var(--radius-md)]",children:[i.jsxs("div",{children:[i.jsx("label",{className:"block text-[13px] font-medium text-[var(--text-primary)]",children:"Show Notifications"}),i.jsx("p",{className:"text-[11px] text-[var(--text-muted)]",children:"Display desktop notifications for agent events"})]}),i.jsx("input",{type:"checkbox",checked:n.showNotifications,onChange:d=>a({...n,showNotifications:d.target.checked}),className:"w-5 h-5 accent-[var(--teal-500)]"})]}),i.jsxs("div",{className:"flex items-center justify-between p-3 bg-[var(--bg-card)] border border-[var(--border-subtle)] rounded-[var(--radius-md)]",children:[i.jsxs("div",{children:[i.jsx("label",{className:"block text-[13px] font-medium text-[var(--text-primary)]",children:"Confirm Destructive Actions"}),i.jsx("p",{className:"text-[11px] text-[var(--text-muted)]",children:"Show confirmation dialogs before deleting agents or worktrees"})]}),i.jsx("input",{type:"checkbox",checked:n.confirmDestructiveActions,onChange:d=>a({...n,confirmDestructiveActions:d.target.checked}),className:"w-5 h-5 accent-[var(--teal-500)]"})]})]})]}),i.jsxs("section",{children:[i.jsx("h3",{className:"text-[14px] font-medium mb-4 text-[var(--text-primary)]",children:"Git Configuration"}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"p-4 bg-[var(--bg-card)] border border-[var(--border-subtle)] rounded-[var(--radius-md)]",children:[i.jsx("label",{className:"block text-[12px] font-medium mb-1 text-[var(--text-secondary)]",children:"Author Name"}),i.jsx("input",{type:"text",value:n.gitAuthorName,onChange:d=>a({...n,gitAuthorName:d.target.value}),className:"w-full px-3 py-2 bg-[var(--bg-elevated)] border border-[var(--border-subtle)] rounded-[var(--radius-md)] text-[13px] text-[var(--text-primary)] placeholder:text-[var(--text-disabled)] focus:outline-none focus:border-[var(--teal-500)]",placeholder:"Your Name"})]}),i.jsxs("div",{className:"p-4 bg-[var(--bg-card)] border border-[var(--border-subtle)] rounded-[var(--radius-md)]",children:[i.jsx("label",{className:"block text-[12px] font-medium mb-1 text-[var(--text-secondary)]",children:"Author Email"}),i.jsx("input",{type:"email",value:n.gitAuthorEmail,onChange:d=>a({...n,gitAuthorEmail:d.target.value}),className:"w-full px-3 py-2 bg-[var(--bg-elevated)] border border-[var(--border-subtle)] rounded-[var(--radius-md)] text-[13px] text-[var(--text-primary)] placeholder:text-[var(--text-disabled)] focus:outline-none focus:border-[var(--teal-500)]",placeholder:"your@email.com"})]})]})]})]}),o==="providers"&&i.jsxs("div",{className:"max-w-4xl space-y-6",children:[w&&i.jsxs("section",{className:"p-4 border-2 border-[rgba(60,200,120,0.3)] bg-[rgba(60,200,120,0.05)] rounded-[var(--radius-lg)]",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[i.jsx(uv,{className:"w-5 h-5 text-[var(--success)]"}),i.jsx("h3",{className:"text-[15px] font-medium text-[var(--text-primary)]",children:"Free AI Models"}),i.jsx("span",{className:"badge badge-success",children:"No API Key Required"})]}),i.jsx("p",{className:"text-[12px] text-[var(--text-muted)] mb-4",children:"Start using AI immediately with free models from OpenRouter, Groq, Google AI Studio, and Cerebras. No API key required for OpenRouter free tier - just select a model and start chatting!"}),i.jsxs("div",{className:"mb-4",children:[i.jsx("label",{className:"block text-[12px] font-medium mb-2 text-[var(--text-secondary)]",children:"Select Model"}),i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-2 max-h-96 overflow-y-auto",children:w.models.sort((d,c)=>{const v=["openrouter","groq","google","cerebras"],x=d.backend||"openrouter",k=c.backend||"openrouter";return v.indexOf(x)-v.indexOf(k)}).map(d=>i.jsxs("button",{onClick:()=>b(d.id,w.id),className:`p-3 text-left rounded-[var(--radius-md)] border transition-all ${f===d.id?"border-[var(--teal-500)] bg-[rgba(0,200,168,0.08)]":"border-[var(--border-subtle)] hover:border-[var(--teal-500)] hover:bg-[var(--bg-hover)]"}`,children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("span",{className:"font-medium text-[12px] truncate text-[var(--text-primary)]",children:d.name}),f===d.id&&i.jsx(Gd,{className:"w-4 h-4 text-[var(--teal-400)] flex-shrink-0"})]}),i.jsxs("div",{className:"flex items-center gap-1 mt-1",children:[i.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-[rgba(104,144,244,0.1)] text-[var(--info)]",children:d.backend||"openrouter"}),d.supportsVision&&i.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-[rgba(136,88,219,0.1)] text-purple-400",children:"vision"}),d.contextWindow>=1e5&&i.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-[rgba(230,185,74,0.1)] text-[var(--warning)]",children:d.contextWindow>=1e6?"1M ctx":`${d.contextWindow/1e3}k ctx`})]}),i.jsx("p",{className:"text-[10px] text-[var(--text-muted)] mt-1 truncate",children:d.description})]},d.id))})]})]}),i.jsxs("section",{children:[i.jsx("h3",{className:"text-[15px] font-medium mb-4 text-[var(--text-primary)]",children:"Premium Providers"}),i.jsx("p",{className:"text-[12px] text-[var(--text-muted)] mb-4",children:"Add your API keys for premium models with higher limits and advanced features."}),i.jsx("div",{className:"space-y-4",children:C.map(d=>i.jsxs("div",{className:"p-4 bg-[var(--bg-card)] border border-[var(--border-subtle)] rounded-[var(--radius-lg)]",children:[i.jsxs("div",{className:"flex items-center justify-between mb-3",children:[i.jsxs("div",{children:[i.jsx("h4",{className:"font-medium text-[13px] text-[var(--text-primary)]",children:d.name}),i.jsx("p",{className:"text-[11px] text-[var(--text-muted)]",children:d.description})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("input",{type:"radio",name:"activeProvider",checked:n.defaultProvider===d.id,onChange:()=>a({...n,defaultProvider:d.id}),className:"w-4 h-4 accent-[var(--teal-500)]"}),i.jsx("span",{className:"text-[12px] text-[var(--text-secondary)]",children:"Default"})]})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-[12px] font-medium mb-1 text-[var(--text-secondary)]",children:"API Key"}),i.jsxs("div",{className:"flex gap-2",children:[i.jsxs("div",{className:"relative flex-1",children:[i.jsx("input",{type:l[d.id]?"text":"password",defaultValue:d.config.apiKey,placeholder:`Enter ${d.name} API key`,className:"w-full px-3 py-2 bg-[var(--bg-elevated)] border border-[var(--border-subtle)] rounded-[var(--radius-md)] text-[13px] text-[var(--text-primary)] pr-10 focus:outline-none focus:border-[var(--teal-500)]",onBlur:c=>p(d.id,c.target.value)}),i.jsx("button",{onClick:()=>s({...l,[d.id]:!l[d.id]}),className:"absolute right-2 top-1/2 -translate-y-1/2 text-[var(--text-muted)] hover:text-[var(--text-secondary)]",children:l[d.id]?i.jsx(Yh,{className:"w-4 h-4"}):i.jsx(Kh,{className:"w-4 h-4"})})]}),i.jsx("button",{onClick:()=>p(d.id,d.config.apiKey||""),className:"px-3 py-2 bg-[var(--teal-500)] text-[var(--bg-void)] rounded-[var(--radius-md)] hover:bg-[var(--teal-400)] text-[13px] font-medium transition-colors",children:"Test"})]})]}),d.models.length>0&&i.jsxs("div",{className:"mt-3",children:[i.jsx("label",{className:"block text-[12px] font-medium mb-1 text-[var(--text-secondary)]",children:"Available Models"}),i.jsx("div",{className:"flex flex-wrap gap-2",children:d.models.map(c=>i.jsx("span",{className:"px-2 py-1 bg-[var(--bg-hover)] rounded text-[11px] text-[var(--text-secondary)]",children:c.name},c.id))})]})]},d.id))})]}),i.jsxs("section",{className:"p-4 bg-[rgba(104,144,244,0.1)] border border-[rgba(104,144,244,0.3)] rounded-[var(--radius-lg)]",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[i.jsx(tf,{className:"w-4 h-4 text-[var(--info)]"}),i.jsx("h4",{className:"font-medium text-[var(--info)]",children:"Get Free API Keys"})]}),i.jsxs("div",{className:"text-[12px] text-[var(--text-muted)] space-y-1",children:[i.jsxs("p",{children:[i.jsx("strong",{children:"OpenRouter:"})," ",i.jsx("a",{href:"https://openrouter.ai",target:"_blank",rel:"noopener noreferrer",className:"text-[var(--teal-400)] hover:underline",children:"openrouter.ai"})," - No key needed for free models"]}),i.jsxs("p",{children:[i.jsx("strong",{children:"Ollama:"})," ",i.jsx("a",{href:"https://ollama.com",target:"_blank",rel:"noopener noreferrer",className:"text-[var(--teal-400)] hover:underline",children:"ollama.com"})," - Local models, no API key needed"]}),i.jsxs("p",{children:[i.jsx("strong",{children:"NVIDIA NIM:"})," ",i.jsx("a",{href:"https://build.nvidia.com",target:"_blank",rel:"noopener noreferrer",className:"text-[var(--teal-400)] hover:underline",children:"build.nvidia.com"})," - Kimi K2.5, DeepSeek R1, Llama (40 req/min free)"]}),i.jsxs("p",{children:[i.jsx("strong",{children:"Groq:"})," ",i.jsx("a",{href:"https://console.groq.com",target:"_blank",rel:"noopener noreferrer",className:"text-[var(--teal-400)] hover:underline",children:"console.groq.com"})," - Fast inference, generous free tier"]})]})]})]}),o==="appearance"&&i.jsx("div",{className:"max-w-2xl space-y-6",children:i.jsxs("section",{children:[i.jsx("h3",{className:"text-[14px] font-medium mb-4 text-[var(--text-primary)]",children:"Appearance"}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"p-4 bg-[var(--bg-card)] border border-[var(--border-subtle)] rounded-[var(--radius-md)]",children:[i.jsx("label",{className:"block text-[12px] font-medium mb-1 text-[var(--text-secondary)]",children:"Theme"}),i.jsxs("select",{value:n.theme,onChange:d=>a({...n,theme:d.target.value}),className:"w-full px-3 py-2 bg-[var(--bg-elevated)] border border-[var(--border-subtle)] rounded-[var(--radius-md)] text-[13px] text-[var(--text-primary)]",children:[i.jsx("option",{value:"dark",children:"Dark (Abyss Teal)"}),i.jsx("option",{value:"system",children:"System"})]})]}),i.jsxs("div",{className:"p-4 bg-[var(--bg-card)] border border-[var(--border-subtle)] rounded-[var(--radius-md)]",children:[i.jsx("label",{className:"block text-[12px] font-medium mb-1 text-[var(--text-secondary)]",children:"Font Size"}),i.jsx("input",{type:"range",value:n.fontSize,onChange:d=>a({...n,fontSize:parseInt(d.target.value)}),className:"w-full accent-[var(--teal-500)]",min:10,max:20}),i.jsxs("span",{className:"text-[12px] text-[var(--text-muted)]",children:[n.fontSize,"px"]})]}),i.jsxs("div",{className:"p-4 bg-[var(--bg-card)] border border-[var(--border-subtle)] rounded-[var(--radius-md)]",children:[i.jsx("label",{className:"block text-[12px] font-medium mb-1 text-[var(--text-secondary)]",children:"Font Family"}),i.jsx("input",{type:"text",value:n.fontFamily,onChange:d=>a({...n,fontFamily:d.target.value}),className:"w-full px-3 py-2 bg-[var(--bg-elevated)] border border-[var(--border-subtle)] rounded-[var(--radius-md)] text-[13px] text-[var(--text-primary)] focus:outline-none focus:border-[var(--teal-500)]"})]})]})]})}),o==="shortcuts"&&i.jsx("div",{className:"max-w-2xl",children:i.jsxs("section",{children:[i.jsx("h3",{className:"text-[14px] font-medium mb-4 text-[var(--text-primary)]",children:"Keyboard Shortcuts"}),i.jsx("div",{className:"space-y-2",children:Object.entries(n.shortcuts).map(([d,c])=>i.jsxs("div",{className:"flex items-center justify-between py-2 px-3 bg-[var(--bg-card)] border border-[var(--border-subtle)] rounded-[var(--radius-md)]",children:[i.jsx("span",{className:"text-[12px] capitalize text-[var(--text-secondary)]",children:d.replace(/:/g," ")}),i.jsx("input",{type:"text",value:c,onChange:v=>a({...n,shortcuts:{...n.shortcuts,[d]:v.target.value}}),className:"px-3 py-1 bg-[var(--bg-elevated)] border border-[var(--border-subtle)] rounded-[var(--radius-sm)] text-[11px] font-[var(--font-mono)] text-[var(--teal-300)] w-32 focus:outline-none focus:border-[var(--teal-500)]"})]},d))})]})})]}),i.jsx("div",{className:"p-4 border-t border-[var(--border-subtle)] flex justify-end bg-[var(--bg-surface)]",children:i.jsxs("button",{onClick:m,className:"flex items-center gap-2 px-4 py-2 bg-[var(--teal-500)] text-[var(--bg-void)] rounded-[var(--radius-sm)] hover:bg-[var(--teal-400)] text-[13px] font-medium transition-colors",children:[i.jsx(sv,{className:"w-4 h-4"}),"Save Settings"]})})]})},bv=({rootPath:e,onFileSelect:t,selectedFile:r,fileFilter:n})=>{var C;const[a,l]=g.useState(null),[s,o]=g.useState(""),[u,f]=g.useState(!1),h=g.useCallback(async d=>{try{const c=await window.electronAPI.fs.readdir(d,{withFileTypes:!0}),v=[];for(const x of c){if(x.name.startsWith(".")&&x.name!==".git"||x.name==="node_modules"||x.name==="dist"||x.name==="build")continue;const k=`${d}/${x.name}`,N={name:x.name,path:k,type:x.isDirectory()?"directory":"file"};x.isDirectory()&&(N.children=[]),v.push(N)}return v.sort((x,k)=>x.type===k.type?x.name.localeCompare(k.name):x.type==="directory"?-1:1)}catch(c){return console.error("Failed to load directory:",c),[]}},[]),m=g.useCallback(async()=>{f(!0);const d={name:e.split("/").pop()||"root",path:e,type:"directory",expanded:!0,children:await h(e)};l(d),f(!1)},[e,h]);g.useEffect(()=>{m()},[m]);const p=async(d,c)=>{if(d.type!=="directory"){t(d.path);return}const v=(x,k)=>k.length===0?{...x,expanded:!x.expanded,children:x.expanded?x.children:void 0}:x.children?{...x,children:x.children.map(N=>N.name===k[0]?v(N,k.slice(1)):N)}:x;if(!d.children||d.children.length===0){const x=await h(d.path),k=(N,E)=>E.length===0?{...N,expanded:!0,children:x}:N.children?{...N,children:N.children.map(T=>T.name===E[0]?k(T,E.slice(1)):T)}:N;l(N=>N?k(N,[...c,d.name]):null)}else l(x=>x?v(x,[...c,d.name]):null)},b=(d,c)=>c?d.reduce((v,x)=>{const k=x.name.toLowerCase().includes(c.toLowerCase());if(x.type==="directory"&&x.children){const N=b(x.children,c);(k||N.length>0)&&v.push({...x,children:N,expanded:!0})}else k&&v.push(x);return v},[]):d,y=(d,c=0,v=[])=>{const x=r===d.path,k=c*16+8;return i.jsxs("div",{children:[i.jsxs("div",{onClick:()=>p(d,v),className:`flex items-center gap-1 py-1 px-2 cursor-pointer hover:bg-muted transition-colors ${x?"bg-primary/10 text-primary":""}`,style:{paddingLeft:`${k}px`},children:[d.type==="directory"&&i.jsx("span",{className:"w-4 h-4 flex items-center justify-center",children:d.expanded?i.jsx(Hh,{className:"w-3 h-3 text-muted-foreground"}):i.jsx(qd,{className:"w-3 h-3 text-muted-foreground"})}),d.type==="directory"?i.jsx(Jd,{className:`w-4 h-4 ${x?"text-primary":"text-blue-500"}`}):i.jsx(qh,{className:`w-4 h-4 ${x?"text-primary":"text-muted-foreground"}`}),i.jsx("span",{className:"text-sm truncate",children:d.name})]}),d.type==="directory"&&d.expanded&&d.children&&i.jsx("div",{children:d.children.map(N=>y(N,c+1,[...v,d.name]))})]},d.path)},w=a&&s?{...a,children:b(a.children||[],s)}:a;return i.jsxs("div",{className:"flex flex-col h-full bg-card border-r border-border",children:[i.jsxs("div",{className:"p-3 border-b border-border",children:[i.jsxs("div",{className:"flex items-center justify-between mb-2",children:[i.jsx("span",{className:"font-medium text-sm",children:"Explorer"}),i.jsx("button",{onClick:m,className:"p-1.5 hover:bg-muted rounded-md",title:"Refresh",children:i.jsx(Us,{className:`w-4 h-4 ${u?"animate-spin":""}`})})]}),i.jsxs("div",{className:"relative",children:[i.jsx(ef,{className:"absolute left-2 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-muted-foreground"}),i.jsx("input",{type:"text",value:s,onChange:d=>o(d.target.value),placeholder:"Search files...",className:"w-full pl-8 pr-3 py-1.5 bg-background border border-input rounded-md text-sm"})]})]}),i.jsx("div",{className:"flex-1 overflow-auto py-2",children:w?y(w):i.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground",children:u?"Loading...":"No files"})}),i.jsxs("div",{className:"px-3 py-2 border-t border-border text-xs text-muted-foreground",children:[((C=a==null?void 0:a.children)==null?void 0:C.length)||0," items"]})]})};function du(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function kv(e){if(Array.isArray(e))return e}function jv(e,t,r){return(t=Av(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Nv(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,l,s,o=[],u=!0,f=!1;try{if(l=(r=r.call(e)).next,t!==0)for(;!(u=(n=l.call(r)).done)&&(o.push(n.value),o.length!==t);u=!0);}catch(h){f=!0,a=h}finally{try{if(!u&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw a}}return o}}function Sv(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
289
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function pu(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fu(Object(r),!0).forEach(function(n){jv(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fu(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Cv(e,t){if(e==null)return{};var r,n,a=Ev(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function Ev(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Pv(e,t){return kv(e)||Nv(e,t)||Iv(e,t)||Sv()}function Mv(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Av(e){var t=Mv(e,"string");return typeof t=="symbol"?t:t+""}function Iv(e,t){if(e){if(typeof e=="string")return du(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?du(e,t):void 0}}function Tv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function hu(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mu(Object(r),!0).forEach(function(n){Tv(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mu(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Lv(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){return t.reduceRight(function(a,l){return l(a)},n)}}function Zr(e){return function t(){for(var r=this,n=arguments.length,a=new Array(n),l=0;l<n;l++)a[l]=arguments[l];return a.length>=e.length?e.apply(this,a):function(){for(var s=arguments.length,o=new Array(s),u=0;u<s;u++)o[u]=arguments[u];return t.apply(r,[].concat(a,o))}}}function Va(e){return{}.toString.call(e).includes("Object")}function Ov(e){return!Object.keys(e).length}function Tn(e){return typeof e=="function"}function Rv(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function _v(e,t){return Va(t)||Rt("changeType"),Object.keys(t).some(function(r){return!Rv(e,r)})&&Rt("changeField"),t}function zv(e){Tn(e)||Rt("selectorType")}function Fv(e){Tn(e)||Va(e)||Rt("handlerType"),Va(e)&&Object.values(e).some(function(t){return!Tn(t)})&&Rt("handlersType")}function Dv(e){e||Rt("initialIsRequired"),Va(e)||Rt("initialType"),Ov(e)&&Rt("initialContent")}function Wv(e,t){throw new Error(e[t]||e.default)}var $v={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},Rt=Zr(Wv)($v),aa={changes:_v,selector:zv,handler:Fv,initial:Dv};function Uv(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};aa.initial(e),aa.handler(t);var r={current:e},n=Zr(Hv)(r,t),a=Zr(Vv)(r),l=Zr(aa.changes)(e),s=Zr(Bv)(r);function o(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(h){return h};return aa.selector(f),f(r.current)}function u(f){Lv(n,a,l,s)(f)}return[o,u]}function Bv(e,t){return Tn(t)?t(e.current):t}function Vv(e,t){return e.current=hu(hu({},e.current),t),t}function Hv(e,t,r){return Tn(t)?t(e.current):Object.keys(r).forEach(function(n){var a;return(a=t[n])===null||a===void 0?void 0:a.call(t,e.current[n])}),r}var Qv={create:Uv},Yv={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}};function Kv(e){return function t(){for(var r=this,n=arguments.length,a=new Array(n),l=0;l<n;l++)a[l]=arguments[l];return a.length>=e.length?e.apply(this,a):function(){for(var s=arguments.length,o=new Array(s),u=0;u<s;u++)o[u]=arguments[u];return t.apply(r,[].concat(a,o))}}}function Gv(e){return{}.toString.call(e).includes("Object")}function qv(e){return e||vu("configIsRequired"),Gv(e)||vu("configType"),e.urls?(Xv(),{paths:{vs:e.urls.monacoBase}}):e}function Xv(){console.warn(rf.deprecation)}function Zv(e,t){throw new Error(e[t]||e.default)}var rf={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
|
|
290
|
+
You are using deprecated way of configuration.
|
|
291
|
+
|
|
292
|
+
Instead of using
|
|
293
|
+
monaco.config({ urls: { monacoBase: '...' } })
|
|
294
|
+
use
|
|
295
|
+
monaco.config({ paths: { vs: '...' } })
|
|
296
|
+
|
|
297
|
+
For more please check the link https://github.com/suren-atoyan/monaco-loader#config
|
|
298
|
+
`},vu=Kv(Zv)(rf),Jv={config:qv},eg=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return function(a){return r.reduceRight(function(l,s){return s(l)},a)}};function nf(e,t){return Object.keys(t).forEach(function(r){t[r]instanceof Object&&e[r]&&Object.assign(t[r],nf(e[r],t[r]))}),pu(pu({},e),t)}var tg={type:"cancelation",msg:"operation is manually canceled"};function $l(e){var t=!1,r=new Promise(function(n,a){e.then(function(l){return t?a(tg):n(l)}),e.catch(a)});return r.cancel=function(){return t=!0},r}var rg=["monaco"],ng=Qv.create({config:Yv,isInitialized:!1,resolve:null,reject:null,monaco:null}),af=Pv(ng,2),Wn=af[0],fl=af[1];function ag(e){var t=Jv.config(e),r=t.monaco,n=Cv(t,rg);fl(function(a){return{config:nf(a.config,n),monaco:r}})}function lg(){var e=Wn(function(t){var r=t.monaco,n=t.isInitialized,a=t.resolve;return{monaco:r,isInitialized:n,resolve:a}});if(!e.isInitialized){if(fl({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),$l(Ul);if(window.monaco&&window.monaco.editor)return lf(window.monaco),e.resolve(window.monaco),$l(Ul);eg(ig,og)(ug)}return $l(Ul)}function ig(e){return document.body.appendChild(e)}function sg(e){var t=document.createElement("script");return e&&(t.src=e),t}function og(e){var t=Wn(function(n){var a=n.config,l=n.reject;return{config:a,reject:l}}),r=sg("".concat(t.config.paths.vs,"/loader.js"));return r.onload=function(){return e()},r.onerror=t.reject,r}function ug(){var e=Wn(function(r){var n=r.config,a=r.resolve,l=r.reject;return{config:n,resolve:a,reject:l}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(r){var n=r.m||r;lf(n),e.resolve(n)},function(r){e.reject(r)})}function lf(e){Wn().monaco||fl({monaco:e})}function cg(){return Wn(function(e){var t=e.monaco;return t})}var Ul=new Promise(function(e,t){return fl({resolve:e,reject:t})}),sf={config:ag,init:lg,__getMonacoInstance:cg},dg={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},Bl=dg,fg={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},pg=fg;function mg({children:e}){return dt.createElement("div",{style:pg.container},e)}var hg=mg,vg=hg;function gg({width:e,height:t,isEditorReady:r,loading:n,_ref:a,className:l,wrapperProps:s}){return dt.createElement("section",{style:{...Bl.wrapper,width:e,height:t},...s},!r&&dt.createElement(vg,null,n),dt.createElement("div",{ref:a,style:{...Bl.fullWidth,...!r&&Bl.hide},className:l}))}var xg=gg,of=g.memo(xg);function yg(e){g.useEffect(e,[])}var uf=yg;function wg(e,t,r=!0){let n=g.useRef(!0);g.useEffect(n.current||!r?()=>{n.current=!1}:e,t)}var Le=wg;function fn(){}function yr(e,t,r,n){return bg(e,n)||kg(e,t,r,n)}function bg(e,t){return e.editor.getModel(cf(e,t))}function kg(e,t,r,n){return e.editor.createModel(t,r,n?cf(e,n):void 0)}function cf(e,t){return e.Uri.parse(t)}function jg({original:e,modified:t,language:r,originalLanguage:n,modifiedLanguage:a,originalModelPath:l,modifiedModelPath:s,keepCurrentOriginalModel:o=!1,keepCurrentModifiedModel:u=!1,theme:f="light",loading:h="Loading...",options:m={},height:p="100%",width:b="100%",className:y,wrapperProps:w={},beforeMount:C=fn,onMount:d=fn}){let[c,v]=g.useState(!1),[x,k]=g.useState(!0),N=g.useRef(null),E=g.useRef(null),T=g.useRef(null),$=g.useRef(d),M=g.useRef(C),L=g.useRef(!1);uf(()=>{let A=sf.init();return A.then(z=>(E.current=z)&&k(!1)).catch(z=>(z==null?void 0:z.type)!=="cancelation"&&console.error("Monaco initialization: error:",z)),()=>N.current?R():A.cancel()}),Le(()=>{if(N.current&&E.current){let A=N.current.getOriginalEditor(),z=yr(E.current,e||"",n||r||"text",l||"");z!==A.getModel()&&A.setModel(z)}},[l],c),Le(()=>{if(N.current&&E.current){let A=N.current.getModifiedEditor(),z=yr(E.current,t||"",a||r||"text",s||"");z!==A.getModel()&&A.setModel(z)}},[s],c),Le(()=>{let A=N.current.getModifiedEditor();A.getOption(E.current.editor.EditorOption.readOnly)?A.setValue(t||""):t!==A.getValue()&&(A.executeEdits("",[{range:A.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),A.pushUndoStop())},[t],c),Le(()=>{var A,z;(z=(A=N.current)==null?void 0:A.getModel())==null||z.original.setValue(e||"")},[e],c),Le(()=>{let{original:A,modified:z}=N.current.getModel();E.current.editor.setModelLanguage(A,n||r||"text"),E.current.editor.setModelLanguage(z,a||r||"text")},[r,n,a],c),Le(()=>{var A;(A=E.current)==null||A.editor.setTheme(f)},[f],c),Le(()=>{var A;(A=N.current)==null||A.updateOptions(m)},[m],c);let W=g.useCallback(()=>{var q;if(!E.current)return;M.current(E.current);let A=yr(E.current,e||"",n||r||"text",l||""),z=yr(E.current,t||"",a||r||"text",s||"");(q=N.current)==null||q.setModel({original:A,modified:z})},[r,t,a,e,n,l,s]),I=g.useCallback(()=>{var A;!L.current&&T.current&&(N.current=E.current.editor.createDiffEditor(T.current,{automaticLayout:!0,...m}),W(),(A=E.current)==null||A.editor.setTheme(f),v(!0),L.current=!0)},[m,f,W]);g.useEffect(()=>{c&&$.current(N.current,E.current)},[c]),g.useEffect(()=>{!x&&!c&&I()},[x,c,I]);function R(){var z,q,S,D;let A=(z=N.current)==null?void 0:z.getModel();o||((q=A==null?void 0:A.original)==null||q.dispose()),u||((S=A==null?void 0:A.modified)==null||S.dispose()),(D=N.current)==null||D.dispose()}return dt.createElement(of,{width:b,height:p,isEditorReady:c,loading:h,_ref:T,className:y,wrapperProps:w})}var Ng=jg,Sg=g.memo(Ng);function Cg(e){let t=g.useRef();return g.useEffect(()=>{t.current=e},[e]),t.current}var Eg=Cg,la=new Map;function Pg({defaultValue:e,defaultLanguage:t,defaultPath:r,value:n,language:a,path:l,theme:s="light",line:o,loading:u="Loading...",options:f={},overrideServices:h={},saveViewState:m=!0,keepCurrentModel:p=!1,width:b="100%",height:y="100%",className:w,wrapperProps:C={},beforeMount:d=fn,onMount:c=fn,onChange:v,onValidate:x=fn}){let[k,N]=g.useState(!1),[E,T]=g.useState(!0),$=g.useRef(null),M=g.useRef(null),L=g.useRef(null),W=g.useRef(c),I=g.useRef(d),R=g.useRef(),A=g.useRef(n),z=Eg(l),q=g.useRef(!1),S=g.useRef(!1);uf(()=>{let F=sf.init();return F.then(U=>($.current=U)&&T(!1)).catch(U=>(U==null?void 0:U.type)!=="cancelation"&&console.error("Monaco initialization: error:",U)),()=>M.current?B():F.cancel()}),Le(()=>{var U,se,xe,j;let F=yr($.current,e||n||"",t||a||"",l||r||"");F!==((U=M.current)==null?void 0:U.getModel())&&(m&&la.set(z,(se=M.current)==null?void 0:se.saveViewState()),(xe=M.current)==null||xe.setModel(F),m&&((j=M.current)==null||j.restoreViewState(la.get(l))))},[l],k),Le(()=>{var F;(F=M.current)==null||F.updateOptions(f)},[f],k),Le(()=>{!M.current||n===void 0||(M.current.getOption($.current.editor.EditorOption.readOnly)?M.current.setValue(n):n!==M.current.getValue()&&(S.current=!0,M.current.executeEdits("",[{range:M.current.getModel().getFullModelRange(),text:n,forceMoveMarkers:!0}]),M.current.pushUndoStop(),S.current=!1))},[n],k),Le(()=>{var U,se;let F=(U=M.current)==null?void 0:U.getModel();F&&a&&((se=$.current)==null||se.editor.setModelLanguage(F,a))},[a],k),Le(()=>{var F;o!==void 0&&((F=M.current)==null||F.revealLine(o))},[o],k),Le(()=>{var F;(F=$.current)==null||F.editor.setTheme(s)},[s],k);let D=g.useCallback(()=>{var F;if(!(!L.current||!$.current)&&!q.current){I.current($.current);let U=l||r,se=yr($.current,n||e||"",t||a||"",U||"");M.current=(F=$.current)==null?void 0:F.editor.create(L.current,{model:se,automaticLayout:!0,...f},h),m&&M.current.restoreViewState(la.get(U)),$.current.editor.setTheme(s),o!==void 0&&M.current.revealLine(o),N(!0),q.current=!0}},[e,t,r,n,a,l,f,h,m,s,o]);g.useEffect(()=>{k&&W.current(M.current,$.current)},[k]),g.useEffect(()=>{!E&&!k&&D()},[E,k,D]),A.current=n,g.useEffect(()=>{var F,U;k&&v&&((F=R.current)==null||F.dispose(),R.current=(U=M.current)==null?void 0:U.onDidChangeModelContent(se=>{S.current||v(M.current.getValue(),se)}))},[k,v]),g.useEffect(()=>{if(k){let F=$.current.editor.onDidChangeMarkers(U=>{var xe;let se=(xe=M.current.getModel())==null?void 0:xe.uri;if(se&&U.find(j=>j.path===se.path)){let j=$.current.editor.getModelMarkers({resource:se});x==null||x(j)}});return()=>{F==null||F.dispose()}}return()=>{}},[k,x]);function B(){var F,U;(F=R.current)==null||F.dispose(),p?m&&la.set(l,M.current.saveViewState()):(U=M.current.getModel())==null||U.dispose(),M.current.dispose()}return dt.createElement(of,{width:b,height:y,isEditorReady:k,loading:u,_ref:L,className:w,wrapperProps:C})}var Mg=Pg,Ag=g.memo(Mg),Ig=Ag;function df(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=df(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Tg(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=df(e))&&(n&&(n+=" "),n+=t);return n}const gu=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,xu=Tg,Lg=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return xu(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:a,defaultVariants:l}=t,s=Object.keys(a).map(f=>{const h=r==null?void 0:r[f],m=l==null?void 0:l[f];if(h===null)return null;const p=gu(h)||gu(m);return a[f][p]}),o=r&&Object.entries(r).reduce((f,h)=>{let[m,p]=h;return p===void 0||(f[m]=p),f},{}),u=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((f,h)=>{let{class:m,className:p,...b}=h;return Object.entries(b).every(y=>{let[w,C]=y;return Array.isArray(C)?C.includes({...l,...o}[w]):{...l,...o}[w]===C})?[...f,m,p]:f},[]);return xu(e,s,u,r==null?void 0:r.class,r==null?void 0:r.className)},Og=Lg("inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-[var(--radius-sm)] font-medium transition-all duration-[180ms] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--teal-400)] focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--bg-void)] disabled:pointer-events-none disabled:opacity-50 cursor-pointer border-none",{variants:{variant:{primary:"bg-[var(--teal-500)] text-[var(--bg-void)] hover:bg-[var(--teal-400)] active:scale-[0.98] font-medium",secondary:"bg-transparent text-[var(--teal-400)] border border-[var(--border-accent)] hover:bg-[rgba(0,200,168,0.06)] active:scale-[0.98]",ghost:"bg-transparent text-[var(--text-secondary)] hover:bg-[var(--bg-hover)] hover:text-[var(--text-primary)] active:scale-[0.98]",danger:"bg-[rgba(232,90,106,0.1)] text-[var(--error)] border border-[rgba(232,90,106,0.2)] hover:bg-[rgba(232,90,106,0.15)]",outline:"bg-transparent text-[var(--text-secondary)] border border-[var(--border-default)] hover:border-[var(--border-accent)] hover:text-[var(--teal-400)]",icon:"bg-[var(--bg-elevated)] text-[var(--text-secondary)] border border-[var(--border-subtle)] hover:bg-[var(--bg-hover)] hover:text-[var(--teal-400)]"},size:{default:"h-10 px-4.5 py-2 text-[13px]",sm:"h-8 px-3 text-[11px] rounded-[var(--radius-sm)]",lg:"h-12 px-6 text-[14px]",icon:"h-10 w-10 p-2","icon-sm":"h-8 w-8 p-2"}},defaultVariants:{variant:"primary",size:"default"}}),Jr=dt.forwardRef(({className:e,variant:t,size:r,loading:n,children:a,disabled:l,ariaLabel:s,ariaDescribedBy:o,ariaExpanded:u,ariaPressed:f,...h},m)=>i.jsxs("button",{className:Og({variant:t,size:r,className:e}),ref:m,disabled:l||n,"aria-label":s,"aria-describedby":o,"aria-expanded":u,"aria-pressed":f,...h,children:[n&&i.jsx(tv,{className:"w-4 h-4 animate-spin","aria-hidden":"true"}),a]}));Jr.displayName="Button";const Rg=({value:e,language:t="javascript",theme:r="vs-dark",readOnly:n=!1,onChange:a,onSave:l,showLineNumbers:s=!0,wordWrap:o="on",fontSize:u=14,minimap:f=!0,lineNumbers:h="on",originalValue:m,diffEditor:p=!1,height:b="100%",dataTestid:y="code-editor"})=>{const w=g.useRef(null),C=g.useRef(null),d=g.useCallback((k,N)=>{w.current=k,C.current=N,N.languages.registerCompletionItemProvider(t,{provideCompletionItems:(E,T)=>{const $=E.getWordUntilPosition(T),M={startLineNumber:T.lineNumber,endLineNumber:T.lineNumber,startColumn:$.startColumn,endColumn:$.endColumn};return{suggestions:[{label:"console.log",kind:N.languages.CompletionItemKind.Function,insertText:"console.log(${1:message})",insertTextRules:N.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:M},{label:"const",kind:N.languages.CompletionItemKind.Keyword,insertText:"const ${1:name} = ${2:value}",insertTextRules:N.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:M},{label:"function",kind:N.languages.CompletionItemKind.Function,insertText:"function ${1:name}(${2:params}) {\n ${3:// body}\n}",insertTextRules:N.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:M},{label:"async",kind:N.languages.CompletionItemKind.Keyword,insertText:"async function ${1:name}(${2:params}) {\n ${3:// body}\n}",insertTextRules:N.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:M},{label:"class",kind:N.languages.CompletionItemKind.Class,insertText:`class \${1:Name} {
|
|
299
|
+
constructor(\${2:params}) {
|
|
300
|
+
\${3:// init}
|
|
301
|
+
}
|
|
302
|
+
}`,insertTextRules:N.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:M},{label:"interface",kind:N.languages.CompletionItemKind.Interface,insertText:"interface ${1:Name} {\n ${2:property}: ${3:type}\n}",insertTextRules:N.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:M},{label:"import",kind:N.languages.CompletionItemKind.Module,insertText:"import { ${1:module} } from '${2:path}'",insertTextRules:N.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:M},{label:"export",kind:N.languages.CompletionItemKind.Module,insertText:"export ${1:default} ${2:statement}",insertTextRules:N.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:M}]}}}),k.addCommand(N.KeyMod.CtrlCmd|N.KeyCode.KeyS,()=>{l&&k.getValue()&&l(k.getValue())}),k.focus()},[t,l]),c=g.useCallback(()=>{navigator.clipboard.writeText(e)},[e]),v=g.useCallback(()=>{const k=new Blob([e],{type:"text/plain"}),N=URL.createObjectURL(k),E=document.createElement("a");E.href=N,E.download=`code.${t==="typescript"?"ts":t==="javascript"?"js":t==="python"?"py":"txt"}`,E.click(),URL.revokeObjectURL(N)},[e,t]),x=g.useCallback(()=>{var k;w.current&&((k=w.current.getAction("editor.action.formatDocument"))==null||k.run())},[]);return p&&m!==void 0?i.jsxs("div",{className:"flex flex-col h-full border border-border rounded-lg overflow-hidden","data-testid":y,children:[i.jsxs("div",{className:"flex items-center justify-between px-3 py-2 bg-muted/50 border-b border-border",children:[i.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[i.jsx("span",{children:"Diff Editor"}),i.jsx("span",{className:"px-2 py-0.5 bg-secondary rounded text-xs",children:t})]}),i.jsx("div",{className:"flex items-center gap-1",children:i.jsx(Jr,{variant:"ghost",size:"sm",onClick:c,children:i.jsx(cu,{className:"w-4 h-4"})})})]}),i.jsx("div",{className:"flex-1",children:i.jsx(Sg,{height:"100%",language:t,theme:r,original:m,modified:e,options:{readOnly:n,renderSideBySide:!0,fontSize:u,minimap:{enabled:f},lineNumbers:"on",wordWrap:o,scrollBeyondLastLine:!1,automaticLayout:!0}})})]}):i.jsxs("div",{className:"flex flex-col h-full border border-border rounded-lg overflow-hidden","data-testid":y,children:[i.jsxs("div",{className:"flex items-center justify-between px-3 py-2 bg-muted/50 border-b border-border",children:[i.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[i.jsx("span",{children:t==="typescript"?"TypeScript":t==="javascript"?"JavaScript":t}),i.jsxs("span",{className:"px-2 py-0.5 bg-secondary rounded text-xs",children:[e.split(`
|
|
303
|
+
`).length," lines"]})]}),i.jsxs("div",{className:"flex items-center gap-1",children:[i.jsx(Jr,{variant:"ghost",size:"sm",onClick:x,title:"Format code",children:i.jsx(Bs,{className:"w-4 h-4"})}),i.jsx(Jr,{variant:"ghost",size:"sm",onClick:c,title:"Copy to clipboard",children:i.jsx(cu,{className:"w-4 h-4"})}),i.jsx(Jr,{variant:"ghost",size:"sm",onClick:v,title:"Download file",children:i.jsx(Zd,{className:"w-4 h-4"})})]})]}),i.jsx("div",{className:"flex-1",style:{height:b},children:i.jsx(Ig,{height:"100%",language:t,value:e,theme:r,onChange:a,onMount:d,options:{readOnly:n,fontSize:u,minimap:{enabled:f},lineNumbers:s?h:"off",wordWrap:o,scrollBeyondLastLine:!1,automaticLayout:!0,tabSize:2,insertSpaces:!0,folding:!0,foldingHighlight:!0,showFoldingControls:"always",bracketPairColorization:{enabled:!0},padding:{top:8,bottom:8},smoothScrolling:!0,cursorBlinking:"smooth",cursorSmoothCaretAnimation:"on",renderLineHighlight:"all",renderWhitespace:"selection",guides:{bracketPairs:!0,indentation:!0}},loading:i.jsx("div",{className:"flex items-center justify-center h-full",children:i.jsx(Us,{className:"w-6 h-6 animate-spin text-muted-foreground"})})})})]})},_g=({children:e,direction:t="horizontal",defaultSplit:r=50,minSize:n=200})=>{const[a,l]=g.useState(r),[s,o]=g.useState(!1),u=g.useCallback(()=>{o(!0)},[]),f=g.useCallback(()=>{o(!1)},[]),h=g.useCallback(p=>{if(!s)return;const y=p.currentTarget.getBoundingClientRect();let w;t==="horizontal"?w=(p.clientX-y.left)/y.width*100:w=(p.clientY-y.top)/y.height*100;const C=n/(t==="horizontal"?y.width:y.height)*100;w=Math.max(C,Math.min(100-C,w)),l(w)},[s,t,n]),m=t==="horizontal";return i.jsxs("div",{className:`flex ${m?"flex-row":"flex-col"} w-full h-full`,onMouseMove:h,onMouseUp:f,onMouseLeave:f,children:[i.jsx("div",{className:"overflow-hidden",style:{[m?"width":"height"]:`${a}%`,[m?"height":"width"]:"100%"},children:e[0]}),i.jsx("div",{className:`${m?"w-1 cursor-col-resize":"h-1 cursor-row-resize"} bg-border hover:bg-primary transition-colors flex-shrink-0`,onMouseDown:u,style:{userSelect:"none"},children:i.jsx("div",{className:`${m?"w-full h-8":"h-full w-8"} mx-auto my-auto flex items-center justify-center`,children:i.jsx("div",{className:`${m?"w-0.5 h-4":"w-4 h-0.5"} bg-muted-foreground/30 rounded-full`})})}),i.jsx("div",{className:"overflow-hidden flex-1",style:{[m?"width":"height"]:`${100-a}%`},children:e[1]})]})},zg=({rootPath:e="/"})=>{const[t,r]=g.useState(null),[n,a]=g.useState(""),[l,s]=g.useState("plaintext"),[o,u]=g.useState(!1),[f,h]=g.useState([]),[m,p]=g.useState(null),b=c=>{var k;const v=(k=c.split(".").pop())==null?void 0:k.toLowerCase();return{ts:"typescript",tsx:"typescript",js:"javascript",jsx:"javascript",json:"json",html:"html",htm:"html",css:"css",scss:"scss",less:"less",md:"markdown",mdx:"markdown",py:"python",rs:"rust",go:"go",java:"java",c:"c",cpp:"cpp",h:"c",hpp:"cpp",cs:"csharp",rb:"ruby",php:"php",sql:"sql",yaml:"yaml",yml:"yaml",xml:"xml",sh:"shell",bash:"shell",zsh:"shell",dockerfile:"dockerfile",toml:"ini",ini:"ini"}[v||""]||"plaintext"},y=g.useCallback(async c=>{if(f.includes(c)){p(c);return}u(!0);try{const v=await window.electronAPI.fs.readFile(c);a(v),r(c),s(b(c)),h(x=>[...x,c]),p(c)}catch(v){console.error("Failed to read file:",v)}finally{u(!1)}},[f]),w=(c,v)=>{v==null||v.stopPropagation();const x=f.filter(k=>k!==c);h(x),m===c&&p(x[x.length-1]||null)},C=g.useCallback(async c=>{if(m)try{await window.electronAPI.fs.writeFile(m,c),a(c)}catch(v){console.error("Failed to save file:",v)}},[m]),d=c=>c.split("/").pop()||c;return i.jsxs("div",{className:"flex flex-col h-full",children:[f.length>0&&i.jsx("div",{className:"flex items-center bg-[var(--color-bg-secondary)] border-b border-[var(--color-border)] overflow-x-auto",children:f.map(c=>i.jsxs("div",{onClick:()=>p(c),className:`flex items-center gap-2 px-3 py-2 text-sm cursor-pointer border-r border-[var(--color-border)] min-w-0 ${m===c?"bg-[var(--color-bg-primary)] text-[var(--color-text-primary)]":"text-[var(--color-text-secondary)] hover:bg-[var(--color-bg-tertiary)]"}`,children:[i.jsx($i,{className:"w-4 h-4 flex-shrink-0"}),i.jsx("span",{className:"truncate max-w-32",children:d(c)}),i.jsx("button",{onClick:v=>w(c,v),className:"ml-1 p-0.5 hover:bg-[var(--color-bg-tertiary)] rounded",children:i.jsx(Vs,{className:"w-3 h-3"})})]},c))}),i.jsx("div",{className:"flex-1 flex overflow-hidden",children:i.jsxs(_g,{direction:"horizontal",defaultRatio:.2,minSize:150,maxSize:400,children:[i.jsx("div",{className:"h-full overflow-hidden",children:i.jsx(bv,{rootPath:e,onFileSelect:y,selectedFile:t||void 0})}),i.jsx("div",{className:"h-full overflow-hidden bg-[var(--color-bg-primary)]",children:m?i.jsx(Rg,{value:n,language:l,onChange:c=>a(c||""),onSave:C,height:"100%",dataTestid:"code-workspace-editor"}):i.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:i.jsxs("div",{className:"text-center",children:[i.jsx($i,{className:"w-16 h-16 mx-auto mb-4 opacity-30"}),i.jsx("p",{children:"Select a file to edit"}),i.jsx("p",{className:"text-sm mt-2",children:"Or use the file explorer to browse"})]})})})]})}),i.jsxs("div",{className:"flex items-center justify-between px-3 py-1 bg-[var(--color-bg-secondary)] border-t border-[var(--color-border)] text-xs text-[var(--color-text-secondary)]",children:[i.jsx("div",{className:"flex items-center gap-4",children:m&&i.jsxs(i.Fragment,{children:[i.jsx("span",{children:d(m)}),i.jsx("span",{children:l}),i.jsxs("span",{children:[n.split(`
|
|
304
|
+
`).length," lines"]})]})}),i.jsx("div",{children:o&&i.jsx("span",{className:"text-[var(--color-accent)]",children:"Loading..."})})]})]})};function et(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function tr(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}const ff=6048e5,Fg=864e5;let Dg={};function pl(){return Dg}function Ln(e,t){var o,u,f,h;const r=pl(),n=(t==null?void 0:t.weekStartsOn)??((u=(o=t==null?void 0:t.locale)==null?void 0:o.options)==null?void 0:u.weekStartsOn)??r.weekStartsOn??((h=(f=r.locale)==null?void 0:f.options)==null?void 0:h.weekStartsOn)??0,a=et(e),l=a.getDay(),s=(l<n?7:0)+l-n;return a.setDate(a.getDate()-s),a.setHours(0,0,0,0),a}function Ha(e){return Ln(e,{weekStartsOn:1})}function pf(e){const t=et(e),r=t.getFullYear(),n=tr(e,0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);const a=Ha(n),l=tr(e,0);l.setFullYear(r,0,4),l.setHours(0,0,0,0);const s=Ha(l);return t.getTime()>=a.getTime()?r+1:t.getTime()>=s.getTime()?r:r-1}function yu(e){const t=et(e);return t.setHours(0,0,0,0),t}function wu(e){const t=et(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function Wg(e,t){const r=yu(e),n=yu(t),a=+r-wu(r),l=+n-wu(n);return Math.round((a-l)/Fg)}function $g(e){const t=pf(e),r=tr(e,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),Ha(r)}function Ug(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Bg(e){if(!Ug(e)&&typeof e!="number")return!1;const t=et(e);return!isNaN(Number(t))}function Vg(e){const t=et(e),r=tr(e,0);return r.setFullYear(t.getFullYear(),0,1),r.setHours(0,0,0,0),r}const Hg={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Qg=(e,t,r)=>{let n;const a=Hg[e];return typeof a=="string"?n=a:t===1?n=a.one:n=a.other.replace("{{count}}",t.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function Vl(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const Yg={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Kg={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Gg={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},qg={date:Vl({formats:Yg,defaultWidth:"full"}),time:Vl({formats:Kg,defaultWidth:"full"}),dateTime:Vl({formats:Gg,defaultWidth:"full"})},Xg={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Zg=(e,t,r,n)=>Xg[e];function Qr(e){return(t,r)=>{const n=r!=null&&r.context?String(r.context):"standalone";let a;if(n==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,o=r!=null&&r.width?String(r.width):s;a=e.formattingValues[o]||e.formattingValues[s]}else{const s=e.defaultWidth,o=r!=null&&r.width?String(r.width):e.defaultWidth;a=e.values[o]||e.values[s]}const l=e.argumentCallback?e.argumentCallback(t):t;return a[l]}}const Jg={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},ex={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},tx={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},rx={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},nx={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},ax={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},lx=(e,t)=>{const r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},ix={ordinalNumber:lx,era:Qr({values:Jg,defaultWidth:"wide"}),quarter:Qr({values:ex,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Qr({values:tx,defaultWidth:"wide"}),day:Qr({values:rx,defaultWidth:"wide"}),dayPeriod:Qr({values:nx,defaultWidth:"wide",formattingValues:ax,defaultFormattingWidth:"wide"})};function Yr(e){return(t,r={})=>{const n=r.width,a=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],l=t.match(a);if(!l)return null;const s=l[0],o=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(o)?ox(o,m=>m.test(s)):sx(o,m=>m.test(s));let f;f=e.valueCallback?e.valueCallback(u):u,f=r.valueCallback?r.valueCallback(f):f;const h=t.slice(s.length);return{value:f,rest:h}}}function sx(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function ox(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function ux(e){return(t,r={})=>{const n=t.match(e.matchPattern);if(!n)return null;const a=n[0],l=t.match(e.parsePattern);if(!l)return null;let s=e.valueCallback?e.valueCallback(l[0]):l[0];s=r.valueCallback?r.valueCallback(s):s;const o=t.slice(a.length);return{value:s,rest:o}}}const cx=/^(\d+)(th|st|nd|rd)?/i,dx=/\d+/i,fx={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},px={any:[/^b/i,/^(a|c)/i]},mx={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},hx={any:[/1/i,/2/i,/3/i,/4/i]},vx={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},gx={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},xx={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},yx={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},wx={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},bx={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},kx={ordinalNumber:ux({matchPattern:cx,parsePattern:dx,valueCallback:e=>parseInt(e,10)}),era:Yr({matchPatterns:fx,defaultMatchWidth:"wide",parsePatterns:px,defaultParseWidth:"any"}),quarter:Yr({matchPatterns:mx,defaultMatchWidth:"wide",parsePatterns:hx,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Yr({matchPatterns:vx,defaultMatchWidth:"wide",parsePatterns:gx,defaultParseWidth:"any"}),day:Yr({matchPatterns:xx,defaultMatchWidth:"wide",parsePatterns:yx,defaultParseWidth:"any"}),dayPeriod:Yr({matchPatterns:wx,defaultMatchWidth:"any",parsePatterns:bx,defaultParseWidth:"any"})},jx={code:"en-US",formatDistance:Qg,formatLong:qg,formatRelative:Zg,localize:ix,match:kx,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Nx(e){const t=et(e);return Wg(t,Vg(t))+1}function Sx(e){const t=et(e),r=+Ha(t)-+$g(t);return Math.round(r/ff)+1}function mf(e,t){var h,m,p,b;const r=et(e),n=r.getFullYear(),a=pl(),l=(t==null?void 0:t.firstWeekContainsDate)??((m=(h=t==null?void 0:t.locale)==null?void 0:h.options)==null?void 0:m.firstWeekContainsDate)??a.firstWeekContainsDate??((b=(p=a.locale)==null?void 0:p.options)==null?void 0:b.firstWeekContainsDate)??1,s=tr(e,0);s.setFullYear(n+1,0,l),s.setHours(0,0,0,0);const o=Ln(s,t),u=tr(e,0);u.setFullYear(n,0,l),u.setHours(0,0,0,0);const f=Ln(u,t);return r.getTime()>=o.getTime()?n+1:r.getTime()>=f.getTime()?n:n-1}function Cx(e,t){var o,u,f,h;const r=pl(),n=(t==null?void 0:t.firstWeekContainsDate)??((u=(o=t==null?void 0:t.locale)==null?void 0:o.options)==null?void 0:u.firstWeekContainsDate)??r.firstWeekContainsDate??((h=(f=r.locale)==null?void 0:f.options)==null?void 0:h.firstWeekContainsDate)??1,a=mf(e,t),l=tr(e,0);return l.setFullYear(a,0,n),l.setHours(0,0,0,0),Ln(l,t)}function Ex(e,t){const r=et(e),n=+Ln(r,t)-+Cx(r,t);return Math.round(n/ff)+1}function K(e,t){const r=e<0?"-":"",n=Math.abs(e).toString().padStart(t,"0");return r+n}const yt={y(e,t){const r=e.getFullYear(),n=r>0?r:1-r;return K(t==="yy"?n%100:n,t.length)},M(e,t){const r=e.getMonth();return t==="M"?String(r+1):K(r+1,2)},d(e,t){return K(e.getDate(),t.length)},a(e,t){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h(e,t){return K(e.getHours()%12||12,t.length)},H(e,t){return K(e.getHours(),t.length)},m(e,t){return K(e.getMinutes(),t.length)},s(e,t){return K(e.getSeconds(),t.length)},S(e,t){const r=t.length,n=e.getMilliseconds(),a=Math.trunc(n*Math.pow(10,r-3));return K(a,t.length)}},lr={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},bu={G:function(e,t,r){const n=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});case"GGGG":default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){const n=e.getFullYear(),a=n>0?n:1-n;return r.ordinalNumber(a,{unit:"year"})}return yt.y(e,t)},Y:function(e,t,r,n){const a=mf(e,n),l=a>0?a:1-a;if(t==="YY"){const s=l%100;return K(s,2)}return t==="Yo"?r.ordinalNumber(l,{unit:"year"}):K(l,t.length)},R:function(e,t){const r=pf(e);return K(r,t.length)},u:function(e,t){const r=e.getFullYear();return K(r,t.length)},Q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return K(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return K(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){const n=e.getMonth();switch(t){case"M":case"MM":return yt.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){const n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return K(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){const a=Ex(e,n);return t==="wo"?r.ordinalNumber(a,{unit:"week"}):K(a,t.length)},I:function(e,t,r){const n=Sx(e);return t==="Io"?r.ordinalNumber(n,{unit:"week"}):K(n,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):yt.d(e,t)},D:function(e,t,r){const n=Nx(e);return t==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):K(n,t.length)},E:function(e,t,r){const n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});case"EEEE":default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){const a=e.getDay(),l=(a-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(l);case"ee":return K(l,2);case"eo":return r.ordinalNumber(l,{unit:"day"});case"eee":return r.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(a,{width:"short",context:"formatting"});case"eeee":default:return r.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){const a=e.getDay(),l=(a-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(l);case"cc":return K(l,t.length);case"co":return r.ordinalNumber(l,{unit:"day"});case"ccc":return r.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(a,{width:"narrow",context:"standalone"});case"cccccc":return r.day(a,{width:"short",context:"standalone"});case"cccc":default:return r.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,r){const n=e.getDay(),a=n===0?7:n;switch(t){case"i":return String(a);case"ii":return K(a,t.length);case"io":return r.ordinalNumber(a,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});case"iiii":default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){const a=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(e,t,r){const n=e.getHours();let a;switch(n===12?a=lr.noon:n===0?a=lr.midnight:a=n/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,r){const n=e.getHours();let a;switch(n>=17?a=lr.evening:n>=12?a=lr.afternoon:n>=4?a=lr.morning:a=lr.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){let n=e.getHours()%12;return n===0&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return yt.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):yt.H(e,t)},K:function(e,t,r){const n=e.getHours()%12;return t==="Ko"?r.ordinalNumber(n,{unit:"hour"}):K(n,t.length)},k:function(e,t,r){let n=e.getHours();return n===0&&(n=24),t==="ko"?r.ordinalNumber(n,{unit:"hour"}):K(n,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):yt.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):yt.s(e,t)},S:function(e,t){return yt.S(e,t)},X:function(e,t,r){const n=e.getTimezoneOffset();if(n===0)return"Z";switch(t){case"X":return ju(n);case"XXXX":case"XX":return Bt(n);case"XXXXX":case"XXX":default:return Bt(n,":")}},x:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"x":return ju(n);case"xxxx":case"xx":return Bt(n);case"xxxxx":case"xxx":default:return Bt(n,":")}},O:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+ku(n,":");case"OOOO":default:return"GMT"+Bt(n,":")}},z:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+ku(n,":");case"zzzz":default:return"GMT"+Bt(n,":")}},t:function(e,t,r){const n=Math.trunc(e.getTime()/1e3);return K(n,t.length)},T:function(e,t,r){const n=e.getTime();return K(n,t.length)}};function ku(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),a=Math.trunc(n/60),l=n%60;return l===0?r+String(a):r+String(a)+t+K(l,2)}function ju(e,t){return e%60===0?(e>0?"-":"+")+K(Math.abs(e)/60,2):Bt(e,t)}function Bt(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),a=K(Math.trunc(n/60),2),l=K(n%60,2);return r+a+t+l}const Nu=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},hf=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Px=(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],a=r[2];if(!a)return Nu(e,t);let l;switch(n){case"P":l=t.dateTime({width:"short"});break;case"PP":l=t.dateTime({width:"medium"});break;case"PPP":l=t.dateTime({width:"long"});break;case"PPPP":default:l=t.dateTime({width:"full"});break}return l.replace("{{date}}",Nu(n,t)).replace("{{time}}",hf(a,t))},Mx={p:hf,P:Px},Ax=/^D+$/,Ix=/^Y+$/,Tx=["D","DD","YY","YYYY"];function Lx(e){return Ax.test(e)}function Ox(e){return Ix.test(e)}function Rx(e,t,r){const n=_x(e,t,r);if(console.warn(n),Tx.includes(e))throw new RangeError(n)}function _x(e,t,r){const n=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const zx=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Fx=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Dx=/^'([^]*?)'?$/,Wx=/''/g,$x=/[a-zA-Z]/;function Ux(e,t,r){var h,m,p,b;const n=pl(),a=n.locale??jx,l=n.firstWeekContainsDate??((m=(h=n.locale)==null?void 0:h.options)==null?void 0:m.firstWeekContainsDate)??1,s=n.weekStartsOn??((b=(p=n.locale)==null?void 0:p.options)==null?void 0:b.weekStartsOn)??0,o=et(e);if(!Bg(o))throw new RangeError("Invalid time value");let u=t.match(Fx).map(y=>{const w=y[0];if(w==="p"||w==="P"){const C=Mx[w];return C(y,a.formatLong)}return y}).join("").match(zx).map(y=>{if(y==="''")return{isToken:!1,value:"'"};const w=y[0];if(w==="'")return{isToken:!1,value:Bx(y)};if(bu[w])return{isToken:!0,value:y};if(w.match($x))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");return{isToken:!1,value:y}});a.localize.preprocessor&&(u=a.localize.preprocessor(o,u));const f={firstWeekContainsDate:l,weekStartsOn:s,locale:a};return u.map(y=>{if(!y.isToken)return y.value;const w=y.value;(Ox(w)||Lx(w))&&Rx(w,t,String(e));const C=bu[w[0]];return C(o,w,a.localize,f)}).join("")}function Bx(e){const t=e.match(Dx);return t?t[1].replace(Wx,"'"):e}const Vx=()=>{const[e,t]=g.useState([]),[r,n]=g.useState(!1),[a,l]=g.useState(""),[s,o]=g.useState(null),u=async()=>{n(!0);try{const p=await window.electronAPI.audit.recent(100);t(p)}catch(p){console.error("Failed to load audit events:",p)}finally{n(!1)}};g.useEffect(()=>{u()},[]);const f=a?e.filter(p=>p.action.toLowerCase().includes(a.toLowerCase())):e,h=async()=>{var p,b;try{const y=await((b=(p=window.electronAPI.dialog).selectFile)==null?void 0:b.call(p,[{name:"JSON",extensions:["json"]}]));y&&(await window.electronAPI.audit.export(y),await window.electronAPI.notification.show({title:"Audit log exported",body:`Exported to ${y}`}))}catch(y){console.error("Export failed:",y)}},m=p=>p.includes("created")?"bg-green-500/10 text-green-500":p.includes("deleted")?"bg-red-500/10 text-red-500":p.includes("applied")||p.includes("restored")?"bg-blue-500/10 text-blue-500":p.includes("failed")?"bg-orange-500/10 text-orange-500":"bg-gray-500/10 text-gray-500";return i.jsxs("div",{className:"h-full flex flex-col bg-card",children:[i.jsxs("div",{className:"px-4 py-3 border-b border-border flex items-center justify-between bg-background/50",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx(Ui,{className:"w-5 h-5 text-muted-foreground"}),i.jsxs("div",{children:[i.jsx("h3",{className:"font-medium",children:"Audit Trail"}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"Session activity log"})]})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("button",{onClick:u,disabled:r,className:"p-2 hover:bg-muted rounded-md disabled:opacity-50",title:"Refresh",children:i.jsx(Us,{className:`w-4 h-4 ${r?"animate-spin":""}`})}),i.jsx("button",{onClick:h,className:"p-2 hover:bg-muted rounded-md",title:"Export logs",children:i.jsx(Zd,{className:"w-4 h-4"})})]})]}),i.jsx("div",{className:"p-3 border-b border-border",children:i.jsxs("div",{className:"relative",children:[i.jsx(Xh,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),i.jsx("input",{type:"text",value:a,onChange:p=>l(p.target.value),placeholder:"Filter by action...",className:"w-full pl-9 pr-3 py-2 bg-background border border-input rounded-md text-sm"})]})}),i.jsx("div",{className:"flex-1 overflow-y-auto p-3 space-y-2",children:f.length===0?i.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[i.jsx(Ui,{className:"w-12 h-12 mx-auto mb-3 opacity-30"}),i.jsx("p",{className:"text-sm",children:"No audit events"})]}):f.map(p=>i.jsxs("div",{className:"border border-border rounded-lg overflow-hidden",children:[i.jsxs("button",{onClick:()=>o(s===p.id?null:p.id),className:"w-full px-3 py-2 flex items-center gap-3 hover:bg-muted/50 transition-colors text-left",children:[i.jsx("span",{className:`px-2 py-0.5 rounded text-xs font-medium ${m(p.action)}`,children:p.action}),i.jsx("span",{className:"text-xs text-muted-foreground flex-1",children:Ux(new Date(p.timestamp),"MMM d, HH:mm:ss")}),i.jsx("span",{className:"text-xs text-muted-foreground",children:s===p.id?"−":"+"})]}),s===p.id&&i.jsx("div",{className:"px-3 py-2 bg-muted/30 border-t border-border",children:i.jsx("pre",{className:"text-xs font-mono text-muted-foreground overflow-x-auto",children:JSON.stringify(p.details,null,2)})})]},p.id))}),i.jsxs("div",{className:"px-4 py-2 border-t border-border text-xs text-muted-foreground",children:["Showing ",f.length," of ",e.length," events"]})]})},Hx=[{id:"meta-llama/llama-3.3-70b-instruct:free",name:"Llama 3.3 70B",backend:"openrouter"},{id:"deepseek/deepseek-r1-0528:free",name:"DeepSeek R1",backend:"openrouter"},{id:"mistralai/mistral-small-3.1-24b-instruct:free",name:"Mistral Small 3.1",backend:"openrouter"}],Qx=({agents:e,providers:t,skills:r,onCreateAgent:n})=>{const[a,l]=g.useState(""),[s,o]=g.useState("Cowork"),[u]=g.useState(Hx[0].id),f=g.useRef(null),h=[{icon:Xd,text:"Optimize my workflow"},{icon:cn,text:"Organize my files"},{icon:dn,text:"Find insights in data"},{icon:Ba,text:"Build an automation"}],m=[{name:"Project Constitution v4",lines:491,type:"TEXT"},{name:"Task Breakdown",lines:566,type:"TEXT"},{name:"Implementation Plan",lines:390,type:"TEXT"}],p=async()=>{if(a.trim())try{const y=await n({name:"Quick Chat",projectPath:process.cwd(),providerId:"free",model:u,skills:[]});await window.electronAPI.agent.sendMessage(y.id,a),l("")}catch(y){console.error("Failed to send message:",y)}},b=y=>{y.key==="Enter"&&!y.shiftKey&&(y.preventDefault(),p())};return i.jsxs("div",{className:"h-full flex relative",children:[i.jsx("div",{className:"absolute inset-0 pointer-events-none z-0",style:{backgroundImage:"radial-gradient(circle, rgba(0,200,168,0.04) 1px, transparent 1px)",backgroundSize:"22px 22px"}}),i.jsx("div",{className:"absolute w-[600px] h-[400px] -top-[120px] -right-[100px] pointer-events-none z-0",style:{background:"radial-gradient(ellipse, rgba(0,200,168,0.09) 0%, transparent 65%)"}}),i.jsx("div",{className:"absolute w-[300px] h-[300px] -bottom-[80px] -left-[60px] pointer-events-none z-0",style:{background:"radial-gradient(circle, rgba(0,150,130,0.06) 0%, transparent 70%)"}}),i.jsxs("div",{className:"flex-1 flex flex-col z-10",children:[i.jsx("div",{className:"h-12 border-b border-[var(--border-subtle)] flex items-center px-5 gap-1",children:i.jsx("div",{className:"flex gap-0.5 bg-[var(--bg-elevated)] p-[3px] rounded-lg",children:["Chat","Cowork","Code"].map(y=>i.jsx("button",{onClick:()=>o(y),className:`px-4 py-1.5 rounded-md text-xs font-medium transition-all ${s===y?"bg-[var(--bg-card)] text-[var(--text-primary)] shadow-[0_1px_4px_rgba(0,0,0,0.4)]":"text-[var(--text-muted)] hover:text-[var(--text-secondary)]"}`,children:y},y))})}),i.jsxs("div",{className:"flex-1 p-7 flex flex-col gap-5 overflow-hidden",children:[i.jsxs("h1",{className:"text-[22px] leading-tight tracking-[-0.01em] text-[var(--text-primary)]",style:{fontFamily:"var(--font-display)",fontStyle:"italic",fontWeight:300},children:["Let's knock something",i.jsx("br",{}),"off your list"]}),i.jsx("div",{className:"grid grid-cols-2 gap-2.5 flex-1",children:h.map((y,w)=>{const C=y.icon;return i.jsxs("button",{onClick:()=>l(y.text),className:"flex items-center gap-2.5 px-4 py-3.5 bg-[var(--bg-card)] border border-[var(--border-subtle)] rounded-[var(--radius-md)] text-left hover:border-[var(--border-accent)] transition-colors group",children:[i.jsx("div",{className:"w-7 h-7 rounded-md bg-[rgba(0,200,168,0.08)] border border-[rgba(0,200,168,0.12)] flex items-center justify-center flex-shrink-0",children:i.jsx(C,{className:"w-3.5 h-3.5 text-[var(--teal-400)]"})}),i.jsx("span",{className:"text-[12px] text-[var(--text-secondary)] group-hover:text-[var(--text-primary)] transition-colors",children:y.text})]},w)})}),i.jsxs("div",{className:"bg-[var(--bg-card)] border border-[var(--border-default)] rounded-[var(--radius-lg)] px-3.5 py-3 flex gap-2.5 items-center",children:[i.jsx("textarea",{ref:f,value:a,onChange:y=>l(y.target.value),onKeyDown:b,placeholder:"How can I help you today?",className:"flex-1 bg-transparent border-none outline-none text-[12px] text-[var(--text-primary)] placeholder:text-[var(--text-disabled)] resize-none leading-normal",rows:1}),i.jsx("button",{onClick:p,disabled:!a.trim(),className:"w-7 h-7 rounded-[7px] bg-[var(--teal-500)] flex items-center justify-center disabled:opacity-50 hover:bg-[var(--teal-400)] transition-colors flex-shrink-0",children:i.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"var(--bg-void)",children:i.jsx("path",{d:"M1 6l9-4-3.5 4L10 10 1 6z"})})})]})]})]}),i.jsxs("div",{className:"w-60 bg-[var(--bg-surface)] border-l border-[var(--border-subtle)] p-4 flex flex-col gap-3 z-10 flex-shrink-0",children:[i.jsxs("div",{children:[i.jsx("div",{className:"text-[10px] font-medium tracking-[0.12em] uppercase text-[var(--text-muted)] mb-1",children:"Memory"}),i.jsxs("div",{className:"bg-[var(--bg-card)] border border-[var(--border-subtle)] rounded-[var(--radius-md)] px-3 py-2.5 text-[11px] text-[var(--text-secondary)] leading-relaxed",children:["Purpose & context",i.jsx("small",{className:"block text-[var(--text-muted)] text-[10px] mt-0.5",children:"Only you · Updated 14 days ago"})]})]}),i.jsxs("div",{children:[i.jsx("div",{className:"text-[10px] font-medium tracking-[0.12em] uppercase text-[var(--text-muted)] mb-1",children:"Files"}),i.jsx("div",{className:"flex flex-col gap-2",children:m.map((y,w)=>i.jsxs("div",{className:"bg-[var(--bg-card)] border border-[var(--border-subtle)] rounded-[var(--radius-md)] px-3 py-2.5 text-[11px] text-[var(--text-secondary)] leading-relaxed",children:[y.name,i.jsxs("small",{className:"block text-[var(--text-muted)] text-[10px] mt-0.5",children:[y.lines," lines · ",y.type]})]},w))})]}),i.jsxs("div",{className:"mt-auto",children:[i.jsx("div",{className:"h-1 bg-[var(--bg-hover)] rounded overflow-hidden",children:i.jsx("div",{className:"h-full rounded bg-gradient-to-r from-[var(--teal-700)] to-[var(--teal-400)]",style:{width:"2%"}})}),i.jsx("div",{className:"text-[9px] text-[var(--text-muted)] mt-1.5",children:"2% of project capacity"})]})]})]})},Yx={app:{name:"Codex Linux",loading:"Loading Codex...",offline:"You are offline",online:"Back online"},sidebar:{agents:"Agents",worktrees:"Worktrees",skills:"Skills",automations:"Automations",settings:"Settings"},agents:{title:"Agents",description:"Manage your AI coding agents",create:"New Agent",delete:"Delete Agent",start:"Start",stop:"Stop",running:"running",idle:"idle",error:"error",name:"Agent Name",model:"Model",skills:"Skills",worktree:"Worktree",status:"Status",lastActivity:"Last Activity",noAgents:"No agents yet",createFirst:"Create your first agent to get started"},worktrees:{title:"Worktrees",description:"Isolated Git workspaces",create:"New Worktree",delete:"Delete Worktree",name:"Worktree Name",branch:"Branch",path:"Path",noWorktrees:"No worktrees yet"},skills:{title:"Skills",description:"Reusable AI capabilities",create:"New Skill",delete:"Delete Skill",name:"Skill Name",description_label:"Description",instructions:"Instructions",tags:"Tags",noSkills:"No skills yet",builtIn:"Built-in",custom:"Custom"},automations:{title:"Automations",description:"Scheduled tasks and workflows",create:"New Automation",delete:"Delete Automation",run:"Run Now",pause:"Pause",resume:"Resume",name:"Automation Name",schedule:"Schedule",command:"Command",trigger:"Trigger",lastRun:"Last Run",nextRun:"Next Run",noAutomations:"No automations yet",cron:"Cron Expression",manual:"Manual",interval:"Interval"},settings:{title:"Settings",description:"Configure your preferences",general:"General",appearance:"Appearance",api:"API Keys",security:"Security",language:"Language",theme:"Theme",dark:"Dark",light:"Light",system:"System",openai:"OpenAI API Key",anthropic:"Anthropic API Key",github:"GitHub Token",database:"Database",backup:"Backup",restore:"Restore",export:"Export",import:"Import",clear:"Clear Data",save:"Save",cancel:"Cancel",reset:"Reset to Defaults"},chat:{placeholder:"Type your message...",send:"Send",thinking:"Thinking...",error:"Error sending message",copy:"Copy",edit:"Edit",delete:"Delete",regenerate:"Regenerate"},terminal:{title:"Terminal",newTab:"New Tab",closeTab:"Close Tab",clear:"Clear",copy:"Copy",paste:"Paste"},fileExplorer:{title:"Files",openFile:"Open File",newFile:"New File",newFolder:"New Folder",rename:"Rename",delete:"Delete",refresh:"Refresh"},common:{save:"Save",cancel:"Cancel",delete:"Delete",edit:"Edit",create:"Create",close:"Close",confirm:"Confirm",search:"Search",loading:"Loading...",error:"Error",success:"Success",warning:"Warning",info:"Info",yes:"Yes",no:"No",ok:"OK",back:"Back",next:"Next",previous:"Previous",refresh:"Refresh",export:"Export",import:"Import"},errors:{generic:"An error occurred",network:"Network error",notFound:"Not found",unauthorized:"Unauthorized",forbidden:"Forbidden",validation:"Validation error",serverError:"Server error"}},Kx={app:{name:"Codex Linux",loading:"Chargement de Codex...",offline:"Vous êtes hors ligne",online:"De retour en ligne"},sidebar:{agents:"Agents",worktrees:"Arborescences",skills:"Compétences",automations:"Automatisations",settings:"Paramètres"},agents:{title:"Agents",description:"Gérez vos agents de codage IA",create:"Nouvel Agent",delete:"Supprimer Agent",start:"Démarrer",stop:"Arrêter",running:"en cours",idle:"inactif",error:"erreur",name:"Nom de l'agent",model:"Modèle",skills:"Compétences",worktree:"Arborescence",status:"Statut",lastActivity:"Dernière activité",noAgents:"Aucun agent",createFirst:"Créez votre premier agent pour commencer"},worktrees:{title:"Arborescences",description:"Espaces de travail Git isolés",create:"Nouvelle Arborescence",delete:"Supprimer Arborescence",name:"Nom de l'arborescence",branch:"Branche",path:"Chemin",noWorktrees:"Aucune arborescence"},skills:{title:"Compétences",description:"Capacités IA réutilisables",create:"Nouvelle Compétence",delete:"Supprimer Compétence",name:"Nom de la compétence",description_label:"Description",instructions:"Instructions",tags:"Tags",noSkills:"Aucune compétence",builtIn:"Intégré",custom:"Personnalisé"},automations:{title:"Automatisations",description:"Tâches et flux de travail planifiés",create:"Nouvelle Automatisation",delete:"Supprimer Automatisation",run:"Exécuter",pause:"Pause",resume:"Reprendre",name:"Nom de l'automatisation",schedule:"Planification",command:"Commande",trigger:"Déclencheur",lastRun:"Dernière exécution",nextRun:"Prochaine exécution",noAutomations:"Aucune automatisation",cron:"Expression Cron",manual:"Manuel",interval:"Intervalle"},settings:{title:"Paramètres",description:"Configurez vos préférences",general:"Général",appearance:"Apparence",api:"Clés API",security:"Sécurité",language:"Langue",theme:"Thème",dark:"Sombre",light:"Clair",system:"Système",openai:"Clé API OpenAI",anthropic:"Clé API Anthropic",github:"Token GitHub",database:"Base de données",backup:"Sauvegarde",restore:"Restaurer",export:"Exporter",import:"Importer",clear:"Effacer les données",save:"Enregistrer",cancel:"Annuler",reset:"Réinitialiser"},chat:{placeholder:"Tapez votre message...",send:"Envoyer",thinking:"Réflexion...",error:"Erreur d'envoi du message",copy:"Copier",edit:"Modifier",delete:"Supprimer",regenerate:"Régénérer"},terminal:{title:"Terminal",newTab:"Nouvel onglet",closeTab:"Fermer l'onglet",clear:"Effacer",copy:"Copier",paste:"Coller"},fileExplorer:{title:"Fichiers",openFile:"Ouvrir le fichier",newFile:"Nouveau fichier",newFolder:"Nouveau dossier",rename:"Renommer",delete:"Supprimer",refresh:"Actualiser"},common:{save:"Enregistrer",cancel:"Annuler",delete:"Supprimer",edit:"Modifier",create:"Créer",close:"Fermer",confirm:"Confirmer",search:"Rechercher",loading:"Chargement...",error:"Erreur",success:"Succès",warning:"Avertissement",info:"Info",yes:"Oui",no:"Non",ok:"OK",back:"Retour",next:"Suivant",previous:"Précédent",refresh:"Actualiser",export:"Exporter",import:"Importer"},errors:{generic:"Une erreur est survenue",network:"Erreur réseau",notFound:"Non trouvé",unauthorized:"Non autorisé",forbidden:"Interdit",validation:"Erreur de validation",serverError:"Erreur serveur"}},Gx={app:{name:"Codex Linux",loading:"Cargando Codex...",offline:"Estás desconectado",online:"De nuevo en línea"},sidebar:{agents:"Agentes",worktrees:"Árboles de trabajo",skills:"Habilidades",automations:"Automatizaciones",settings:"Configuración"},agents:{title:"Agentes",description:"Gestiona tus agentes de codificación IA",create:"Nuevo Agente",delete:"Eliminar Agente",start:"Iniciar",stop:"Detener",running:"ejecutando",idle:"inactivo",error:"error",name:"Nombre del agente",model:"Modelo",skills:"Habilidades",worktree:"Árbol de trabajo",status:"Estado",lastActivity:"Última actividad",noAgents:"Sin agentes",createFirst:"Crea tu primer agente para comenzar"},worktrees:{title:"Árboles de trabajo",description:"Espacios de trabajo Git aislados",create:"Nuevo Árbol",delete:"Eliminar Árbol",name:"Nombre del árbol",branch:"Rama",path:"Ruta",noWorktrees:"Sin árboles de trabajo"},skills:{title:"Habilidades",description:"Capacidades IA reutilizables",create:"Nueva Habilidad",delete:"Eliminar Habilidad",name:"Nombre de habilidad",description_label:"Descripción",instructions:"Instrucciones",tags:"Etiquetas",noSkills:"Sin habilidades",builtIn:"Integrado",custom:"Personalizado"},automations:{title:"Automatizaciones",description:"Tareas y flujos de trabajo programados",create:"Nueva Automatización",delete:"Eliminar Automatización",run:"Ejecutar",pause:"Pausar",resume:"Reanudar",name:"Nombre de automatización",schedule:"Programación",command:"Comando",trigger:"Disparador",lastRun:"Última ejecución",nextRun:"Próxima ejecución",noAutomations:"Sin automatizaciones",cron:"Expresión Cron",manual:"Manual",interval:"Intervalo"},settings:{title:"Configuración",description:"Configura tus preferencias",general:"General",appearance:"Apariencia",api:"Claves API",security:"Seguridad",language:"Idioma",theme:"Tema",dark:"Oscuro",light:"Claro",system:"Sistema",openai:"Clave API OpenAI",anthropic:"Clave API Anthropic",github:"Token GitHub",database:"Base de datos",backup:"Copia de seguridad",restore:"Restaurar",export:"Exportar",import:"Importar",clear:"Borrar datos",save:"Guardar",cancel:"Cancelar",reset:"Restablecer"},chat:{placeholder:"Escribe tu mensaje...",send:"Enviar",thinking:"Pensando...",error:"Error al enviar mensaje",copy:"Copiar",edit:"Editar",delete:"Eliminar",regenerate:"Regenerar"},terminal:{title:"Terminal",newTab:"Nueva pestaña",closeTab:"Cerrar pestaña",clear:"Limpiar",copy:"Copiar",paste:"Pegar"},fileExplorer:{title:"Archivos",openFile:"Abrir archivo",newFile:"Nuevo archivo",newFolder:"Nueva carpeta",rename:"Renombrar",delete:"Eliminar",refresh:"Actualizar"},common:{save:"Guardar",cancel:"Cancelar",delete:"Eliminar",edit:"Editar",create:"Crear",close:"Cerrar",confirm:"Confirmar",search:"Buscar",loading:"Cargando...",error:"Error",success:"Éxito",warning:"Advertencia",info:"Info",yes:"Sí",no:"No",ok:"OK",back:"Atrás",next:"Siguiente",previous:"Anterior",refresh:"Actualizar",export:"Exportar",import:"Importar"},errors:{generic:"Ha ocurrido un error",network:"Error de red",notFound:"No encontrado",unauthorized:"No autorizado",forbidden:"Prohibido",validation:"Error de validación",serverError:"Error del servidor"}},qx={app:{name:"Codex Linux",loading:"Codex wird geladen...",offline:"Sie sind offline",online:"Wieder online"},sidebar:{agents:"Agenten",worktrees:"Arbeitsbäume",skills:"Fähigkeiten",automations:"Automatisierungen",settings:"Einstellungen"},agents:{title:"Agenten",description:"Verwalten Sie Ihre KI-Codierungsagenten",create:"Neuer Agent",delete:"Agent löschen",start:"Starten",stop:"Stoppen",running:"läuft",idle:"inaktiv",error:"Fehler",name:"Agentenname",model:"Modell",skills:"Fähigkeiten",worktree:"Arbeitsbaum",status:"Status",lastActivity:"Letzte Aktivität",noAgents:"Keine Agenten",createFirst:"Erstellen Sie Ihren ersten Agenten"},worktrees:{title:"Arbeitsbäume",description:"Isolierte Git-Arbeitsbereiche",create:"Neuer Arbeitsbaum",delete:"Arbeitsbaum löschen",name:"Arbeitsbaumname",branch:"Branch",path:"Pfad",noWorktrees:"Keine Arbeitsbäume"},skills:{title:"Fähigkeiten",description:"Wiederverwendbare KI-Fähigkeiten",create:"Neue Fähigkeit",delete:"Fähigkeit löschen",name:"Fähigkeitsname",description_label:"Beschreibung",instructions:"Anweisungen",tags:"Tags",noSkills:"Keine Fähigkeiten",builtIn:"Eingebaut",custom:"Benutzerdefiniert"},automations:{title:"Automatisierungen",description:"Geplante Aufgaben und Workflows",create:"Neue Automatisierung",delete:"Automatisierung löschen",run:"Jetzt ausführen",pause:"Pausieren",resume:"Fortsetzen",name:"Automatisierungsname",schedule:"Zeitplan",command:"Befehl",trigger:"Auslöser",lastRun:"Letzte Ausführung",nextRun:"Nächste Ausführung",noAutomations:"Keine Automatisierungen",cron:"Cron-Ausdruck",manual:"Manuell",interval:"Intervall"},settings:{title:"Einstellungen",description:"Konfigurieren Sie Ihre Präferenzen",general:"Allgemein",appearance:"Erscheinungsbild",api:"API-Schlüssel",security:"Sicherheit",language:"Sprache",theme:"Thema",dark:"Dunkel",light:"Hell",system:"System",openai:"OpenAI API-Schlüssel",anthropic:"Anthropic API-Schlüssel",github:"GitHub-Token",database:"Datenbank",backup:"Sicherung",restore:"Wiederherstellen",export:"Exportieren",import:"Importieren",clear:"Daten löschen",save:"Speichern",cancel:"Abbrechen",reset:"Zurücksetzen"},chat:{placeholder:"Nachricht eingeben...",send:"Senden",thinking:"Denke nach...",error:"Fehler beim Senden",copy:"Kopieren",edit:"Bearbeiten",delete:"Löschen",regenerate:"Neu generieren"},terminal:{title:"Terminal",newTab:"Neuer Tab",closeTab:"Tab schließen",clear:"Löschen",copy:"Kopieren",paste:"Einfügen"},fileExplorer:{title:"Dateien",openFile:"Datei öffnen",newFile:"Neue Datei",newFolder:"Neuer Ordner",rename:"Umbenennen",delete:"Löschen",refresh:"Aktualisieren"},common:{save:"Speichern",cancel:"Abbrechen",delete:"Löschen",edit:"Bearbeiten",create:"Erstellen",close:"Schließen",confirm:"Bestätigen",search:"Suchen",loading:"Laden...",error:"Fehler",success:"Erfolg",warning:"Warnung",info:"Info",yes:"Ja",no:"Nein",ok:"OK",back:"Zurück",next:"Weiter",previous:"Zurück",refresh:"Aktualisieren",export:"Exportieren",import:"Importieren"},errors:{generic:"Ein Fehler ist aufgetreten",network:"Netzwerkfehler",notFound:"Nicht gefunden",unauthorized:"Nicht autorisiert",forbidden:"Verboten",validation:"Validierungsfehler",serverError:"Serverfehler"}},Su={en:Yx,fr:Kx,es:Gx,de:qx},Xx={en:"English",fr:"Français",es:"Español",de:"Deutsch"},Bi="en";function Cu(e){return Su[e]||Su[Bi]}function Zx(){if(typeof navigator>"u")return Bi;const e=navigator.language.split("-")[0];return["en","fr","es","de"].includes(e)?e:Bi}const Jx=["ar","he","fa","ur"];function Hl(e){return Jx.includes(e)}const ey=g.createContext(void 0);function ty({children:e,initialLanguage:t}){const[r,n]=g.useState(()=>{if(t)return t;const u=localStorage.getItem("codex-language");return u&&["en","fr","es","de"].includes(u)?u:Zx()}),[a,l]=g.useState(()=>Cu(r));g.useEffect(()=>{const u=Cu(r);l(u),localStorage.setItem("codex-language",r),document.documentElement.lang=r,document.documentElement.setAttribute("data-lang",r),document.documentElement.dir=Hl(r)?"rtl":"ltr"},[r]);const s=g.useCallback(u=>{n(u)},[]),o=Hl(r)?"rtl":"ltr";return i.jsx(ey.Provider,{value:{language:r,t:a,setLanguage:s,availableLanguages:Xx,isRTL:Hl(r),dir:o},children:i.jsx("div",{dir:o,children:e})})}function ry(){const e=bh(),t=Ws(),[r,n]=g.useState([]),[a,l]=g.useState([]),[s,o]=g.useState([]),[u,f]=g.useState([]),[h,m]=g.useState([]),[p,b]=g.useState(null),[y,w]=g.useState("agents"),[C,d]=g.useState(!0),[c,v]=g.useState({});g.useEffect(()=>{const L=t.pathname;if(L==="/"){w("chat");return}if(L.startsWith("/agents")){w("agents");return}if(L.startsWith("/code")){w("code");return}if(L.startsWith("/worktrees")){w("worktrees");return}if(L.startsWith("/skills")){w("skills");return}if(L.startsWith("/automations")){w("automations");return}if(L.startsWith("/settings")){w("settings");return}w("chat")},[t.pathname]);const x=L=>{switch(w(L),L){case"chat":e("/");break;case"agents":e("/agents");break;case"code":e("/code");break;case"worktrees":e("/worktrees");break;case"skills":e("/skills");break;case"automations":e("/automations");break;case"settings":e("/settings");break;default:e("/")}};g.useEffect(()=>{k();const L=({agentId:R,chunk:A})=>{v(z=>({...z,[R]:(z[R]||"")+A}))},W=({agentId:R})=>{n(A=>A.map(z=>z.id===R&&c[R]?{...z,messages:[...z.messages,{id:Date.now().toString(),role:"assistant",content:c[R],timestamp:new Date}]}:z)),v(A=>{const z={...A};return delete z[R],z})},I=({agentId:R,error:A})=>{console.error(`Stream error for agent ${R}:`,A),v(z=>{const q={...z};return delete q[R],q})};return window.electronAPI.on("agent:streamChunk",L),window.electronAPI.on("agent:streamEnd",W),window.electronAPI.on("agent:streamError",I),()=>{window.electronAPI.removeListener("agent:streamChunk",L),window.electronAPI.removeListener("agent:streamEnd",W),window.electronAPI.removeListener("agent:streamError",I)}},[]);const k=async()=>{try{const[L,W,I,R,A]=await Promise.all([window.electronAPI.agent.list(),window.electronAPI.skills.list(),window.electronAPI.automation.list(),window.electronAPI.providers.list(),window.electronAPI.settings.getAll()]);n(L),o(W),f(I),m(R),b(A)}catch(L){console.error("Failed to load initial data:",L)}finally{d(!1)}},N=async L=>{try{const W=await window.electronAPI.agent.create(L);return n(I=>[...I,W]),W}catch(W){throw console.error("Failed to create agent:",W),W}},E=async L=>{try{await window.electronAPI.agent.delete(L),n(W=>W.filter(I=>I.id!==L))}catch(W){console.error("Failed to delete agent:",W)}},T=async(L,W)=>{try{const I=await window.electronAPI.worktree.create(L,W);return l(R=>[...R,I]),I}catch(I){throw console.error("Failed to create worktree:",I),I}},$=async L=>{try{const W=await window.electronAPI.skills.create(L);return o(I=>[...I,W]),W}catch(W){throw console.error("Failed to create skill:",W),W}},M=async L=>{try{const W=await window.electronAPI.automation.create(L);return f(I=>[...I,W]),W}catch(W){throw console.error("Failed to create automation:",W),W}};return C?i.jsx("div",{className:"flex items-center justify-center h-screen bg-[var(--bg-void)]","data-testid":"app-loading",children:i.jsxs("div",{className:"flex flex-col items-center gap-4",children:[i.jsx("div",{className:"relative",children:i.jsx("div",{className:"w-12 h-12 rounded-full border-2 border-[var(--border-default)] border-t-[var(--teal-500)] animate-spin"})}),i.jsx("p",{className:"text-sm text-[var(--text-muted)] animate-pulse",children:"Loading Codex..."})]})}):i.jsx(ty,{children:i.jsxs("div",{className:"flex h-screen bg-[var(--bg-primary)] text-[var(--text-primary)] overflow-hidden","data-testid":"app-container",children:[i.jsx(pv,{activeTab:y,onTabChange:x}),i.jsxs("div",{className:"flex-1 flex flex-col min-w-0",children:[y!=="chat"&&i.jsx(mv,{activeTab:y,agents:r,onSettingsClick:()=>x("settings")}),i.jsx("main",{className:`flex-1 overflow-hidden animate-fadeIn ${y==="chat"?"":"bg-[var(--bg-primary)]"}`,"data-testid":"main-content",children:i.jsxs(Fh,{children:[i.jsx(it,{path:"/",element:i.jsx(Qx,{agents:r,providers:h,skills:s,onCreateAgent:N})}),i.jsx(it,{path:"/agents",element:i.jsx(vv,{agents:r,providers:h,skills:s,onCreateAgent:N,onDeleteAgent:E})}),i.jsx(it,{path:"/code",element:i.jsx(zg,{rootPath:"/"})}),i.jsx(it,{path:"/worktrees",element:i.jsx(gv,{worktrees:a,onCreateWorktree:T})}),i.jsx(it,{path:"/skills",element:i.jsx(xv,{skills:s,onCreateSkill:$})}),i.jsx(it,{path:"/automations",element:i.jsx(yv,{automations:u,agents:r,skills:s,onCreateAutomation:M})}),i.jsx(it,{path:"/audit",element:i.jsx(Vx,{})}),i.jsx(it,{path:"/settings",element:i.jsx(wv,{settings:p,providers:h,onSettingsChange:b})})]})})]})]})})}"serviceWorker"in navigator&&window.addEventListener("load",()=>{navigator.serviceWorker.register("/sw.js").then(e=>{console.log("SW registered:",e)}).catch(e=>{console.log("SW registration failed:",e)})});Ql.createRoot(document.getElementById("root")).render(i.jsx(dt.StrictMode,{children:i.jsx($h,{children:i.jsx(ry,{})})}));
|