repoburg 1.3.219 → 1.3.221
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/agent-pane/backend/dist/index.js +373 -18
- package/agent-pane/backend/dist/server.js +373 -18
- package/agent-pane/frontend/dist/assets/index-lc9eQnqi.css +1 -0
- package/agent-pane/frontend/dist/assets/index-vR3SdkR-.js +418 -0
- package/agent-pane/frontend/dist/index.html +2 -2
- package/daemon/dist/remote/cloudflared.js +16 -10
- package/package.json +3 -2
- package/agent-pane/frontend/dist/assets/index-BUkOj2Cb.js +0 -392
- package/agent-pane/frontend/dist/assets/index-gAFaOmjN.css +0 -1
|
@@ -0,0 +1,418 @@
|
|
|
1
|
+
var ev=Object.defineProperty;var tv=(n,r,i)=>r in n?ev(n,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):n[r]=i;var st=(n,r,i)=>tv(n,typeof r!="symbol"?r+"":r,i);(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))l(a);new MutationObserver(a=>{for(const c of a)if(c.type==="childList")for(const p of c.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&l(p)}).observe(document,{childList:!0,subtree:!0});function i(a){const c={};return a.integrity&&(c.integrity=a.integrity),a.referrerPolicy&&(c.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?c.credentials="include":a.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function l(a){if(a.ep)return;a.ep=!0;const c=i(a);fetch(a.href,c)}})();function fh(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var xc={exports:{}},Di={},wc={exports:{}},$e={};/**
|
|
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 Qf;function nv(){if(Qf)return $e;Qf=1;var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),p=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),x=Symbol.iterator;function w(E){return E===null||typeof E!="object"?null:(E=x&&E[x]||E["@@iterator"],typeof E=="function"?E:null)}var N={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},R=Object.assign,b={};function C(E,D,le){this.props=E,this.context=D,this.refs=b,this.updater=le||N}C.prototype.isReactComponent={},C.prototype.setState=function(E,D){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,D,"setState")},C.prototype.forceUpdate=function(E){this.updater.enqueueForceUpdate(this,E,"forceUpdate")};function L(){}L.prototype=C.prototype;function P(E,D,le){this.props=E,this.context=D,this.refs=b,this.updater=le||N}var H=P.prototype=new L;H.constructor=P,R(H,C.prototype),H.isPureReactComponent=!0;var O=Array.isArray,B=Object.prototype.hasOwnProperty,ee={current:null},Z={key:!0,ref:!0,__self:!0,__source:!0};function U(E,D,le){var he,_e={},ke=null,Pe=null;if(D!=null)for(he in D.ref!==void 0&&(Pe=D.ref),D.key!==void 0&&(ke=""+D.key),D)B.call(D,he)&&!Z.hasOwnProperty(he)&&(_e[he]=D[he]);var be=arguments.length-2;if(be===1)_e.children=le;else if(1<be){for(var Ae=Array(be),Ne=0;Ne<be;Ne++)Ae[Ne]=arguments[Ne+2];_e.children=Ae}if(E&&E.defaultProps)for(he in be=E.defaultProps,be)_e[he]===void 0&&(_e[he]=be[he]);return{$$typeof:n,type:E,key:ke,ref:Pe,props:_e,_owner:ee.current}}function te(E,D){return{$$typeof:n,type:E.type,key:D,ref:E.ref,props:E.props,_owner:E._owner}}function q(E){return typeof E=="object"&&E!==null&&E.$$typeof===n}function ie(E){var D={"=":"=0",":":"=2"};return"$"+E.replace(/[=:]/g,function(le){return D[le]})}var ye=/\/+/g;function Te(E,D){return typeof E=="object"&&E!==null&&E.key!=null?ie(""+E.key):D.toString(36)}function Le(E,D,le,he,_e){var ke=typeof E;(ke==="undefined"||ke==="boolean")&&(E=null);var Pe=!1;if(E===null)Pe=!0;else switch(ke){case"string":case"number":Pe=!0;break;case"object":switch(E.$$typeof){case n:case r:Pe=!0}}if(Pe)return Pe=E,_e=_e(Pe),E=he===""?"."+Te(Pe,0):he,O(_e)?(le="",E!=null&&(le=E.replace(ye,"$&/")+"/"),Le(_e,D,le,"",function(Ne){return Ne})):_e!=null&&(q(_e)&&(_e=te(_e,le+(!_e.key||Pe&&Pe.key===_e.key?"":(""+_e.key).replace(ye,"$&/")+"/")+E)),D.push(_e)),1;if(Pe=0,he=he===""?".":he+":",O(E))for(var be=0;be<E.length;be++){ke=E[be];var Ae=he+Te(ke,be);Pe+=Le(ke,D,le,Ae,_e)}else if(Ae=w(E),typeof Ae=="function")for(E=Ae.call(E),be=0;!(ke=E.next()).done;)ke=ke.value,Ae=he+Te(ke,be++),Pe+=Le(ke,D,le,Ae,_e);else if(ke==="object")throw D=String(E),Error("Objects are not valid as a React child (found: "+(D==="[object Object]"?"object with keys {"+Object.keys(E).join(", ")+"}":D)+"). If you meant to render a collection of children, use an array instead.");return Pe}function K(E,D,le){if(E==null)return E;var he=[],_e=0;return Le(E,he,"","",function(ke){return D.call(le,ke,_e++)}),he}function xe(E){if(E._status===-1){var D=E._result;D=D(),D.then(function(le){(E._status===0||E._status===-1)&&(E._status=1,E._result=le)},function(le){(E._status===0||E._status===-1)&&(E._status=2,E._result=le)}),E._status===-1&&(E._status=0,E._result=D)}if(E._status===1)return E._result.default;throw E._result}var we={current:null},$={transition:null},V={ReactCurrentDispatcher:we,ReactCurrentBatchConfig:$,ReactCurrentOwner:ee};function W(){throw Error("act(...) is not supported in production builds of React.")}return $e.Children={map:K,forEach:function(E,D,le){K(E,function(){D.apply(this,arguments)},le)},count:function(E){var D=0;return K(E,function(){D++}),D},toArray:function(E){return K(E,function(D){return D})||[]},only:function(E){if(!q(E))throw Error("React.Children.only expected to receive a single React element child.");return E}},$e.Component=C,$e.Fragment=i,$e.Profiler=a,$e.PureComponent=P,$e.StrictMode=l,$e.Suspense=g,$e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=V,$e.act=W,$e.cloneElement=function(E,D,le){if(E==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+E+".");var he=R({},E.props),_e=E.key,ke=E.ref,Pe=E._owner;if(D!=null){if(D.ref!==void 0&&(ke=D.ref,Pe=ee.current),D.key!==void 0&&(_e=""+D.key),E.type&&E.type.defaultProps)var be=E.type.defaultProps;for(Ae in D)B.call(D,Ae)&&!Z.hasOwnProperty(Ae)&&(he[Ae]=D[Ae]===void 0&&be!==void 0?be[Ae]:D[Ae])}var Ae=arguments.length-2;if(Ae===1)he.children=le;else if(1<Ae){be=Array(Ae);for(var Ne=0;Ne<Ae;Ne++)be[Ne]=arguments[Ne+2];he.children=be}return{$$typeof:n,type:E.type,key:_e,ref:ke,props:he,_owner:Pe}},$e.createContext=function(E){return E={$$typeof:p,_currentValue:E,_currentValue2:E,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},E.Provider={$$typeof:c,_context:E},E.Consumer=E},$e.createElement=U,$e.createFactory=function(E){var D=U.bind(null,E);return D.type=E,D},$e.createRef=function(){return{current:null}},$e.forwardRef=function(E){return{$$typeof:h,render:E}},$e.isValidElement=q,$e.lazy=function(E){return{$$typeof:y,_payload:{_status:-1,_result:E},_init:xe}},$e.memo=function(E,D){return{$$typeof:m,type:E,compare:D===void 0?null:D}},$e.startTransition=function(E){var D=$.transition;$.transition={};try{E()}finally{$.transition=D}},$e.unstable_act=W,$e.useCallback=function(E,D){return we.current.useCallback(E,D)},$e.useContext=function(E){return we.current.useContext(E)},$e.useDebugValue=function(){},$e.useDeferredValue=function(E){return we.current.useDeferredValue(E)},$e.useEffect=function(E,D){return we.current.useEffect(E,D)},$e.useId=function(){return we.current.useId()},$e.useImperativeHandle=function(E,D,le){return we.current.useImperativeHandle(E,D,le)},$e.useInsertionEffect=function(E,D){return we.current.useInsertionEffect(E,D)},$e.useLayoutEffect=function(E,D){return we.current.useLayoutEffect(E,D)},$e.useMemo=function(E,D){return we.current.useMemo(E,D)},$e.useReducer=function(E,D,le){return we.current.useReducer(E,D,le)},$e.useRef=function(E){return we.current.useRef(E)},$e.useState=function(E){return we.current.useState(E)},$e.useSyncExternalStore=function(E,D,le){return we.current.useSyncExternalStore(E,D,le)},$e.useTransition=function(){return we.current.useTransition()},$e.version="18.3.1",$e}var Xf;function su(){return Xf||(Xf=1,wc.exports=nv()),wc.exports}/**
|
|
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 Zf;function rv(){if(Zf)return Di;Zf=1;var n=su(),r=Symbol.for("react.element"),i=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,a=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function p(h,g,m){var y,x={},w=null,N=null;m!==void 0&&(w=""+m),g.key!==void 0&&(w=""+g.key),g.ref!==void 0&&(N=g.ref);for(y in g)l.call(g,y)&&!c.hasOwnProperty(y)&&(x[y]=g[y]);if(h&&h.defaultProps)for(y in g=h.defaultProps,g)x[y]===void 0&&(x[y]=g[y]);return{$$typeof:r,type:h,key:w,ref:N,props:x,_owner:a.current}}return Di.Fragment=i,Di.jsx=p,Di.jsxs=p,Di}var Jf;function sv(){return Jf||(Jf=1,xc.exports=rv()),xc.exports}var u=sv(),k=su();const nt=fh(k);var ol={},kc={exports:{}},mn={},Sc={exports:{}},Tc={};/**
|
|
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
|
+
*/var ep;function iv(){return ep||(ep=1,(function(n){function r($,V){var W=$.length;$.push(V);e:for(;0<W;){var E=W-1>>>1,D=$[E];if(0<a(D,V))$[E]=V,$[W]=D,W=E;else break e}}function i($){return $.length===0?null:$[0]}function l($){if($.length===0)return null;var V=$[0],W=$.pop();if(W!==V){$[0]=W;e:for(var E=0,D=$.length,le=D>>>1;E<le;){var he=2*(E+1)-1,_e=$[he],ke=he+1,Pe=$[ke];if(0>a(_e,W))ke<D&&0>a(Pe,_e)?($[E]=Pe,$[ke]=W,E=ke):($[E]=_e,$[he]=W,E=he);else if(ke<D&&0>a(Pe,W))$[E]=Pe,$[ke]=W,E=ke;else break e}}return V}function a($,V){var W=$.sortIndex-V.sortIndex;return W!==0?W:$.id-V.id}if(typeof performance=="object"&&typeof performance.now=="function"){var c=performance;n.unstable_now=function(){return c.now()}}else{var p=Date,h=p.now();n.unstable_now=function(){return p.now()-h}}var g=[],m=[],y=1,x=null,w=3,N=!1,R=!1,b=!1,C=typeof setTimeout=="function"?setTimeout:null,L=typeof clearTimeout=="function"?clearTimeout:null,P=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function H($){for(var V=i(m);V!==null;){if(V.callback===null)l(m);else if(V.startTime<=$)l(m),V.sortIndex=V.expirationTime,r(g,V);else break;V=i(m)}}function O($){if(b=!1,H($),!R)if(i(g)!==null)R=!0,xe(B);else{var V=i(m);V!==null&&we(O,V.startTime-$)}}function B($,V){R=!1,b&&(b=!1,L(U),U=-1),N=!0;var W=w;try{for(H(V),x=i(g);x!==null&&(!(x.expirationTime>V)||$&&!ie());){var E=x.callback;if(typeof E=="function"){x.callback=null,w=x.priorityLevel;var D=E(x.expirationTime<=V);V=n.unstable_now(),typeof D=="function"?x.callback=D:x===i(g)&&l(g),H(V)}else l(g);x=i(g)}if(x!==null)var le=!0;else{var he=i(m);he!==null&&we(O,he.startTime-V),le=!1}return le}finally{x=null,w=W,N=!1}}var ee=!1,Z=null,U=-1,te=5,q=-1;function ie(){return!(n.unstable_now()-q<te)}function ye(){if(Z!==null){var $=n.unstable_now();q=$;var V=!0;try{V=Z(!0,$)}finally{V?Te():(ee=!1,Z=null)}}else ee=!1}var Te;if(typeof P=="function")Te=function(){P(ye)};else if(typeof MessageChannel<"u"){var Le=new MessageChannel,K=Le.port2;Le.port1.onmessage=ye,Te=function(){K.postMessage(null)}}else Te=function(){C(ye,0)};function xe($){Z=$,ee||(ee=!0,Te())}function we($,V){U=C(function(){$(n.unstable_now())},V)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function($){$.callback=null},n.unstable_continueExecution=function(){R||N||(R=!0,xe(B))},n.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):te=0<$?Math.floor(1e3/$):5},n.unstable_getCurrentPriorityLevel=function(){return w},n.unstable_getFirstCallbackNode=function(){return i(g)},n.unstable_next=function($){switch(w){case 1:case 2:case 3:var V=3;break;default:V=w}var W=w;w=V;try{return $()}finally{w=W}},n.unstable_pauseExecution=function(){},n.unstable_requestPaint=function(){},n.unstable_runWithPriority=function($,V){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var W=w;w=$;try{return V()}finally{w=W}},n.unstable_scheduleCallback=function($,V,W){var E=n.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?E+W:E):W=E,$){case 1:var D=-1;break;case 2:D=250;break;case 5:D=1073741823;break;case 4:D=1e4;break;default:D=5e3}return D=W+D,$={id:y++,callback:V,priorityLevel:$,startTime:W,expirationTime:D,sortIndex:-1},W>E?($.sortIndex=W,r(m,$),i(g)===null&&$===i(m)&&(b?(L(U),U=-1):b=!0,we(O,W-E))):($.sortIndex=D,r(g,$),R||N||(R=!0,xe(B))),$},n.unstable_shouldYield=ie,n.unstable_wrapCallback=function($){var V=w;return function(){var W=w;w=V;try{return $.apply(this,arguments)}finally{w=W}}}})(Tc)),Tc}var tp;function ov(){return tp||(tp=1,Sc.exports=iv()),Sc.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 np;function lv(){if(np)return mn;np=1;var n=su(),r=ov();function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,s=1;s<arguments.length;s++)t+="&args[]="+encodeURIComponent(arguments[s]);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 l=new Set,a={};function c(e,t){p(e,t),p(e+"Capture",t)}function p(e,t){for(a[e]=t,e=0;e<t.length;e++)l.add(t[e])}var h=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),g=Object.prototype.hasOwnProperty,m=/^[: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]*$/,y={},x={};function w(e){return g.call(x,e)?!0:g.call(y,e)?!1:m.test(e)?x[e]=!0:(y[e]=!0,!1)}function N(e,t,s,o){if(s!==null&&s.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return o?!1:s!==null?!s.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function R(e,t,s,o){if(t===null||typeof t>"u"||N(e,t,s,o))return!0;if(o)return!1;if(s!==null)switch(s.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 b(e,t,s,o,d,f,v){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=o,this.attributeNamespace=d,this.mustUseProperty=s,this.propertyName=e,this.type=t,this.sanitizeURL=f,this.removeEmptyString=v}var C={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){C[e]=new b(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];C[t]=new b(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){C[e]=new b(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){C[e]=new b(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){C[e]=new b(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){C[e]=new b(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){C[e]=new b(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){C[e]=new b(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){C[e]=new b(e,5,!1,e.toLowerCase(),null,!1,!1)});var L=/[\-:]([a-z])/g;function P(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(L,P);C[t]=new b(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(L,P);C[t]=new b(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(L,P);C[t]=new b(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){C[e]=new b(e,1,!1,e.toLowerCase(),null,!1,!1)}),C.xlinkHref=new b("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){C[e]=new b(e,1,!1,e.toLowerCase(),null,!0,!0)});function H(e,t,s,o){var d=C.hasOwnProperty(t)?C[t]:null;(d!==null?d.type!==0:o||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(R(t,s,d,o)&&(s=null),o||d===null?w(t)&&(s===null?e.removeAttribute(t):e.setAttribute(t,""+s)):d.mustUseProperty?e[d.propertyName]=s===null?d.type===3?!1:"":s:(t=d.attributeName,o=d.attributeNamespace,s===null?e.removeAttribute(t):(d=d.type,s=d===3||d===4&&s===!0?"":""+s,o?e.setAttributeNS(o,t,s):e.setAttribute(t,s))))}var O=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,B=Symbol.for("react.element"),ee=Symbol.for("react.portal"),Z=Symbol.for("react.fragment"),U=Symbol.for("react.strict_mode"),te=Symbol.for("react.profiler"),q=Symbol.for("react.provider"),ie=Symbol.for("react.context"),ye=Symbol.for("react.forward_ref"),Te=Symbol.for("react.suspense"),Le=Symbol.for("react.suspense_list"),K=Symbol.for("react.memo"),xe=Symbol.for("react.lazy"),we=Symbol.for("react.offscreen"),$=Symbol.iterator;function V(e){return e===null||typeof e!="object"?null:(e=$&&e[$]||e["@@iterator"],typeof e=="function"?e:null)}var W=Object.assign,E;function D(e){if(E===void 0)try{throw Error()}catch(s){var t=s.stack.trim().match(/\n( *(at )?)/);E=t&&t[1]||""}return`
|
|
34
|
+
`+E+e}var le=!1;function he(e,t){if(!e||le)return"";le=!0;var s=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(z){var o=z}Reflect.construct(e,[],t)}else{try{t.call()}catch(z){o=z}e.call(t.prototype)}else{try{throw Error()}catch(z){o=z}e()}}catch(z){if(z&&o&&typeof z.stack=="string"){for(var d=z.stack.split(`
|
|
35
|
+
`),f=o.stack.split(`
|
|
36
|
+
`),v=d.length-1,T=f.length-1;1<=v&&0<=T&&d[v]!==f[T];)T--;for(;1<=v&&0<=T;v--,T--)if(d[v]!==f[T]){if(v!==1||T!==1)do if(v--,T--,0>T||d[v]!==f[T]){var _=`
|
|
37
|
+
`+d[v].replace(" at new "," at ");return e.displayName&&_.includes("<anonymous>")&&(_=_.replace("<anonymous>",e.displayName)),_}while(1<=v&&0<=T);break}}}finally{le=!1,Error.prepareStackTrace=s}return(e=e?e.displayName||e.name:"")?D(e):""}function _e(e){switch(e.tag){case 5:return D(e.type);case 16:return D("Lazy");case 13:return D("Suspense");case 19:return D("SuspenseList");case 0:case 2:case 15:return e=he(e.type,!1),e;case 11:return e=he(e.type.render,!1),e;case 1:return e=he(e.type,!0),e;default:return""}}function ke(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 Z:return"Fragment";case ee:return"Portal";case te:return"Profiler";case U:return"StrictMode";case Te:return"Suspense";case Le:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ie:return(e.displayName||"Context")+".Consumer";case q:return(e._context.displayName||"Context")+".Provider";case ye:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case K:return t=e.displayName||null,t!==null?t:ke(e.type)||"Memo";case xe:t=e._payload,e=e._init;try{return ke(e(t))}catch{}}return null}function Pe(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 ke(t);case 8:return t===U?"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 be(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ae(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ne(e){var t=Ae(e)?"checked":"value",s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),o=""+e[t];if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var d=s.get,f=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return d.call(this)},set:function(v){o=""+v,f.call(this,v)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return o},setValue:function(v){o=""+v},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function jt(e){e._valueTracker||(e._valueTracker=Ne(e))}function Me(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var s=t.getValue(),o="";return e&&(o=Ae(e)?e.checked?"true":"false":e.value),e=o,e!==s?(t.setValue(e),!0):!1}function Nt(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 G(e,t){var s=t.checked;return W({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:s??e._wrapperState.initialChecked})}function De(e,t){var s=t.defaultValue==null?"":t.defaultValue,o=t.checked!=null?t.checked:t.defaultChecked;s=be(t.value!=null?t.value:s),e._wrapperState={initialChecked:o,initialValue:s,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function oe(e,t){t=t.checked,t!=null&&H(e,"checked",t,!1)}function He(e,t){oe(e,t);var s=be(t.value),o=t.type;if(s!=null)o==="number"?(s===0&&e.value===""||e.value!=s)&&(e.value=""+s):e.value!==""+s&&(e.value=""+s);else if(o==="submit"||o==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?me(e,t.type,s):t.hasOwnProperty("defaultValue")&&me(e,t.type,be(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function at(e,t,s){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var o=t.type;if(!(o!=="submit"&&o!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,s||t===e.value||(e.value=t),e.defaultValue=t}s=e.name,s!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,s!==""&&(e.name=s)}function me(e,t,s){(t!=="number"||Nt(e.ownerDocument)!==e)&&(s==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+s&&(e.defaultValue=""+s))}var Fe=Array.isArray;function F(e,t,s,o){if(e=e.options,t){t={};for(var d=0;d<s.length;d++)t["$"+s[d]]=!0;for(s=0;s<e.length;s++)d=t.hasOwnProperty("$"+e[s].value),e[s].selected!==d&&(e[s].selected=d),d&&o&&(e[s].defaultSelected=!0)}else{for(s=""+be(s),t=null,d=0;d<e.length;d++){if(e[d].value===s){e[d].selected=!0,o&&(e[d].defaultSelected=!0);return}t!==null||e[d].disabled||(t=e[d])}t!==null&&(t.selected=!0)}}function ce(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(i(91));return W({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Oe(e,t){var s=t.value;if(s==null){if(s=t.children,t=t.defaultValue,s!=null){if(t!=null)throw Error(i(92));if(Fe(s)){if(1<s.length)throw Error(i(93));s=s[0]}t=s}t==null&&(t=""),s=t}e._wrapperState={initialValue:be(s)}}function Ue(e,t){var s=be(t.value),o=be(t.defaultValue);s!=null&&(s=""+s,s!==e.value&&(e.value=s),t.defaultValue==null&&e.defaultValue!==s&&(e.defaultValue=s)),o!=null&&(e.defaultValue=""+o)}function it(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function xt(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 et(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?xt(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var pt,ze=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,s,o,d){MSApp.execUnsafeLocalFunction(function(){return e(t,s,o,d)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(pt=pt||document.createElement("div"),pt.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=pt.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ze(e,t){if(t){var s=e.firstChild;if(s&&s===e.lastChild&&s.nodeType===3){s.nodeValue=t;return}}e.textContent=t}var tt={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},tr=["Webkit","ms","Moz","O"];Object.keys(tt).forEach(function(e){tr.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),tt[t]=tt[e]})});function nr(e,t,s){return t==null||typeof t=="boolean"||t===""?"":s||typeof t!="number"||t===0||tt.hasOwnProperty(e)&&tt[e]?(""+t).trim():t+"px"}function qr(e,t){e=e.style;for(var s in t)if(t.hasOwnProperty(s)){var o=s.indexOf("--")===0,d=nr(s,t[s],o);s==="float"&&(s="cssFloat"),o?e.setProperty(s,d):e[s]=d}}var wr=W({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 rr(e,t){if(t){if(wr[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(i(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(i(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(i(61))}if(t.style!=null&&typeof t.style!="object")throw Error(i(62))}}function sr(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 Mn=null;function Nn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Gt=null,Cn=null,ot=null;function Rt(e){if(e=gi(e)){if(typeof Gt!="function")throw Error(i(280));var t=e.stateNode;t&&(t=ko(t),Gt(e.stateNode,e.type,t))}}function Ct(e){Cn?ot?ot.push(e):ot=[e]:Cn=e}function an(){if(Cn){var e=Cn,t=ot;if(ot=Cn=null,Rt(e),t)for(e=0;e<t.length;e++)Rt(t[e])}}function Et(e,t){return e(t)}function kt(){}var ct=!1;function qt(e,t,s){if(ct)return e(t,s);ct=!0;try{return Et(e,t,s)}finally{ct=!1,(Cn!==null||ot!==null)&&(kt(),an())}}function rt(e,t){var s=e.stateNode;if(s===null)return null;var o=ko(s);if(o===null)return null;s=o[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":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(s&&typeof s!="function")throw Error(i(231,t,typeof s));return s}var Kt=!1;if(h)try{var Mt={};Object.defineProperty(Mt,"passive",{get:function(){Kt=!0}}),window.addEventListener("test",Mt,Mt),window.removeEventListener("test",Mt,Mt)}catch{Kt=!1}function cn(e,t,s,o,d,f,v,T,_){var z=Array.prototype.slice.call(arguments,3);try{t.apply(s,z)}catch(X){this.onError(X)}}var en=!1,gn=null,Ut=!1,Ln=null,Pn={onError:function(e){en=!0,gn=e}};function Ul(e,t,s,o,d,f,v,T,_){en=!1,gn=null,cn.apply(Pn,arguments)}function Bl(e,t,s,o,d,f,v,T,_){if(Ul.apply(this,arguments),en){if(en){var z=gn;en=!1,gn=null}else throw Error(i(198));Ut||(Ut=!0,Ln=z)}}function Qe(e){var t=e,s=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(s=t.return),e=t.return;while(e)}return t.tag===3?s:null}function ir(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 Ji(e){if(Qe(e)!==e)throw Error(i(188))}function eo(e){var t=e.alternate;if(!t){if(t=Qe(e),t===null)throw Error(i(188));return t!==e?null:e}for(var s=e,o=t;;){var d=s.return;if(d===null)break;var f=d.alternate;if(f===null){if(o=d.return,o!==null){s=o;continue}break}if(d.child===f.child){for(f=d.child;f;){if(f===s)return Ji(d),e;if(f===o)return Ji(d),t;f=f.sibling}throw Error(i(188))}if(s.return!==o.return)s=d,o=f;else{for(var v=!1,T=d.child;T;){if(T===s){v=!0,s=d,o=f;break}if(T===o){v=!0,o=d,s=f;break}T=T.sibling}if(!v){for(T=f.child;T;){if(T===s){v=!0,s=f,o=d;break}if(T===o){v=!0,o=f,s=d;break}T=T.sibling}if(!v)throw Error(i(189))}}if(s.alternate!==o)throw Error(i(190))}if(s.tag!==3)throw Error(i(188));return s.stateNode.current===s?e:t}function gs(e){return e=eo(e),e!==null?Xs(e):null}function Xs(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Xs(e);if(t!==null)return t;e=e.sibling}return null}var Zs=r.unstable_scheduleCallback,to=r.unstable_cancelCallback,Wl=r.unstable_shouldYield,Hl=r.unstable_requestPaint,ht=r.unstable_now,Gn=r.unstable_getCurrentPriorityLevel,kr=r.unstable_ImmediatePriority,qn=r.unstable_UserBlockingPriority,vs=r.unstable_NormalPriority,Kr=r.unstable_LowPriority,no=r.unstable_IdlePriority,Yr=null,vn=null;function ys(e){if(vn&&typeof vn.onCommitFiberRoot=="function")try{vn.onCommitFiberRoot(Yr,e,void 0,(e.current.flags&128)===128)}catch{}}var tn=Math.clz32?Math.clz32:Qr,xs=Math.log,Sr=Math.LN2;function Qr(e){return e>>>=0,e===0?32:31-(xs(e)/Sr|0)|0}var nn=64,ws=4194304;function Xr(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Zr(e,t){var s=e.pendingLanes;if(s===0)return 0;var o=0,d=e.suspendedLanes,f=e.pingedLanes,v=s&268435455;if(v!==0){var T=v&~d;T!==0?o=Xr(T):(f&=v,f!==0&&(o=Xr(f)))}else v=s&~d,v!==0?o=Xr(v):f!==0&&(o=Xr(f));if(o===0)return 0;if(t!==0&&t!==o&&(t&d)===0&&(d=o&-o,f=t&-t,d>=f||d===16&&(f&4194240)!==0))return t;if((o&4)!==0&&(o|=s&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=o;0<t;)s=31-tn(t),d=1<<s,o|=e[s],t&=~d;return o}function ro(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 so(e,t){for(var s=e.suspendedLanes,o=e.pingedLanes,d=e.expirationTimes,f=e.pendingLanes;0<f;){var v=31-tn(f),T=1<<v,_=d[v];_===-1?((T&s)===0||(T&o)!==0)&&(d[v]=ro(T,t)):_<=t&&(e.expiredLanes|=T),f&=~T}}function Js(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function ei(){var e=nn;return nn<<=1,(nn&4194240)===0&&(nn=64),e}function ti(e){for(var t=[],s=0;31>s;s++)t.push(e);return t}function Jr(e,t,s){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-tn(t),e[t]=s}function io(e,t){var s=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 o=e.eventTimes;for(e=e.expirationTimes;0<s;){var d=31-tn(s),f=1<<d;t[d]=0,o[d]=-1,e[d]=-1,s&=~f}}function Tr(e,t){var s=e.entangledLanes|=t;for(e=e.entanglements;s;){var o=31-tn(s),d=1<<o;d&t|e[o]&t&&(e[o]|=t),s&=~d}}var Ve=0;function ne(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var S,I,Y,fe,ve,Ie=!1,Ge=[],Ke=null,mt=null,gt=null,or=new Map,St=new Map,Nr=[],Sm="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 Iu(e,t){switch(e){case"focusin":case"focusout":Ke=null;break;case"dragenter":case"dragleave":mt=null;break;case"mouseover":case"mouseout":gt=null;break;case"pointerover":case"pointerout":or.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":St.delete(t.pointerId)}}function ni(e,t,s,o,d,f){return e===null||e.nativeEvent!==f?(e={blockedOn:t,domEventName:s,eventSystemFlags:o,nativeEvent:f,targetContainers:[d]},t!==null&&(t=gi(t),t!==null&&I(t)),e):(e.eventSystemFlags|=o,t=e.targetContainers,d!==null&&t.indexOf(d)===-1&&t.push(d),e)}function Tm(e,t,s,o,d){switch(t){case"focusin":return Ke=ni(Ke,e,t,s,o,d),!0;case"dragenter":return mt=ni(mt,e,t,s,o,d),!0;case"mouseover":return gt=ni(gt,e,t,s,o,d),!0;case"pointerover":var f=d.pointerId;return or.set(f,ni(or.get(f)||null,e,t,s,o,d)),!0;case"gotpointercapture":return f=d.pointerId,St.set(f,ni(St.get(f)||null,e,t,s,o,d)),!0}return!1}function Au(e){var t=es(e.target);if(t!==null){var s=Qe(t);if(s!==null){if(t=s.tag,t===13){if(t=ir(s),t!==null){e.blockedOn=t,ve(e.priority,function(){Y(s)});return}}else if(t===3&&s.stateNode.current.memoizedState.isDehydrated){e.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}e.blockedOn=null}function oo(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var s=Gl(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(s===null){s=e.nativeEvent;var o=new s.constructor(s.type,s);Mn=o,s.target.dispatchEvent(o),Mn=null}else return t=gi(s),t!==null&&I(t),e.blockedOn=s,!1;t.shift()}return!0}function Mu(e,t,s){oo(e)&&s.delete(t)}function Nm(){Ie=!1,Ke!==null&&oo(Ke)&&(Ke=null),mt!==null&&oo(mt)&&(mt=null),gt!==null&&oo(gt)&&(gt=null),or.forEach(Mu),St.forEach(Mu)}function ri(e,t){e.blockedOn===t&&(e.blockedOn=null,Ie||(Ie=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,Nm)))}function si(e){function t(d){return ri(d,e)}if(0<Ge.length){ri(Ge[0],e);for(var s=1;s<Ge.length;s++){var o=Ge[s];o.blockedOn===e&&(o.blockedOn=null)}}for(Ke!==null&&ri(Ke,e),mt!==null&&ri(mt,e),gt!==null&&ri(gt,e),or.forEach(t),St.forEach(t),s=0;s<Nr.length;s++)o=Nr[s],o.blockedOn===e&&(o.blockedOn=null);for(;0<Nr.length&&(s=Nr[0],s.blockedOn===null);)Au(s),s.blockedOn===null&&Nr.shift()}var ks=O.ReactCurrentBatchConfig,lo=!0;function Cm(e,t,s,o){var d=Ve,f=ks.transition;ks.transition=null;try{Ve=1,Vl(e,t,s,o)}finally{Ve=d,ks.transition=f}}function Em(e,t,s,o){var d=Ve,f=ks.transition;ks.transition=null;try{Ve=4,Vl(e,t,s,o)}finally{Ve=d,ks.transition=f}}function Vl(e,t,s,o){if(lo){var d=Gl(e,t,s,o);if(d===null)ca(e,t,o,ao,s),Iu(e,o);else if(Tm(d,e,t,s,o))o.stopPropagation();else if(Iu(e,o),t&4&&-1<Sm.indexOf(e)){for(;d!==null;){var f=gi(d);if(f!==null&&S(f),f=Gl(e,t,s,o),f===null&&ca(e,t,o,ao,s),f===d)break;d=f}d!==null&&o.stopPropagation()}else ca(e,t,o,null,s)}}var ao=null;function Gl(e,t,s,o){if(ao=null,e=Nn(o),e=es(e),e!==null)if(t=Qe(e),t===null)e=null;else if(s=t.tag,s===13){if(e=ir(t),e!==null)return e;e=null}else if(s===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return ao=e,null}function Lu(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Gn()){case kr:return 1;case qn:return 4;case vs:case Kr:return 16;case no:return 536870912;default:return 16}default:return 16}}var Cr=null,ql=null,co=null;function Pu(){if(co)return co;var e,t=ql,s=t.length,o,d="value"in Cr?Cr.value:Cr.textContent,f=d.length;for(e=0;e<s&&t[e]===d[e];e++);var v=s-e;for(o=1;o<=v&&t[s-o]===d[f-o];o++);return co=d.slice(e,1<o?1-o:void 0)}function uo(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 fo(){return!0}function Ou(){return!1}function yn(e){function t(s,o,d,f,v){this._reactName=s,this._targetInst=d,this.type=o,this.nativeEvent=f,this.target=v,this.currentTarget=null;for(var T in e)e.hasOwnProperty(T)&&(s=e[T],this[T]=s?s(f):f[T]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?fo:Ou,this.isPropagationStopped=Ou,this}return W(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=fo)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=fo)},persist:function(){},isPersistent:fo}),t}var Ss={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Kl=yn(Ss),ii=W({},Ss,{view:0,detail:0}),_m=yn(ii),Yl,Ql,oi,po=W({},ii,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Zl,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!==oi&&(oi&&e.type==="mousemove"?(Yl=e.screenX-oi.screenX,Ql=e.screenY-oi.screenY):Ql=Yl=0,oi=e),Yl)},movementY:function(e){return"movementY"in e?e.movementY:Ql}}),zu=yn(po),bm=W({},po,{dataTransfer:0}),jm=yn(bm),Rm=W({},ii,{relatedTarget:0}),Xl=yn(Rm),Dm=W({},Ss,{animationName:0,elapsedTime:0,pseudoElement:0}),Im=yn(Dm),Am=W({},Ss,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Mm=yn(Am),Lm=W({},Ss,{data:0}),$u=yn(Lm),Pm={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Om={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"},zm={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function $m(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=zm[e])?!!t[e]:!1}function Zl(){return $m}var Fm=W({},ii,{key:function(e){if(e.key){var t=Pm[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=uo(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Om[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Zl,charCode:function(e){return e.type==="keypress"?uo(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?uo(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Um=yn(Fm),Bm=W({},po,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Fu=yn(Bm),Wm=W({},ii,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Zl}),Hm=yn(Wm),Vm=W({},Ss,{propertyName:0,elapsedTime:0,pseudoElement:0}),Gm=yn(Vm),qm=W({},po,{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}),Km=yn(qm),Ym=[9,13,27,32],Jl=h&&"CompositionEvent"in window,li=null;h&&"documentMode"in document&&(li=document.documentMode);var Qm=h&&"TextEvent"in window&&!li,Uu=h&&(!Jl||li&&8<li&&11>=li),Bu=" ",Wu=!1;function Hu(e,t){switch(e){case"keyup":return Ym.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Vu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ts=!1;function Xm(e,t){switch(e){case"compositionend":return Vu(t);case"keypress":return t.which!==32?null:(Wu=!0,Bu);case"textInput":return e=t.data,e===Bu&&Wu?null:e;default:return null}}function Zm(e,t){if(Ts)return e==="compositionend"||!Jl&&Hu(e,t)?(e=Pu(),co=ql=Cr=null,Ts=!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 Uu&&t.locale!=="ko"?null:t.data;default:return null}}var Jm={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 Gu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Jm[e.type]:t==="textarea"}function qu(e,t,s,o){Ct(o),t=yo(t,"onChange"),0<t.length&&(s=new Kl("onChange","change",null,s,o),e.push({event:s,listeners:t}))}var ai=null,ci=null;function eg(e){dd(e,0)}function ho(e){var t=bs(e);if(Me(t))return e}function tg(e,t){if(e==="change")return t}var Ku=!1;if(h){var ea;if(h){var ta="oninput"in document;if(!ta){var Yu=document.createElement("div");Yu.setAttribute("oninput","return;"),ta=typeof Yu.oninput=="function"}ea=ta}else ea=!1;Ku=ea&&(!document.documentMode||9<document.documentMode)}function Qu(){ai&&(ai.detachEvent("onpropertychange",Xu),ci=ai=null)}function Xu(e){if(e.propertyName==="value"&&ho(ci)){var t=[];qu(t,ci,e,Nn(e)),qt(eg,t)}}function ng(e,t,s){e==="focusin"?(Qu(),ai=t,ci=s,ai.attachEvent("onpropertychange",Xu)):e==="focusout"&&Qu()}function rg(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ho(ci)}function sg(e,t){if(e==="click")return ho(t)}function ig(e,t){if(e==="input"||e==="change")return ho(t)}function og(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var On=typeof Object.is=="function"?Object.is:og;function ui(e,t){if(On(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var s=Object.keys(e),o=Object.keys(t);if(s.length!==o.length)return!1;for(o=0;o<s.length;o++){var d=s[o];if(!g.call(t,d)||!On(e[d],t[d]))return!1}return!0}function Zu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ju(e,t){var s=Zu(e);e=0;for(var o;s;){if(s.nodeType===3){if(o=e+s.textContent.length,e<=t&&o>=t)return{node:s,offset:t-e};e=o}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=Zu(s)}}function ed(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ed(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function td(){for(var e=window,t=Nt();t instanceof e.HTMLIFrameElement;){try{var s=typeof t.contentWindow.location.href=="string"}catch{s=!1}if(s)e=t.contentWindow;else break;t=Nt(e.document)}return t}function na(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 lg(e){var t=td(),s=e.focusedElem,o=e.selectionRange;if(t!==s&&s&&s.ownerDocument&&ed(s.ownerDocument.documentElement,s)){if(o!==null&&na(s)){if(t=o.start,e=o.end,e===void 0&&(e=t),"selectionStart"in s)s.selectionStart=t,s.selectionEnd=Math.min(e,s.value.length);else if(e=(t=s.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var d=s.textContent.length,f=Math.min(o.start,d);o=o.end===void 0?f:Math.min(o.end,d),!e.extend&&f>o&&(d=o,o=f,f=d),d=Ju(s,f);var v=Ju(s,o);d&&v&&(e.rangeCount!==1||e.anchorNode!==d.node||e.anchorOffset!==d.offset||e.focusNode!==v.node||e.focusOffset!==v.offset)&&(t=t.createRange(),t.setStart(d.node,d.offset),e.removeAllRanges(),f>o?(e.addRange(t),e.extend(v.node,v.offset)):(t.setEnd(v.node,v.offset),e.addRange(t)))}}for(t=[],e=s;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s<t.length;s++)e=t[s],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var ag=h&&"documentMode"in document&&11>=document.documentMode,Ns=null,ra=null,di=null,sa=!1;function nd(e,t,s){var o=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;sa||Ns==null||Ns!==Nt(o)||(o=Ns,"selectionStart"in o&&na(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),di&&ui(di,o)||(di=o,o=yo(ra,"onSelect"),0<o.length&&(t=new Kl("onSelect","select",null,t,s),e.push({event:t,listeners:o}),t.target=Ns)))}function mo(e,t){var s={};return s[e.toLowerCase()]=t.toLowerCase(),s["Webkit"+e]="webkit"+t,s["Moz"+e]="moz"+t,s}var Cs={animationend:mo("Animation","AnimationEnd"),animationiteration:mo("Animation","AnimationIteration"),animationstart:mo("Animation","AnimationStart"),transitionend:mo("Transition","TransitionEnd")},ia={},rd={};h&&(rd=document.createElement("div").style,"AnimationEvent"in window||(delete Cs.animationend.animation,delete Cs.animationiteration.animation,delete Cs.animationstart.animation),"TransitionEvent"in window||delete Cs.transitionend.transition);function go(e){if(ia[e])return ia[e];if(!Cs[e])return e;var t=Cs[e],s;for(s in t)if(t.hasOwnProperty(s)&&s in rd)return ia[e]=t[s];return e}var sd=go("animationend"),id=go("animationiteration"),od=go("animationstart"),ld=go("transitionend"),ad=new Map,cd="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 Er(e,t){ad.set(e,t),c(t,[e])}for(var oa=0;oa<cd.length;oa++){var la=cd[oa],cg=la.toLowerCase(),ug=la[0].toUpperCase()+la.slice(1);Er(cg,"on"+ug)}Er(sd,"onAnimationEnd"),Er(id,"onAnimationIteration"),Er(od,"onAnimationStart"),Er("dblclick","onDoubleClick"),Er("focusin","onFocus"),Er("focusout","onBlur"),Er(ld,"onTransitionEnd"),p("onMouseEnter",["mouseout","mouseover"]),p("onMouseLeave",["mouseout","mouseover"]),p("onPointerEnter",["pointerout","pointerover"]),p("onPointerLeave",["pointerout","pointerover"]),c("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),c("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),c("onBeforeInput",["compositionend","keypress","textInput","paste"]),c("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var fi="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(" "),dg=new Set("cancel close invalid load scroll toggle".split(" ").concat(fi));function ud(e,t,s){var o=e.type||"unknown-event";e.currentTarget=s,Bl(o,t,void 0,e),e.currentTarget=null}function dd(e,t){t=(t&4)!==0;for(var s=0;s<e.length;s++){var o=e[s],d=o.event;o=o.listeners;e:{var f=void 0;if(t)for(var v=o.length-1;0<=v;v--){var T=o[v],_=T.instance,z=T.currentTarget;if(T=T.listener,_!==f&&d.isPropagationStopped())break e;ud(d,T,z),f=_}else for(v=0;v<o.length;v++){if(T=o[v],_=T.instance,z=T.currentTarget,T=T.listener,_!==f&&d.isPropagationStopped())break e;ud(d,T,z),f=_}}}if(Ut)throw e=Ln,Ut=!1,Ln=null,e}function ut(e,t){var s=t[ma];s===void 0&&(s=t[ma]=new Set);var o=e+"__bubble";s.has(o)||(fd(t,e,2,!1),s.add(o))}function aa(e,t,s){var o=0;t&&(o|=4),fd(s,e,o,t)}var vo="_reactListening"+Math.random().toString(36).slice(2);function pi(e){if(!e[vo]){e[vo]=!0,l.forEach(function(s){s!=="selectionchange"&&(dg.has(s)||aa(s,!1,e),aa(s,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[vo]||(t[vo]=!0,aa("selectionchange",!1,t))}}function fd(e,t,s,o){switch(Lu(t)){case 1:var d=Cm;break;case 4:d=Em;break;default:d=Vl}s=d.bind(null,t,s,e),d=void 0,!Kt||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(d=!0),o?d!==void 0?e.addEventListener(t,s,{capture:!0,passive:d}):e.addEventListener(t,s,!0):d!==void 0?e.addEventListener(t,s,{passive:d}):e.addEventListener(t,s,!1)}function ca(e,t,s,o,d){var f=o;if((t&1)===0&&(t&2)===0&&o!==null)e:for(;;){if(o===null)return;var v=o.tag;if(v===3||v===4){var T=o.stateNode.containerInfo;if(T===d||T.nodeType===8&&T.parentNode===d)break;if(v===4)for(v=o.return;v!==null;){var _=v.tag;if((_===3||_===4)&&(_=v.stateNode.containerInfo,_===d||_.nodeType===8&&_.parentNode===d))return;v=v.return}for(;T!==null;){if(v=es(T),v===null)return;if(_=v.tag,_===5||_===6){o=f=v;continue e}T=T.parentNode}}o=o.return}qt(function(){var z=f,X=Nn(s),J=[];e:{var Q=ad.get(e);if(Q!==void 0){var ae=Kl,de=e;switch(e){case"keypress":if(uo(s)===0)break e;case"keydown":case"keyup":ae=Um;break;case"focusin":de="focus",ae=Xl;break;case"focusout":de="blur",ae=Xl;break;case"beforeblur":case"afterblur":ae=Xl;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ae=zu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ae=jm;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ae=Hm;break;case sd:case id:case od:ae=Im;break;case ld:ae=Gm;break;case"scroll":ae=_m;break;case"wheel":ae=Km;break;case"copy":case"cut":case"paste":ae=Mm;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ae=Fu}var pe=(t&4)!==0,Tt=!pe&&e==="scroll",A=pe?Q!==null?Q+"Capture":null:Q;pe=[];for(var j=z,M;j!==null;){M=j;var re=M.stateNode;if(M.tag===5&&re!==null&&(M=re,A!==null&&(re=rt(j,A),re!=null&&pe.push(hi(j,re,M)))),Tt)break;j=j.return}0<pe.length&&(Q=new ae(Q,de,null,s,X),J.push({event:Q,listeners:pe}))}}if((t&7)===0){e:{if(Q=e==="mouseover"||e==="pointerover",ae=e==="mouseout"||e==="pointerout",Q&&s!==Mn&&(de=s.relatedTarget||s.fromElement)&&(es(de)||de[lr]))break e;if((ae||Q)&&(Q=X.window===X?X:(Q=X.ownerDocument)?Q.defaultView||Q.parentWindow:window,ae?(de=s.relatedTarget||s.toElement,ae=z,de=de?es(de):null,de!==null&&(Tt=Qe(de),de!==Tt||de.tag!==5&&de.tag!==6)&&(de=null)):(ae=null,de=z),ae!==de)){if(pe=zu,re="onMouseLeave",A="onMouseEnter",j="mouse",(e==="pointerout"||e==="pointerover")&&(pe=Fu,re="onPointerLeave",A="onPointerEnter",j="pointer"),Tt=ae==null?Q:bs(ae),M=de==null?Q:bs(de),Q=new pe(re,j+"leave",ae,s,X),Q.target=Tt,Q.relatedTarget=M,re=null,es(X)===z&&(pe=new pe(A,j+"enter",de,s,X),pe.target=M,pe.relatedTarget=Tt,re=pe),Tt=re,ae&&de)t:{for(pe=ae,A=de,j=0,M=pe;M;M=Es(M))j++;for(M=0,re=A;re;re=Es(re))M++;for(;0<j-M;)pe=Es(pe),j--;for(;0<M-j;)A=Es(A),M--;for(;j--;){if(pe===A||A!==null&&pe===A.alternate)break t;pe=Es(pe),A=Es(A)}pe=null}else pe=null;ae!==null&&pd(J,Q,ae,pe,!1),de!==null&&Tt!==null&&pd(J,Tt,de,pe,!0)}}e:{if(Q=z?bs(z):window,ae=Q.nodeName&&Q.nodeName.toLowerCase(),ae==="select"||ae==="input"&&Q.type==="file")var ge=tg;else if(Gu(Q))if(Ku)ge=ig;else{ge=rg;var Ce=ng}else(ae=Q.nodeName)&&ae.toLowerCase()==="input"&&(Q.type==="checkbox"||Q.type==="radio")&&(ge=sg);if(ge&&(ge=ge(e,z))){qu(J,ge,s,X);break e}Ce&&Ce(e,Q,z),e==="focusout"&&(Ce=Q._wrapperState)&&Ce.controlled&&Q.type==="number"&&me(Q,"number",Q.value)}switch(Ce=z?bs(z):window,e){case"focusin":(Gu(Ce)||Ce.contentEditable==="true")&&(Ns=Ce,ra=z,di=null);break;case"focusout":di=ra=Ns=null;break;case"mousedown":sa=!0;break;case"contextmenu":case"mouseup":case"dragend":sa=!1,nd(J,s,X);break;case"selectionchange":if(ag)break;case"keydown":case"keyup":nd(J,s,X)}var Ee;if(Jl)e:{switch(e){case"compositionstart":var Re="onCompositionStart";break e;case"compositionend":Re="onCompositionEnd";break e;case"compositionupdate":Re="onCompositionUpdate";break e}Re=void 0}else Ts?Hu(e,s)&&(Re="onCompositionEnd"):e==="keydown"&&s.keyCode===229&&(Re="onCompositionStart");Re&&(Uu&&s.locale!=="ko"&&(Ts||Re!=="onCompositionStart"?Re==="onCompositionEnd"&&Ts&&(Ee=Pu()):(Cr=X,ql="value"in Cr?Cr.value:Cr.textContent,Ts=!0)),Ce=yo(z,Re),0<Ce.length&&(Re=new $u(Re,e,null,s,X),J.push({event:Re,listeners:Ce}),Ee?Re.data=Ee:(Ee=Vu(s),Ee!==null&&(Re.data=Ee)))),(Ee=Qm?Xm(e,s):Zm(e,s))&&(z=yo(z,"onBeforeInput"),0<z.length&&(X=new $u("onBeforeInput","beforeinput",null,s,X),J.push({event:X,listeners:z}),X.data=Ee))}dd(J,t)})}function hi(e,t,s){return{instance:e,listener:t,currentTarget:s}}function yo(e,t){for(var s=t+"Capture",o=[];e!==null;){var d=e,f=d.stateNode;d.tag===5&&f!==null&&(d=f,f=rt(e,s),f!=null&&o.unshift(hi(e,f,d)),f=rt(e,t),f!=null&&o.push(hi(e,f,d))),e=e.return}return o}function Es(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function pd(e,t,s,o,d){for(var f=t._reactName,v=[];s!==null&&s!==o;){var T=s,_=T.alternate,z=T.stateNode;if(_!==null&&_===o)break;T.tag===5&&z!==null&&(T=z,d?(_=rt(s,f),_!=null&&v.unshift(hi(s,_,T))):d||(_=rt(s,f),_!=null&&v.push(hi(s,_,T)))),s=s.return}v.length!==0&&e.push({event:t,listeners:v})}var fg=/\r\n?/g,pg=/\u0000|\uFFFD/g;function hd(e){return(typeof e=="string"?e:""+e).replace(fg,`
|
|
38
|
+
`).replace(pg,"")}function xo(e,t,s){if(t=hd(t),hd(e)!==t&&s)throw Error(i(425))}function wo(){}var ua=null,da=null;function fa(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 pa=typeof setTimeout=="function"?setTimeout:void 0,hg=typeof clearTimeout=="function"?clearTimeout:void 0,md=typeof Promise=="function"?Promise:void 0,mg=typeof queueMicrotask=="function"?queueMicrotask:typeof md<"u"?function(e){return md.resolve(null).then(e).catch(gg)}:pa;function gg(e){setTimeout(function(){throw e})}function ha(e,t){var s=t,o=0;do{var d=s.nextSibling;if(e.removeChild(s),d&&d.nodeType===8)if(s=d.data,s==="/$"){if(o===0){e.removeChild(d),si(t);return}o--}else s!=="$"&&s!=="$?"&&s!=="$!"||o++;s=d}while(s);si(t)}function _r(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 gd(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var s=e.data;if(s==="$"||s==="$!"||s==="$?"){if(t===0)return e;t--}else s==="/$"&&t++}e=e.previousSibling}return null}var _s=Math.random().toString(36).slice(2),Kn="__reactFiber$"+_s,mi="__reactProps$"+_s,lr="__reactContainer$"+_s,ma="__reactEvents$"+_s,vg="__reactListeners$"+_s,yg="__reactHandles$"+_s;function es(e){var t=e[Kn];if(t)return t;for(var s=e.parentNode;s;){if(t=s[lr]||s[Kn]){if(s=t.alternate,t.child!==null||s!==null&&s.child!==null)for(e=gd(e);e!==null;){if(s=e[Kn])return s;e=gd(e)}return t}e=s,s=e.parentNode}return null}function gi(e){return e=e[Kn]||e[lr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function bs(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(i(33))}function ko(e){return e[mi]||null}var ga=[],js=-1;function br(e){return{current:e}}function dt(e){0>js||(e.current=ga[js],ga[js]=null,js--)}function lt(e,t){js++,ga[js]=e.current,e.current=t}var jr={},Yt=br(jr),un=br(!1),ts=jr;function Rs(e,t){var s=e.type.contextTypes;if(!s)return jr;var o=e.stateNode;if(o&&o.__reactInternalMemoizedUnmaskedChildContext===t)return o.__reactInternalMemoizedMaskedChildContext;var d={},f;for(f in s)d[f]=t[f];return o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=d),d}function dn(e){return e=e.childContextTypes,e!=null}function So(){dt(un),dt(Yt)}function vd(e,t,s){if(Yt.current!==jr)throw Error(i(168));lt(Yt,t),lt(un,s)}function yd(e,t,s){var o=e.stateNode;if(t=t.childContextTypes,typeof o.getChildContext!="function")return s;o=o.getChildContext();for(var d in o)if(!(d in t))throw Error(i(108,Pe(e)||"Unknown",d));return W({},s,o)}function To(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||jr,ts=Yt.current,lt(Yt,e),lt(un,un.current),!0}function xd(e,t,s){var o=e.stateNode;if(!o)throw Error(i(169));s?(e=yd(e,t,ts),o.__reactInternalMemoizedMergedChildContext=e,dt(un),dt(Yt),lt(Yt,e)):dt(un),lt(un,s)}var ar=null,No=!1,va=!1;function wd(e){ar===null?ar=[e]:ar.push(e)}function xg(e){No=!0,wd(e)}function Rr(){if(!va&&ar!==null){va=!0;var e=0,t=Ve;try{var s=ar;for(Ve=1;e<s.length;e++){var o=s[e];do o=o(!0);while(o!==null)}ar=null,No=!1}catch(d){throw ar!==null&&(ar=ar.slice(e+1)),Zs(kr,Rr),d}finally{Ve=t,va=!1}}return null}var Ds=[],Is=0,Co=null,Eo=0,En=[],_n=0,ns=null,cr=1,ur="";function rs(e,t){Ds[Is++]=Eo,Ds[Is++]=Co,Co=e,Eo=t}function kd(e,t,s){En[_n++]=cr,En[_n++]=ur,En[_n++]=ns,ns=e;var o=cr;e=ur;var d=32-tn(o)-1;o&=~(1<<d),s+=1;var f=32-tn(t)+d;if(30<f){var v=d-d%5;f=(o&(1<<v)-1).toString(32),o>>=v,d-=v,cr=1<<32-tn(t)+d|s<<d|o,ur=f+e}else cr=1<<f|s<<d|o,ur=e}function ya(e){e.return!==null&&(rs(e,1),kd(e,1,0))}function xa(e){for(;e===Co;)Co=Ds[--Is],Ds[Is]=null,Eo=Ds[--Is],Ds[Is]=null;for(;e===ns;)ns=En[--_n],En[_n]=null,ur=En[--_n],En[_n]=null,cr=En[--_n],En[_n]=null}var xn=null,wn=null,ft=!1,zn=null;function Sd(e,t){var s=Dn(5,null,null,0);s.elementType="DELETED",s.stateNode=t,s.return=e,t=e.deletions,t===null?(e.deletions=[s],e.flags|=16):t.push(s)}function Td(e,t){switch(e.tag){case 5:var s=e.type;return t=t.nodeType!==1||s.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,xn=e,wn=_r(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,xn=e,wn=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(s=ns!==null?{id:cr,overflow:ur}:null,e.memoizedState={dehydrated:t,treeContext:s,retryLane:1073741824},s=Dn(18,null,null,0),s.stateNode=t,s.return=e,e.child=s,xn=e,wn=null,!0):!1;default:return!1}}function wa(e){return(e.mode&1)!==0&&(e.flags&128)===0}function ka(e){if(ft){var t=wn;if(t){var s=t;if(!Td(e,t)){if(wa(e))throw Error(i(418));t=_r(s.nextSibling);var o=xn;t&&Td(e,t)?Sd(o,s):(e.flags=e.flags&-4097|2,ft=!1,xn=e)}}else{if(wa(e))throw Error(i(418));e.flags=e.flags&-4097|2,ft=!1,xn=e}}}function Nd(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;xn=e}function _o(e){if(e!==xn)return!1;if(!ft)return Nd(e),ft=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!fa(e.type,e.memoizedProps)),t&&(t=wn)){if(wa(e))throw Cd(),Error(i(418));for(;t;)Sd(e,t),t=_r(t.nextSibling)}if(Nd(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var s=e.data;if(s==="/$"){if(t===0){wn=_r(e.nextSibling);break e}t--}else s!=="$"&&s!=="$!"&&s!=="$?"||t++}e=e.nextSibling}wn=null}}else wn=xn?_r(e.stateNode.nextSibling):null;return!0}function Cd(){for(var e=wn;e;)e=_r(e.nextSibling)}function As(){wn=xn=null,ft=!1}function Sa(e){zn===null?zn=[e]:zn.push(e)}var wg=O.ReactCurrentBatchConfig;function vi(e,t,s){if(e=s.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(s._owner){if(s=s._owner,s){if(s.tag!==1)throw Error(i(309));var o=s.stateNode}if(!o)throw Error(i(147,e));var d=o,f=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===f?t.ref:(t=function(v){var T=d.refs;v===null?delete T[f]:T[f]=v},t._stringRef=f,t)}if(typeof e!="string")throw Error(i(284));if(!s._owner)throw Error(i(290,e))}return e}function bo(e,t){throw e=Object.prototype.toString.call(t),Error(i(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Ed(e){var t=e._init;return t(e._payload)}function _d(e){function t(A,j){if(e){var M=A.deletions;M===null?(A.deletions=[j],A.flags|=16):M.push(j)}}function s(A,j){if(!e)return null;for(;j!==null;)t(A,j),j=j.sibling;return null}function o(A,j){for(A=new Map;j!==null;)j.key!==null?A.set(j.key,j):A.set(j.index,j),j=j.sibling;return A}function d(A,j){return A=zr(A,j),A.index=0,A.sibling=null,A}function f(A,j,M){return A.index=M,e?(M=A.alternate,M!==null?(M=M.index,M<j?(A.flags|=2,j):M):(A.flags|=2,j)):(A.flags|=1048576,j)}function v(A){return e&&A.alternate===null&&(A.flags|=2),A}function T(A,j,M,re){return j===null||j.tag!==6?(j=pc(M,A.mode,re),j.return=A,j):(j=d(j,M),j.return=A,j)}function _(A,j,M,re){var ge=M.type;return ge===Z?X(A,j,M.props.children,re,M.key):j!==null&&(j.elementType===ge||typeof ge=="object"&&ge!==null&&ge.$$typeof===xe&&Ed(ge)===j.type)?(re=d(j,M.props),re.ref=vi(A,j,M),re.return=A,re):(re=Zo(M.type,M.key,M.props,null,A.mode,re),re.ref=vi(A,j,M),re.return=A,re)}function z(A,j,M,re){return j===null||j.tag!==4||j.stateNode.containerInfo!==M.containerInfo||j.stateNode.implementation!==M.implementation?(j=hc(M,A.mode,re),j.return=A,j):(j=d(j,M.children||[]),j.return=A,j)}function X(A,j,M,re,ge){return j===null||j.tag!==7?(j=ds(M,A.mode,re,ge),j.return=A,j):(j=d(j,M),j.return=A,j)}function J(A,j,M){if(typeof j=="string"&&j!==""||typeof j=="number")return j=pc(""+j,A.mode,M),j.return=A,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case B:return M=Zo(j.type,j.key,j.props,null,A.mode,M),M.ref=vi(A,null,j),M.return=A,M;case ee:return j=hc(j,A.mode,M),j.return=A,j;case xe:var re=j._init;return J(A,re(j._payload),M)}if(Fe(j)||V(j))return j=ds(j,A.mode,M,null),j.return=A,j;bo(A,j)}return null}function Q(A,j,M,re){var ge=j!==null?j.key:null;if(typeof M=="string"&&M!==""||typeof M=="number")return ge!==null?null:T(A,j,""+M,re);if(typeof M=="object"&&M!==null){switch(M.$$typeof){case B:return M.key===ge?_(A,j,M,re):null;case ee:return M.key===ge?z(A,j,M,re):null;case xe:return ge=M._init,Q(A,j,ge(M._payload),re)}if(Fe(M)||V(M))return ge!==null?null:X(A,j,M,re,null);bo(A,M)}return null}function ae(A,j,M,re,ge){if(typeof re=="string"&&re!==""||typeof re=="number")return A=A.get(M)||null,T(j,A,""+re,ge);if(typeof re=="object"&&re!==null){switch(re.$$typeof){case B:return A=A.get(re.key===null?M:re.key)||null,_(j,A,re,ge);case ee:return A=A.get(re.key===null?M:re.key)||null,z(j,A,re,ge);case xe:var Ce=re._init;return ae(A,j,M,Ce(re._payload),ge)}if(Fe(re)||V(re))return A=A.get(M)||null,X(j,A,re,ge,null);bo(j,re)}return null}function de(A,j,M,re){for(var ge=null,Ce=null,Ee=j,Re=j=0,Ot=null;Ee!==null&&Re<M.length;Re++){Ee.index>Re?(Ot=Ee,Ee=null):Ot=Ee.sibling;var Ye=Q(A,Ee,M[Re],re);if(Ye===null){Ee===null&&(Ee=Ot);break}e&&Ee&&Ye.alternate===null&&t(A,Ee),j=f(Ye,j,Re),Ce===null?ge=Ye:Ce.sibling=Ye,Ce=Ye,Ee=Ot}if(Re===M.length)return s(A,Ee),ft&&rs(A,Re),ge;if(Ee===null){for(;Re<M.length;Re++)Ee=J(A,M[Re],re),Ee!==null&&(j=f(Ee,j,Re),Ce===null?ge=Ee:Ce.sibling=Ee,Ce=Ee);return ft&&rs(A,Re),ge}for(Ee=o(A,Ee);Re<M.length;Re++)Ot=ae(Ee,A,Re,M[Re],re),Ot!==null&&(e&&Ot.alternate!==null&&Ee.delete(Ot.key===null?Re:Ot.key),j=f(Ot,j,Re),Ce===null?ge=Ot:Ce.sibling=Ot,Ce=Ot);return e&&Ee.forEach(function($r){return t(A,$r)}),ft&&rs(A,Re),ge}function pe(A,j,M,re){var ge=V(M);if(typeof ge!="function")throw Error(i(150));if(M=ge.call(M),M==null)throw Error(i(151));for(var Ce=ge=null,Ee=j,Re=j=0,Ot=null,Ye=M.next();Ee!==null&&!Ye.done;Re++,Ye=M.next()){Ee.index>Re?(Ot=Ee,Ee=null):Ot=Ee.sibling;var $r=Q(A,Ee,Ye.value,re);if($r===null){Ee===null&&(Ee=Ot);break}e&&Ee&&$r.alternate===null&&t(A,Ee),j=f($r,j,Re),Ce===null?ge=$r:Ce.sibling=$r,Ce=$r,Ee=Ot}if(Ye.done)return s(A,Ee),ft&&rs(A,Re),ge;if(Ee===null){for(;!Ye.done;Re++,Ye=M.next())Ye=J(A,Ye.value,re),Ye!==null&&(j=f(Ye,j,Re),Ce===null?ge=Ye:Ce.sibling=Ye,Ce=Ye);return ft&&rs(A,Re),ge}for(Ee=o(A,Ee);!Ye.done;Re++,Ye=M.next())Ye=ae(Ee,A,Re,Ye.value,re),Ye!==null&&(e&&Ye.alternate!==null&&Ee.delete(Ye.key===null?Re:Ye.key),j=f(Ye,j,Re),Ce===null?ge=Ye:Ce.sibling=Ye,Ce=Ye);return e&&Ee.forEach(function(Jg){return t(A,Jg)}),ft&&rs(A,Re),ge}function Tt(A,j,M,re){if(typeof M=="object"&&M!==null&&M.type===Z&&M.key===null&&(M=M.props.children),typeof M=="object"&&M!==null){switch(M.$$typeof){case B:e:{for(var ge=M.key,Ce=j;Ce!==null;){if(Ce.key===ge){if(ge=M.type,ge===Z){if(Ce.tag===7){s(A,Ce.sibling),j=d(Ce,M.props.children),j.return=A,A=j;break e}}else if(Ce.elementType===ge||typeof ge=="object"&&ge!==null&&ge.$$typeof===xe&&Ed(ge)===Ce.type){s(A,Ce.sibling),j=d(Ce,M.props),j.ref=vi(A,Ce,M),j.return=A,A=j;break e}s(A,Ce);break}else t(A,Ce);Ce=Ce.sibling}M.type===Z?(j=ds(M.props.children,A.mode,re,M.key),j.return=A,A=j):(re=Zo(M.type,M.key,M.props,null,A.mode,re),re.ref=vi(A,j,M),re.return=A,A=re)}return v(A);case ee:e:{for(Ce=M.key;j!==null;){if(j.key===Ce)if(j.tag===4&&j.stateNode.containerInfo===M.containerInfo&&j.stateNode.implementation===M.implementation){s(A,j.sibling),j=d(j,M.children||[]),j.return=A,A=j;break e}else{s(A,j);break}else t(A,j);j=j.sibling}j=hc(M,A.mode,re),j.return=A,A=j}return v(A);case xe:return Ce=M._init,Tt(A,j,Ce(M._payload),re)}if(Fe(M))return de(A,j,M,re);if(V(M))return pe(A,j,M,re);bo(A,M)}return typeof M=="string"&&M!==""||typeof M=="number"?(M=""+M,j!==null&&j.tag===6?(s(A,j.sibling),j=d(j,M),j.return=A,A=j):(s(A,j),j=pc(M,A.mode,re),j.return=A,A=j),v(A)):s(A,j)}return Tt}var Ms=_d(!0),bd=_d(!1),jo=br(null),Ro=null,Ls=null,Ta=null;function Na(){Ta=Ls=Ro=null}function Ca(e){var t=jo.current;dt(jo),e._currentValue=t}function Ea(e,t,s){for(;e!==null;){var o=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,o!==null&&(o.childLanes|=t)):o!==null&&(o.childLanes&t)!==t&&(o.childLanes|=t),e===s)break;e=e.return}}function Ps(e,t){Ro=e,Ta=Ls=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(fn=!0),e.firstContext=null)}function bn(e){var t=e._currentValue;if(Ta!==e)if(e={context:e,memoizedValue:t,next:null},Ls===null){if(Ro===null)throw Error(i(308));Ls=e,Ro.dependencies={lanes:0,firstContext:e}}else Ls=Ls.next=e;return t}var ss=null;function _a(e){ss===null?ss=[e]:ss.push(e)}function jd(e,t,s,o){var d=t.interleaved;return d===null?(s.next=s,_a(t)):(s.next=d.next,d.next=s),t.interleaved=s,dr(e,o)}function dr(e,t){e.lanes|=t;var s=e.alternate;for(s!==null&&(s.lanes|=t),s=e,e=e.return;e!==null;)e.childLanes|=t,s=e.alternate,s!==null&&(s.childLanes|=t),s=e,e=e.return;return s.tag===3?s.stateNode:null}var Dr=!1;function ba(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Rd(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 fr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ir(e,t,s){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(qe&2)!==0){var d=o.pending;return d===null?t.next=t:(t.next=d.next,d.next=t),o.pending=t,dr(e,s)}return d=o.interleaved,d===null?(t.next=t,_a(o)):(t.next=d.next,d.next=t),o.interleaved=t,dr(e,s)}function Do(e,t,s){if(t=t.updateQueue,t!==null&&(t=t.shared,(s&4194240)!==0)){var o=t.lanes;o&=e.pendingLanes,s|=o,t.lanes=s,Tr(e,s)}}function Dd(e,t){var s=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,s===o)){var d=null,f=null;if(s=s.firstBaseUpdate,s!==null){do{var v={eventTime:s.eventTime,lane:s.lane,tag:s.tag,payload:s.payload,callback:s.callback,next:null};f===null?d=f=v:f=f.next=v,s=s.next}while(s!==null);f===null?d=f=t:f=f.next=t}else d=f=t;s={baseState:o.baseState,firstBaseUpdate:d,lastBaseUpdate:f,shared:o.shared,effects:o.effects},e.updateQueue=s;return}e=s.lastBaseUpdate,e===null?s.firstBaseUpdate=t:e.next=t,s.lastBaseUpdate=t}function Io(e,t,s,o){var d=e.updateQueue;Dr=!1;var f=d.firstBaseUpdate,v=d.lastBaseUpdate,T=d.shared.pending;if(T!==null){d.shared.pending=null;var _=T,z=_.next;_.next=null,v===null?f=z:v.next=z,v=_;var X=e.alternate;X!==null&&(X=X.updateQueue,T=X.lastBaseUpdate,T!==v&&(T===null?X.firstBaseUpdate=z:T.next=z,X.lastBaseUpdate=_))}if(f!==null){var J=d.baseState;v=0,X=z=_=null,T=f;do{var Q=T.lane,ae=T.eventTime;if((o&Q)===Q){X!==null&&(X=X.next={eventTime:ae,lane:0,tag:T.tag,payload:T.payload,callback:T.callback,next:null});e:{var de=e,pe=T;switch(Q=t,ae=s,pe.tag){case 1:if(de=pe.payload,typeof de=="function"){J=de.call(ae,J,Q);break e}J=de;break e;case 3:de.flags=de.flags&-65537|128;case 0:if(de=pe.payload,Q=typeof de=="function"?de.call(ae,J,Q):de,Q==null)break e;J=W({},J,Q);break e;case 2:Dr=!0}}T.callback!==null&&T.lane!==0&&(e.flags|=64,Q=d.effects,Q===null?d.effects=[T]:Q.push(T))}else ae={eventTime:ae,lane:Q,tag:T.tag,payload:T.payload,callback:T.callback,next:null},X===null?(z=X=ae,_=J):X=X.next=ae,v|=Q;if(T=T.next,T===null){if(T=d.shared.pending,T===null)break;Q=T,T=Q.next,Q.next=null,d.lastBaseUpdate=Q,d.shared.pending=null}}while(!0);if(X===null&&(_=J),d.baseState=_,d.firstBaseUpdate=z,d.lastBaseUpdate=X,t=d.shared.interleaved,t!==null){d=t;do v|=d.lane,d=d.next;while(d!==t)}else f===null&&(d.shared.lanes=0);ls|=v,e.lanes=v,e.memoizedState=J}}function Id(e,t,s){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var o=e[t],d=o.callback;if(d!==null){if(o.callback=null,o=s,typeof d!="function")throw Error(i(191,d));d.call(o)}}}var yi={},Yn=br(yi),xi=br(yi),wi=br(yi);function is(e){if(e===yi)throw Error(i(174));return e}function ja(e,t){switch(lt(wi,t),lt(xi,e),lt(Yn,yi),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:et(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=et(t,e)}dt(Yn),lt(Yn,t)}function Os(){dt(Yn),dt(xi),dt(wi)}function Ad(e){is(wi.current);var t=is(Yn.current),s=et(t,e.type);t!==s&&(lt(xi,e),lt(Yn,s))}function Ra(e){xi.current===e&&(dt(Yn),dt(xi))}var vt=br(0);function Ao(e){for(var t=e;t!==null;){if(t.tag===13){var s=t.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||s.data==="$?"||s.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)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 Da=[];function Ia(){for(var e=0;e<Da.length;e++)Da[e]._workInProgressVersionPrimary=null;Da.length=0}var Mo=O.ReactCurrentDispatcher,Aa=O.ReactCurrentBatchConfig,os=0,yt=null,Dt=null,Lt=null,Lo=!1,ki=!1,Si=0,kg=0;function Qt(){throw Error(i(321))}function Ma(e,t){if(t===null)return!1;for(var s=0;s<t.length&&s<e.length;s++)if(!On(e[s],t[s]))return!1;return!0}function La(e,t,s,o,d,f){if(os=f,yt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Mo.current=e===null||e.memoizedState===null?Cg:Eg,e=s(o,d),ki){f=0;do{if(ki=!1,Si=0,25<=f)throw Error(i(301));f+=1,Lt=Dt=null,t.updateQueue=null,Mo.current=_g,e=s(o,d)}while(ki)}if(Mo.current=zo,t=Dt!==null&&Dt.next!==null,os=0,Lt=Dt=yt=null,Lo=!1,t)throw Error(i(300));return e}function Pa(){var e=Si!==0;return Si=0,e}function Qn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Lt===null?yt.memoizedState=Lt=e:Lt=Lt.next=e,Lt}function jn(){if(Dt===null){var e=yt.alternate;e=e!==null?e.memoizedState:null}else e=Dt.next;var t=Lt===null?yt.memoizedState:Lt.next;if(t!==null)Lt=t,Dt=e;else{if(e===null)throw Error(i(310));Dt=e,e={memoizedState:Dt.memoizedState,baseState:Dt.baseState,baseQueue:Dt.baseQueue,queue:Dt.queue,next:null},Lt===null?yt.memoizedState=Lt=e:Lt=Lt.next=e}return Lt}function Ti(e,t){return typeof t=="function"?t(e):t}function Oa(e){var t=jn(),s=t.queue;if(s===null)throw Error(i(311));s.lastRenderedReducer=e;var o=Dt,d=o.baseQueue,f=s.pending;if(f!==null){if(d!==null){var v=d.next;d.next=f.next,f.next=v}o.baseQueue=d=f,s.pending=null}if(d!==null){f=d.next,o=o.baseState;var T=v=null,_=null,z=f;do{var X=z.lane;if((os&X)===X)_!==null&&(_=_.next={lane:0,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null}),o=z.hasEagerState?z.eagerState:e(o,z.action);else{var J={lane:X,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null};_===null?(T=_=J,v=o):_=_.next=J,yt.lanes|=X,ls|=X}z=z.next}while(z!==null&&z!==f);_===null?v=o:_.next=T,On(o,t.memoizedState)||(fn=!0),t.memoizedState=o,t.baseState=v,t.baseQueue=_,s.lastRenderedState=o}if(e=s.interleaved,e!==null){d=e;do f=d.lane,yt.lanes|=f,ls|=f,d=d.next;while(d!==e)}else d===null&&(s.lanes=0);return[t.memoizedState,s.dispatch]}function za(e){var t=jn(),s=t.queue;if(s===null)throw Error(i(311));s.lastRenderedReducer=e;var o=s.dispatch,d=s.pending,f=t.memoizedState;if(d!==null){s.pending=null;var v=d=d.next;do f=e(f,v.action),v=v.next;while(v!==d);On(f,t.memoizedState)||(fn=!0),t.memoizedState=f,t.baseQueue===null&&(t.baseState=f),s.lastRenderedState=f}return[f,o]}function Md(){}function Ld(e,t){var s=yt,o=jn(),d=t(),f=!On(o.memoizedState,d);if(f&&(o.memoizedState=d,fn=!0),o=o.queue,$a(zd.bind(null,s,o,e),[e]),o.getSnapshot!==t||f||Lt!==null&&Lt.memoizedState.tag&1){if(s.flags|=2048,Ni(9,Od.bind(null,s,o,d,t),void 0,null),Pt===null)throw Error(i(349));(os&30)!==0||Pd(s,t,d)}return d}function Pd(e,t,s){e.flags|=16384,e={getSnapshot:t,value:s},t=yt.updateQueue,t===null?(t={lastEffect:null,stores:null},yt.updateQueue=t,t.stores=[e]):(s=t.stores,s===null?t.stores=[e]:s.push(e))}function Od(e,t,s,o){t.value=s,t.getSnapshot=o,$d(t)&&Fd(e)}function zd(e,t,s){return s(function(){$d(t)&&Fd(e)})}function $d(e){var t=e.getSnapshot;e=e.value;try{var s=t();return!On(e,s)}catch{return!0}}function Fd(e){var t=dr(e,1);t!==null&&Bn(t,e,1,-1)}function Ud(e){var t=Qn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ti,lastRenderedState:e},t.queue=e,e=e.dispatch=Ng.bind(null,yt,e),[t.memoizedState,e]}function Ni(e,t,s,o){return e={tag:e,create:t,destroy:s,deps:o,next:null},t=yt.updateQueue,t===null?(t={lastEffect:null,stores:null},yt.updateQueue=t,t.lastEffect=e.next=e):(s=t.lastEffect,s===null?t.lastEffect=e.next=e:(o=s.next,s.next=e,e.next=o,t.lastEffect=e)),e}function Bd(){return jn().memoizedState}function Po(e,t,s,o){var d=Qn();yt.flags|=e,d.memoizedState=Ni(1|t,s,void 0,o===void 0?null:o)}function Oo(e,t,s,o){var d=jn();o=o===void 0?null:o;var f=void 0;if(Dt!==null){var v=Dt.memoizedState;if(f=v.destroy,o!==null&&Ma(o,v.deps)){d.memoizedState=Ni(t,s,f,o);return}}yt.flags|=e,d.memoizedState=Ni(1|t,s,f,o)}function Wd(e,t){return Po(8390656,8,e,t)}function $a(e,t){return Oo(2048,8,e,t)}function Hd(e,t){return Oo(4,2,e,t)}function Vd(e,t){return Oo(4,4,e,t)}function Gd(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 qd(e,t,s){return s=s!=null?s.concat([e]):null,Oo(4,4,Gd.bind(null,t,e),s)}function Fa(){}function Kd(e,t){var s=jn();t=t===void 0?null:t;var o=s.memoizedState;return o!==null&&t!==null&&Ma(t,o[1])?o[0]:(s.memoizedState=[e,t],e)}function Yd(e,t){var s=jn();t=t===void 0?null:t;var o=s.memoizedState;return o!==null&&t!==null&&Ma(t,o[1])?o[0]:(e=e(),s.memoizedState=[e,t],e)}function Qd(e,t,s){return(os&21)===0?(e.baseState&&(e.baseState=!1,fn=!0),e.memoizedState=s):(On(s,t)||(s=ei(),yt.lanes|=s,ls|=s,e.baseState=!0),t)}function Sg(e,t){var s=Ve;Ve=s!==0&&4>s?s:4,e(!0);var o=Aa.transition;Aa.transition={};try{e(!1),t()}finally{Ve=s,Aa.transition=o}}function Xd(){return jn().memoizedState}function Tg(e,t,s){var o=Pr(e);if(s={lane:o,action:s,hasEagerState:!1,eagerState:null,next:null},Zd(e))Jd(t,s);else if(s=jd(e,t,s,o),s!==null){var d=sn();Bn(s,e,o,d),ef(s,t,o)}}function Ng(e,t,s){var o=Pr(e),d={lane:o,action:s,hasEagerState:!1,eagerState:null,next:null};if(Zd(e))Jd(t,d);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=t.lastRenderedReducer,f!==null))try{var v=t.lastRenderedState,T=f(v,s);if(d.hasEagerState=!0,d.eagerState=T,On(T,v)){var _=t.interleaved;_===null?(d.next=d,_a(t)):(d.next=_.next,_.next=d),t.interleaved=d;return}}catch{}finally{}s=jd(e,t,d,o),s!==null&&(d=sn(),Bn(s,e,o,d),ef(s,t,o))}}function Zd(e){var t=e.alternate;return e===yt||t!==null&&t===yt}function Jd(e,t){ki=Lo=!0;var s=e.pending;s===null?t.next=t:(t.next=s.next,s.next=t),e.pending=t}function ef(e,t,s){if((s&4194240)!==0){var o=t.lanes;o&=e.pendingLanes,s|=o,t.lanes=s,Tr(e,s)}}var zo={readContext:bn,useCallback:Qt,useContext:Qt,useEffect:Qt,useImperativeHandle:Qt,useInsertionEffect:Qt,useLayoutEffect:Qt,useMemo:Qt,useReducer:Qt,useRef:Qt,useState:Qt,useDebugValue:Qt,useDeferredValue:Qt,useTransition:Qt,useMutableSource:Qt,useSyncExternalStore:Qt,useId:Qt,unstable_isNewReconciler:!1},Cg={readContext:bn,useCallback:function(e,t){return Qn().memoizedState=[e,t===void 0?null:t],e},useContext:bn,useEffect:Wd,useImperativeHandle:function(e,t,s){return s=s!=null?s.concat([e]):null,Po(4194308,4,Gd.bind(null,t,e),s)},useLayoutEffect:function(e,t){return Po(4194308,4,e,t)},useInsertionEffect:function(e,t){return Po(4,2,e,t)},useMemo:function(e,t){var s=Qn();return t=t===void 0?null:t,e=e(),s.memoizedState=[e,t],e},useReducer:function(e,t,s){var o=Qn();return t=s!==void 0?s(t):t,o.memoizedState=o.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},o.queue=e,e=e.dispatch=Tg.bind(null,yt,e),[o.memoizedState,e]},useRef:function(e){var t=Qn();return e={current:e},t.memoizedState=e},useState:Ud,useDebugValue:Fa,useDeferredValue:function(e){return Qn().memoizedState=e},useTransition:function(){var e=Ud(!1),t=e[0];return e=Sg.bind(null,e[1]),Qn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,s){var o=yt,d=Qn();if(ft){if(s===void 0)throw Error(i(407));s=s()}else{if(s=t(),Pt===null)throw Error(i(349));(os&30)!==0||Pd(o,t,s)}d.memoizedState=s;var f={value:s,getSnapshot:t};return d.queue=f,Wd(zd.bind(null,o,f,e),[e]),o.flags|=2048,Ni(9,Od.bind(null,o,f,s,t),void 0,null),s},useId:function(){var e=Qn(),t=Pt.identifierPrefix;if(ft){var s=ur,o=cr;s=(o&~(1<<32-tn(o)-1)).toString(32)+s,t=":"+t+"R"+s,s=Si++,0<s&&(t+="H"+s.toString(32)),t+=":"}else s=kg++,t=":"+t+"r"+s.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Eg={readContext:bn,useCallback:Kd,useContext:bn,useEffect:$a,useImperativeHandle:qd,useInsertionEffect:Hd,useLayoutEffect:Vd,useMemo:Yd,useReducer:Oa,useRef:Bd,useState:function(){return Oa(Ti)},useDebugValue:Fa,useDeferredValue:function(e){var t=jn();return Qd(t,Dt.memoizedState,e)},useTransition:function(){var e=Oa(Ti)[0],t=jn().memoizedState;return[e,t]},useMutableSource:Md,useSyncExternalStore:Ld,useId:Xd,unstable_isNewReconciler:!1},_g={readContext:bn,useCallback:Kd,useContext:bn,useEffect:$a,useImperativeHandle:qd,useInsertionEffect:Hd,useLayoutEffect:Vd,useMemo:Yd,useReducer:za,useRef:Bd,useState:function(){return za(Ti)},useDebugValue:Fa,useDeferredValue:function(e){var t=jn();return Dt===null?t.memoizedState=e:Qd(t,Dt.memoizedState,e)},useTransition:function(){var e=za(Ti)[0],t=jn().memoizedState;return[e,t]},useMutableSource:Md,useSyncExternalStore:Ld,useId:Xd,unstable_isNewReconciler:!1};function $n(e,t){if(e&&e.defaultProps){t=W({},t),e=e.defaultProps;for(var s in e)t[s]===void 0&&(t[s]=e[s]);return t}return t}function Ua(e,t,s,o){t=e.memoizedState,s=s(o,t),s=s==null?t:W({},t,s),e.memoizedState=s,e.lanes===0&&(e.updateQueue.baseState=s)}var $o={isMounted:function(e){return(e=e._reactInternals)?Qe(e)===e:!1},enqueueSetState:function(e,t,s){e=e._reactInternals;var o=sn(),d=Pr(e),f=fr(o,d);f.payload=t,s!=null&&(f.callback=s),t=Ir(e,f,d),t!==null&&(Bn(t,e,d,o),Do(t,e,d))},enqueueReplaceState:function(e,t,s){e=e._reactInternals;var o=sn(),d=Pr(e),f=fr(o,d);f.tag=1,f.payload=t,s!=null&&(f.callback=s),t=Ir(e,f,d),t!==null&&(Bn(t,e,d,o),Do(t,e,d))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var s=sn(),o=Pr(e),d=fr(s,o);d.tag=2,t!=null&&(d.callback=t),t=Ir(e,d,o),t!==null&&(Bn(t,e,o,s),Do(t,e,o))}};function tf(e,t,s,o,d,f,v){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,f,v):t.prototype&&t.prototype.isPureReactComponent?!ui(s,o)||!ui(d,f):!0}function nf(e,t,s){var o=!1,d=jr,f=t.contextType;return typeof f=="object"&&f!==null?f=bn(f):(d=dn(t)?ts:Yt.current,o=t.contextTypes,f=(o=o!=null)?Rs(e,d):jr),t=new t(s,f),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=$o,e.stateNode=t,t._reactInternals=e,o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=d,e.__reactInternalMemoizedMaskedChildContext=f),t}function rf(e,t,s,o){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(s,o),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(s,o),t.state!==e&&$o.enqueueReplaceState(t,t.state,null)}function Ba(e,t,s,o){var d=e.stateNode;d.props=s,d.state=e.memoizedState,d.refs={},ba(e);var f=t.contextType;typeof f=="object"&&f!==null?d.context=bn(f):(f=dn(t)?ts:Yt.current,d.context=Rs(e,f)),d.state=e.memoizedState,f=t.getDerivedStateFromProps,typeof f=="function"&&(Ua(e,t,f,s),d.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(t=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),t!==d.state&&$o.enqueueReplaceState(d,d.state,null),Io(e,s,d,o),d.state=e.memoizedState),typeof d.componentDidMount=="function"&&(e.flags|=4194308)}function zs(e,t){try{var s="",o=t;do s+=_e(o),o=o.return;while(o);var d=s}catch(f){d=`
|
|
39
|
+
Error generating stack: `+f.message+`
|
|
40
|
+
`+f.stack}return{value:e,source:t,stack:d,digest:null}}function Wa(e,t,s){return{value:e,source:null,stack:s??null,digest:t??null}}function Ha(e,t){try{console.error(t.value)}catch(s){setTimeout(function(){throw s})}}var bg=typeof WeakMap=="function"?WeakMap:Map;function sf(e,t,s){s=fr(-1,s),s.tag=3,s.payload={element:null};var o=t.value;return s.callback=function(){Go||(Go=!0,ic=o),Ha(e,t)},s}function of(e,t,s){s=fr(-1,s),s.tag=3;var o=e.type.getDerivedStateFromError;if(typeof o=="function"){var d=t.value;s.payload=function(){return o(d)},s.callback=function(){Ha(e,t)}}var f=e.stateNode;return f!==null&&typeof f.componentDidCatch=="function"&&(s.callback=function(){Ha(e,t),typeof o!="function"&&(Mr===null?Mr=new Set([this]):Mr.add(this));var v=t.stack;this.componentDidCatch(t.value,{componentStack:v!==null?v:""})}),s}function lf(e,t,s){var o=e.pingCache;if(o===null){o=e.pingCache=new bg;var d=new Set;o.set(t,d)}else d=o.get(t),d===void 0&&(d=new Set,o.set(t,d));d.has(s)||(d.add(s),e=Bg.bind(null,e,t,s),t.then(e,e))}function af(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 cf(e,t,s,o,d){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,s.flags|=131072,s.flags&=-52805,s.tag===1&&(s.alternate===null?s.tag=17:(t=fr(-1,1),t.tag=2,Ir(s,t,1))),s.lanes|=1),e):(e.flags|=65536,e.lanes=d,e)}var jg=O.ReactCurrentOwner,fn=!1;function rn(e,t,s,o){t.child=e===null?bd(t,null,s,o):Ms(t,e.child,s,o)}function uf(e,t,s,o,d){s=s.render;var f=t.ref;return Ps(t,d),o=La(e,t,s,o,f,d),s=Pa(),e!==null&&!fn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~d,pr(e,t,d)):(ft&&s&&ya(t),t.flags|=1,rn(e,t,o,d),t.child)}function df(e,t,s,o,d){if(e===null){var f=s.type;return typeof f=="function"&&!fc(f)&&f.defaultProps===void 0&&s.compare===null&&s.defaultProps===void 0?(t.tag=15,t.type=f,ff(e,t,f,o,d)):(e=Zo(s.type,null,o,t,t.mode,d),e.ref=t.ref,e.return=t,t.child=e)}if(f=e.child,(e.lanes&d)===0){var v=f.memoizedProps;if(s=s.compare,s=s!==null?s:ui,s(v,o)&&e.ref===t.ref)return pr(e,t,d)}return t.flags|=1,e=zr(f,o),e.ref=t.ref,e.return=t,t.child=e}function ff(e,t,s,o,d){if(e!==null){var f=e.memoizedProps;if(ui(f,o)&&e.ref===t.ref)if(fn=!1,t.pendingProps=o=f,(e.lanes&d)!==0)(e.flags&131072)!==0&&(fn=!0);else return t.lanes=e.lanes,pr(e,t,d)}return Va(e,t,s,o,d)}function pf(e,t,s){var o=t.pendingProps,d=o.children,f=e!==null?e.memoizedState:null;if(o.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},lt(Fs,kn),kn|=s;else{if((s&1073741824)===0)return e=f!==null?f.baseLanes|s:s,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,lt(Fs,kn),kn|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},o=f!==null?f.baseLanes:s,lt(Fs,kn),kn|=o}else f!==null?(o=f.baseLanes|s,t.memoizedState=null):o=s,lt(Fs,kn),kn|=o;return rn(e,t,d,s),t.child}function hf(e,t){var s=t.ref;(e===null&&s!==null||e!==null&&e.ref!==s)&&(t.flags|=512,t.flags|=2097152)}function Va(e,t,s,o,d){var f=dn(s)?ts:Yt.current;return f=Rs(t,f),Ps(t,d),s=La(e,t,s,o,f,d),o=Pa(),e!==null&&!fn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~d,pr(e,t,d)):(ft&&o&&ya(t),t.flags|=1,rn(e,t,s,d),t.child)}function mf(e,t,s,o,d){if(dn(s)){var f=!0;To(t)}else f=!1;if(Ps(t,d),t.stateNode===null)Uo(e,t),nf(t,s,o),Ba(t,s,o,d),o=!0;else if(e===null){var v=t.stateNode,T=t.memoizedProps;v.props=T;var _=v.context,z=s.contextType;typeof z=="object"&&z!==null?z=bn(z):(z=dn(s)?ts:Yt.current,z=Rs(t,z));var X=s.getDerivedStateFromProps,J=typeof X=="function"||typeof v.getSnapshotBeforeUpdate=="function";J||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(T!==o||_!==z)&&rf(t,v,o,z),Dr=!1;var Q=t.memoizedState;v.state=Q,Io(t,o,v,d),_=t.memoizedState,T!==o||Q!==_||un.current||Dr?(typeof X=="function"&&(Ua(t,s,X,o),_=t.memoizedState),(T=Dr||tf(t,s,T,o,Q,_,z))?(J||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount()),typeof v.componentDidMount=="function"&&(t.flags|=4194308)):(typeof v.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=o,t.memoizedState=_),v.props=o,v.state=_,v.context=z,o=T):(typeof v.componentDidMount=="function"&&(t.flags|=4194308),o=!1)}else{v=t.stateNode,Rd(e,t),T=t.memoizedProps,z=t.type===t.elementType?T:$n(t.type,T),v.props=z,J=t.pendingProps,Q=v.context,_=s.contextType,typeof _=="object"&&_!==null?_=bn(_):(_=dn(s)?ts:Yt.current,_=Rs(t,_));var ae=s.getDerivedStateFromProps;(X=typeof ae=="function"||typeof v.getSnapshotBeforeUpdate=="function")||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(T!==J||Q!==_)&&rf(t,v,o,_),Dr=!1,Q=t.memoizedState,v.state=Q,Io(t,o,v,d);var de=t.memoizedState;T!==J||Q!==de||un.current||Dr?(typeof ae=="function"&&(Ua(t,s,ae,o),de=t.memoizedState),(z=Dr||tf(t,s,z,o,Q,de,_)||!1)?(X||typeof v.UNSAFE_componentWillUpdate!="function"&&typeof v.componentWillUpdate!="function"||(typeof v.componentWillUpdate=="function"&&v.componentWillUpdate(o,de,_),typeof v.UNSAFE_componentWillUpdate=="function"&&v.UNSAFE_componentWillUpdate(o,de,_)),typeof v.componentDidUpdate=="function"&&(t.flags|=4),typeof v.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof v.componentDidUpdate!="function"||T===e.memoizedProps&&Q===e.memoizedState||(t.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||T===e.memoizedProps&&Q===e.memoizedState||(t.flags|=1024),t.memoizedProps=o,t.memoizedState=de),v.props=o,v.state=de,v.context=_,o=z):(typeof v.componentDidUpdate!="function"||T===e.memoizedProps&&Q===e.memoizedState||(t.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||T===e.memoizedProps&&Q===e.memoizedState||(t.flags|=1024),o=!1)}return Ga(e,t,s,o,f,d)}function Ga(e,t,s,o,d,f){hf(e,t);var v=(t.flags&128)!==0;if(!o&&!v)return d&&xd(t,s,!1),pr(e,t,f);o=t.stateNode,jg.current=t;var T=v&&typeof s.getDerivedStateFromError!="function"?null:o.render();return t.flags|=1,e!==null&&v?(t.child=Ms(t,e.child,null,f),t.child=Ms(t,null,T,f)):rn(e,t,T,f),t.memoizedState=o.state,d&&xd(t,s,!0),t.child}function gf(e){var t=e.stateNode;t.pendingContext?vd(e,t.pendingContext,t.pendingContext!==t.context):t.context&&vd(e,t.context,!1),ja(e,t.containerInfo)}function vf(e,t,s,o,d){return As(),Sa(d),t.flags|=256,rn(e,t,s,o),t.child}var qa={dehydrated:null,treeContext:null,retryLane:0};function Ka(e){return{baseLanes:e,cachePool:null,transitions:null}}function yf(e,t,s){var o=t.pendingProps,d=vt.current,f=!1,v=(t.flags&128)!==0,T;if((T=v)||(T=e!==null&&e.memoizedState===null?!1:(d&2)!==0),T?(f=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(d|=1),lt(vt,d&1),e===null)return ka(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(v=o.children,e=o.fallback,f?(o=t.mode,f=t.child,v={mode:"hidden",children:v},(o&1)===0&&f!==null?(f.childLanes=0,f.pendingProps=v):f=Jo(v,o,0,null),e=ds(e,o,s,null),f.return=t,e.return=t,f.sibling=e,t.child=f,t.child.memoizedState=Ka(s),t.memoizedState=qa,e):Ya(t,v));if(d=e.memoizedState,d!==null&&(T=d.dehydrated,T!==null))return Rg(e,t,v,o,T,d,s);if(f){f=o.fallback,v=t.mode,d=e.child,T=d.sibling;var _={mode:"hidden",children:o.children};return(v&1)===0&&t.child!==d?(o=t.child,o.childLanes=0,o.pendingProps=_,t.deletions=null):(o=zr(d,_),o.subtreeFlags=d.subtreeFlags&14680064),T!==null?f=zr(T,f):(f=ds(f,v,s,null),f.flags|=2),f.return=t,o.return=t,o.sibling=f,t.child=o,o=f,f=t.child,v=e.child.memoizedState,v=v===null?Ka(s):{baseLanes:v.baseLanes|s,cachePool:null,transitions:v.transitions},f.memoizedState=v,f.childLanes=e.childLanes&~s,t.memoizedState=qa,o}return f=e.child,e=f.sibling,o=zr(f,{mode:"visible",children:o.children}),(t.mode&1)===0&&(o.lanes=s),o.return=t,o.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=o,t.memoizedState=null,o}function Ya(e,t){return t=Jo({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Fo(e,t,s,o){return o!==null&&Sa(o),Ms(t,e.child,null,s),e=Ya(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Rg(e,t,s,o,d,f,v){if(s)return t.flags&256?(t.flags&=-257,o=Wa(Error(i(422))),Fo(e,t,v,o)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(f=o.fallback,d=t.mode,o=Jo({mode:"visible",children:o.children},d,0,null),f=ds(f,d,v,null),f.flags|=2,o.return=t,f.return=t,o.sibling=f,t.child=o,(t.mode&1)!==0&&Ms(t,e.child,null,v),t.child.memoizedState=Ka(v),t.memoizedState=qa,f);if((t.mode&1)===0)return Fo(e,t,v,null);if(d.data==="$!"){if(o=d.nextSibling&&d.nextSibling.dataset,o)var T=o.dgst;return o=T,f=Error(i(419)),o=Wa(f,o,void 0),Fo(e,t,v,o)}if(T=(v&e.childLanes)!==0,fn||T){if(o=Pt,o!==null){switch(v&-v){case 4:d=2;break;case 16:d=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:d=32;break;case 536870912:d=268435456;break;default:d=0}d=(d&(o.suspendedLanes|v))!==0?0:d,d!==0&&d!==f.retryLane&&(f.retryLane=d,dr(e,d),Bn(o,e,d,-1))}return dc(),o=Wa(Error(i(421))),Fo(e,t,v,o)}return d.data==="$?"?(t.flags|=128,t.child=e.child,t=Wg.bind(null,e),d._reactRetry=t,null):(e=f.treeContext,wn=_r(d.nextSibling),xn=t,ft=!0,zn=null,e!==null&&(En[_n++]=cr,En[_n++]=ur,En[_n++]=ns,cr=e.id,ur=e.overflow,ns=t),t=Ya(t,o.children),t.flags|=4096,t)}function xf(e,t,s){e.lanes|=t;var o=e.alternate;o!==null&&(o.lanes|=t),Ea(e.return,t,s)}function Qa(e,t,s,o,d){var f=e.memoizedState;f===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:o,tail:s,tailMode:d}:(f.isBackwards=t,f.rendering=null,f.renderingStartTime=0,f.last=o,f.tail=s,f.tailMode=d)}function wf(e,t,s){var o=t.pendingProps,d=o.revealOrder,f=o.tail;if(rn(e,t,o.children,s),o=vt.current,(o&2)!==0)o=o&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&xf(e,s,t);else if(e.tag===19)xf(e,s,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}o&=1}if(lt(vt,o),(t.mode&1)===0)t.memoizedState=null;else switch(d){case"forwards":for(s=t.child,d=null;s!==null;)e=s.alternate,e!==null&&Ao(e)===null&&(d=s),s=s.sibling;s=d,s===null?(d=t.child,t.child=null):(d=s.sibling,s.sibling=null),Qa(t,!1,d,s,f);break;case"backwards":for(s=null,d=t.child,t.child=null;d!==null;){if(e=d.alternate,e!==null&&Ao(e)===null){t.child=d;break}e=d.sibling,d.sibling=s,s=d,d=e}Qa(t,!0,s,null,f);break;case"together":Qa(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Uo(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function pr(e,t,s){if(e!==null&&(t.dependencies=e.dependencies),ls|=t.lanes,(s&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,s=zr(e,e.pendingProps),t.child=s,s.return=t;e.sibling!==null;)e=e.sibling,s=s.sibling=zr(e,e.pendingProps),s.return=t;s.sibling=null}return t.child}function Dg(e,t,s){switch(t.tag){case 3:gf(t),As();break;case 5:Ad(t);break;case 1:dn(t.type)&&To(t);break;case 4:ja(t,t.stateNode.containerInfo);break;case 10:var o=t.type._context,d=t.memoizedProps.value;lt(jo,o._currentValue),o._currentValue=d;break;case 13:if(o=t.memoizedState,o!==null)return o.dehydrated!==null?(lt(vt,vt.current&1),t.flags|=128,null):(s&t.child.childLanes)!==0?yf(e,t,s):(lt(vt,vt.current&1),e=pr(e,t,s),e!==null?e.sibling:null);lt(vt,vt.current&1);break;case 19:if(o=(s&t.childLanes)!==0,(e.flags&128)!==0){if(o)return wf(e,t,s);t.flags|=128}if(d=t.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),lt(vt,vt.current),o)break;return null;case 22:case 23:return t.lanes=0,pf(e,t,s)}return pr(e,t,s)}var kf,Xa,Sf,Tf;kf=function(e,t){for(var s=t.child;s!==null;){if(s.tag===5||s.tag===6)e.appendChild(s.stateNode);else if(s.tag!==4&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break;for(;s.sibling===null;){if(s.return===null||s.return===t)return;s=s.return}s.sibling.return=s.return,s=s.sibling}},Xa=function(){},Sf=function(e,t,s,o){var d=e.memoizedProps;if(d!==o){e=t.stateNode,is(Yn.current);var f=null;switch(s){case"input":d=G(e,d),o=G(e,o),f=[];break;case"select":d=W({},d,{value:void 0}),o=W({},o,{value:void 0}),f=[];break;case"textarea":d=ce(e,d),o=ce(e,o),f=[];break;default:typeof d.onClick!="function"&&typeof o.onClick=="function"&&(e.onclick=wo)}rr(s,o);var v;s=null;for(z in d)if(!o.hasOwnProperty(z)&&d.hasOwnProperty(z)&&d[z]!=null)if(z==="style"){var T=d[z];for(v in T)T.hasOwnProperty(v)&&(s||(s={}),s[v]="")}else z!=="dangerouslySetInnerHTML"&&z!=="children"&&z!=="suppressContentEditableWarning"&&z!=="suppressHydrationWarning"&&z!=="autoFocus"&&(a.hasOwnProperty(z)?f||(f=[]):(f=f||[]).push(z,null));for(z in o){var _=o[z];if(T=d!=null?d[z]:void 0,o.hasOwnProperty(z)&&_!==T&&(_!=null||T!=null))if(z==="style")if(T){for(v in T)!T.hasOwnProperty(v)||_&&_.hasOwnProperty(v)||(s||(s={}),s[v]="");for(v in _)_.hasOwnProperty(v)&&T[v]!==_[v]&&(s||(s={}),s[v]=_[v])}else s||(f||(f=[]),f.push(z,s)),s=_;else z==="dangerouslySetInnerHTML"?(_=_?_.__html:void 0,T=T?T.__html:void 0,_!=null&&T!==_&&(f=f||[]).push(z,_)):z==="children"?typeof _!="string"&&typeof _!="number"||(f=f||[]).push(z,""+_):z!=="suppressContentEditableWarning"&&z!=="suppressHydrationWarning"&&(a.hasOwnProperty(z)?(_!=null&&z==="onScroll"&&ut("scroll",e),f||T===_||(f=[])):(f=f||[]).push(z,_))}s&&(f=f||[]).push("style",s);var z=f;(t.updateQueue=z)&&(t.flags|=4)}},Tf=function(e,t,s,o){s!==o&&(t.flags|=4)};function Ci(e,t){if(!ft)switch(e.tailMode){case"hidden":t=e.tail;for(var s=null;t!==null;)t.alternate!==null&&(s=t),t=t.sibling;s===null?e.tail=null:s.sibling=null;break;case"collapsed":s=e.tail;for(var o=null;s!==null;)s.alternate!==null&&(o=s),s=s.sibling;o===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function Xt(e){var t=e.alternate!==null&&e.alternate.child===e.child,s=0,o=0;if(t)for(var d=e.child;d!==null;)s|=d.lanes|d.childLanes,o|=d.subtreeFlags&14680064,o|=d.flags&14680064,d.return=e,d=d.sibling;else for(d=e.child;d!==null;)s|=d.lanes|d.childLanes,o|=d.subtreeFlags,o|=d.flags,d.return=e,d=d.sibling;return e.subtreeFlags|=o,e.childLanes=s,t}function Ig(e,t,s){var o=t.pendingProps;switch(xa(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xt(t),null;case 1:return dn(t.type)&&So(),Xt(t),null;case 3:return o=t.stateNode,Os(),dt(un),dt(Yt),Ia(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(e===null||e.child===null)&&(_o(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,zn!==null&&(ac(zn),zn=null))),Xa(e,t),Xt(t),null;case 5:Ra(t);var d=is(wi.current);if(s=t.type,e!==null&&t.stateNode!=null)Sf(e,t,s,o,d),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!o){if(t.stateNode===null)throw Error(i(166));return Xt(t),null}if(e=is(Yn.current),_o(t)){o=t.stateNode,s=t.type;var f=t.memoizedProps;switch(o[Kn]=t,o[mi]=f,e=(t.mode&1)!==0,s){case"dialog":ut("cancel",o),ut("close",o);break;case"iframe":case"object":case"embed":ut("load",o);break;case"video":case"audio":for(d=0;d<fi.length;d++)ut(fi[d],o);break;case"source":ut("error",o);break;case"img":case"image":case"link":ut("error",o),ut("load",o);break;case"details":ut("toggle",o);break;case"input":De(o,f),ut("invalid",o);break;case"select":o._wrapperState={wasMultiple:!!f.multiple},ut("invalid",o);break;case"textarea":Oe(o,f),ut("invalid",o)}rr(s,f),d=null;for(var v in f)if(f.hasOwnProperty(v)){var T=f[v];v==="children"?typeof T=="string"?o.textContent!==T&&(f.suppressHydrationWarning!==!0&&xo(o.textContent,T,e),d=["children",T]):typeof T=="number"&&o.textContent!==""+T&&(f.suppressHydrationWarning!==!0&&xo(o.textContent,T,e),d=["children",""+T]):a.hasOwnProperty(v)&&T!=null&&v==="onScroll"&&ut("scroll",o)}switch(s){case"input":jt(o),at(o,f,!0);break;case"textarea":jt(o),it(o);break;case"select":case"option":break;default:typeof f.onClick=="function"&&(o.onclick=wo)}o=d,t.updateQueue=o,o!==null&&(t.flags|=4)}else{v=d.nodeType===9?d:d.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=xt(s)),e==="http://www.w3.org/1999/xhtml"?s==="script"?(e=v.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof o.is=="string"?e=v.createElement(s,{is:o.is}):(e=v.createElement(s),s==="select"&&(v=e,o.multiple?v.multiple=!0:o.size&&(v.size=o.size))):e=v.createElementNS(e,s),e[Kn]=t,e[mi]=o,kf(e,t,!1,!1),t.stateNode=e;e:{switch(v=sr(s,o),s){case"dialog":ut("cancel",e),ut("close",e),d=o;break;case"iframe":case"object":case"embed":ut("load",e),d=o;break;case"video":case"audio":for(d=0;d<fi.length;d++)ut(fi[d],e);d=o;break;case"source":ut("error",e),d=o;break;case"img":case"image":case"link":ut("error",e),ut("load",e),d=o;break;case"details":ut("toggle",e),d=o;break;case"input":De(e,o),d=G(e,o),ut("invalid",e);break;case"option":d=o;break;case"select":e._wrapperState={wasMultiple:!!o.multiple},d=W({},o,{value:void 0}),ut("invalid",e);break;case"textarea":Oe(e,o),d=ce(e,o),ut("invalid",e);break;default:d=o}rr(s,d),T=d;for(f in T)if(T.hasOwnProperty(f)){var _=T[f];f==="style"?qr(e,_):f==="dangerouslySetInnerHTML"?(_=_?_.__html:void 0,_!=null&&ze(e,_)):f==="children"?typeof _=="string"?(s!=="textarea"||_!=="")&&Ze(e,_):typeof _=="number"&&Ze(e,""+_):f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&f!=="autoFocus"&&(a.hasOwnProperty(f)?_!=null&&f==="onScroll"&&ut("scroll",e):_!=null&&H(e,f,_,v))}switch(s){case"input":jt(e),at(e,o,!1);break;case"textarea":jt(e),it(e);break;case"option":o.value!=null&&e.setAttribute("value",""+be(o.value));break;case"select":e.multiple=!!o.multiple,f=o.value,f!=null?F(e,!!o.multiple,f,!1):o.defaultValue!=null&&F(e,!!o.multiple,o.defaultValue,!0);break;default:typeof d.onClick=="function"&&(e.onclick=wo)}switch(s){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}}o&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Xt(t),null;case 6:if(e&&t.stateNode!=null)Tf(e,t,e.memoizedProps,o);else{if(typeof o!="string"&&t.stateNode===null)throw Error(i(166));if(s=is(wi.current),is(Yn.current),_o(t)){if(o=t.stateNode,s=t.memoizedProps,o[Kn]=t,(f=o.nodeValue!==s)&&(e=xn,e!==null))switch(e.tag){case 3:xo(o.nodeValue,s,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&xo(o.nodeValue,s,(e.mode&1)!==0)}f&&(t.flags|=4)}else o=(s.nodeType===9?s:s.ownerDocument).createTextNode(o),o[Kn]=t,t.stateNode=o}return Xt(t),null;case 13:if(dt(vt),o=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ft&&wn!==null&&(t.mode&1)!==0&&(t.flags&128)===0)Cd(),As(),t.flags|=98560,f=!1;else if(f=_o(t),o!==null&&o.dehydrated!==null){if(e===null){if(!f)throw Error(i(318));if(f=t.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(i(317));f[Kn]=t}else As(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Xt(t),f=!1}else zn!==null&&(ac(zn),zn=null),f=!0;if(!f)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=s,t):(o=o!==null,o!==(e!==null&&e.memoizedState!==null)&&o&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(vt.current&1)!==0?It===0&&(It=3):dc())),t.updateQueue!==null&&(t.flags|=4),Xt(t),null);case 4:return Os(),Xa(e,t),e===null&&pi(t.stateNode.containerInfo),Xt(t),null;case 10:return Ca(t.type._context),Xt(t),null;case 17:return dn(t.type)&&So(),Xt(t),null;case 19:if(dt(vt),f=t.memoizedState,f===null)return Xt(t),null;if(o=(t.flags&128)!==0,v=f.rendering,v===null)if(o)Ci(f,!1);else{if(It!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(v=Ao(e),v!==null){for(t.flags|=128,Ci(f,!1),o=v.updateQueue,o!==null&&(t.updateQueue=o,t.flags|=4),t.subtreeFlags=0,o=s,s=t.child;s!==null;)f=s,e=o,f.flags&=14680066,v=f.alternate,v===null?(f.childLanes=0,f.lanes=e,f.child=null,f.subtreeFlags=0,f.memoizedProps=null,f.memoizedState=null,f.updateQueue=null,f.dependencies=null,f.stateNode=null):(f.childLanes=v.childLanes,f.lanes=v.lanes,f.child=v.child,f.subtreeFlags=0,f.deletions=null,f.memoizedProps=v.memoizedProps,f.memoizedState=v.memoizedState,f.updateQueue=v.updateQueue,f.type=v.type,e=v.dependencies,f.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),s=s.sibling;return lt(vt,vt.current&1|2),t.child}e=e.sibling}f.tail!==null&&ht()>Us&&(t.flags|=128,o=!0,Ci(f,!1),t.lanes=4194304)}else{if(!o)if(e=Ao(v),e!==null){if(t.flags|=128,o=!0,s=e.updateQueue,s!==null&&(t.updateQueue=s,t.flags|=4),Ci(f,!0),f.tail===null&&f.tailMode==="hidden"&&!v.alternate&&!ft)return Xt(t),null}else 2*ht()-f.renderingStartTime>Us&&s!==1073741824&&(t.flags|=128,o=!0,Ci(f,!1),t.lanes=4194304);f.isBackwards?(v.sibling=t.child,t.child=v):(s=f.last,s!==null?s.sibling=v:t.child=v,f.last=v)}return f.tail!==null?(t=f.tail,f.rendering=t,f.tail=t.sibling,f.renderingStartTime=ht(),t.sibling=null,s=vt.current,lt(vt,o?s&1|2:s&1),t):(Xt(t),null);case 22:case 23:return uc(),o=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==o&&(t.flags|=8192),o&&(t.mode&1)!==0?(kn&1073741824)!==0&&(Xt(t),t.subtreeFlags&6&&(t.flags|=8192)):Xt(t),null;case 24:return null;case 25:return null}throw Error(i(156,t.tag))}function Ag(e,t){switch(xa(t),t.tag){case 1:return dn(t.type)&&So(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Os(),dt(un),dt(Yt),Ia(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Ra(t),null;case 13:if(dt(vt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));As()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return dt(vt),null;case 4:return Os(),null;case 10:return Ca(t.type._context),null;case 22:case 23:return uc(),null;case 24:return null;default:return null}}var Bo=!1,Zt=!1,Mg=typeof WeakSet=="function"?WeakSet:Set,ue=null;function $s(e,t){var s=e.ref;if(s!==null)if(typeof s=="function")try{s(null)}catch(o){wt(e,t,o)}else s.current=null}function Za(e,t,s){try{s()}catch(o){wt(e,t,o)}}var Nf=!1;function Lg(e,t){if(ua=lo,e=td(),na(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else e:{s=(s=e.ownerDocument)&&s.defaultView||window;var o=s.getSelection&&s.getSelection();if(o&&o.rangeCount!==0){s=o.anchorNode;var d=o.anchorOffset,f=o.focusNode;o=o.focusOffset;try{s.nodeType,f.nodeType}catch{s=null;break e}var v=0,T=-1,_=-1,z=0,X=0,J=e,Q=null;t:for(;;){for(var ae;J!==s||d!==0&&J.nodeType!==3||(T=v+d),J!==f||o!==0&&J.nodeType!==3||(_=v+o),J.nodeType===3&&(v+=J.nodeValue.length),(ae=J.firstChild)!==null;)Q=J,J=ae;for(;;){if(J===e)break t;if(Q===s&&++z===d&&(T=v),Q===f&&++X===o&&(_=v),(ae=J.nextSibling)!==null)break;J=Q,Q=J.parentNode}J=ae}s=T===-1||_===-1?null:{start:T,end:_}}else s=null}s=s||{start:0,end:0}}else s=null;for(da={focusedElem:e,selectionRange:s},lo=!1,ue=t;ue!==null;)if(t=ue,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ue=e;else for(;ue!==null;){t=ue;try{var de=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(de!==null){var pe=de.memoizedProps,Tt=de.memoizedState,A=t.stateNode,j=A.getSnapshotBeforeUpdate(t.elementType===t.type?pe:$n(t.type,pe),Tt);A.__reactInternalSnapshotBeforeUpdate=j}break;case 3:var M=t.stateNode.containerInfo;M.nodeType===1?M.textContent="":M.nodeType===9&&M.documentElement&&M.removeChild(M.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(i(163))}}catch(re){wt(t,t.return,re)}if(e=t.sibling,e!==null){e.return=t.return,ue=e;break}ue=t.return}return de=Nf,Nf=!1,de}function Ei(e,t,s){var o=t.updateQueue;if(o=o!==null?o.lastEffect:null,o!==null){var d=o=o.next;do{if((d.tag&e)===e){var f=d.destroy;d.destroy=void 0,f!==void 0&&Za(t,s,f)}d=d.next}while(d!==o)}}function Wo(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var s=t=t.next;do{if((s.tag&e)===e){var o=s.create;s.destroy=o()}s=s.next}while(s!==t)}}function Ja(e){var t=e.ref;if(t!==null){var s=e.stateNode;switch(e.tag){case 5:e=s;break;default:e=s}typeof t=="function"?t(e):t.current=e}}function Cf(e){var t=e.alternate;t!==null&&(e.alternate=null,Cf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Kn],delete t[mi],delete t[ma],delete t[vg],delete t[yg])),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 Ef(e){return e.tag===5||e.tag===3||e.tag===4}function _f(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ef(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 ec(e,t,s){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?s.nodeType===8?s.parentNode.insertBefore(e,t):s.insertBefore(e,t):(s.nodeType===8?(t=s.parentNode,t.insertBefore(e,s)):(t=s,t.appendChild(e)),s=s._reactRootContainer,s!=null||t.onclick!==null||(t.onclick=wo));else if(o!==4&&(e=e.child,e!==null))for(ec(e,t,s),e=e.sibling;e!==null;)ec(e,t,s),e=e.sibling}function tc(e,t,s){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?s.insertBefore(e,t):s.appendChild(e);else if(o!==4&&(e=e.child,e!==null))for(tc(e,t,s),e=e.sibling;e!==null;)tc(e,t,s),e=e.sibling}var Bt=null,Fn=!1;function Ar(e,t,s){for(s=s.child;s!==null;)bf(e,t,s),s=s.sibling}function bf(e,t,s){if(vn&&typeof vn.onCommitFiberUnmount=="function")try{vn.onCommitFiberUnmount(Yr,s)}catch{}switch(s.tag){case 5:Zt||$s(s,t);case 6:var o=Bt,d=Fn;Bt=null,Ar(e,t,s),Bt=o,Fn=d,Bt!==null&&(Fn?(e=Bt,s=s.stateNode,e.nodeType===8?e.parentNode.removeChild(s):e.removeChild(s)):Bt.removeChild(s.stateNode));break;case 18:Bt!==null&&(Fn?(e=Bt,s=s.stateNode,e.nodeType===8?ha(e.parentNode,s):e.nodeType===1&&ha(e,s),si(e)):ha(Bt,s.stateNode));break;case 4:o=Bt,d=Fn,Bt=s.stateNode.containerInfo,Fn=!0,Ar(e,t,s),Bt=o,Fn=d;break;case 0:case 11:case 14:case 15:if(!Zt&&(o=s.updateQueue,o!==null&&(o=o.lastEffect,o!==null))){d=o=o.next;do{var f=d,v=f.destroy;f=f.tag,v!==void 0&&((f&2)!==0||(f&4)!==0)&&Za(s,t,v),d=d.next}while(d!==o)}Ar(e,t,s);break;case 1:if(!Zt&&($s(s,t),o=s.stateNode,typeof o.componentWillUnmount=="function"))try{o.props=s.memoizedProps,o.state=s.memoizedState,o.componentWillUnmount()}catch(T){wt(s,t,T)}Ar(e,t,s);break;case 21:Ar(e,t,s);break;case 22:s.mode&1?(Zt=(o=Zt)||s.memoizedState!==null,Ar(e,t,s),Zt=o):Ar(e,t,s);break;default:Ar(e,t,s)}}function jf(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var s=e.stateNode;s===null&&(s=e.stateNode=new Mg),t.forEach(function(o){var d=Hg.bind(null,e,o);s.has(o)||(s.add(o),o.then(d,d))})}}function Un(e,t){var s=t.deletions;if(s!==null)for(var o=0;o<s.length;o++){var d=s[o];try{var f=e,v=t,T=v;e:for(;T!==null;){switch(T.tag){case 5:Bt=T.stateNode,Fn=!1;break e;case 3:Bt=T.stateNode.containerInfo,Fn=!0;break e;case 4:Bt=T.stateNode.containerInfo,Fn=!0;break e}T=T.return}if(Bt===null)throw Error(i(160));bf(f,v,d),Bt=null,Fn=!1;var _=d.alternate;_!==null&&(_.return=null),d.return=null}catch(z){wt(d,t,z)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Rf(t,e),t=t.sibling}function Rf(e,t){var s=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Un(t,e),Xn(e),o&4){try{Ei(3,e,e.return),Wo(3,e)}catch(pe){wt(e,e.return,pe)}try{Ei(5,e,e.return)}catch(pe){wt(e,e.return,pe)}}break;case 1:Un(t,e),Xn(e),o&512&&s!==null&&$s(s,s.return);break;case 5:if(Un(t,e),Xn(e),o&512&&s!==null&&$s(s,s.return),e.flags&32){var d=e.stateNode;try{Ze(d,"")}catch(pe){wt(e,e.return,pe)}}if(o&4&&(d=e.stateNode,d!=null)){var f=e.memoizedProps,v=s!==null?s.memoizedProps:f,T=e.type,_=e.updateQueue;if(e.updateQueue=null,_!==null)try{T==="input"&&f.type==="radio"&&f.name!=null&&oe(d,f),sr(T,v);var z=sr(T,f);for(v=0;v<_.length;v+=2){var X=_[v],J=_[v+1];X==="style"?qr(d,J):X==="dangerouslySetInnerHTML"?ze(d,J):X==="children"?Ze(d,J):H(d,X,J,z)}switch(T){case"input":He(d,f);break;case"textarea":Ue(d,f);break;case"select":var Q=d._wrapperState.wasMultiple;d._wrapperState.wasMultiple=!!f.multiple;var ae=f.value;ae!=null?F(d,!!f.multiple,ae,!1):Q!==!!f.multiple&&(f.defaultValue!=null?F(d,!!f.multiple,f.defaultValue,!0):F(d,!!f.multiple,f.multiple?[]:"",!1))}d[mi]=f}catch(pe){wt(e,e.return,pe)}}break;case 6:if(Un(t,e),Xn(e),o&4){if(e.stateNode===null)throw Error(i(162));d=e.stateNode,f=e.memoizedProps;try{d.nodeValue=f}catch(pe){wt(e,e.return,pe)}}break;case 3:if(Un(t,e),Xn(e),o&4&&s!==null&&s.memoizedState.isDehydrated)try{si(t.containerInfo)}catch(pe){wt(e,e.return,pe)}break;case 4:Un(t,e),Xn(e);break;case 13:Un(t,e),Xn(e),d=e.child,d.flags&8192&&(f=d.memoizedState!==null,d.stateNode.isHidden=f,!f||d.alternate!==null&&d.alternate.memoizedState!==null||(sc=ht())),o&4&&jf(e);break;case 22:if(X=s!==null&&s.memoizedState!==null,e.mode&1?(Zt=(z=Zt)||X,Un(t,e),Zt=z):Un(t,e),Xn(e),o&8192){if(z=e.memoizedState!==null,(e.stateNode.isHidden=z)&&!X&&(e.mode&1)!==0)for(ue=e,X=e.child;X!==null;){for(J=ue=X;ue!==null;){switch(Q=ue,ae=Q.child,Q.tag){case 0:case 11:case 14:case 15:Ei(4,Q,Q.return);break;case 1:$s(Q,Q.return);var de=Q.stateNode;if(typeof de.componentWillUnmount=="function"){o=Q,s=Q.return;try{t=o,de.props=t.memoizedProps,de.state=t.memoizedState,de.componentWillUnmount()}catch(pe){wt(o,s,pe)}}break;case 5:$s(Q,Q.return);break;case 22:if(Q.memoizedState!==null){Af(J);continue}}ae!==null?(ae.return=Q,ue=ae):Af(J)}X=X.sibling}e:for(X=null,J=e;;){if(J.tag===5){if(X===null){X=J;try{d=J.stateNode,z?(f=d.style,typeof f.setProperty=="function"?f.setProperty("display","none","important"):f.display="none"):(T=J.stateNode,_=J.memoizedProps.style,v=_!=null&&_.hasOwnProperty("display")?_.display:null,T.style.display=nr("display",v))}catch(pe){wt(e,e.return,pe)}}}else if(J.tag===6){if(X===null)try{J.stateNode.nodeValue=z?"":J.memoizedProps}catch(pe){wt(e,e.return,pe)}}else if((J.tag!==22&&J.tag!==23||J.memoizedState===null||J===e)&&J.child!==null){J.child.return=J,J=J.child;continue}if(J===e)break e;for(;J.sibling===null;){if(J.return===null||J.return===e)break e;X===J&&(X=null),J=J.return}X===J&&(X=null),J.sibling.return=J.return,J=J.sibling}}break;case 19:Un(t,e),Xn(e),o&4&&jf(e);break;case 21:break;default:Un(t,e),Xn(e)}}function Xn(e){var t=e.flags;if(t&2){try{e:{for(var s=e.return;s!==null;){if(Ef(s)){var o=s;break e}s=s.return}throw Error(i(160))}switch(o.tag){case 5:var d=o.stateNode;o.flags&32&&(Ze(d,""),o.flags&=-33);var f=_f(e);tc(e,f,d);break;case 3:case 4:var v=o.stateNode.containerInfo,T=_f(e);ec(e,T,v);break;default:throw Error(i(161))}}catch(_){wt(e,e.return,_)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Pg(e,t,s){ue=e,Df(e)}function Df(e,t,s){for(var o=(e.mode&1)!==0;ue!==null;){var d=ue,f=d.child;if(d.tag===22&&o){var v=d.memoizedState!==null||Bo;if(!v){var T=d.alternate,_=T!==null&&T.memoizedState!==null||Zt;T=Bo;var z=Zt;if(Bo=v,(Zt=_)&&!z)for(ue=d;ue!==null;)v=ue,_=v.child,v.tag===22&&v.memoizedState!==null?Mf(d):_!==null?(_.return=v,ue=_):Mf(d);for(;f!==null;)ue=f,Df(f),f=f.sibling;ue=d,Bo=T,Zt=z}If(e)}else(d.subtreeFlags&8772)!==0&&f!==null?(f.return=d,ue=f):If(e)}}function If(e){for(;ue!==null;){var t=ue;if((t.flags&8772)!==0){var s=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:Zt||Wo(5,t);break;case 1:var o=t.stateNode;if(t.flags&4&&!Zt)if(s===null)o.componentDidMount();else{var d=t.elementType===t.type?s.memoizedProps:$n(t.type,s.memoizedProps);o.componentDidUpdate(d,s.memoizedState,o.__reactInternalSnapshotBeforeUpdate)}var f=t.updateQueue;f!==null&&Id(t,f,o);break;case 3:var v=t.updateQueue;if(v!==null){if(s=null,t.child!==null)switch(t.child.tag){case 5:s=t.child.stateNode;break;case 1:s=t.child.stateNode}Id(t,v,s)}break;case 5:var T=t.stateNode;if(s===null&&t.flags&4){s=T;var _=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":_.autoFocus&&s.focus();break;case"img":_.src&&(s.src=_.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var z=t.alternate;if(z!==null){var X=z.memoizedState;if(X!==null){var J=X.dehydrated;J!==null&&si(J)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(i(163))}Zt||t.flags&512&&Ja(t)}catch(Q){wt(t,t.return,Q)}}if(t===e){ue=null;break}if(s=t.sibling,s!==null){s.return=t.return,ue=s;break}ue=t.return}}function Af(e){for(;ue!==null;){var t=ue;if(t===e){ue=null;break}var s=t.sibling;if(s!==null){s.return=t.return,ue=s;break}ue=t.return}}function Mf(e){for(;ue!==null;){var t=ue;try{switch(t.tag){case 0:case 11:case 15:var s=t.return;try{Wo(4,t)}catch(_){wt(t,s,_)}break;case 1:var o=t.stateNode;if(typeof o.componentDidMount=="function"){var d=t.return;try{o.componentDidMount()}catch(_){wt(t,d,_)}}var f=t.return;try{Ja(t)}catch(_){wt(t,f,_)}break;case 5:var v=t.return;try{Ja(t)}catch(_){wt(t,v,_)}}}catch(_){wt(t,t.return,_)}if(t===e){ue=null;break}var T=t.sibling;if(T!==null){T.return=t.return,ue=T;break}ue=t.return}}var Og=Math.ceil,Ho=O.ReactCurrentDispatcher,nc=O.ReactCurrentOwner,Rn=O.ReactCurrentBatchConfig,qe=0,Pt=null,_t=null,Wt=0,kn=0,Fs=br(0),It=0,_i=null,ls=0,Vo=0,rc=0,bi=null,pn=null,sc=0,Us=1/0,hr=null,Go=!1,ic=null,Mr=null,qo=!1,Lr=null,Ko=0,ji=0,oc=null,Yo=-1,Qo=0;function sn(){return(qe&6)!==0?ht():Yo!==-1?Yo:Yo=ht()}function Pr(e){return(e.mode&1)===0?1:(qe&2)!==0&&Wt!==0?Wt&-Wt:wg.transition!==null?(Qo===0&&(Qo=ei()),Qo):(e=Ve,e!==0||(e=window.event,e=e===void 0?16:Lu(e.type)),e)}function Bn(e,t,s,o){if(50<ji)throw ji=0,oc=null,Error(i(185));Jr(e,s,o),((qe&2)===0||e!==Pt)&&(e===Pt&&((qe&2)===0&&(Vo|=s),It===4&&Or(e,Wt)),hn(e,o),s===1&&qe===0&&(t.mode&1)===0&&(Us=ht()+500,No&&Rr()))}function hn(e,t){var s=e.callbackNode;so(e,t);var o=Zr(e,e===Pt?Wt:0);if(o===0)s!==null&&to(s),e.callbackNode=null,e.callbackPriority=0;else if(t=o&-o,e.callbackPriority!==t){if(s!=null&&to(s),t===1)e.tag===0?xg(Pf.bind(null,e)):wd(Pf.bind(null,e)),mg(function(){(qe&6)===0&&Rr()}),s=null;else{switch(ne(o)){case 1:s=kr;break;case 4:s=qn;break;case 16:s=vs;break;case 536870912:s=no;break;default:s=vs}s=Hf(s,Lf.bind(null,e))}e.callbackPriority=t,e.callbackNode=s}}function Lf(e,t){if(Yo=-1,Qo=0,(qe&6)!==0)throw Error(i(327));var s=e.callbackNode;if(Bs()&&e.callbackNode!==s)return null;var o=Zr(e,e===Pt?Wt:0);if(o===0)return null;if((o&30)!==0||(o&e.expiredLanes)!==0||t)t=Xo(e,o);else{t=o;var d=qe;qe|=2;var f=zf();(Pt!==e||Wt!==t)&&(hr=null,Us=ht()+500,cs(e,t));do try{Fg();break}catch(T){Of(e,T)}while(!0);Na(),Ho.current=f,qe=d,_t!==null?t=0:(Pt=null,Wt=0,t=It)}if(t!==0){if(t===2&&(d=Js(e),d!==0&&(o=d,t=lc(e,d))),t===1)throw s=_i,cs(e,0),Or(e,o),hn(e,ht()),s;if(t===6)Or(e,o);else{if(d=e.current.alternate,(o&30)===0&&!zg(d)&&(t=Xo(e,o),t===2&&(f=Js(e),f!==0&&(o=f,t=lc(e,f))),t===1))throw s=_i,cs(e,0),Or(e,o),hn(e,ht()),s;switch(e.finishedWork=d,e.finishedLanes=o,t){case 0:case 1:throw Error(i(345));case 2:us(e,pn,hr);break;case 3:if(Or(e,o),(o&130023424)===o&&(t=sc+500-ht(),10<t)){if(Zr(e,0)!==0)break;if(d=e.suspendedLanes,(d&o)!==o){sn(),e.pingedLanes|=e.suspendedLanes&d;break}e.timeoutHandle=pa(us.bind(null,e,pn,hr),t);break}us(e,pn,hr);break;case 4:if(Or(e,o),(o&4194240)===o)break;for(t=e.eventTimes,d=-1;0<o;){var v=31-tn(o);f=1<<v,v=t[v],v>d&&(d=v),o&=~f}if(o=d,o=ht()-o,o=(120>o?120:480>o?480:1080>o?1080:1920>o?1920:3e3>o?3e3:4320>o?4320:1960*Og(o/1960))-o,10<o){e.timeoutHandle=pa(us.bind(null,e,pn,hr),o);break}us(e,pn,hr);break;case 5:us(e,pn,hr);break;default:throw Error(i(329))}}}return hn(e,ht()),e.callbackNode===s?Lf.bind(null,e):null}function lc(e,t){var s=bi;return e.current.memoizedState.isDehydrated&&(cs(e,t).flags|=256),e=Xo(e,t),e!==2&&(t=pn,pn=s,t!==null&&ac(t)),e}function ac(e){pn===null?pn=e:pn.push.apply(pn,e)}function zg(e){for(var t=e;;){if(t.flags&16384){var s=t.updateQueue;if(s!==null&&(s=s.stores,s!==null))for(var o=0;o<s.length;o++){var d=s[o],f=d.getSnapshot;d=d.value;try{if(!On(f(),d))return!1}catch{return!1}}}if(s=t.child,t.subtreeFlags&16384&&s!==null)s.return=t,t=s;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 Or(e,t){for(t&=~rc,t&=~Vo,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var s=31-tn(t),o=1<<s;e[s]=-1,t&=~o}}function Pf(e){if((qe&6)!==0)throw Error(i(327));Bs();var t=Zr(e,0);if((t&1)===0)return hn(e,ht()),null;var s=Xo(e,t);if(e.tag!==0&&s===2){var o=Js(e);o!==0&&(t=o,s=lc(e,o))}if(s===1)throw s=_i,cs(e,0),Or(e,t),hn(e,ht()),s;if(s===6)throw Error(i(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,us(e,pn,hr),hn(e,ht()),null}function cc(e,t){var s=qe;qe|=1;try{return e(t)}finally{qe=s,qe===0&&(Us=ht()+500,No&&Rr())}}function as(e){Lr!==null&&Lr.tag===0&&(qe&6)===0&&Bs();var t=qe;qe|=1;var s=Rn.transition,o=Ve;try{if(Rn.transition=null,Ve=1,e)return e()}finally{Ve=o,Rn.transition=s,qe=t,(qe&6)===0&&Rr()}}function uc(){kn=Fs.current,dt(Fs)}function cs(e,t){e.finishedWork=null,e.finishedLanes=0;var s=e.timeoutHandle;if(s!==-1&&(e.timeoutHandle=-1,hg(s)),_t!==null)for(s=_t.return;s!==null;){var o=s;switch(xa(o),o.tag){case 1:o=o.type.childContextTypes,o!=null&&So();break;case 3:Os(),dt(un),dt(Yt),Ia();break;case 5:Ra(o);break;case 4:Os();break;case 13:dt(vt);break;case 19:dt(vt);break;case 10:Ca(o.type._context);break;case 22:case 23:uc()}s=s.return}if(Pt=e,_t=e=zr(e.current,null),Wt=kn=t,It=0,_i=null,rc=Vo=ls=0,pn=bi=null,ss!==null){for(t=0;t<ss.length;t++)if(s=ss[t],o=s.interleaved,o!==null){s.interleaved=null;var d=o.next,f=s.pending;if(f!==null){var v=f.next;f.next=d,o.next=v}s.pending=o}ss=null}return e}function Of(e,t){do{var s=_t;try{if(Na(),Mo.current=zo,Lo){for(var o=yt.memoizedState;o!==null;){var d=o.queue;d!==null&&(d.pending=null),o=o.next}Lo=!1}if(os=0,Lt=Dt=yt=null,ki=!1,Si=0,nc.current=null,s===null||s.return===null){It=1,_i=t,_t=null;break}e:{var f=e,v=s.return,T=s,_=t;if(t=Wt,T.flags|=32768,_!==null&&typeof _=="object"&&typeof _.then=="function"){var z=_,X=T,J=X.tag;if((X.mode&1)===0&&(J===0||J===11||J===15)){var Q=X.alternate;Q?(X.updateQueue=Q.updateQueue,X.memoizedState=Q.memoizedState,X.lanes=Q.lanes):(X.updateQueue=null,X.memoizedState=null)}var ae=af(v);if(ae!==null){ae.flags&=-257,cf(ae,v,T,f,t),ae.mode&1&&lf(f,z,t),t=ae,_=z;var de=t.updateQueue;if(de===null){var pe=new Set;pe.add(_),t.updateQueue=pe}else de.add(_);break e}else{if((t&1)===0){lf(f,z,t),dc();break e}_=Error(i(426))}}else if(ft&&T.mode&1){var Tt=af(v);if(Tt!==null){(Tt.flags&65536)===0&&(Tt.flags|=256),cf(Tt,v,T,f,t),Sa(zs(_,T));break e}}f=_=zs(_,T),It!==4&&(It=2),bi===null?bi=[f]:bi.push(f),f=v;do{switch(f.tag){case 3:f.flags|=65536,t&=-t,f.lanes|=t;var A=sf(f,_,t);Dd(f,A);break e;case 1:T=_;var j=f.type,M=f.stateNode;if((f.flags&128)===0&&(typeof j.getDerivedStateFromError=="function"||M!==null&&typeof M.componentDidCatch=="function"&&(Mr===null||!Mr.has(M)))){f.flags|=65536,t&=-t,f.lanes|=t;var re=of(f,T,t);Dd(f,re);break e}}f=f.return}while(f!==null)}Ff(s)}catch(ge){t=ge,_t===s&&s!==null&&(_t=s=s.return);continue}break}while(!0)}function zf(){var e=Ho.current;return Ho.current=zo,e===null?zo:e}function dc(){(It===0||It===3||It===2)&&(It=4),Pt===null||(ls&268435455)===0&&(Vo&268435455)===0||Or(Pt,Wt)}function Xo(e,t){var s=qe;qe|=2;var o=zf();(Pt!==e||Wt!==t)&&(hr=null,cs(e,t));do try{$g();break}catch(d){Of(e,d)}while(!0);if(Na(),qe=s,Ho.current=o,_t!==null)throw Error(i(261));return Pt=null,Wt=0,It}function $g(){for(;_t!==null;)$f(_t)}function Fg(){for(;_t!==null&&!Wl();)$f(_t)}function $f(e){var t=Wf(e.alternate,e,kn);e.memoizedProps=e.pendingProps,t===null?Ff(e):_t=t,nc.current=null}function Ff(e){var t=e;do{var s=t.alternate;if(e=t.return,(t.flags&32768)===0){if(s=Ig(s,t,kn),s!==null){_t=s;return}}else{if(s=Ag(s,t),s!==null){s.flags&=32767,_t=s;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{It=6,_t=null;return}}if(t=t.sibling,t!==null){_t=t;return}_t=t=e}while(t!==null);It===0&&(It=5)}function us(e,t,s){var o=Ve,d=Rn.transition;try{Rn.transition=null,Ve=1,Ug(e,t,s,o)}finally{Rn.transition=d,Ve=o}return null}function Ug(e,t,s,o){do Bs();while(Lr!==null);if((qe&6)!==0)throw Error(i(327));s=e.finishedWork;var d=e.finishedLanes;if(s===null)return null;if(e.finishedWork=null,e.finishedLanes=0,s===e.current)throw Error(i(177));e.callbackNode=null,e.callbackPriority=0;var f=s.lanes|s.childLanes;if(io(e,f),e===Pt&&(_t=Pt=null,Wt=0),(s.subtreeFlags&2064)===0&&(s.flags&2064)===0||qo||(qo=!0,Hf(vs,function(){return Bs(),null})),f=(s.flags&15990)!==0,(s.subtreeFlags&15990)!==0||f){f=Rn.transition,Rn.transition=null;var v=Ve;Ve=1;var T=qe;qe|=4,nc.current=null,Lg(e,s),Rf(s,e),lg(da),lo=!!ua,da=ua=null,e.current=s,Pg(s),Hl(),qe=T,Ve=v,Rn.transition=f}else e.current=s;if(qo&&(qo=!1,Lr=e,Ko=d),f=e.pendingLanes,f===0&&(Mr=null),ys(s.stateNode),hn(e,ht()),t!==null)for(o=e.onRecoverableError,s=0;s<t.length;s++)d=t[s],o(d.value,{componentStack:d.stack,digest:d.digest});if(Go)throw Go=!1,e=ic,ic=null,e;return(Ko&1)!==0&&e.tag!==0&&Bs(),f=e.pendingLanes,(f&1)!==0?e===oc?ji++:(ji=0,oc=e):ji=0,Rr(),null}function Bs(){if(Lr!==null){var e=ne(Ko),t=Rn.transition,s=Ve;try{if(Rn.transition=null,Ve=16>e?16:e,Lr===null)var o=!1;else{if(e=Lr,Lr=null,Ko=0,(qe&6)!==0)throw Error(i(331));var d=qe;for(qe|=4,ue=e.current;ue!==null;){var f=ue,v=f.child;if((ue.flags&16)!==0){var T=f.deletions;if(T!==null){for(var _=0;_<T.length;_++){var z=T[_];for(ue=z;ue!==null;){var X=ue;switch(X.tag){case 0:case 11:case 15:Ei(8,X,f)}var J=X.child;if(J!==null)J.return=X,ue=J;else for(;ue!==null;){X=ue;var Q=X.sibling,ae=X.return;if(Cf(X),X===z){ue=null;break}if(Q!==null){Q.return=ae,ue=Q;break}ue=ae}}}var de=f.alternate;if(de!==null){var pe=de.child;if(pe!==null){de.child=null;do{var Tt=pe.sibling;pe.sibling=null,pe=Tt}while(pe!==null)}}ue=f}}if((f.subtreeFlags&2064)!==0&&v!==null)v.return=f,ue=v;else e:for(;ue!==null;){if(f=ue,(f.flags&2048)!==0)switch(f.tag){case 0:case 11:case 15:Ei(9,f,f.return)}var A=f.sibling;if(A!==null){A.return=f.return,ue=A;break e}ue=f.return}}var j=e.current;for(ue=j;ue!==null;){v=ue;var M=v.child;if((v.subtreeFlags&2064)!==0&&M!==null)M.return=v,ue=M;else e:for(v=j;ue!==null;){if(T=ue,(T.flags&2048)!==0)try{switch(T.tag){case 0:case 11:case 15:Wo(9,T)}}catch(ge){wt(T,T.return,ge)}if(T===v){ue=null;break e}var re=T.sibling;if(re!==null){re.return=T.return,ue=re;break e}ue=T.return}}if(qe=d,Rr(),vn&&typeof vn.onPostCommitFiberRoot=="function")try{vn.onPostCommitFiberRoot(Yr,e)}catch{}o=!0}return o}finally{Ve=s,Rn.transition=t}}return!1}function Uf(e,t,s){t=zs(s,t),t=sf(e,t,1),e=Ir(e,t,1),t=sn(),e!==null&&(Jr(e,1,t),hn(e,t))}function wt(e,t,s){if(e.tag===3)Uf(e,e,s);else for(;t!==null;){if(t.tag===3){Uf(t,e,s);break}else if(t.tag===1){var o=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(Mr===null||!Mr.has(o))){e=zs(s,e),e=of(t,e,1),t=Ir(t,e,1),e=sn(),t!==null&&(Jr(t,1,e),hn(t,e));break}}t=t.return}}function Bg(e,t,s){var o=e.pingCache;o!==null&&o.delete(t),t=sn(),e.pingedLanes|=e.suspendedLanes&s,Pt===e&&(Wt&s)===s&&(It===4||It===3&&(Wt&130023424)===Wt&&500>ht()-sc?cs(e,0):rc|=s),hn(e,t)}function Bf(e,t){t===0&&((e.mode&1)===0?t=1:(t=ws,ws<<=1,(ws&130023424)===0&&(ws=4194304)));var s=sn();e=dr(e,t),e!==null&&(Jr(e,t,s),hn(e,s))}function Wg(e){var t=e.memoizedState,s=0;t!==null&&(s=t.retryLane),Bf(e,s)}function Hg(e,t){var s=0;switch(e.tag){case 13:var o=e.stateNode,d=e.memoizedState;d!==null&&(s=d.retryLane);break;case 19:o=e.stateNode;break;default:throw Error(i(314))}o!==null&&o.delete(t),Bf(e,s)}var Wf;Wf=function(e,t,s){if(e!==null)if(e.memoizedProps!==t.pendingProps||un.current)fn=!0;else{if((e.lanes&s)===0&&(t.flags&128)===0)return fn=!1,Dg(e,t,s);fn=(e.flags&131072)!==0}else fn=!1,ft&&(t.flags&1048576)!==0&&kd(t,Eo,t.index);switch(t.lanes=0,t.tag){case 2:var o=t.type;Uo(e,t),e=t.pendingProps;var d=Rs(t,Yt.current);Ps(t,s),d=La(null,t,o,e,d,s);var f=Pa();return t.flags|=1,typeof d=="object"&&d!==null&&typeof d.render=="function"&&d.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,dn(o)?(f=!0,To(t)):f=!1,t.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,ba(t),d.updater=$o,t.stateNode=d,d._reactInternals=t,Ba(t,o,e,s),t=Ga(null,t,o,!0,f,s)):(t.tag=0,ft&&f&&ya(t),rn(null,t,d,s),t=t.child),t;case 16:o=t.elementType;e:{switch(Uo(e,t),e=t.pendingProps,d=o._init,o=d(o._payload),t.type=o,d=t.tag=Gg(o),e=$n(o,e),d){case 0:t=Va(null,t,o,e,s);break e;case 1:t=mf(null,t,o,e,s);break e;case 11:t=uf(null,t,o,e,s);break e;case 14:t=df(null,t,o,$n(o.type,e),s);break e}throw Error(i(306,o,""))}return t;case 0:return o=t.type,d=t.pendingProps,d=t.elementType===o?d:$n(o,d),Va(e,t,o,d,s);case 1:return o=t.type,d=t.pendingProps,d=t.elementType===o?d:$n(o,d),mf(e,t,o,d,s);case 3:e:{if(gf(t),e===null)throw Error(i(387));o=t.pendingProps,f=t.memoizedState,d=f.element,Rd(e,t),Io(t,o,null,s);var v=t.memoizedState;if(o=v.element,f.isDehydrated)if(f={element:o,isDehydrated:!1,cache:v.cache,pendingSuspenseBoundaries:v.pendingSuspenseBoundaries,transitions:v.transitions},t.updateQueue.baseState=f,t.memoizedState=f,t.flags&256){d=zs(Error(i(423)),t),t=vf(e,t,o,s,d);break e}else if(o!==d){d=zs(Error(i(424)),t),t=vf(e,t,o,s,d);break e}else for(wn=_r(t.stateNode.containerInfo.firstChild),xn=t,ft=!0,zn=null,s=bd(t,null,o,s),t.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(As(),o===d){t=pr(e,t,s);break e}rn(e,t,o,s)}t=t.child}return t;case 5:return Ad(t),e===null&&ka(t),o=t.type,d=t.pendingProps,f=e!==null?e.memoizedProps:null,v=d.children,fa(o,d)?v=null:f!==null&&fa(o,f)&&(t.flags|=32),hf(e,t),rn(e,t,v,s),t.child;case 6:return e===null&&ka(t),null;case 13:return yf(e,t,s);case 4:return ja(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=Ms(t,null,o,s):rn(e,t,o,s),t.child;case 11:return o=t.type,d=t.pendingProps,d=t.elementType===o?d:$n(o,d),uf(e,t,o,d,s);case 7:return rn(e,t,t.pendingProps,s),t.child;case 8:return rn(e,t,t.pendingProps.children,s),t.child;case 12:return rn(e,t,t.pendingProps.children,s),t.child;case 10:e:{if(o=t.type._context,d=t.pendingProps,f=t.memoizedProps,v=d.value,lt(jo,o._currentValue),o._currentValue=v,f!==null)if(On(f.value,v)){if(f.children===d.children&&!un.current){t=pr(e,t,s);break e}}else for(f=t.child,f!==null&&(f.return=t);f!==null;){var T=f.dependencies;if(T!==null){v=f.child;for(var _=T.firstContext;_!==null;){if(_.context===o){if(f.tag===1){_=fr(-1,s&-s),_.tag=2;var z=f.updateQueue;if(z!==null){z=z.shared;var X=z.pending;X===null?_.next=_:(_.next=X.next,X.next=_),z.pending=_}}f.lanes|=s,_=f.alternate,_!==null&&(_.lanes|=s),Ea(f.return,s,t),T.lanes|=s;break}_=_.next}}else if(f.tag===10)v=f.type===t.type?null:f.child;else if(f.tag===18){if(v=f.return,v===null)throw Error(i(341));v.lanes|=s,T=v.alternate,T!==null&&(T.lanes|=s),Ea(v,s,t),v=f.sibling}else v=f.child;if(v!==null)v.return=f;else for(v=f;v!==null;){if(v===t){v=null;break}if(f=v.sibling,f!==null){f.return=v.return,v=f;break}v=v.return}f=v}rn(e,t,d.children,s),t=t.child}return t;case 9:return d=t.type,o=t.pendingProps.children,Ps(t,s),d=bn(d),o=o(d),t.flags|=1,rn(e,t,o,s),t.child;case 14:return o=t.type,d=$n(o,t.pendingProps),d=$n(o.type,d),df(e,t,o,d,s);case 15:return ff(e,t,t.type,t.pendingProps,s);case 17:return o=t.type,d=t.pendingProps,d=t.elementType===o?d:$n(o,d),Uo(e,t),t.tag=1,dn(o)?(e=!0,To(t)):e=!1,Ps(t,s),nf(t,o,d),Ba(t,o,d,s),Ga(null,t,o,!0,e,s);case 19:return wf(e,t,s);case 22:return pf(e,t,s)}throw Error(i(156,t.tag))};function Hf(e,t){return Zs(e,t)}function Vg(e,t,s,o){this.tag=e,this.key=s,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=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Dn(e,t,s,o){return new Vg(e,t,s,o)}function fc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Gg(e){if(typeof e=="function")return fc(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ye)return 11;if(e===K)return 14}return 2}function zr(e,t){var s=e.alternate;return s===null?(s=Dn(e.tag,t,e.key,e.mode),s.elementType=e.elementType,s.type=e.type,s.stateNode=e.stateNode,s.alternate=e,e.alternate=s):(s.pendingProps=t,s.type=e.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=e.flags&14680064,s.childLanes=e.childLanes,s.lanes=e.lanes,s.child=e.child,s.memoizedProps=e.memoizedProps,s.memoizedState=e.memoizedState,s.updateQueue=e.updateQueue,t=e.dependencies,s.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},s.sibling=e.sibling,s.index=e.index,s.ref=e.ref,s}function Zo(e,t,s,o,d,f){var v=2;if(o=e,typeof e=="function")fc(e)&&(v=1);else if(typeof e=="string")v=5;else e:switch(e){case Z:return ds(s.children,d,f,t);case U:v=8,d|=8;break;case te:return e=Dn(12,s,t,d|2),e.elementType=te,e.lanes=f,e;case Te:return e=Dn(13,s,t,d),e.elementType=Te,e.lanes=f,e;case Le:return e=Dn(19,s,t,d),e.elementType=Le,e.lanes=f,e;case we:return Jo(s,d,f,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case q:v=10;break e;case ie:v=9;break e;case ye:v=11;break e;case K:v=14;break e;case xe:v=16,o=null;break e}throw Error(i(130,e==null?e:typeof e,""))}return t=Dn(v,s,t,d),t.elementType=e,t.type=o,t.lanes=f,t}function ds(e,t,s,o){return e=Dn(7,e,o,t),e.lanes=s,e}function Jo(e,t,s,o){return e=Dn(22,e,o,t),e.elementType=we,e.lanes=s,e.stateNode={isHidden:!1},e}function pc(e,t,s){return e=Dn(6,e,null,t),e.lanes=s,e}function hc(e,t,s){return t=Dn(4,e.children!==null?e.children:[],e.key,t),t.lanes=s,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function qg(e,t,s,o,d){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=ti(0),this.expirationTimes=ti(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ti(0),this.identifierPrefix=o,this.onRecoverableError=d,this.mutableSourceEagerHydrationData=null}function mc(e,t,s,o,d,f,v,T,_){return e=new qg(e,t,s,T,_),t===1?(t=1,f===!0&&(t|=8)):t=0,f=Dn(3,null,null,t),e.current=f,f.stateNode=e,f.memoizedState={element:o,isDehydrated:s,cache:null,transitions:null,pendingSuspenseBoundaries:null},ba(f),e}function Kg(e,t,s){var o=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ee,key:o==null?null:""+o,children:e,containerInfo:t,implementation:s}}function Vf(e){if(!e)return jr;e=e._reactInternals;e:{if(Qe(e)!==e||e.tag!==1)throw Error(i(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(dn(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(i(171))}if(e.tag===1){var s=e.type;if(dn(s))return yd(e,s,t)}return t}function Gf(e,t,s,o,d,f,v,T,_){return e=mc(s,o,!0,e,d,f,v,T,_),e.context=Vf(null),s=e.current,o=sn(),d=Pr(s),f=fr(o,d),f.callback=t??null,Ir(s,f,d),e.current.lanes=d,Jr(e,d,o),hn(e,o),e}function el(e,t,s,o){var d=t.current,f=sn(),v=Pr(d);return s=Vf(s),t.context===null?t.context=s:t.pendingContext=s,t=fr(f,v),t.payload={element:e},o=o===void 0?null:o,o!==null&&(t.callback=o),e=Ir(d,t,v),e!==null&&(Bn(e,d,v,f),Do(e,d,v)),v}function tl(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 qf(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var s=e.retryLane;e.retryLane=s!==0&&s<t?s:t}}function gc(e,t){qf(e,t),(e=e.alternate)&&qf(e,t)}function Yg(){return null}var Kf=typeof reportError=="function"?reportError:function(e){console.error(e)};function vc(e){this._internalRoot=e}nl.prototype.render=vc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));el(e,t,null,null)},nl.prototype.unmount=vc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;as(function(){el(null,e,null,null)}),t[lr]=null}};function nl(e){this._internalRoot=e}nl.prototype.unstable_scheduleHydration=function(e){if(e){var t=fe();e={blockedOn:null,target:e,priority:t};for(var s=0;s<Nr.length&&t!==0&&t<Nr[s].priority;s++);Nr.splice(s,0,e),s===0&&Au(e)}};function yc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function rl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Yf(){}function Qg(e,t,s,o,d){if(d){if(typeof o=="function"){var f=o;o=function(){var z=tl(v);f.call(z)}}var v=Gf(t,o,e,0,null,!1,!1,"",Yf);return e._reactRootContainer=v,e[lr]=v.current,pi(e.nodeType===8?e.parentNode:e),as(),v}for(;d=e.lastChild;)e.removeChild(d);if(typeof o=="function"){var T=o;o=function(){var z=tl(_);T.call(z)}}var _=mc(e,0,!1,null,null,!1,!1,"",Yf);return e._reactRootContainer=_,e[lr]=_.current,pi(e.nodeType===8?e.parentNode:e),as(function(){el(t,_,s,o)}),_}function sl(e,t,s,o,d){var f=s._reactRootContainer;if(f){var v=f;if(typeof d=="function"){var T=d;d=function(){var _=tl(v);T.call(_)}}el(t,v,e,d)}else v=Qg(s,t,e,d,o);return tl(v)}S=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var s=Xr(t.pendingLanes);s!==0&&(Tr(t,s|1),hn(t,ht()),(qe&6)===0&&(Us=ht()+500,Rr()))}break;case 13:as(function(){var o=dr(e,1);if(o!==null){var d=sn();Bn(o,e,1,d)}}),gc(e,1)}},I=function(e){if(e.tag===13){var t=dr(e,134217728);if(t!==null){var s=sn();Bn(t,e,134217728,s)}gc(e,134217728)}},Y=function(e){if(e.tag===13){var t=Pr(e),s=dr(e,t);if(s!==null){var o=sn();Bn(s,e,t,o)}gc(e,t)}},fe=function(){return Ve},ve=function(e,t){var s=Ve;try{return Ve=e,t()}finally{Ve=s}},Gt=function(e,t,s){switch(t){case"input":if(He(e,s),t=s.name,s.type==="radio"&&t!=null){for(s=e;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<s.length;t++){var o=s[t];if(o!==e&&o.form===e.form){var d=ko(o);if(!d)throw Error(i(90));Me(o),He(o,d)}}}break;case"textarea":Ue(e,s);break;case"select":t=s.value,t!=null&&F(e,!!s.multiple,t,!1)}},Et=cc,kt=as;var Xg={usingClientEntryPoint:!1,Events:[gi,bs,ko,Ct,an,cc]},Ri={findFiberByHostInstance:es,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Zg={bundleType:Ri.bundleType,version:Ri.version,rendererPackageName:Ri.rendererPackageName,rendererConfig:Ri.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:O.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=gs(e),e===null?null:e.stateNode},findFiberByHostInstance:Ri.findFiberByHostInstance||Yg,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 il=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!il.isDisabled&&il.supportsFiber)try{Yr=il.inject(Zg),vn=il}catch{}}return mn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Xg,mn.createPortal=function(e,t){var s=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!yc(t))throw Error(i(200));return Kg(e,t,null,s)},mn.createRoot=function(e,t){if(!yc(e))throw Error(i(299));var s=!1,o="",d=Kf;return t!=null&&(t.unstable_strictMode===!0&&(s=!0),t.identifierPrefix!==void 0&&(o=t.identifierPrefix),t.onRecoverableError!==void 0&&(d=t.onRecoverableError)),t=mc(e,1,!1,null,null,s,!1,o,d),e[lr]=t.current,pi(e.nodeType===8?e.parentNode:e),new vc(t)},mn.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(i(188)):(e=Object.keys(e).join(","),Error(i(268,e)));return e=gs(t),e=e===null?null:e.stateNode,e},mn.flushSync=function(e){return as(e)},mn.hydrate=function(e,t,s){if(!rl(t))throw Error(i(200));return sl(null,e,t,!0,s)},mn.hydrateRoot=function(e,t,s){if(!yc(e))throw Error(i(405));var o=s!=null&&s.hydratedSources||null,d=!1,f="",v=Kf;if(s!=null&&(s.unstable_strictMode===!0&&(d=!0),s.identifierPrefix!==void 0&&(f=s.identifierPrefix),s.onRecoverableError!==void 0&&(v=s.onRecoverableError)),t=Gf(t,null,e,1,s??null,d,!1,f,v),e[lr]=t.current,pi(e),o)for(e=0;e<o.length;e++)s=o[e],d=s._getVersion,d=d(s._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[s,d]:t.mutableSourceEagerHydrationData.push(s,d);return new nl(t)},mn.render=function(e,t,s){if(!rl(t))throw Error(i(200));return sl(null,e,t,!1,s)},mn.unmountComponentAtNode=function(e){if(!rl(e))throw Error(i(40));return e._reactRootContainer?(as(function(){sl(null,null,e,!1,function(){e._reactRootContainer=null,e[lr]=null})}),!0):!1},mn.unstable_batchedUpdates=cc,mn.unstable_renderSubtreeIntoContainer=function(e,t,s,o){if(!rl(s))throw Error(i(200));if(e==null||e._reactInternals===void 0)throw Error(i(38));return sl(e,t,s,!1,o)},mn.version="18.3.1-next-f1338f8080-20240426",mn}var rp;function ph(){if(rp)return kc.exports;rp=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),kc.exports=lv(),kc.exports}var sp;function av(){if(sp)return ol;sp=1;var n=ph();return ol.createRoot=n.createRoot,ol.hydrateRoot=n.hydrateRoot,ol}var cv=av();const uv=fh(cv),ip=n=>{let r;const i=new Set,l=(m,y)=>{const x=typeof m=="function"?m(r):m;if(!Object.is(x,r)){const w=r;r=y??(typeof x!="object"||x===null)?x:Object.assign({},r,x),i.forEach(N=>N(r,w))}},a=()=>r,h={setState:l,getState:a,getInitialState:()=>g,subscribe:m=>(i.add(m),()=>i.delete(m))},g=r=n(l,a,h);return h},dv=(n=>n?ip(n):ip),fv=n=>n;function pv(n,r=fv){const i=nt.useSyncExternalStore(n.subscribe,nt.useCallback(()=>r(n.getState()),[n,r]),nt.useCallback(()=>r(n.getInitialState()),[n,r]));return nt.useDebugValue(i),i}const hv=n=>{const r=dv(n),i=l=>pv(r,l);return Object.assign(i,r),i},mv=(n=>hv),hh="agentpane:machines",mh="agentpane:active-machine";function gv(n){return/^[a-z][a-z0-9-]{1,30}$/.test(n)}function gh(n){return`${n}.repoburg.com`}function iu(n){const r=/^([a-z][a-z0-9-]{1,30})\.repoburg\.com$/.exec(n);return r?r[1]:null}function vh(n,r){try{const i=localStorage.getItem(n);return i==null?r:JSON.parse(i)}catch{return r}}function yh(n,r){try{localStorage.setItem(n,JSON.stringify(r))}catch{}}function xh(){return vh(hh,[]).filter(r=>gv(r.mahlas)&&r.hostname===gh(r.mahlas))}function vv(n){const r={mahlas:n,hostname:gh(n),lastConnectedAt:new Date().toISOString()},i=xh(),l=[r,...i.filter(a=>a.mahlas!==n)];return yh(hh,l),r}function yv(){const n=vh(mh,null);return n?xh().find(r=>r.mahlas===n)??null:null}function xv(n){yh(mh,n)}function wv(){if(typeof window>"u")return;const n=new URLSearchParams(window.location.search).get("host");if(!n)return;const r=iu(n);r&&(vv(r),xv(r))}const op="http://localhost:9998",kv=["agent.repoburg.com"];function Wr(){if(typeof window>"u")return"";const n=new URLSearchParams(window.location.search),r=n.get("bport");if(r)return`http://localhost:${r}`;const i=n.get("host");if(i)return`https://${i}`;const l=window.location.hostname;if(kv.includes(l))return op;if(iu(l))return"";const a=yv();return a?`https://${a.hostname}`:l==="localhost"||l==="127.0.0.1"||l==="0.0.0.0"?"":op}const Sv="/api";async function Rl(n,r,i){const l=await fetch(`${Wr()}${Sv}${r}`,{method:n,headers:i?{"Content-Type":"application/json"}:void 0,body:i?JSON.stringify(i):void 0});if(!l.ok)throw new Error(`${n} ${r} failed: ${l.status} ${l.statusText}`);return l.json()}function Gr(n){return Rl("GET",n)}function Tn(n,r){return Rl("POST",n,r)}function ou(n){return Rl("DELETE",n)}function Jn(n,r){return Rl("PATCH",n,r)}function Tv(){return Gr("/sessions")}function ll(n){return Gr(`/sessions/${n}`)}function wh(n){return Tn("/sessions",n)}function Nv(n){return ou(`/sessions/${n}`)}function Cv(n,r,i){return Tn(`/sessions/${n}/turns`,{user_prompt:r,...i!=null&&i.length?{attachments:i}:{}})}function Ev(n){return Tn(`/sessions/${n}/cancel`)}function _v(n,r){return Jn(`/sessions/${n}`,{title:r})}function bv(n){return Jn(`/sessions/${n}`,{lifecycle:"finished"})}function jv(n){return Jn(`/sessions/${n}`,{lifecycle:"working"})}function Rv(n,r){return Jn(`/sessions/${n}`,{starred:r})}function lp(n){return Jn(`/sessions/${n}`,{has_unreviewed:0})}function Dv(n,r,i,l){const a={model:r,model_reasoning_effort:i};return l!==void 0&&(a.runtime_type=l),Jn(`/sessions/${n}`,a)}function Iv(n,r){return Jn(`/sessions/${n}`,{runtime_config:r})}function Av(n,r){return Tn(`/sessions/${n}/rewind`,{turn_id:r})}function Mv(n){return Tn(`/sessions/${n}/restore`,{})}function Lv(n,r,i){return Tn(`/sessions/${n}/branch`,{turn_id:r,title:i})}function kh(){return Gr("/workspaces")}function Pv(n,r){return Tn("/workspaces",{path:n,label:r})}function Ov(n){return Tn("/workspaces/hide",{path:n})}async function zv(){const n=await fetch(`${Wr()}/api/pick-directory`);if(n.status===204)return{cancelled:!0};if(!n.ok)throw new Error(`GET /api/pick-directory failed: ${n.status} ${n.statusText}`);return n.json()}function Sh(){return Gr("/folders")}function $v(n,r){return Tn("/folders",{workspace_path:n,name:r})}function ap(n,r){return Jn(`/folders/${n}`,r)}function Fv(n){return ou(`/folders/${n}`)}function Uv(n){return Tn("/sessions/reorder",{moves:n})}const Bv=(n,r)=>({sessions:[],sessionDetails:{},activeSessionId:null,openTabs:[],activeTurnIndex:0,submittingPrompt:null,restoredPrompt:null,quotedText:null,init:async()=>{try{const i=localStorage.getItem("agentpane:last-model-config");i&&n({lastModelConfig:JSON.parse(i)})}catch{}n({loading:!0,error:null});try{const[i,l,a]=await Promise.all([Tv(),kh(),Sh()]);n({sessions:i,workspaces:l,folders:a,loading:!1}),i.length>0&&!r().activeSessionId&&await r().selectSession(i[0].id)}catch(i){n({loading:!1,error:i.message})}},selectSession:async i=>{if(r().sessionDetails[i]){const l=r().sessionDetails[i];n({activeSessionId:i,activeTurnIndex:l.turns.length>0?l.turns.length-1:0,activeRightTab:"turns",openTabs:r().openTabs.includes(i)?r().openTabs:[...r().openTabs,i]}),l.has_unreviewed===1&&(lp(i).catch(()=>{}),n(a=>({sessions:a.sessions.map(c=>c.id===i?{...c,has_unreviewed:0}:c),sessionDetails:{...a.sessionDetails,[i]:{...l,has_unreviewed:0}}})));return}n({loading:!0,error:null});try{const l=await ll(i);n(a=>({sessionDetails:{...a.sessionDetails,[i]:l},activeSessionId:i,activeTurnIndex:l.turns.length>0?l.turns.length-1:0,activeRightTab:"turns",loading:!1})),l.has_unreviewed===1&&(lp(i).catch(()=>{}),n(a=>({sessions:a.sessions.map(c=>c.id===i?{...c,has_unreviewed:0}:c),sessionDetails:{...a.sessionDetails,[i]:{...l,has_unreviewed:0}}})))}catch(l){n({loading:!1,error:l.message})}},closeTab:i=>{n(l=>{const a=l.openTabs.filter(c=>c!==i);if(l.activeSessionId===i&&a.length>0){const c=a[a.length-1],p=l.sessionDetails[c];return{openTabs:a,activeSessionId:c,activeTurnIndex:p&&p.turns.length>0?p.turns.length-1:0}}return{openTabs:a,activeSessionId:l.activeSessionId===i?null:l.activeSessionId}})},updateModelConfig:async(i,l,a)=>{const c=r().activeSessionId;if(c){n({error:null});try{const p=await Dv(c,i,l,a),h={provider:p.runtime_type,model:p.model??"",reasoning:p.model_reasoning_effort??""};n({lastModelConfig:h}),localStorage.setItem("agentpane:last-model-config",JSON.stringify(h)),n(g=>({sessions:g.sessions.map(m=>m.id===c?p:m),sessionDetails:g.sessionDetails[c]?{...g.sessionDetails,[c]:{...g.sessionDetails[c],model:p.model,model_reasoning_effort:p.model_reasoning_effort,external_thread_id:p.external_thread_id}}:g.sessionDetails})),await r().refreshActiveSession()}catch(p){n({error:p.message}),r().addToast("error",`Failed to update model — ${p.message}`)}}},createSession:async i=>{n({error:null});try{const l=await wh(i);n(c=>({sessions:[l,...c.sessions],showNewSessionDialog:!1}));const a={provider:l.runtime_type,model:l.model??"",reasoning:l.model_reasoning_effort??""};n({lastModelConfig:a}),localStorage.setItem("agentpane:last-model-config",JSON.stringify(a)),await r().selectSession(l.id),r().addLogEntry("INFO",`Session created — ${l.id.slice(0,8)}`),r().addToast("success",`Session created — ${l.title||l.id.slice(0,8)}`)}catch(l){n({error:l.message}),r().addToast("error",`Failed to create session — ${l.message}`)}},deleteSession:async i=>{var a;n({error:null});const l=(a=r().sessions.find(c=>c.id===i))==null?void 0:a.title;try{await Nv(i),n(c=>{const p={...c.sessionDetails};delete p[i];const h=c.openTabs.filter(y=>y!==i);let g=c.activeSessionId,m=c.activeTurnIndex;if(c.activeSessionId===i){g=h.length>0?h[h.length-1]:null;const y=g?p[g]:null;m=y&&y.turns.length>0?y.turns.length-1:0}return{sessions:c.sessions.filter(y=>y.id!==i),sessionDetails:p,openTabs:h,activeSessionId:g,activeTurnIndex:m}}),r().addLogEntry("INFO",`Session deleted — ${i.slice(0,8)}`),r().addToast("info",`Session "${l||i.slice(0,8)}" deleted`)}catch(c){n({error:c.message}),r().addToast("error",`Failed to delete session — ${c.message}`)}},renameSession:async(i,l)=>{n({error:null});try{const a=await _v(i,l.trim());n(c=>({sessions:c.sessions.map(p=>p.id===i?a:p),sessionDetails:c.sessionDetails[i]?{...c.sessionDetails,[i]:{...c.sessionDetails[i],title:a.title}}:c.sessionDetails}))}catch(a){n({error:a.message}),r().addToast("error",`Failed to rename session — ${a.message}`)}},markFinished:async i=>{n({error:null});try{const l=await bv(i);n(a=>({sessions:a.sessions.map(c=>c.id===i?l:c)})),r().addToast("info","Session marked as finished")}catch(l){n({error:l.message}),r().addToast("error",`Failed to mark as finished — ${l.message}`)}},toggleStar:async i=>{const l=r().sessions.find(a=>a.id===i);if(l){n({error:null});try{const a=await Rv(i,l.starred?0:1);n(c=>({sessions:c.sessions.map(p=>p.id===i?a:p),sessionDetails:c.sessionDetails[i]?{...c.sessionDetails,[i]:{...c.sessionDetails[i],starred:a.starred}}:c.sessionDetails}))}catch(a){n({error:a.message}),r().addToast("error",`Failed to star session — ${a.message}`)}}},reopenSession:async i=>{n({error:null});try{const l=await jv(i);n(a=>({sessions:a.sessions.map(c=>c.id===i?l:c)})),r().addToast("info","Session reopened")}catch(l){n({error:l.message}),r().addToast("error",`Failed to reopen session — ${l.message}`)}},submitPrompt:async(i,l)=>{const a=r().activeSessionId;if(a){n({error:null,submittingPrompt:i}),n(c=>{const p=c.sessionDetails[a];return p?{sessionDetails:{...c.sessionDetails,[a]:{...p,is_running:1,status:"running"}},sessions:c.sessions.map(h=>h.id===a?{...h,is_running:1,status:"running"}:h)}:{}});try{const c=await Cv(a,i,l);r().addLogEntry("INFO",`Turn submitted — "${i.slice(0,40)}"`),n(p=>{const h=p.sessionDetails[a];if(!h)return{submittingPrompt:null};const g={...c,items:[]};return{submittingPrompt:null,sessionDetails:{...p.sessionDetails,[a]:{...h,turns:[...h.turns,g]}},activeTurnIndex:h.turns.length}})}catch(c){n({submittingPrompt:null,error:c.message}),r().addLogEntry("ERROR",`Turn failed — ${c.message}`),r().addToast("error",`Failed to send prompt — ${c.message}`),n(p=>({sessionDetails:p.sessionDetails[a]?{...p.sessionDetails,[a]:{...p.sessionDetails[a],is_running:0,status:"active"}}:p.sessionDetails,sessions:p.sessions.map(h=>h.id===a?{...h,is_running:0,status:"active"}:h)}))}}},cancelTurn:async()=>{const i=r().activeSessionId;if(i)try{await Ev(i)}catch(l){n({error:l.message})}},rewindToTurn:async(i,l)=>{n({error:null});try{const a=await Av(i,l),c=await ll(i);n(p=>({sessionDetails:{...p.sessionDetails,[i]:c},sessions:p.sessions.map(h=>h.id===i?{...h,external_thread_id:a.external_thread_id,is_running:0,status:"active"}:h),activeTurnIndex:c.turns.length>0?c.turns.length-1:0})),r().addToast("info","Rewound to selected turn")}catch(a){n({error:a.message}),r().addToast("error",`Failed to rewind — ${a.message}`)}},restoreSession:async i=>{n({error:null});try{const l=await Mv(i),a=await ll(i);n(c=>({sessionDetails:{...c.sessionDetails,[i]:a},sessions:c.sessions.map(p=>p.id===i?{...p,external_thread_id:l.external_thread_id,is_running:0,status:"active"}:p),activeTurnIndex:a.turns.length>0?a.turns.length-1:0})),r().addToast("info","Restored rewound session")}catch(l){n({error:l.message}),r().addToast("error",`Failed to restore — ${l.message}`)}},branchFromTurn:async(i,l,a)=>{n({error:null});try{const c=await Lv(i,l,a);n(p=>({sessions:[c,...p.sessions]})),await r().selectSession(c.id),r().addToast("success","Branched from selected turn")}catch(c){n({error:c.message}),r().addToast("error",`Failed to branch — ${c.message}`)}},updateRuntimeConfig:async i=>{const l=r().activeSessionId;if(l){n({error:null});try{const a=await Iv(l,JSON.stringify(i));n(c=>({sessions:c.sessions.map(p=>p.id===l?a:p),sessionDetails:c.sessionDetails[l]?{...c.sessionDetails,[l]:{...c.sessionDetails[l],runtime_config:a.runtime_config}}:c.sessionDetails}))}catch(a){n({error:a.message}),r().addToast("error",`Failed to update config — ${a.message}`)}}},refreshActiveSession:async()=>{const i=r().activeSessionId;if(i)try{const l=await ll(i);n(a=>({sessionDetails:{...a.sessionDetails,[i]:l},activeTurnIndex:l.turns.length>0?Math.min(a.activeTurnIndex,l.turns.length-1):0,sessions:a.sessions.map(c=>c.id===i?{...c,is_running:l.is_running,status:l.status}:c)}))}catch(l){n({error:l.message})}}}),Wv=(n,r)=>({workspaces:[],addWorkspace:async i=>{n({error:null});try{const l=await Pv(i.trim());n(a=>({workspaces:[...a.workspaces,l]})),r().addToast("success",`Workspace added — ${l.path}`)}catch(l){r().addToast("error",`Failed to add workspace — ${l.message}`)}},removeWorkspace:async i=>{n({error:null});try{await Ov(i);const l=await kh();n({workspaces:l}),r().addToast("info","Workspace hidden")}catch(l){r().addToast("error",`Failed to hide workspace — ${l.message}`)}},createSessionInWorkspace:async i=>{n({error:null});try{const l=r().lastModelConfig,a=await wh({cwd:i,runtime_type:(l==null?void 0:l.provider)??"codex",model:l==null?void 0:l.model,model_reasoning_effort:l==null?void 0:l.reasoning});n(c=>({sessions:[a,...c.sessions]})),await r().selectSession(a.id),r().addLogEntry("INFO",`Session created in ${i} — ${a.id.slice(0,8)}`),r().addToast("success",`Session created in ${i.split("/").pop()||i}`)}catch(l){n({error:l.message}),r().addToast("error",`Failed to create session — ${l.message}`)}},pickAndAddWorkspace:async()=>{try{const i=await zv();if(i.cancelled||!i.path)return;await r().addWorkspace(i.path)}catch(i){r().addToast("error",`Failed to pick directory — ${i.message}`)}}}),Hv=(n,r)=>({wsConnected:!1,setWsConnected:i=>n({wsConnected:i}),onTurnStarted:(i,l)=>{r().addLogEntry("DEBUG",`turn:started — ${l.slice(0,8)}`),n(a=>{const c=a.sessionDetails[i];if(!c)return{};const p=c.turns.findIndex(h=>h.id===l);return{sessionDetails:{...a.sessionDetails,[i]:{...Fr(c,l,h=>({...h,status:"running"})),is_running:1,status:"running"}},sessions:a.sessions.map(h=>h.id===i?{...h,is_running:1,status:"running"}:h),activeTurnIndex:a.activeSessionId===i&&p>=0?p:a.activeTurnIndex}})},onItemStarted:(i,l,a)=>{r().addLogEntry("DEBUG",`item:started — ${a.type}`),n(c=>{const p=c.sessionDetails[i];return p?{sessionDetails:{...c.sessionDetails,[i]:Fr(p,l,h=>Nc(h,a))}}:{}})},onItemUpdated:(i,l,a)=>{n(c=>{const p=c.sessionDetails[i];return p?{sessionDetails:{...c.sessionDetails,[i]:Fr(p,l,h=>Nc(h,a))}}:{}})},onItemCompleted:(i,l,a)=>{if(r().addLogEntry("DEBUG",`item:completed — ${a.type}`),a.type==="background_task"&&(a.status==="completed"||a.status==="failed")){const c=a.data||{},p=c.task_type||"unknown",h=c.description||"background task",m=p==="local_agent"?"Subagent":p==="local_bash"?"Monitor":"Task";a.status==="completed"?r().addToast("success",`${m} completed: ${h}`):r().addToast("error",`${m} failed: ${h}`)}n(c=>{const p=c.sessionDetails[i];return p?{sessionDetails:{...c.sessionDetails,[i]:Fr(p,l,h=>{var m,y;let g=Nc(h,a);if(a.type==="agent_message"&&((m=a.data)!=null&&m.text)&&(g={...g,agent_response:a.data.text}),a.type==="reasoning"&&((y=a.data)!=null&&y.text)){const x=g.thoughts?g.thoughts+`
|
|
41
|
+
`+a.data.text:a.data.text;g={...g,thoughts:x}}return g})}}:{}})},onItemDelta:(i,l,a,c)=>{n(p=>{const h=p.sessionDetails[i];return h?{sessionDetails:{...p.sessionDetails,[i]:Fr(h,l,g=>Vv(g,a,c))}}:{}})},onTurnCompleted:(i,l,a,c,p)=>{const h=(a==null?void 0:a.input_tokens)??0,g=(a==null?void 0:a.output_tokens)??0;r().addLogEntry("INFO",`turn:completed — ${h} in / ${g} out`),n(m=>{const y=m.sessionDetails[i];return y?{sessionDetails:{...m.sessionDetails,[i]:{...Fr(y,l,x=>({...x,status:"completed",token_usage:a??x.token_usage??null,...p&&!x.agent_response?{agent_response:p}:{}})),is_running:0,status:"active",has_unreviewed:c?1:y.has_unreviewed}},sessions:m.sessions.map(x=>x.id===i?{...x,is_running:0,status:"active",has_unreviewed:c?1:x.has_unreviewed}:x)}:{}})},onTokenUsageUpdated:(i,l,a)=>{n(c=>{const p=c.sessionDetails[i];return p?{sessionDetails:{...c.sessionDetails,[i]:Fr(p,l,h=>({...h,token_usage:a}))}}:{}})},onContextUsageUpdated:(i,l)=>{n(a=>{const c=a.sessionDetails[i];return c?{sessionDetails:{...a.sessionDetails,[i]:{...c,contextUsage:l}}}:{}})},onTurnFailed:(i,l,a)=>{r().addLogEntry("ERROR",`turn:failed — ${a}`),r().addToast("error",`Turn failed — ${a}`),n(c=>{const p=c.sessionDetails[i];if(!p)return{};const h=a.includes("cancelled")||a.includes("aborted"),g=h?"aborted":"failed";return{sessionDetails:{...c.sessionDetails,[i]:{...Fr(p,l,m=>({...m,status:g,error:a,items:m.items.map(y=>y.status==="in_progress"?{...y,status:"failed"}:y)})),is_running:0,status:h?"active":"failed"}},sessions:c.sessions.map(m=>m.id===i?{...m,is_running:0,status:h?"active":"failed"}:m)}})},onTurnCancelled:(i,l)=>{n(a=>{const c=a.sessionDetails[i];if(!c)return{};const h=[...c.turns,...(c.threads??[]).flatMap(y=>y.turns??[])].find(y=>y.id===l),g=(h==null?void 0:h.user_prompt)??null,m=c.turns.filter(y=>y.id!==l);return{restoredPrompt:g,sessionDetails:{...a.sessionDetails,[i]:{...c,is_running:0,status:"active",turns:m,threads:(c.threads??[]).map(y=>({...y,turns:(y.turns??[]).filter(x=>x.id!==l)}))}},sessions:a.sessions.map(y=>y.id===i?{...y,is_running:0,status:"active"}:y),activeTurnIndex:m.length>0?Math.min(a.activeTurnIndex,m.length-1):0}})},onSessionTitle:(i,l)=>{n(a=>({sessions:a.sessions.map(c=>c.id===i?{...c,title:l}:c),sessionDetails:a.sessionDetails[i]?{...a.sessionDetails,[i]:{...a.sessionDetails[i],title:l}}:a.sessionDetails}))},onBackgroundTasksChanged:(i,l)=>{n(a=>{const c=a.sessionDetails[i];return c?{sessionDetails:{...a.sessionDetails,[i]:{...c,backgroundTasks:l}}}:{}})}});function Fr(n,r,i){return{...n,turns:n.turns.map(l=>l.id===r?i(l):l),threads:(n.threads??[]).map(l=>({...l,turns:(l.turns??[]).map(a=>a.id===r?i(a):a)}))}}function Nc(n,r){const i=n.items.findIndex(l=>l.external_item_id===r.external_item_id);if(i>=0){const l=[...n.items];return l[i]=r,{...n,items:l}}if(r.type==="agent_message"){const l=n.items.filter(a=>!(a.type==="agent_message"&&a.id.startsWith("delta-")));return{...n,items:[...l,r]}}return{...n,items:[...n.items,r]}}function Vv(n,r,i){var c;const l=n.items.findIndex(p=>p.external_item_id===r);if(l>=0){const p=n.items[l],g=(((c=p.data)==null?void 0:c.text)??"")+i,m=[...n.items];return m[l]={...p,data:{...p.data,text:g}},{...n,items:m,agent_response:g}}const a={id:`delta-${r}`,turn_id:n.id,external_item_id:r,type:"agent_message",data:{text:i},status:"in_progress",created_at:new Date().toISOString(),updated_at:new Date().toISOString()};return{...n,items:[...n.items,a],agent_response:i}}function Gv(n,r){const i=r?`?cwd=${encodeURIComponent(r)}`:"";return Gr(`/providers/${n}/models${i}`)}const zc=160,$c=480,qv=240,yl=220,Kv=300,Yv=600;function xl(){return typeof window>"u"?Yv:Math.max(yl,Math.round(window.innerWidth*.7))}const cp="agentpane:sidebar-width",up="agentpane:right-panel-width";function dp(n,r,i,l){try{const a=localStorage.getItem(n);if(a==null)return l;const c=Number(a);return Number.isFinite(c)?Math.min(i,Math.max(r,c)):l}catch{return l}}const Qv=(n,r)=>({activeRightTab:"turns",changesScope:"session",eventLog:[],loading:!1,error:null,showNewSessionDialog:!1,showRemoteModal:!1,toasts:[],showCommandPalette:!1,selectedChangePath:null,lastModelConfig:null,models:[],modelsLoading:!1,showModelSelector:!1,sidebarWidth:dp(cp,zc,$c,qv),rightPanelWidth:dp(up,yl,xl(),Kv),setActiveTurnIndex:i=>n({activeTurnIndex:i}),switchRightTab:i=>n({activeRightTab:i}),setChangesScope:i=>n({changesScope:i}),setShowNewSessionDialog:i=>n({showNewSessionDialog:i}),setShowRemoteModal:i=>n({showRemoteModal:i}),setShowCommandPalette:i=>n({showCommandPalette:i}),setShowModelSelector:i=>n({showModelSelector:i}),setSelectedChangePath:i=>n({selectedChangePath:i}),setSidebarWidth:i=>{const l=Math.min($c,Math.max(zc,Math.round(i)));n({sidebarWidth:l});try{localStorage.setItem(cp,String(l))}catch{}},setRightPanelWidth:i=>{const l=Math.min(xl(),Math.max(yl,Math.round(i)));n({rightPanelWidth:l});try{localStorage.setItem(up,String(l))}catch{}},addToast:(i,l,a,c)=>{const p=Math.random().toString(36).slice(2,9);n(h=>({toasts:[...h.toasts,{id:p,type:i,message:l,undoAction:a,undoLabel:c}]}))},removeToast:i=>{n(l=>({toasts:l.toasts.filter(a=>a.id!==i)}))},addLogEntry:(i,l)=>{const a=new Date().toLocaleTimeString("en-GB",{hour12:!1});n(c=>({eventLog:[...c.eventLog,{time:a,level:i,message:l}]}))},loadModels:async(i,l)=>{if(!r().modelsLoading){n({modelsLoading:!0,models:[]});try{const a=await Gv(i,l);n({models:a,modelsLoading:!1})}catch{n({modelsLoading:!1})}}}}),Xv=(n,r)=>({createThread:async(i,l)=>{try{await Tn(`/sessions/${i}/threads`,l),r().addLogEntry("INFO",`Thread created — "${l.message.slice(0,40)}"`)}catch(a){r().addToast("error",`Failed to create thread — ${a.message}`)}},followupThread:async(i,l,a)=>{try{await Tn(`/sessions/${i}/threads/${l}/followup`,{message:a}),r().addLogEntry("INFO",`Thread follow-up — "${a.slice(0,40)}"`)}catch(c){r().addToast("error",`Failed to send follow-up — ${c.message}`)}},resolveThread:async(i,l)=>{try{await Jn(`/sessions/${i}/threads/${l}`,{status:"resolved"})}catch(a){r().addToast("error",`Failed to resolve thread — ${a.message}`)}},reopenThread:async(i,l)=>{try{await Jn(`/sessions/${i}/threads/${l}`,{status:"open"})}catch(a){r().addToast("error",`Failed to reopen thread — ${a.message}`)}},shareThread:async(i,l,a)=>{try{const c=await Tn(`/sessions/${i}/threads/${l}/summarize`,{directives:a}),p=`
|
|
42
|
+
[Shared from a resolved discussion thread — summary of its findings]
|
|
43
|
+
|
|
44
|
+
\`\`\`QUOTE
|
|
45
|
+
${c.summary}
|
|
46
|
+
\`\`\`
|
|
47
|
+
|
|
48
|
+
`;return n({quotedText:p}),r().addLogEntry("INFO",`Thread shared to main session — "${c.summary.slice(0,40)}"`),r().addToast("success","Thread summary added to your input"),!0}catch(c){return r().addToast("error",`Failed to share thread — ${c.message}`),!1}},deleteThread:async(i,l)=>{try{await ou(`/sessions/${i}/threads/${l}`)}catch(a){r().addToast("error",`Failed to delete thread — ${a.message}`)}},onThreadCreated:(i,l,a)=>{n(c=>{const p=c.sessionDetails[i];return p?{sessionDetails:{...c.sessionDetails,[i]:{...p,threads:[...p.threads??[],{...l,turns:[{...a,items:[]}]}]}}}:{}})},onThreadFollowup:(i,l,a)=>{n(c=>{const p=c.sessionDetails[i];return p?{sessionDetails:{...c.sessionDetails,[i]:{...p,threads:(p.threads??[]).map(h=>h.id===l?{...h,turns:[...h.turns??[],{...a,items:[]}]}:h)}}}:{}})},onThreadResolved:(i,l,a)=>{n(c=>{const p=c.sessionDetails[i];if(!p)return{};const h=(p.threads??[]).map(g=>g.id===l?{...g,status:a,resolved_at:a==="resolved"?new Date().toISOString():null}:g);return{sessionDetails:{...c.sessionDetails,[i]:{...p,threads:h}}}})},onThreadDeleted:(i,l)=>{n(a=>{const c=a.sessionDetails[i];return c?{sessionDetails:{...a.sessionDetails,[i]:{...c,threads:(c.threads??[]).filter(p=>p.id!==l)}}}:{}})}}),Zv=(n,r)=>({folders:[],loadFolders:async()=>{const i=await Sh();n({folders:i})},createSidebarFolder:async(i,l)=>{try{const a=await $v(i,l);return n(c=>({folders:[...c.folders,a]})),a}catch(a){return r().addToast("error",`Failed to create folder — ${a.message}`),null}},renameFolder:async(i,l)=>{try{const a=await ap(i,{name:l});n(c=>({folders:c.folders.map(p=>p.id===i?a:p)}))}catch(a){r().addToast("error",`Failed to rename folder — ${a.message}`)}},deleteFolder:async i=>{const l=r().folders,a=r().sessions;n(c=>({folders:c.folders.filter(p=>p.id!==i),sessions:c.sessions.map(p=>p.folder_id===i?{...p,folder_id:null}:p)}));try{await Fv(i)}catch(c){n({folders:l,sessions:a}),r().addToast("error",`Failed to delete folder — ${c.message}`)}},applyMoves:async i=>{if(i.length===0)return;const l=r().sessions,a=new Map(i.map(c=>[c.id,c]));n(c=>({sessions:c.sessions.map(p=>{const h=a.get(p.id);return h?{...p,folder_id:h.folder_id,sort_order:h.sort_order}:p})}));try{await Uv(i)}catch(c){n({sessions:l}),r().addToast("error",`Failed to save session order — ${c.message}`)}},reorderFolders:async i=>{const l=r().folders,a=new Map(i.map((c,p)=>[c,p]));n(c=>({folders:c.folders.map(p=>a.has(p.id)?{...p,sort_order:a.get(p.id)}:p)}));try{await Promise.all(i.map((c,p)=>ap(c,{sort_order:p})))}catch(c){n({folders:l}),r().addToast("error",`Failed to save folder order — ${c.message}`)}}}),se=mv()((...n)=>({...Bv(...n),...Wv(...n),...Hv(...n),...Qv(...n),...Xv(...n),...Zv(...n)}));function Fc(n){switch(n){case"claude":return{iconClass:"ic-claude",iconText:"CL"};case"codex":return{iconClass:"ic-codex",iconText:"CX"};case"repoburg":return{iconClass:"ic-repoburg",iconText:"RB"};case"cursor":return{iconClass:"ic-cursor",iconText:"CR"};default:return{iconClass:"ic-codex",iconText:"CX"}}}function Jv(n,r){const i=new Date(n).getTime(),l=r?new Date(r).getTime():Date.now(),a=Math.max(0,Math.floor((l-i)/1e3));if(a<60)return`${a}s`;const c=Math.floor(a/60),p=a%60;if(c<60)return`${c}m ${p}s`;const h=Math.floor(c/60),g=c%60;return`${h}h ${g}m`}function ey(n,r,i=!1,l="working"){if(l==="finished")return"";if(r)return"running";if(i&&n!=="failed")return"queued";switch(n){case"failed":return"error";case"aborted":return"paused";default:return"paused"}}function ty(n,r,i=!1,l="working"){if(l==="finished")return"Finished";if(r)return"Running";if(i&&n!=="failed")return"Review Pending";switch(n){case"failed":return"Failed";case"aborted":return"Aborted";case"active":return"Idle";case"completed":return"Completed";case"running":return"Running";default:return n}}function lu(n){const r=n.is_running===1,i=n.lifecycle==="finished",l=Fc(n.runtime_type);return{dot:ey(n.status,r,n.has_unreviewed===1,n.lifecycle),label:ty(n.status,r,n.has_unreviewed===1,n.lifecycle),iconClass:l.iconClass,iconText:l.iconText,isRunning:r,isFinished:i}}function Dl(n,r,i=!0){k.useEffect(()=>{if(!i)return;function l(a){n.current&&!n.current.contains(a.target)&&r()}return document.addEventListener("mousedown",l),document.addEventListener("touchstart",l),()=>{document.removeEventListener("mousedown",l),document.removeEventListener("touchstart",l)}},[n,r,i])}function au(n,r=!0){k.useEffect(()=>{if(!r)return;function i(l){l.key==="Escape"&&n()}return document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)},[n,r])}function cu({status:n,size:r=6}){return u.jsx("span",{className:`status-dot ${n}`,style:r!==6?{width:r,height:r}:void 0})}function Th({iconClass:n,iconText:r,size:i=20}){return u.jsx("span",{className:`runtime-icon ${n}`,style:i!==20?{width:i,height:i,fontSize:i*.45}:void 0,children:r})}/**
|
|
49
|
+
* @license lucide-react v0.469.0 - ISC
|
|
50
|
+
*
|
|
51
|
+
* This source code is licensed under the ISC license.
|
|
52
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
53
|
+
*/const ny=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Nh=(...n)=>n.filter((r,i,l)=>!!r&&r.trim()!==""&&l.indexOf(r)===i).join(" ").trim();/**
|
|
54
|
+
* @license lucide-react v0.469.0 - ISC
|
|
55
|
+
*
|
|
56
|
+
* This source code is licensed under the ISC license.
|
|
57
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
58
|
+
*/var ry={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"};/**
|
|
59
|
+
* @license lucide-react v0.469.0 - ISC
|
|
60
|
+
*
|
|
61
|
+
* This source code is licensed under the ISC license.
|
|
62
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
63
|
+
*/const sy=k.forwardRef(({color:n="currentColor",size:r=24,strokeWidth:i=2,absoluteStrokeWidth:l,className:a="",children:c,iconNode:p,...h},g)=>k.createElement("svg",{ref:g,...ry,width:r,height:r,stroke:n,strokeWidth:l?Number(i)*24/Number(r):i,className:Nh("lucide",a),...h},[...p.map(([m,y])=>k.createElement(m,y)),...Array.isArray(c)?c:[c]]));/**
|
|
64
|
+
* @license lucide-react v0.469.0 - ISC
|
|
65
|
+
*
|
|
66
|
+
* This source code is licensed under the ISC license.
|
|
67
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
68
|
+
*/const Se=(n,r)=>{const i=k.forwardRef(({className:l,...a},c)=>k.createElement(sy,{ref:c,iconNode:r,className:Nh(`lucide-${ny(n)}`,l),...a}));return i.displayName=`${n}`,i};/**
|
|
69
|
+
* @license lucide-react v0.469.0 - ISC
|
|
70
|
+
*
|
|
71
|
+
* This source code is licensed under the ISC license.
|
|
72
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
73
|
+
*/const iy=Se("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
|
|
74
|
+
* @license lucide-react v0.469.0 - ISC
|
|
75
|
+
*
|
|
76
|
+
* This source code is licensed under the ISC license.
|
|
77
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
78
|
+
*/const Uc=Se("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"}]]);/**
|
|
79
|
+
* @license lucide-react v0.469.0 - ISC
|
|
80
|
+
*
|
|
81
|
+
* This source code is licensed under the ISC license.
|
|
82
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
83
|
+
*/const oy=Se("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/**
|
|
84
|
+
* @license lucide-react v0.469.0 - ISC
|
|
85
|
+
*
|
|
86
|
+
* This source code is licensed under the ISC license.
|
|
87
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
88
|
+
*/const Vr=Se("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
89
|
+
* @license lucide-react v0.469.0 - ISC
|
|
90
|
+
*
|
|
91
|
+
* This source code is licensed under the ISC license.
|
|
92
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
93
|
+
*/const Vi=Se("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
94
|
+
* @license lucide-react v0.469.0 - ISC
|
|
95
|
+
*
|
|
96
|
+
* This source code is licensed under the ISC license.
|
|
97
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
98
|
+
*/const uu=Se("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
99
|
+
* @license lucide-react v0.469.0 - ISC
|
|
100
|
+
*
|
|
101
|
+
* This source code is licensed under the ISC license.
|
|
102
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
103
|
+
*/const du=Se("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
|
|
104
|
+
* @license lucide-react v0.469.0 - ISC
|
|
105
|
+
*
|
|
106
|
+
* This source code is licensed under the ISC license.
|
|
107
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
108
|
+
*/const ly=Se("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
|
109
|
+
* @license lucide-react v0.469.0 - ISC
|
|
110
|
+
*
|
|
111
|
+
* This source code is licensed under the ISC license.
|
|
112
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
113
|
+
*/const fu=Se("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
114
|
+
* @license lucide-react v0.469.0 - ISC
|
|
115
|
+
*
|
|
116
|
+
* This source code is licensed under the ISC license.
|
|
117
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
118
|
+
*/const ay=Se("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
119
|
+
* @license lucide-react v0.469.0 - ISC
|
|
120
|
+
*
|
|
121
|
+
* This source code is licensed under the ISC license.
|
|
122
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
123
|
+
*/const cy=Se("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
|
|
124
|
+
* @license lucide-react v0.469.0 - ISC
|
|
125
|
+
*
|
|
126
|
+
* This source code is licensed under the ISC license.
|
|
127
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
128
|
+
*/const Ch=Se("Cog",[["path",{d:"M12 20a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z",key:"sobvz5"}],["path",{d:"M12 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z",key:"11i496"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 22v-2",key:"1osdcq"}],["path",{d:"m17 20.66-1-1.73",key:"eq3orb"}],["path",{d:"M11 10.27 7 3.34",key:"16pf9h"}],["path",{d:"m20.66 17-1.73-1",key:"sg0v6f"}],["path",{d:"m3.34 7 1.73 1",key:"1ulond"}],["path",{d:"M14 12h8",key:"4f43i9"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"m20.66 7-1.73 1",key:"1ow05n"}],["path",{d:"m3.34 17 1.73-1",key:"nuk764"}],["path",{d:"m17 3.34-1 1.73",key:"2wel8s"}],["path",{d:"m11 13.73-4 6.93",key:"794ttg"}]]);/**
|
|
129
|
+
* @license lucide-react v0.469.0 - ISC
|
|
130
|
+
*
|
|
131
|
+
* This source code is licensed under the ISC license.
|
|
132
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
133
|
+
*/const fp=Se("Command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]]);/**
|
|
134
|
+
* @license lucide-react v0.469.0 - ISC
|
|
135
|
+
*
|
|
136
|
+
* This source code is licensed under the ISC license.
|
|
137
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
138
|
+
*/const Bc=Se("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"}]]);/**
|
|
139
|
+
* @license lucide-react v0.469.0 - ISC
|
|
140
|
+
*
|
|
141
|
+
* This source code is licensed under the ISC license.
|
|
142
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
143
|
+
*/const uy=Se("CornerDownLeft",[["polyline",{points:"9 10 4 15 9 20",key:"r3jprv"}],["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}]]);/**
|
|
144
|
+
* @license lucide-react v0.469.0 - ISC
|
|
145
|
+
*
|
|
146
|
+
* This source code is licensed under the ISC license.
|
|
147
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
148
|
+
*/const dy=Se("FileCode",[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}]]);/**
|
|
149
|
+
* @license lucide-react v0.469.0 - ISC
|
|
150
|
+
*
|
|
151
|
+
* This source code is licensed under the ISC license.
|
|
152
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
153
|
+
*/const fy=Se("FilePlus",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]]);/**
|
|
154
|
+
* @license lucide-react v0.469.0 - ISC
|
|
155
|
+
*
|
|
156
|
+
* This source code is licensed under the ISC license.
|
|
157
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
158
|
+
*/const Eh=Se("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
|
|
159
|
+
* @license lucide-react v0.469.0 - ISC
|
|
160
|
+
*
|
|
161
|
+
* This source code is licensed under the ISC license.
|
|
162
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
163
|
+
*/const Cc=Se("FolderPlus",[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["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"}]]);/**
|
|
164
|
+
* @license lucide-react v0.469.0 - ISC
|
|
165
|
+
*
|
|
166
|
+
* This source code is licensed under the ISC license.
|
|
167
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
168
|
+
*/const Wc=Se("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"}]]);/**
|
|
169
|
+
* @license lucide-react v0.469.0 - ISC
|
|
170
|
+
*
|
|
171
|
+
* This source code is licensed under the ISC license.
|
|
172
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
173
|
+
*/const py=Se("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"}]]);/**
|
|
174
|
+
* @license lucide-react v0.469.0 - ISC
|
|
175
|
+
*
|
|
176
|
+
* This source code is licensed under the ISC license.
|
|
177
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
178
|
+
*/const hy=Se("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
|
179
|
+
* @license lucide-react v0.469.0 - ISC
|
|
180
|
+
*
|
|
181
|
+
* This source code is licensed under the ISC license.
|
|
182
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
183
|
+
*/const my=Se("Layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);/**
|
|
184
|
+
* @license lucide-react v0.469.0 - ISC
|
|
185
|
+
*
|
|
186
|
+
* This source code is licensed under the ISC license.
|
|
187
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
188
|
+
*/const gy=Se("ListTodo",[["rect",{x:"3",y:"5",width:"6",height:"6",rx:"1",key:"1defrl"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]]);/**
|
|
189
|
+
* @license lucide-react v0.469.0 - ISC
|
|
190
|
+
*
|
|
191
|
+
* This source code is licensed under the ISC license.
|
|
192
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
193
|
+
*/const vy=Se("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/**
|
|
194
|
+
* @license lucide-react v0.469.0 - ISC
|
|
195
|
+
*
|
|
196
|
+
* This source code is licensed under the ISC license.
|
|
197
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
198
|
+
*/const gr=Se("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
199
|
+
* @license lucide-react v0.469.0 - ISC
|
|
200
|
+
*
|
|
201
|
+
* This source code is licensed under the ISC license.
|
|
202
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
203
|
+
*/const yy=Se("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
|
|
204
|
+
* @license lucide-react v0.469.0 - ISC
|
|
205
|
+
*
|
|
206
|
+
* This source code is licensed under the ISC license.
|
|
207
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
208
|
+
*/const xy=Se("MessageSquarePlus",[["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"}],["path",{d:"M12 7v6",key:"lw1j43"}],["path",{d:"M9 10h6",key:"9gxzsh"}]]);/**
|
|
209
|
+
* @license lucide-react v0.469.0 - ISC
|
|
210
|
+
*
|
|
211
|
+
* This source code is licensed under the ISC license.
|
|
212
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
213
|
+
*/const wy=Se("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"}]]);/**
|
|
214
|
+
* @license lucide-react v0.469.0 - ISC
|
|
215
|
+
*
|
|
216
|
+
* This source code is licensed under the ISC license.
|
|
217
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
218
|
+
*/const ky=Se("Minimize2",[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
|
|
219
|
+
* @license lucide-react v0.469.0 - ISC
|
|
220
|
+
*
|
|
221
|
+
* This source code is licensed under the ISC license.
|
|
222
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
223
|
+
*/const pp=Se("MonitorSmartphone",[["path",{d:"M18 8V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h8",key:"10dyio"}],["path",{d:"M10 19v-3.96 3.15",key:"1irgej"}],["path",{d:"M7 19h5",key:"qswx4l"}],["rect",{width:"6",height:"10",x:"16",y:"12",rx:"2",key:"1egngj"}]]);/**
|
|
224
|
+
* @license lucide-react v0.469.0 - ISC
|
|
225
|
+
*
|
|
226
|
+
* This source code is licensed under the ISC license.
|
|
227
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
228
|
+
*/const Sy=Se("Navigation",[["polygon",{points:"3 11 22 2 13 21 11 13 3 11",key:"1ltx0t"}]]);/**
|
|
229
|
+
* @license lucide-react v0.469.0 - ISC
|
|
230
|
+
*
|
|
231
|
+
* This source code is licensed under the ISC license.
|
|
232
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
233
|
+
*/const Ty=Se("Paperclip",[["path",{d:"M13.234 20.252 21 12.3",key:"1cbrk9"}],["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 0 2.828 2 2 0 0 0 2.828 0l8.414-8.586a4 4 0 0 0 0-5.656 4 4 0 0 0-5.656 0l-8.415 8.585a6 6 0 1 0 8.486 8.486",key:"1pkts6"}]]);/**
|
|
234
|
+
* @license lucide-react v0.469.0 - ISC
|
|
235
|
+
*
|
|
236
|
+
* This source code is licensed under the ISC license.
|
|
237
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
238
|
+
*/const hp=Se("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]]);/**
|
|
239
|
+
* @license lucide-react v0.469.0 - ISC
|
|
240
|
+
*
|
|
241
|
+
* This source code is licensed under the ISC license.
|
|
242
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
243
|
+
*/const Ny=Se("Plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]]);/**
|
|
244
|
+
* @license lucide-react v0.469.0 - ISC
|
|
245
|
+
*
|
|
246
|
+
* This source code is licensed under the ISC license.
|
|
247
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
248
|
+
*/const $i=Se("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
249
|
+
* @license lucide-react v0.469.0 - ISC
|
|
250
|
+
*
|
|
251
|
+
* This source code is licensed under the ISC license.
|
|
252
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
253
|
+
*/const _h=Se("Quote",[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]]);/**
|
|
254
|
+
* @license lucide-react v0.469.0 - ISC
|
|
255
|
+
*
|
|
256
|
+
* This source code is licensed under the ISC license.
|
|
257
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
258
|
+
*/const Cy=Se("Rewind",[["polygon",{points:"11 19 2 12 11 5 11 19",key:"14yba5"}],["polygon",{points:"22 19 13 12 22 5 22 19",key:"1pi1cj"}]]);/**
|
|
259
|
+
* @license lucide-react v0.469.0 - ISC
|
|
260
|
+
*
|
|
261
|
+
* This source code is licensed under the ISC license.
|
|
262
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
263
|
+
*/const pu=Se("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
|
|
264
|
+
* @license lucide-react v0.469.0 - ISC
|
|
265
|
+
*
|
|
266
|
+
* This source code is licensed under the ISC license.
|
|
267
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
268
|
+
*/const bh=Se("SatelliteDish",[["path",{d:"M4 10a7.31 7.31 0 0 0 10 10Z",key:"1fzpp3"}],["path",{d:"m9 15 3-3",key:"88sc13"}],["path",{d:"M17 13a6 6 0 0 0-6-6",key:"15cc6u"}],["path",{d:"M21 13A10 10 0 0 0 11 3",key:"11nf8s"}]]);/**
|
|
269
|
+
* @license lucide-react v0.469.0 - ISC
|
|
270
|
+
*
|
|
271
|
+
* This source code is licensed under the ISC license.
|
|
272
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
273
|
+
*/const Ey=Se("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
274
|
+
* @license lucide-react v0.469.0 - ISC
|
|
275
|
+
*
|
|
276
|
+
* This source code is licensed under the ISC license.
|
|
277
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
278
|
+
*/const Il=Se("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
|
|
279
|
+
* @license lucide-react v0.469.0 - ISC
|
|
280
|
+
*
|
|
281
|
+
* This source code is licensed under the ISC license.
|
|
282
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
283
|
+
*/const _y=Se("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]);/**
|
|
284
|
+
* @license lucide-react v0.469.0 - ISC
|
|
285
|
+
*
|
|
286
|
+
* This source code is licensed under the ISC license.
|
|
287
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
288
|
+
*/const Al=Se("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
|
|
289
|
+
* @license lucide-react v0.469.0 - ISC
|
|
290
|
+
*
|
|
291
|
+
* This source code is licensed under the ISC license.
|
|
292
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
293
|
+
*/const by=Se("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/**
|
|
294
|
+
* @license lucide-react v0.469.0 - ISC
|
|
295
|
+
*
|
|
296
|
+
* This source code is licensed under the ISC license.
|
|
297
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
298
|
+
*/const jh=Se("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
|
|
299
|
+
* @license lucide-react v0.469.0 - ISC
|
|
300
|
+
*
|
|
301
|
+
* This source code is licensed under the ISC license.
|
|
302
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
303
|
+
*/const ps=Se("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"}]]);/**
|
|
304
|
+
* @license lucide-react v0.469.0 - ISC
|
|
305
|
+
*
|
|
306
|
+
* This source code is licensed under the ISC license.
|
|
307
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
308
|
+
*/const jy=Se("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
309
|
+
* @license lucide-react v0.469.0 - ISC
|
|
310
|
+
*
|
|
311
|
+
* This source code is licensed under the ISC license.
|
|
312
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
313
|
+
*/const Ry=Se("Undo2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]);/**
|
|
314
|
+
* @license lucide-react v0.469.0 - ISC
|
|
315
|
+
*
|
|
316
|
+
* This source code is licensed under the ISC license.
|
|
317
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
318
|
+
*/const Dy=Se("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
|
|
319
|
+
* @license lucide-react v0.469.0 - ISC
|
|
320
|
+
*
|
|
321
|
+
* This source code is licensed under the ISC license.
|
|
322
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
323
|
+
*/const Iy=Se("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"}]]);/**
|
|
324
|
+
* @license lucide-react v0.469.0 - ISC
|
|
325
|
+
*
|
|
326
|
+
* This source code is licensed under the ISC license.
|
|
327
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
328
|
+
*/const er=Se("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
|
|
329
|
+
* @license lucide-react v0.469.0 - ISC
|
|
330
|
+
*
|
|
331
|
+
* This source code is licensed under the ISC license.
|
|
332
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
333
|
+
*/const Ay=Se("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);var Oi=ph();function My(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return k.useMemo(()=>l=>{r.forEach(a=>a(l))},r)}const Ml=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Ks(n){const r=Object.prototype.toString.call(n);return r==="[object Window]"||r==="[object global]"}function hu(n){return"nodeType"in n}function ln(n){var r,i;return n?Ks(n)?n:hu(n)&&(r=(i=n.ownerDocument)==null?void 0:i.defaultView)!=null?r:window:window}function mu(n){const{Document:r}=ln(n);return n instanceof r}function Ki(n){return Ks(n)?!1:n instanceof ln(n).HTMLElement}function Rh(n){return n instanceof ln(n).SVGElement}function Ys(n){return n?Ks(n)?n.document:hu(n)?mu(n)?n:Ki(n)||Rh(n)?n.ownerDocument:document:document:document}const Hn=Ml?k.useLayoutEffect:k.useEffect;function Ll(n){const r=k.useRef(n);return Hn(()=>{r.current=n}),k.useCallback(function(){for(var i=arguments.length,l=new Array(i),a=0;a<i;a++)l[a]=arguments[a];return r.current==null?void 0:r.current(...l)},[])}function Ly(){const n=k.useRef(null),r=k.useCallback((l,a)=>{n.current=setInterval(l,a)},[]),i=k.useCallback(()=>{n.current!==null&&(clearInterval(n.current),n.current=null)},[]);return[r,i]}function Gi(n,r){r===void 0&&(r=[n]);const i=k.useRef(n);return Hn(()=>{i.current!==n&&(i.current=n)},r),i}function Yi(n,r){const i=k.useRef();return k.useMemo(()=>{const l=n(i.current);return i.current=l,l},[...r])}function wl(n){const r=Ll(n),i=k.useRef(null),l=k.useCallback(a=>{a!==i.current&&(r==null||r(a,i.current)),i.current=a},[]);return[i,l]}function kl(n){const r=k.useRef();return k.useEffect(()=>{r.current=n},[n]),r.current}let Ec={};function Qi(n,r){return k.useMemo(()=>{if(r)return r;const i=Ec[n]==null?0:Ec[n]+1;return Ec[n]=i,n+"-"+i},[n,r])}function Dh(n){return function(r){for(var i=arguments.length,l=new Array(i>1?i-1:0),a=1;a<i;a++)l[a-1]=arguments[a];return l.reduce((c,p)=>{const h=Object.entries(p);for(const[g,m]of h){const y=c[g];y!=null&&(c[g]=y+n*m)}return c},{...r})}}const Gs=Dh(1),Sl=Dh(-1);function Py(n){return"clientX"in n&&"clientY"in n}function Pl(n){if(!n)return!1;const{KeyboardEvent:r}=ln(n.target);return r&&n instanceof r}function Oy(n){if(!n)return!1;const{TouchEvent:r}=ln(n.target);return r&&n instanceof r}function Tl(n){if(Oy(n)){if(n.touches&&n.touches.length){const{clientX:r,clientY:i}=n.touches[0];return{x:r,y:i}}else if(n.changedTouches&&n.changedTouches.length){const{clientX:r,clientY:i}=n.changedTouches[0];return{x:r,y:i}}}return Py(n)?{x:n.clientX,y:n.clientY}:null}const xr=Object.freeze({Translate:{toString(n){if(!n)return;const{x:r,y:i}=n;return"translate3d("+(r?Math.round(r):0)+"px, "+(i?Math.round(i):0)+"px, 0)"}},Scale:{toString(n){if(!n)return;const{scaleX:r,scaleY:i}=n;return"scaleX("+r+") scaleY("+i+")"}},Transform:{toString(n){if(n)return[xr.Translate.toString(n),xr.Scale.toString(n)].join(" ")}},Transition:{toString(n){let{property:r,duration:i,easing:l}=n;return r+" "+i+"ms "+l}}}),mp="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function zy(n){return n.matches(mp)?n:n.querySelector(mp)}const $y={display:"none"};function Fy(n){let{id:r,value:i}=n;return nt.createElement("div",{id:r,style:$y},i)}function Uy(n){let{id:r,announcement:i,ariaLiveType:l="assertive"}=n;const a={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return nt.createElement("div",{id:r,style:a,role:"status","aria-live":l,"aria-atomic":!0},i)}function By(){const[n,r]=k.useState("");return{announce:k.useCallback(l=>{l!=null&&r(l)},[]),announcement:n}}const Ih=k.createContext(null);function Wy(n){const r=k.useContext(Ih);k.useEffect(()=>{if(!r)throw new Error("useDndMonitor must be used within a children of <DndContext>");return r(n)},[n,r])}function Hy(){const[n]=k.useState(()=>new Set),r=k.useCallback(l=>(n.add(l),()=>n.delete(l)),[n]);return[k.useCallback(l=>{let{type:a,event:c}=l;n.forEach(p=>{var h;return(h=p[a])==null?void 0:h.call(p,c)})},[n]),r]}const Vy={draggable:`
|
|
334
|
+
To pick up a draggable item, press the space bar.
|
|
335
|
+
While dragging, use the arrow keys to move the item.
|
|
336
|
+
Press space again to drop the item in its new position, or press escape to cancel.
|
|
337
|
+
`},Gy={onDragStart(n){let{active:r}=n;return"Picked up draggable item "+r.id+"."},onDragOver(n){let{active:r,over:i}=n;return i?"Draggable item "+r.id+" was moved over droppable area "+i.id+".":"Draggable item "+r.id+" is no longer over a droppable area."},onDragEnd(n){let{active:r,over:i}=n;return i?"Draggable item "+r.id+" was dropped over droppable area "+i.id:"Draggable item "+r.id+" was dropped."},onDragCancel(n){let{active:r}=n;return"Dragging was cancelled. Draggable item "+r.id+" was dropped."}};function qy(n){let{announcements:r=Gy,container:i,hiddenTextDescribedById:l,screenReaderInstructions:a=Vy}=n;const{announce:c,announcement:p}=By(),h=Qi("DndLiveRegion"),[g,m]=k.useState(!1);if(k.useEffect(()=>{m(!0)},[]),Wy(k.useMemo(()=>({onDragStart(x){let{active:w}=x;c(r.onDragStart({active:w}))},onDragMove(x){let{active:w,over:N}=x;r.onDragMove&&c(r.onDragMove({active:w,over:N}))},onDragOver(x){let{active:w,over:N}=x;c(r.onDragOver({active:w,over:N}))},onDragEnd(x){let{active:w,over:N}=x;c(r.onDragEnd({active:w,over:N}))},onDragCancel(x){let{active:w,over:N}=x;c(r.onDragCancel({active:w,over:N}))}}),[c,r])),!g)return null;const y=nt.createElement(nt.Fragment,null,nt.createElement(Fy,{id:l,value:a.draggable}),nt.createElement(Uy,{id:h,announcement:p}));return i?Oi.createPortal(y,i):y}var At;(function(n){n.DragStart="dragStart",n.DragMove="dragMove",n.DragEnd="dragEnd",n.DragCancel="dragCancel",n.DragOver="dragOver",n.RegisterDroppable="registerDroppable",n.SetDroppableDisabled="setDroppableDisabled",n.UnregisterDroppable="unregisterDroppable"})(At||(At={}));function Nl(){}function Ky(n,r){return k.useMemo(()=>({sensor:n,options:r??{}}),[n,r])}function Yy(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return k.useMemo(()=>[...r].filter(l=>l!=null),[...r])}const Vn=Object.freeze({x:0,y:0});function Qy(n,r){return Math.sqrt(Math.pow(n.x-r.x,2)+Math.pow(n.y-r.y,2))}function Xy(n,r){const i=Tl(n);if(!i)return"0 0";const l={x:(i.x-r.left)/r.width*100,y:(i.y-r.top)/r.height*100};return l.x+"% "+l.y+"%"}function Zy(n,r){let{data:{value:i}}=n,{data:{value:l}}=r;return i-l}function Jy(n,r){let{data:{value:i}}=n,{data:{value:l}}=r;return l-i}function e0(n,r){if(!n||n.length===0)return null;const[i]=n;return i[r]}function gp(n,r,i){return r===void 0&&(r=n.left),i===void 0&&(i=n.top),{x:r+n.width*.5,y:i+n.height*.5}}const t0=n=>{let{collisionRect:r,droppableRects:i,droppableContainers:l}=n;const a=gp(r,r.left,r.top),c=[];for(const p of l){const{id:h}=p,g=i.get(h);if(g){const m=Qy(gp(g),a);c.push({id:h,data:{droppableContainer:p,value:m}})}}return c.sort(Zy)};function n0(n,r){const i=Math.max(r.top,n.top),l=Math.max(r.left,n.left),a=Math.min(r.left+r.width,n.left+n.width),c=Math.min(r.top+r.height,n.top+n.height),p=a-l,h=c-i;if(l<a&&i<c){const g=r.width*r.height,m=n.width*n.height,y=p*h,x=y/(g+m-y);return Number(x.toFixed(4))}return 0}const r0=n=>{let{collisionRect:r,droppableRects:i,droppableContainers:l}=n;const a=[];for(const c of l){const{id:p}=c,h=i.get(p);if(h){const g=n0(h,r);g>0&&a.push({id:p,data:{droppableContainer:c,value:g}})}}return a.sort(Jy)};function s0(n,r,i){return{...n,scaleX:r&&i?r.width/i.width:1,scaleY:r&&i?r.height/i.height:1}}function Ah(n,r){return n&&r?{x:n.left-r.left,y:n.top-r.top}:Vn}function i0(n){return function(i){for(var l=arguments.length,a=new Array(l>1?l-1:0),c=1;c<l;c++)a[c-1]=arguments[c];return a.reduce((p,h)=>({...p,top:p.top+n*h.y,bottom:p.bottom+n*h.y,left:p.left+n*h.x,right:p.right+n*h.x}),{...i})}}const o0=i0(1);function Mh(n){if(n.startsWith("matrix3d(")){const r=n.slice(9,-1).split(/, /);return{x:+r[12],y:+r[13],scaleX:+r[0],scaleY:+r[5]}}else if(n.startsWith("matrix(")){const r=n.slice(7,-1).split(/, /);return{x:+r[4],y:+r[5],scaleX:+r[0],scaleY:+r[3]}}return null}function l0(n,r,i){const l=Mh(r);if(!l)return n;const{scaleX:a,scaleY:c,x:p,y:h}=l,g=n.left-p-(1-a)*parseFloat(i),m=n.top-h-(1-c)*parseFloat(i.slice(i.indexOf(" ")+1)),y=a?n.width/a:n.width,x=c?n.height/c:n.height;return{width:y,height:x,top:m,right:g+y,bottom:m+x,left:g}}const a0={ignoreTransform:!1};function Qs(n,r){r===void 0&&(r=a0);let i=n.getBoundingClientRect();if(r.ignoreTransform){const{transform:m,transformOrigin:y}=ln(n).getComputedStyle(n);m&&(i=l0(i,m,y))}const{top:l,left:a,width:c,height:p,bottom:h,right:g}=i;return{top:l,left:a,width:c,height:p,bottom:h,right:g}}function vp(n){return Qs(n,{ignoreTransform:!0})}function c0(n){const r=n.innerWidth,i=n.innerHeight;return{top:0,left:0,right:r,bottom:i,width:r,height:i}}function u0(n,r){return r===void 0&&(r=ln(n).getComputedStyle(n)),r.position==="fixed"}function d0(n,r){r===void 0&&(r=ln(n).getComputedStyle(n));const i=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(a=>{const c=r[a];return typeof c=="string"?i.test(c):!1})}function gu(n,r){const i=[];function l(a){if(r!=null&&i.length>=r||!a)return i;if(mu(a)&&a.scrollingElement!=null&&!i.includes(a.scrollingElement))return i.push(a.scrollingElement),i;if(!Ki(a)||Rh(a)||i.includes(a))return i;const c=ln(n).getComputedStyle(a);return a!==n&&d0(a,c)&&i.push(a),u0(a,c)?i:l(a.parentNode)}return n?l(n):i}function Lh(n){const[r]=gu(n,1);return r??null}function _c(n){return!Ml||!n?null:Ks(n)?n:hu(n)?mu(n)||n===Ys(n).scrollingElement?window:Ki(n)?n:null:null}function Ph(n){return Ks(n)?n.scrollX:n.scrollLeft}function Oh(n){return Ks(n)?n.scrollY:n.scrollTop}function Hc(n){return{x:Ph(n),y:Oh(n)}}var Ft;(function(n){n[n.Forward=1]="Forward",n[n.Backward=-1]="Backward"})(Ft||(Ft={}));function zh(n){return!Ml||!n?!1:n===document.scrollingElement}function $h(n){const r={x:0,y:0},i=zh(n)?{height:window.innerHeight,width:window.innerWidth}:{height:n.clientHeight,width:n.clientWidth},l={x:n.scrollWidth-i.width,y:n.scrollHeight-i.height},a=n.scrollTop<=r.y,c=n.scrollLeft<=r.x,p=n.scrollTop>=l.y,h=n.scrollLeft>=l.x;return{isTop:a,isLeft:c,isBottom:p,isRight:h,maxScroll:l,minScroll:r}}const f0={x:.2,y:.2};function p0(n,r,i,l,a){let{top:c,left:p,right:h,bottom:g}=i;l===void 0&&(l=10),a===void 0&&(a=f0);const{isTop:m,isBottom:y,isLeft:x,isRight:w}=$h(n),N={x:0,y:0},R={x:0,y:0},b={height:r.height*a.y,width:r.width*a.x};return!m&&c<=r.top+b.height?(N.y=Ft.Backward,R.y=l*Math.abs((r.top+b.height-c)/b.height)):!y&&g>=r.bottom-b.height&&(N.y=Ft.Forward,R.y=l*Math.abs((r.bottom-b.height-g)/b.height)),!w&&h>=r.right-b.width?(N.x=Ft.Forward,R.x=l*Math.abs((r.right-b.width-h)/b.width)):!x&&p<=r.left+b.width&&(N.x=Ft.Backward,R.x=l*Math.abs((r.left+b.width-p)/b.width)),{direction:N,speed:R}}function h0(n){if(n===document.scrollingElement){const{innerWidth:c,innerHeight:p}=window;return{top:0,left:0,right:c,bottom:p,width:c,height:p}}const{top:r,left:i,right:l,bottom:a}=n.getBoundingClientRect();return{top:r,left:i,right:l,bottom:a,width:n.clientWidth,height:n.clientHeight}}function Fh(n){return n.reduce((r,i)=>Gs(r,Hc(i)),Vn)}function m0(n){return n.reduce((r,i)=>r+Ph(i),0)}function g0(n){return n.reduce((r,i)=>r+Oh(i),0)}function Uh(n,r){if(r===void 0&&(r=Qs),!n)return;const{top:i,left:l,bottom:a,right:c}=r(n);Lh(n)&&(a<=0||c<=0||i>=window.innerHeight||l>=window.innerWidth)&&n.scrollIntoView({block:"center",inline:"center"})}const v0=[["x",["left","right"],m0],["y",["top","bottom"],g0]];class vu{constructor(r,i){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const l=gu(i),a=Fh(l);this.rect={...r},this.width=r.width,this.height=r.height;for(const[c,p,h]of v0)for(const g of p)Object.defineProperty(this,g,{get:()=>{const m=h(l),y=a[c]-m;return this.rect[g]+y},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Fi{constructor(r){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(i=>{var l;return(l=this.target)==null?void 0:l.removeEventListener(...i)})},this.target=r}add(r,i,l){var a;(a=this.target)==null||a.addEventListener(r,i,l),this.listeners.push([r,i,l])}}function y0(n){const{EventTarget:r}=ln(n);return n instanceof r?n:Ys(n)}function bc(n,r){const i=Math.abs(n.x),l=Math.abs(n.y);return typeof r=="number"?Math.sqrt(i**2+l**2)>r:"x"in r&&"y"in r?i>r.x&&l>r.y:"x"in r?i>r.x:"y"in r?l>r.y:!1}var An;(function(n){n.Click="click",n.DragStart="dragstart",n.Keydown="keydown",n.ContextMenu="contextmenu",n.Resize="resize",n.SelectionChange="selectionchange",n.VisibilityChange="visibilitychange"})(An||(An={}));function yp(n){n.preventDefault()}function x0(n){n.stopPropagation()}var Xe;(function(n){n.Space="Space",n.Down="ArrowDown",n.Right="ArrowRight",n.Left="ArrowLeft",n.Up="ArrowUp",n.Esc="Escape",n.Enter="Enter",n.Tab="Tab"})(Xe||(Xe={}));const Bh={start:[Xe.Space,Xe.Enter],cancel:[Xe.Esc],end:[Xe.Space,Xe.Enter,Xe.Tab]},w0=(n,r)=>{let{currentCoordinates:i}=r;switch(n.code){case Xe.Right:return{...i,x:i.x+25};case Xe.Left:return{...i,x:i.x-25};case Xe.Down:return{...i,y:i.y+25};case Xe.Up:return{...i,y:i.y-25}}};class Wh{constructor(r){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=r;const{event:{target:i}}=r;this.props=r,this.listeners=new Fi(Ys(i)),this.windowListeners=new Fi(ln(i)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(An.Resize,this.handleCancel),this.windowListeners.add(An.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(An.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:r,onStart:i}=this.props,l=r.node.current;l&&Uh(l),i(Vn)}handleKeyDown(r){if(Pl(r)){const{active:i,context:l,options:a}=this.props,{keyboardCodes:c=Bh,coordinateGetter:p=w0,scrollBehavior:h="smooth"}=a,{code:g}=r;if(c.end.includes(g)){this.handleEnd(r);return}if(c.cancel.includes(g)){this.handleCancel(r);return}const{collisionRect:m}=l.current,y=m?{x:m.left,y:m.top}:Vn;this.referenceCoordinates||(this.referenceCoordinates=y);const x=p(r,{active:i,context:l.current,currentCoordinates:y});if(x){const w=Sl(x,y),N={x:0,y:0},{scrollableAncestors:R}=l.current;for(const b of R){const C=r.code,{isTop:L,isRight:P,isLeft:H,isBottom:O,maxScroll:B,minScroll:ee}=$h(b),Z=h0(b),U={x:Math.min(C===Xe.Right?Z.right-Z.width/2:Z.right,Math.max(C===Xe.Right?Z.left:Z.left+Z.width/2,x.x)),y:Math.min(C===Xe.Down?Z.bottom-Z.height/2:Z.bottom,Math.max(C===Xe.Down?Z.top:Z.top+Z.height/2,x.y))},te=C===Xe.Right&&!P||C===Xe.Left&&!H,q=C===Xe.Down&&!O||C===Xe.Up&&!L;if(te&&U.x!==x.x){const ie=b.scrollLeft+w.x,ye=C===Xe.Right&&ie<=B.x||C===Xe.Left&&ie>=ee.x;if(ye&&!w.y){b.scrollTo({left:ie,behavior:h});return}ye?N.x=b.scrollLeft-ie:N.x=C===Xe.Right?b.scrollLeft-B.x:b.scrollLeft-ee.x,N.x&&b.scrollBy({left:-N.x,behavior:h});break}else if(q&&U.y!==x.y){const ie=b.scrollTop+w.y,ye=C===Xe.Down&&ie<=B.y||C===Xe.Up&&ie>=ee.y;if(ye&&!w.x){b.scrollTo({top:ie,behavior:h});return}ye?N.y=b.scrollTop-ie:N.y=C===Xe.Down?b.scrollTop-B.y:b.scrollTop-ee.y,N.y&&b.scrollBy({top:-N.y,behavior:h});break}}this.handleMove(r,Gs(Sl(x,this.referenceCoordinates),N))}}}handleMove(r,i){const{onMove:l}=this.props;r.preventDefault(),l(i)}handleEnd(r){const{onEnd:i}=this.props;r.preventDefault(),this.detach(),i()}handleCancel(r){const{onCancel:i}=this.props;r.preventDefault(),this.detach(),i()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}Wh.activators=[{eventName:"onKeyDown",handler:(n,r,i)=>{let{keyboardCodes:l=Bh,onActivation:a}=r,{active:c}=i;const{code:p}=n.nativeEvent;if(l.start.includes(p)){const h=c.activatorNode.current;return h&&n.target!==h?!1:(n.preventDefault(),a==null||a({event:n.nativeEvent}),!0)}return!1}}];function xp(n){return!!(n&&"distance"in n)}function wp(n){return!!(n&&"delay"in n)}class yu{constructor(r,i,l){var a;l===void 0&&(l=y0(r.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=r,this.events=i;const{event:c}=r,{target:p}=c;this.props=r,this.events=i,this.document=Ys(p),this.documentListeners=new Fi(this.document),this.listeners=new Fi(l),this.windowListeners=new Fi(ln(p)),this.initialCoordinates=(a=Tl(c))!=null?a:Vn,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:r,props:{options:{activationConstraint:i,bypassActivationConstraint:l}}}=this;if(this.listeners.add(r.move.name,this.handleMove,{passive:!1}),this.listeners.add(r.end.name,this.handleEnd),r.cancel&&this.listeners.add(r.cancel.name,this.handleCancel),this.windowListeners.add(An.Resize,this.handleCancel),this.windowListeners.add(An.DragStart,yp),this.windowListeners.add(An.VisibilityChange,this.handleCancel),this.windowListeners.add(An.ContextMenu,yp),this.documentListeners.add(An.Keydown,this.handleKeydown),i){if(l!=null&&l({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(wp(i)){this.timeoutId=setTimeout(this.handleStart,i.delay),this.handlePending(i);return}if(xp(i)){this.handlePending(i);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(r,i){const{active:l,onPending:a}=this.props;a(l,r,this.initialCoordinates,i)}handleStart(){const{initialCoordinates:r}=this,{onStart:i}=this.props;r&&(this.activated=!0,this.documentListeners.add(An.Click,x0,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(An.SelectionChange,this.removeTextSelection),i(r))}handleMove(r){var i;const{activated:l,initialCoordinates:a,props:c}=this,{onMove:p,options:{activationConstraint:h}}=c;if(!a)return;const g=(i=Tl(r))!=null?i:Vn,m=Sl(a,g);if(!l&&h){if(xp(h)){if(h.tolerance!=null&&bc(m,h.tolerance))return this.handleCancel();if(bc(m,h.distance))return this.handleStart()}if(wp(h)&&bc(m,h.tolerance))return this.handleCancel();this.handlePending(h,m);return}r.cancelable&&r.preventDefault(),p(g)}handleEnd(){const{onAbort:r,onEnd:i}=this.props;this.detach(),this.activated||r(this.props.active),i()}handleCancel(){const{onAbort:r,onCancel:i}=this.props;this.detach(),this.activated||r(this.props.active),i()}handleKeydown(r){r.code===Xe.Esc&&this.handleCancel()}removeTextSelection(){var r;(r=this.document.getSelection())==null||r.removeAllRanges()}}const k0={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class xu extends yu{constructor(r){const{event:i}=r,l=Ys(i.target);super(r,k0,l)}}xu.activators=[{eventName:"onPointerDown",handler:(n,r)=>{let{nativeEvent:i}=n,{onActivation:l}=r;return!i.isPrimary||i.button!==0?!1:(l==null||l({event:i}),!0)}}];const S0={move:{name:"mousemove"},end:{name:"mouseup"}};var Vc;(function(n){n[n.RightClick=2]="RightClick"})(Vc||(Vc={}));class T0 extends yu{constructor(r){super(r,S0,Ys(r.event.target))}}T0.activators=[{eventName:"onMouseDown",handler:(n,r)=>{let{nativeEvent:i}=n,{onActivation:l}=r;return i.button===Vc.RightClick?!1:(l==null||l({event:i}),!0)}}];const jc={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class N0 extends yu{constructor(r){super(r,jc)}static setup(){return window.addEventListener(jc.move.name,r,{capture:!1,passive:!1}),function(){window.removeEventListener(jc.move.name,r)};function r(){}}}N0.activators=[{eventName:"onTouchStart",handler:(n,r)=>{let{nativeEvent:i}=n,{onActivation:l}=r;const{touches:a}=i;return a.length>1?!1:(l==null||l({event:i}),!0)}}];var Ui;(function(n){n[n.Pointer=0]="Pointer",n[n.DraggableRect=1]="DraggableRect"})(Ui||(Ui={}));var Cl;(function(n){n[n.TreeOrder=0]="TreeOrder",n[n.ReversedTreeOrder=1]="ReversedTreeOrder"})(Cl||(Cl={}));function C0(n){let{acceleration:r,activator:i=Ui.Pointer,canScroll:l,draggingRect:a,enabled:c,interval:p=5,order:h=Cl.TreeOrder,pointerCoordinates:g,scrollableAncestors:m,scrollableAncestorRects:y,delta:x,threshold:w}=n;const N=_0({delta:x,disabled:!c}),[R,b]=Ly(),C=k.useRef({x:0,y:0}),L=k.useRef({x:0,y:0}),P=k.useMemo(()=>{switch(i){case Ui.Pointer:return g?{top:g.y,bottom:g.y,left:g.x,right:g.x}:null;case Ui.DraggableRect:return a}},[i,a,g]),H=k.useRef(null),O=k.useCallback(()=>{const ee=H.current;if(!ee)return;const Z=C.current.x*L.current.x,U=C.current.y*L.current.y;ee.scrollBy(Z,U)},[]),B=k.useMemo(()=>h===Cl.TreeOrder?[...m].reverse():m,[h,m]);k.useEffect(()=>{if(!c||!m.length||!P){b();return}for(const ee of B){if((l==null?void 0:l(ee))===!1)continue;const Z=m.indexOf(ee),U=y[Z];if(!U)continue;const{direction:te,speed:q}=p0(ee,U,P,r,w);for(const ie of["x","y"])N[ie][te[ie]]||(q[ie]=0,te[ie]=0);if(q.x>0||q.y>0){b(),H.current=ee,R(O,p),C.current=q,L.current=te;return}}C.current={x:0,y:0},L.current={x:0,y:0},b()},[r,O,l,b,c,p,JSON.stringify(P),JSON.stringify(N),R,m,B,y,JSON.stringify(w)])}const E0={x:{[Ft.Backward]:!1,[Ft.Forward]:!1},y:{[Ft.Backward]:!1,[Ft.Forward]:!1}};function _0(n){let{delta:r,disabled:i}=n;const l=kl(r);return Yi(a=>{if(i||!l||!a)return E0;const c={x:Math.sign(r.x-l.x),y:Math.sign(r.y-l.y)};return{x:{[Ft.Backward]:a.x[Ft.Backward]||c.x===-1,[Ft.Forward]:a.x[Ft.Forward]||c.x===1},y:{[Ft.Backward]:a.y[Ft.Backward]||c.y===-1,[Ft.Forward]:a.y[Ft.Forward]||c.y===1}}},[i,r,l])}function b0(n,r){const i=r!=null?n.get(r):void 0,l=i?i.node.current:null;return Yi(a=>{var c;return r==null?null:(c=l??a)!=null?c:null},[l,r])}function j0(n,r){return k.useMemo(()=>n.reduce((i,l)=>{const{sensor:a}=l,c=a.activators.map(p=>({eventName:p.eventName,handler:r(p.handler,l)}));return[...i,...c]},[]),[n,r])}var qi;(function(n){n[n.Always=0]="Always",n[n.BeforeDragging=1]="BeforeDragging",n[n.WhileDragging=2]="WhileDragging"})(qi||(qi={}));var Gc;(function(n){n.Optimized="optimized"})(Gc||(Gc={}));const kp=new Map;function R0(n,r){let{dragging:i,dependencies:l,config:a}=r;const[c,p]=k.useState(null),{frequency:h,measure:g,strategy:m}=a,y=k.useRef(n),x=C(),w=Gi(x),N=k.useCallback(function(L){L===void 0&&(L=[]),!w.current&&p(P=>P===null?L:P.concat(L.filter(H=>!P.includes(H))))},[w]),R=k.useRef(null),b=Yi(L=>{if(x&&!i)return kp;if(!L||L===kp||y.current!==n||c!=null){const P=new Map;for(let H of n){if(!H)continue;if(c&&c.length>0&&!c.includes(H.id)&&H.rect.current){P.set(H.id,H.rect.current);continue}const O=H.node.current,B=O?new vu(g(O),O):null;H.rect.current=B,B&&P.set(H.id,B)}return P}return L},[n,c,i,x,g]);return k.useEffect(()=>{y.current=n},[n]),k.useEffect(()=>{x||N()},[i,x]),k.useEffect(()=>{c&&c.length>0&&p(null)},[JSON.stringify(c)]),k.useEffect(()=>{x||typeof h!="number"||R.current!==null||(R.current=setTimeout(()=>{N(),R.current=null},h))},[h,x,N,...l]),{droppableRects:b,measureDroppableContainers:N,measuringScheduled:c!=null};function C(){switch(m){case qi.Always:return!1;case qi.BeforeDragging:return i;default:return!i}}}function wu(n,r){return Yi(i=>n?i||(typeof r=="function"?r(n):n):null,[r,n])}function D0(n,r){return wu(n,r)}function I0(n){let{callback:r,disabled:i}=n;const l=Ll(r),a=k.useMemo(()=>{if(i||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:c}=window;return new c(l)},[l,i]);return k.useEffect(()=>()=>a==null?void 0:a.disconnect(),[a]),a}function Ol(n){let{callback:r,disabled:i}=n;const l=Ll(r),a=k.useMemo(()=>{if(i||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:c}=window;return new c(l)},[i]);return k.useEffect(()=>()=>a==null?void 0:a.disconnect(),[a]),a}function A0(n){return new vu(Qs(n),n)}function Sp(n,r,i){r===void 0&&(r=A0);const[l,a]=k.useState(null);function c(){a(g=>{if(!n)return null;if(n.isConnected===!1){var m;return(m=g??i)!=null?m:null}const y=r(n);return JSON.stringify(g)===JSON.stringify(y)?g:y})}const p=I0({callback(g){if(n)for(const m of g){const{type:y,target:x}=m;if(y==="childList"&&x instanceof HTMLElement&&x.contains(n)){c();break}}}}),h=Ol({callback:c});return Hn(()=>{c(),n?(h==null||h.observe(n),p==null||p.observe(document.body,{childList:!0,subtree:!0})):(h==null||h.disconnect(),p==null||p.disconnect())},[n]),l}function M0(n){const r=wu(n);return Ah(n,r)}const Tp=[];function L0(n){const r=k.useRef(n),i=Yi(l=>n?l&&l!==Tp&&n&&r.current&&n.parentNode===r.current.parentNode?l:gu(n):Tp,[n]);return k.useEffect(()=>{r.current=n},[n]),i}function P0(n){const[r,i]=k.useState(null),l=k.useRef(n),a=k.useCallback(c=>{const p=_c(c.target);p&&i(h=>h?(h.set(p,Hc(p)),new Map(h)):null)},[]);return k.useEffect(()=>{const c=l.current;if(n!==c){p(c);const h=n.map(g=>{const m=_c(g);return m?(m.addEventListener("scroll",a,{passive:!0}),[m,Hc(m)]):null}).filter(g=>g!=null);i(h.length?new Map(h):null),l.current=n}return()=>{p(n),p(c)};function p(h){h.forEach(g=>{const m=_c(g);m==null||m.removeEventListener("scroll",a)})}},[a,n]),k.useMemo(()=>n.length?r?Array.from(r.values()).reduce((c,p)=>Gs(c,p),Vn):Fh(n):Vn,[n,r])}function Np(n,r){r===void 0&&(r=[]);const i=k.useRef(null);return k.useEffect(()=>{i.current=null},r),k.useEffect(()=>{const l=n!==Vn;l&&!i.current&&(i.current=n),!l&&i.current&&(i.current=null)},[n]),i.current?Sl(n,i.current):Vn}function O0(n){k.useEffect(()=>{if(!Ml)return;const r=n.map(i=>{let{sensor:l}=i;return l.setup==null?void 0:l.setup()});return()=>{for(const i of r)i==null||i()}},n.map(r=>{let{sensor:i}=r;return i}))}function z0(n,r){return k.useMemo(()=>n.reduce((i,l)=>{let{eventName:a,handler:c}=l;return i[a]=p=>{c(p,r)},i},{}),[n,r])}function Hh(n){return k.useMemo(()=>n?c0(n):null,[n])}const Cp=[];function $0(n,r){r===void 0&&(r=Qs);const[i]=n,l=Hh(i?ln(i):null),[a,c]=k.useState(Cp);function p(){c(()=>n.length?n.map(g=>zh(g)?l:new vu(r(g),g)):Cp)}const h=Ol({callback:p});return Hn(()=>{h==null||h.disconnect(),p(),n.forEach(g=>h==null?void 0:h.observe(g))},[n]),a}function Vh(n){if(!n)return null;if(n.children.length>1)return n;const r=n.children[0];return Ki(r)?r:n}function F0(n){let{measure:r}=n;const[i,l]=k.useState(null),a=k.useCallback(m=>{for(const{target:y}of m)if(Ki(y)){l(x=>{const w=r(y);return x?{...x,width:w.width,height:w.height}:w});break}},[r]),c=Ol({callback:a}),p=k.useCallback(m=>{const y=Vh(m);c==null||c.disconnect(),y&&(c==null||c.observe(y)),l(y?r(y):null)},[r,c]),[h,g]=wl(p);return k.useMemo(()=>({nodeRef:h,rect:i,setRef:g}),[i,h,g])}const U0=[{sensor:xu,options:{}},{sensor:Wh,options:{}}],B0={current:{}},gl={draggable:{measure:vp},droppable:{measure:vp,strategy:qi.WhileDragging,frequency:Gc.Optimized},dragOverlay:{measure:Qs}};class Bi extends Map{get(r){var i;return r!=null&&(i=super.get(r))!=null?i:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(r=>{let{disabled:i}=r;return!i})}getNodeFor(r){var i,l;return(i=(l=this.get(r))==null?void 0:l.node.current)!=null?i:void 0}}const W0={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Bi,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Nl},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:gl,measureDroppableContainers:Nl,windowRect:null,measuringScheduled:!1},Gh={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Nl,draggableNodes:new Map,over:null,measureDroppableContainers:Nl},Xi=k.createContext(Gh),qh=k.createContext(W0);function H0(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Bi}}}function V0(n,r){switch(r.type){case At.DragStart:return{...n,draggable:{...n.draggable,initialCoordinates:r.initialCoordinates,active:r.active}};case At.DragMove:return n.draggable.active==null?n:{...n,draggable:{...n.draggable,translate:{x:r.coordinates.x-n.draggable.initialCoordinates.x,y:r.coordinates.y-n.draggable.initialCoordinates.y}}};case At.DragEnd:case At.DragCancel:return{...n,draggable:{...n.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case At.RegisterDroppable:{const{element:i}=r,{id:l}=i,a=new Bi(n.droppable.containers);return a.set(l,i),{...n,droppable:{...n.droppable,containers:a}}}case At.SetDroppableDisabled:{const{id:i,key:l,disabled:a}=r,c=n.droppable.containers.get(i);if(!c||l!==c.key)return n;const p=new Bi(n.droppable.containers);return p.set(i,{...c,disabled:a}),{...n,droppable:{...n.droppable,containers:p}}}case At.UnregisterDroppable:{const{id:i,key:l}=r,a=n.droppable.containers.get(i);if(!a||l!==a.key)return n;const c=new Bi(n.droppable.containers);return c.delete(i),{...n,droppable:{...n.droppable,containers:c}}}default:return n}}function G0(n){let{disabled:r}=n;const{active:i,activatorEvent:l,draggableNodes:a}=k.useContext(Xi),c=kl(l),p=kl(i==null?void 0:i.id);return k.useEffect(()=>{if(!r&&!l&&c&&p!=null){if(!Pl(c)||document.activeElement===c.target)return;const h=a.get(p);if(!h)return;const{activatorNode:g,node:m}=h;if(!g.current&&!m.current)return;requestAnimationFrame(()=>{for(const y of[g.current,m.current]){if(!y)continue;const x=zy(y);if(x){x.focus();break}}})}},[l,r,a,p,c]),null}function Kh(n,r){let{transform:i,...l}=r;return n!=null&&n.length?n.reduce((a,c)=>c({transform:a,...l}),i):i}function q0(n){return k.useMemo(()=>({draggable:{...gl.draggable,...n==null?void 0:n.draggable},droppable:{...gl.droppable,...n==null?void 0:n.droppable},dragOverlay:{...gl.dragOverlay,...n==null?void 0:n.dragOverlay}}),[n==null?void 0:n.draggable,n==null?void 0:n.droppable,n==null?void 0:n.dragOverlay])}function K0(n){let{activeNode:r,measure:i,initialRect:l,config:a=!0}=n;const c=k.useRef(!1),{x:p,y:h}=typeof a=="boolean"?{x:a,y:a}:a;Hn(()=>{if(!p&&!h||!r){c.current=!1;return}if(c.current||!l)return;const m=r==null?void 0:r.node.current;if(!m||m.isConnected===!1)return;const y=i(m),x=Ah(y,l);if(p||(x.x=0),h||(x.y=0),c.current=!0,Math.abs(x.x)>0||Math.abs(x.y)>0){const w=Lh(m);w&&w.scrollBy({top:x.y,left:x.x})}},[r,p,h,l,i])}const zl=k.createContext({...Vn,scaleX:1,scaleY:1});var Br;(function(n){n[n.Uninitialized=0]="Uninitialized",n[n.Initializing=1]="Initializing",n[n.Initialized=2]="Initialized"})(Br||(Br={}));const Y0=k.memo(function(r){var i,l,a,c;let{id:p,accessibility:h,autoScroll:g=!0,children:m,sensors:y=U0,collisionDetection:x=r0,measuring:w,modifiers:N,...R}=r;const b=k.useReducer(V0,void 0,H0),[C,L]=b,[P,H]=Hy(),[O,B]=k.useState(Br.Uninitialized),ee=O===Br.Initialized,{draggable:{active:Z,nodes:U,translate:te},droppable:{containers:q}}=C,ie=Z!=null?U.get(Z):null,ye=k.useRef({initial:null,translated:null}),Te=k.useMemo(()=>{var ot;return Z!=null?{id:Z,data:(ot=ie==null?void 0:ie.data)!=null?ot:B0,rect:ye}:null},[Z,ie]),Le=k.useRef(null),[K,xe]=k.useState(null),[we,$]=k.useState(null),V=Gi(R,Object.values(R)),W=Qi("DndDescribedBy",p),E=k.useMemo(()=>q.getEnabled(),[q]),D=q0(w),{droppableRects:le,measureDroppableContainers:he,measuringScheduled:_e}=R0(E,{dragging:ee,dependencies:[te.x,te.y],config:D.droppable}),ke=b0(U,Z),Pe=k.useMemo(()=>we?Tl(we):null,[we]),be=Cn(),Ae=D0(ke,D.draggable.measure);K0({activeNode:Z!=null?U.get(Z):null,config:be.layoutShiftCompensation,initialRect:Ae,measure:D.draggable.measure});const Ne=Sp(ke,D.draggable.measure,Ae),jt=Sp(ke?ke.parentElement:null),Me=k.useRef({activatorEvent:null,active:null,activeNode:ke,collisionRect:null,collisions:null,droppableRects:le,draggableNodes:U,draggingNode:null,draggingNodeRect:null,droppableContainers:q,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Nt=q.getNodeFor((i=Me.current.over)==null?void 0:i.id),G=F0({measure:D.dragOverlay.measure}),De=(l=G.nodeRef.current)!=null?l:ke,oe=ee?(a=G.rect)!=null?a:Ne:null,He=!!(G.nodeRef.current&&G.rect),at=M0(He?null:Ne),me=Hh(De?ln(De):null),Fe=L0(ee?Nt??ke:null),F=$0(Fe),ce=Kh(N,{transform:{x:te.x-at.x,y:te.y-at.y,scaleX:1,scaleY:1},activatorEvent:we,active:Te,activeNodeRect:Ne,containerNodeRect:jt,draggingNodeRect:oe,over:Me.current.over,overlayNodeRect:G.rect,scrollableAncestors:Fe,scrollableAncestorRects:F,windowRect:me}),Oe=Pe?Gs(Pe,te):null,Ue=P0(Fe),it=Np(Ue),xt=Np(Ue,[Ne]),et=Gs(ce,it),pt=oe?o0(oe,ce):null,ze=Te&&pt?x({active:Te,collisionRect:pt,droppableRects:le,droppableContainers:E,pointerCoordinates:Oe}):null,Ze=e0(ze,"id"),[tt,tr]=k.useState(null),nr=He?ce:Gs(ce,xt),qr=s0(nr,(c=tt==null?void 0:tt.rect)!=null?c:null,Ne),wr=k.useRef(null),rr=k.useCallback((ot,Rt)=>{let{sensor:Ct,options:an}=Rt;if(Le.current==null)return;const Et=U.get(Le.current);if(!Et)return;const kt=ot.nativeEvent,ct=new Ct({active:Le.current,activeNode:Et,event:kt,options:an,context:Me,onAbort(rt){if(!U.get(rt))return;const{onDragAbort:Mt}=V.current,cn={id:rt};Mt==null||Mt(cn),P({type:"onDragAbort",event:cn})},onPending(rt,Kt,Mt,cn){if(!U.get(rt))return;const{onDragPending:gn}=V.current,Ut={id:rt,constraint:Kt,initialCoordinates:Mt,offset:cn};gn==null||gn(Ut),P({type:"onDragPending",event:Ut})},onStart(rt){const Kt=Le.current;if(Kt==null)return;const Mt=U.get(Kt);if(!Mt)return;const{onDragStart:cn}=V.current,en={activatorEvent:kt,active:{id:Kt,data:Mt.data,rect:ye}};Oi.unstable_batchedUpdates(()=>{cn==null||cn(en),B(Br.Initializing),L({type:At.DragStart,initialCoordinates:rt,active:Kt}),P({type:"onDragStart",event:en}),xe(wr.current),$(kt)})},onMove(rt){L({type:At.DragMove,coordinates:rt})},onEnd:qt(At.DragEnd),onCancel:qt(At.DragCancel)});wr.current=ct;function qt(rt){return async function(){const{active:Mt,collisions:cn,over:en,scrollAdjustedTranslate:gn}=Me.current;let Ut=null;if(Mt&&gn){const{cancelDrop:Ln}=V.current;Ut={activatorEvent:kt,active:Mt,collisions:cn,delta:gn,over:en},rt===At.DragEnd&&typeof Ln=="function"&&await Promise.resolve(Ln(Ut))&&(rt=At.DragCancel)}Le.current=null,Oi.unstable_batchedUpdates(()=>{L({type:rt}),B(Br.Uninitialized),tr(null),xe(null),$(null),wr.current=null;const Ln=rt===At.DragEnd?"onDragEnd":"onDragCancel";if(Ut){const Pn=V.current[Ln];Pn==null||Pn(Ut),P({type:Ln,event:Ut})}})}}},[U]),sr=k.useCallback((ot,Rt)=>(Ct,an)=>{const Et=Ct.nativeEvent,kt=U.get(an);if(Le.current!==null||!kt||Et.dndKit||Et.defaultPrevented)return;const ct={active:kt};ot(Ct,Rt.options,ct)===!0&&(Et.dndKit={capturedBy:Rt.sensor},Le.current=an,rr(Ct,Rt))},[U,rr]),Mn=j0(y,sr);O0(y),Hn(()=>{Ne&&O===Br.Initializing&&B(Br.Initialized)},[Ne,O]),k.useEffect(()=>{const{onDragMove:ot}=V.current,{active:Rt,activatorEvent:Ct,collisions:an,over:Et}=Me.current;if(!Rt||!Ct)return;const kt={active:Rt,activatorEvent:Ct,collisions:an,delta:{x:et.x,y:et.y},over:Et};Oi.unstable_batchedUpdates(()=>{ot==null||ot(kt),P({type:"onDragMove",event:kt})})},[et.x,et.y]),k.useEffect(()=>{const{active:ot,activatorEvent:Rt,collisions:Ct,droppableContainers:an,scrollAdjustedTranslate:Et}=Me.current;if(!ot||Le.current==null||!Rt||!Et)return;const{onDragOver:kt}=V.current,ct=an.get(Ze),qt=ct&&ct.rect.current?{id:ct.id,rect:ct.rect.current,data:ct.data,disabled:ct.disabled}:null,rt={active:ot,activatorEvent:Rt,collisions:Ct,delta:{x:Et.x,y:Et.y},over:qt};Oi.unstable_batchedUpdates(()=>{tr(qt),kt==null||kt(rt),P({type:"onDragOver",event:rt})})},[Ze]),Hn(()=>{Me.current={activatorEvent:we,active:Te,activeNode:ke,collisionRect:pt,collisions:ze,droppableRects:le,draggableNodes:U,draggingNode:De,draggingNodeRect:oe,droppableContainers:q,over:tt,scrollableAncestors:Fe,scrollAdjustedTranslate:et},ye.current={initial:oe,translated:pt}},[Te,ke,ze,pt,U,De,oe,le,q,tt,Fe,et]),C0({...be,delta:te,draggingRect:pt,pointerCoordinates:Oe,scrollableAncestors:Fe,scrollableAncestorRects:F});const Nn=k.useMemo(()=>({active:Te,activeNode:ke,activeNodeRect:Ne,activatorEvent:we,collisions:ze,containerNodeRect:jt,dragOverlay:G,draggableNodes:U,droppableContainers:q,droppableRects:le,over:tt,measureDroppableContainers:he,scrollableAncestors:Fe,scrollableAncestorRects:F,measuringConfiguration:D,measuringScheduled:_e,windowRect:me}),[Te,ke,Ne,we,ze,jt,G,U,q,le,tt,he,Fe,F,D,_e,me]),Gt=k.useMemo(()=>({activatorEvent:we,activators:Mn,active:Te,activeNodeRect:Ne,ariaDescribedById:{draggable:W},dispatch:L,draggableNodes:U,over:tt,measureDroppableContainers:he}),[we,Mn,Te,Ne,L,W,U,tt,he]);return nt.createElement(Ih.Provider,{value:H},nt.createElement(Xi.Provider,{value:Gt},nt.createElement(qh.Provider,{value:Nn},nt.createElement(zl.Provider,{value:qr},m)),nt.createElement(G0,{disabled:(h==null?void 0:h.restoreFocus)===!1})),nt.createElement(qy,{...h,hiddenTextDescribedById:W}));function Cn(){const ot=(K==null?void 0:K.autoScrollEnabled)===!1,Rt=typeof g=="object"?g.enabled===!1:g===!1,Ct=ee&&!ot&&!Rt;return typeof g=="object"?{...g,enabled:Ct}:{enabled:Ct}}}),Q0=k.createContext(null),Ep="button",X0="Draggable";function Z0(n){let{id:r,data:i,disabled:l=!1,attributes:a}=n;const c=Qi(X0),{activators:p,activatorEvent:h,active:g,activeNodeRect:m,ariaDescribedById:y,draggableNodes:x,over:w}=k.useContext(Xi),{role:N=Ep,roleDescription:R="draggable",tabIndex:b=0}=a??{},C=(g==null?void 0:g.id)===r,L=k.useContext(C?zl:Q0),[P,H]=wl(),[O,B]=wl(),ee=z0(p,r),Z=Gi(i);Hn(()=>(x.set(r,{id:r,key:c,node:P,activatorNode:O,data:Z}),()=>{const te=x.get(r);te&&te.key===c&&x.delete(r)}),[x,r]);const U=k.useMemo(()=>({role:N,tabIndex:b,"aria-disabled":l,"aria-pressed":C&&N===Ep?!0:void 0,"aria-roledescription":R,"aria-describedby":y.draggable}),[l,N,b,C,R,y.draggable]);return{active:g,activatorEvent:h,activeNodeRect:m,attributes:U,isDragging:C,listeners:l?void 0:ee,node:P,over:w,setNodeRef:H,setActivatorNodeRef:B,transform:L}}function Yh(){return k.useContext(qh)}const J0="Droppable",ex={timeout:25};function Qh(n){let{data:r,disabled:i=!1,id:l,resizeObserverConfig:a}=n;const c=Qi(J0),{active:p,dispatch:h,over:g,measureDroppableContainers:m}=k.useContext(Xi),y=k.useRef({disabled:i}),x=k.useRef(!1),w=k.useRef(null),N=k.useRef(null),{disabled:R,updateMeasurementsFor:b,timeout:C}={...ex,...a},L=Gi(b??l),P=k.useCallback(()=>{if(!x.current){x.current=!0;return}N.current!=null&&clearTimeout(N.current),N.current=setTimeout(()=>{m(Array.isArray(L.current)?L.current:[L.current]),N.current=null},C)},[C]),H=Ol({callback:P,disabled:R||!p}),O=k.useCallback((U,te)=>{H&&(te&&(H.unobserve(te),x.current=!1),U&&H.observe(U))},[H]),[B,ee]=wl(O),Z=Gi(r);return k.useEffect(()=>{!H||!B.current||(H.disconnect(),x.current=!1,H.observe(B.current))},[B,H]),k.useEffect(()=>(h({type:At.RegisterDroppable,element:{id:l,key:c,disabled:i,node:B,rect:w,data:Z}}),()=>h({type:At.UnregisterDroppable,key:c,id:l})),[l]),k.useEffect(()=>{i!==y.current.disabled&&(h({type:At.SetDroppableDisabled,id:l,key:c,disabled:i}),y.current.disabled=i)},[l,c,i,h]),{active:p,rect:w,isOver:(g==null?void 0:g.id)===l,node:B,over:g,setNodeRef:ee}}function tx(n){let{animation:r,children:i}=n;const[l,a]=k.useState(null),[c,p]=k.useState(null),h=kl(i);return!i&&!l&&h&&a(h),Hn(()=>{if(!c)return;const g=l==null?void 0:l.key,m=l==null?void 0:l.props.id;if(g==null||m==null){a(null);return}Promise.resolve(r(m,c)).then(()=>{a(null)})},[r,l,c]),nt.createElement(nt.Fragment,null,i,l?k.cloneElement(l,{ref:p}):null)}const nx={x:0,y:0,scaleX:1,scaleY:1};function rx(n){let{children:r}=n;return nt.createElement(Xi.Provider,{value:Gh},nt.createElement(zl.Provider,{value:nx},r))}const sx={position:"fixed",touchAction:"none"},ix=n=>Pl(n)?"transform 250ms ease":void 0,ox=k.forwardRef((n,r)=>{let{as:i,activatorEvent:l,adjustScale:a,children:c,className:p,rect:h,style:g,transform:m,transition:y=ix}=n;if(!h)return null;const x=a?m:{...m,scaleX:1,scaleY:1},w={...sx,width:h.width,height:h.height,top:h.top,left:h.left,transform:xr.Transform.toString(x),transformOrigin:a&&l?Xy(l,h):void 0,transition:typeof y=="function"?y(l):y,...g};return nt.createElement(i,{className:p,style:w,ref:r},c)}),lx=n=>r=>{let{active:i,dragOverlay:l}=r;const a={},{styles:c,className:p}=n;if(c!=null&&c.active)for(const[h,g]of Object.entries(c.active))g!==void 0&&(a[h]=i.node.style.getPropertyValue(h),i.node.style.setProperty(h,g));if(c!=null&&c.dragOverlay)for(const[h,g]of Object.entries(c.dragOverlay))g!==void 0&&l.node.style.setProperty(h,g);return p!=null&&p.active&&i.node.classList.add(p.active),p!=null&&p.dragOverlay&&l.node.classList.add(p.dragOverlay),function(){for(const[g,m]of Object.entries(a))i.node.style.setProperty(g,m);p!=null&&p.active&&i.node.classList.remove(p.active)}},ax=n=>{let{transform:{initial:r,final:i}}=n;return[{transform:xr.Transform.toString(r)},{transform:xr.Transform.toString(i)}]},cx={duration:250,easing:"ease",keyframes:ax,sideEffects:lx({styles:{active:{opacity:"0"}}})};function ux(n){let{config:r,draggableNodes:i,droppableContainers:l,measuringConfiguration:a}=n;return Ll((c,p)=>{if(r===null)return;const h=i.get(c);if(!h)return;const g=h.node.current;if(!g)return;const m=Vh(p);if(!m)return;const{transform:y}=ln(p).getComputedStyle(p),x=Mh(y);if(!x)return;const w=typeof r=="function"?r:dx(r);return Uh(g,a.draggable.measure),w({active:{id:c,data:h.data,node:g,rect:a.draggable.measure(g)},draggableNodes:i,dragOverlay:{node:p,rect:a.dragOverlay.measure(m)},droppableContainers:l,measuringConfiguration:a,transform:x})})}function dx(n){const{duration:r,easing:i,sideEffects:l,keyframes:a}={...cx,...n};return c=>{let{active:p,dragOverlay:h,transform:g,...m}=c;if(!r)return;const y={x:h.rect.left-p.rect.left,y:h.rect.top-p.rect.top},x={scaleX:g.scaleX!==1?p.rect.width*g.scaleX/h.rect.width:1,scaleY:g.scaleY!==1?p.rect.height*g.scaleY/h.rect.height:1},w={x:g.x-y.x,y:g.y-y.y,...x},N=a({...m,active:p,dragOverlay:h,transform:{initial:g,final:w}}),[R]=N,b=N[N.length-1];if(JSON.stringify(R)===JSON.stringify(b))return;const C=l==null?void 0:l({active:p,dragOverlay:h,...m}),L=h.node.animate(N,{duration:r,easing:i,fill:"forwards"});return new Promise(P=>{L.onfinish=()=>{C==null||C(),P()}})}}let _p=0;function fx(n){return k.useMemo(()=>{if(n!=null)return _p++,_p},[n])}const px=nt.memo(n=>{let{adjustScale:r=!1,children:i,dropAnimation:l,style:a,transition:c,modifiers:p,wrapperElement:h="div",className:g,zIndex:m=999}=n;const{activatorEvent:y,active:x,activeNodeRect:w,containerNodeRect:N,draggableNodes:R,droppableContainers:b,dragOverlay:C,over:L,measuringConfiguration:P,scrollableAncestors:H,scrollableAncestorRects:O,windowRect:B}=Yh(),ee=k.useContext(zl),Z=fx(x==null?void 0:x.id),U=Kh(p,{activatorEvent:y,active:x,activeNodeRect:w,containerNodeRect:N,draggingNodeRect:C.rect,over:L,overlayNodeRect:C.rect,scrollableAncestors:H,scrollableAncestorRects:O,transform:ee,windowRect:B}),te=wu(w),q=ux({config:l,draggableNodes:R,droppableContainers:b,measuringConfiguration:P}),ie=te?C.setRef:void 0;return nt.createElement(rx,null,nt.createElement(tx,{animation:q},x&&Z?nt.createElement(ox,{key:Z,id:x.id,ref:ie,as:h,activatorEvent:y,adjustScale:r,className:g,transition:c,rect:te,style:{zIndex:m,...a},transform:U},i):null))});function Xh(n,r,i){const l=n.slice();return l.splice(i<0?l.length+i:i,0,l.splice(r,1)[0]),l}function hx(n,r){return n.reduce((i,l,a)=>{const c=r.get(l);return c&&(i[a]=c),i},Array(n.length))}function al(n){return n!==null&&n>=0}function mx(n,r){if(n===r)return!0;if(n.length!==r.length)return!1;for(let i=0;i<n.length;i++)if(n[i]!==r[i])return!1;return!0}function gx(n){return typeof n=="boolean"?{draggable:n,droppable:n}:n}const Zh=n=>{let{rects:r,activeIndex:i,overIndex:l,index:a}=n;const c=Xh(r,l,i),p=r[a],h=c[a];return!h||!p?null:{x:h.left-p.left,y:h.top-p.top,scaleX:h.width/p.width,scaleY:h.height/p.height}},cl={scaleX:1,scaleY:1},bp=n=>{var r;let{activeIndex:i,activeNodeRect:l,index:a,rects:c,overIndex:p}=n;const h=(r=c[i])!=null?r:l;if(!h)return null;if(a===i){const m=c[p];return m?{x:0,y:i<p?m.top+m.height-(h.top+h.height):m.top-h.top,...cl}:null}const g=vx(c,a,i);return a>i&&a<=p?{x:0,y:-h.height-g,...cl}:a<i&&a>=p?{x:0,y:h.height+g,...cl}:{x:0,y:0,...cl}};function vx(n,r,i){const l=n[r],a=n[r-1],c=n[r+1];return l?i<r?a?l.top-(a.top+a.height):c?c.top-(l.top+l.height):0:c?c.top-(l.top+l.height):a?l.top-(a.top+a.height):0:0}const Jh="Sortable",em=nt.createContext({activeIndex:-1,containerId:Jh,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Zh,disabled:{draggable:!1,droppable:!1}});function jp(n){let{children:r,id:i,items:l,strategy:a=Zh,disabled:c=!1}=n;const{active:p,dragOverlay:h,droppableRects:g,over:m,measureDroppableContainers:y}=Yh(),x=Qi(Jh,i),w=h.rect!==null,N=k.useMemo(()=>l.map(ee=>typeof ee=="object"&&"id"in ee?ee.id:ee),[l]),R=p!=null,b=p?N.indexOf(p.id):-1,C=m?N.indexOf(m.id):-1,L=k.useRef(N),P=!mx(N,L.current),H=C!==-1&&b===-1||P,O=gx(c);Hn(()=>{P&&R&&y(N)},[P,N,R,y]),k.useEffect(()=>{L.current=N},[N]);const B=k.useMemo(()=>({activeIndex:b,containerId:x,disabled:O,disableTransforms:H,items:N,overIndex:C,useDragOverlay:w,sortedRects:hx(N,g),strategy:a}),[b,x,O.draggable,O.droppable,H,N,C,g,w,a]);return nt.createElement(em.Provider,{value:B},r)}const yx=n=>{let{id:r,items:i,activeIndex:l,overIndex:a}=n;return Xh(i,l,a).indexOf(r)},xx=n=>{let{containerId:r,isSorting:i,wasDragging:l,index:a,items:c,newIndex:p,previousItems:h,previousContainerId:g,transition:m}=n;return!m||!l||h!==c&&a===p?!1:i?!0:p!==a&&r===g},wx={duration:200,easing:"ease"},tm="transform",kx=xr.Transition.toString({property:tm,duration:0,easing:"linear"}),Sx={roleDescription:"sortable"};function Tx(n){let{disabled:r,index:i,node:l,rect:a}=n;const[c,p]=k.useState(null),h=k.useRef(i);return Hn(()=>{if(!r&&i!==h.current&&l.current){const g=a.current;if(g){const m=Qs(l.current,{ignoreTransform:!0}),y={x:g.left-m.left,y:g.top-m.top,scaleX:g.width/m.width,scaleY:g.height/m.height};(y.x||y.y)&&p(y)}}i!==h.current&&(h.current=i)},[r,i,l,a]),k.useEffect(()=>{c&&p(null)},[c]),c}function nm(n){let{animateLayoutChanges:r=xx,attributes:i,disabled:l,data:a,getNewIndex:c=yx,id:p,strategy:h,resizeObserverConfig:g,transition:m=wx}=n;const{items:y,containerId:x,activeIndex:w,disabled:N,disableTransforms:R,sortedRects:b,overIndex:C,useDragOverlay:L,strategy:P}=k.useContext(em),H=Nx(l,N),O=y.indexOf(p),B=k.useMemo(()=>({sortable:{containerId:x,index:O,items:y},...a}),[x,a,O,y]),ee=k.useMemo(()=>y.slice(y.indexOf(p)),[y,p]),{rect:Z,node:U,isOver:te,setNodeRef:q}=Qh({id:p,data:B,disabled:H.droppable,resizeObserverConfig:{updateMeasurementsFor:ee,...g}}),{active:ie,activatorEvent:ye,activeNodeRect:Te,attributes:Le,setNodeRef:K,listeners:xe,isDragging:we,over:$,setActivatorNodeRef:V,transform:W}=Z0({id:p,data:B,attributes:{...Sx,...i},disabled:H.draggable}),E=My(q,K),D=!!ie,le=D&&!R&&al(w)&&al(C),he=!L&&we,_e=he&&le?W:null,Pe=le?_e??(h??P)({rects:b,activeNodeRect:Te,activeIndex:w,overIndex:C,index:O}):null,be=al(w)&&al(C)?c({id:p,items:y,activeIndex:w,overIndex:C}):O,Ae=ie==null?void 0:ie.id,Ne=k.useRef({activeId:Ae,items:y,newIndex:be,containerId:x}),jt=y!==Ne.current.items,Me=r({active:ie,containerId:x,isDragging:we,isSorting:D,id:p,index:O,items:y,newIndex:Ne.current.newIndex,previousItems:Ne.current.items,previousContainerId:Ne.current.containerId,transition:m,wasDragging:Ne.current.activeId!=null}),Nt=Tx({disabled:!Me,index:O,node:U,rect:Z});return k.useEffect(()=>{D&&Ne.current.newIndex!==be&&(Ne.current.newIndex=be),x!==Ne.current.containerId&&(Ne.current.containerId=x),y!==Ne.current.items&&(Ne.current.items=y)},[D,be,x,y]),k.useEffect(()=>{if(Ae===Ne.current.activeId)return;if(Ae!=null&&Ne.current.activeId==null){Ne.current.activeId=Ae;return}const De=setTimeout(()=>{Ne.current.activeId=Ae},50);return()=>clearTimeout(De)},[Ae]),{active:ie,activeIndex:w,attributes:Le,data:B,rect:Z,index:O,newIndex:be,items:y,isOver:te,isSorting:D,isDragging:we,listeners:xe,node:U,overIndex:C,over:$,setNodeRef:E,setActivatorNodeRef:V,setDroppableNodeRef:q,setDraggableNodeRef:K,transform:Nt??Pe,transition:G()};function G(){if(Nt||jt&&Ne.current.newIndex===O)return kx;if(!(he&&!Pl(ye)||!m)&&(D||Me))return xr.Transition.toString({...m,property:tm})}}function Nx(n,r){var i,l;return typeof n=="boolean"?{draggable:n,droppable:!1}:{draggable:(i=n==null?void 0:n.draggable)!=null?i:r.draggable,droppable:(l=n==null?void 0:n.droppable)!=null?l:r.droppable}}Xe.Down,Xe.Right,Xe.Up,Xe.Left;function Rc(n){const[r,i]=k.useState(()=>{try{const a=localStorage.getItem(n);if(a==null)return new Set;const c=JSON.parse(a);return Array.isArray(c)?new Set(c.filter(p=>typeof p=="string")):new Set}catch{return new Set}}),l=k.useCallback(a=>{i(c=>{const p=a(new Set(c));try{localStorage.setItem(n,JSON.stringify([...p]))}catch{}return p})},[n]);return[r,l]}async function qc(n){try{return await navigator.clipboard.writeText(n),!0}catch{try{const r=document.createElement("textarea");r.value=n,r.style.position="fixed",r.style.opacity="0",document.body.appendChild(r),r.select();const i=document.execCommand("copy");return document.body.removeChild(r),i}catch{return!1}}}function Cx(n,r){const i=new Map;for(const p of r){const h=p.cwd||"(no directory)",g=i.get(h)??[];g.push(p),i.set(h,g)}const l=new Set,a=new Set(n.filter(p=>p.deleted===1).map(p=>p.path)),c=[];for(const p of n){if(p.deleted===1){l.add(p.path);continue}l.add(p.path),c.push({path:p.path,label:p.label||p.path.split("/").pop()||p.path,sessions:i.get(p.path)??[],workspace:p})}for(const[p,h]of i)l.has(p)||a.has(p)||c.push({path:p,label:p==="(no directory)"?"Other":p.split("/").pop()||p,sessions:h,workspace:null});return c}function ul(n){return[...n].sort((r,i)=>i.sort_order-r.sort_order||(r.created_at<i.created_at?1:-1))}function dl(n,r){return n.folder_id&&r.has(n.folder_id)?n.folder_id:null}function Ex(n){const r=new Set(n.map(l=>l.name));if(!r.has("New Folder"))return"New Folder";let i=2;for(;r.has(`New Folder ${i}`);)i++;return`New Folder ${i}`}function Rp({id:n,children:r,className:i}){const{setNodeRef:l,isOver:a}=Qh({id:n});return u.jsx("div",{ref:l,className:`${i??""}${a?" drop-over":""}`,children:r})}function _x({s:n,isActive:r,renaming:i,renameValue:l,renameRef:a,onRenameValue:c,onRenameConfirm:p,onRenameCancel:h,onSelect:g,onCtxMenu:m,onToggleStar:y}){const{attributes:x,listeners:w,setNodeRef:N,transform:R,transition:b,isDragging:C}=nm({id:`s:${n.id}`}),L=lu(n);return u.jsxs("div",{ref:N,style:{transform:xr.Transform.toString(R),transition:b},className:`tree-item ${r?"active":""} ${L.isFinished?"tree-item-finished":""}${C?" dragging":""}${n.starred?" tree-item-starred":""}`,...x,...w,onClick:g,onContextMenu:m,children:[u.jsx(Th,{iconClass:L.iconClass,iconText:L.iconText,size:16}),i?u.jsx("input",{ref:a,className:"tree-rename-input",value:l,onChange:P=>c(P.target.value),onClick:P=>P.stopPropagation(),onPointerDown:P=>P.stopPropagation(),onKeyDown:P=>{P.key==="Enter"&&p(),P.key==="Escape"&&h()},onBlur:p}):u.jsx("span",{className:"tree-label",children:n.title||n.id.slice(0,8)}),!i&&u.jsx("button",{className:`star-btn${n.starred?" starred":""}`,title:n.starred?"Unstar session":"Star session",onClick:P=>{P.stopPropagation(),y()},onPointerDown:P=>P.stopPropagation(),children:u.jsx(by,{size:10,fill:n.starred?"currentColor":"none"})}),L.dot&&u.jsx(cu,{status:L.dot})]})}function bx({folder:n,count:r,collapsed:i,renaming:l,renameValue:a,renameRef:c,onRenameValue:p,onRenameConfirm:h,onRenameCancel:g,onToggle:m,onCtxMenu:y,children:x}){const{attributes:w,listeners:N,setNodeRef:R,transform:b,transition:C,isDragging:L,over:P}=nm({id:`f:${n.id}`}),H=P!=null&&String(P.id).startsWith("s:");return u.jsxs("div",{ref:R,style:{transform:xr.Transform.toString(b),transition:C},className:`tree-folder ${i?"collapsed":""}${L?" dragging":""}`,children:[u.jsx("div",{className:`tree-folder-header${H?" drop-over":""}`,...w,...N,onClick:()=>{l||m()},onContextMenu:y,children:l?u.jsx("input",{ref:c,className:"tree-rename-input",value:a,onChange:O=>p(O.target.value),onClick:O=>O.stopPropagation(),onPointerDown:O=>O.stopPropagation(),onKeyDown:O=>{O.key==="Enter"&&h(),O.key==="Escape"&&g()},onBlur:h}):u.jsxs(u.Fragment,{children:[u.jsx(Vi,{size:8,className:"tree-chevron"}),u.jsx(Wc,{size:12}),u.jsx("span",{className:"tree-folder-label",children:n.name}),u.jsx("span",{className:"tree-count",children:r})]})}),!i&&u.jsx("div",{className:"tree-folder-children",children:x})]})}function jx(){const{sessions:n,workspaces:r,folders:i,activeSessionId:l,selectSession:a,deleteSession:c,removeWorkspace:p,createSessionInWorkspace:h,pickAndAddWorkspace:g,renameSession:m,markFinished:y,toggleStar:x,reopenSession:w,createSidebarFolder:N,renameFolder:R,deleteFolder:b,applyMoves:C,reorderFolders:L}=se(),[P,H]=Rc("agentpane:sidebar-ws-collapsed"),[O,B]=Rc("agentpane:sidebar-sub-collapsed"),[ee,Z]=Rc("agentpane:sidebar-folders-collapsed"),[U,te]=k.useState(null),[q,ie]=k.useState(null),[ye,Te]=k.useState(""),[Le,K]=k.useState(null),xe=k.useRef(null),we=k.useRef(null),$=Yy(Ky(xu,{activationConstraint:{distance:5}}));Dl(xe,()=>te(null),!!U),au(()=>te(null),!!U);const V=k.useMemo(()=>new Map(n.map(G=>[G.id,G])),[n]),W=k.useMemo(()=>new Map(i.map(G=>[G.id,G])),[i]),E=k.useMemo(()=>{const G=new Map;for(const De of[...i].sort((oe,He)=>oe.sort_order-He.sort_order)){const oe=G.get(De.workspace_path)??[];oe.push(De),G.set(De.workspace_path,oe)}return G},[i]);function D(G){H(De=>{const oe=new Set(De);return oe.has(G)?oe.delete(G):oe.add(G),oe})}function le(G){B(De=>{const oe=new Set(De);return oe.has(G)?oe.delete(G):oe.add(G),oe})}function he(G){Z(De=>{const oe=new Set(De);return oe.has(G)?oe.delete(G):oe.add(G),oe})}k.useEffect(()=>{q&&we.current&&(we.current.focus(),we.current.select())},[q]);function _e(G,De,oe,He=""){ie({kind:G,id:De}),Te(oe||He)}function ke(){if(q){const G=ye.trim();G&&(q.kind==="session"?m(q.id,G):R(q.id,G))}ie(null)}function Pe(){ie(null),Te("")}async function be(G){const De=Ex(E.get(G)??[]),oe=await N(G,De);oe&&_e("folder",oe.id,oe.name)}function Ae(G){const De=String(G.active.id);if(De.startsWith("s:")){const oe=V.get(De.slice(2));oe&&K({kind:"session",label:oe.title||oe.id.slice(0,8)})}else if(De.startsWith("f:")){const oe=W.get(De.slice(2));oe&&K({kind:"folder",label:oe.name})}}function Ne(G){K(null);const{active:De,over:oe}=G;if(!oe)return;const He=String(De.id),at=String(oe.id);if(He.startsWith("s:")){const me=V.get(He.slice(2));if(!me)return;const Fe=me.cwd||"(no directory)",F=dl(me,W);let ce,Oe;if(at.startsWith("f:")){const ze=W.get(at.slice(2));if(!ze)return;ce=ze.workspace_path,Oe=ze.id}else if(at.startsWith("s:")){const ze=V.get(at.slice(2));if(!ze)return;ce=ze.cwd||"(no directory)",Oe=dl(ze,W)}else if(at.startsWith("c:")){const ze=at.slice(2),Ze=ze.lastIndexOf("|");ce=ze.slice(0,Ze);const tt=ze.slice(Ze+1);Oe=tt==="root"?null:tt}else return;if(ce!==Fe)return;const Ue=ul(n.filter(ze=>(ze.cwd||"(no directory)")===ce&&dl(ze,W)===Oe)),it=Ue.filter(ze=>ze.id!==me.id);let xt=it.length;if(at.startsWith("s:")){const ze=it.findIndex(Ze=>Ze.id===at.slice(2));ze>=0&&(xt=ze)}const et=[...it.slice(0,xt),me,...it.slice(xt)],pt=[];if(Oe===F){if(et.length===Ue.length&&et.every((ze,Ze)=>ze.id===Ue[Ze].id))return;et.forEach((ze,Ze)=>pt.push({id:ze.id,folder_id:Oe,sort_order:et.length-1-Ze}))}else{const ze=ul(n.filter(Ze=>(Ze.cwd||"(no directory)")===Fe&&dl(Ze,W)===F)).filter(Ze=>Ze.id!==me.id);ze.forEach((Ze,tt)=>pt.push({id:Ze.id,folder_id:F,sort_order:ze.length-1-tt})),et.forEach((Ze,tt)=>pt.push({id:Ze.id,folder_id:Oe,sort_order:et.length-1-tt}))}C(pt);return}if(He.startsWith("f:")){if(!at.startsWith("f:"))return;const me=W.get(He.slice(2)),Fe=W.get(at.slice(2));if(!me||!Fe||me.id===Fe.id||me.workspace_path!==Fe.workspace_path)return;const F=(E.get(me.workspace_path)??[]).map(Ue=>Ue.id),ce=F.indexOf(me.id),Oe=F.indexOf(Fe.id);F.splice(Oe,0,...F.splice(ce,1)),L(F)}}const jt=Cx(r,n);function Me(G){return u.jsx(_x,{s:G,isActive:l===G.id,renaming:(q==null?void 0:q.kind)==="session"&&q.id===G.id,renameValue:ye,renameRef:we,onRenameValue:Te,onRenameConfirm:ke,onRenameCancel:Pe,onSelect:()=>a(G.id),onToggleStar:()=>x(G.id),onCtxMenu:De=>{De.preventDefault(),te({x:De.clientX,y:De.clientY,type:"session",sessionId:G.id,sessionTitle:G.title,sessionLifecycle:G.lifecycle,sessionExternalId:G.external_thread_id})}},G.id)}function Nt(G,De){const oe=ul(G.filter(Fe=>Fe.lifecycle!=="finished")),He=ul(G.filter(Fe=>Fe.lifecycle==="finished")),at=[...oe,...He].map(Fe=>`s:${Fe.id}`),me=O.has(De);return u.jsxs(jp,{items:at,strategy:bp,children:[oe.length===0&&He.length===0?u.jsx("div",{className:"tree-empty",children:"No sessions"}):oe.map(Me),He.length>0&&u.jsxs("div",{className:`tree-subgroup ${me?"collapsed":""}`,children:[u.jsxs("div",{className:"tree-subgroup-header",onClick:()=>le(De),children:[u.jsx(Vi,{size:8,className:"tree-chevron"}),u.jsx("span",{className:"tree-subgroup-label",children:"Finished"}),u.jsx("span",{className:"tree-subgroup-count",children:He.length})]}),!me&&u.jsx("div",{className:"tree-subgroup-items",children:He.map(Me)})]})]})}return u.jsxs("div",{className:"ide-sidebar",children:[u.jsxs("div",{className:"sidebar-header",children:[u.jsx("span",{className:"sidebar-header-title",children:"Workspaces"}),u.jsx("button",{className:"sidebar-add",title:"Add workspace",onClick:()=>g(),children:u.jsx($i,{size:14})})]}),u.jsxs(Y0,{sensors:$,collisionDetection:t0,onDragStart:Ae,onDragEnd:Ne,children:[jt.length===0?u.jsx("div",{className:"empty-state",style:{padding:"16px"},children:"No workspaces yet. Click + to add one."}):jt.map(G=>{const De=P.has(G.path),oe=E.get(G.path)??[],He=new Set(oe.map(me=>me.id)),at=G.sessions.filter(me=>!(me.folder_id&&He.has(me.folder_id)));return u.jsxs("div",{className:`tree-section ${De?"collapsed":""}`,children:[u.jsxs("div",{className:"tree-section-header",onClick:()=>D(G.path),onContextMenu:me=>{me.preventDefault(),te({x:me.clientX,y:me.clientY,type:"workspace",path:G.path})},children:[u.jsx(Vi,{size:9,className:"tree-chevron"}),u.jsx(Wc,{size:14}),u.jsx("span",{className:"tree-section-label",children:G.label}),u.jsx("button",{className:"tree-section-add",title:"New session in this workspace",onClick:me=>{me.stopPropagation(),h(G.path)},children:u.jsx($i,{size:11})}),u.jsx("button",{className:"tree-section-add",title:"New folder in this workspace",onClick:me=>{me.stopPropagation(),be(G.path)},children:u.jsx(Cc,{size:11})}),u.jsx("span",{className:"tree-count",children:G.sessions.length})]}),!De&&u.jsxs("div",{className:"tree-children",children:[u.jsx(jp,{items:oe.map(me=>`f:${me.id}`),strategy:bp,children:oe.map(me=>{const Fe=G.sessions.filter(F=>F.folder_id===me.id);return u.jsx(bx,{folder:me,count:Fe.length,collapsed:ee.has(me.id),renaming:(q==null?void 0:q.kind)==="folder"&&q.id===me.id,renameValue:ye,renameRef:we,onRenameValue:Te,onRenameConfirm:ke,onRenameCancel:Pe,onToggle:()=>he(me.id),onCtxMenu:F=>{F.preventDefault(),te({x:F.clientX,y:F.clientY,type:"folder",folderId:me.id,folderName:me.name})},children:u.jsx(Rp,{id:`c:${G.path}|${me.id}`,children:Nt(Fe,`folder:${me.id}:finished`)})},me.id)})}),u.jsx(Rp,{id:`c:${G.path}|root`,children:Nt(at,`${G.path}:finished`)})]})]},G.path)}),u.jsx(px,{children:Le&&u.jsxs("div",{className:"drag-overlay",children:[Le.kind==="folder"&&u.jsx(Wc,{size:12}),u.jsx("span",{children:Le.label})]})})]}),u.jsxs("div",{className:"sidebar-footer",onClick:()=>g(),children:[u.jsx(Cc,{size:14}),u.jsx("span",{children:"Add workspace"})]}),U&&u.jsxs("div",{ref:xe,className:"ctx-menu",style:{position:"fixed",left:U.x,top:U.y,zIndex:500},children:[U.type==="workspace"&&u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"ctx-menu-item",onClick:()=>{h(U.path),te(null)},children:[u.jsx($i,{size:12})," New Session"]}),u.jsxs("div",{className:"ctx-menu-item",onClick:()=>{be(U.path),te(null)},children:[u.jsx(Cc,{size:12})," New Folder"]}),u.jsxs("div",{className:"ctx-menu-item ctx-danger",onClick:()=>{p(U.path),te(null)},children:[u.jsx(ps,{size:12})," Hide Workspace"]})]}),U.type==="folder"&&u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"ctx-menu-item",onClick:()=>{_e("folder",U.folderId,U.folderName??""),te(null)},children:[u.jsx(hp,{size:12})," Rename Folder"]}),u.jsxs("div",{className:"ctx-menu-item ctx-danger",onClick:()=>{b(U.folderId),te(null)},children:[u.jsx(ps,{size:12})," Delete Folder"]})]}),U.type==="session"&&u.jsx(u.Fragment,{children:U.sessionLifecycle!=="finished"?u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"ctx-menu-item",onClick:()=>{_e("session",U.sessionId,U.sessionTitle??""),te(null)},children:[u.jsx(hp,{size:12})," Rename"]}),u.jsxs("div",{className:"ctx-menu-item",onClick:()=>{y(U.sessionId),te(null)},children:[u.jsx(fu,{size:12})," Mark as Finished"]}),u.jsxs("div",{className:`ctx-menu-item${U.sessionExternalId?"":" ctx-disabled"}`,title:U.sessionExternalId?void 0:"Session not started",onClick:()=>{U.sessionExternalId&&(qc(U.sessionExternalId),te(null))},children:[u.jsx(Bc,{size:12})," Copy Session ID"]}),u.jsxs("div",{className:"ctx-menu-item ctx-danger",onClick:()=>{c(U.sessionId),te(null)},children:[u.jsx(ps,{size:12})," Delete Session"]})]}):u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"ctx-menu-item",onClick:()=>{w(U.sessionId),te(null)},children:[u.jsx(pu,{size:12})," Reopen"]}),u.jsxs("div",{className:`ctx-menu-item${U.sessionExternalId?"":" ctx-disabled"}`,title:U.sessionExternalId?void 0:"Session not started",onClick:()=>{U.sessionExternalId&&(qc(U.sessionExternalId),te(null))},children:[u.jsx(Bc,{size:12})," Copy Session ID"]}),u.jsxs("div",{className:"ctx-menu-item ctx-danger",onClick:()=>{c(U.sessionId),te(null)},children:[u.jsx(ps,{size:12})," Delete Session"]})]})})]})]})}function Rx(){const n=se(p=>p.openTabs),r=se(p=>p.activeSessionId),i=se(p=>p.sessions),l=se(p=>p.selectSession),a=se(p=>p.closeTab),c=se(p=>p.setShowNewSessionDialog);return u.jsxs("div",{className:"ide-tabs",children:[n.map(p=>{const h=i.find(y=>y.id===p);if(!h)return null;const g=lu(h),m=r===p;return u.jsxs("div",{className:`ide-tab ${m?"active":""}`,onClick:()=>l(p),children:[u.jsx(Th,{iconClass:g.iconClass,iconText:g.iconText,size:14}),h.title||p.slice(0,8),g.dot&&u.jsx(cu,{status:g.dot}),u.jsx("span",{className:"ide-tab-close",onClick:y=>{y.stopPropagation(),a(p)},children:u.jsx(er,{size:12})})]},p)}),u.jsx("div",{className:"ide-tab-add",title:"New Session",onClick:()=>c(!0),children:u.jsx($i,{size:14})})]})}function ku(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ms=ku();function rm(n){ms=n}var Wi={exec:()=>null};function Je(n,r=""){let i=typeof n=="string"?n:n.source;const l={replace:(a,c)=>{let p=typeof c=="string"?c:c.source;return p=p.replace(on.caret,"$1"),i=i.replace(a,p),l},getRegex:()=>new RegExp(i,r)};return l}var on={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:n=>new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}#`),htmlBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}<(?:[a-z].*>|!--)`,"i")},Dx=/^(?:[ \t]*(?:\n|$))+/,Ix=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Ax=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Zi=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Mx=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Su=/(?:[*+-]|\d{1,9}[.)])/,sm=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,im=Je(sm).replace(/bull/g,Su).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Lx=Je(sm).replace(/bull/g,Su).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Tu=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Px=/^[^\n]+/,Nu=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Ox=Je(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Nu).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),zx=Je(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Su).getRegex(),$l="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Cu=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,$x=Je("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Cu).replace("tag",$l).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),om=Je(Tu).replace("hr",Zi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",$l).getRegex(),Fx=Je(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",om).getRegex(),Eu={blockquote:Fx,code:Ix,def:Ox,fences:Ax,heading:Mx,hr:Zi,html:$x,lheading:im,list:zx,newline:Dx,paragraph:om,table:Wi,text:Px},Dp=Je("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Zi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",$l).getRegex(),Ux={...Eu,lheading:Lx,table:Dp,paragraph:Je(Tu).replace("hr",Zi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Dp).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",$l).getRegex()},Bx={...Eu,html:Je(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Cu).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Wi,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Je(Tu).replace("hr",Zi).replace("heading",` *#{1,6} *[^
|
|
338
|
+
]`).replace("lheading",im).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Wx=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Hx=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,lm=/^( {2,}|\\)\n(?!\s*$)/,Vx=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Fl=/[\p{P}\p{S}]/u,_u=/[\s\p{P}\p{S}]/u,am=/[^\s\p{P}\p{S}]/u,Gx=Je(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,_u).getRegex(),cm=/(?!~)[\p{P}\p{S}]/u,qx=/(?!~)[\s\p{P}\p{S}]/u,Kx=/(?:[^\s\p{P}\p{S}]|~)/u,Yx=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,um=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Qx=Je(um,"u").replace(/punct/g,Fl).getRegex(),Xx=Je(um,"u").replace(/punct/g,cm).getRegex(),dm="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Zx=Je(dm,"gu").replace(/notPunctSpace/g,am).replace(/punctSpace/g,_u).replace(/punct/g,Fl).getRegex(),Jx=Je(dm,"gu").replace(/notPunctSpace/g,Kx).replace(/punctSpace/g,qx).replace(/punct/g,cm).getRegex(),e1=Je("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,am).replace(/punctSpace/g,_u).replace(/punct/g,Fl).getRegex(),t1=Je(/\\(punct)/,"gu").replace(/punct/g,Fl).getRegex(),n1=Je(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),r1=Je(Cu).replace("(?:-->|$)","-->").getRegex(),s1=Je("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",r1).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),El=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,i1=Je(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",El).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),fm=Je(/^!?\[(label)\]\[(ref)\]/).replace("label",El).replace("ref",Nu).getRegex(),pm=Je(/^!?\[(ref)\](?:\[\])?/).replace("ref",Nu).getRegex(),o1=Je("reflink|nolink(?!\\()","g").replace("reflink",fm).replace("nolink",pm).getRegex(),bu={_backpedal:Wi,anyPunctuation:t1,autolink:n1,blockSkip:Yx,br:lm,code:Hx,del:Wi,emStrongLDelim:Qx,emStrongRDelimAst:Zx,emStrongRDelimUnd:e1,escape:Wx,link:i1,nolink:pm,punctuation:Gx,reflink:fm,reflinkSearch:o1,tag:s1,text:Vx,url:Wi},l1={...bu,link:Je(/^!?\[(label)\]\((.*?)\)/).replace("label",El).getRegex(),reflink:Je(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",El).getRegex()},Kc={...bu,emStrongRDelimAst:Jx,emStrongLDelim:Xx,url:Je(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},a1={...Kc,br:Je(lm).replace("{2,}","*").getRegex(),text:Je(Kc.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},fl={normal:Eu,gfm:Ux,pedantic:Bx},Ii={normal:bu,gfm:Kc,breaks:a1,pedantic:l1},c1={"&":"&","<":"<",">":">",'"':""","'":"'"},Ip=n=>c1[n];function Zn(n,r){if(r){if(on.escapeTest.test(n))return n.replace(on.escapeReplace,Ip)}else if(on.escapeTestNoEncode.test(n))return n.replace(on.escapeReplaceNoEncode,Ip);return n}function Ap(n){try{n=encodeURI(n).replace(on.percentDecode,"%")}catch{return null}return n}function Mp(n,r){var c;const i=n.replace(on.findPipe,(p,h,g)=>{let m=!1,y=h;for(;--y>=0&&g[y]==="\\";)m=!m;return m?"|":" |"}),l=i.split(on.splitPipe);let a=0;if(l[0].trim()||l.shift(),l.length>0&&!((c=l.at(-1))!=null&&c.trim())&&l.pop(),r)if(l.length>r)l.splice(r);else for(;l.length<r;)l.push("");for(;a<l.length;a++)l[a]=l[a].trim().replace(on.slashPipe,"|");return l}function Ai(n,r,i){const l=n.length;if(l===0)return"";let a=0;for(;a<l&&n.charAt(l-a-1)===r;)a++;return n.slice(0,l-a)}function u1(n,r){if(n.indexOf(r[1])===-1)return-1;let i=0;for(let l=0;l<n.length;l++)if(n[l]==="\\")l++;else if(n[l]===r[0])i++;else if(n[l]===r[1]&&(i--,i<0))return l;return i>0?-2:-1}function Lp(n,r,i,l,a){const c=r.href,p=r.title||null,h=n[1].replace(a.other.outputLinkReplace,"$1");l.state.inLink=!0;const g={type:n[0].charAt(0)==="!"?"image":"link",raw:i,href:c,title:p,text:h,tokens:l.inlineTokens(h)};return l.state.inLink=!1,g}function d1(n,r,i){const l=n.match(i.other.indentCodeCompensation);if(l===null)return r;const a=l[1];return r.split(`
|
|
339
|
+
`).map(c=>{const p=c.match(i.other.beginningSpace);if(p===null)return c;const[h]=p;return h.length>=a.length?c.slice(a.length):c}).join(`
|
|
340
|
+
`)}var _l=class{constructor(n){st(this,"options");st(this,"rules");st(this,"lexer");this.options=n||ms}space(n){const r=this.rules.block.newline.exec(n);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(n){const r=this.rules.block.code.exec(n);if(r){const i=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?i:Ai(i,`
|
|
341
|
+
`)}}}fences(n){const r=this.rules.block.fences.exec(n);if(r){const i=r[0],l=d1(i,r[3]||"",this.rules);return{type:"code",raw:i,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:l}}}heading(n){const r=this.rules.block.heading.exec(n);if(r){let i=r[2].trim();if(this.rules.other.endingHash.test(i)){const l=Ai(i,"#");(this.options.pedantic||!l||this.rules.other.endingSpaceChar.test(l))&&(i=l.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(n){const r=this.rules.block.hr.exec(n);if(r)return{type:"hr",raw:Ai(r[0],`
|
|
342
|
+
`)}}blockquote(n){const r=this.rules.block.blockquote.exec(n);if(r){let i=Ai(r[0],`
|
|
343
|
+
`).split(`
|
|
344
|
+
`),l="",a="";const c=[];for(;i.length>0;){let p=!1;const h=[];let g;for(g=0;g<i.length;g++)if(this.rules.other.blockquoteStart.test(i[g]))h.push(i[g]),p=!0;else if(!p)h.push(i[g]);else break;i=i.slice(g);const m=h.join(`
|
|
345
|
+
`),y=m.replace(this.rules.other.blockquoteSetextReplace,`
|
|
346
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");l=l?`${l}
|
|
347
|
+
${m}`:m,a=a?`${a}
|
|
348
|
+
${y}`:y;const x=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(y,c,!0),this.lexer.state.top=x,i.length===0)break;const w=c.at(-1);if((w==null?void 0:w.type)==="code")break;if((w==null?void 0:w.type)==="blockquote"){const N=w,R=N.raw+`
|
|
349
|
+
`+i.join(`
|
|
350
|
+
`),b=this.blockquote(R);c[c.length-1]=b,l=l.substring(0,l.length-N.raw.length)+b.raw,a=a.substring(0,a.length-N.text.length)+b.text;break}else if((w==null?void 0:w.type)==="list"){const N=w,R=N.raw+`
|
|
351
|
+
`+i.join(`
|
|
352
|
+
`),b=this.list(R);c[c.length-1]=b,l=l.substring(0,l.length-w.raw.length)+b.raw,a=a.substring(0,a.length-N.raw.length)+b.raw,i=R.substring(c.at(-1).raw.length).split(`
|
|
353
|
+
`);continue}}return{type:"blockquote",raw:l,tokens:c,text:a}}}list(n){let r=this.rules.block.list.exec(n);if(r){let i=r[1].trim();const l=i.length>1,a={type:"list",raw:"",ordered:l,start:l?+i.slice(0,-1):"",loose:!1,items:[]};i=l?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=l?i:"[*+-]");const c=this.rules.other.listItemRegex(i);let p=!1;for(;n;){let g=!1,m="",y="";if(!(r=c.exec(n))||this.rules.block.hr.test(n))break;m=r[0],n=n.substring(m.length);let x=r[2].split(`
|
|
354
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,L=>" ".repeat(3*L.length)),w=n.split(`
|
|
355
|
+
`,1)[0],N=!x.trim(),R=0;if(this.options.pedantic?(R=2,y=x.trimStart()):N?R=r[1].length+1:(R=r[2].search(this.rules.other.nonSpaceChar),R=R>4?1:R,y=x.slice(R),R+=r[1].length),N&&this.rules.other.blankLine.test(w)&&(m+=w+`
|
|
356
|
+
`,n=n.substring(w.length+1),g=!0),!g){const L=this.rules.other.nextBulletRegex(R),P=this.rules.other.hrRegex(R),H=this.rules.other.fencesBeginRegex(R),O=this.rules.other.headingBeginRegex(R),B=this.rules.other.htmlBeginRegex(R);for(;n;){const ee=n.split(`
|
|
357
|
+
`,1)[0];let Z;if(w=ee,this.options.pedantic?(w=w.replace(this.rules.other.listReplaceNesting," "),Z=w):Z=w.replace(this.rules.other.tabCharGlobal," "),H.test(w)||O.test(w)||B.test(w)||L.test(w)||P.test(w))break;if(Z.search(this.rules.other.nonSpaceChar)>=R||!w.trim())y+=`
|
|
358
|
+
`+Z.slice(R);else{if(N||x.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||H.test(x)||O.test(x)||P.test(x))break;y+=`
|
|
359
|
+
`+w}!N&&!w.trim()&&(N=!0),m+=ee+`
|
|
360
|
+
`,n=n.substring(ee.length+1),x=Z.slice(R)}}a.loose||(p?a.loose=!0:this.rules.other.doubleBlankLine.test(m)&&(p=!0));let b=null,C;this.options.gfm&&(b=this.rules.other.listIsTask.exec(y),b&&(C=b[0]!=="[ ] ",y=y.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:m,task:!!b,checked:C,loose:!1,text:y,tokens:[]}),a.raw+=m}const h=a.items.at(-1);if(h)h.raw=h.raw.trimEnd(),h.text=h.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let g=0;g<a.items.length;g++)if(this.lexer.state.top=!1,a.items[g].tokens=this.lexer.blockTokens(a.items[g].text,[]),!a.loose){const m=a.items[g].tokens.filter(x=>x.type==="space"),y=m.length>0&&m.some(x=>this.rules.other.anyLine.test(x.raw));a.loose=y}if(a.loose)for(let g=0;g<a.items.length;g++)a.items[g].loose=!0;return a}}html(n){const r=this.rules.block.html.exec(n);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(n){const r=this.rules.block.def.exec(n);if(r){const i=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),l=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:r[0],href:l,title:a}}}table(n){var p;const r=this.rules.block.table.exec(n);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;const i=Mp(r[1]),l=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=(p=r[3])!=null&&p.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
361
|
+
`):[],c={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===l.length){for(const h of l)this.rules.other.tableAlignRight.test(h)?c.align.push("right"):this.rules.other.tableAlignCenter.test(h)?c.align.push("center"):this.rules.other.tableAlignLeft.test(h)?c.align.push("left"):c.align.push(null);for(let h=0;h<i.length;h++)c.header.push({text:i[h],tokens:this.lexer.inline(i[h]),header:!0,align:c.align[h]});for(const h of a)c.rows.push(Mp(h,c.header.length).map((g,m)=>({text:g,tokens:this.lexer.inline(g),header:!1,align:c.align[m]})));return c}}lheading(n){const r=this.rules.block.lheading.exec(n);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(n){const r=this.rules.block.paragraph.exec(n);if(r){const i=r[1].charAt(r[1].length-1)===`
|
|
362
|
+
`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(n){const r=this.rules.block.text.exec(n);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(n){const r=this.rules.inline.escape.exec(n);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(n){const r=this.rules.inline.tag.exec(n);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(n){const r=this.rules.inline.link.exec(n);if(r){const i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;const c=Ai(i.slice(0,-1),"\\");if((i.length-c.length)%2===0)return}else{const c=u1(r[2],"()");if(c===-2)return;if(c>-1){const h=(r[0].indexOf("!")===0?5:4)+r[1].length+c;r[2]=r[2].substring(0,c),r[0]=r[0].substring(0,h).trim(),r[3]=""}}let l=r[2],a="";if(this.options.pedantic){const c=this.rules.other.pedanticHrefTitle.exec(l);c&&(l=c[1],a=c[3])}else a=r[3]?r[3].slice(1,-1):"";return l=l.trim(),this.rules.other.startAngleBracket.test(l)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?l=l.slice(1):l=l.slice(1,-1)),Lp(r,{href:l&&l.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(n,r){let i;if((i=this.rules.inline.reflink.exec(n))||(i=this.rules.inline.nolink.exec(n))){const l=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=r[l.toLowerCase()];if(!a){const c=i[0].charAt(0);return{type:"text",raw:c,text:c}}return Lp(i,a,i[0],this.lexer,this.rules)}}emStrong(n,r,i=""){let l=this.rules.inline.emStrongLDelim.exec(n);if(!l||l[3]&&i.match(this.rules.other.unicodeAlphaNumeric))return;if(!(l[1]||l[2]||"")||!i||this.rules.inline.punctuation.exec(i)){const c=[...l[0]].length-1;let p,h,g=c,m=0;const y=l[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(y.lastIndex=0,r=r.slice(-1*n.length+c);(l=y.exec(r))!=null;){if(p=l[1]||l[2]||l[3]||l[4]||l[5]||l[6],!p)continue;if(h=[...p].length,l[3]||l[4]){g+=h;continue}else if((l[5]||l[6])&&c%3&&!((c+h)%3)){m+=h;continue}if(g-=h,g>0)continue;h=Math.min(h,h+g+m);const x=[...l[0]][0].length,w=n.slice(0,c+l.index+x+h);if(Math.min(c,h)%2){const R=w.slice(1,-1);return{type:"em",raw:w,text:R,tokens:this.lexer.inlineTokens(R)}}const N=w.slice(2,-2);return{type:"strong",raw:w,text:N,tokens:this.lexer.inlineTokens(N)}}}}codespan(n){const r=this.rules.inline.code.exec(n);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," ");const l=this.rules.other.nonSpaceChar.test(i),a=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return l&&a&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(n){const r=this.rules.inline.br.exec(n);if(r)return{type:"br",raw:r[0]}}del(n){const r=this.rules.inline.del.exec(n);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(n){const r=this.rules.inline.autolink.exec(n);if(r){let i,l;return r[2]==="@"?(i=r[1],l="mailto:"+i):(i=r[1],l=i),{type:"link",raw:r[0],text:i,href:l,tokens:[{type:"text",raw:i,text:i}]}}}url(n){var i;let r;if(r=this.rules.inline.url.exec(n)){let l,a;if(r[2]==="@")l=r[0],a="mailto:"+l;else{let c;do c=r[0],r[0]=((i=this.rules.inline._backpedal.exec(r[0]))==null?void 0:i[0])??"";while(c!==r[0]);l=r[0],r[1]==="www."?a="http://"+r[0]:a=r[0]}return{type:"link",raw:r[0],text:l,href:a,tokens:[{type:"text",raw:l,text:l}]}}}inlineText(n){const r=this.rules.inline.text.exec(n);if(r){const i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}},vr=class Yc{constructor(r){st(this,"tokens");st(this,"options");st(this,"state");st(this,"tokenizer");st(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=r||ms,this.options.tokenizer=this.options.tokenizer||new _l,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const i={other:on,block:fl.normal,inline:Ii.normal};this.options.pedantic?(i.block=fl.pedantic,i.inline=Ii.pedantic):this.options.gfm&&(i.block=fl.gfm,this.options.breaks?i.inline=Ii.breaks:i.inline=Ii.gfm),this.tokenizer.rules=i}static get rules(){return{block:fl,inline:Ii}}static lex(r,i){return new Yc(i).lex(r)}static lexInline(r,i){return new Yc(i).inlineTokens(r)}lex(r){r=r.replace(on.carriageReturn,`
|
|
363
|
+
`),this.blockTokens(r,this.tokens);for(let i=0;i<this.inlineQueue.length;i++){const l=this.inlineQueue[i];this.inlineTokens(l.src,l.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(r,i=[],l=!1){var a,c,p;for(this.options.pedantic&&(r=r.replace(on.tabCharGlobal," ").replace(on.spaceLine,""));r;){let h;if((c=(a=this.options.extensions)==null?void 0:a.block)!=null&&c.some(m=>(h=m.call({lexer:this},r,i))?(r=r.substring(h.raw.length),i.push(h),!0):!1))continue;if(h=this.tokenizer.space(r)){r=r.substring(h.raw.length);const m=i.at(-1);h.raw.length===1&&m!==void 0?m.raw+=`
|
|
364
|
+
`:i.push(h);continue}if(h=this.tokenizer.code(r)){r=r.substring(h.raw.length);const m=i.at(-1);(m==null?void 0:m.type)==="paragraph"||(m==null?void 0:m.type)==="text"?(m.raw+=`
|
|
365
|
+
`+h.raw,m.text+=`
|
|
366
|
+
`+h.text,this.inlineQueue.at(-1).src=m.text):i.push(h);continue}if(h=this.tokenizer.fences(r)){r=r.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.heading(r)){r=r.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.hr(r)){r=r.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.blockquote(r)){r=r.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.list(r)){r=r.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.html(r)){r=r.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.def(r)){r=r.substring(h.raw.length);const m=i.at(-1);(m==null?void 0:m.type)==="paragraph"||(m==null?void 0:m.type)==="text"?(m.raw+=`
|
|
367
|
+
`+h.raw,m.text+=`
|
|
368
|
+
`+h.raw,this.inlineQueue.at(-1).src=m.text):this.tokens.links[h.tag]||(this.tokens.links[h.tag]={href:h.href,title:h.title});continue}if(h=this.tokenizer.table(r)){r=r.substring(h.raw.length),i.push(h);continue}if(h=this.tokenizer.lheading(r)){r=r.substring(h.raw.length),i.push(h);continue}let g=r;if((p=this.options.extensions)!=null&&p.startBlock){let m=1/0;const y=r.slice(1);let x;this.options.extensions.startBlock.forEach(w=>{x=w.call({lexer:this},y),typeof x=="number"&&x>=0&&(m=Math.min(m,x))}),m<1/0&&m>=0&&(g=r.substring(0,m+1))}if(this.state.top&&(h=this.tokenizer.paragraph(g))){const m=i.at(-1);l&&(m==null?void 0:m.type)==="paragraph"?(m.raw+=`
|
|
369
|
+
`+h.raw,m.text+=`
|
|
370
|
+
`+h.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=m.text):i.push(h),l=g.length!==r.length,r=r.substring(h.raw.length);continue}if(h=this.tokenizer.text(r)){r=r.substring(h.raw.length);const m=i.at(-1);(m==null?void 0:m.type)==="text"?(m.raw+=`
|
|
371
|
+
`+h.raw,m.text+=`
|
|
372
|
+
`+h.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=m.text):i.push(h);continue}if(r){const m="Infinite loop on byte: "+r.charCodeAt(0);if(this.options.silent){console.error(m);break}else throw new Error(m)}}return this.state.top=!0,i}inline(r,i=[]){return this.inlineQueue.push({src:r,tokens:i}),i}inlineTokens(r,i=[]){var h,g,m;let l=r,a=null;if(this.tokens.links){const y=Object.keys(this.tokens.links);if(y.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(l))!=null;)y.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(l))!=null;)l=l.slice(0,a.index)+"++"+l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(a=this.tokenizer.rules.inline.blockSkip.exec(l))!=null;)l=l.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let c=!1,p="";for(;r;){c||(p=""),c=!1;let y;if((g=(h=this.options.extensions)==null?void 0:h.inline)!=null&&g.some(w=>(y=w.call({lexer:this},r,i))?(r=r.substring(y.raw.length),i.push(y),!0):!1))continue;if(y=this.tokenizer.escape(r)){r=r.substring(y.raw.length),i.push(y);continue}if(y=this.tokenizer.tag(r)){r=r.substring(y.raw.length),i.push(y);continue}if(y=this.tokenizer.link(r)){r=r.substring(y.raw.length),i.push(y);continue}if(y=this.tokenizer.reflink(r,this.tokens.links)){r=r.substring(y.raw.length);const w=i.at(-1);y.type==="text"&&(w==null?void 0:w.type)==="text"?(w.raw+=y.raw,w.text+=y.text):i.push(y);continue}if(y=this.tokenizer.emStrong(r,l,p)){r=r.substring(y.raw.length),i.push(y);continue}if(y=this.tokenizer.codespan(r)){r=r.substring(y.raw.length),i.push(y);continue}if(y=this.tokenizer.br(r)){r=r.substring(y.raw.length),i.push(y);continue}if(y=this.tokenizer.del(r)){r=r.substring(y.raw.length),i.push(y);continue}if(y=this.tokenizer.autolink(r)){r=r.substring(y.raw.length),i.push(y);continue}if(!this.state.inLink&&(y=this.tokenizer.url(r))){r=r.substring(y.raw.length),i.push(y);continue}let x=r;if((m=this.options.extensions)!=null&&m.startInline){let w=1/0;const N=r.slice(1);let R;this.options.extensions.startInline.forEach(b=>{R=b.call({lexer:this},N),typeof R=="number"&&R>=0&&(w=Math.min(w,R))}),w<1/0&&w>=0&&(x=r.substring(0,w+1))}if(y=this.tokenizer.inlineText(x)){r=r.substring(y.raw.length),y.raw.slice(-1)!=="_"&&(p=y.raw.slice(-1)),c=!0;const w=i.at(-1);(w==null?void 0:w.type)==="text"?(w.raw+=y.raw,w.text+=y.text):i.push(y);continue}if(r){const w="Infinite loop on byte: "+r.charCodeAt(0);if(this.options.silent){console.error(w);break}else throw new Error(w)}}return i}},bl=class{constructor(n){st(this,"options");st(this,"parser");this.options=n||ms}space(n){return""}code({text:n,lang:r,escaped:i}){var c;const l=(c=(r||"").match(on.notSpaceStart))==null?void 0:c[0],a=n.replace(on.endingNewline,"")+`
|
|
373
|
+
`;return l?'<pre><code class="language-'+Zn(l)+'">'+(i?a:Zn(a,!0))+`</code></pre>
|
|
374
|
+
`:"<pre><code>"+(i?a:Zn(a,!0))+`</code></pre>
|
|
375
|
+
`}blockquote({tokens:n}){return`<blockquote>
|
|
376
|
+
${this.parser.parse(n)}</blockquote>
|
|
377
|
+
`}html({text:n}){return n}heading({tokens:n,depth:r}){return`<h${r}>${this.parser.parseInline(n)}</h${r}>
|
|
378
|
+
`}hr(n){return`<hr>
|
|
379
|
+
`}list(n){const r=n.ordered,i=n.start;let l="";for(let p=0;p<n.items.length;p++){const h=n.items[p];l+=this.listitem(h)}const a=r?"ol":"ul",c=r&&i!==1?' start="'+i+'"':"";return"<"+a+c+`>
|
|
380
|
+
`+l+"</"+a+`>
|
|
381
|
+
`}listitem(n){var i;let r="";if(n.task){const l=this.checkbox({checked:!!n.checked});n.loose?((i=n.tokens[0])==null?void 0:i.type)==="paragraph"?(n.tokens[0].text=l+" "+n.tokens[0].text,n.tokens[0].tokens&&n.tokens[0].tokens.length>0&&n.tokens[0].tokens[0].type==="text"&&(n.tokens[0].tokens[0].text=l+" "+Zn(n.tokens[0].tokens[0].text),n.tokens[0].tokens[0].escaped=!0)):n.tokens.unshift({type:"text",raw:l+" ",text:l+" ",escaped:!0}):r+=l+" "}return r+=this.parser.parse(n.tokens,!!n.loose),`<li>${r}</li>
|
|
382
|
+
`}checkbox({checked:n}){return"<input "+(n?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:n}){return`<p>${this.parser.parseInline(n)}</p>
|
|
383
|
+
`}table(n){let r="",i="";for(let a=0;a<n.header.length;a++)i+=this.tablecell(n.header[a]);r+=this.tablerow({text:i});let l="";for(let a=0;a<n.rows.length;a++){const c=n.rows[a];i="";for(let p=0;p<c.length;p++)i+=this.tablecell(c[p]);l+=this.tablerow({text:i})}return l&&(l=`<tbody>${l}</tbody>`),`<table>
|
|
384
|
+
<thead>
|
|
385
|
+
`+r+`</thead>
|
|
386
|
+
`+l+`</table>
|
|
387
|
+
`}tablerow({text:n}){return`<tr>
|
|
388
|
+
${n}</tr>
|
|
389
|
+
`}tablecell(n){const r=this.parser.parseInline(n.tokens),i=n.header?"th":"td";return(n.align?`<${i} align="${n.align}">`:`<${i}>`)+r+`</${i}>
|
|
390
|
+
`}strong({tokens:n}){return`<strong>${this.parser.parseInline(n)}</strong>`}em({tokens:n}){return`<em>${this.parser.parseInline(n)}</em>`}codespan({text:n}){return`<code>${Zn(n,!0)}</code>`}br(n){return"<br>"}del({tokens:n}){return`<del>${this.parser.parseInline(n)}</del>`}link({href:n,title:r,tokens:i}){const l=this.parser.parseInline(i),a=Ap(n);if(a===null)return l;n=a;let c='<a href="'+n+'"';return r&&(c+=' title="'+Zn(r)+'"'),c+=">"+l+"</a>",c}image({href:n,title:r,text:i,tokens:l}){l&&(i=this.parser.parseInline(l,this.parser.textRenderer));const a=Ap(n);if(a===null)return Zn(i);n=a;let c=`<img src="${n}" alt="${i}"`;return r&&(c+=` title="${Zn(r)}"`),c+=">",c}text(n){return"tokens"in n&&n.tokens?this.parser.parseInline(n.tokens):"escaped"in n&&n.escaped?n.text:Zn(n.text)}},ju=class{strong({text:n}){return n}em({text:n}){return n}codespan({text:n}){return n}del({text:n}){return n}html({text:n}){return n}text({text:n}){return n}link({text:n}){return""+n}image({text:n}){return""+n}br(){return""}},yr=class Qc{constructor(r){st(this,"options");st(this,"renderer");st(this,"textRenderer");this.options=r||ms,this.options.renderer=this.options.renderer||new bl,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ju}static parse(r,i){return new Qc(i).parse(r)}static parseInline(r,i){return new Qc(i).parseInline(r)}parse(r,i=!0){var a,c;let l="";for(let p=0;p<r.length;p++){const h=r[p];if((c=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&c[h.type]){const m=h,y=this.options.extensions.renderers[m.type].call({parser:this},m);if(y!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(m.type)){l+=y||"";continue}}const g=h;switch(g.type){case"space":{l+=this.renderer.space(g);continue}case"hr":{l+=this.renderer.hr(g);continue}case"heading":{l+=this.renderer.heading(g);continue}case"code":{l+=this.renderer.code(g);continue}case"table":{l+=this.renderer.table(g);continue}case"blockquote":{l+=this.renderer.blockquote(g);continue}case"list":{l+=this.renderer.list(g);continue}case"html":{l+=this.renderer.html(g);continue}case"paragraph":{l+=this.renderer.paragraph(g);continue}case"text":{let m=g,y=this.renderer.text(m);for(;p+1<r.length&&r[p+1].type==="text";)m=r[++p],y+=`
|
|
391
|
+
`+this.renderer.text(m);i?l+=this.renderer.paragraph({type:"paragraph",raw:y,text:y,tokens:[{type:"text",raw:y,text:y,escaped:!0}]}):l+=y;continue}default:{const m='Token with "'+g.type+'" type was not found.';if(this.options.silent)return console.error(m),"";throw new Error(m)}}}return l}parseInline(r,i=this.renderer){var a,c;let l="";for(let p=0;p<r.length;p++){const h=r[p];if((c=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&c[h.type]){const m=this.options.extensions.renderers[h.type].call({parser:this},h);if(m!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(h.type)){l+=m||"";continue}}const g=h;switch(g.type){case"escape":{l+=i.text(g);break}case"html":{l+=i.html(g);break}case"link":{l+=i.link(g);break}case"image":{l+=i.image(g);break}case"strong":{l+=i.strong(g);break}case"em":{l+=i.em(g);break}case"codespan":{l+=i.codespan(g);break}case"br":{l+=i.br(g);break}case"del":{l+=i.del(g);break}case"text":{l+=i.text(g);break}default:{const m='Token with "'+g.type+'" type was not found.';if(this.options.silent)return console.error(m),"";throw new Error(m)}}}return l}},Oc,vl=(Oc=class{constructor(n){st(this,"options");st(this,"block");this.options=n||ms}preprocess(n){return n}postprocess(n){return n}processAllTokens(n){return n}provideLexer(){return this.block?vr.lex:vr.lexInline}provideParser(){return this.block?yr.parse:yr.parseInline}},st(Oc,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),Oc),f1=class{constructor(...n){st(this,"defaults",ku());st(this,"options",this.setOptions);st(this,"parse",this.parseMarkdown(!0));st(this,"parseInline",this.parseMarkdown(!1));st(this,"Parser",yr);st(this,"Renderer",bl);st(this,"TextRenderer",ju);st(this,"Lexer",vr);st(this,"Tokenizer",_l);st(this,"Hooks",vl);this.use(...n)}walkTokens(n,r){var l,a;let i=[];for(const c of n)switch(i=i.concat(r.call(this,c)),c.type){case"table":{const p=c;for(const h of p.header)i=i.concat(this.walkTokens(h.tokens,r));for(const h of p.rows)for(const g of h)i=i.concat(this.walkTokens(g.tokens,r));break}case"list":{const p=c;i=i.concat(this.walkTokens(p.items,r));break}default:{const p=c;(a=(l=this.defaults.extensions)==null?void 0:l.childTokens)!=null&&a[p.type]?this.defaults.extensions.childTokens[p.type].forEach(h=>{const g=p[h].flat(1/0);i=i.concat(this.walkTokens(g,r))}):p.tokens&&(i=i.concat(this.walkTokens(p.tokens,r)))}}return i}use(...n){const r=this.defaults.extensions||{renderers:{},childTokens:{}};return n.forEach(i=>{const l={...i};if(l.async=this.defaults.async||l.async||!1,i.extensions&&(i.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){const c=r.renderers[a.name];c?r.renderers[a.name]=function(...p){let h=a.renderer.apply(this,p);return h===!1&&(h=c.apply(this,p)),h}:r.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const c=r[a.level];c?c.unshift(a.tokenizer):r[a.level]=[a.tokenizer],a.start&&(a.level==="block"?r.startBlock?r.startBlock.push(a.start):r.startBlock=[a.start]:a.level==="inline"&&(r.startInline?r.startInline.push(a.start):r.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(r.childTokens[a.name]=a.childTokens)}),l.extensions=r),i.renderer){const a=this.defaults.renderer||new bl(this.defaults);for(const c in i.renderer){if(!(c in a))throw new Error(`renderer '${c}' does not exist`);if(["options","parser"].includes(c))continue;const p=c,h=i.renderer[p],g=a[p];a[p]=(...m)=>{let y=h.apply(a,m);return y===!1&&(y=g.apply(a,m)),y||""}}l.renderer=a}if(i.tokenizer){const a=this.defaults.tokenizer||new _l(this.defaults);for(const c in i.tokenizer){if(!(c in a))throw new Error(`tokenizer '${c}' does not exist`);if(["options","rules","lexer"].includes(c))continue;const p=c,h=i.tokenizer[p],g=a[p];a[p]=(...m)=>{let y=h.apply(a,m);return y===!1&&(y=g.apply(a,m)),y}}l.tokenizer=a}if(i.hooks){const a=this.defaults.hooks||new vl;for(const c in i.hooks){if(!(c in a))throw new Error(`hook '${c}' does not exist`);if(["options","block"].includes(c))continue;const p=c,h=i.hooks[p],g=a[p];vl.passThroughHooks.has(c)?a[p]=m=>{if(this.defaults.async)return Promise.resolve(h.call(a,m)).then(x=>g.call(a,x));const y=h.call(a,m);return g.call(a,y)}:a[p]=(...m)=>{let y=h.apply(a,m);return y===!1&&(y=g.apply(a,m)),y}}l.hooks=a}if(i.walkTokens){const a=this.defaults.walkTokens,c=i.walkTokens;l.walkTokens=function(p){let h=[];return h.push(c.call(this,p)),a&&(h=h.concat(a.call(this,p))),h}}this.defaults={...this.defaults,...l}}),this}setOptions(n){return this.defaults={...this.defaults,...n},this}lexer(n,r){return vr.lex(n,r??this.defaults)}parser(n,r){return yr.parse(n,r??this.defaults)}parseMarkdown(n){return(i,l)=>{const a={...l},c={...this.defaults,...a},p=this.onError(!!c.silent,!!c.async);if(this.defaults.async===!0&&a.async===!1)return p(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof i>"u"||i===null)return p(new Error("marked(): input parameter is undefined or null"));if(typeof i!="string")return p(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(i)+", string expected"));c.hooks&&(c.hooks.options=c,c.hooks.block=n);const h=c.hooks?c.hooks.provideLexer():n?vr.lex:vr.lexInline,g=c.hooks?c.hooks.provideParser():n?yr.parse:yr.parseInline;if(c.async)return Promise.resolve(c.hooks?c.hooks.preprocess(i):i).then(m=>h(m,c)).then(m=>c.hooks?c.hooks.processAllTokens(m):m).then(m=>c.walkTokens?Promise.all(this.walkTokens(m,c.walkTokens)).then(()=>m):m).then(m=>g(m,c)).then(m=>c.hooks?c.hooks.postprocess(m):m).catch(p);try{c.hooks&&(i=c.hooks.preprocess(i));let m=h(i,c);c.hooks&&(m=c.hooks.processAllTokens(m)),c.walkTokens&&this.walkTokens(m,c.walkTokens);let y=g(m,c);return c.hooks&&(y=c.hooks.postprocess(y)),y}catch(m){return p(m)}}}onError(n,r){return i=>{if(i.message+=`
|
|
392
|
+
Please report this to https://github.com/markedjs/marked.`,n){const l="<p>An error occurred:</p><pre>"+Zn(i.message+"",!0)+"</pre>";return r?Promise.resolve(l):l}if(r)return Promise.reject(i);throw i}}},hs=new f1;function We(n,r){return hs.parse(n,r)}We.options=We.setOptions=function(n){return hs.setOptions(n),We.defaults=hs.defaults,rm(We.defaults),We};We.getDefaults=ku;We.defaults=ms;We.use=function(...n){return hs.use(...n),We.defaults=hs.defaults,rm(We.defaults),We};We.walkTokens=function(n,r){return hs.walkTokens(n,r)};We.parseInline=hs.parseInline;We.Parser=yr;We.parser=yr.parse;We.Renderer=bl;We.TextRenderer=ju;We.Lexer=vr;We.lexer=vr.lex;We.Tokenizer=_l;We.Hooks=vl;We.parse=We;We.options;We.setOptions;We.use;We.walkTokens;We.parseInline;yr.parse;vr.lex;/*! @license DOMPurify 3.4.13 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.13/LICENSE */function Pp(n,r){(r==null||r>n.length)&&(r=n.length);for(var i=0,l=Array(r);i<r;i++)l[i]=n[i];return l}function p1(n){if(Array.isArray(n))return n}function h1(n,r){var i=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(i!=null){var l,a,c,p,h=[],g=!0,m=!1;try{if(c=(i=i.call(n)).next,r!==0)for(;!(g=(l=c.call(i)).done)&&(h.push(l.value),h.length!==r);g=!0);}catch(y){m=!0,a=y}finally{try{if(!g&&i.return!=null&&(p=i.return(),Object(p)!==p))return}finally{if(m)throw a}}return h}}function m1(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
393
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function g1(n,r){return p1(n)||h1(n,r)||v1(n,r)||m1()}function v1(n,r){if(n){if(typeof n=="string")return Pp(n,r);var i={}.toString.call(n).slice(8,-1);return i==="Object"&&n.constructor&&(i=n.constructor.name),i==="Map"||i==="Set"?Array.from(n):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Pp(n,r):void 0}}const hm=Object.entries,Op=Object.setPrototypeOf,y1=Object.isFrozen,x1=Object.getPrototypeOf,w1=Object.getOwnPropertyDescriptor;let Ht=Object.freeze,Vt=Object.seal,Vs=Object.create,mm=typeof Reflect<"u"&&Reflect,Xc=mm.apply,Zc=mm.construct;Ht||(Ht=function(r){return r});Vt||(Vt=function(r){return r});Xc||(Xc=function(r,i){for(var l=arguments.length,a=new Array(l>2?l-2:0),c=2;c<l;c++)a[c-2]=arguments[c];return r.apply(i,a)});Zc||(Zc=function(r){for(var i=arguments.length,l=new Array(i>1?i-1:0),a=1;a<i;a++)l[a-1]=arguments[a];return new r(...l)});const Ws=bt(Array.prototype.forEach),k1=bt(Array.prototype.lastIndexOf),zp=bt(Array.prototype.pop),Hs=bt(Array.prototype.push),S1=bt(Array.prototype.splice),Hr=Array.isArray,zi=bt(String.prototype.toLowerCase),Dc=bt(String.prototype.toString),$p=bt(String.prototype.match),Mi=bt(String.prototype.replace),Fp=bt(String.prototype.indexOf),T1=bt(String.prototype.trim),N1=bt(Number.prototype.toString),C1=bt(Boolean.prototype.toString),Up=typeof BigInt>"u"?null:bt(BigInt.prototype.toString),Bp=typeof Symbol>"u"?null:bt(Symbol.prototype.toString),$t=bt(Object.prototype.hasOwnProperty),Li=bt(Object.prototype.toString),zt=bt(RegExp.prototype.test),fs=E1(TypeError);function bt(n){return function(r){r instanceof RegExp&&(r.lastIndex=0);for(var i=arguments.length,l=new Array(i>1?i-1:0),a=1;a<i;a++)l[a-1]=arguments[a];return Xc(n,r,l)}}function E1(n){return function(){for(var r=arguments.length,i=new Array(r),l=0;l<r;l++)i[l]=arguments[l];return Zc(n,i)}}function Be(n,r){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:zi;if(Op&&Op(n,null),!Hr(r))return n;let l=r.length;for(;l--;){let a=r[l];if(typeof a=="string"){const c=i(a);c!==a&&(y1(r)||(r[l]=c),a=c)}n[a]=!0}return n}function _1(n){for(let r=0;r<n.length;r++)$t(n,r)||(n[r]=null);return n}function Jt(n){const r=Vs(null);for(const l of hm(n)){var i=g1(l,2);const a=i[0],c=i[1];$t(n,a)&&(Hr(c)?r[a]=_1(c):c&&typeof c=="object"&&c.constructor===Object?r[a]=Jt(c):r[a]=c)}return r}function b1(n){switch(typeof n){case"string":return n;case"number":return N1(n);case"boolean":return C1(n);case"bigint":return Up?Up(n):"0";case"symbol":return Bp?Bp(n):"Symbol()";case"undefined":return Li(n);case"function":case"object":{if(n===null)return Li(n);const r=n,i=Wn(r,"toString");if(typeof i=="function"){const l=i(r);return typeof l=="string"?l:Li(l)}return Li(n)}default:return Li(n)}}function Wn(n,r){for(;n!==null;){const l=w1(n,r);if(l){if(l.get)return bt(l.get);if(typeof l.value=="function")return bt(l.value)}n=x1(n)}function i(){return null}return i}function j1(n){try{return zt(n,""),!0}catch{return!1}}const Wp=Ht(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Ic=Ht(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ac=Ht(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),R1=Ht(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Mc=Ht(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),D1=Ht(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Hp=Ht(["#text"]),Vp=Ht(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Lc=Ht(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Gp=Ht(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),pl=Ht(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),I1=Vt(/{{[\w\W]*|^[\w\W]*}}/g),A1=Vt(/<%[\w\W]*|^[\w\W]*%>/g),M1=Vt(/\${[\w\W]*/g),L1=Vt(/^data-[\-\w.\u00B7-\uFFFF]+$/),P1=Vt(/^aria-[\-\w]+$/),qp=Vt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),O1=Vt(/^(?:\w+script|data):/i),z1=Vt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),$1=Vt(/^html$/i),F1=Vt(/^[a-z][.\w]*(-[.\w]+)+$/i),Kp=Vt(/<[/\w!]/g),Yp=Vt(/<[/\w]/g),U1=Vt(/<\/no(script|embed|frames)/i),B1=Vt(/\/>/i),Sn={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},W1=function(){return typeof window>"u"?null:window},H1=function(r,i){if(typeof r!="object"||typeof r.createPolicy!="function")return null;let l=null;const a="data-tt-policy-suffix";i&&i.hasAttribute(a)&&(l=i.getAttribute(a));const c="dompurify"+(l?"#"+l:"");try{return r.createPolicy(c,{createHTML(p){return p},createScriptURL(p){return p}})}catch{return console.warn("TrustedTypes policy "+c+" could not be created."),null}},Qp=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Ur=function(r,i,l,a){return $t(r,i)&&Hr(r[i])?Be(a.base?Jt(a.base):{},r[i],a.transform):l};function gm(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:W1();const r=ne=>gm(ne);if(r.version="3.4.13",r.removed=[],!n||!n.document||n.document.nodeType!==Sn.document||!n.Element)return r.isSupported=!1,r;let i=n.document;const l=i,a=l.currentScript;n.DocumentFragment;const c=n.HTMLTemplateElement,p=n.Node,h=n.Element,g=n.NodeFilter,m=n.NamedNodeMap;m===void 0&&(n.NamedNodeMap||n.MozNamedAttrMap),n.HTMLFormElement;const y=n.DOMParser,x=n.trustedTypes,w=h.prototype,N=Wn(w,"cloneNode"),R=Wn(w,"remove"),b=Wn(w,"nextSibling"),C=Wn(w,"childNodes"),L=Wn(w,"parentNode"),P=Wn(w,"shadowRoot"),H=Wn(w,"attributes"),O=p&&p.prototype?Wn(p.prototype,"nodeType"):null,B=p&&p.prototype?Wn(p.prototype,"nodeName"):null,ee=p&&p.prototype?Wn(p.prototype,"ownerDocument"):null;if(typeof c=="function"){const ne=i.createElement("template");ne.content&&ne.content.ownerDocument&&(i=ne.content.ownerDocument)}let Z,U="",te,q=!1,ie=0;const ye=function(){if(ie>0)throw fs('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},Te=function(S){ye(),ie++;try{return Z.createHTML(S)}finally{ie--}},Le=function(S){ye(),ie++;try{return Z.createScriptURL(S)}finally{ie--}},K=function(){return q||(te=H1(x,a),q=!0),te},xe=i,we=xe.implementation,$=xe.createNodeIterator,V=xe.createDocumentFragment,W=xe.getElementsByTagName,E=l.importNode;let D=Qp();r.isSupported=typeof hm=="function"&&typeof L=="function"&&we&&we.createHTMLDocument!==void 0;const le=I1,he=A1,_e=M1,ke=L1,Pe=P1,be=O1,Ae=z1,Ne=F1;let jt=qp,Me=null;const Nt=Be({},[...Wp,...Ic,...Ac,...Mc,...Hp]);let G=null;const De=Be({},[...Vp,...Lc,...Gp,...pl]);let oe=Object.seal(Vs(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),He=null,at=null;const me=Object.seal(Vs(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Fe=!0,F=!0,ce=!1,Oe=!0,Ue=!1,it=!0,xt=!1,et=!1,pt=null,ze=null,Ze=!1,tt=!1,tr=!1,nr=!1,qr=!0,wr=!1;const rr="user-content-";let sr=!0,Mn=!1,Nn={},Gt=null;const Cn=Be({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let ot=null;const Rt=Be({},["audio","video","img","source","image","track"]);let Ct=null;const an=Be({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Et="http://www.w3.org/1998/Math/MathML",kt="http://www.w3.org/2000/svg",ct="http://www.w3.org/1999/xhtml";let qt=ct,rt=!1,Kt=null;const Mt=Be({},[Et,kt,ct],Dc),cn=Ht(["mi","mo","mn","ms","mtext"]);let en=Be({},cn);const gn=Ht(["annotation-xml"]);let Ut=Be({},gn);const Ln=Be({},["title","style","font","a","script"]);let Pn=null;const Ul=["application/xhtml+xml","text/html"],Bl="text/html";let Qe=null,ir=null;const Ji=i.createElement("form"),eo=function(S){return S instanceof RegExp||S instanceof Function},gs=function(){let S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(ir&&ir===S)return;(!S||typeof S!="object")&&(S={}),S=Jt(S),Pn=Ul.indexOf(S.PARSER_MEDIA_TYPE)===-1?Bl:S.PARSER_MEDIA_TYPE,Qe=Pn==="application/xhtml+xml"?Dc:zi,Me=Ur(S,"ALLOWED_TAGS",Nt,{transform:Qe}),G=Ur(S,"ALLOWED_ATTR",De,{transform:Qe}),Kt=Ur(S,"ALLOWED_NAMESPACES",Mt,{transform:Dc}),Ct=Ur(S,"ADD_URI_SAFE_ATTR",an,{transform:Qe,base:an}),ot=Ur(S,"ADD_DATA_URI_TAGS",Rt,{transform:Qe,base:Rt}),Gt=Ur(S,"FORBID_CONTENTS",Cn,{transform:Qe}),He=Ur(S,"FORBID_TAGS",Jt({}),{transform:Qe}),at=Ur(S,"FORBID_ATTR",Jt({}),{transform:Qe}),Nn=$t(S,"USE_PROFILES")?S.USE_PROFILES&&typeof S.USE_PROFILES=="object"?Jt(S.USE_PROFILES):S.USE_PROFILES:!1,Fe=S.ALLOW_ARIA_ATTR!==!1,F=S.ALLOW_DATA_ATTR!==!1,ce=S.ALLOW_UNKNOWN_PROTOCOLS||!1,Oe=S.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ue=S.SAFE_FOR_TEMPLATES||!1,it=S.SAFE_FOR_XML!==!1,xt=S.WHOLE_DOCUMENT||!1,tt=S.RETURN_DOM||!1,tr=S.RETURN_DOM_FRAGMENT||!1,nr=S.RETURN_TRUSTED_TYPE||!1,Ze=S.FORCE_BODY||!1,qr=S.SANITIZE_DOM!==!1,wr=S.SANITIZE_NAMED_PROPS||!1,sr=S.KEEP_CONTENT!==!1,Mn=S.IN_PLACE||!1,jt=j1(S.ALLOWED_URI_REGEXP)?S.ALLOWED_URI_REGEXP:qp,qt=typeof S.NAMESPACE=="string"?S.NAMESPACE:ct,en=$t(S,"MATHML_TEXT_INTEGRATION_POINTS")&&S.MATHML_TEXT_INTEGRATION_POINTS&&typeof S.MATHML_TEXT_INTEGRATION_POINTS=="object"?Jt(S.MATHML_TEXT_INTEGRATION_POINTS):Be({},cn),Ut=$t(S,"HTML_INTEGRATION_POINTS")&&S.HTML_INTEGRATION_POINTS&&typeof S.HTML_INTEGRATION_POINTS=="object"?Jt(S.HTML_INTEGRATION_POINTS):Be({},gn);const I=$t(S,"CUSTOM_ELEMENT_HANDLING")&&S.CUSTOM_ELEMENT_HANDLING&&typeof S.CUSTOM_ELEMENT_HANDLING=="object"?Jt(S.CUSTOM_ELEMENT_HANDLING):Vs(null);if(oe=Vs(null),$t(I,"tagNameCheck")&&eo(I.tagNameCheck)&&(oe.tagNameCheck=I.tagNameCheck),$t(I,"attributeNameCheck")&&eo(I.attributeNameCheck)&&(oe.attributeNameCheck=I.attributeNameCheck),$t(I,"allowCustomizedBuiltInElements")&&typeof I.allowCustomizedBuiltInElements=="boolean"&&(oe.allowCustomizedBuiltInElements=I.allowCustomizedBuiltInElements),Vt(oe),Ue&&(F=!1),tr&&(tt=!0),Nn&&(Me=Be({},Hp),G=Vs(null),Nn.html===!0&&(Be(Me,Wp),Be(G,Vp)),Nn.svg===!0&&(Be(Me,Ic),Be(G,Lc),Be(G,pl)),Nn.svgFilters===!0&&(Be(Me,Ac),Be(G,Lc),Be(G,pl)),Nn.mathMl===!0&&(Be(Me,Mc),Be(G,Gp),Be(G,pl))),me.tagCheck=null,me.attributeCheck=null,$t(S,"ADD_TAGS")&&(typeof S.ADD_TAGS=="function"?me.tagCheck=S.ADD_TAGS:Hr(S.ADD_TAGS)&&(Me===Nt&&(Me=Jt(Me)),Be(Me,S.ADD_TAGS,Qe))),$t(S,"ADD_ATTR")&&(typeof S.ADD_ATTR=="function"?me.attributeCheck=S.ADD_ATTR:Hr(S.ADD_ATTR)&&(G===De&&(G=Jt(G)),Be(G,S.ADD_ATTR,Qe))),$t(S,"ADD_URI_SAFE_ATTR")&&Hr(S.ADD_URI_SAFE_ATTR)&&Be(Ct,S.ADD_URI_SAFE_ATTR,Qe),$t(S,"FORBID_CONTENTS")&&Hr(S.FORBID_CONTENTS)&&(Gt===Cn&&(Gt=Jt(Gt)),Be(Gt,S.FORBID_CONTENTS,Qe)),$t(S,"ADD_FORBID_CONTENTS")&&Hr(S.ADD_FORBID_CONTENTS)&&(Gt===Cn&&(Gt=Jt(Gt)),Be(Gt,S.ADD_FORBID_CONTENTS,Qe)),sr&&(Me["#text"]=!0),xt&&Be(Me,["html","head","body"]),Me.table&&(Be(Me,["tbody"]),delete He.tbody),S.TRUSTED_TYPES_POLICY){if(typeof S.TRUSTED_TYPES_POLICY.createHTML!="function")throw fs('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof S.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw fs('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const Y=Z;Z=S.TRUSTED_TYPES_POLICY;try{U=Te("")}catch(fe){throw Z=Y,fe}}else S.TRUSTED_TYPES_POLICY===null?(Z=void 0,U=""):(Z===void 0&&(Z=K()),Z&&typeof U=="string"&&(U=Te("")));Ht&&Ht(S),ir=S},Xs=Be({},[...Ic,...Ac,...R1]),Zs=Be({},[...Mc,...D1]),to=function(S,I,Y){return I.namespaceURI===ct?S==="svg":I.namespaceURI===Et?S==="svg"&&(Y==="annotation-xml"||en[Y]):!!Xs[S]},Wl=function(S,I,Y){return I.namespaceURI===ct?S==="math":I.namespaceURI===kt?S==="math"&&Ut[Y]:!!Zs[S]},Hl=function(S,I,Y){return I.namespaceURI===kt&&!Ut[Y]||I.namespaceURI===Et&&!en[Y]?!1:!Zs[S]&&(Ln[S]||!Xs[S])},ht=function(S){let I=L(S);(!I||!I.tagName)&&(I={namespaceURI:qt,tagName:"template"});const Y=zi(S.tagName),fe=zi(I.tagName);return Kt[S.namespaceURI]?S.namespaceURI===kt?to(Y,I,fe):S.namespaceURI===Et?Wl(Y,I,fe):S.namespaceURI===ct?Hl(Y,I,fe):!!(Pn==="application/xhtml+xml"&&Kt[S.namespaceURI]):!1},Gn=function(S){Hs(r.removed,{element:S});try{L(S).removeChild(S)}catch{if(R(S),!L(S))throw fs("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},kr=function(S){Kr(S);const I=C(S);if(I){const fe=[];Ws(I,ve=>{Hs(fe,ve)}),Ws(fe,ve=>{try{R(ve)}catch{}})}const Y=H(S);if(Y)for(let fe=Y.length-1;fe>=0;--fe){const ve=Y[fe],Ie=ve&&ve.name;if(typeof Ie=="string")try{S.removeAttribute(Ie)}catch{}}},qn=function(S,I){try{Hs(r.removed,{attribute:I.getAttributeNode(S),from:I})}catch{Hs(r.removed,{attribute:null,from:I})}if(I.removeAttribute(S),S==="is")if(tt||tr)try{Gn(I)}catch{}else try{I.setAttribute(S,"")}catch{}},vs=function(S){const I=H(S);if(I)for(let Y=I.length-1;Y>=0;--Y){const fe=I[Y],ve=fe&&fe.name;if(!(typeof ve!="string"||G[Qe(ve)]))try{S.removeAttribute(ve)}catch{}}},Kr=function(S){const I=[S];for(;I.length>0;){const Y=I.pop();(O?O(Y):Y.nodeType)===Sn.element&&vs(Y);const ve=C(Y);if(ve)for(let Ie=ve.length-1;Ie>=0;--Ie)I.push(ve[Ie])}},no=function(S){if(!it)return;const I=[S];for(;I.length>0;){const Y=I.pop(),fe=O?O(Y):Y.nodeType;if(fe===Sn.processingInstruction||fe===Sn.comment&&zt(Yp,Y.data)){try{R(Y)}catch{}continue}if(fe===Sn.element){const Ie=Y,Ge=Qe(B?B(Y):Y.nodeName);try{Ie.hasAttribute&&Ie.hasAttribute("patchsrc")&&Ie.removeAttribute("patchsrc"),Ie.hasAttribute&&Ie.hasAttribute("for")&&Ge!=="label"&&Ge!=="output"&&Ie.removeAttribute("for")}catch{}}const ve=C(Y);if(ve)for(let Ie=ve.length-1;Ie>=0;--Ie)I.push(ve[Ie])}},Yr=function(S){let I=null,Y=null;if(Ze)S="<remove></remove>"+S;else{const Ie=$p(S,/^[\r\n\t ]+/);Y=Ie&&Ie[0]}Pn==="application/xhtml+xml"&&qt===ct&&(S='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+S+"</body></html>");const fe=Z?Te(S):S;if(qt===ct)try{I=new y().parseFromString(fe,Pn)}catch{}if(!I||!I.documentElement){I=we.createDocument(qt,"template",null);try{I.documentElement.innerHTML=rt?U:fe}catch{}}const ve=I.body||I.documentElement;return S&&Y&&ve.insertBefore(i.createTextNode(Y),ve.childNodes[0]||null),qt===ct?W.call(I,xt?"html":"body")[0]:xt?I.documentElement:ve},vn=function(S){const I=ee?ee(S):S.ownerDocument;return $.call(I||S,S,g.SHOW_ELEMENT|g.SHOW_COMMENT|g.SHOW_TEXT|g.SHOW_PROCESSING_INSTRUCTION|g.SHOW_CDATA_SECTION,null)},ys=function(S){return S=Mi(S,le," "),S=Mi(S,he," "),S=Mi(S,_e," "),S},tn=function(S){var I;S.normalize();const Y=ee?ee(S):S.ownerDocument,fe=$.call(Y||S,S,g.SHOW_TEXT|g.SHOW_COMMENT|g.SHOW_CDATA_SECTION|g.SHOW_PROCESSING_INSTRUCTION,null);let ve=fe.nextNode();for(;ve;)ve.data=ys(ve.data),ve=fe.nextNode();const Ie=(I=S.querySelectorAll)===null||I===void 0?void 0:I.call(S,"template");Ie&&Ws(Ie,Ge=>{Sr(Ge.content)&&tn(Ge.content)})},xs=function(S){const I=B?B(S):null;return typeof I!="string"||Qe(I)!=="form"?!1:typeof S.nodeName!="string"||typeof S.textContent!="string"||typeof S.removeChild!="function"||S.attributes!==H(S)||typeof S.removeAttribute!="function"||typeof S.setAttribute!="function"||typeof S.namespaceURI!="string"||typeof S.insertBefore!="function"||typeof S.hasChildNodes!="function"||S.nodeType!==O(S)||S.childNodes!==C(S)},Sr=function(S){if(!O||typeof S!="object"||S===null)return!1;try{return O(S)===Sn.documentFragment}catch{return!1}},Qr=function(S){if(!O||typeof S!="object"||S===null)return!1;try{return typeof O(S)=="number"}catch{return!1}};function nn(ne,S,I){ne.length!==0&&Ws(ne,Y=>{Y.call(r,S,I,ir)})}const ws=function(S,I){return!!(it&&S.hasChildNodes()&&!Qr(S.firstElementChild)&&zt(Kp,S.textContent)&&zt(Kp,S.innerHTML)||it&&S.namespaceURI===ct&&I==="style"&&Qr(S.firstElementChild)||S.nodeType===Sn.processingInstruction||it&&S.nodeType===Sn.comment&&zt(Yp,S.data))},Xr=function(S,I,Y){if(!He[I]&&ei(I)&&(oe.tagNameCheck instanceof RegExp&&zt(oe.tagNameCheck,I)||oe.tagNameCheck instanceof Function&&oe.tagNameCheck(I)))return!1;if(sr&&!Gt[I]){const fe=L(S),ve=C(S);if(ve&&fe){const Ie=ve.length;for(let Ge=Ie-1;Ge>=0;--Ge){const Ke=S===Y?N(ve[Ge],!0):ve[Ge];fe.insertBefore(Ke,b(S))}}}return Gn(S),!0},Zr=function(S,I,Y,fe){return S.length===0?I:I===Y||I===fe?Jt(I):I},ro=function(S,I){if(nn(D.beforeSanitizeElements,S,null),S!==I&&L(S)===null)return Mn&&Kr(S),!0;if(xs(S))return Gn(S),!0;const Y=Qe(B?B(S):S.nodeName);if(Me=Zr(D.uponSanitizeElement,Me,Nt,pt),nn(D.uponSanitizeElement,S,{tagName:Y,allowedTags:Me}),S!==I&&L(S)===null)return Mn&&Kr(S),!0;if(ws(S,Y))return Gn(S),!0;if(He[Y]||!(me.tagCheck instanceof Function&&me.tagCheck(Y))&&!Me[Y]){const ve=Xr(S,Y,I);return ve===!1&&nn(D.afterSanitizeElements,S,null),ve}if((O?O(S):S.nodeType)===Sn.element&&!ht(S)||(Y==="noscript"||Y==="noembed"||Y==="noframes")&&zt(U1,S.innerHTML))return Gn(S),!0;if(Ue&&S.nodeType===Sn.text){const ve=ys(S.textContent);S.textContent!==ve&&(Hs(r.removed,{element:S.cloneNode()}),S.textContent=ve)}return nn(D.afterSanitizeElements,S,null),!1},so=function(S,I,Y){if(at[I]||it&&I==="patchsrc"||it&&I==="for"&&S!=="label"&&S!=="output"||qr&&(I==="id"||I==="name")&&(Y in i||Y in Ji))return!1;const fe=G[I]||me.attributeCheck instanceof Function&&me.attributeCheck(I,S);if(!(F&&zt(ke,I))){if(!(Fe&&zt(Pe,I))){if(fe){if(!Ct[I]){if(!zt(jt,Mi(Y,Ae,""))){if(!((I==="src"||I==="xlink:href"||I==="href")&&S!=="script"&&Fp(Y,"data:")===0&&ot[S])){if(!(ce&&!zt(be,Mi(Y,Ae,"")))){if(Y)return!1}}}}}else if(!(ei(S)&&(oe.tagNameCheck instanceof RegExp&&zt(oe.tagNameCheck,S)||oe.tagNameCheck instanceof Function&&oe.tagNameCheck(S))&&(oe.attributeNameCheck instanceof RegExp&&zt(oe.attributeNameCheck,I)||oe.attributeNameCheck instanceof Function&&oe.attributeNameCheck(I,S))||I==="is"&&oe.allowCustomizedBuiltInElements&&(oe.tagNameCheck instanceof RegExp&&zt(oe.tagNameCheck,Y)||oe.tagNameCheck instanceof Function&&oe.tagNameCheck(Y))))return!1}}return!0},Js=Be({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),ei=function(S){return!Js[zi(S)]&&zt(Ne,S)},ti=function(S,I,Y,fe){if(Z&&typeof x=="object"&&typeof x.getAttributeType=="function"&&!Y)switch(x.getAttributeType(S,I)){case"TrustedHTML":return Te(fe);case"TrustedScriptURL":return Le(fe)}return fe},Jr=function(S,I,Y,fe){try{Y?S.setAttributeNS(Y,I,fe):S.setAttribute(I,fe),xs(S)?Gn(S):zp(r.removed)}catch{qn(I,S)}},io=function(S){nn(D.beforeSanitizeAttributes,S,null);const I=S.attributes;if(!I||xs(S))return;G=Zr(D.uponSanitizeAttribute,G,De,ze);const Y={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:G,forceKeepAttr:void 0};let fe=I.length;const ve=Qe(S.nodeName);for(;fe--;){const Ie=I[fe],Ge=Ie.name,Ke=Ie.namespaceURI,mt=Ie.value,gt=Qe(Ge),or=mt;let St=Ge==="value"?or:T1(or);if(Y.attrName=gt,Y.attrValue=St,Y.keepAttr=!0,Y.forceKeepAttr=void 0,nn(D.uponSanitizeAttribute,S,Y),St=Y.attrValue,wr&&(gt==="id"||gt==="name")&&Fp(St,rr)!==0&&(qn(Ge,S),St=rr+St),it&&zt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,St)){qn(Ge,S);continue}if(gt==="attributename"&&$p(St,"href")){qn(Ge,S);continue}if(!Y.forceKeepAttr){if(!Y.keepAttr){qn(Ge,S);continue}if(!Oe&&zt(B1,St)){qn(Ge,S);continue}if(Ue&&(St=ys(St)),!so(ve,gt,St)){qn(Ge,S);continue}St=ti(ve,gt,Ke,St),St!==or&&Jr(S,Ge,Ke,St)}}nn(D.afterSanitizeAttributes,S,null)},Tr=function(S){let I=null;const Y=vn(S);for(nn(D.beforeSanitizeShadowDOM,S,null);I=Y.nextNode();)if(nn(D.uponSanitizeShadowNode,I,null),ro(I,S),io(I),Sr(I.content)&&Tr(I.content),(O?O(I):I.nodeType)===Sn.element){const ve=P(I);Sr(ve)&&(Ve(ve),Tr(ve))}nn(D.afterSanitizeShadowDOM,S,null)},Ve=function(S){const I=[{node:S,shadow:null}];for(;I.length>0;){const Y=I.pop();if(Y.shadow){Tr(Y.shadow);continue}const fe=Y.node,Ie=(O?O(fe):fe.nodeType)===Sn.element,Ge=C(fe);if(Ge)for(let Ke=Ge.length-1;Ke>=0;--Ke)I.push({node:Ge[Ke],shadow:null});if(Ie){const Ke=B?B(fe):null;if(typeof Ke=="string"&&Qe(Ke)==="template"){const mt=fe.content;Sr(mt)&&I.push({node:mt,shadow:null})}}if(Ie){const Ke=P(fe);Sr(Ke)&&I.push({node:null,shadow:Ke},{node:Ke,shadow:null})}}};return r.sanitize=function(ne){let S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},I=null,Y=null,fe=null,ve=null;if(rt=!ne,rt&&(ne="<!-->"),typeof ne!="string"&&!Qr(ne)&&(ne=b1(ne),typeof ne!="string"))throw fs("dirty is not a string, aborting");if(!r.isSupported)return ne;et?(Me=pt,G=ze):gs(S),(D.uponSanitizeElement.length>0||D.uponSanitizeAttribute.length>0)&&(Me=Jt(Me)),D.uponSanitizeAttribute.length>0&&(G=Jt(G)),r.removed=[];const Ie=Mn&&typeof ne!="string"&&Qr(ne);if(Ie){no(ne);const mt=B?B(ne):ne.nodeName;if(typeof mt=="string"){const gt=Qe(mt);if(!Me[gt]||He[gt])throw kr(ne),fs("root node is forbidden and cannot be sanitized in-place")}if(xs(ne))throw kr(ne),fs("root node is clobbered and cannot be sanitized in-place");try{Ve(ne)}catch(gt){throw kr(ne),gt}}else if(Qr(ne))I=Yr("<!---->"),Y=I.ownerDocument.importNode(ne,!0),Y.nodeType===Sn.element&&Y.nodeName==="BODY"||Y.nodeName==="HTML"?I=Y:I.appendChild(Y),Ve(Y);else{if(!tt&&!Ue&&!xt&&ne.indexOf("<")===-1)return Z&&nr?Te(ne):ne;if(I=Yr(ne),!I)return tt?null:nr?U:""}I&&Ze&&Gn(I.firstChild);const Ge=Ie?ne:I;try{const mt=vn(Ge);for(;fe=mt.nextNode();)ro(fe,Ge),io(fe),Sr(fe.content)&&Tr(fe.content)}catch(mt){throw Ie&&(kr(ne),Ws(r.removed,gt=>{gt.element&&Kr(gt.element)})),mt}if(Ie)return Ws(r.removed,mt=>{mt.element&&Kr(mt.element)}),Ue&&tn(ne),ne;if(tt){if(Ue&&tn(I),tr)for(ve=V.call(I.ownerDocument);I.firstChild;)ve.appendChild(I.firstChild);else ve=I;return(G.shadowroot||G.shadowrootmode)&&(ve=E.call(l,ve,!0)),ve}let Ke=xt?I.outerHTML:I.innerHTML;return xt&&Me["!doctype"]&&I.ownerDocument&&I.ownerDocument.doctype&&I.ownerDocument.doctype.name&&zt($1,I.ownerDocument.doctype.name)&&(Ke="<!DOCTYPE "+I.ownerDocument.doctype.name+`>
|
|
394
|
+
`+Ke),Ue&&(Ke=ys(Ke)),Z&&nr?Te(Ke):Ke},r.setConfig=function(){let ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};gs(ne),et=!0,pt=Me,ze=G},r.clearConfig=function(){ir=null,et=!1,pt=null,ze=null,Z=te,U=""},r.isValidAttribute=function(ne,S,I){ir||gs({});const Y=Qe(ne),fe=Qe(S);return so(Y,fe,I)},r.addHook=function(ne,S){typeof S=="function"&&$t(D,ne)&&Hs(D[ne],S)},r.removeHook=function(ne,S){if($t(D,ne)){if(S!==void 0){const I=k1(D[ne],S);return I===-1?void 0:S1(D[ne],I,1)[0]}return zp(D[ne])}},r.removeHooks=function(ne){$t(D,ne)&&(D[ne]=[])},r.removeAllHooks=function(){D=Qp()},r}var Ru=gm();const V1=new Set(["command_execution","file_change","mcp_tool_call","web_search"]);function Xp(n){return V1.has(n.type)}function G1({items:n,runtimeType:r,turn:i,threads:l=[]}){const[a,c]=k.useState(!1);if(n.length===0)return null;const p=n.length;return u.jsxs("div",{className:"tool-calls",children:[u.jsxs("div",{className:"tool-calls-header",onClick:()=>c(h=>!h),children:[u.jsx("span",{className:"tool-calls-icon",children:u.jsx(Iy,{size:12})}),u.jsxs("span",{className:"tool-calls-summary",children:[p," tool call",p>1?"s":""]}),u.jsx(uu,{size:14,className:"tool-calls-chevron",style:{transform:a?"rotate(90deg)":"none"}})]}),a&&u.jsx("div",{className:"tool-calls-body",children:n.map(h=>u.jsx(mr,{item:h,runtimeType:r,turn:i,threads:l},h.id))})]})}We.setOptions({breaks:!0,gfm:!0});function q1(n){const r=We.parse(n);return Ru.sanitize(r)}function Zp(n,r){var a;const i=document.createTreeWalker(n,NodeFilter.SHOW_TEXT);let l=0;for(;i.nextNode();){const c=i.currentNode,p=((a=c.textContent)==null?void 0:a.length)??0;if(l+p>r)return{node:c,offset:r-l};l+=p}return null}function K1(n,r){n.querySelectorAll("mark[data-thread-id]").forEach(i=>{const l=i.parentNode;if(!l)return;const a=document.createTextNode(i.textContent||"");l.replaceChild(a,i),l.normalize()});for(const i of r){const l=Zp(n,i.start_offset),a=Zp(n,i.end_offset);if(!l||!a)continue;const c=document.createRange();c.setStart(l.node,l.offset),c.setEnd(a.node,a.offset);const p=document.createElement("mark");p.setAttribute("data-thread-id",i.id),i.status==="resolved"&&p.classList.add("thread-mark-resolved");try{c.surroundContents(p)}catch{const h=c.extractContents();p.appendChild(h),c.insertNode(p)}}}function Y1(n){const r=window.getSelection();if(!r||r.rangeCount===0)return null;const i=r.getRangeAt(0);if(i.collapsed||!n.contains(i.commonAncestorContainer))return null;const l=document.createRange();l.setStart(n,0),l.setEnd(i.startContainer,i.startOffset);const a=l.toString().length,c=i.toString();return{start:a,end:a+c.length,text:c}}function Jp({itemId:n,turnId:r,sessionId:i,content:l,threads:a}){const c=k.useRef(null),p=k.useRef(null),h=k.useRef(null),g=k.useRef(""),m=k.useRef(0),[y,x]=k.useState(!1),[w,N]=k.useState({x:0,y:0}),[R,b]=k.useState(!1),[C,L]=k.useState({x:0,y:0}),[P,H]=k.useState(""),[O,B]=k.useState(null),[ee,Z]=k.useState(!1),{createThread:U,switchRightTab:te}=se(),q=k.useCallback(async()=>{await qc(l||""),Z(!0),setTimeout(()=>Z(!1),1500)},[l]),ie=k.useCallback(()=>{var V;if(!O)return;const $=`
|
|
395
|
+
\`\`\`QUOTE
|
|
396
|
+
${O.text}
|
|
397
|
+
\`\`\`
|
|
398
|
+
|
|
399
|
+
`;se.setState({quotedText:$}),x(!1),B(null),(V=window.getSelection())==null||V.removeAllRanges()},[O]),ye=a.filter($=>$.item_id===n);k.useEffect(()=>{c.current&&K1(c.current,ye)}),k.useEffect(()=>{g.current=P},[P]),k.useEffect(()=>{function $(V){p.current&&!p.current.contains(V.target)&&(x(!1),g.current.trim()||b(!1))}return document.addEventListener("mousedown",$),()=>document.removeEventListener("mousedown",$)},[]);const Te=k.useCallback(()=>{x(!1),g.current.trim()||b(!1)},[]),Le=k.useCallback(()=>{const $=c.current;if(!$)return;const V=Y1($);if(V&&V.text.trim().length>0){const W=window.getSelection();if(W&&W.rangeCount>0&&W.anchorNode&&W.focusNode){const D=W.getRangeAt(0).getBoundingClientRect(),le=28,he=6,_e=170;let ke=!1;try{const Ae=document.createRange();Ae.setStart(W.focusNode,W.focusOffset),Ae.setEnd(W.focusNode,W.focusOffset);const Ne=document.createRange();Ne.setStart(W.anchorNode,W.anchorOffset),Ne.setEnd(W.anchorNode,W.anchorOffset),ke=Ne.compareBoundaryPoints(Range.START_TO_START,Ae)>0}catch{ke=!1}let Pe=D.top-le-he;Pe<8&&(Pe=D.bottom+he);let be=ke?D.left-_e:D.right;be=Math.max(8,Math.min(be,window.innerWidth-_e-8)),N({x:be,y:Pe}),x(!0),B(V)}}else x(!1)},[]);k.useEffect(()=>{function $(V){const W=V.target;W&&(W.closest(".selection-actions")||W.closest(".thread-create-popover"))||Le()}return document.addEventListener("mouseup",$),()=>document.removeEventListener("mouseup",$)},[Le]);const K=k.useCallback(()=>{x(!1),b(!0),L({x:w.x,y:w.y})},[w]);k.useLayoutEffect(()=>{if(!R)return;const $=h.current;if(!$)return;const V=$.offsetWidth,W=$.offsetHeight,E=8;let D=w.x,le=w.y;D-V<E&&(D=V+E),D>window.innerWidth-E&&(D=window.innerWidth-E),le<E&&(le=E),le+W>window.innerHeight-E&&(le=window.innerHeight-W-E),L({x:D,y:le})},[R,w]);const xe=k.useCallback(async()=>{var $;!O||!P.trim()||(await U(i,{itemId:n,turnId:r,startOffset:O.start,endOffset:O.end,selectedText:O.text,message:P.trim()}),H(""),b(!1),B(null),($=window.getSelection())==null||$.removeAllRanges(),te("threads"))},[O,P,U,i,n,r,te]),we=k.useCallback($=>{const V=$.target;if(V.tagName==="MARK"&&V.hasAttribute("data-thread-id")){$.preventDefault(),te("threads");const W=V.getAttribute("data-thread-id");setTimeout(()=>{const E=document.getElementById(`thread-${W}`);E&&(E.scrollIntoView({behavior:"smooth",block:"center"}),E.classList.add("thread-card-highlighted"),setTimeout(()=>E.classList.remove("thread-card-highlighted"),1500))},100)}},[te]);return u.jsxs("div",{className:"copy-text-wrapper",style:{position:"relative"},ref:p,children:[u.jsx("div",{ref:c,dangerouslySetInnerHTML:{__html:q1(l||"…")},onMouseDown:Te,onClick:we}),u.jsx("button",{className:`copy-text-btn${ee?" copied":""}`,onClick:q,title:ee?"Copied":"Copy message","aria-label":"Copy message text",children:ee?u.jsx(Vr,{size:14}):u.jsx(Bc,{size:14})}),y&&!R&&u.jsxs("div",{className:"selection-actions",style:{left:w.x,top:w.y},children:[u.jsxs("button",{className:"discuss-button",onClick:K,title:"Start a discussion about this text",children:[u.jsx(xy,{size:14}),u.jsx("span",{children:"Discuss"})]}),u.jsxs("button",{className:"discuss-button",onClick:ie,title:"Quote this text in your message",children:[u.jsx(_h,{size:14}),u.jsx("span",{children:"Quote"})]})]}),R&&u.jsxs("div",{ref:h,className:"thread-create-popover",style:{left:C.x,top:C.y},children:[u.jsxs("div",{className:"thread-create-header",children:[u.jsxs("span",{className:"thread-create-quote",children:['"',O==null?void 0:O.text.slice(0,80),O&&O.text.length>80?"…":"",'"']}),u.jsx("button",{className:"thread-create-close",onClick:()=>{b(!1),B(null)},children:u.jsx(er,{size:14})})]}),u.jsx("textarea",{className:"thread-create-input",placeholder:"Ask about this text…",value:P,onChange:$=>H($.target.value),autoFocus:!0,rows:2,onKeyDown:$=>{if($.key==="Enter"&&($.metaKey||$.ctrlKey)&&($.preventDefault(),xe()),$.key==="Escape")if(g.current.trim()){const V=Date.now();m.current&&V-m.current<400?(m.current=0,b(!1),B(null)):m.current=V}else b(!1),B(null)}}),u.jsxs("div",{className:"thread-create-footer",children:[u.jsx("span",{className:"thread-create-hint",children:"⌘↵ to send · Esc to cancel"}),u.jsxs("button",{className:"thread-create-send",onClick:xe,disabled:!P.trim(),children:[u.jsx(Il,{size:13}),u.jsx("span",{children:"Send"})]})]})]})]})}const jl=new Map,vm=new Set,Jc=new Set,eh=new Map;function ym(){Jc.forEach(n=>n())}function xm(n,r){return`${n}:${r}`}function Q1(n,r,i,l,a){var g;const c=xm(r,i),p=jl.get(n)??new Map,h=new Map(p);((g=h.get(c))==null?void 0:g.answer)===a?h.delete(c):h.set(c,{itemIndex:r,groupIndex:i,question:l,answer:a}),jl.set(n,h),ym()}function X1(n){jl.delete(n),ym()}function Z1(n){vm.add(n),X1(n)}function J1(n){const r=k.useCallback(i=>(Jc.add(i),()=>{Jc.delete(i)}),[]);return k.useSyncExternalStore(r,()=>jl.get(n)??eh,()=>eh)}function ew(n){return[...n].sort((r,i)=>r.itemIndex-i.itemIndex||r.groupIndex-i.groupIndex).map(r=>`> ${r.question}
|
|
400
|
+
${r.answer}`).join(`
|
|
401
|
+
|
|
402
|
+
`)}function th({item:n,turn:r}){var N;const i=n.data??{},l=k.useMemo(()=>Array.isArray(i.groups)?i.groups.filter(R=>!!R&&Array.isArray(R.selections)&&R.selections.length>0):[],[i.groups]),a=J1(r.id),c=se(R=>r.session_id?R.sessionDetails[r.session_id]:null),p=se(R=>R.activeSessionId),h=r.items.findIndex(R=>R.id===n.id),g=c?((N=c.turns[c.turns.length-1])==null?void 0:N.id)===r.id:!0,m=vm.has(r.id),y=m||(c==null?void 0:c.is_running)===1||!g||r.session_id!==p,x=(R,b,C)=>{y||Q1(r.id,h,R,b,C)},w=()=>{const R=[...a.values()];if(R.length===0)return;const b=ew(R);Z1(r.id),se.getState().submitPrompt(b)};return u.jsxs("div",{className:"render-content ask-user-card",children:[u.jsxs("div",{className:"turn-header",children:[u.jsx("span",{className:"turn-header-icon",style:{background:"var(--surface-2)",color:"var(--text-3)"},children:u.jsx(ay,{size:14})}),u.jsx("span",{className:"turn-header-title",children:"Question"}),m&&u.jsx("span",{className:"turn-header-meta",children:"answered"})]}),l.length>0?u.jsxs("div",{className:"ask-user-groups",children:[l.map((R,b)=>u.jsxs("div",{className:"ask-user-group",children:[R.question&&u.jsx("div",{className:"ask-user-question",children:R.question}),u.jsx("div",{className:"ask-user-options",children:R.selections.map(C=>{var P;const L=((P=a.get(xm(h,b)))==null?void 0:P.answer)===C;return u.jsx("button",{type:"button",className:`ask-user-option ${L?"selected":""}`,disabled:y,onClick:()=>x(b,R.question,C),children:C},C)})})]},b)),y?m&&u.jsx("div",{className:"ask-user-submitted",children:"Answer sent"}):u.jsxs("button",{type:"button",className:"ask-user-send",disabled:a.size===0,onClick:w,children:[u.jsx(Il,{size:12}),"Send"]})]}):i.question?u.jsx("p",{className:"user-message",children:i.question}):u.jsx("p",{style:{color:"var(--text-muted)",fontStyle:"italic"},children:"Waiting for user response"})]})}We.setOptions({breaks:!0,gfm:!0});function tw({attachments:n}){const[r,i]=k.useState(null);return k.useEffect(()=>{if(!r)return;function l(a){a.key==="Escape"&&i(null)}return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[r]),!Array.isArray(n)||n.length===0?null:u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"attachment-pills",children:n.map((l,a)=>{const c=l.media_type.startsWith("image/"),p=`data:${l.media_type};base64,${l.data}`;return u.jsxs("span",{className:"attachment-pill",title:l.name,onClick:c?()=>i(p):void 0,style:c?{cursor:"pointer"}:void 0,children:[c?u.jsx("img",{src:p,alt:l.name,className:"attachment-pill-thumb"}):u.jsx(Eh,{size:12,className:"attachment-pill-icon"}),u.jsx("span",{className:"attachment-pill-name",children:l.name})]},a)})}),r&&u.jsx("div",{className:"image-preview-modal",onClick:()=>i(null),children:u.jsxs("div",{className:"image-preview-content",onClick:l=>l.stopPropagation(),children:[u.jsx("img",{src:r,alt:"preview"}),u.jsx("button",{className:"image-preview-close",onClick:()=>i(null),children:u.jsx(er,{size:20})})]})})]})}function nw(n){const r=We.parse(n);return Ru.sanitize(r)}function nh(n){var r;return(r=n.data)!=null&&r.text?n.data.text:""}function rw(n){const r=n.match(/^\/bin\/\w+\s+-\w+\s+"(.*)"$/s);return r?r[1]:n}function sw({html:n}){const[r,i]=k.useState(480);return u.jsx("iframe",{sandbox:"allow-scripts",srcDoc:n,title:"HTML content",onLoad:l=>{try{const a=l.currentTarget.contentDocument;a!=null&&a.documentElement&&i(Math.max(240,a.documentElement.scrollHeight))}catch{}},style:{width:"100%",height:`${r}px`,border:"1px solid var(--border)",borderRadius:"var(--r-md)",background:"#fff",marginTop:"8px"}})}const rh=1e4;function iw({item:n,runtimeType:r,turn:i,threads:l}){var h,g,m,y,x,w,N,R;const a=n.status==="in_progress",[c,p]=k.useState(!1);switch(n.type){case"agent_message":{const{iconClass:b,iconText:C}=Fc(r??"codex");return u.jsxs("div",{className:"render-content",children:[u.jsxs("div",{className:"turn-header",children:[u.jsx("span",{className:`turn-header-icon ${b}`,children:C}),u.jsx("span",{className:"turn-header-title",children:"Agent"}),a&&u.jsx("span",{className:"turn-header-meta",children:"writing…"})]}),u.jsx(Jp,{itemId:n.id,turnId:i.id,sessionId:i.session_id,content:nh(n)||"…",threads:l,runtimeType:r})]})}case"reasoning":return u.jsxs("div",{className:"render-content",children:[u.jsxs("div",{className:"turn-header",children:[u.jsx("span",{className:"turn-header-icon",style:{background:"var(--surface-2)",color:"var(--text-3)"},children:u.jsx(oy,{size:14})}),u.jsx("span",{className:"turn-header-title",children:"Reasoning"})]}),u.jsx("div",{dangerouslySetInnerHTML:{__html:nw(nh(n))}})]});case"command_execution":{const b=n.data||{},C=rw(b.command||""),L=b.aggregated_output||"",P=b.exit_code,H=a?"running…":P!==null?`exit ${P}`:"",O=L.length>rh,B=O&&!c?L.slice(0,rh)+`
|
|
403
|
+
… (truncated, click to expand)`:L;return u.jsxs("div",{className:"render-content",children:[u.jsxs("div",{className:"turn-header",children:[u.jsx("span",{className:"turn-header-icon",style:{background:"var(--surface-2)",color:"var(--text-3)"},children:u.jsx(jh,{size:14})}),u.jsx("span",{className:"turn-header-title",children:"Command"}),H&&u.jsx("span",{className:"turn-header-meta",children:H})]}),u.jsx("pre",{className:"cmd-block",children:u.jsx("code",{children:C})}),L&&u.jsxs(u.Fragment,{children:[u.jsx("pre",{className:"cmd-output",children:u.jsx("code",{children:B})}),O&&u.jsx("button",{className:"cmd-output-toggle",onClick:()=>p(ee=>!ee),children:c?"Show less":`Show full output (${(L.length/1024).toFixed(0)}KB)`})]})]})}case"file_change":{const b=(h=n.data)==null?void 0:h.changes,C=Array.isArray(b)?b:[],L=`${C.length} file${C.length!==1?"s":""}`;return u.jsxs("div",{className:"render-content",children:[u.jsxs("div",{className:"turn-header",children:[u.jsx("span",{className:"turn-header-icon",style:{background:"var(--surface-2)",color:"var(--text-3)"},children:u.jsx(fy,{size:14})}),u.jsx("span",{className:"turn-header-title",children:"File Changes"}),u.jsx("span",{className:"turn-header-meta",children:L})]}),u.jsx("div",{className:"file-change-list",children:C.map((P,H)=>{const O=P.kind==="add"?"A":P.kind==="delete"?"D":"M",B=P.kind==="add"?"fc-add":P.kind==="delete"?"fc-del":"fc-mod";return u.jsxs("div",{className:"file-change",children:[u.jsx("span",{className:`fc-status ${B}`,children:O}),u.jsx("span",{className:"fc-name",children:P.path})]},H)})})]})}case"mcp_tool_call":{const b=n.data||{},C=b.tool||"mcp";if(C==="Agent"){const U=b.arguments,te=(U==null?void 0:U.description)||(U==null?void 0:U.prompt)||"Subagent",q=n.status==="failed",ie=a?"running…":q?"failed":"done";return u.jsxs("div",{className:"agent-call-card",children:[u.jsx("span",{className:"agent-call-icon",children:u.jsx(Uc,{size:14})}),u.jsx("span",{className:"agent-call-desc",children:te}),u.jsx("span",{className:`agent-call-status ${a?"running":q?"failed":"done"}`,children:ie})]})}const L=b.server||"",P=b.arguments,H=b.result,O=b.error,B=n.status==="failed"||!!O,ee=a?"running…":B?"failed":"done",Z=((g=H==null?void 0:H.content)==null?void 0:g.filter(U=>U.type==="text").map(U=>U.text))??[];return u.jsxs("div",{className:"render-content",children:[u.jsxs("div",{className:"turn-header",children:[u.jsx("span",{className:"turn-header-icon",style:{background:"var(--surface-2)",color:"var(--text-3)"},children:u.jsx(Ny,{size:14})}),u.jsxs("span",{className:"turn-header-title",children:["MCP: ",C]}),L&&u.jsx("span",{className:"turn-header-meta",children:L}),u.jsx("span",{className:"turn-header-meta",style:B?{color:"var(--red)"}:void 0,children:ee})]}),P&&Object.keys(P).length>0&&u.jsx("div",{className:"mcp-args",children:Object.entries(P).map(([U,te])=>u.jsxs("div",{className:"mcp-arg",children:[u.jsx("span",{className:"mcp-arg-key",children:U}),U==="code"?u.jsx("pre",{className:"cmd-block",children:u.jsx("code",{children:String(te)})}):u.jsx("span",{className:"mcp-arg-value",children:typeof te=="string"?te:JSON.stringify(te,null,2)})]},U))}),Z.length>0&&Z.map((U,te)=>u.jsx("pre",{className:"cmd-output",children:u.jsx("code",{children:U})},te)),O&&u.jsx("pre",{className:"cmd-output",style:{color:"var(--red)"},children:u.jsx("code",{children:O})})]})}case"web_search":{const b=((m=n.data)==null?void 0:m.query)||"";return u.jsxs("div",{className:"render-content",children:[u.jsxs("div",{className:"turn-header",children:[u.jsx("span",{className:"turn-header-icon",style:{background:"var(--surface-2)",color:"var(--text-3)"},children:u.jsx(Ey,{size:14})}),u.jsx("span",{className:"turn-header-title",children:"Web Search"})]}),u.jsx("p",{className:"user-message",children:b})]})}case"todo_list":{const b=((y=n.data)==null?void 0:y.items)||[];return u.jsxs("div",{className:"render-content",children:[u.jsxs("div",{className:"turn-header",children:[u.jsx("span",{className:"turn-header-icon",style:{background:"var(--surface-2)",color:"var(--text-3)"},children:u.jsx(gy,{size:14})}),u.jsx("span",{className:"turn-header-title",children:"Todo List"})]}),u.jsx("ul",{className:"todo-list",children:b.map((C,L)=>u.jsxs("li",{className:C.completed?"todo-done":"todo-pending",children:[C.completed?u.jsx(Vr,{size:14}):u.jsx(Al,{size:14})," ",C.text]},L))})]})}case"ask_user":return u.jsx(th,{item:n,turn:i});case"final_result":{const b=n.data??{},C=b.text||"",L=b.html||null,P=Array.isArray(b.groups)?b.groups.filter(B=>!!B&&Array.isArray(B.selections)&&B.selections.length>0):[],{iconClass:H,iconText:O}=Fc(r??"codex");return u.jsxs(u.Fragment,{children:[(C||L)&&u.jsxs("div",{className:"render-content",children:[u.jsxs("div",{className:"turn-header",children:[u.jsx("span",{className:`turn-header-icon ${H}`,children:O}),u.jsx("span",{className:"turn-header-title",children:"Agent"})]}),C&&u.jsx(Jp,{itemId:n.id,turnId:i.id,sessionId:i.session_id,content:C,threads:l,runtimeType:r}),L&&u.jsx(sw,{html:L})]}),P.length>0&&u.jsx(th,{item:n,turn:i})]})}case"background_task":{const b=n.data||{},C=b.task_type||"unknown",L=b.subagent_type||null,P=b.description||"",H=b.status||"running",O=b.last_tool_name||null,B=b.token_count||null,ee=C==="local_agent",Z=C==="local_bash",U=ee?Uc:Z?bh:Ch,te=ee?`Subagent${L?`: ${L}`:""}`:Z?"Monitor":"Background Task",q=H==="running"?"running…":H==="completed"?"done":H==="failed"?"failed":H==="stopped"?"stopped":H,ie=n.status==="failed"||H==="failed";return u.jsxs("div",{className:"render-content",children:[u.jsxs("div",{className:"turn-header",children:[u.jsx("span",{className:"turn-header-icon",style:{background:"var(--surface-2)",color:"var(--text-3)"},children:u.jsx(U,{size:14})}),u.jsx("span",{className:"turn-header-title",children:te}),u.jsx("span",{className:"turn-header-meta",style:ie?{color:"var(--red)"}:void 0,children:q})]}),P&&u.jsx("p",{className:"user-message",style:{fontSize:"13px"},children:P}),O&&a&&u.jsxs("div",{className:"cmd-output",style:{color:"var(--text-3)",fontSize:"12px"},children:["last tool: ",O,B!=null&&` · ${B.toLocaleString()} tokens`]}),u.jsx("div",{className:"cmd-output",style:{color:"var(--text-muted)",fontSize:"11px"},children:"Output available in Tasks panel — click the status bar indicator or the Tasks tab."})]})}case"context_compaction":{const b=((x=n.data)==null?void 0:x.trigger)??"auto",C=((w=n.data)==null?void 0:w.pre_tokens)??0,L=((N=n.data)==null?void 0:N.post_tokens)??0,P=C>0?Math.round((1-L/C)*100):0,H=b==="manual"?"Context compacted (/compact)":"Context auto-compacted";return u.jsxs("div",{className:"render-content",children:[u.jsxs("div",{className:"turn-header",children:[u.jsx("span",{className:"turn-header-icon",style:{background:"var(--surface-2)",color:"var(--text-3)"},children:u.jsx(ky,{size:14})}),u.jsx("span",{className:"turn-header-title",children:H})]}),u.jsxs("div",{className:"cmd-output",style:{color:"var(--text-3)"},children:[C.toLocaleString()," → ",L.toLocaleString()," tokens (",P,"% reduction)"]})]})}case"error":{const b=((R=n.data)==null?void 0:R.message)||"Unknown error";return u.jsxs("div",{className:"render-content",children:[u.jsxs("div",{className:"turn-header",children:[u.jsx("span",{className:"turn-header-icon",style:{background:"var(--red)",color:"#fff"},children:u.jsx(du,{size:14})}),u.jsx("span",{className:"turn-header-title",children:"Error"})]}),u.jsx("pre",{className:"cmd-output",style:{color:"var(--red)"},children:u.jsx("code",{children:b})})]})}default:return null}}const mr=k.memo(iw);function ow({turn:n,runtimeType:r,threads:i=[]}){const[l,a]=k.useState(!1);k.useEffect(()=>{const C=n.items.some(L=>L.type==="background_task"&&L.status==="in_progress");n.status==="running"||n.status==="pending"?a(!0):n.status==="completed"&&!C&&a(!1)},[n.status,n.items]);let c=-1;for(let C=n.items.length-1;C>=0;C--)if(n.items[C].type==="agent_message"){c=C;break}const p=c>=0,h=p?n.items.slice(0,c):n.items,g=n.items.some(C=>C.type==="final_result"||C.type==="ask_user"),m=!p&&n.status==="completed"&&n.agent_response&&!g?{id:`response-${n.id}`,turn_id:n.id,external_item_id:`response-${n.id}`,type:"agent_message",data:{text:n.agent_response},status:"completed",created_at:n.created_at,updated_at:n.updated_at}:null,x=h.filter(C=>{var L;return!(C.type==="reasoning"&&(!((L=C.data)!=null&&L.text)||C.data.text===""))}).filter(C=>!(C.type==="background_task"||C.type==="ask_user"||C.type==="final_result")),w=[];let N=null;for(const C of x)C.type==="agent_message"?(N&&w.push(N),N={agentMessage:C,toolItems:[],otherItems:[]}):(N||(N={agentMessage:null,toolItems:[],otherItems:[]}),Xp(C)?N.toolItems.push(C):N.otherItems.push(C));N&&w.push(N);const R=x.filter(C=>Xp(C)).length,b=R>0||x.length>0&&(n.status==="running"||n.status==="pending");return u.jsxs("div",{className:"turn-group",children:[u.jsxs("div",{className:"render-content",children:[u.jsxs("div",{className:"turn-header",children:[u.jsx("span",{className:"turn-header-icon",style:{background:"var(--amber)",color:"#fff"},children:"U"}),u.jsx("span",{className:"turn-header-title",children:"You"})]}),u.jsx("p",{className:"user-message",children:n.user_prompt}),Array.isArray(n.attachments)&&n.attachments.length>0&&u.jsx(tw,{attachments:n.attachments})]}),b&&u.jsxs("div",{className:"tool-calls",children:[u.jsxs("div",{className:"tool-calls-header",onClick:()=>a(C=>!C),children:[u.jsx("span",{className:"tool-calls-icon",children:u.jsx(my,{size:12})}),u.jsx("span",{className:"tool-calls-summary",children:R>0?`${R} tool call${R>1?"s":""}`:"thinking…"}),u.jsx(uu,{size:14,className:"tool-calls-chevron",style:{transform:l?"rotate(90deg)":"none"}})]}),l&&u.jsx("div",{className:"tool-calls-body",children:w.map((C,L)=>u.jsxs("div",{className:"intermediate-segment",children:[C.agentMessage&&u.jsx(mr,{item:C.agentMessage,runtimeType:r,turn:n,threads:i}),C.otherItems.map(P=>u.jsx(mr,{item:P,runtimeType:r,turn:n,threads:i},P.id)),C.toolItems.length>0&&u.jsx(G1,{items:C.toolItems,runtimeType:r,turn:n,threads:i})]},L))})]}),n.items.filter(C=>C.type==="background_task").map(C=>u.jsx(mr,{item:C,runtimeType:r,turn:n,threads:i},`task-${C.id}`)),p&&u.jsx(mr,{item:n.items[c],runtimeType:r,turn:n,threads:i},n.items[c].id),m&&u.jsx(mr,{item:m,runtimeType:r,turn:n,threads:i},m.id),p&&n.items.slice(c+1).filter(C=>C.type!=="ask_user"&&C.type!=="background_task"&&C.type!=="final_result").map(C=>u.jsx(mr,{item:C,runtimeType:r,turn:n,threads:i},C.id)),n.items.filter(C=>C.type==="final_result").map(C=>u.jsx(mr,{item:C,runtimeType:r,turn:n,threads:i},`final-${C.id}`)),n.items.filter(C=>C.type==="ask_user").map(C=>u.jsx(mr,{item:C,runtimeType:r,turn:n,threads:i},`ask-${C.id}`)),n.items.length===0&&!n.error&&(n.status==="pending"||n.status==="running")&&u.jsx("div",{className:"render-content",children:u.jsx("p",{style:{color:"var(--text-muted)",fontStyle:"italic"},children:n.status==="running"?"Agent is thinking…":"Waiting to start…"})}),n.error&&u.jsx("div",{className:"render-content",children:u.jsx("pre",{className:"cmd-output",style:{color:"var(--red)"},children:u.jsx("code",{children:n.error})})})]})}const lw=k.memo(ow);function wm(n,r="session",i=0){const l=[];if(r==="session")n.forEach((c,p)=>sh(c,p,l));else{const c=n[i];c&&sh(c,i,l)}const a=new Map;for(const c of l)a.set(c.path,c);return Array.from(a.values())}function sh(n,r,i){var l;for(const a of n.items)if(a.type==="file_change"&&((l=a.data)!=null&&l.changes)){const c=a.data.changes;for(const p of c)i.push({path:p.path,kind:p.kind,turnIdx:r})}}function aw(){const{activeSessionId:n,sessionDetails:r,activeTurnIndex:i,activeRightTab:l,changesScope:a,submittingPrompt:c,loading:p,selectedChangePath:h,setSelectedChangePath:g}=se(),m=n?r[n]:null,y=(m==null?void 0:m.turns)??[],x=k.useRef(null);if(k.useEffect(()=>{x.current&&(x.current.scrollTop=x.current.scrollHeight)},[n,y.length]),k.useEffect(()=>{if(!h||l!=="changes")return;const w=setTimeout(()=>{const N=h.replace(/[^a-zA-Z0-9]/g,"-"),R=document.getElementById(`diff-${N}`);R&&(R.scrollIntoView({behavior:"smooth",block:"start"}),R.classList.add("diff-highlight"),setTimeout(()=>R.classList.remove("diff-highlight"),1500)),g(null)},50);return()=>clearTimeout(w)},[h,l,g]),l==="changes"){if(!m)return u.jsx("div",{className:"render-scroll",children:u.jsx("div",{className:"empty-state",children:"No session selected"})});const w=wm(y,a,i);return w.length===0?u.jsx("div",{className:"render-scroll",children:u.jsx("div",{className:"render-content",children:u.jsx("p",{style:{color:"var(--text-muted)",fontStyle:"italic"},children:"No file changes in this scope."})})}):u.jsx("div",{className:"render-scroll",ref:x,children:u.jsxs("div",{className:"render-content",children:[u.jsxs("div",{style:{marginBottom:"20px"},children:[u.jsx("span",{style:{fontSize:"16px",fontWeight:600,color:"var(--text)"},children:a==="session"?"All Session Changes":"Current Turn Changes"}),u.jsxs("span",{style:{fontSize:"12px",color:"var(--text-muted)",marginLeft:"8px"},children:[w.length," file",w.length>1?"s":""]})]}),w.map(N=>{const R=N.path.split("/").pop()||N.path,b=N.path.replace("/"+R,""),C=N.kind==="add"?"Added":N.kind==="delete"?"Deleted":"Modified",L=N.kind==="add"?"fc-add":N.kind==="delete"?"fc-del":"fc-mod",P=N.kind==="add"?"A":N.kind==="delete"?"D":"M",H=N.path.replace(/[^a-zA-Z0-9]/g,"-");return u.jsxs("div",{children:[u.jsxs("div",{className:"diff-file-header",id:`diff-${H}`,children:[u.jsx("span",{className:`diff-file-status ${L}`,children:P}),u.jsxs("span",{className:"diff-file-name",children:[b&&u.jsxs("span",{style:{color:"var(--text-muted)"},children:[b,"/"]}),R]}),u.jsx("span",{className:"diff-file-stats",children:u.jsx("span",{className:`diff-file-badge ${L}`,children:C})})]}),u.jsx("p",{style:{color:"var(--text-muted)",fontSize:"12px",fontStyle:"italic",padding:"8px 16px"},children:"Diff content not available (Codex SDK limitation)."})]},N.path)})]})})}return p&&!m?u.jsx("div",{className:"render-scroll",children:u.jsxs("div",{className:"skeleton-bars",children:[u.jsx("div",{className:"skeleton-bar"}),u.jsx("div",{className:"skeleton-bar"}),u.jsx("div",{className:"skeleton-bar"}),u.jsx("div",{className:"skeleton-bar"}),u.jsx("div",{className:"skeleton-bar"})]})}):m?u.jsxs("div",{className:"render-scroll",ref:x,children:[c&&u.jsx("div",{className:"turn-block",children:u.jsxs("div",{className:"turn-group",children:[u.jsxs("div",{className:"render-content",children:[u.jsxs("div",{className:"turn-header",children:[u.jsx("span",{className:"turn-header-icon",style:{background:"var(--amber)",color:"#fff"},children:"U"}),u.jsx("span",{className:"turn-header-title",children:"You"})]}),u.jsx("p",{className:"user-message",children:c})]}),u.jsx("div",{className:"render-content",children:u.jsx("p",{style:{color:"var(--text-muted)",fontStyle:"italic"},children:"Sending…"})})]})}),y.length===0&&!c&&u.jsx("div",{className:"empty-state",children:"No turns yet. Send a message below to start."}),y.filter(w=>!w.thread_id).map((w,N)=>u.jsx("div",{id:`turn-${N}`,className:"turn-block",children:u.jsx(lw,{turn:w,runtimeType:m.runtime_type,threads:m.threads??[]})},w.id))]}):u.jsx("div",{className:"render-scroll",children:u.jsx("div",{className:"empty-state",children:"No session selected"})})}const cw=k.memo(aw),uw=[{id:"model",label:"/model",hint:"Change model",capability:"dynamicModels"},{id:"sandbox",label:"/sandbox",hint:"Sandbox mode",capability:"sandbox",subPopup:"sandbox"},{id:"websearch",label:"/websearch",hint:"Web search mode",capability:"webSearch",subPopup:"websearch"},{id:"network",label:"/network",hint:"Network access",capability:"networkAccess",subPopup:"network"},{id:"skills",label:"/skills",hint:"Browse skills",capability:"skills"},{id:"plugins",label:"/plugins",hint:"Browse plugins",capability:"plugins"},{id:"mcp",label:"/mcp",hint:"Browse MCP servers",capability:"mcpServers"}];function dw(n){return n.map(r=>({id:r.name,label:`/${r.name}`,hint:r.description,capability:null,insertAsText:!0}))}function fw(n,r,i=[]){const l=[...uw,...dw(i)],a=new Set;return l.filter(c=>!(a.has(c.label)||(a.add(c.label),c.capability&&!r[c.capability])||n&&!c.label.toLowerCase().includes(n.toLowerCase())))}function pw({commands:n,selectedIndex:r,onSelect:i,onHover:l}){return u.jsxs("div",{className:"slash-popup",children:[u.jsx("div",{className:"slash-popup-header",children:"Commands"}),n.length===0&&u.jsx("div",{className:"slash-popup-empty",children:"No matching commands"}),n.map((a,c)=>u.jsxs("div",{className:`slash-popup-item ${c===r?"selected":""}`,onMouseEnter:()=>l(c),onClick:()=>i(a),children:[u.jsx("span",{className:"slash-popup-label",children:a.label}),u.jsx("span",{className:"slash-popup-hint",children:a.hint})]},a.id))]})}function Pc({title:n,options:r,currentValue:i,onSelect:l,onClose:a}){return u.jsxs("div",{className:"slash-popup",children:[u.jsxs("div",{className:"slash-popup-header",children:[u.jsx("button",{className:"slash-popup-back",onClick:a,children:"← Back"}),u.jsx("span",{children:n})]}),r.map(c=>u.jsxs("div",{className:`slash-popup-item ${c.value===i?"selected":""}`,onClick:()=>l(c.value),children:[u.jsxs("div",{className:"slash-popup-item-main",children:[u.jsx("span",{className:"slash-popup-label",children:c.label}),c.description&&u.jsx("span",{className:"slash-popup-hint",children:c.description})]}),c.value===i&&u.jsx("span",{className:"slash-popup-check",children:"✓"})]},c.value))]})}function hw(n){return Gr("/skills")}function mw({filter:n,onSelect:r,onClose:i}){const[l,a]=k.useState([]),[c,p]=k.useState(!0),[h,g]=k.useState(0),m=k.useRef(null);k.useEffect(()=>{hw().then(a).catch(()=>a([])).finally(()=>p(!1))},[]);const y=l.filter(x=>x.name.toLowerCase().includes(n.toLowerCase())||x.description.toLowerCase().includes(n.toLowerCase()));return k.useEffect(()=>{g(0)},[n]),k.useEffect(()=>{function x(w){w.key==="ArrowDown"?(w.preventDefault(),g(N=>Math.min(N+1,y.length-1))):w.key==="ArrowUp"?(w.preventDefault(),g(N=>Math.max(N-1,0))):w.key==="Enter"?(w.preventDefault(),y[h]&&r(y[h])):w.key==="Escape"&&(w.preventDefault(),i())}return window.addEventListener("keydown",x),()=>window.removeEventListener("keydown",x)},[y,h,r,i]),u.jsxs("div",{className:"slash-popup",ref:m,children:[u.jsxs("div",{className:"slash-popup-header",children:[u.jsx("button",{className:"slash-popup-back",onClick:i,children:"← Back"}),u.jsx("span",{children:"Skills"})]}),c&&u.jsx("div",{className:"slash-popup-empty",children:"Loading skills…"}),!c&&y.length===0&&u.jsx("div",{className:"slash-popup-empty",children:"No matching skills"}),y.map((x,w)=>u.jsxs("div",{className:`slash-popup-item ${w===h?"selected":""}`,onMouseEnter:()=>g(w),onClick:()=>r(x),children:[u.jsxs("div",{className:"slash-popup-item-main",children:[u.jsx("span",{className:"slash-popup-label",children:x.name}),x.description&&u.jsx("span",{className:"slash-popup-hint",children:x.description})]}),!!x.metadata.isSystem&&u.jsx("span",{className:"slash-popup-hint",children:"system"})]},x.id))]})}function gw(){return Gr("/providers")}function vw(n,r){const i=r?`?cwd=${encodeURIComponent(r)}`:"";return Gr(`/providers/${n}/commands${i}`)}const yw={dynamicModels:!1,skills:!1,plugins:!1,mcpServers:!1,imageAttachments:!1,sandbox:!1,webSearch:!1,networkAccess:!1,fileReferences:!1};function xw(n){const[r,i]=k.useState([]),[l,a]=k.useState(!0);k.useEffect(()=>{gw().then(i).catch(()=>i([])).finally(()=>a(!1))},[]);const c=r.find(p=>p.id===n)??null;return{provider:c,capabilities:(c==null?void 0:c.capabilities)??yw,loading:l}}const hl=32,Pi=200;function ih(n){if(!n)return{};try{return JSON.parse(n)}catch{return{}}}function oh(n){return n<1024?`${n}B`:n<1024*1024?`${(n/1024).toFixed(1)}KB`:`${(n/(1024*1024)).toFixed(1)}MB`}let lh=0;function ww(){return lh+=1,`att-${Date.now()}-${lh}`}function kw(){const[n,r]=k.useState(""),i=k.useRef(null),l=k.useRef(null),{submitPrompt:a,cancelTurn:c,updateRuntimeConfig:p,setShowModelSelector:h}=se(),g=se(F=>F.activeSessionId),m=se(F=>F.activeSessionId?F.sessionDetails[F.activeSessionId]:null),y=se(F=>F.restoredPrompt),x=se(F=>F.quotedText),w=(m==null?void 0:m.is_running)===1,N=!g,{capabilities:R}=xw(m==null?void 0:m.runtime_type),b=(m==null?void 0:m.runtime_type)??null,C=R.imageAttachments,[L,P]=k.useState([]),[H,O]=k.useState(!1),[B,ee]=k.useState(null),[Z,U]=k.useState([]);k.useEffect(()=>{if(!b){U([]);return}let F=!1;return vw(b,(m==null?void 0:m.cwd)??void 0).then(ce=>{F||U(ce)}).catch(()=>{F||U([])}),()=>{F=!0}},[b,m==null?void 0:m.cwd]);const[te,q]=k.useState(!1),[ie,ye]=k.useState(""),[Te,Le]=k.useState(0),[K,xe]=k.useState(void 0),[we,$]=k.useState(!1),[V,W]=k.useState(""),[E,D]=k.useState([]),le=te?fw(ie,R,Z):[];k.useEffect(()=>{y!==null&&(r(y),requestAnimationFrame(()=>{i.current&&(i.current.style.height="auto",i.current.style.height=Math.min(i.current.scrollHeight,Pi)+"px")}),se.setState({restoredPrompt:null}))},[y]),k.useEffect(()=>{x!==null&&(r(F=>F+x),setTimeout(()=>{if(i.current){i.current.style.height="auto",i.current.style.height=Math.min(i.current.scrollHeight,Pi)+"px",i.current.focus();const F=i.current.value.length;i.current.setSelectionRange(F,F)}},0),se.setState({quotedText:null}))},[x]),k.useEffect(()=>{if(!w)return;function F(ce){ce.key==="Escape"&&(ce.preventDefault(),c())}return window.addEventListener("keydown",F),()=>window.removeEventListener("keydown",F)},[w,c]),k.useEffect(()=>{q(!1),xe(void 0),$(!1),D([]),P(F=>{for(const ce of F)ce.previewUrl&&URL.revokeObjectURL(ce.previewUrl);return[]})},[g]),k.useEffect(()=>{if(!B)return;function F(ce){ce.key==="Escape"&&(ce.preventDefault(),ee(null))}return window.addEventListener("keydown",F),()=>window.removeEventListener("keydown",F)},[B]);const he=k.useCallback(F=>{if(!F)return;const ce=Array.from(F);for(const Oe of ce){const Ue=new FileReader;Ue.onload=()=>{const xt=Ue.result.split(",")[1]??"",et=Oe.type.startsWith("image/")?URL.createObjectURL(Oe):void 0;P(pt=>[...pt,{id:ww(),name:Oe.name,media_type:Oe.type||"application/octet-stream",data:xt,previewUrl:et,size:Oe.size}])},Ue.readAsDataURL(Oe)}},[]),_e=k.useCallback(F=>{P(ce=>{const Oe=ce.find(Ue=>Ue.id===F);return Oe!=null&&Oe.previewUrl&&URL.revokeObjectURL(Oe.previewUrl),ce.filter(Ue=>Ue.id!==F)})},[]),ke=k.useCallback(F=>{F.preventDefault(),F.stopPropagation(),!(!C||w)&&O(!0)},[C,w]),Pe=k.useCallback(F=>{F.preventDefault(),F.stopPropagation(),O(!1)},[]),be=k.useCallback(F=>{F.preventDefault(),F.stopPropagation(),O(!1),!(!C||w)&&he(F.dataTransfer.files)},[C,w,he]),Ae=k.useCallback(F=>{var Ue;if(!C)return;const ce=(Ue=F.clipboardData)==null?void 0:Ue.items;if(!ce)return;const Oe=[];for(let it=0;it<ce.length;it++){const xt=ce[it];if(xt.type.startsWith("image/")){const et=xt.getAsFile();et&&Oe.push(et)}}Oe.length>0&&(F.preventDefault(),he(Oe))},[C,he]);function Ne(){const F=i.current;F&&(F.style.height="auto",F.style.height=Math.min(F.scrollHeight,Pi)+"px")}function jt(){const F=n.trim();if(!F||w)return;let ce=F;E.length>0&&(ce=`${E.map(it=>`$${it.name}`).join(" ")}
|
|
404
|
+
|
|
405
|
+
${F}`);const Oe=L.map(({id:Ue,previewUrl:it,size:xt,...et})=>et);r(""),D([]),i.current&&(i.current.style.height=hl+"px"),q(!1),xe(void 0),$(!1);for(const Ue of L)Ue.previewUrl&&URL.revokeObjectURL(Ue.previewUrl);P([]),a(ce,Oe.length>0?Oe:void 0)}function Me(F){if(F.insertAsText){const ce=`/${F.id} `;r(ce),q(!1),xe(void 0),requestAnimationFrame(()=>{if(i.current){i.current.focus();const Oe=ce.length;i.current.setSelectionRange(Oe,Oe),i.current.style.height="auto",i.current.style.height=Math.min(i.current.scrollHeight,Pi)+"px"}});return}F.subPopup?xe(F.subPopup):F.id==="skills"?($(!0),W(""),q(!1),r("")):F.id==="model"?(h(!0),q(!1),r("")):(q(!1),r(""))}function Nt(F){D(ce=>[...ce,F]),$(!1),r(""),i.current&&(i.current.style.height=hl+"px")}function G(F){const ce=ih(m==null?void 0:m.runtime_config);K==="sandbox"?ce.sandboxMode=F:K==="websearch"?ce.webSearchMode=F:K==="network"&&(ce.networkAccessEnabled=F==="true"),p(ce),xe(void 0),q(!1),r(""),i.current&&(i.current.style.height=hl+"px")}function De(F){if(te&&!K){if(F.key==="ArrowDown"){F.preventDefault(),Le(ce=>Math.min(ce+1,le.length-1));return}if(F.key==="ArrowUp"){F.preventDefault(),Le(ce=>Math.max(ce-1,0));return}if(F.key==="Enter"){F.preventDefault(),le[Te]&&Me(le[Te]);return}if(F.key==="Escape"){F.preventDefault(),q(!1),r("");return}}if(K&&F.key==="Escape"){F.preventDefault(),xe(void 0);return}if(F.key==="Enter"&&(F.metaKey||F.ctrlKey)&&!w){F.preventDefault(),jt();return}F.key==="Escape"&&w&&(F.preventDefault(),c())}function oe(F){const ce=F.target.value;r(ce),Ne(),ce.startsWith("/")&&!ce.includes(" ")&&!w?(q(!0),ye(ce.slice(1)),Le(0)):(q(!1),xe(void 0)),ce.startsWith("$")&&!w?($(!0),W(ce.slice(1))):ce.startsWith("$")||$(!1)}const He=ih(m==null?void 0:m.runtime_config),at=[{value:"read-only",label:"Read Only",description:"Agent can only read files"},{value:"workspace-write",label:"Workspace Write",description:"Agent can read and write in workspace"},{value:"danger-full-access",label:"Danger Full Access",description:"Agent has unrestricted access"}],me=[{value:"disabled",label:"Disabled",description:"No web search"},{value:"cached",label:"Cached",description:"Use cached search results"},{value:"live",label:"Live",description:"Perform live web searches"}],Fe=[{value:"false",label:"Disabled",description:"No network access"},{value:"true",label:"Enabled",description:"Allow network access in sandbox"}];return u.jsxs("div",{className:`cmd-bar${H?" drag-over":""}`,onDragOver:ke,onDragLeave:Pe,onDrop:be,children:[te&&!K&&u.jsx(pw,{commands:le,selectedIndex:Te,onSelect:Me,onHover:Le}),te&&K==="sandbox"&&u.jsx(Pc,{title:"Sandbox Mode",options:at,currentValue:He.sandboxMode,onSelect:G,onClose:()=>xe(void 0)}),te&&K==="websearch"&&u.jsx(Pc,{title:"Web Search",options:me,currentValue:He.webSearchMode,onSelect:G,onClose:()=>xe(void 0)}),te&&K==="network"&&u.jsx(Pc,{title:"Network Access",options:Fe,currentValue:He.networkAccessEnabled===!0?"true":"false",onSelect:G,onClose:()=>xe(void 0)}),we&&u.jsx(mw,{filter:V,onSelect:Nt,onClose:()=>{$(!1),r("")}}),E.length>0&&u.jsx("div",{className:"skill-badges",children:E.map(F=>u.jsxs("span",{className:"skill-badge",children:["$",F.name,u.jsx("button",{className:"skill-badge-remove",onClick:()=>D(ce=>ce.filter(Oe=>Oe.id!==F.id)),children:"×"})]},F.id))}),L.length>0&&u.jsx("div",{className:"attachment-preview-area",children:L.map(F=>u.jsxs("div",{className:"attachment-chip",title:F.name,children:[F.previewUrl?u.jsx("img",{src:F.previewUrl,alt:F.name,className:"attachment-thumb",onClick:()=>ee(F),style:{cursor:"pointer"}}):u.jsx(Eh,{size:20,className:"attachment-file-icon"}),u.jsxs("div",{className:"attachment-info",children:[u.jsx("span",{className:"attachment-name",children:F.name}),u.jsx("span",{className:"attachment-size",children:oh(F.size)})]}),u.jsx("button",{className:"attachment-remove",onClick:()=>_e(F.id),title:"Remove attachment",children:u.jsx(er,{size:14})})]},F.id))}),C&&!w&&!N&&u.jsx("input",{ref:l,type:"file",multiple:!0,accept:"image/*,application/pdf,text/*,.ts,.js,.tsx,.jsx,.py,.go,.rs,.java,.c,.cpp,.h,.css,.html,.xml,.yml,.yaml,.toml,.ini,.sh,.sql",style:{display:"none"},onChange:F=>{he(F.target.files),F.target.value=""}}),u.jsxs("div",{className:"cmd-input-row",children:[C&&!w&&!N&&u.jsx("button",{className:"attachment-clip-btn",onClick:()=>{var F;return(F=l.current)==null?void 0:F.click()},title:"Attach files",disabled:w,children:u.jsx(Ty,{size:16})}),u.jsx("textarea",{ref:i,className:"cmd-textarea",placeholder:N?"Select or create a session…":w?"Agent is running…":"Type a message… Use / for commands",autoComplete:"off",value:n,disabled:w||N,rows:1,style:{minHeight:hl,maxHeight:Pi},onChange:oe,onKeyDown:De,onPaste:Ae}),w?u.jsx("button",{className:"cmd-stop-btn",onClick:()=>c(),title:"Stop (Esc)",children:u.jsx(Al,{size:15})}):u.jsx("button",{className:"cmd-send-btn",onClick:jt,disabled:!n.trim()||N,title:"Send (⌘↵)",children:u.jsx(iy,{size:16})})]}),B&&u.jsx("div",{className:"image-preview-modal",onClick:()=>ee(null),children:u.jsxs("div",{className:"image-preview-content",onClick:F=>F.stopPropagation(),children:[u.jsx("img",{src:B.previewUrl,alt:B.name}),u.jsxs("div",{className:"image-preview-info",children:[u.jsx("span",{children:B.name}),u.jsx("span",{children:oh(B.size)})]}),u.jsx("button",{className:"image-preview-close",onClick:()=>ee(null),children:u.jsx(er,{size:20})})]})})]})}function Sw(){const n=se(L=>L.activeSessionId),r=se(L=>L.sessionDetails),i=se(L=>L.activeTurnIndex),l=se(L=>L.setActiveTurnIndex),a=se(L=>L.rewindToTurn),c=se(L=>L.restoreSession),p=se(L=>L.branchFromTurn),h=n?r[n]:null,g=(h==null?void 0:h.turns)??[],m=(h==null?void 0:h.is_running)===1,y=!!(h!=null&&h.rewound_at_turn_id),x=(h==null?void 0:h.runtime_type)==="repoburg",w=x?"Rewind to this turn? Runtime history after this point is PERMANENTLY deleted and cannot be restored.":"Rewind to this turn? Hidden turns can be restored later.",[N,R]=k.useState(null),b=k.useRef(null);if(Dl(b,()=>R(null),!!N),au(()=>R(null),!!N),g.length===0)return u.jsx("div",{className:"empty-state",children:"No turns yet"});function C(L){l(L),requestAnimationFrame(()=>{var P;(P=document.getElementById(`turn-${L}`))==null||P.scrollIntoView({behavior:"smooth",block:"start"})})}return u.jsxs("div",{className:"right-section",children:[u.jsx("div",{className:"right-section-title",children:"Conversation"}),g.map((L,P)=>{const H=P===i,O=L.user_prompt.length>50?L.user_prompt.slice(0,50)+"…":L.user_prompt,B=L.status==="running"||L.status==="pending";return u.jsx("div",{children:u.jsxs("div",{className:`turn-item ${H?"active":""}`,onClick:()=>C(P),onContextMenu:ee=>{ee.preventDefault(),R({x:ee.clientX,y:ee.clientY,turnId:L.id,turnIndex:P,isLast:P===g.length-1,isSlashCommand:L.user_prompt.trimStart().startsWith("/")})},children:[u.jsx("span",{className:"turn-item-icon",style:{background:"var(--amber)",color:"#fff"},children:u.jsx(Dy,{size:12})}),u.jsx("span",{className:"turn-item-label",children:O}),B&&u.jsx("span",{className:"turn-item-status",children:"running…"})]})},L.id)}),N&&u.jsxs("div",{ref:b,className:"ctx-menu",style:{position:"fixed",left:N.x,top:N.y,zIndex:500},children:[u.jsxs("div",{className:`ctx-menu-item ${N.isLast||m||N.isSlashCommand?"ctx-disabled":""}`,onClick:()=>{N.isLast||m||N.isSlashCommand||(window.confirm(w)&&a(n,N.turnId),R(null))},children:[u.jsx(Cy,{size:12})," Rewind to Here",N.isSlashCommand?" (slash command)":""]}),y&&!x&&u.jsxs("div",{className:"ctx-menu-item",onClick:()=>{c(n),R(null)},children:[u.jsx(pu,{size:12})," Restore Rewind"]}),u.jsxs("div",{className:"ctx-menu-item",onClick:()=>{p(n,N.turnId),R(null)},children:[u.jsx(py,{size:12})," Branch from Here"]})]})]})}function Tw(){const{activeSessionId:n,sessionDetails:r,changesScope:i,setChangesScope:l,activeTurnIndex:a,setSelectedChangePath:c}=se(),p=n?r[n]:null,h=(p==null?void 0:p.turns)??[],g=wm(h,i,a);return u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"changes-scope-toggle",children:[u.jsx("button",{className:`scope-btn ${i==="session"?"active":""}`,onClick:()=>l("session"),children:"Session"}),u.jsx("button",{className:`scope-btn ${i==="turngroup"?"active":""}`,onClick:()=>l("turngroup"),children:"Current Turn"})]}),g.length===0?u.jsx("div",{className:"empty-state",children:"No file changes in this scope"}):u.jsxs("div",{className:"right-section",children:[u.jsxs("div",{className:"right-section-title",children:["Changed Files (",g.length,")"]}),g.map(m=>{const y=m.kind==="add"?"fc-add":m.kind==="delete"?"fc-del":"fc-mod",x=m.kind==="add"?"A":m.kind==="delete"?"D":"M",w=m.path.split("/").pop()||m.path,N=m.path.replace("/"+w,"");return u.jsxs("div",{className:"file-change clickable",onClick:()=>c(m.path),children:[u.jsx("span",{className:`fc-status ${y}`,children:x}),u.jsxs("span",{className:"fc-name",children:[N&&u.jsxs("span",{style:{color:"var(--text-muted)"},children:[N,"/"]}),w]})]},m.path)})]})]})}const ah=2e4;function Nw(n){const r=[];return n.forEach((i,l)=>{var a;for(const c of i.items)if(c.type==="background_task"){if((((a=c.data)==null?void 0:a.task_type)||"unknown")==="local_agent")continue;r.push({item:c,turnIndex:l,turnPrompt:i.user_prompt})}}),r}function Cw({entry:n}){const{item:r,turnIndex:i,turnPrompt:l}=n,a=r.data||{},c=a.task_type||"unknown",p=a.subagent_type||null,h=a.description||"",g=a.status||"running",m=a.summary||null,y=a.last_tool_name||null,x=a.token_count||null,w=a.output||"",N=r.status==="in_progress",R=c==="local_agent",b=c==="local_bash",C=R?Uc:b?bh:Ch,L=R?`Subagent${p?`: ${p}`:""}`:b?"Monitor":"Background Task",P=g==="running"?"running…":g==="completed"?"done":g==="failed"?"failed":g==="stopped"?"stopped":g,H=r.status==="failed"||g==="failed",[O,B]=k.useState(N),[ee,Z]=k.useState(!1),U=k.useRef(null);k.useEffect(()=>{N&&B(!0)},[N]),k.useEffect(()=>{O&&N&&U.current&&(U.current.scrollTop=U.current.scrollHeight)},[O,N,w]);const te=w.length>ah,q=te&&!ee?w.slice(0,ah)+`
|
|
406
|
+
… (truncated, click to expand)`:w,ie=N?null:g==="completed"?u.jsx(Vr,{size:12}):H?u.jsx(du,{size:12}):u.jsx(Al,{size:12});return u.jsxs("div",{className:`task-card ${N?"task-running":""} ${H?"task-failed":""}`,children:[u.jsxs("div",{className:"task-card-header",onClick:()=>B(ye=>!ye),style:{cursor:"pointer"},children:[u.jsx("span",{className:"task-card-icon",children:u.jsx(C,{size:14})}),u.jsx("span",{className:"task-card-type",children:L}),u.jsxs("span",{className:`task-card-status ${H?"task-status-failed":N?"task-status-running":"task-status-done"}`,children:[ie," ",P]}),u.jsx(uu,{size:14,className:"task-card-chevron",style:{transform:O?"rotate(90deg)":"none",marginLeft:"auto"}})]}),h&&u.jsx("div",{className:"task-card-desc",children:h}),N&&y&&u.jsxs("div",{className:"task-card-meta",children:["last tool: ",y,x!=null&&` · ${x.toLocaleString()} tokens`]}),O&&u.jsxs("div",{className:"task-card-body",children:[w?u.jsxs(u.Fragment,{children:[u.jsx("pre",{className:"cmd-output task-output",ref:U,children:u.jsx("code",{children:q})}),te&&u.jsx("button",{className:"cmd-output-toggle",onClick:()=>Z(ye=>!ye),children:ee?"Show less":`Show full output (${(w.length/1024).toFixed(0)}KB)`})]}):m?u.jsx("pre",{className:"cmd-output task-output",children:u.jsx("code",{children:m})}):N?u.jsx("div",{className:"task-card-placeholder",children:"Waiting for output…"}):u.jsx("div",{className:"task-card-placeholder",children:"No output captured."}),u.jsxs("div",{className:"task-card-context",title:l,children:["from turn ",i+1,": ",l.length>60?l.slice(0,60)+"…":l]})]})]})}const Ew=k.memo(Cw);function _w(){var m,y;const n=se(x=>x.activeSessionId),r=se(x=>x.sessionDetails),i=n?r[n]:null,l=(i==null?void 0:i.turns)??[],a=(i==null?void 0:i.backgroundTasks)??[],c=Nw(l),p=[...c].sort((x,w)=>{const N=x.item.status==="in_progress",R=w.item.status==="in_progress";return N&&!R?-1:!N&&R?1:w.turnIndex-x.turnIndex}),h=new Map;for(const x of a)x.task_type==="local_bash"&&h.set(x.task_id,x.task_type);for(const x of c)if(x.item.status==="in_progress"){const w=((m=x.item.data)==null?void 0:m.task_id)??x.item.external_item_id,N=((y=x.item.data)==null?void 0:y.task_type)??"unknown";h.set(w,N)}const g=[...h.values()].filter(x=>x==="local_bash").length;return c.length===0?u.jsx("div",{className:"empty-state",children:"No background tasks yet"}):u.jsxs("div",{className:"right-section",children:[u.jsxs("div",{className:"right-section-title",children:["Background Tasks (",c.length,")",g>0&&u.jsxs("span",{className:"task-count-badge",style:{color:"var(--amber)"},children:[" ",g," running"]})]}),p.map(x=>u.jsx(Ew,{entry:x},x.item.id))]})}const bw=k.memo(_w);function jw({thread:n,onClose:r}){const{activeSessionId:i,resolveThread:l,shareThread:a}=se(),[c,p]=k.useState(""),[h,g]=k.useState(!1),[m,y]=k.useState(!1);async function x(){if(!i||h)return;g(!0),await a(i,n.id,c)?r():g(!1)}async function w(){!i||m||(y(!0),await l(i,n.id),r())}const N=h||m;return u.jsx("div",{className:"dialog-overlay",onClick:N?void 0:r,children:u.jsxs("div",{className:"dialog",onClick:R=>R.stopPropagation(),children:[u.jsxs("div",{className:"dialog-header",children:[u.jsx("span",{className:"dialog-title",children:"Resolve thread"}),u.jsx("button",{className:"dialog-close",onClick:r,disabled:N,children:u.jsx(er,{size:16})})]}),u.jsxs("div",{className:"dialog-body",children:[u.jsx("div",{className:"dialog-hint",children:"Share this thread's findings with the main session? The discussion will be summarized and the summary is added to your input as a quote."}),u.jsxs("label",{className:"dialog-label",children:["Summarization directives (optional)",u.jsx("textarea",{className:"dialog-input share-directives-input",placeholder:"e.g. focus on the performance findings, keep file paths",value:c,onChange:R=>p(R.target.value),rows:3,disabled:N,autoFocus:!0})]})]}),u.jsxs("div",{className:"dialog-footer",children:[u.jsx("button",{className:"dialog-btn-cancel",onClick:r,disabled:N,children:"Cancel"}),u.jsxs("button",{className:"dialog-btn-cancel",onClick:w,disabled:N,title:"Resolve without sharing",children:[m?u.jsx(gr,{size:13,className:"spin"}):u.jsx(fu,{size:13}),"Resolve only"]}),u.jsxs("button",{className:"dialog-btn-create",onClick:x,disabled:N,children:[h?u.jsx(gr,{size:13,className:"spin"}):u.jsx(_y,{size:13}),h?"Summarizing…":"Share & Resolve"]})]})]})})}We.setOptions({breaks:!0,gfm:!0});function Rw(n){const r=We.parse(n);return Ru.sanitize(r)}function Dw(n){var r,i,l;if(n.type==="agent_message"||n.type==="final_result"){const a=(r=n.data)==null?void 0:r.text;return typeof a=="string"&&a?a:null}if(n.type==="ask_user"){const a=Array.isArray((i=n.data)==null?void 0:i.groups)?n.data.groups:[],c=[(l=n.data)==null?void 0:l.question,...a.map(p=>p.question)].filter(p=>typeof p=="string"&&!!p);return c.length?c.join(`
|
|
407
|
+
|
|
408
|
+
`):null}return null}function Iw(n){const r=n.match(/^\[Quoting from your previous response\]:\n> .*\n\n([\s\S]*)$/);return r?r[1]:n}function Aw({turn:n}){const r=Iw(n.user_prompt),i=n.items.map(Dw).filter(l=>l!==null);return i.length===0&&n.status==="completed"&&n.agent_response&&i.push(n.agent_response),u.jsxs("div",{className:"thread-card-turn",children:[u.jsx("div",{className:"thread-card-user-message",children:r}),i.map((l,a)=>u.jsx("div",{className:"thread-card-ai-response",dangerouslySetInnerHTML:{__html:Rw(l)}},a)),i.length===0&&(n.status==="pending"||n.status==="running")&&u.jsx("div",{className:"thread-card-pending",children:n.status==="running"?"AI is responding…":"Waiting…"}),n.status==="failed"&&u.jsx("div",{className:"thread-card-pending",children:n.error||"Turn failed"})]})}function Mw({thread:n,isRunning:r,threadTurns:i,onResolve:l,onReopen:a,onDelete:c,onFollowup:p,onLocate:h}){const[g,m]=k.useState(""),[y,x]=k.useState(!0),w=k.useRef(null),N=k.useRef(null),[R,b]=k.useState(!1),[C,L]=k.useState({x:0,y:0}),[P,H]=k.useState(""),O=28,B=120;k.useEffect(()=>{const q=N.current;q&&(q.scrollTop=q.scrollHeight)},[i.length,y]);function ee(){const q=w.current;q&&(q.style.height="auto",q.style.height=Math.min(q.scrollHeight,B)+"px")}const Z=k.useCallback(()=>{b(!1)},[]),U=k.useCallback(()=>{const q=N.current;if(!q)return;const ie=window.getSelection();if(!ie||ie.rangeCount===0||ie.isCollapsed){b(!1);return}const ye=ie.getRangeAt(0);if(!q.contains(ye.commonAncestorContainer)){b(!1);return}const Te=ye.commonAncestorContainer.nodeType===Node.TEXT_NODE?ye.commonAncestorContainer.parentElement:ye.commonAncestorContainer;if(!(Te!=null&&Te.closest(".thread-card-ai-response"))){b(!1);return}const Le=ie.toString();if(!Le.trim()){b(!1);return}const K=ye.getBoundingClientRect(),xe=28,we=6,$=170;let V=!1;if(ie.anchorNode&&ie.focusNode)try{const D=document.createRange();D.setStart(ie.focusNode,ie.focusOffset),D.setEnd(ie.focusNode,ie.focusOffset);const le=document.createRange();le.setStart(ie.anchorNode,ie.anchorOffset),le.setEnd(ie.anchorNode,ie.anchorOffset),V=le.compareBoundaryPoints(Range.START_TO_START,D)>0}catch{V=!1}let W=K.top-xe-we;W<8&&(W=K.bottom+we);let E=V?K.left-$:K.right;E=Math.max(8,Math.min(E,window.innerWidth-$-8)),L({x:E,y:W}),H(Le),b(!0)},[]);k.useEffect(()=>{function q(ie){const ye=ie.target;ye&&ye.closest(".selection-actions")||U()}return document.addEventListener("mouseup",q),()=>document.removeEventListener("mouseup",q)},[U]);const te=k.useCallback(()=>{var ie;const q=`
|
|
409
|
+
\`\`\`QUOTE
|
|
410
|
+
${P}
|
|
411
|
+
\`\`\`
|
|
412
|
+
|
|
413
|
+
`;m(ye=>ye+q),b(!1),H(""),(ie=window.getSelection())==null||ie.removeAllRanges(),setTimeout(()=>{if(w.current){w.current.style.height="auto",w.current.style.height=Math.min(w.current.scrollHeight,B)+"px",w.current.focus();const ye=w.current.value.length;w.current.setSelectionRange(ye,ye)}},0)},[P]);return u.jsxs("div",{className:`thread-card ${n.status==="resolved"?"thread-resolved":""}`,id:`thread-${n.id}`,children:[u.jsxs("div",{className:"thread-card-header",onClick:()=>x(q=>!q),children:[u.jsxs("div",{className:"thread-card-quote",children:["“",n.selected_text.slice(0,100),n.selected_text.length>100?"…":"","”"]}),u.jsxs("div",{className:"thread-card-header-right",children:[u.jsx("button",{className:"thread-locate-btn",onClick:q=>{q.stopPropagation(),h()},title:"Scroll to text",children:u.jsx(Sy,{size:12})}),u.jsx("span",{className:`thread-status-badge ${n.status==="open"?"thread-status-open":"thread-status-resolved"}`,children:n.status==="open"?"Open":"Resolved"})]})]}),y&&u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"thread-card-conversation",ref:N,onMouseDown:Z,children:[i.map(q=>u.jsx(Aw,{turn:q},q.id)),i.length===0&&u.jsx("div",{className:"thread-card-placeholder",children:"No messages yet."})]}),R&&u.jsx("div",{className:"selection-actions",style:{left:C.x,top:C.y},children:u.jsxs("button",{className:"discuss-button",onClick:te,title:"Quote this text in your follow-up",children:[u.jsx(_h,{size:14}),u.jsx("span",{children:"Quote"})]})}),n.status==="open"&&u.jsxs("div",{className:"thread-card-followup",children:[u.jsx("textarea",{ref:w,className:"thread-card-followup-input",placeholder:r?"Agent is running…":"Type a follow-up…",value:g,onChange:q=>{m(q.target.value),ee()},disabled:r,rows:1,style:{minHeight:O,maxHeight:B},onKeyDown:q=>{q.key==="Enter"&&(q.metaKey||q.ctrlKey)&&!r&&g.trim()&&(q.preventDefault(),p(g.trim()),m(""),w.current&&(w.current.style.height=O+"px"))}}),u.jsx("button",{className:"thread-card-followup-send",disabled:r||!g.trim(),onClick:()=>{p(g.trim()),m("")},children:u.jsx(Il,{size:13})})]}),u.jsxs("div",{className:"thread-card-actions",children:[n.status==="open"?u.jsxs("button",{className:"thread-action-btn",onClick:l,title:"Resolve thread",children:[u.jsx(fu,{size:13})," Resolve"]}):u.jsxs("button",{className:"thread-action-btn",onClick:a,title:"Reopen thread",children:[u.jsx(pu,{size:13})," Reopen"]}),u.jsxs("button",{className:"thread-action-btn thread-action-danger",onClick:c,title:"Delete thread",children:[u.jsx(ps,{size:13})," Delete"]})]})]})]})}function Lw(){const{activeSessionId:n,sessionDetails:r,followupThread:i,reopenThread:l,deleteThread:a,activeRightTab:c,switchRightTab:p}=se(),[h,g]=k.useState("open"),[m,y]=k.useState(null),x=n?r[n]:null,w=(x==null?void 0:x.threads)??[],N=(x==null?void 0:x.is_running)===1,R=w.filter(P=>h==="open"?P.status==="open":h==="resolved"?P.status==="resolved":!0),b=w.filter(P=>P.status==="open").length,C=w.filter(P=>P.status==="resolved").length;function L(P){c==="changes"&&p("turns"),setTimeout(()=>{const H=document.querySelector(`mark[data-thread-id="${P}"]`);H&&(H.scrollIntoView({behavior:"smooth",block:"center"}),H.classList.add("thread-mark-flash"),setTimeout(()=>H.classList.remove("thread-mark-flash"),1500))},c==="changes"?150:50)}return n?w.length===0?u.jsxs("div",{className:"empty-state",children:[u.jsx(wy,{size:24,style:{opacity:.3,marginBottom:8}}),u.jsx("div",{children:"No threads yet."}),u.jsx("div",{style:{fontSize:"11px",marginTop:"4px"},children:"Select text in an agent response to start a discussion."})]}):u.jsxs("div",{children:[u.jsxs("div",{className:"thread-filter-tabs",children:[u.jsxs("button",{className:`thread-filter-tab ${h==="open"?"active":""}`,onClick:()=>g("open"),children:["Open (",b,")"]}),u.jsxs("button",{className:`thread-filter-tab ${h==="resolved"?"active":""}`,onClick:()=>g("resolved"),children:["Resolved (",C,")"]}),u.jsxs("button",{className:`thread-filter-tab ${h==="all"?"active":""}`,onClick:()=>g("all"),children:["All (",w.length,")"]})]}),R.length===0?u.jsxs("div",{className:"empty-state",style:{padding:"20px 0"},children:["No ",h," threads."]}):R.map(P=>u.jsx(Mw,{thread:P,isRunning:N,threadTurns:P.turns??[],onResolve:()=>y(P),onReopen:()=>l(n,P.id),onDelete:()=>a(n,P.id),onFollowup:H=>i(n,P.id,H),onLocate:()=>L(P.id)},P.id)),m&&u.jsx(jw,{thread:m,onClose:()=>y(null)})]}):u.jsx("div",{className:"empty-state",children:"No session selected"})}function Pw(){var g,m;const{activeRightTab:n,switchRightTab:r,activeSessionId:i,sessionDetails:l}=se(),a=i?l[i]:null,c=((g=a==null?void 0:a.backgroundTasks)==null?void 0:g.length)??0,p=((m=a==null?void 0:a.threads)==null?void 0:m.filter(y=>y.status==="open").length)??0,h=[{id:"turns",label:"Turns"},{id:"changes",label:"Changes"},{id:"tasks",label:"Tasks",badge:c||void 0},{id:"threads",label:"Threads",badge:p||void 0}];return u.jsxs("div",{className:"ide-right",children:[u.jsx("div",{className:"right-tabs",children:h.map(y=>u.jsxs("div",{className:`right-tab ${n===y.id?"active":""}`,onClick:()=>r(y.id),children:[y.label,y.badge?u.jsx("span",{className:"right-tab-badge",children:y.badge}):null]},y.id))}),u.jsxs("div",{className:"right-content",children:[n==="turns"&&u.jsx(Sw,{}),n==="changes"&&u.jsx(Tw,{}),n==="tasks"&&u.jsx(bw,{}),n==="threads"&&u.jsx(Lw,{})]})]})}const je={low:{effort:"low",label:"Low"},medium:{effort:"medium",label:"Medium"},high:{effort:"high",label:"High"},xhigh:{effort:"xhigh",label:"Extra High"},max:{effort:"max",label:"Max"},ultra:{effort:"ultra",label:"Ultra"}},eu=[{id:"codex",label:"Codex",available:!0,models:[{slug:"gpt-5.6-sol",displayName:"GPT-5.6-Sol",description:"Flagship — complex, open-ended work",defaultReasoning:"low",reasoningLevels:[je.low,je.medium,je.high,je.xhigh,je.max,je.ultra]},{slug:"gpt-5.6-terra",displayName:"GPT-5.6-Terra",description:"Balanced all-rounder for everyday work",defaultReasoning:"medium",reasoningLevels:[je.low,je.medium,je.high,je.xhigh,je.max,je.ultra]},{slug:"gpt-5.6-luna",displayName:"GPT-5.6-Luna",description:"Fast, affordable — clear, repeatable tasks",defaultReasoning:"medium",reasoningLevels:[je.low,je.medium,je.high,je.xhigh,je.max]},{slug:"gpt-5.5",displayName:"GPT-5.5",description:"Previous-gen frontier model",defaultReasoning:"medium",reasoningLevels:[je.low,je.medium,je.high,je.xhigh]}]},{id:"claude",label:"Claude",available:!0,models:[{slug:"claude-sonnet-5",displayName:"Claude Sonnet 5",description:"Balanced all-rounder for everyday work",defaultReasoning:"medium",reasoningLevels:[je.low,je.medium,je.high,je.xhigh,je.max]},{slug:"claude-opus-5",displayName:"Claude Opus 5",description:"Deep reasoning for complex tasks",defaultReasoning:"medium",reasoningLevels:[je.low,je.medium,je.high,je.xhigh,je.max]},{slug:"claude-fable-5",displayName:"Claude Fable 5",description:"Fast and efficient for simple tasks",defaultReasoning:"medium",reasoningLevels:[je.low,je.medium,je.high,je.xhigh,je.max]}]},{id:"repoburg",label:"Repoburg",available:!0,models:[{slug:"ollama/glm-5.3:cloud",displayName:"GLM-5.3",description:"Ollama Cloud",defaultReasoning:"medium",reasoningLevels:[je.low,je.medium,je.high]},{slug:"ollama/glm-5.3-flash:cloud",displayName:"GLM-5.3 Flash",description:"Ollama Cloud — fast",defaultReasoning:"medium",reasoningLevels:[je.low,je.medium,je.high]},{slug:"ollama/minimax-m3:cloud",displayName:"MiniMax M3",description:"Ollama Cloud",defaultReasoning:"medium",reasoningLevels:[je.low,je.medium,je.high]},{slug:"ollama/deepseek-v4-pro:cloud",displayName:"DeepSeek V4 Pro",description:"Ollama Cloud",defaultReasoning:"medium",reasoningLevels:[je.low,je.medium,je.high]}]}];function Ow(n){return eu.find(r=>r.id===n)}function Du(n){const r=Ow(n);return(r==null?void 0:r.models)??[]}function km(n,r){return Du(n).find(i=>i.slug===r)}function tu(n,r){var i;return((i=km(n,r))==null?void 0:i.reasoningLevels)??[]}function nu(n,r){var i;return(i=km(n,r))==null?void 0:i.defaultReasoning}function zw(){const{activeSessionId:n,sessions:r,updateModelConfig:i}=se(),l=se(K=>K.showModelSelector),a=se(K=>K.setShowModelSelector),c=r.find(K=>K.id===n),p=se(K=>K.models),h=se(K=>K.modelsLoading),g=se(K=>K.loadModels),[m,y]=k.useState(!1),x=k.useRef(null);if(Dl(x,()=>y(!1),m),au(()=>y(!1),m),k.useEffect(()=>{l&&(y(!0),a(!1))},[l,a]),k.useEffect(()=>{c!=null&&c.runtime_type&&g(c.runtime_type,c.cwd??void 0)},[c==null?void 0:c.runtime_type,c==null?void 0:c.cwd,g]),!c)return null;const w=c.runtime_type,N=c.model??"",R=c.model_reasoning_effort??"",b=p.length>0?p:[],C=Du(w),P=[...b.length>0?b:C];if(N&&!P.some(K=>K.slug===N)){const K=C[0];P.unshift({slug:N,displayName:N,description:"Custom model",defaultReasoning:(K==null?void 0:K.defaultReasoning)??"medium",reasoningLevels:(K==null?void 0:K.reasoningLevels)??[]})}function H(K){return P.find(xe=>xe.slug===K)}function O(K){var xe;return b.length>0?((xe=H(K))==null?void 0:xe.reasoningLevels)??[]:tu(w,K)}function B(K){var xe;return b.length>0?(xe=H(K))==null?void 0:xe.defaultReasoning:nu(w,K)}const ee=eu.find(K=>K.id===w),Z=H(N),U=N?O(N):[],te=(ee==null?void 0:ee.label)??w,q=(Z==null?void 0:Z.displayName)??(N||"Default"),ie=U.find(K=>K.effort===R),ye=(ie==null?void 0:ie.label)??(R||"Default");function Te(K){var V;const xe=O(K),$=xe.some(W=>W.effort===R)?R:B(K)??((V=xe[0])==null?void 0:V.effort)??"";i(K,$),y(!1)}function Le(K){i(N,K),y(!1)}return u.jsxs("div",{className:"model-selector",ref:x,children:[u.jsxs("button",{className:"model-selector-btn",onClick:()=>y(!m),title:"Change model and thinking level",children:[u.jsx("span",{className:"model-selector-provider",children:te}),u.jsx("span",{className:"model-selector-sep",children:"›"}),u.jsx("span",{className:"model-selector-model",children:q}),ye!=="Default"&&u.jsxs(u.Fragment,{children:[u.jsx("span",{className:"model-selector-sep",children:"›"}),u.jsx("span",{className:"model-selector-reasoning",children:ye})]}),u.jsx(Vi,{size:12,className:"model-selector-chevron"})]}),m&&u.jsxs("div",{className:"model-selector-popover",children:[u.jsxs("div",{className:"model-selector-column",children:[u.jsx("div",{className:"model-selector-col-header",children:"Provider"}),eu.map(K=>u.jsxs("div",{className:`model-selector-item ${K.id===w?"selected":""} ${K.available?"":"disabled"}`,onClick:()=>{if(K.available){if(K.id===w){y(!1);return}i("","",K.id)}},children:[u.jsx("span",{children:K.label}),!K.available&&u.jsxs("span",{className:"model-selector-coming-soon",children:[u.jsx(yy,{size:10})," Soon"]}),K.id===w&&u.jsx(Vr,{size:12})]},K.id))]}),u.jsxs("div",{className:"model-selector-column",children:[u.jsx("div",{className:"model-selector-col-header",children:"Model"}),h&&u.jsx("div",{className:"model-selector-empty",children:"Loading models…"}),!h&&P.length===0&&u.jsx("div",{className:"model-selector-empty",children:"No models available"}),P.map(K=>u.jsxs("div",{className:`model-selector-item ${K.slug===N?"selected":""}`,onClick:()=>Te(K.slug),children:[u.jsxs("div",{className:"model-selector-item-main",children:[u.jsx("span",{className:"model-selector-item-name",children:K.displayName}),u.jsx("span",{className:"model-selector-item-desc",children:K.description})]}),K.slug===N&&u.jsx(Vr,{size:12})]},K.slug))]}),u.jsxs("div",{className:"model-selector-column",children:[u.jsx("div",{className:"model-selector-col-header",children:"Thinking"}),U.length===0&&u.jsx("div",{className:"model-selector-empty",children:"Select a model first"}),U.map(K=>u.jsxs("div",{className:`model-selector-item ${K.effort===R?"selected":""}`,onClick:()=>Le(K.effort),children:[u.jsx("span",{children:K.label}),K.effort===R&&u.jsx(Vr,{size:12})]},K.effort))]})]})]})}function $w(n,r){if(!n||n.turns.length===0)return"—";const i=n.turns[0],l=n.turns[n.turns.length-1],a=r?null:l.updated_at;return Jv(i.created_at,a)}function ml(n){return n>=1e6?`${(n/1e6).toFixed(n%1e6===0?0:1)}M`:n>=1e3?`${Math.round(n/1e3)}K`:String(n)}function ch(){const n=se(i=>i.setShowRemoteModal),r=iu(window.location.hostname);return u.jsxs("div",{className:"sb-item",style:{cursor:"pointer"},title:"Remote access — make this machine remote",onClick:()=>n(!0),children:[u.jsx(Ay,{size:14})," AgentPane",r?` · ${r}`:""]})}function Fw(){var w,N;const n=se(R=>R.activeSessionId),r=se(R=>n?R.sessions.find(b=>b.id===n)??null:null),i=se(R=>n?R.sessionDetails[n]??null:null),l=se(R=>R.wsConnected),a=se(R=>R.switchRightTab),c=(i==null?void 0:i.contextUsage)??null;if(!r)return u.jsxs("div",{className:"ide-statusbar",children:[u.jsx(ch,{}),u.jsx("div",{className:"sb-divider",children:"|"}),u.jsxs("div",{className:"sb-item",title:l?"WebSocket connected":"WebSocket disconnected",children:[u.jsx("span",{className:`status-dot ${l?"done":"error"}`}),l?"Live":"Offline"]}),u.jsx("div",{className:"sb-spacer"}),u.jsxs("div",{className:"sb-item",children:[u.jsx(fp,{size:14})," K"]})]});const p=lu(r),h=$w(i,p.isRunning),g=(i==null?void 0:i.backgroundTasks)??[],m=new Set,y=new Map;for(const R of g)m.add(R.task_id),y.set(R.task_id,R.task_type);for(const R of(i==null?void 0:i.turns)??[])for(const b of R.items)if(b.type==="background_task"&&b.status==="in_progress"){const C=((w=b.data)==null?void 0:w.task_id)??b.external_item_id,L=((N=b.data)==null?void 0:N.task_type)??"unknown";m.add(C),y.set(C,L)}const x=[...y.values()].filter(R=>R==="local_bash").length;return u.jsxs("div",{className:"ide-statusbar",children:[u.jsx(ch,{}),u.jsx("div",{className:"sb-divider",children:"|"}),u.jsx(zw,{}),x>0&&u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"sb-divider",children:"|"}),u.jsxs("div",{className:"sb-item",style:{color:"var(--amber)",cursor:"pointer"},title:`${x} Monitor task${x>1?"s":""} running — click to view`,onClick:()=>a("tasks"),children:[u.jsx(jh,{size:14})," ",x]})]}),u.jsx("div",{className:"sb-spacer"}),u.jsxs("div",{className:"sb-item",title:l?"WebSocket connected":"WebSocket disconnected",children:[u.jsx("span",{className:`status-dot ${l?"done":"error"}`}),l?"Live":"Offline"]}),u.jsx("div",{className:"sb-divider",children:"|"}),u.jsxs("div",{className:"sb-item",style:r.status==="failed"?{color:"var(--red)"}:void 0,children:[u.jsx(cu,{status:p.dot})," ",p.label]}),c&&u.jsx(Uw,{usage:c}),u.jsx("div",{className:"sb-divider",children:"|"}),u.jsx("div",{className:"sb-item",children:h}),u.jsx("div",{className:"sb-divider",children:"|"}),u.jsxs("div",{className:"sb-item",children:[u.jsx(fp,{size:14})," K"]})]})}function Uw({usage:n}){const r=n.percentage>=85?"var(--red)":n.percentage>=60?"var(--amber)":"var(--green)",i=`${ml(n.totalTokens)} / ${ml(n.contextWindow)} tokens`;return u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"sb-divider",children:"|"}),u.jsx("div",{className:"sb-context",title:i,children:u.jsxs("span",{className:"sb-context-text",style:{color:r},children:[Math.round(n.percentage),"% / ",ml(n.totalTokens)," / ",ml(n.contextWindow)]})})]})}function Bw({side:n,minWidth:r,maxWidth:i,getWidth:l,setWidth:a}){const[c,p]=k.useState(!1),h=k.useRef(0),g=k.useRef(0),m=k.useCallback(w=>{const N=w.clientX-h.current,R=n==="left"?g.current+N:g.current-N,b=Math.min(i,Math.max(r,R));a(b)},[n,r,i,a]),y=k.useCallback(()=>{window.removeEventListener("pointermove",m),window.removeEventListener("pointerup",y),document.body.classList.remove("is-resizing"),p(!1)},[m]);return{onPointerDown:k.useCallback(w=>{w.preventDefault(),w.stopPropagation(),h.current=w.clientX,g.current=l(),p(!0),document.body.classList.add("is-resizing"),window.addEventListener("pointermove",m),window.addEventListener("pointerup",y)},[l,m,y]),dragging:c}}function uh({side:n,minWidth:r,maxWidth:i,getWidth:l,setWidth:a}){const{onPointerDown:c,dragging:p}=Bw({side:n,minWidth:r,maxWidth:i,getWidth:l,setWidth:a});return u.jsx("div",{className:`resize-handle ${n}${p?" dragging":""}`,onPointerDown:c,role:"separator","aria-orientation":"vertical","aria-label":`Resize ${n} panel`,"data-resizing":p?"":void 0})}function Ww(){const n=se(c=>c.sidebarWidth),r=se(c=>c.rightPanelWidth),i=se(c=>c.setSidebarWidth),l=se(c=>c.setRightPanelWidth);k.useEffect(()=>{const c=()=>{const p=xl(),{rightPanelWidth:h,setRightPanelWidth:g}=se.getState();h>p&&g(p)};return window.addEventListener("resize",c),()=>window.removeEventListener("resize",c)},[]);const a=`${n}px 6px 1fr 6px ${r}px`;return u.jsxs("div",{className:"ide-root",children:[u.jsxs("div",{className:"ide-layout",style:{gridTemplateColumns:a},children:[u.jsx(jx,{}),u.jsx(uh,{side:"left",minWidth:zc,maxWidth:$c,getWidth:()=>se.getState().sidebarWidth,setWidth:i}),u.jsxs("div",{className:"ide-center",children:[u.jsx(Rx,{}),u.jsx("div",{className:"ide-render",children:u.jsx(cw,{})}),u.jsx(kw,{})]}),u.jsx(uh,{side:"right",minWidth:yl,maxWidth:xl(),getWidth:()=>se.getState().rightPanelWidth,setWidth:l}),u.jsx(Pw,{})]}),u.jsx(Fw,{})]})}function Hw(){const{showNewSessionDialog:n,setShowNewSessionDialog:r,createSession:i,lastModelConfig:l}=se(),a=(l==null?void 0:l.provider)??"codex",c=(l==null?void 0:l.model)??"",p=(l==null?void 0:l.reasoning)??"",[h,g]=k.useState(""),[m,y]=k.useState(c),[x,w]=k.useState(p),[N,R]=k.useState("");if(!n)return null;const b=Du(a),C=m?tu(a,m):[];function L(){i({title:h.trim()||void 0,model:m||void 0,model_reasoning_effort:x||void 0,cwd:N.trim()||void 0,runtime_type:a}),g(""),R("")}function P(O){O.key==="Escape"&&r(!1)}function H(O){var Z;y(O);const B=tu(a,O);B.some(U=>U.effort===x)||w(nu(a,O)??((Z=B[0])==null?void 0:Z.effort)??"")}return u.jsx("div",{className:"dialog-overlay",onClick:()=>r(!1),children:u.jsxs("div",{className:"dialog",onClick:O=>O.stopPropagation(),onKeyDown:P,children:[u.jsxs("div",{className:"dialog-header",children:[u.jsx("span",{className:"dialog-title",children:"New Session"}),u.jsx("button",{className:"dialog-close",onClick:()=>r(!1),children:u.jsx(er,{size:16})})]}),u.jsxs("div",{className:"dialog-body",children:[u.jsxs("label",{className:"dialog-label",children:["Title (optional)",u.jsx("input",{className:"dialog-input",type:"text",value:h,onChange:O=>g(O.target.value),placeholder:"e.g. refactor auth module",autoFocus:!0})]}),u.jsxs("label",{className:"dialog-label",children:["Model",u.jsxs("select",{className:"dialog-input dialog-select",value:m,onChange:O=>H(O.target.value),children:[u.jsx("option",{value:"",children:"Default (Codex picks)"}),b.map(O=>u.jsxs("option",{value:O.slug,children:[O.displayName," — ",O.description]},O.slug))]})]}),C.length>0&&u.jsxs("label",{className:"dialog-label",children:["Thinking Level",u.jsxs("select",{className:"dialog-input dialog-select",value:x,onChange:O=>w(O.target.value),children:[u.jsxs("option",{value:"",children:["Default (",nu(a,m),")"]}),C.map(O=>u.jsx("option",{value:O.effort,children:O.label},O.effort))]})]}),u.jsxs("label",{className:"dialog-label",children:["Working Directory (optional)",u.jsx("input",{className:"dialog-input",type:"text",value:N,onChange:O=>R(O.target.value),placeholder:"e.g. /Users/me/projects/my-app"})]})]}),u.jsxs("div",{className:"dialog-footer",children:[u.jsx("button",{className:"dialog-btn-cancel",onClick:()=>r(!1),children:"Cancel"}),u.jsx("button",{className:"dialog-btn-create",onClick:L,children:"Create"})]})]})})}function Vw(){const n=se(x=>x.showCommandPalette),r=se(x=>x.setShowCommandPalette),i=se(),[l,a]=k.useState(""),[c,p]=k.useState(0),h=k.useRef(null),g=k.useMemo(()=>{const x=i.activeSessionId?i.sessionDetails[i.activeSessionId]:null,w=(x==null?void 0:x.is_running)===1;return[{id:"new-session",label:"New Session",hint:"Create a new Codex session",icon:$i,action:()=>i.setShowNewSessionDialog(!0),available:!0},{id:"delete-session",label:"Delete Session",hint:"Delete the active session",icon:ps,action:()=>{i.activeSessionId&&i.deleteSession(i.activeSessionId)},available:!!i.activeSessionId},{id:"send-message",label:"Send Message",hint:"Focus the message input",icon:Il,action:()=>{const N=document.querySelector(".cmd-input");N==null||N.focus()},available:!!i.activeSessionId&&!w},{id:"cancel-turn",label:"Cancel Turn",hint:"Cancel the running turn",icon:Al,action:()=>i.cancelTurn(),available:w},{id:"tab-turns",label:"Switch to Turns Tab",hint:"View conversation timeline",icon:vy,action:()=>i.switchRightTab("turns"),available:!!i.activeSessionId},{id:"tab-changes",label:"Switch to Changes Tab",hint:"View file changes",icon:dy,action:()=>i.switchRightTab("changes"),available:!!i.activeSessionId},{id:"close-tab",label:"Close Tab",hint:"Close the active session tab",icon:er,action:()=>{i.activeSessionId&&i.closeTab(i.activeSessionId)},available:!!i.activeSessionId}]},[i]),m=k.useMemo(()=>{const x=l.toLowerCase().trim(),w=g.filter(N=>N.available);return x?w.filter(N=>N.label.toLowerCase().includes(x)||N.hint.toLowerCase().includes(x)):w},[g,l]);k.useEffect(()=>{n&&(a(""),p(0),setTimeout(()=>{var x;return(x=h.current)==null?void 0:x.focus()},50))},[n]);function y(x){if(x.key==="ArrowDown")x.preventDefault(),p(w=>Math.min(w+1,m.length-1));else if(x.key==="ArrowUp")x.preventDefault(),p(w=>Math.max(w-1,0));else if(x.key==="Enter"){x.preventDefault();const w=m[c];w&&(w.action(),r(!1))}else x.key==="Escape"&&r(!1)}return n?u.jsx("div",{className:"palette-overlay",onClick:()=>r(!1),children:u.jsxs("div",{className:"palette",onClick:x=>x.stopPropagation(),children:[u.jsxs("div",{className:"palette-search",children:[u.jsx("input",{ref:h,type:"text",placeholder:"Type a command…",value:l,onChange:x=>{a(x.target.value),p(0)},onKeyDown:y}),u.jsx("span",{className:"palette-esc",children:"ESC"})]}),m.length===0?u.jsx("div",{className:"palette-empty",children:"No matching commands"}):u.jsx("div",{className:"palette-list",children:m.map((x,w)=>{const N=x.icon;return u.jsxs("div",{className:`palette-item ${w===c?"selected":""}`,onClick:()=>{x.action(),r(!1)},onMouseEnter:()=>p(w),children:[u.jsx("span",{className:"palette-item-icon",children:u.jsx(N,{size:16})}),u.jsx("span",{className:"palette-item-label",children:x.label}),u.jsx("span",{className:"palette-item-hint",children:x.hint}),w===c&&u.jsx(uy,{size:12,className:"palette-item-enter"})]},x.id)})}),u.jsxs("div",{className:"palette-footer",children:[u.jsxs("span",{className:"palette-footer-hint",children:[u.jsx("span",{className:"kbd",children:"↑"}),u.jsx("span",{className:"kbd",children:"↓"})," Navigate"]}),u.jsxs("span",{className:"palette-footer-hint",children:[u.jsx("span",{className:"kbd",children:"↵"})," Select"]}),u.jsxs("span",{className:"palette-footer-hint",children:[u.jsx("span",{className:"kbd",children:"Esc"})," Close"]})]})]})}):null}const dh=/^[a-z][a-z0-9-]{1,30}$/,Gw=2e3;function qw(){const{showRemoteModal:n,setShowRemoteModal:r,selectSession:i}=se(),[l,a]=k.useState(null),[c,p]=k.useState(null),[h,g]=k.useState(!1),[m,y]=k.useState(!1),[x,w]=k.useState(!1),[N,R]=k.useState(!1),[b,C]=k.useState("main"),[L,P]=k.useState(""),[H,O]=k.useState(!1),[B,ee]=k.useState(null),Z=k.useRef(null);Dl(Z,()=>R(!1),N);const U=m||x,te=k.useCallback(async()=>{g(!0),p(null);try{const $=await fetch(`${Wr()}/remote/status`,{headers:{Accept:"application/json"}});if(!$.ok)throw new Error(`status ${$.status}`);a(await $.json())}catch{a(null),p("Machine management is only available from this machine's local pane.")}finally{g(!1)}},[]);k.useEffect(()=>{n&&(C("main"),ee(null),te())},[n,te]);const q=B!==null&&B.state==="running";if(k.useEffect(()=>{if(!q)return;const $=setInterval(async()=>{try{const V=await fetch(`${Wr()}/remote/enable`,{headers:{Accept:"application/json"}});V.ok&&ee(await V.json())}catch{}},Gw);return()=>clearInterval($)},[q]),!n)return null;const ie=!!(l!=null&&l.tunnel.provisioned)&&!!(l!=null&&l.service.running)&&!!(l!=null&&l.connection.ok);function ye($){$.key==="Escape"&&r(!1)}async function Te($){if(dh.test($)){O(!0);try{const V=await fetch(`${Wr()}/remote/enable`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mahlas:$})});if(!V.ok)throw new Error(`enable ${V.status}`);ee(await V.json()),C("setup")}catch{p("Could not start the setup — check the daemon logs.")}finally{O(!1)}}}function Le(){B!=null&&B.troubleshootingSessionId&&(i(B.troubleshootingSessionId),r(!1))}async function K(){y(!0);try{await fetch(`${Wr()}/remote/disable`,{method:"POST"}),await te()}catch{p("Could not stop the tunnel service — check the service logs.")}finally{y(!1)}}async function xe(){if(R(!1),!!window.confirm(`Remove the tunnel completely?
|
|
414
|
+
|
|
415
|
+
This deletes the Cloudflare tunnel, its DNS record and Access app, and this machine's remote state. The mahlas is released.
|
|
416
|
+
|
|
417
|
+
This cannot be undone.`)){w(!0);try{const V=await fetch(`${Wr()}/remote/uninstall`,{method:"DELETE"});if(!V.ok)throw new Error(`uninstall ${V.status}`);await te()}catch{p("Could not remove the tunnel — check the daemon logs.")}finally{w(!1)}}}function we(){if(!B)return u.jsxs(u.Fragment,{children:[u.jsxs("label",{className:"dialog-label",children:["Machine name (mahlas)",u.jsx("input",{className:"dialog-input",value:L,onChange:E=>P(E.target.value.toLowerCase()),placeholder:"my-macbook",autoFocus:!0})]}),u.jsx("div",{className:"dialog-label",style:{opacity:.7,marginTop:-4},children:"The machine will be reachable at https://<name>.repoburg.com"}),u.jsxs("div",{className:"dialog-footer",children:[u.jsx("button",{className:"dialog-btn-cancel",onClick:()=>C("main"),children:"Back"}),u.jsxs("button",{className:"dialog-btn-create",disabled:!dh.test(L)||H,onClick:()=>void Te(L),children:[H?u.jsx(gr,{size:14,className:"spin",style:{verticalAlign:"middle",marginRight:6}}):null,"Start setup"]})]})]});const $=["detect","provision","install","verify","ready"],V=$.indexOf(B.step),W=B.state==="ready";return u.jsxs(u.Fragment,{children:[B.state==="running"&&u.jsxs("div",{className:"dialog-label",style:{display:"flex",alignItems:"center",gap:6},children:[u.jsx(gr,{size:14,className:"spin"})," Setting up the remote tunnel…"]}),B.state==="ready"&&u.jsxs("div",{className:"dialog-label",style:{color:"var(--green)",display:"flex",alignItems:"center",gap:6},children:[u.jsx(Vr,{size:14})," Setup complete — you can close this window."]}),B.state==="ready"&&B.hostname&&u.jsxs("div",{className:"dialog-label",children:["This machine is accessible at"," ",u.jsx("a",{href:`https://${B.hostname}`,target:"_blank",rel:"noreferrer",children:B.hostname})]}),u.jsx("ol",{className:"dialog-label",style:{margin:"4px 0",paddingLeft:0,listStyle:"none"},children:$.map((E,D)=>{const le=W||V>-1&&D<V,he=!W&&D===V&&B.state==="running";return u.jsxs("li",{style:{display:"flex",alignItems:"center",gap:6,opacity:le||he?1:.4,color:le?"var(--green)":void 0},children:[le?u.jsx(Vr,{size:13}):he?u.jsx(gr,{size:13,className:"spin"}):u.jsx(cy,{size:9,style:{marginLeft:2,marginRight:2}}),E]},E)})}),B.logs.length>0&&u.jsx("div",{className:"dialog-label",style:{opacity:.7,fontSize:12,whiteSpace:"pre-wrap"},children:B.logs.slice(-3).map(E=>E.message).join(`
|
|
418
|
+
`)}),B.state==="troubleshooting"&&u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"dialog-label",style:{color:"var(--red)"},children:"Setup failed — a troubleshooting session is open and the agent is working on the fix in the background."}),u.jsx("div",{className:"dialog-footer",children:u.jsx("button",{className:"dialog-btn-create",onClick:Le,children:"Open troubleshooting session"})})]}),B.state==="failed"&&u.jsxs("div",{className:"dialog-label",style:{color:"var(--red)"},children:["Setup failed: ",B.error]}),u.jsx("div",{className:"dialog-footer",children:u.jsx("button",{className:"dialog-btn-cancel",onClick:()=>void te(),children:"Refresh status"})})]})}return u.jsx("div",{className:"dialog-overlay",onClick:()=>r(!1),children:u.jsxs("div",{className:"dialog",onClick:$=>$.stopPropagation(),onKeyDown:ye,children:[u.jsxs("div",{className:"dialog-header",children:[u.jsx("span",{className:"dialog-title",children:"Remote Access"}),u.jsx("button",{className:"dialog-close",onClick:()=>r(!1),children:u.jsx(er,{size:16})})]}),u.jsxs("div",{className:"dialog-body",children:[h&&u.jsxs("div",{className:"dialog-label",style:{display:"flex",alignItems:"center",gap:6},children:[u.jsx(gr,{size:14,className:"spin"})," Loading machine status…"]}),c&&u.jsx("div",{className:"dialog-label",style:{color:"var(--red)"},children:c}),b==="setup"?we():u.jsxs(u.Fragment,{children:[ie&&(l==null?void 0:l.tunnel.hostname)&&u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"dialog-label",children:["This machine is reachable at"," ",u.jsx("a",{href:`https://${l.tunnel.hostname}`,target:"_blank",rel:"noreferrer",children:l.tunnel.hostname})]}),u.jsxs("div",{style:{position:"relative",display:"flex",marginTop:8},children:[u.jsxs("button",{className:"dialog-btn-cancel",style:{flex:1,borderTopRightRadius:0,borderBottomRightRadius:0},onClick:()=>void K(),disabled:U,children:[m?u.jsx(gr,{size:14,className:"spin",style:{verticalAlign:"middle",marginRight:6}}):null,"Stop tunnel connection"]}),u.jsx("button",{className:"dialog-btn-cancel",style:{width:30,borderLeft:"none",borderTopLeftRadius:0,borderBottomLeftRadius:0,display:"inline-flex",alignItems:"center",justifyContent:"center"},onClick:()=>R($=>!$),disabled:U,"aria-label":"More tunnel actions","aria-haspopup":"menu","aria-expanded":N,children:x?u.jsx(gr,{size:14,className:"spin"}):u.jsx(Vi,{size:14})}),N&&u.jsx("div",{ref:Z,className:"ctx-menu",role:"menu",style:{position:"absolute",right:0,top:"calc(100% + 4px)",zIndex:10},children:u.jsxs("div",{className:"ctx-menu-item ctx-danger",role:"menuitem",onClick:()=>void xe(),children:[u.jsx(ps,{size:12})," Remove tunnel"]})})]})]}),!ie&&u.jsx(u.Fragment,{children:l!=null&&l.tunnel.provisioned&&l.tunnel.mahlas&&l.tunnel.hostname?u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"dialog-label",children:["Tunnel exists as"," ",u.jsx("a",{href:`https://${l.tunnel.hostname}`,target:"_blank",rel:"noreferrer",children:l.tunnel.hostname})," ","but the connection is stopped."]}),u.jsxs("button",{className:"dialog-btn-create",style:{width:"100%"},onClick:()=>void Te(l.tunnel.mahlas),disabled:H,children:[H?u.jsx(gr,{size:14,className:"spin",style:{verticalAlign:"middle",marginRight:6}}):u.jsx(pp,{size:16,style:{verticalAlign:"middle",marginRight:6}}),"Resume tunnel connection"]})]}):u.jsxs(u.Fragment,{children:[u.jsxs("button",{className:"dialog-btn-create",style:{width:"100%"},onClick:()=>C("setup"),children:[u.jsx(pp,{size:16,style:{verticalAlign:"middle",marginRight:6}}),"Make this machine remote"]}),u.jsx("div",{className:"dialog-label",style:{opacity:.7,marginTop:-4},children:"The daemon sets everything up and shows the progress here."})]})})]})]})]})})}const Kw={success:ly,error:du,info:hy,warn:jy},Yw=4e3;function Qw({toast:n}){const r=se(p=>p.removeToast),i=Kw[n.type],l=k.useRef(null);k.useEffect(()=>{function p(){l.current=setTimeout(()=>r(n.id),Yw)}return p(),()=>{l.current&&clearTimeout(l.current)}},[n.id,r]);function a(){l.current&&(clearTimeout(l.current),l.current=null)}function c(){l.current=setTimeout(()=>r(n.id),2e3)}return u.jsxs("div",{className:`toast toast-${n.type}`,onMouseEnter:a,onMouseLeave:c,children:[u.jsx(i,{size:16}),u.jsx("span",{className:"toast-message",children:n.message}),n.undoAction&&u.jsxs("button",{className:"toast-undo",onClick:()=>{var p;(p=n.undoAction)==null||p.call(n),r(n.id)},children:[u.jsx(Ry,{size:12})," ",n.undoLabel||"Undo"]}),u.jsx("button",{className:"toast-close",onClick:()=>r(n.id),children:u.jsx(er,{size:14})})]})}function Xw(){const n=se(r=>r.toasts);return n.length===0?null:u.jsx("div",{className:"toast-container",children:n.map(r=>u.jsx(Qw,{toast:r},r.id))})}let In=null,qs=null,Hi=1e3;const Zw=1e4;function Jw(){const n=Wr();return n?`${n.replace(/^http/,"ws")}/ws`:`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`}function ru(){In&&(In.readyState===WebSocket.OPEN||In.readyState===WebSocket.CONNECTING)||(In=new WebSocket(Jw()),In.onopen=()=>{const n=Hi>1e3;if(Hi=1e3,se.getState().setWsConnected(!0),se.getState().addLogEntry("INFO","WebSocket connected"),n){const r=se.getState();r.activeSessionId&&(r.refreshActiveSession(),r.addToast("info","WebSocket reconnected — session state reconciled"))}},In.onclose=()=>{se.getState().setWsConnected(!1),se.getState().addLogEntry("WARN","WebSocket disconnected"),se.getState().addToast("warn","WebSocket disconnected — reconnecting…"),tk()},In.onerror=()=>{},In.onmessage=n=>{try{const r=JSON.parse(n.data),i=nk[r.event];i&&i(r.data)}catch{}})}function ek(){qs&&(clearTimeout(qs),qs=null),In&&(In.onclose=null,In.close(),In=null),se.getState().setWsConnected(!1)}function tk(){qs||(qs=window.setTimeout(()=>{qs=null,ru()},Hi),Hi=Math.min(Hi*2,Zw))}const nk={"turn:started":n=>{const r=n;se.getState().onTurnStarted(r.sessionId,r.turnId)},"item:started":n=>{const r=n;se.getState().onItemStarted(r.sessionId,r.turnId,r.item)},"item:updated":n=>{const r=n;se.getState().onItemUpdated(r.sessionId,r.turnId,r.item)},"item:completed":n=>{const r=n;se.getState().onItemCompleted(r.sessionId,r.turnId,r.item)},"item:delta":n=>{const r=n;se.getState().onItemDelta(r.sessionId,r.turnId,r.itemId,r.delta)},"turn:completed":n=>{const r=n;se.getState().onTurnCompleted(r.sessionId,r.turnId,r.usage,r.hasUnreviewed,r.response??void 0)},"turn:tokenUsage":n=>{const r=n;se.getState().onTokenUsageUpdated(r.sessionId,r.turnId,r.usage)},"turn:contextUsage":n=>{const r=n,i={totalTokens:r.totalTokens,contextWindow:r.contextWindow,percentage:r.percentage};se.getState().onContextUsageUpdated(r.sessionId,i)},"turn:failed":n=>{const r=n;se.getState().onTurnFailed(r.sessionId,r.turnId,r.error)},"turn:cancelled":n=>{const r=n;se.getState().onTurnCancelled(r.sessionId,r.turnId)},"session:title":n=>{const r=n;se.getState().onSessionTitle(r.sessionId,r.title)},background_tasks:n=>{const r=n;se.getState().onBackgroundTasksChanged(r.sessionId,r.tasks)},"thread:created":n=>{const r=n;se.getState().onThreadCreated(r.sessionId,r.thread,r.turn)},"thread:followup":n=>{const r=n;se.getState().onThreadFollowup(r.sessionId,r.threadId,r.turn)},"thread:resolved":n=>{const r=n;se.getState().onThreadResolved(r.sessionId,r.threadId,r.status)},"thread:deleted":n=>{const r=n;se.getState().onThreadDeleted(r.sessionId,r.threadId)}};function rk(){const n=se(r=>r.init);return k.useEffect(()=>{wv(),n(),ru();function r(){if(document.visibilityState!=="visible")return;const i=se.getState(),l=i.activeSessionId;if(!l)return;const a=i.sessionDetails[l];i.wsConnected||ru(),a&&a.is_running===1&&(i.refreshActiveSession(),i.addLogEntry("INFO","Tab returned — reconciling session state"))}return document.addEventListener("visibilitychange",r),()=>{ek(),document.removeEventListener("visibilitychange",r)}},[n]),null}function sk(){const n=se(a=>a.loading),r=se(a=>a.error),i=se(a=>a.sessions),l=se(a=>a.setShowCommandPalette);return k.useEffect(()=>{function a(c){(c.metaKey||c.ctrlKey)&&c.key==="k"&&(c.preventDefault(),l(!0))}return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[l]),u.jsxs(u.Fragment,{children:[u.jsx(rk,{}),n&&i.length===0?u.jsx("div",{className:"empty-state",children:"Loading sessions…"}):r&&i.length===0?u.jsxs("div",{className:"empty-state",children:["Error: ",r]}):u.jsxs(u.Fragment,{children:[u.jsx(Ww,{}),u.jsx(Hw,{}),u.jsx(qw,{}),u.jsx(Vw,{}),u.jsx(Xw,{})]})]})}uv.createRoot(document.getElementById("root")).render(u.jsx(nt.StrictMode,{children:u.jsx(sk,{})}));
|